From 857acb3e524ba88c9d44035dccf1c65add245409 Mon Sep 17 00:00:00 2001 From: Denvi Date: Tue, 29 Oct 2019 22:28:52 +0500 Subject: [PATCH 01/80] Working on ui --- .gitignore | 7 + src/CMakeLists.txt | 50 - src/candle.pro | 6 +- src/candle.sln | 25 - src/candle.vcxproj | 398 -- src/drawers/heightmapborderdrawer.cpp | 29 +- src/drawers/origindrawer.cpp | 68 +- src/drawers/shaderdrawable.cpp | 15 +- src/drawers/shaderdrawable.h | 9 +- src/frmmain.cpp | 420 ++- src/frmmain.h | 67 +- src/frmmain.ui | 4894 +++++++++++++------------ src/frmsettings.cpp | 2 +- src/frmsettings.h | 4 +- src/frmsettings.ui | 2817 +++++++------- src/parser/linesegment.cpp | 17 +- src/parser/pointsegment.cpp | 51 +- src/utils/interpolation.h | 7 +- src/widgets/glwidget.cpp | 10 +- src/widgets/glwidget.h | 4 +- 20 files changed, 4360 insertions(+), 4540 deletions(-) delete mode 100644 src/CMakeLists.txt delete mode 100644 src/candle.sln delete mode 100644 src/candle.vcxproj diff --git a/.gitignore b/.gitignore index eb1baa49..7d07f2a2 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,10 @@ bin/* /src/Candle_resource.aps /src/Candle_resource.rc /src/ui_* +/src/release + +#vscode +.vscode + +#makefiles +Makefile* \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt deleted file mode 100644 index b924a515..00000000 --- a/src/CMakeLists.txt +++ /dev/null @@ -1,50 +0,0 @@ -cmake_minimum_required(VERSION 3.13) -project(Candle) - -# set(CMAKE_VERBOSE_MAKEFILE ON) - -# instruct CMake to run moc automatically when needed -set(CMAKE_AUTOMOC ON) - -# create code from a list of Qt designer ui files -set(CMAKE_AUTOUIC ON) - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -W -msse3") - -if(APPLE) - add_compile_definitions(Q_OS_MAC) -endif() -add_compile_definitions(APP_VERSION="1.1.9") -add_compile_definitions(QT_NO_DEBUG) - -find_package(Qt5 COMPONENTS Core Widgets OpenGL SerialPort REQUIRED) - -include_directories(${PROJECT_SOURCE_DIR}) - -file(GLOB SRC_FILES ${PROJECT_SOURCE_DIR}/*.cpp - ${PROJECT_SOURCE_DIR}/drawers/*.cpp - ${PROJECT_SOURCE_DIR}/parser/*.cpp - ${PROJECT_SOURCE_DIR}/widgets/*.cpp - ${PROJECT_SOURCE_DIR}/tables/*.cpp - ) - -qt5_add_resources(SHADER_RSC - ${PROJECT_SOURCE_DIR}/shaders.qrc - ${PROJECT_SOURCE_DIR}/images.qrc - ${PROJECT_SOURCE_DIR}/fonts.qrc - ) - -if(APPLE) - add_executable(Candle MACOSX_BUNDLE ${SRC_FILES} ${SHADER_RSC}) - set_target_properties(Candle PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${PROJECT_SOURCE_DIR}/Info.plist) -else() - add_executable(Candle ${SRC_FILES} ${SHADER_RSC}) -endif() - -target_link_libraries(Candle - Qt5::Core - Qt5::Widgets - Qt5::OpenGL - Qt5::Gui - Qt5::SerialPort - ) diff --git a/src/candle.pro b/src/candle.pro index c0c5ed34..d6acd5e4 100644 --- a/src/candle.pro +++ b/src/candle.pro @@ -111,4 +111,8 @@ RESOURCES += \ shaders.qrc \ images.qrc -CONFIG += c++11 +CONFIG(release, debug|release) { + QMAKE_CXXFLAGS += -Z7 -Fdrelease\\candle.pdb + QMAKE_CFLAGS += -Z7 -Fdrelease\\candle.pdb + QMAKE_LFLAGS += /DEBUG /OPT:REF +} \ No newline at end of file diff --git a/src/candle.sln b/src/candle.sln deleted file mode 100644 index 1ac4e7fc..00000000 --- a/src/candle.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.168 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "candle", "candle.vcxproj", "{225C620D-C774-30C0-A16D-B392DA51D110}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86 = Debug|x86 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {225C620D-C774-30C0-A16D-B392DA51D110}.Debug|x86.ActiveCfg = Debug|Win32 - {225C620D-C774-30C0-A16D-B392DA51D110}.Debug|x86.Build.0 = Debug|Win32 - {225C620D-C774-30C0-A16D-B392DA51D110}.Release|x86.ActiveCfg = Release|Win32 - {225C620D-C774-30C0-A16D-B392DA51D110}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {D534C18E-1297-47CD-9BA5-4E960950B387} - EndGlobalSection -EndGlobal diff --git a/src/candle.vcxproj b/src/candle.vcxproj deleted file mode 100644 index 4c506115..00000000 --- a/src/candle.vcxproj +++ /dev/null @@ -1,398 +0,0 @@ - - - - - Release - Win32 - - - Debug - Win32 - - - - {225C620D-C774-30C0-A16D-B392DA51D110} - Candle - Qt4VSv1.0 - 10.0.17763.0 - 10.0.17763.0 - - - - v141 - release\ - false - NotSet - Application - release\ - Candle - - - v141 - debug\ - false - NotSet - Application - debug\ - Candle - - - - $(MSBuildProjectDirectory)\QtMsBuild - - - - - - - - - - - - - - - - - .\build-$(Platform)\$(Configuration)\Bin - .\build-$(Platform)\$(Configuration)\ - Candle - true - false - .\build-$(Platform)\$(Configuration)\Bin - .\build-$(Platform)\$(Configuration)\ - Candle - true - - - - .\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\include;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\include\QtOpenGL;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\include\QtWidgets;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\include\QtWinExtras;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\include\QtGui;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\include\QtANGLE;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\include\QtSerialPort;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\include\QtCore;release;\include;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\mkspecs\win32-msvc;%(AdditionalIncludeDirectories) - -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions) - release\ - false - None - 4577;4467;%(DisableSpecificWarnings) - Sync - $(IntDir) - MaxSpeed - _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WINDOWS;APP_VERSION="1.1.8";_USE_MATH_DEFINES;QT_NO_DEBUG;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_WINEXTRAS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_CORE_LIB;NDEBUG;%(PreprocessorDefinitions) - false - $(IntDir)vc$(PlatformToolsetVersion).pdb - MultiThreadedDLL - true - true - Level3 - true - - - $(QTDIR)\lib\Qt5OpenGL.lib;$(QTDIR)\lib\Qt5Widgets.lib;$(QTDIR)\lib\Qt5WinExtras.lib;$(QTDIR)\lib\Qt5Gui.lib;$(QTDIR)\lib\Qt5SerialPort.lib;$(QTDIR)\lib\Qt5Core.lib;$(QTDIR)\lib\qtmain.lib;%(AdditionalDependencies) - $(QTDIR)\lib;E:\QT\QT5.12.0\5.12.0\MSVC2017\lib;%(AdditionalLibraryDirectories) - "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) - true - false - true - false - $(OutDir)\Candle.exe - true - Windows - true - 1.1 - - - Unsigned - None - 0 - - - _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WINDOWS;sNan="65536";APP_VERSION=\"1.1.8\";_USE_MATH_DEFINES;QT_NO_DEBUG;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_WINEXTRAS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_CORE_LIB;%(PreprocessorDefinitions) - - - E:\QT\QT5.12.0\5.12.0\MSVC2017 - .\build-$(Platform)\$(Configuration)\moc_%(Filename).cpp - _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WINDOWS;APP_VERSION="1.1.8";_USE_MATH_DEFINES;QT_NO_DEBUG;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_WINEXTRAS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_CORE_LIB;NDEBUG;%(PreprocessorDefinitions) - msvc - ./$(Configuration)/moc_predefs.h - Moc'ing %(Identity)... - %(FullPath) - output - .\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;E:/QT/QT5.12.0/5.12.0/MSVC2017/mkspecs/$(Platform)-msvc;.;E:/QT/QT5.12.0/5.12.0/MSVC2017/include;E:/QT/QT5.12.0/5.12.0/MSVC2017/include/QtOpenGL;E:/QT/QT5.12.0/5.12.0/MSVC2017/include/QtWidgets;E:/QT/QT5.12.0/5.12.0/MSVC2017/include/QtWinExtras;E:/QT/QT5.12.0/5.12.0/MSVC2017/include/QtGui;E:/QT/QT5.12.0/5.12.0/MSVC2017/include/QtANGLE;E:/QT/QT5.12.0/5.12.0/MSVC2017/include/QtSerialPort;E:/QT/QT5.12.0/5.12.0/MSVC2017/include/QtCore;C:\Program Files (x86)\Microsoft Visual Studio\VC98\atl\include;C:\Program Files (x86)\Microsoft Visual Studio\VC98\mfc\include;C:\Program Files (x86)\Microsoft Visual Studio\VC98\include;E:\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include;E:\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt - - - .\build-$(Platform)\$(Configuration)\qrc_%(Filename).cpp - E:\QT\QT5.12.0\5.12.0\MSVC2017 - default - Rcc'ing %(Identity)... - %(FullPath) - - - E:\QT\QT5.12.0\5.12.0\MSVC2017 - Uic'ing %(Identity)... - %(FullPath) - .\build-$(Platform)\$(Configuration)\ui_%(Filename).h - - - - - .\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;.;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\include;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\include\QtOpenGL;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\include\QtWidgets;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\include\QtWinExtras;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\include\QtGui;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\include\QtANGLE;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\include\QtSerialPort;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\include\QtCore;debug;\include;..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\mkspecs\win32-msvc;%(AdditionalIncludeDirectories) - -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 %(AdditionalOptions) - debug\ - false - ProgramDatabase - 4577;4467;%(DisableSpecificWarnings) - Sync - $(IntDir) - Disabled - _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WINDOWS;APP_VERSION="1.1.8";_USE_MATH_DEFINES;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_WINEXTRAS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_CORE_LIB;%(PreprocessorDefinitions) - false - MultiThreadedDebugDLL - true - true - Level3 - true - $(IntDir)vc$(PlatformToolsetVersion).pdb - - - $(QTDIR)\lib\Qt5OpenGLd.lib;$(QTDIR)\lib\Qt5Widgetsd.lib;$(QTDIR)\lib\Qt5WinExtrasd.lib;$(QTDIR)\lib\Qt5Guid.lib;$(QTDIR)\lib\Qt5SerialPortd.lib;$(QTDIR)\lib\Qt5Cored.lib;$(QTDIR)\lib\qtmaind.lib;%(AdditionalDependencies) - $(QTDIR)\lib;E:\QT\QT5.12.0\5.12.0\MSVC2017\lib;%(AdditionalLibraryDirectories) - "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions) - true - true - true - $(OutDir)\Candle.exe - true - Windows - true - 1.1 - - - Unsigned - None - 0 - - - _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WINDOWS;APP_VERSION=\"1.1.8\";_USE_MATH_DEFINES;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_WINEXTRAS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_CORE_LIB;_DEBUG;%(PreprocessorDefinitions) - - - E:\QT\QT5.12.0\5.12.0\MSVC2017 - .\build-$(Platform)\$(Configuration)\moc_%(Filename).cpp - _WINDOWS;UNICODE;_UNICODE;WIN32;_ENABLE_EXTENDED_ALIGNED_STORAGE;WINDOWS;APP_VERSION="1.1.8";_USE_MATH_DEFINES;QT_OPENGL_LIB;QT_WIDGETS_LIB;QT_WINEXTRAS_LIB;QT_GUI_LIB;QT_SERIALPORT_LIB;QT_CORE_LIB;%(PreprocessorDefinitions) - msvc - ./$(Configuration)/moc_predefs.h - Moc'ing %(Identity)... - %(FullPath) - output - .\GeneratedFiles\$(ConfigurationName);.\GeneratedFiles;E:/QT/QT5.12.0/5.12.0/MSVC2017/mkspecs/$(Platform)-msvc;.;E:/QT/QT5.12.0/5.12.0/MSVC2017/include;E:/QT/QT5.12.0/5.12.0/MSVC2017/include/QtOpenGL;E:/QT/QT5.12.0/5.12.0/MSVC2017/include/QtWidgets;E:/QT/QT5.12.0/5.12.0/MSVC2017/include/QtWinExtras;E:/QT/QT5.12.0/5.12.0/MSVC2017/include/QtGui;E:/QT/QT5.12.0/5.12.0/MSVC2017/include/QtANGLE;E:/QT/QT5.12.0/5.12.0/MSVC2017/include/QtSerialPort;E:/QT/QT5.12.0/5.12.0/MSVC2017/include/QtCore;C:\Program Files (x86)\Microsoft Visual Studio\VC98\atl\include;C:\Program Files (x86)\Microsoft Visual Studio\VC98\mfc\include;C:\Program Files (x86)\Microsoft Visual Studio\VC98\include;E:\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include;E:\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt - - - default - .\build-$(Platform)\$(Configuration)\qrc_%(Filename).cpp - E:\QT\QT5.12.0\5.12.0\MSVC2017 - Rcc'ing %(Identity)... - %(FullPath) - - - E:\QT\QT5.12.0\5.12.0\MSVC2017 - Uic'ing %(Identity)... - %(FullPath) - .\build-$(Platform)\$(Configuration)\ui_%(Filename).h - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Document - true - ..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\mkspecs\features\data\dummy.cpp;%(AdditionalInputs) - cl -Bx"$(QTDIR)\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -Zi -MDd -g3 -pg -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E ..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\mkspecs\features\data\dummy.cpp 2>NUL >debug\moc_predefs.h - Generate moc_predefs.h - debug\moc_predefs.h;%(Outputs) - - - Document - ..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\mkspecs\features\data\dummy.cpp;%(AdditionalInputs) - cl -Bx"$(QTDIR)\bin\qmake.exe" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -E ..\..\..\QT\QT5.12.0\5.12.0\MSVC2017\mkspecs\features\data\dummy.cpp 2>NUL >release\moc_predefs.h - Generate moc_predefs.h - release\moc_predefs.h;%(Outputs) - true - - - - - - - - - - - - - - - ui_frmabout.h - ui_frmabout.h - - - ui_frmmain.h - ui_frmmain.h - - - ui_frmsettings.h - ui_frmsettings.h - - - ui_sliderbox.h - ui_sliderbox.h - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - images - images - - - - - - - - - - - - - - shaders - shaders - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/drawers/heightmapborderdrawer.cpp b/src/drawers/heightmapborderdrawer.cpp index 3a988164..a949bb61 100644 --- a/src/drawers/heightmapborderdrawer.cpp +++ b/src/drawers/heightmapborderdrawer.cpp @@ -20,16 +20,25 @@ void HeightMapBorderDrawer::setBorderRect(const QRectF &borderRect) bool HeightMapBorderDrawer::updateData() { - m_lines = { - {QVector3D(m_borderRect.x(), m_borderRect.y(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(m_borderRect.x(), m_borderRect.y() + m_borderRect.height(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(m_borderRect.x(), m_borderRect.y() + m_borderRect.height(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(m_borderRect.x() + m_borderRect.width(), m_borderRect.y() + m_borderRect.height(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(m_borderRect.x() + m_borderRect.width(), m_borderRect.y() + m_borderRect.height(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(m_borderRect.x() + m_borderRect.width(), m_borderRect.y(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(m_borderRect.x() + m_borderRect.width(), m_borderRect.y(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(m_borderRect.x(), m_borderRect.y(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - }; + // m_lines = { + // {QVector3D(m_borderRect.x(), m_borderRect.y(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, + // {QVector3D(m_borderRect.x(), m_borderRect.y() + m_borderRect.height(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, + // {QVector3D(m_borderRect.x(), m_borderRect.y() + m_borderRect.height(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, + // {QVector3D(m_borderRect.x() + m_borderRect.width(), m_borderRect.y() + m_borderRect.height(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, + // {QVector3D(m_borderRect.x() + m_borderRect.width(), m_borderRect.y() + m_borderRect.height(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, + // {QVector3D(m_borderRect.x() + m_borderRect.width(), m_borderRect.y(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, + // {QVector3D(m_borderRect.x() + m_borderRect.width(), m_borderRect.y(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, + // {QVector3D(m_borderRect.x(), m_borderRect.y(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, + // }; + m_lines = QVector() + << VertexData(QVector3D(m_borderRect.x(), m_borderRect.y(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(m_borderRect.x(), m_borderRect.y() + m_borderRect.height(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(m_borderRect.x(), m_borderRect.y() + m_borderRect.height(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(m_borderRect.x() + m_borderRect.width(), m_borderRect.y() + m_borderRect.height(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(m_borderRect.x() + m_borderRect.width(), m_borderRect.y() + m_borderRect.height(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(m_borderRect.x() + m_borderRect.width(), m_borderRect.y(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(m_borderRect.x() + m_borderRect.width(), m_borderRect.y(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(m_borderRect.x(), m_borderRect.y(), 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)); return true; } diff --git a/src/drawers/origindrawer.cpp b/src/drawers/origindrawer.cpp index fd49fcda..6edf47d1 100644 --- a/src/drawers/origindrawer.cpp +++ b/src/drawers/origindrawer.cpp @@ -6,46 +6,46 @@ OriginDrawer::OriginDrawer() bool OriginDrawer::updateData() { - m_lines = { + m_lines = QVector() // X-axis - {QVector3D(0, 0, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(9, 0, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(10, 0, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(8, 0.5, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(8, 0.5, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(8, -0.5, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(8, -0.5, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(10, 0, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, + << VertexData(QVector3D(0, 0, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(9, 0, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(10, 0, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(8, 0.5, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(8, 0.5, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(8, -0.5, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(8, -0.5, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(10, 0, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) // Y-axis - {QVector3D(0, 0, 0), QVector3D(0.0, 1.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(0, 9, 0), QVector3D(0.0, 1.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(0, 10, 0), QVector3D(0.0, 1.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(0.5, 8, 0), QVector3D(0.0, 1.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(0.5, 8, 0), QVector3D(0.0, 1.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(-0.5, 8, 0), QVector3D(0.0, 1.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(-0.5, 8, 0), QVector3D(0.0, 1.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(0, 10, 0), QVector3D(0.0, 1.0, 0.0), QVector3D(sNan, sNan, sNan)}, + << VertexData(QVector3D(0, 0, 0), QVector3D(0.0, 1.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(0, 9, 0), QVector3D(0.0, 1.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(0, 10, 0), QVector3D(0.0, 1.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(0.5, 8, 0), QVector3D(0.0, 1.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(0.5, 8, 0), QVector3D(0.0, 1.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(-0.5, 8, 0), QVector3D(0.0, 1.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(-0.5, 8, 0), QVector3D(0.0, 1.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(0, 10, 0), QVector3D(0.0, 1.0, 0.0), QVector3D(sNan, sNan, sNan)) // Z-axis - {QVector3D(0, 0, 0), QVector3D(0.0, 0.0, 1.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(0, 0, 9), QVector3D(0.0, 0.0, 1.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(0, 0, 10), QVector3D(0.0, 0.0, 1.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(0.5, 0, 8), QVector3D(0.0, 0.0, 1.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(0.5, 0, 8), QVector3D(0.0, 0.0, 1.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(-0.5, 0, 8), QVector3D(0.0, 0.0, 1.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(-0.5, 0, 8), QVector3D(0.0, 0.0, 1.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(0, 0, 10), QVector3D(0.0, 0.0, 1.0), QVector3D(sNan, sNan, sNan)}, + << VertexData(QVector3D(0, 0, 0), QVector3D(0.0, 0.0, 1.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(0, 0, 9), QVector3D(0.0, 0.0, 1.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(0, 0, 10), QVector3D(0.0, 0.0, 1.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(0.5, 0, 8), QVector3D(0.0, 0.0, 1.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(0.5, 0, 8), QVector3D(0.0, 0.0, 1.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(-0.5, 0, 8), QVector3D(0.0, 0.0, 1.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(-0.5, 0, 8), QVector3D(0.0, 0.0, 1.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(0, 0, 10), QVector3D(0.0, 0.0, 1.0), QVector3D(sNan, sNan, sNan)) // 2x2 rect - {QVector3D(1, 1, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(-1, 1, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(-1, 1, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(-1, -1, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(-1, -1, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(1, -1, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(1, -1, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - {QVector3D(1, 1, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)}, - }; + << VertexData(QVector3D(1, 1, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(-1, 1, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(-1, 1, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(-1, -1, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(-1, -1, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(1, -1, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(1, -1, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)) + << VertexData(QVector3D(1, 1, 0), QVector3D(1.0, 0.0, 0.0), QVector3D(sNan, sNan, sNan)); + return true; } diff --git a/src/drawers/shaderdrawable.cpp b/src/drawers/shaderdrawable.cpp index 32347705..1c34d020 100644 --- a/src/drawers/shaderdrawable.cpp +++ b/src/drawers/shaderdrawable.cpp @@ -99,14 +99,13 @@ void ShaderDrawable::updateGeometry(QOpenGLShaderProgram *shaderProgram) bool ShaderDrawable::updateData() { // Test data - m_lines = { - {QVector3D(0, 0, 0), QVector3D(1, 0, 0), QVector3D(sNan, 0, 0)}, - {QVector3D(10, 0, 0), QVector3D(1, 0, 0), QVector3D(sNan, 0, 0)}, - {QVector3D(0, 0, 0), QVector3D(0, 1, 0), QVector3D(sNan, 0, 0)}, - {QVector3D(0, 10, 0), QVector3D(0, 1, 0), QVector3D(sNan, 0, 0)}, - {QVector3D(0, 0, 0), QVector3D(0, 0, 1), QVector3D(sNan, 0, 0)}, - {QVector3D(0, 0, 10), QVector3D(0, 0, 1), QVector3D(sNan, 0, 0)} - }; + m_lines = QVector() + << VertexData(QVector3D(0, 0, 0), QVector3D(1, 0, 0), QVector3D(sNan, 0, 0)) + << VertexData(QVector3D(10, 0, 0), QVector3D(1, 0, 0), QVector3D(sNan, 0, 0)) + << VertexData(QVector3D(0, 0, 0), QVector3D(0, 1, 0), QVector3D(sNan, 0, 0)) + << VertexData(QVector3D(0, 10, 0), QVector3D(0, 1, 0), QVector3D(sNan, 0, 0)) + << VertexData(QVector3D(0, 0, 0), QVector3D(0, 0, 1), QVector3D(sNan, 0, 0)) + << VertexData(QVector3D(0, 0, 10), QVector3D(0, 0, 1), QVector3D(sNan, 0, 0)); return true; } diff --git a/src/drawers/shaderdrawable.h b/src/drawers/shaderdrawable.h index f44ce925..4ae40db6 100644 --- a/src/drawers/shaderdrawable.h +++ b/src/drawers/shaderdrawable.h @@ -9,10 +9,15 @@ #include #include "utils/util.h" -#define sNan 65536.0 - struct VertexData { + VertexData() {} + VertexData(QVector3D pos, QVector3D col, QVector3D sta) { + position = pos; + color = col; + start = sta; + } + QVector3D position; QVector3D color; QVector3D start; diff --git a/src/frmmain.cpp b/src/frmmain.cpp index cab86028..6f56956c 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -34,11 +34,13 @@ #include #include "frmmain.h" #include "ui_frmmain.h" +#include "ui_frmsettings.h" frmMain::frmMain(QWidget *parent) : QMainWindow(parent), ui(new Ui::frmMain) { + // Initializing variables m_status << "Unknown" << "Idle" << "Alarm" @@ -84,6 +86,35 @@ frmMain::frmMain(QWidget *parent) : << "white" << "black"; + m_fileChanged = false; + m_heightMapChanged = false; + + m_storedX = 0; + m_storedY = 0; + m_storedZ = 0; + + m_settingZeroXY = false; + m_settingZeroZ = false; + m_homing = false; + m_updateSpindleSpeed = false; + m_updateParserStatus = false; + m_updateFeed = false; + + m_reseting = false; + m_resetCompleted = true; + m_aborting = false; + m_statusReceived = false; + + m_processingFile = false; + m_transferCompleted = false; + m_fileEndSent = false; + + m_keyPressed = false; + m_jogBlock = false; + + m_spindleCW = true; + m_spindleCommandSpeed = false; + // Loading settings m_settingsFileName = qApp->applicationDirPath() + "/settings.ini"; preloadSettings(); @@ -111,6 +142,27 @@ frmMain::frmMain(QWidget *parent) : m_currentModel = &m_programModel; m_transferCompleted = true; + // Dock widgets + setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea); + setCorner(Qt::BottomLeftCorner, Qt::LeftDockWidgetArea); + setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea); + setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea); + + setStyleSheet(styleSheet() + QString( +"\nQDockWidget::title {\n\ + text-align: left;\n\ + background: lightgray;\n\ + padding-left: %1;\n\ + margin-left: %1;\n\ + margin-right: %1;\n\ + margin-top: %1;\n\ +}").arg(ui->dockDevice->widget()->layout()->margin())); + + style()->unpolish(this); + this->ensurePolished(); + + ui->widgetHeightmapSettings->setVisible(false); + ui->cmdXMinus->setBackColor(QColor(153, 180, 209)); ui->cmdXPlus->setBackColor(ui->cmdXMinus->backColor()); ui->cmdYMinus->setBackColor(ui->cmdXMinus->backColor()); @@ -129,8 +181,10 @@ frmMain::frmMain(QWidget *parent) : ui->cboJogStep->setValidator(new QDoubleValidator(0, 10000, 2)); ui->cboJogFeed->setValidator(new QIntValidator(0, 100000)); - connect(ui->cboJogStep, &ComboBoxKey::currentTextChanged, [=] (QString) {updateJogTitle();}); - connect(ui->cboJogFeed, &ComboBoxKey::currentTextChanged, [=] (QString) {updateJogTitle();}); + // connect(ui->cboJogStep, &ComboBoxKey::currentTextChanged, [=] (QString) {updateJogTitle();}); + // connect(ui->cboJogFeed, &ComboBoxKey::currentTextChanged, [=] (QString) {updateJogTitle();}); + connect(ui->cboJogStep, &ComboBoxKey::currentTextChanged, this, &frmMain::updateJogTitle); + connect(ui->cboJogFeed, &ComboBoxKey::currentTextChanged, this, &frmMain::updateJogTitle); // Prepare "Send"-button ui->cmdFileSend->setMinimumWidth(qMax(ui->cmdFileSend->width(), ui->cmdFileOpen->width())); @@ -152,12 +206,14 @@ frmMain::frmMain(QWidget *parent) : ui->slbFeedOverride->setTitle(tr("Feed rate:")); ui->slbFeedOverride->setSuffix("%"); connect(ui->slbFeedOverride, SIGNAL(toggled(bool)), this, SLOT(onOverridingToggled(bool))); - connect(ui->slbFeedOverride, &SliderBox::toggled, [=] { - updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); - }); - connect(ui->slbFeedOverride, &SliderBox::valueChanged, [=] { - updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); - }); + // connect(ui->slbFeedOverride, &SliderBox::toggled, [=] { + // updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); + // }); + // connect(ui->slbFeedOverride, &SliderBox::valueChanged, [=] { + // updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); + // }); + connect(ui->slbFeedOverride, &SliderBox::toggled, this, &frmMain::onOverrideChanged); + connect(ui->slbFeedOverride, &SliderBox::valueChanged, this, &frmMain::onOverrideChanged); ui->slbRapidOverride->setRatio(50); ui->slbRapidOverride->setMinimum(25); @@ -166,12 +222,14 @@ frmMain::frmMain(QWidget *parent) : ui->slbRapidOverride->setTitle(tr("Rapid speed:")); ui->slbRapidOverride->setSuffix("%"); connect(ui->slbRapidOverride, SIGNAL(toggled(bool)), this, SLOT(onOverridingToggled(bool))); - connect(ui->slbRapidOverride, &SliderBox::toggled, [=] { - updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); - }); - connect(ui->slbRapidOverride, &SliderBox::valueChanged, [=] { - updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); - }); + // connect(ui->slbRapidOverride, &SliderBox::toggled, [=] { + // updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); + // }); + // connect(ui->slbRapidOverride, &SliderBox::valueChanged, [=] { + // updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); + // }); + connect(ui->slbRapidOverride, &SliderBox::toggled, this, &frmMain::onOverrideChanged); + connect(ui->slbRapidOverride, &SliderBox::valueChanged, this, &frmMain::onOverrideChanged); ui->slbSpindleOverride->setRatio(1); ui->slbSpindleOverride->setMinimum(50); @@ -225,8 +283,8 @@ frmMain::frmMain(QWidget *parent) : clearTable(); // Console window handling - connect(ui->grpConsole, SIGNAL(resized(QSize)), this, SLOT(onConsoleResized(QSize))); - connect(ui->scrollAreaWidgetContents, SIGNAL(sizeChanged(QSize)), this, SLOT(onPanelsSizeChanged(QSize))); + // connect(ui->grpConsole, SIGNAL(resized(QSize)), this, SLOT(onConsoleResized(QSize))); + // connect(ui->scrollAreaWidgetContents, SIGNAL(sizeChanged(QSize)), this, SLOT(onPanelsSizeChanged(QSize))); m_senderErrorBox = new QMessageBox(QMessageBox::Warning, qApp->applicationDisplayName(), QString(), QMessageBox::Ignore | QMessageBox::Abort, this); @@ -248,11 +306,13 @@ frmMain::frmMain(QWidget *parent) : ui->slbSpindle->setTitle(tr("Speed:")); ui->slbSpindle->setCheckable(false); ui->slbSpindle->setChecked(true); - connect(ui->slbSpindle, &SliderBox::valueUserChanged, [=] {m_updateSpindleSpeed = true;}); - connect(ui->slbSpindle, &SliderBox::valueChanged, [=] { - if (!ui->grpSpindle->isChecked() && ui->cmdSpindle->isChecked()) - ui->grpSpindle->setTitle(tr("Spindle") + QString(tr(" (%1)")).arg(ui->slbSpindle->value())); - }); + // connect(ui->slbSpindle, &SliderBox::valueUserChanged, [=] {m_updateSpindleSpeed = true;}); + // connect(ui->slbSpindle, &SliderBox::valueChanged, [=] { + // if (!ui->grpSpindle->isChecked() && ui->cmdSpindle->isChecked()) + // ui->grpSpindle->setTitle(tr("Spindle") + QString(tr(" (%1)")).arg(ui->slbSpindle->value())); + // }); + connect(ui->slbSpindle, &SliderBox::valueUserChanged, this, &frmMain::onSlbSpindleValueUserChanged); + connect(ui->slbSpindle, &SliderBox::valueChanged, this, &frmMain::onSlbSpindleValueChanged); // Setup serial port m_serialPort.setParity(QSerialPort::NoParity); @@ -272,8 +332,8 @@ frmMain::frmMain(QWidget *parent) : ui->tblProgram->installEventFilter(this); ui->cboJogStep->installEventFilter(this); ui->cboJogFeed->installEventFilter(this); - ui->splitPanels->handle(1)->installEventFilter(this); - ui->splitPanels->installEventFilter(this); + // ui->splitPanels->handle(1)->installEventFilter(this); + // ui->splitPanels->installEventFilter(this); connect(&m_timerConnection, SIGNAL(timeout()), this, SLOT(onTimerConnection())); connect(&m_timerStateQuery, SIGNAL(timeout()), this, SLOT(onTimerStateQuery())); @@ -375,7 +435,7 @@ void frmMain::loadSettings() m_settings->setPanelOverriding(set.value("panelOverridingVisible", true).toBool()); m_settings->setPanelJog(set.value("panelJogVisible", true).toBool()); - ui->grpConsole->setMinimumHeight(set.value("consoleMinHeight", 100).toInt()); + // ui->grpConsole->setMinimumHeight(set.value("consoleMinHeight", 100).toInt()); ui->chkAutoScroll->setChecked(set.value("autoScroll", false).toBool()); @@ -406,15 +466,17 @@ void frmMain::loadSettings() this->restoreGeometry(set.value("formGeometry", QByteArray()).toByteArray()); m_settings->resize(set.value("formSettingsSize", m_settings->size()).toSize()); - QByteArray splitterState = set.value("splitter", QByteArray()).toByteArray(); + m_settings->ui->splitMain->restoreState(set.value("settingsSplitMain").toByteArray()); - if (splitterState.length() == 0) { - ui->splitter->setStretchFactor(0, 1); - ui->splitter->setStretchFactor(1, 1); - } else ui->splitter->restoreState(splitterState); + // QByteArray splitterState = set.value("splitter", QByteArray()).toByteArray(); - ui->chkAutoScroll->setVisible(ui->splitter->sizes()[1]); - resizeCheckBoxes(); + // if (splitterState.length() == 0) { + // ui->splitter->setStretchFactor(0, 1); + // ui->splitter->setStretchFactor(1, 1); + // } else ui->splitter->restoreState(splitterState); + + // ui->chkAutoScroll->setVisible(ui->splitter->sizes()[1]); + // resizeCheckBoxes(); ui->cboCommand->setMinimumHeight(ui->cboCommand->height()); ui->cmdClearConsole->setFixedHeight(ui->cboCommand->height()); @@ -463,8 +525,8 @@ void frmMain::loadSettings() // Update right panel width applySettings(); - show(); - ui->scrollArea->updateMinimumWidth(); + // show(); + // ui->scrollArea->updateMinimumWidth(); // Restore panels state ui->grpUserCommands->setChecked(set.value("userCommandsPanel", true).toBool()); @@ -477,6 +539,15 @@ void frmMain::loadSettings() ui->cboCommand->addItems(set.value("recentCommands", QStringList()).toStringList()); ui->cboCommand->setCurrentIndex(-1); + // Restore docks + // Normal window state + restoreState(set.value("formMainState").toByteArray()); + + // Maximized window state + show(); + qApp->processEvents(); + restoreState(set.value("formMainState").toByteArray()); + m_settingsLoading = false; } @@ -523,7 +594,8 @@ void frmMain::saveSettings() set.setValue("queryStateTime", m_settings->queryStateTime()); set.setValue("autoScroll", ui->chkAutoScroll->isChecked()); set.setValue("header", ui->tblProgram->horizontalHeader()->saveState()); - set.setValue("splitter", ui->splitter->saveState()); + // set.setValue("splitter", ui->splitter->saveState()); + set.setValue("settingsSplitMain", m_settings->ui->splitMain->saveState()); set.setValue("formGeometry", this->saveGeometry()); set.setValue("formSettingsSize", m_settings->size()); set.setValue("userCommandsPanel", ui->grpUserCommands->isChecked()); @@ -548,7 +620,7 @@ void frmMain::saveSettings() set.setValue("panelOverridingVisible", m_settings->panelOverriding()); set.setValue("panelJogVisible", m_settings->panelJog()); set.setValue("fontSize", m_settings->fontSize()); - set.setValue("consoleMinHeight", ui->grpConsole->minimumHeight()); + // set.setValue("consoleMinHeight", ui->grpConsole->minimumHeight()); set.setValue("feedOverride", ui->slbFeedOverride->isChecked()); set.setValue("feedOverrideValue", ui->slbFeedOverride->value()); @@ -592,6 +664,8 @@ void frmMain::saveSettings() for (int i = 0; i < ui->cboCommand->count(); i++) list.append(ui->cboCommand->itemText(i)); set.setValue("recentCommands", list); + + set.setValue("formMainState", saveState()); } bool frmMain::saveChanges(bool heightMapMode) @@ -693,13 +767,14 @@ void frmMain::updateControlsState() { m_heightMapGridDrawer.setVisible(ui->chkHeightMapGridShow->isChecked() && m_heightMapMode); m_heightMapInterpolationDrawer.setVisible(ui->chkHeightMapInterpolationShow->isChecked() && m_heightMapMode); - ui->grpProgram->setTitle(m_heightMapMode ? tr("Heightmap") : tr("G-code program")); + // ui->grpProgram->setTitle(m_heightMapMode ? tr("Heightmap") : tr("G-code program")); + ui->grpProgram->setText(m_heightMapMode ? tr("Heightmap") : tr("G-code program")); ui->grpProgram->setProperty("overrided", m_heightMapMode); style()->unpolish(ui->grpProgram); ui->grpProgram->ensurePolished(); - ui->grpHeightMapSettings->setVisible(m_heightMapMode); - ui->grpHeightMapSettings->setEnabled(!m_processingFile && !ui->chkKeyboardControl->isChecked()); + // ui->grpHeightMapSettings->setVisible(m_heightMapMode); + // ui->grpHeightMapSettings->setEnabled(!m_processingFile && !ui->chkKeyboardControl->isChecked()); ui->cboJogStep->setEditable(!ui->chkKeyboardControl->isChecked()); ui->cboJogFeed->setEditable(!ui->chkKeyboardControl->isChecked()); @@ -707,7 +782,7 @@ void frmMain::updateControlsState() { ui->cboJogFeed->setStyleSheet(ui->cboJogStep->styleSheet()); ui->chkTestMode->setVisible(!m_heightMapMode); - ui->chkAutoScroll->setVisible(ui->splitter->sizes()[1] && !m_heightMapMode); + // ui->chkAutoScroll->setVisible(ui->splitter->sizes()[1] && !m_heightMapMode); ui->tblHeightMap->setVisible(m_heightMapMode); ui->tblProgram->setVisible(!m_heightMapMode); @@ -1187,7 +1262,8 @@ void frmMain::onSerialPortReadyRead() z -= firstZ; // Calculate table indexes - int row = trunc(m_probeIndex / m_heightMapModel.columnCount()); + // int row = trunc(m_probeIndex / m_heightMapModel.columnCount()); + int row = (m_probeIndex / m_heightMapModel.columnCount()); int column = m_probeIndex - row * m_heightMapModel.columnCount(); if (row % 2) column = m_heightMapModel.columnCount() - 1 - column; @@ -1208,7 +1284,8 @@ void frmMain::onSerialPortReadyRead() // Add response to console if (tb.isValid() && tb.text() == ca.command) { - bool scrolledDown = ui->txtConsole->verticalScrollBar()->value() == ui->txtConsole->verticalScrollBar()->maximum(); + bool scrolledDown = ui->txtConsole->verticalScrollBar()->value() + == ui->txtConsole->verticalScrollBar()->maximum(); // Update text block numbers int blocksAdded = response.count("; "); @@ -1223,7 +1300,8 @@ void frmMain::onSerialPortReadyRead() tc.insertText(" < " + QString(response).replace("; ", "\r\n")); tc.endEditBlock(); - if (scrolledDown) ui->txtConsole->verticalScrollBar()->setValue(ui->txtConsole->verticalScrollBar()->maximum()); + if (scrolledDown) ui->txtConsole->verticalScrollBar()->setValue( + ui->txtConsole->verticalScrollBar()->maximum()); } // Check queue @@ -1451,7 +1529,7 @@ void frmMain::showEvent(QShowEvent *se) ui->glwVisualizer->setUpdatesEnabled(true); - resizeCheckBoxes(); + // resizeCheckBoxes(); } void frmMain::hideEvent(QHideEvent *he) @@ -1466,8 +1544,11 @@ void frmMain::resizeEvent(QResizeEvent *re) Q_UNUSED(re) placeVisualizerButtons(); - resizeCheckBoxes(); + // resizeCheckBoxes(); resizeTableHeightMapSections(); + + ui->dockDevice->setMinimumHeight(re->size().height() / 3); + ui->dockModification->setMinimumHeight(re->size().height() / 3); } void frmMain::resizeTableHeightMapSections() @@ -1479,47 +1560,47 @@ void frmMain::resizeTableHeightMapSections() } } -void frmMain::resizeCheckBoxes() -{ - static int widthCheckMode = ui->chkTestMode->sizeHint().width(); - static int widthAutoScroll = ui->chkAutoScroll->sizeHint().width(); +// void frmMain::resizeCheckBoxes() +// { +// static int widthCheckMode = ui->chkTestMode->sizeHint().width(); +// static int widthAutoScroll = ui->chkAutoScroll->sizeHint().width(); - // Transform checkboxes +// // Transform checkboxes - this->setUpdatesEnabled(false); +// this->setUpdatesEnabled(false); - updateLayouts(); +// updateLayouts(); - if (ui->chkTestMode->sizeHint().width() > ui->chkTestMode->width()) { - widthCheckMode = ui->chkTestMode->sizeHint().width(); - ui->chkTestMode->setText(tr("Check")); - ui->chkTestMode->setMinimumWidth(ui->chkTestMode->sizeHint().width()); - updateLayouts(); - } +// if (ui->chkTestMode->sizeHint().width() > ui->chkTestMode->width()) { +// widthCheckMode = ui->chkTestMode->sizeHint().width(); +// ui->chkTestMode->setText(tr("Check")); +// ui->chkTestMode->setMinimumWidth(ui->chkTestMode->sizeHint().width()); +// updateLayouts(); +// } - if (ui->chkAutoScroll->sizeHint().width() > ui->chkAutoScroll->width() - && ui->chkTestMode->text() == tr("Check")) { - widthAutoScroll = ui->chkAutoScroll->sizeHint().width(); - ui->chkAutoScroll->setText(tr("Scroll")); - ui->chkAutoScroll->setMinimumWidth(ui->chkAutoScroll->sizeHint().width()); - updateLayouts(); - } +// if (ui->chkAutoScroll->sizeHint().width() > ui->chkAutoScroll->width() +// && ui->chkTestMode->text() == tr("Check")) { +// widthAutoScroll = ui->chkAutoScroll->sizeHint().width(); +// ui->chkAutoScroll->setText(tr("Scroll")); +// ui->chkAutoScroll->setMinimumWidth(ui->chkAutoScroll->sizeHint().width()); +// updateLayouts(); +// } - if (ui->spacerBot->geometry().width() + ui->chkAutoScroll->sizeHint().width() - - ui->spacerBot->sizeHint().width() > widthAutoScroll && ui->chkAutoScroll->text() == tr("Scroll")) { - ui->chkAutoScroll->setText(tr("Autoscroll")); - updateLayouts(); - } +// if (ui->spacerBot->geometry().width() + ui->chkAutoScroll->sizeHint().width() +// - ui->spacerBot->sizeHint().width() > widthAutoScroll && ui->chkAutoScroll->text() == tr("Scroll")) { +// ui->chkAutoScroll->setText(tr("Autoscroll")); +// updateLayouts(); +// } - if (ui->spacerBot->geometry().width() + ui->chkTestMode->sizeHint().width() - - ui->spacerBot->sizeHint().width() > widthCheckMode && ui->chkTestMode->text() == tr("Check")) { - ui->chkTestMode->setText(tr("Check mode")); - updateLayouts(); - } +// if (ui->spacerBot->geometry().width() + ui->chkTestMode->sizeHint().width() +// - ui->spacerBot->sizeHint().width() > widthCheckMode && ui->chkTestMode->text() == tr("Check")) { +// ui->chkTestMode->setText(tr("Check mode")); +// updateLayouts(); +// } - this->setUpdatesEnabled(true); - this->repaint(); -} +// this->setUpdatesEnabled(true); +// this->repaint(); +// } void frmMain::timerEvent(QTimerEvent *te) { @@ -1979,6 +2060,17 @@ void frmMain::onActSendFromLineTriggered() sendNextFileCommands(); } +void frmMain::onSlbSpindleValueUserChanged() +{ + m_updateSpindleSpeed = true; +} + +void frmMain::onSlbSpindleValueChanged() +{ + if (!ui->grpSpindle->isChecked() && ui->cmdSpindle->isChecked()) + ui->grpSpindle->setTitle(tr("Spindle") + QString(tr(" (%1)")).arg(ui->slbSpindle->value())); +} + void frmMain::on_cmdFileAbort_clicked() { m_aborting = true; @@ -2109,7 +2201,7 @@ void frmMain::onTableCurrentChanged(QModelIndex idx1, QModelIndex idx2) // Update selection marker int line = m_currentModel->data(m_currentModel->index(idx1.row(), 4)).toInt(); - if (line > 0 && !lineIndexes.at(line).isEmpty()) { + if (line > 0 && line < lineIndexes.count() && !lineIndexes.at(line).isEmpty()) { QVector3D pos = list.at(lineIndexes.at(line).last())->getEnd(); m_selectionDrawer.setEndPosition(m_codeDrawer->getIgnoreZ() ? QVector3D(pos.x(), pos.y(), 0) : pos); } else { @@ -2269,9 +2361,11 @@ void frmMain::applySettings() { Util::invertButtonIconColors(ui->cmdTop); } - ui->cboCommand->setMinimumHeight(ui->cboCommand->height()); - ui->cmdClearConsole->setFixedHeight(ui->cboCommand->height()); - ui->cmdCommandSend->setFixedHeight(ui->cboCommand->height()); + int h = ui->cmdFileOpen->sizeHint().height(); + QSize s(h, h); + ui->cboCommand->setMinimumHeight(h); + ui->cmdClearConsole->setFixedSize(s); + ui->cmdCommandSend->setFixedSize(s); foreach (StyledToolButton* button, this->findChildren(QRegExp("cmdUser\\d"))) { button->setToolTip(m_settings->userCommands(button->objectName().right(1).toInt())); @@ -2846,76 +2940,76 @@ bool frmMain::eventFilter(QObject *obj, QEvent *event) } // Splitter events - } else if (obj == ui->splitPanels && event->type() == QEvent::Resize) { - // Resize splited widgets - onPanelsSizeChanged(ui->scrollAreaWidgetContents->sizeHint()); - - // Splitter handle events - } else if (obj == ui->splitPanels->handle(1)) { - int minHeight = getConsoleMinHeight(); - switch (event->type()) { - case QEvent::MouseButtonPress: - // Store current console group box minimum & real heights - m_storedConsoleMinimumHeight = ui->grpConsole->minimumHeight(); - m_storedConsoleHeight = ui->grpConsole->height(); - - // Update splited sizes - ui->splitPanels->setSizes(QList() << ui->scrollArea->height() << ui->grpConsole->height()); - - // Set new console mimimum height - ui->grpConsole->setMinimumHeight(qMax(minHeight, ui->splitPanels->height() - - ui->scrollAreaWidgetContents->sizeHint().height() - ui->splitPanels->handleWidth() - 4)); - break; - case QEvent::MouseButtonRelease: - // Store new console minimum height if height was changed with split handle - if (ui->grpConsole->height() != m_storedConsoleHeight) { - ui->grpConsole->setMinimumHeight(ui->grpConsole->height()); - } else { - ui->grpConsole->setMinimumHeight(m_storedConsoleMinimumHeight); - } - break; - case QEvent::MouseButtonDblClick: - // Switch to min/max console size - if (ui->grpConsole->height() == minHeight || !ui->scrollArea->verticalScrollBar()->isVisible()) { - ui->splitPanels->setSizes(QList() << ui->scrollArea->minimumHeight() - << ui->splitPanels->height() - ui->splitPanels->handleWidth() - ui->scrollArea->minimumHeight()); - } else { - ui->grpConsole->setMinimumHeight(minHeight); - onPanelsSizeChanged(ui->scrollAreaWidgetContents->sizeHint()); - } - break; - default: - break; - } + // } else if (obj == ui->splitPanels && event->type() == QEvent::Resize) { + // // Resize splited widgets + // onPanelsSizeChanged(ui->scrollAreaWidgetContents->sizeHint()); + + // // Splitter handle events + // } else if (obj == ui->splitPanels->handle(1)) { + // int minHeight = getConsoleMinHeight(); + // switch (event->type()) { + // case QEvent::MouseButtonPress: + // // Store current console group box minimum & real heights + // m_storedConsoleMinimumHeight = ui->grpConsole->minimumHeight(); + // m_storedConsoleHeight = ui->grpConsole->height(); + + // // Update splited sizes + // ui->splitPanels->setSizes(QList() << ui->scrollArea->height() << ui->grpConsole->height()); + + // // Set new console mimimum height + // ui->grpConsole->setMinimumHeight(qMax(minHeight, ui->splitPanels->height() + // - ui->scrollAreaWidgetContents->sizeHint().height() - ui->splitPanels->handleWidth() - 4)); + // break; + // case QEvent::MouseButtonRelease: + // // Store new console minimum height if height was changed with split handle + // if (ui->grpConsole->height() != m_storedConsoleHeight) { + // ui->grpConsole->setMinimumHeight(ui->grpConsole->height()); + // } else { + // ui->grpConsole->setMinimumHeight(m_storedConsoleMinimumHeight); + // } + // break; + // case QEvent::MouseButtonDblClick: + // // Switch to min/max console size + // if (ui->grpConsole->height() == minHeight || !ui->scrollArea->verticalScrollBar()->isVisible()) { + // ui->splitPanels->setSizes(QList() << ui->scrollArea->minimumHeight() + // << ui->splitPanels->height() - ui->splitPanels->handleWidth() - ui->scrollArea->minimumHeight()); + // } else { + // ui->grpConsole->setMinimumHeight(minHeight); + // onPanelsSizeChanged(ui->scrollAreaWidgetContents->sizeHint()); + // } + // break; + // default: + // break; + // } } return QMainWindow::eventFilter(obj, event); } -int frmMain::getConsoleMinHeight() -{ - return ui->grpConsole->height() - ui->grpConsole->contentsRect().height() - + ui->spacerConsole->geometry().height() + ui->grpConsole->layout()->margin() * 2 - + ui->cboCommand->height(); -} +// int frmMain::getConsoleMinHeight() +// { +// return ui->grpConsole->height() - ui->grpConsole->contentsRect().height() +// + ui->spacerConsole->geometry().height() + ui->grpConsole->layout()->margin() * 2 +// + ui->cboCommand->height(); +// } -void frmMain::onConsoleResized(QSize size) -{ - Q_UNUSED(size) +// void frmMain::onConsoleResized(QSize size) +// { +// Q_UNUSED(size) - int minHeight = getConsoleMinHeight(); - bool visible = ui->grpConsole->height() > minHeight; - if (ui->txtConsole->isVisible() != visible) { - ui->txtConsole->setVisible(visible); - } -} +// int minHeight = getConsoleMinHeight(); +// bool visible = ui->grpConsole->height() > minHeight; +// if (ui->txtConsole->isVisible() != visible) { +// ui->txtConsole->setVisible(visible); +// } +// } -void frmMain::onPanelsSizeChanged(QSize size) -{ - ui->splitPanels->setSizes(QList() << size.height() + 4 - << ui->splitPanels->height() - size.height() - - 4 - ui->splitPanels->handleWidth()); -} +// void frmMain::onPanelsSizeChanged(QSize size) +// { +// ui->splitPanels->setSizes(QList() << size.height() + 4 +// << ui->splitPanels->height() - size.height() +// - 4 - ui->splitPanels->handleWidth()); +// } bool frmMain::keyIsMovement(int key) { @@ -2975,26 +3069,26 @@ void frmMain::on_tblProgram_customContextMenuRequested(const QPoint &pos) m_tableMenu->popup(ui->tblProgram->viewport()->mapToGlobal(pos)); } -void frmMain::on_splitter_splitterMoved(int pos, int index) -{ - Q_UNUSED(pos) - Q_UNUSED(index) +// void frmMain::on_splitter_splitterMoved(int pos, int index) +// { +// Q_UNUSED(pos) +// Q_UNUSED(index) - static bool tableCollapsed = ui->splitter->sizes()[1] == 0; +// static bool tableCollapsed = ui->splitter->sizes()[1] == 0; - if ((ui->splitter->sizes()[1] == 0) != tableCollapsed) { - this->setUpdatesEnabled(false); - ui->chkAutoScroll->setVisible(ui->splitter->sizes()[1] && !m_heightMapMode); - updateLayouts(); - resizeCheckBoxes(); +// if ((ui->splitter->sizes()[1] == 0) != tableCollapsed) { +// this->setUpdatesEnabled(false); +// ui->chkAutoScroll->setVisible(ui->splitter->sizes()[1] && !m_heightMapMode); +// updateLayouts(); +// resizeCheckBoxes(); - this->setUpdatesEnabled(true); - ui->chkAutoScroll->repaint(); +// this->setUpdatesEnabled(true); +// ui->chkAutoScroll->repaint(); - // Store collapsed state - tableCollapsed = ui->splitter->sizes()[1] == 0; - } -} +// // Store collapsed state +// tableCollapsed = ui->splitter->sizes()[1] == 0; +// } +// } void frmMain::updateLayouts() { @@ -3790,7 +3884,8 @@ QList frmMain::subdivideSegment(LineSegment* segment) } QVector3D seg = vec.normalized() * length; - int count = trunc(vec.length() / length); + // int count = trunc(vec.length() / length); + int count = (vec.length() / length); if (count == 0) return QList(); @@ -3853,6 +3948,11 @@ void frmMain::onOverridingToggled(bool checked) ui->grpOverriding->ensurePolished(); } +void frmMain::onOverrideChanged() +{ + updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); +} + void frmMain::updateOverride(SliderBox *slider, int value, char command) { slider->setCurrentValue(value); diff --git a/src/frmmain.h b/src/frmmain.h index c1f0ef94..2c9464c5 100644 --- a/src/frmmain.h +++ b/src/frmmain.h @@ -47,6 +47,7 @@ namespace Ui { class frmMain; +class frmProgram; } struct CommandAttributes { @@ -69,7 +70,7 @@ class CancelException : public std::exception { #define _GLIBCXX_USE_NOEXCEPT _NOEXCEPT #endif - const char* what() const noexcept override + const char* what() const override { return "Operation was cancelled by user"; } @@ -101,11 +102,14 @@ private slots: void onActRecentFileTriggered(); void onCboCommandReturnPressed(); void onTableCurrentChanged(QModelIndex idx1, QModelIndex idx2); - void onConsoleResized(QSize size); - void onPanelsSizeChanged(QSize size); + // void onConsoleResized(QSize size); + // void onPanelsSizeChanged(QSize size); void onCmdUserClicked(bool checked); void onOverridingToggled(bool checked); + void onOverrideChanged(); void onActSendFromLineTriggered(); + void onSlbSpindleValueUserChanged(); + void onSlbSpindleValueChanged(); void on_actFileExit_triggered(); void on_cmdFileOpen_clicked(); @@ -143,7 +147,7 @@ private slots: void on_grpUserCommands_toggled(bool checked); void on_chkKeyboardControl_toggled(bool checked); void on_tblProgram_customContextMenuRequested(const QPoint &pos); - void on_splitter_splitterMoved(int pos, int index); + // void on_splitter_splitterMoved(int pos, int index); void on_actRecentClear_triggered(); void on_grpHeightMap_toggled(bool arg1); void on_chkHeightMapBorderShow_toggled(bool checked); @@ -203,9 +207,10 @@ private slots: void dropEvent(QDropEvent *de); private: - const int BUFFERLENGTH = 127; + static const int BUFFERLENGTH = 127; Ui::frmMain *ui; + GcodeViewParse m_viewParser; GcodeViewParse m_probeParser; @@ -241,8 +246,8 @@ private slots: QString m_heightMapFileName; QString m_lastFolder; - bool m_fileChanged = false; - bool m_heightMapChanged = false; + bool m_fileChanged; + bool m_heightMapChanged; QTimer m_timerConnection; QTimer m_timerStateQuery; @@ -266,9 +271,9 @@ private slots: QMessageBox* m_senderErrorBox; // Stored origin - double m_storedX = 0; - double m_storedY = 0; - double m_storedZ = 0; + double m_storedX; + double m_storedY; + double m_storedZ; QString m_storedParserStatus; // Console window @@ -277,21 +282,21 @@ private slots: int m_consolePureHeight; // Flags - bool m_settingZeroXY = false; - bool m_settingZeroZ = false; - bool m_homing = false; - bool m_updateSpindleSpeed = false; - bool m_updateParserStatus = false; - bool m_updateFeed = false; - - bool m_reseting = false; - bool m_resetCompleted = true; - bool m_aborting = false; - bool m_statusReceived = false; - - bool m_processingFile = false; - bool m_transferCompleted = false; - bool m_fileEndSent = false; + bool m_settingZeroXY; + bool m_settingZeroZ; + bool m_homing; + bool m_updateSpindleSpeed; + bool m_updateParserStatus; + bool m_updateFeed; + + bool m_reseting; + bool m_resetCompleted; + bool m_aborting; + bool m_statusReceived; + + bool m_processingFile; + bool m_transferCompleted; + bool m_fileEndSent; bool m_heightMapMode; bool m_cellChanged; @@ -307,14 +312,14 @@ private slots: double m_originalFeed; // Keyboard - bool m_keyPressed = false; - bool m_jogBlock = false; + bool m_keyPressed; + bool m_jogBlock; bool m_absoluteCoordinates; bool m_storedKeyboardControl; // Spindle - bool m_spindleCW = true; - bool m_spindleCommandSpeed = false; + bool m_spindleCW; + bool m_spindleCommandSpeed; // Jog QVector3D m_jogVector; @@ -347,7 +352,7 @@ private slots: bool eventFilter(QObject *obj, QEvent *event); bool keyIsMovement(int key); - void resizeCheckBoxes(); + // void resizeCheckBoxes(); void updateLayouts(); void updateRecentFilesMenu(); void addRecentFile(QString fileName); @@ -373,7 +378,7 @@ private slots: bool isGCodeFile(QString fileName); bool isHeightmapFile(QString fileName); bool compareCoordinates(double x, double y, double z); - int getConsoleMinHeight(); + // int getConsoleMinHeight(); void updateOverride(SliderBox *slider, int value, char command); void jogStep(); void updateJogTitle(); diff --git a/src/frmmain.ui b/src/frmmain.ui index 81c8305a..4d920742 100644 --- a/src/frmmain.ui +++ b/src/frmmain.ui @@ -6,8 +6,8 @@ 0 0 - 952 - 847 + 1441 + 934 @@ -21,7 +21,11 @@ :/images/candle_256.png:/images/candle_256.png - /*QWidget { + QMainWindow::separator { + width: 13; +} + +/*QWidget { font-size: 9pt; }*/ @@ -76,11 +80,11 @@ QSplitter::handle { QSplitter::handle:vertical { background-image: url(":/images/handle_horizontal.png"); } -/* + QSplitter::handle:horizontal { background-image: url(":/images/handle_vertical.png"); } -*/ + QTableView { selection-background-color: #cdcdff; selection-color: rgb(0, 0, 0); @@ -109,1060 +113,419 @@ QSlider::handle:horizontal:hover { background-image: url(:/images/handle2sh.png); } +QMainWindow::separator:vertical { + image: url(":/images/handle_vertical.png"); +} + +QMainWindow::separator:horizontal { + image: url(":/images/handle_horizontal.png"); +} + /*QSlider::sub-page:horizontal { background: red; margin: 1px 0; -}*/ +}*/ + + + true + + + QMainWindow::AllowNestedDocks|QMainWindow::AnimatedDocks - + - 9 - - - 9 - - - 9 - - - 5 - - - 9 + 0 - - - G-code program + + + QLabel { + padding: 6; + background-color: lightgray; +} + +QLabel[overrided="true"] { + color: red; +} + +QLabel[overrided="false"] { + color: palette(windowtext); +} - - false + + Program - - - 7 - + + + + + - 8 - - - 8 + 0 - 8 + 0 - 8 + 0 - - - - 30 - 30 - - - - Isometric view - - - - - - - :/images/cube.png:/images/cube.png - - - - 20 - 20 - - - - - - - - - 30 - 30 - - - - Top view - - - - - - - :/images/cubeTop.png:/images/cubeTop.png - - - - 20 - 20 - - - - - - - - - 30 - 30 - - - - Front view - - - - - - - :/images/cubeFront.png:/images/cubeFront.png - - - - 20 - 20 - - - - - - - - - 30 - 30 - - - - Left view - - - - - - - :/images/cubeLeft.png:/images/cubeLeft.png - - - - 20 - 20 - - - - - - - - - 30 - 30 - - - - Fit + + + 9 - - - - - - :/images/fit_1.png:/images/fit_1.png - - - - 20 - 20 - - - + + + + + 9 + + + + Qt::CustomContextMenu + + + QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked + + + QAbstractItemView::ContiguousSelection + + + QAbstractItemView::SelectRows + + + Qt::DashLine + + + false + + + 50 + + + false + + + + + + + true + + + QAbstractItemView::SingleSelection + + + Qt::DashLine + + + false + + + 60 + + + false + + + false + + + + - - - Qt::Vertical - - - 12 - - - - - 0 - 0 - - - - - 0 - 200 - - - - border: 1px solid gray; - - - - 1 + + + + + Check - - 1 + + + + + + Scroll - - 1 + + + + + + Qt::Horizontal - - 1 + + + 8 + 20 + - - - - - - - - - 9 + + + + + + Open - - - - - 9 - - - - Qt::CustomContextMenu - - - QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked - - - QAbstractItemView::ContiguousSelection - - - QAbstractItemView::SelectRows - - - Qt::DashLine - - - false - - - 50 - - - false - - - - - - - true - - - QAbstractItemView::SingleSelection - - - Qt::DashLine - - - false - - - 60 - - - false - - - false - - - - - - - - - - - Heightmap settings - - - - 11 - - - 8 - - - 8 - - - 8 - - - 8 - - - - - - - Border: - - - - - - - - - X: - - - - - - - - 0 - 0 - - - - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - -999.000000000000000 - - - 999.000000000000000 - - - - - - - - 0 - 0 - - - - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - -999.000000000000000 - - - 999.000000000000000 - - - 10.000000000000000 - - - - - - - H: - - - - - - - - 0 - 0 - - - - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - -999.000000000000000 - - - 999.000000000000000 - - - - - - - Y: - - - - - - - W: - - - - - - - - 0 - 0 - - - - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - -999.000000000000000 - - - 999.000000000000000 - - - 10.000000000000000 - - - - - - - - - - - Show border - - - true - - - - - - - - 44 - 18 - - - - Auto - - - - - - - - - - - - - Probe grid: - - - - - - - - - X: - - - - - - - - 0 - 0 - - - - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 0 - - - 2.000000000000000 - - - 1000.000000000000000 - - - 2.000000000000000 - - - - - - - - 0 - 0 - - - - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - -999.000000000000000 - - - 999.000000000000000 - - - 1.000000000000000 - - - - - - - - 0 - 0 - - - - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - -999.000000000000000 - - - 999.000000000000000 - - - -1.000000000000000 - - - - - - - - 0 - 0 - - - - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 0 - - - 2.000000000000000 - - - 1000.000000000000000 - - - 2.000000000000000 - - - - - - - Zb: - - - - - - - Y: - - - - - - - Zt: - - - - - - - - - - - Show grid - - - true - - - - - - - Qt::Horizontal - - - - 40 - 1 - - - - - - - - - - - - - - Interpolation grid: - - - - - - - - - Y: - - - - - - - X: - - - - - - - - 0 - 0 - - - - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 0 - - - 2.000000000000000 - - - 1000.000000000000000 - - - 2.000000000000000 - - - - - - - - 0 - 0 - - - - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 0 - - - 2.000000000000000 - - - 1000.000000000000000 - - - 2.000000000000000 - - - - - - - - - - - Type: - - - - - - - false - - - - 0 - 0 - - - - - Bicubic - - - - - - - - - - - - Show - - - - - - - Qt::Horizontal - - - - 40 - 1 - - - - - - - - - - - - - - - - - - 0 - 0 - - - - - 22 - 0 - - - - Check mode - - - - - - - - 0 - 0 - - - - - 22 - 0 - - - - Autoscroll - - - - - - - Qt::Horizontal - - - - 8 - 20 - - - - - - - - Open - - - - - - - Reset - - - - - - - - 0 - 0 - - - - - 93 - 0 - - - - Send - - - - - - - Pause - - - true - - - - - - - Abort - - - - + + + + + + Reset + + + + + + + + 0 + 0 + + + + + 93 + 0 + + + + Send + + + + + + + Pause + + + true + + + + + + + Abort + + + + - - - - - - 4 + + + + + + 0 + 0 + 1441 + 31 + + + + + &File + + + + &Recent files + + + + + + + + + + + + + + + + + &Service + + + + + + &Help + + + + + + &View + + + + &Panels + + + + + + + + + + + + + + + + + 350 + 0 + + + + + 350 + 16777215 + + + + QDockWidget::DockWidgetMovable + + + Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea + + + Modification + + + 2 + + + + + + + QFrame::NoFrame + + + true + + + + + 0 + -148 + 298 + 749 + - - - - State - - - false - - - - 8 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + true - - 8 + + Overriding - - 8 + + true - - 9 + + false - - - - 8 - - - - - - - Work coordinates: - - - - - - - - - 8 + + + + + + 0 + + + 0 + + + 0 + + + 0 - - - X - - - 0 - - - Qt::AlignCenter - - - true - - + - - - Y - - - 0 - - - Qt::AlignCenter - - - true - - + - - - Z - - - 0 - - - Qt::AlignCenter - - - true - - + - - - - - - - 8 - - - + + + + + + + + + Heightmap + + + true + + + false + + + + + + + 0 + + + 0 + + + 0 + + + 0 + - + - Machine coordinates: + Use heightmap - - - - - - 8 - - - - X + + + Qt::NoFocus - 0 + Qt::AlignCenter @@ -1170,761 +533,1367 @@ QSlider::handle:horizontal:hover { true + + Absent + - - - Y + + + + + Map: + + + + + + + + + + + + 0 + 0 + + + + + 0 + 25 + + + + Create + + + + + + + + 0 + 0 + + + + + 0 + 25 + + + + Open + + + + + + + + + + 0 + 0 + - - 0 + + + 42 + 25 + - - Qt::AlignCenter + + Edit - + true - - - Z - - - 0 - - - Qt::AlignCenter - - - true - + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + Border: + + + + + + + + + X: + + + + + + + + 0 + 0 + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + -999.000000000000000 + + + 999.000000000000000 + + + + + + + + 0 + 0 + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + -999.000000000000000 + + + 999.000000000000000 + + + 10.000000000000000 + + + + + + + H: + + + + + + + + 0 + 0 + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + -999.000000000000000 + + + 999.000000000000000 + + + + + + + Y: + + + + + + + W: + + + + + + + + 0 + 0 + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + -999.000000000000000 + + + 999.000000000000000 + + + 10.000000000000000 + + + + + + + + + + + Show border + + + true + + + + + + + + 44 + 18 + + + + Auto + + + + + + + + + + + + + Probe grid: + + + + + + + + + X: + + + + + + + + 0 + 0 + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 0 + + + 2.000000000000000 + + + 1000.000000000000000 + + + 2.000000000000000 + + + + + + + + 0 + 0 + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + -999.000000000000000 + + + 999.000000000000000 + + + 1.000000000000000 + + + + + + + + 0 + 0 + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + -999.000000000000000 + + + 999.000000000000000 + + + -1.000000000000000 + + + + + + + + 0 + 0 + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 0 + + + 2.000000000000000 + + + 1000.000000000000000 + + + 2.000000000000000 + + + + + + + Zb: + + + + + + + Y: + + + + + + + Zt: + + + + + + + + + + + Show probe grid + + + true + + + + + + + Qt::Horizontal + + + + 40 + 1 + + + + + + + + + + + + + + Interpolation grid: + + + + + + + + + Y: + + + + + + + X: + + + + + + + + 0 + 0 + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 0 + + + 2.000000000000000 + + + 1000.000000000000000 + + + 2.000000000000000 + + + + + + + + 0 + 0 + + + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 0 + + + 2.000000000000000 + + + 1000.000000000000000 + + + 2.000000000000000 + + + + + + + + + + + Type: + + + + + + + false + + + + 0 + 0 + + + + + Bicubic + + + + + + + + + + + + Show interpolation grid + + + + + + + Qt::Horizontal + + + + 40 + 1 + + + + + + + + + - - - - - - - 14 - - - - - Status: - - - - - - - false - - - QLineEdit {color: palette(text);} - - - Qt::AlignCenter - - - true - - - - - - - - - - - - - - - - - 4 + + + + + + + + + + 0 + 0 + + + + QGroupBox { + margin-top: 7; +} + + + + + + + + + + + + + + + + + 350 + 178 + + + + + 350 + 524287 + + + + QDockWidget::DockWidgetMovable + + + Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea + + + Device + + + 1 + + + + + + + QFrame::NoFrame + + + true + + + + + 0 + 0 + 298 + 922 + - - - - Control - - - false - - - - 8 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + State + + + false + + + + + + + + + + Work coordinates: + + + + + + + + + 8 + + + + + X + + + 0 + + + Qt::AlignCenter + + + true + + + + + + + Y + + + 0 + + + Qt::AlignCenter + + + true + + + + + + + Z + + + 0 + + + Qt::AlignCenter + + + true + + + + + + + + + + + + + + + Machine coordinates: + + + + + + + + + 8 + + + + + X + + + 0 + + + Qt::AlignCenter + + + true + + + + + + + Y + + + 0 + + + Qt::AlignCenter + + + true + + + + + + + Z + + + 0 + + + Qt::AlignCenter + + + true + + + + + + + + + + + 14 + + + + + Status: + + + + + + + false + + + QLineEdit {color: palette(text);} + + + Qt::AlignCenter + + + true + + + + + + + + + + + + + + + Control + + + false + + + + + + + + + 44 + 44 + + + + Zero XY + + + ... + + + + :/images/axis_zero.png:/images/axis_zero.png + + + + 30 + 30 + + + + + + + + + 44 + 44 + + + + Z-probe + + + ... + + + + :/images/search_for_z.png:/images/search_for_z.png + + + + 30 + 30 + + + + + + + + + 44 + 44 + + + + Home + + + ... + + + + :/images/search_for_home2.png:/images/search_for_home2.png + + + + 30 + 30 + + + + + + + + + 44 + 44 + + + + Reset + + + ... + + + + :/images/restart.png:/images/restart.png + + + + 30 + 30 + + + + + + + + false + + + + 42 + 42 + + + + Restore origin + + + ... + + + + :/images/origin.png:/images/origin.png + + + + 30 + 30 + + + + + + + + + 44 + 44 + + + + Zero Z + + + ... + + + + :/images/zero_z.png:/images/zero_z.png + + + + 30 + 30 + + + + + + + + + 44 + 44 + + + + Safe position + + + ... + + + + :/images/run.png:/images/run.png + + + + 30 + 30 + + + + + + + + true + + + + 44 + 44 + + + + Unlock + + + ... + + + + :/images/unlock.png:/images/unlock.png + + + + 24 + 24 + + + + + + + + + + + + + true - - 8 + + User commands - - 8 + + true - - 9 + + false - - - - 8 - - - - - - 44 - 44 - - - - Home - - - ... - - - - :/images/search_for_home2.png:/images/search_for_home2.png - - - - 30 - 30 - - - - - - - - - 44 - 44 - - - - Z-probe - - - ... - - - - :/images/search_for_z.png:/images/search_for_z.png - - - - 30 - 30 - - - - - - - - - 44 - 44 - - - - Zero XY - - - ... - - - - :/images/axis_zero.png:/images/axis_zero.png - - - - 30 - 30 - - - - - - - - - 44 - 44 - - - - Zero Z - - - ... - - - - :/images/zero_z.png:/images/zero_z.png - - - - 30 - 30 - - - - - - - - false - - - - 42 - 42 - - - - Restore origin - - - ... - - - - :/images/origin.png:/images/origin.png - - - - 30 - 30 - - - - - - - - - 44 - 44 - - - - Safe position - - - ... - - - - :/images/run.png:/images/run.png - - - - 30 - 30 - - - - - - - - - 44 - 44 - - - - Reset - - - ... - - - - :/images/restart.png:/images/restart.png - - - - 30 - 30 - - - - - - - - true - - - - 44 - 44 - - - - Unlock + + + + + + 0 - - ... + + 0 - - - :/images/unlock.png:/images/unlock.png + + 0 - - - 24 - 24 - + + 0 - - - - - - - - - - - - - QSplitter::handle { - background-image: url(":/images/handle_small.png"); -} - - - Qt::Vertical - - - 10 - - - false - - - - - 0 - 0 - - - - QFrame::NoFrame - - - Qt::ScrollBarAsNeeded - - - Qt::ScrollBarAlwaysOff - - - QAbstractScrollArea::AdjustToContents - - - true - - - - - 0 - -416 - 228 - 691 - - - - - 0 - 0 - - - - - 0 - - - 0 - - - 4 - - - 0 - - - - - true - - - User commands - - - true - - - false - - - - 9 - - - 8 - - - 8 - - - 8 - - - 8 - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 8 + + + + + + true - - - - true - - - - 44 - 44 - - - - Spindle on/off - - - - :/images/num2.png:/images/num2.png - - - - 30 - 30 - - - - - - - - true - - - - 44 - 44 - - - - Spindle on/off - - - - :/images/num4.png:/images/num4.png - - - - 30 - 30 - - - - - - - - true - - - - 44 - 44 - - - - Spindle on/off - - - - :/images/num3.png:/images/num3.png - - - - 30 - 30 - - - - - - - - true - - - - 44 - 44 - - - - Spindle on/off - - - - :/images/num1.png:/images/num1.png - - - - 30 - 30 - - - - - + + + 44 + 44 + + + + Spindle on/off + + + + :/images/num2.png:/images/num2.png + + + + 30 + 30 + + + - - - - - - - - - - Heightmap - - - true - - - false - - - - 8 - - - 8 - - - 8 - - - 9 - - - - - - 7 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Use heightmap + + + + true + + + + 44 + 44 + + + + Spindle on/off + + + + :/images/num4.png:/images/num4.png + + + + 30 + 30 + - - - - - - Map: - - - - - - - Qt::NoFocus - - - - - - Qt::AlignCenter - - - true - - - Absent - - - - - - - - - - - - 0 - 0 - - - - - 0 - 25 - - - - Create - - - - - - - - 0 - 0 - - - - - 0 - 25 - - - - Open - - - - - - - - - - 0 - 0 - + + + + true - 42 - 25 + 44 + 44 - - Edit mode + + Spindle on/off - + + + :/images/num3.png:/images/num3.png + + + + 30 + 30 + + + + + + + true + + + 44 + 44 + + + + Spindle on/off + + + + :/images/num1.png:/images/num1.png + + + + 30 + 30 + + - - - - - - - - - true - - - Spindle - - - true - - - false - - - - 8 - - - 8 - - - 8 - - - 8 - - - - - - 0 + + + + + + + + + + + true + + + Spindle + + + true + + + false + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + true - - 0 + + + 0 + 0 + - - 0 + + + 44 + 44 + - - 0 + + Spindle on/off - - - - - - - true - + + + :/images/cutter.png:/images/cutter.png + + + + 28 + 28 + + + + true + + + + + + + + + + + + + Jog + + + true + + + false + + + + + + + 10 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 @@ -1938,138 +1907,101 @@ QSlider::handle:horizontal:hover { - Spindle on/off + X- + + + ... - :/images/cutter.png:/images/cutter.png + :/images/1401561986_chevron-left.png:/images/1401561986_chevron-left.png - 28 - 28 + 30 + 30 - - true - - - - - - - - - - - true - - - Overriding - - - true - - - false - - - - 8 - - - 8 - - - 8 - - - 8 - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - + + + + 0 + + + + + + 0 + 0 + + + + + 44 + 44 + + + + Y- + + + + + + + :/images/1401562173_chevron-down.png:/images/1401562173_chevron-down.png + + + + 30 + 30 + + + + + - - - - - - - - - - Jog - - - true - - - false - - - - 8 - - - 8 - - - 8 - - - 8 - - - - - - 10 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 8 + + + + + 0 + 0 + + + + + 44 + 44 + + + + X+ + + + + + + + :/images/1401562173_chevron-right.png:/images/1401562173_chevron-right.png + + + + 30 + 30 + - - 4 + + + + + + 0 - - + + 0 @@ -2083,14 +2015,14 @@ QSlider::handle:horizontal:hover { - X- + Y+ - ... + - :/images/1401561986_chevron-left.png:/images/1401561986_chevron-left.png + :/images/1401562173_chevron-up.png:/images/1401562173_chevron-up.png @@ -2100,47 +2032,28 @@ QSlider::handle:horizontal:hover { - - - - 0 + + + + + + 0 + + + + + Qt::Horizontal + + + + 0 + 20 + - - - - - 0 - 0 - - - - - 44 - 44 - - - - Y- - - - - - - - :/images/1401562173_chevron-down.png:/images/1401562173_chevron-down.png - - - - 30 - 30 - - - - - + - - + + 0 @@ -2154,507 +2067,537 @@ QSlider::handle:horizontal:hover { - X+ + Z+ - :/images/1401562173_chevron-right.png:/images/1401562173_chevron-right.png + :/images/1401562699_icon-arrow-up-b.png:/images/1401562699_icon-arrow-up-b.png - 30 - 30 + 28 + 28 - - - - 0 + + + + + + 0 + + + + + Qt::Horizontal - - - - - 0 - 0 - - - - - 44 - 44 - - - - Y+ - - - - - - - :/images/1401562173_chevron-up.png:/images/1401562173_chevron-up.png - - - - 30 - 30 - - - - - - - - - - 0 + + + 0 + 20 + - - - - Qt::Horizontal - - - - 0 - 20 - - - - - - - - - 0 - 0 - - - - - 44 - 44 - - - - Z+ - - - - - - - :/images/1401562699_icon-arrow-up-b.png:/images/1401562699_icon-arrow-up-b.png - - - - 28 - 28 - - - - - + - - - - 0 + + + + + 0 + 0 + - - - - Qt::Horizontal - - - - 0 - 20 - - - - - - - - - 0 - 0 - - - - - 44 - 44 - - - - Z- - - - - - - - :/images/1401562699_icon-arrow-down-b.png:/images/1401562699_icon-arrow-down-b.png - - - - 28 - 28 - - - - - - - - - - 0 + + + 44 + 44 + - - - - - 0 - 0 - - - - - 44 - 44 - - - - Stop - - - - - - - :/images/brake.png:/images/brake.png - - - - 30 - 30 - - - - - + + Z- + + + + + + + :/images/1401562699_icon-arrow-down-b.png:/images/1401562699_icon-arrow-down-b.png + + + + 28 + 28 + + + - - - - 7 + + + + 0 - - - - true + + + + + 0 + 0 + - - QComboBox::NoInsert + + + 44 + 44 + - - - Continuously - - - - - 0.01 - - - - - 0.1 - - - - - 1 - - - - - 5 - - - - - 10 - - - - - 100 - - - - - - - - Step: + + Stop - - - - - Feed: + - - - - - - true + + + :/images/brake.png:/images/brake.png - - QComboBox::NoInsert + + + 30 + 30 + - - - 10 - - - - - 50 - - - - - 100 - - - - - 500 - - - - - 1000 - - - - - 2000 - - - - + + + + + + + + true + + + QComboBox::NoInsert + + + + Continuously + + + + + 0.01 + + + + + 0.1 + + + + + 1 + + + + + 5 + + + + + 10 + + + + + 100 + + + + + + + + Step: + + + + + - Keyboard control + Feed: + + + + + + + true + + QComboBox::NoInsert + + + + 10 + + + + + 50 + + + + + 100 + + + + + 500 + + + + + 1000 + + + + + 2000 + + - - - - - - + + + + + Keyboard control + + + + + + + + + + + + + + 0 + 0 + + + + QGroupBox { + margin-top: 7; +} + + + + + + + + + + + + + + + + + 350 + 264 + + + + QDockWidget::DockWidgetMovable + + + Visualizer + + + 4 + + + + + + + border: 1px solid gray; + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + 30 + 30 + + + + Fit + + + + + + + :/images/fit_1.png:/images/fit_1.png + + + + 20 + 20 + + - - - - - 4 + + + + + + 30 + 30 + + + + Top view + + + + + + + :/images/cubeTop.png:/images/cubeTop.png + + + + 20 + 20 + + + + + + + + + 30 + 30 + + + + Isometric view + + + + + + + :/images/cube.png:/images/cube.png + + + + 20 + 20 + + + + + + + + + 30 + 30 + + + + Front view + + + + + + + :/images/cubeFront.png:/images/cubeFront.png + + + + 20 + 20 + + + + + + + + + 30 + 30 + - - - - false - - - Console - - - - 0 - - - 8 - - - 8 - - - 8 - - - 8 - - - - - - 0 - 1 - - - - - 9 - - - - true - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 7 - - - - - - - - - - padding-top: 3; + + Left view + + + + + + + :/images/cubeLeft.png:/images/cubeLeft.png + + + + 20 + 20 + + + + + + + + + + + + + + 350 + 103 + + + + QDockWidget::DockWidgetMovable + + + Console + + + 8 + + + + + + + + 0 + 1 + + + + + 9 + + + + true + + + + + + + + + padding-top: 3; padding-bottom: 3; padding-right: 8; - - - true - - - 5 - - - 10 - - - QComboBox::InsertAtTop - - - - - - - Send command - - - - :/images/send_1.png:/images/send_1.png - - - - 16 - 16 - - - - - - - - Clear console - - - - :/images/erase_1.png:/images/erase_1.png - - - - 16 - 16 - - - - - - - - - - + + + true + + + 5 + + + 10 + + + QComboBox::InsertAtTop + - - - - - - - - - - 0 - 0 - 952 - 26 - - - - - &File - - - - &Recent files - - - - - - - - - - - - - - - - - &Service - - - - - - &Help - - + + + + + Send command + + + + :/images/send_1.png:/images/send_1.png + + + + 16 + 16 + + + + + + + + Clear console + + + + :/images/erase_1.png:/images/erase_1.png + + + + 16 + 16 + + + + + + + - - - @@ -2701,20 +2644,63 @@ padding-right: 8; Save &transformed as... + + + true + + + true + + + &Device + + + + + true + + + true + + + &Modification + + + + + true + + + true + + + &Visualizer + + + + + true + + + true + + + &Console + + - ScrollArea - QScrollArea -
widgets/scrollarea.h
+ GLWidget + QWidget +
widgets/glwidget.h
1
- Widget - QWidget -
widgets/widget.h
- 1 + ComboBox + QComboBox +
widgets/combobox.h
GroupBox @@ -2727,17 +2713,6 @@ padding-right: 8; QToolButton
widgets/styledtoolbutton.h
- - GLWidget - QWidget -
widgets/glwidget.h
- 1 -
- - ComboBox - QComboBox -
widgets/combobox.h
-
SliderBox QWidget @@ -2751,20 +2726,6 @@ padding-right: 8;
- chkTestMode - chkAutoScroll - cmdFileOpen - cmdFileReset - cmdFileSend - cmdFilePause - cmdFileAbort - cmdTop - cmdIsometric - cmdFront - cmdLeft - cmdFit - tblProgram - tblHeightMap txtHeightMapBorderX txtHeightMapBorderWidth txtHeightMapBorderY @@ -2795,15 +2756,11 @@ padding-right: 8; cmdSafePosition cmdReset cmdUnlock - scrollArea chkHeightMapUse cmdHeightMapCreate cmdHeightMapLoad cmdHeightMapMode - grpSpindle cmdSpindle - grpOverriding - grpJog cmdXMinus cmdXPlus cmdYPlus @@ -2811,11 +2768,6 @@ padding-right: 8; cmdZPlus cmdZMinus chkKeyboardControl - txtConsole - cboCommand - cmdCommandSend - cmdClearConsole - grpHeightMap @@ -2824,48 +2776,64 @@ padding-right: 8; chkKeyboardControl toggled(bool) - tblProgram + slbSpindle setDisabled(bool) - 858 - 813 + 271 + 1222 - 493 - 576 + 218 + 904 chkKeyboardControl toggled(bool) - slbSpindle + widgetFeed setDisabled(bool) - 786 - 804 + 271 + 1222 + + + 1344 + 284 + + + + + cmdHeightMapMode + toggled(bool) + widgetHeightmapSettings + setVisible(bool) + + + 1282 + 482 - 741 - 431 + 1272 + 534 chkKeyboardControl toggled(bool) - widgetFeed + tblProgram setDisabled(bool) - 807 - 799 + 117 + 1205 - 773 - 504 + 428 + 415 @@ -2876,12 +2844,140 @@ padding-right: 8; setDisabled(bool) - 799 - 803 + 156 + 1208 + + + 417 + 527 + + + + + actViewPanelsDevice + triggered(bool) + dockDevice + setVisible(bool) + + + -1 + -1 + + + 174 + 477 + + + + + actViewPanelsModification + triggered(bool) + dockModification + setVisible(bool) + + + -1 + -1 + + + 1265 + 477 + + + + + actViewPanelsVisualizer + triggered(bool) + dockVisualizer + setVisible(bool) + + + -1 + -1 + + + 720 + 162 + + + + + actViewPanelsConsole + triggered(bool) + dockConsole + setVisible(bool) + + + -1 + -1 + + + 720 + 797 + + + + + dockDevice + visibilityChanged(bool) + actViewPanelsDevice + setChecked(bool) + + + 174 + 477 + + + -1 + -1 + + + + + dockModification + visibilityChanged(bool) + actViewPanelsModification + setChecked(bool) + + + 1265 + 477 + + + -1 + -1 + + + + + dockVisualizer + visibilityChanged(bool) + actViewPanelsVisualizer + setChecked(bool) + + + 720 + 162 + + + -1 + -1 + + + + + dockConsole + visibilityChanged(bool) + actViewPanelsConsole + setChecked(bool) + + + 720 + 797 - 456 - 790 + -1 + -1 diff --git a/src/frmsettings.cpp b/src/frmsettings.cpp index cdc87371..e10215bd 100644 --- a/src/frmsettings.cpp +++ b/src/frmsettings.cpp @@ -587,7 +587,7 @@ void frmSettings::showEvent(QShowEvent *se) { Q_UNUSED(se) - ui->scrollSettings->updateMinimumWidth(); + // ui->scrollSettings->updateMinimumWidth(); } void frmSettings::searchPorts() diff --git a/src/frmsettings.h b/src/frmsettings.h index fc44eb81..849914aa 100644 --- a/src/frmsettings.h +++ b/src/frmsettings.h @@ -21,6 +21,8 @@ class frmSettings : public QDialog explicit frmSettings(QWidget *parent = 0); ~frmSettings(); + Ui::frmSettings *ui; + int exec(); void undo(); @@ -143,7 +145,7 @@ private slots: void on_radGrayscaleZ_toggled(bool checked); private: - Ui::frmSettings *ui; + // Ui::frmSettings *ui; void searchPorts(); QList m_storedValues; diff --git a/src/frmsettings.ui b/src/frmsettings.ui index d7b6d39d..29b53aff 100644 --- a/src/frmsettings.ui +++ b/src/frmsettings.ui @@ -6,8 +6,8 @@ 0 0 - 555 - 715 + 885 + 846 @@ -27,1458 +27,1473 @@ QGroupBox { border: none; padding-top: 16; font-weight: bold; +} + +QSplitter::handle { + background-repeat: no-repeat; + background-position: center center; +} + +QSplitter::handle:vertical { + background-image: url(":/images/handle_horizontal.png"); +} + +QSplitter::handle:horizontal { + background-image: url(":/images/handle_vertical.png"); } true - + - - - - - QListWidget::item { + + + Qt::Horizontal + + + 30 + + + + QListWidget::item { height: 1.75em; } + + + 1 + + + + + + 0 + 0 + + + + QFrame::NoFrame + + + Qt::ScrollBarAlwaysOn + + + Qt::ScrollBarAlwaysOff + + + true + + + + + 0 + 0 + 543 + 2028 + - - 1 - - - - - - - - 0 - 0 - - - - QFrame::NoFrame - - - Qt::ScrollBarAlwaysOn - - - Qt::ScrollBarAlwaysOff - - - true - - - - - 0 - 0 - 436 - 1749 - - - - - - - Connection - - - - - - + + + + + Connection + + + + + + + + Port: + + + + + + + true + + + + + + + + 0 + 0 + + + + padding: 0 1 0 2; + + + ... + + + + :/images/restart.png:/images/restart.png + + + + + + + Baud: + + + + + + + true + + + 9600 + + - Port: - - - - - - - true - - - - - - - - 0 - 0 - - - - padding: 0 1 0 2; + 9600 + + - ... + 14400 - - - :/images/restart.png:/images/restart.png + + + + 19200 - - - - + + - Baud: + 38400 - - - - - - true + + + + 57600 - - 9600 + + + + 115200 + + + + + + + + + + + + + Sender + + + + + + Ignore error responses + + + + + + + Automatically set parser state before sending from selected line + + + + + + + + + + Machine information + + + + + + + + + 9 + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 99999 + + + + + + + Status query period: + + + + + + + + 9 + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 9999 + + + + + + + + 0 + 0 + + + + + mm - - - 9600 + + + + inch + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 6 + 20 + + + + + + + + Units: + + + + + + + Rapid speed: + + + + + + + + 9 + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 99999 + + + + + + + Acceleration: + + + + + + + + 9 + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 99999 + + + + + + + max.: + + + + + + + Spindle speed min.: + + + + + + + + 9 + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 99999 + + + + + + + Laser power min.: + + + + + + + + 9 + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 99999 + + + + + + + max.: + + + + + + + + 9 + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 99999 + + + + + + + + + + + + Control + + + + + + padding-top: 3; + + + Probe commands: + + + 0 + + + + + + + Qt::AlignCenter + + + Command 1; command 2; ... + + + + + + + padding-top: 3; + + + Safe position commands: + + + 0 + + + + + + + Qt::AlignCenter + + + Command 1; command 2; ... + + + + + + + + + + + + 0 + 0 + - - - 14400 + "Restore origin" moves tool in: - - + + + + + + + + false + + + + Plane + + + + + Space + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 9 + 20 + + + + + + + + + + + + + User commands + + + + + + padding-top: 3; + + + Button 1: + + + 0 + + + + + + + Qt::AlignCenter + + + Command 1; command 2; ... + + + + + + + padding-top: 3; + + + Button 2: + + + 0 + + + + + + + Qt::AlignCenter + + + Command 1; command 2; ... + + + + + + + padding-top: 3; + + + Button 3: + + + 0 + + + + + + + Qt::AlignCenter + + + Command 1; command 2; ... + + + + + + + padding-top: 3; + + + Button 4: + + + 0 + + + + + + + Qt::AlignCenter + + + Command 1; command 2; ... + + + + + + + + + + Heightmap + + + + + + + + Heightmap probing feed: + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 9 + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 99999 + + + + + + + + + + + + Parser + + + + + + + + Arc approximation segment size: + + + + + + + Qt::Horizontal + + + + 0 + 20 + + + + + + + + + + + + by length + + + true + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 6 + 20 + + + + + + + + true + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 2 + + + 99.000000000000000 + + + + + + + by angle (deg.) + + + + + + + false + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 2 + + + 180.000000000000000 + + + + + + + + + + + + Visualizer + + + + + + + + Z-buffer + + + + + + + false + + + MSAA + + + + + + + - 19200 + Line width: - - - - 38400 + + + + + + Qt::AlignCenter - - - - 57600 + + QAbstractSpinBox::NoButtons - - - - 115200 + + 1 - - - - - - - - - - - - Sender - - - - - - Ignore error responses - - - - - - - Automatically set parser state before sending from selected line - - - - - - - - - - Machine information - - - - - - - - - 9 - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 99999 - - - - - - - Status query period: - - - - - - - - 9 - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 9999 - - - - - - - - 0 - 0 - - - - - mm + + 9.000000000000000 - - + + + + + + + + - inch + FPS lock: - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 6 - 20 - - - - - - - - Units: - - - - - - - Rapid speed: - - - - - - - - 9 - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 99999 - - - - - - - Acceleration: - - - - - - - - 9 - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 99999 - - - - - - - max.: - - - - - - - Spindle speed min.: - - - - - - - - 9 - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 99999 - - - - - - - Laser power min.: - - - - - - - - 9 - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 99999 - - - - - - - max.: - - - - - - - - 9 - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 99999 - - - - - - - - - - - - Control - - - - - - padding-top: 3; - - - Probe commands: - - - 0 - - - - - - - Qt::AlignCenter - - - Command 1; command 2; ... - - - - - - - padding-top: 3; - - - Safe position commands: - - - 0 - - - - - - - Qt::AlignCenter - - - Command 1; command 2; ... - - - - - - - - - - - - 0 - 0 - - - - "Restore origin" moves tool in: - - - - - - - - - false - - - - Plane + + + + + + Qt::ImhDigitsOnly|Qt::ImhFormattedNumbersOnly - - - - Space + + true - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 9 - 20 - - - - - - - - - - - - - User commands - - - - - - padding-top: 3; - - - Button 1: - - - 0 - - - - - - - Qt::AlignCenter - - - Command 1; command 2; ... - - - - - - - padding-top: 3; - - - Button 2: - - - 0 - - - - - - - Qt::AlignCenter - - - Command 1; command 2; ... - - - - - - - padding-top: 3; - - - Button 3: - - - 0 - - - - - - - Qt::AlignCenter - - - Command 1; command 2; ... - - - - - - - padding-top: 3; - - - Button 4: - - - 0 - - - - - - - Qt::AlignCenter - - - Command 1; command 2; ... - - - - - - - - - - Heightmap - - - - - - - - Heightmap probing feed: - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 9 - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 99999 - - - - - - - - - - - - Parser - - - - - - - - Arc approximation segment size: - - - - - - - Qt::Horizontal - - - - 0 - 20 - - - - - - - - - - - - by length - - - true - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 6 - 20 - - - - - - - - true - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 2 - - - 99.000000000000000 - - - - - - - by angle (deg.) - - - - - - - false - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 2 - - - 180.000000000000000 - - - - - - - - - - - - Visualizer - - - - - - - - Z-buffer - - - - - - - false - - - MSAA - - - - - - - + - Line width: - - - - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons + 30 - - 1 - - - 9.000000000000000 - - - - - - - - - + + - FPS lock: + 60 - - - - - - Qt::ImhDigitsOnly|Qt::ImhFormattedNumbersOnly - - - true + + + + 120 - - - 30 - - - - - 60 - - - - - 120 - - - - - - - - - - Program draw mode: - - - - - - - Vectors - - - true - - - false - - - - - - - Raster - - - false - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 6 - 20 - - - - - - - - false - - - By 'Z'-code - - - false - - - - - - - false - - - By 'S'-code - - - false - - - - - - - Grayscale segments - - - - - - - false - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 2 - - - 99.000000000000000 - - - - - - - Simplify geometry - - - - - - - false - - - Precision: - - - - - - - V-sync - - - - - - - Smoothing - - - - - - - - - - - - Tool model - - - - - - Type: - - - - - - - Diameter: - - - - - - - - 0 - 0 - - - + + + + + + + - Flat + Program draw mode: - - + + + + - Conic - - - - - - - - false - - - Angle: - - - - - - - Length: - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 6 - 20 - - - - - - - - - 0 - 0 - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 3 - - - 99.000000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 3 - - - 999.000000000000000 - - - - - - - - 0 - 0 - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 3 - - - 180.000000000000000 - - - - - - - - - - Console - - - - - - Show G-code program commands - - - - - - - Show UI commands - - - - - - - Command auto-completion - - - - - - - - - - Panels - - - - - - User commands - - - - - - - Heightmap - - - - - - - Jog - - - - - - - Spindle - - - - - + Vectors + + + true + + + false + + + + + + + Raster + + + false + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 6 + 20 + + + + + + + + false + + + By 'Z'-code + + + false + + + + + + + false + + + By 'S'-code + + + false + + + + + + + Grayscale segments + + + + + + + false + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 2 + + + 99.000000000000000 + + + + + + + Simplify geometry + + + + + + + false + + + Precision: + + + + + + + V-sync + + + + + + + Smoothing + + + + + + + + + + + + Tool model + + + + + + Type: + + + + + + + Diameter: + + + + + + + + 0 + 0 + + + - Overriding + Flat - - - - - - - - - Colors - - - - - - - - Z-movement: - - - - - - - Toolpath - - - true - - - - - - - - - - Background: - - - - - - - - - - - - - Highlight: - - - - - - - Start point: - - - - - - - - - - End point: - - - - - - - - - - - - - Visualizer - - - - - - - Text: - - - - - - - Tool: - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 6 - - - - - - - - Drawn: - - - - - - - - - - - - - Normal: - - - - - - - - - - - - Font - - - - + + - Size: - - - - - - - - 0 - 0 - - - - true - - - 8 - - - 10 - - - 1 - - + Conic + + + + + + + + false + + + Angle: + + + + + + + Length: + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 6 + 20 + + + + + + + + + 0 + 0 + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 3 + + + 99.000000000000000 + + + + + + + + 0 + 0 + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 3 + + + 999.000000000000000 + + + + + + + + 0 + 0 + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 3 + + + 180.000000000000000 + + + + + + + + + + Console + + + + + + Show G-code program commands + + + + + + + Show UI commands + + + + + + + Command auto-completion + + + + + + + + + + Panels + + + + + + User commands + + + + + + + Heightmap + + + + + + + Jog + + + + + + + Spindle + + + + + + + Overriding + + + + + + + + + + Colors + + + + + + + + Z-movement: + + + + + + + Toolpath + + + true + + + + + + + + + + Background: + + + + + + + + + + + + + Highlight: + + + + + + + Start point: + + + + + + + + + + End point: + + + + + + + + + + + - 8 + Visualizer - - + + + + - 9 + Text: - - + + + + - 10 + Tool: - - + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 6 + + + + + + - 11 + Drawn: - - + + + + + + + + + + - 12 + Normal: - - - - - + + + + + + + + + + + Font + + + + + + Size: + + + + + + + + 0 + 0 + + + + true + + + 8 + + + 10 + + + 1 + + - pt - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - color: blue; + 8 + + - (restart needed) + 9 - - - - - - Qt::Horizontal + + + + 10 - - - 40 - 20 - + + + + 11 - - - - - - - + + + + 12 + + + + + + + + pt + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + color: blue; + + + (restart needed) + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + - - + + @@ -1531,9 +1546,9 @@ QGroupBox { - ScrollArea - QScrollArea -
widgets/scrollarea.h
+ GroupBox + QGroupBox +
widgets/groupbox.h
1
@@ -1542,12 +1557,6 @@ QGroupBox {
widgets/widget.h
1
- - GroupBox - QGroupBox -
widgets/groupbox.h
- 1 -
ColorPicker QWidget diff --git a/src/parser/linesegment.cpp b/src/parser/linesegment.cpp index fff3c499..40137aaa 100644 --- a/src/parser/linesegment.cpp +++ b/src/parser/linesegment.cpp @@ -10,7 +10,7 @@ LineSegment::LineSegment() { - m_toolhead = 0; //DEFAULT TOOLHEAD ASSUMED TO BE 0! + m_toolhead = 0; m_isZMovement = false; m_isArc = false; m_isFastTraverse = false; @@ -21,12 +21,17 @@ LineSegment::LineSegment() m_vertexIndex = -1; } -LineSegment::LineSegment(QVector3D a, QVector3D b, int num) : LineSegment() +LineSegment::LineSegment(QVector3D a, QVector3D b, int num) { -// m_toolhead = 0; //DEFAULT TOOLHEAD ASSUMED TO BE 0! -// m_isZMovement = false; -// m_isArc = false; -// m_isFastTraverse = false; + m_toolhead = 0; + m_isZMovement = false; + m_isArc = false; + m_isFastTraverse = false; + m_drawn = false; + m_isMetric = true; + m_isAbsolute = true; + m_isHightlight = false; + m_vertexIndex = -1; m_first = a; m_second = b; diff --git a/src/parser/pointsegment.cpp b/src/parser/pointsegment.cpp index 936b4155..fdd0397b 100644 --- a/src/parser/pointsegment.cpp +++ b/src/parser/pointsegment.cpp @@ -25,8 +25,24 @@ PointSegment::PointSegment() m_plane = XY; } -PointSegment::PointSegment(PointSegment *ps) : PointSegment(ps->point(), ps->getLineNumber()) +PointSegment::PointSegment(PointSegment *ps) { + m_toolhead = 0; + m_isMetric = true; + m_isAbsolute = true; + m_isZMovement = false; + m_isArc = false; + m_isFastTraverse = false; + m_lineNumber = -1; + m_arcProperties = NULL; + m_speed = 0; + m_spindleSpeed = 0; + m_dwell = 0; + m_plane = XY; + + this->m_point = new QVector3D(ps->point()->x(), ps->point()->y(), ps->point()->z()); + this->m_lineNumber = ps->getLineNumber(); + this->m_toolhead = ps->getToolhead(); this->m_speed = ps->getSpeed(); this->m_isMetric = ps->isMetric(); @@ -42,14 +58,43 @@ PointSegment::PointSegment(PointSegment *ps) : PointSegment(ps->point(), ps->get } } -PointSegment::PointSegment(const QVector3D *b, int num) : PointSegment() +PointSegment::PointSegment(const QVector3D *b, int num) { + m_toolhead = 0; + m_isMetric = true; + m_isAbsolute = true; + m_isZMovement = false; + m_isArc = false; + m_isFastTraverse = false; + m_lineNumber = -1; + m_arcProperties = NULL; + m_speed = 0; + m_spindleSpeed = 0; + m_dwell = 0; + m_plane = XY; + this->m_point = new QVector3D(b->x(), b->y(), b->z()); this->m_lineNumber = num; } -PointSegment::PointSegment(QVector3D *point, int num, QVector3D *center, double radius, bool clockwise) : PointSegment(point, num) +PointSegment::PointSegment(QVector3D *point, int num, QVector3D *center, double radius, bool clockwise) { + m_toolhead = 0; + m_isMetric = true; + m_isAbsolute = true; + m_isZMovement = false; + m_isArc = false; + m_isFastTraverse = false; + m_lineNumber = -1; + m_arcProperties = NULL; + m_speed = 0; + m_spindleSpeed = 0; + m_dwell = 0; + m_plane = XY; + + this->m_point = new QVector3D(point->x(), point->y(), point->z()); + this->m_lineNumber = num; + this->m_isArc = true; this->m_arcProperties = new ArcProperties(); this->m_arcProperties->center = new QVector3D(center->x(), center->y(), center->z()); diff --git a/src/utils/interpolation.h b/src/utils/interpolation.h index 4a2cc58a..b5a28b53 100644 --- a/src/utils/interpolation.h +++ b/src/utils/interpolation.h @@ -7,7 +7,6 @@ #include #include #include -#include class Interpolation { @@ -41,8 +40,10 @@ class Interpolation x -= borderRect.x(); y -= borderRect.y(); - int ix = trunc(x / gridStepX); - int iy = trunc(y / gridStepY); + // int ix = trunc(x / gridStepX); + // int iy = trunc(y / gridStepY); + int ix = (x / gridStepX); + int iy = (y / gridStepY); if (ix > basePoints->columnCount() - 2) ix = basePoints->columnCount() - 2; if (iy > basePoints->rowCount() - 2) iy = basePoints->rowCount() - 2; diff --git a/src/widgets/glwidget.cpp b/src/widgets/glwidget.cpp index 1c310abf..6ee438e4 100644 --- a/src/widgets/glwidget.cpp +++ b/src/widgets/glwidget.cpp @@ -21,6 +21,9 @@ GLWidget::GLWidget(QWidget *parent) : QGLWidget(parent), m_shaderProgram(0) #endif { + m_frames = 0; + m_fps = 0; + m_animateView = false; m_updatesEnabled = false; @@ -521,7 +524,8 @@ void GLWidget::mousePressEvent(QMouseEvent *event) void GLWidget::mouseMoveEvent(QMouseEvent *event) { - if ((event->buttons() & Qt::MiddleButton && !(event->modifiers() & Qt::ShiftModifier)) || event->buttons() & Qt::LeftButton) { + if ((event->buttons() & Qt::MiddleButton && !(event->modifiers() & Qt::ShiftModifier)) + || (event->buttons() & Qt::LeftButton && !(event->modifiers() & Qt::ShiftModifier))) { stopViewAnimation(); @@ -535,7 +539,9 @@ void GLWidget::mouseMoveEvent(QMouseEvent *event) emit rotationChanged(); } - if ((event->buttons() & Qt::MiddleButton && event->modifiers() & Qt::ShiftModifier) || event->buttons() & Qt::RightButton) { + if ((event->buttons() & Qt::MiddleButton && event->modifiers() & Qt::ShiftModifier) + || event->buttons() & Qt::RightButton + || (event->buttons() & Qt::LeftButton && (event->modifiers() & Qt::ShiftModifier))) { m_xPan = m_xLastPan - (event->pos().x() - m_lastPos.x()) * 1 / (double)width(); m_yPan = m_yLastPan + (event->pos().y() - m_lastPos.y()) * 1 / (double)height(); diff --git a/src/widgets/glwidget.h b/src/widgets/glwidget.h index a04fa41e..d4a9960e 100644 --- a/src/widgets/glwidget.h +++ b/src/widgets/glwidget.h @@ -104,8 +104,8 @@ private slots: bool m_msaa; bool m_vsync; bool m_zBuffer; - int m_frames = 0; - int m_fps = 0; + int m_frames; + int m_fps; int m_targetFps; int m_animationFrame; QTime m_spendTime; From 4d8d76ddae77208d54a1c267b21c68df98541520 Mon Sep 17 00:00:00 2001 From: Denvi Date: Wed, 30 Oct 2019 20:02:24 +0500 Subject: [PATCH 02/80] Margins fix --- src/frmmain.cpp | 88 ++++--- src/frmmain.h | 2 + src/frmmain.ui | 658 +++++++++++++++++++++++++++++++----------------- 3 files changed, 488 insertions(+), 260 deletions(-) diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 6f56956c..3753ac94 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -148,18 +148,10 @@ frmMain::frmMain(QWidget *parent) : setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea); setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea); - setStyleSheet(styleSheet() + QString( -"\nQDockWidget::title {\n\ - text-align: left;\n\ - background: lightgray;\n\ - padding-left: %1;\n\ - margin-left: %1;\n\ - margin-right: %1;\n\ - margin-top: %1;\n\ -}").arg(ui->dockDevice->widget()->layout()->margin())); - - style()->unpolish(this); - this->ensurePolished(); + connect(ui->dockDevice, &QDockWidget::topLevelChanged, this, &frmMain::onDockTopLevelChanged); + connect(ui->dockModification, &QDockWidget::topLevelChanged, this, &frmMain::onDockTopLevelChanged); + connect(ui->dockVisualizer, &QDockWidget::topLevelChanged, this, &frmMain::onDockTopLevelChanged); + connect(ui->dockConsole, &QDockWidget::topLevelChanged, this, &frmMain::onDockTopLevelChanged); ui->widgetHeightmapSettings->setVisible(false); @@ -548,6 +540,12 @@ void frmMain::loadSettings() qApp->processEvents(); restoreState(set.value("formMainState").toByteArray()); + // Adjust width + int w = qMax(ui->dockDevice->widget()->sizeHint().width(), + ui->dockModification->widget()->sizeHint().width()); + ui->dockDevice->setFixedWidth(w); + ui->dockModification->setFixedWidth(w); + m_settingsLoading = false; } @@ -934,9 +932,9 @@ void frmMain::onSerialPortReadyRead() // Update machine coordinates static QRegExp mpx("MPos:([^,]*),([^,]*),([^,^>^|]*)"); if (mpx.indexIn(data) != -1) { - ui->txtMPosX->setText(mpx.cap(1)); - ui->txtMPosY->setText(mpx.cap(2)); - ui->txtMPosZ->setText(mpx.cap(3)); + ui->txtMPosX->setValue(mpx.cap(1).toDouble()); + ui->txtMPosY->setValue(mpx.cap(2).toDouble()); + ui->txtMPosZ->setValue(mpx.cap(3).toDouble()); } // Status @@ -1037,9 +1035,9 @@ void frmMain::onSerialPortReadyRead() z = sNan; grblReset(); } else { - x = ui->txtMPosX->text().toDouble(); - y = ui->txtMPosY->text().toDouble(); - z = ui->txtMPosZ->text().toDouble(); + x = ui->txtMPosX->value(); + y = ui->txtMPosY->value(); + z = ui->txtMPosZ->value(); } break; } @@ -1057,16 +1055,22 @@ void frmMain::onSerialPortReadyRead() // Update work coordinates int prec = m_settings->units() == 0 ? 3 : 4; - ui->txtWPosX->setText(QString::number(ui->txtMPosX->text().toDouble() - workOffset.x(), 'f', prec)); - ui->txtWPosY->setText(QString::number(ui->txtMPosY->text().toDouble() - workOffset.y(), 'f', prec)); - ui->txtWPosZ->setText(QString::number(ui->txtMPosZ->text().toDouble() - workOffset.z(), 'f', prec)); + ui->txtWPosX->setDecimals(prec); + ui->txtWPosY->setDecimals(prec); + ui->txtWPosZ->setDecimals(prec); + ui->txtWPosX->setValue(ui->txtMPosX->value() - workOffset.x()); + ui->txtWPosY->setValue(ui->txtMPosY->value() - workOffset.y()); + ui->txtWPosZ->setValue(ui->txtMPosZ->value() - workOffset.z()); + // ui->txtWPosX->setText(QString::number(ui->txtMPosX->text().toDouble() - workOffset.x(), 'f', prec)); + // ui->txtWPosY->setText(QString::number(ui->txtMPosY->text().toDouble() - workOffset.y(), 'f', prec)); + // ui->txtWPosZ->setText(QString::number(ui->txtMPosZ->text().toDouble() - workOffset.z(), 'f', prec)); // Update tool position QVector3D toolPosition; if (!(status == CHECK && m_fileProcessedCommandIndex < m_currentModel->rowCount() - 1)) { - toolPosition = QVector3D(toMetric(ui->txtWPosX->text().toDouble()), - toMetric(ui->txtWPosY->text().toDouble()), - toMetric(ui->txtWPosZ->text().toDouble())); + toolPosition = QVector3D(toMetric(ui->txtWPosX->value()), + toMetric(ui->txtWPosY->value()), + toMetric(ui->txtWPosZ->value())); m_toolDrawer.setToolPosition(m_codeDrawer->getIgnoreZ() ? QVector3D(toolPosition.x(), toolPosition.y(), 0) : toolPosition); } @@ -1679,6 +1683,19 @@ void frmMain::dropEvent(QDropEvent *de) } } +QMenu *frmMain::createPopupMenu() +{ + QMenu *menu = QMainWindow::createPopupMenu(); + + foreach (QAction *a, menu->actions()) { + if (a->text().contains("_spacer")) { + a->setVisible(false); + } + } + + return menu; +} + void frmMain::on_actFileExit_triggered() { close(); @@ -2071,6 +2088,11 @@ void frmMain::onSlbSpindleValueChanged() ui->grpSpindle->setTitle(tr("Spindle") + QString(tr(" (%1)")).arg(ui->slbSpindle->value())); } +void frmMain::onDockTopLevelChanged(bool topLevel) +{ + static_cast(sender())->setStyleSheet(""); +} + void frmMain::on_cmdFileAbort_clicked() { m_aborting = true; @@ -2100,12 +2122,12 @@ void frmMain::storeOffsets() void frmMain::restoreOffsets() { // Still have pre-reset working position - sendCommand(QString("G21G53G90X%1Y%2Z%3").arg(toMetric(ui->txtMPosX->text().toDouble())) - .arg(toMetric(ui->txtMPosY->text().toDouble())) - .arg(toMetric(ui->txtMPosZ->text().toDouble())), -1, m_settings->showUICommands()); - sendCommand(QString("G21G92X%1Y%2Z%3").arg(toMetric(ui->txtWPosX->text().toDouble())) - .arg(toMetric(ui->txtWPosY->text().toDouble())) - .arg(toMetric(ui->txtWPosZ->text().toDouble())), -1, m_settings->showUICommands()); + sendCommand(QString("G21G53G90X%1Y%2Z%3").arg(toMetric(ui->txtMPosX->value())) + .arg(toMetric(ui->txtMPosY->value())) + .arg(toMetric(ui->txtMPosZ->value())), -1, m_settings->showUICommands()); + sendCommand(QString("G21G92X%1Y%2Z%3").arg(toMetric(ui->txtWPosX->value())) + .arg(toMetric(ui->txtWPosY->value())) + .arg(toMetric(ui->txtWPosZ->value())), -1, m_settings->showUICommands()); } void frmMain::sendNextFileCommands() { @@ -2492,9 +2514,9 @@ void frmMain::on_cmdRestoreOrigin_clicked() { // Restore offset sendCommand(QString("G21"), -1, m_settings->showUICommands()); - sendCommand(QString("G53G90G0X%1Y%2Z%3").arg(toMetric(ui->txtMPosX->text().toDouble())) - .arg(toMetric(ui->txtMPosY->text().toDouble())) - .arg(toMetric(ui->txtMPosZ->text().toDouble())), -1, m_settings->showUICommands()); + sendCommand(QString("G53G90G0X%1Y%2Z%3").arg(toMetric(ui->txtMPosX->value())) + .arg(toMetric(ui->txtMPosY->value())) + .arg(toMetric(ui->txtMPosZ->value())), -1, m_settings->showUICommands()); sendCommand(QString("G92X%1Y%2Z%3").arg(toMetric(ui->txtMPosX->text().toDouble()) - m_storedX) .arg(toMetric(ui->txtMPosY->text().toDouble()) - m_storedY) .arg(toMetric(ui->txtMPosZ->text().toDouble()) - m_storedZ), -1, m_settings->showUICommands()); diff --git a/src/frmmain.h b/src/frmmain.h index 2c9464c5..b1f23b25 100644 --- a/src/frmmain.h +++ b/src/frmmain.h @@ -110,6 +110,7 @@ private slots: void onActSendFromLineTriggered(); void onSlbSpindleValueUserChanged(); void onSlbSpindleValueChanged(); + void onDockTopLevelChanged(bool topLevel); void on_actFileExit_triggered(); void on_cmdFileOpen_clicked(); @@ -205,6 +206,7 @@ private slots: void closeEvent(QCloseEvent *ce); void dragEnterEvent(QDragEnterEvent *dee); void dropEvent(QDropEvent *de); + QMenu *createPopupMenu() override; private: static const int BUFFERLENGTH = 127; diff --git a/src/frmmain.ui b/src/frmmain.ui index 4d920742..fddb8a2f 100644 --- a/src/frmmain.ui +++ b/src/frmmain.ui @@ -6,8 +6,8 @@ 0 0 - 1441 - 934 + 2033 + 1015 @@ -22,12 +22,41 @@ QMainWindow::separator { - width: 13; + width: 26; } -/*QWidget { - font-size: 9pt; -}*/ +QDockWidget::title { + background-color: lightgray; + padding: 5 0 5 11; + text-align: left center; +} + +QDockWidget[floating="true"]>QWidget>QWidget { + margin-left: 11; + margin-right: 11; +} + +QDockWidget::close-button { + subcontrol-origin: padding; + subcontrol-position: right center; + position: absolute; + top: 2; + width: 24; +} + +QDockWidget::float-button { + subcontrol-origin: padding; + subcontrol-position: right center; + position: absolute; + top: 2; + right: 20; + width: 24; +} + +QToolBar#_spacerTop, QToolBar#_spacerLeft, QToolBar#_spacerRight { + border: none; + background-color: transparent; +} QSpinBox, QDoubleSpinBox { padding-top: 1px; @@ -137,12 +166,22 @@ QMainWindow::separator:horizontal { 0 + + 0 + + + 0 + + + 0 + QLabel { - padding: 6; - background-color: lightgray; + padding: 5 0 5 11; + background-color: palette(window); + border: 1px solid lightgray; } QLabel[overrided="true"] { @@ -326,7 +365,7 @@ QLabel[overrided="false"] { 0 0 - 1441 + 2033 31 @@ -367,16 +406,16 @@ QLabel[overrided="false"] { &View - + - &Panels + &Windows - + @@ -387,17 +426,11 @@ QLabel[overrided="false"] { 350 - 0 - - - - - 350 - 16777215 + 160 - QDockWidget::DockWidgetMovable + QDockWidget::AllDockWidgetFeatures Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea @@ -410,6 +443,12 @@ QLabel[overrided="false"] { + + 0 + + + 0 + @@ -422,8 +461,8 @@ QLabel[overrided="false"] { 0 - -148 - 298 + 0 + 324 749 @@ -1177,14 +1216,8 @@ QLabel[overrided="false"] { 178 - - - 350 - 524287 - - - QDockWidget::DockWidgetMovable + QDockWidget::AllDockWidgetFeatures Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea @@ -1197,6 +1230,12 @@ QLabel[overrided="false"] { + + 0 + + + 0 + @@ -1205,12 +1244,12 @@ QLabel[overrided="false"] { true - + 0 0 - 298 + 324 922 @@ -1250,55 +1289,97 @@ QLabel[overrided="false"] { - - - 8 - + - - - X + + + + 0 + 0 + - - 0 + + Qt::AlignCenter - - true + + QAbstractSpinBox::NoButtons + + + 3 + + + -999.000000000000000 + + + 999.000000000000000 + + + 0.000000000000000 - - - Y + + + + 0 + 0 + - - 0 + + Qt::AlignCenter - - true + + QAbstractSpinBox::NoButtons + + + 3 + + + -999.000000000000000 + + + 999.000000000000000 + + + 0.000000000000000 - - - Z + + + + 0 + 0 + - - 0 + + Qt::AlignCenter - - true + + QAbstractSpinBox::NoButtons + + + 3 + + + -999.000000000000000 + + + 999.000000000000000 + + + 0.000000000000000 @@ -1320,55 +1401,97 @@ QLabel[overrided="false"] { - - - 8 - + - - - X + + + + 0 + 0 + - - 0 + + Qt::AlignCenter - - true + + QAbstractSpinBox::NoButtons + + + 3 + + + -999.000000000000000 + + + 999.000000000000000 + + + 0.000000000000000 - - - Y + + + + 0 + 0 + - - 0 + + Qt::AlignCenter - - true + + QAbstractSpinBox::NoButtons + + + 3 + + + -999.000000000000000 + + + 999.000000000000000 + + + 0.000000000000000 - - - Z + + + + 0 + 0 + - - 0 + + Qt::AlignCenter - - true + + QAbstractSpinBox::NoButtons + + + 3 + + + -999.000000000000000 + + + 999.000000000000000 + + + 0.000000000000000 @@ -2324,11 +2447,11 @@ QLabel[overrided="false"] { 350 - 264 + 460 - QDockWidget::DockWidgetMovable + QDockWidget::AllDockWidgetFeatures Visualizer @@ -2338,6 +2461,12 @@ QLabel[overrided="false"] { + + 0 + + + 0 + @@ -2505,11 +2634,11 @@ QLabel[overrided="false"] { 350 - 103 + 129 - QDockWidget::DockWidgetMovable + QDockWidget::AllDockWidgetFeatures Console @@ -2518,87 +2647,168 @@ QLabel[overrided="false"] { 8 - + + + 0 + + + 0 + - - - - 0 - 1 - - - - - 9 - + + + QFrame::StyledPanel - - true + + QFrame::Raised - - - - - - - - padding-top: 3; + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 1 + + + + + 9 + + + + true + + + + + + + + + padding-top: 3; padding-bottom: 3; padding-right: 8; - - - true - - - 5 - - - 10 - - - QComboBox::InsertAtTop - - - - - - - Send command - - - - :/images/send_1.png:/images/send_1.png - - - - 16 - 16 - - - - - - - - Clear console - - - - :/images/erase_1.png:/images/erase_1.png - - - - 16 - 16 - - - - - + + + true + + + 5 + + + 10 + + + QComboBox::InsertAtTop + + + + + + + Send command + + + + :/images/send_1.png:/images/send_1.png + + + + 16 + 16 + + + + + + + + Clear console + + + + :/images/erase_1.png:/images/erase_1.png + + + + 16 + 16 + + + + + + + + + + + Qt::PreventContextMenu + + + _spacerTop + + + false + + + TopToolBarArea + + + false + + + + + Qt::PreventContextMenu + + + _spacerLeft + + + false + + + LeftToolBarArea + + + false + + + + + Qt::PreventContextMenu + + + _spacerRight + + + false + + + RightToolBarArea + + + false + + &Open @@ -2741,12 +2951,6 @@ padding-right: 8; txtHeightMapInterpolationStepY cboHeightMapInterpolationType chkHeightMapInterpolationShow - txtWPosX - txtWPosY - txtWPosZ - txtMPosX - txtMPosY - txtMPosZ txtStatus cmdHome cmdTouch @@ -2773,38 +2977,6 @@ padding-right: 8;
- - chkKeyboardControl - toggled(bool) - slbSpindle - setDisabled(bool) - - - 271 - 1222 - - - 218 - 904 - - - - - chkKeyboardControl - toggled(bool) - widgetFeed - setDisabled(bool) - - - 271 - 1222 - - - 1344 - 284 - - - cmdHeightMapMode toggled(bool) @@ -2821,38 +2993,6 @@ padding-right: 8; - - chkKeyboardControl - toggled(bool) - tblProgram - setDisabled(bool) - - - 117 - 1205 - - - 428 - 415 - - - - - chkKeyboardControl - toggled(bool) - tblHeightMap - setDisabled(bool) - - - 156 - 1208 - - - 417 - 527 - - - actViewPanelsDevice triggered(bool) @@ -2981,5 +3121,69 @@ padding-right: 8; + + chkKeyboardControl + toggled(bool) + widgetFeed + setDisabled(bool) + + + 271 + 1222 + + + 1344 + 284 + + + + + chkKeyboardControl + toggled(bool) + tblHeightMap + setDisabled(bool) + + + 156 + 1208 + + + 417 + 527 + + + + + chkKeyboardControl + toggled(bool) + tblProgram + setDisabled(bool) + + + 117 + 1205 + + + 428 + 415 + + + + + chkKeyboardControl + toggled(bool) + slbSpindle + setDisabled(bool) + + + 271 + 1222 + + + 218 + 904 + + + From f3058f07701c0c28dad8f8e1f76f40d9ad8c76f2 Mon Sep 17 00:00:00 2001 From: Denvi Date: Wed, 30 Oct 2019 20:11:41 +0500 Subject: [PATCH 03/80] Translations updated --- src/translations/candle_en.ts | 1434 +++++++++++++++++++++++++++++++++ src/translations/candle_es.ts | 718 +++++++++-------- src/translations/candle_fr.ts | 718 +++++++++-------- src/translations/candle_pt.ts | 718 +++++++++-------- src/translations/candle_ru.qm | Bin 20083 -> 20410 bytes src/translations/candle_ru.ts | 720 +++++++++-------- 6 files changed, 2957 insertions(+), 1351 deletions(-) create mode 100644 src/translations/candle_en.ts diff --git a/src/translations/candle_en.ts b/src/translations/candle_en.ts new file mode 100644 index 00000000..c380e444 --- /dev/null +++ b/src/translations/candle_en.ts @@ -0,0 +1,1434 @@ + + + + + GCodeTableModel + + + # + + + + + Command + + + + + State + + + + + Response + + + + + Line + + + + + Args + + + + + In queue + + + + + Sent + + + + + Processed + + + + + Skipped + + + + + Unknown + + + + + GLWidget + + + Vertices: %1 + + + + + SliderBox + + + Form + + + + + + Title: + + + + + frmAbout + + + About + + + + + <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visit: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2016 Hayrullin Denis Ravilevich</p></body></html> + + + + + <html><head/><body><p><span style=" font-weight:600;">The program is provided AS IS without any guarantees or warranty. Use at your own risk.</span></p></body></html> + + + + + OK + + + + + frmMain + + + Candle + + + + + Program + + + + + + Check + + + + + Scroll + + + + + + + + + Open + + + + + + Reset + + + + + + Send + + + + + Pause + + + + + + + + Abort + + + + + &File + + + + + &Recent files + + + + + &Service + + + + + &Help + + + + + &View + + + + + &Windows + + + + + Modification + + + + + + + Overriding + + + + + + Heightmap + + + + + Use heightmap + + + + + Absent + + + + + Map: + + + + + Create + + + + + Edit + + + + + Border: + + + + + + + X: + + + + + H: + + + + + + + Y: + + + + + W: + + + + + Show border + + + + + Auto + + + + + Probe grid: + + + + + Zb: + + + + + Zt: + + + + + Show probe grid + + + + + Interpolation grid: + + + + + Type: + + + + + Bicubic + + + + + Show interpolation grid + + + + + Device + + + + + State + + + + + Work coordinates: + + + + + Machine coordinates: + + + + + Status: + + + + + Control + + + + + Zero XY + + + + + + + + + + + + + ... + + + + + Z-probe + + + + + + Home + + + + + Restore origin + + + + + Zero Z + + + + + Safe position + + + + + Unlock + + + + + User commands + + + + + + + + + Spindle on/off + + + + + + + + + + Spindle + + + + + + + + Jog + + + + + X- + + + + + Y- + + + + + X+ + + + + + Y+ + + + + + Z+ + + + + + Z- + + + + + Stop + + + + + Continuously + + + + + 0.01 + + + + + 0.1 + + + + + 1 + + + + + 5 + + + + + + 10 + + + + + + 100 + + + + + Step: + + + + + Feed: + + + + + 50 + + + + + 500 + + + + + 1000 + + + + + 2000 + + + + + Keyboard control + + + + + Visualizer + + + + + Fit + + + + + Top view + + + + + Isometric view + + + + + Front view + + + + + Left view + + + + + Console + + + + + Send command + + + + + Clear console + + + + + _spacerTop + + + + + _spacerLeft + + + + + _spacerRight + + + + + &Open + + + + + E&xit + + + + + &Settings + + + + + &New + + + + + &Save + + + + + Save &as... + + + + + &About + + + + + &Clear + + + + + Save &transformed as... + + + + + &Device + + + + + &Modification + + + + + &Visualizer + + + + + &Console + + + + + Unknown + + + + + Idle + + + + + Alarm + + + + + Run + + + + + + Hold + + + + + Queue + + + + + Door + + + + + Send from current line + + + + + Feed rate: + + + + + Rapid speed: + + + + + Spindle speed: + + + + + &Insert line + + + + + &Delete lines + + + + + Don't show again + + + + + Speed: + + + + + + Restore origin: +%1, %2, %3 + + + + + G-code program file was changed. Save? + + + + + Heightmap file was changed. Save? + + + + + Not connected + + + + + G-code program + + + + + Probe + + + + + Port opened + + + + + Job done. +Time elapsed: %1 + + + + + PS: %1 + + + + + AS: %1 + + + + + F/S: %1 / %2 + + + + + Error message(s) received: + + + + + + Serial port error + + + + + Buffer: %1 / %2 / %3 + + + + + File sending in progress. Terminate and exit? + + + + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) + + + + + + + Heightmap files (*.map) + + + + + Opening file... + + + + + + Can't open file: + + + + + + Following commands will be sent before selected line: + + + + + + Skip + + + + + + + (%1) + + + + + Delete lines? + + + + + Updating... + + + + + Untitled + + + + + + + Save file as + + + + + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) + + + + + (%1/%2/%3) + + + + + (%1/%2) + + + + + C + + + + + Changing grid settings will reset probe data. Continue? + + + + + Applying heightmap... + + + + + Subdividing segments... + + + + + Updating Z-coordinates... + + + + + Modifying G-code program... + + + + + frmSettings + + + Settings + + + + + Connection + + + + + Port: + + + + + ... + + + + + Baud: + + + + + + 9600 + + + + + 14400 + + + + + 19200 + + + + + 38400 + + + + + 57600 + + + + + 115200 + + + + + Sender + + + + + Ignore error responses + + + + + Automatically set parser state before sending from selected line + + + + + Machine information + + + + + Status query period: + + + + + mm + + + + + inch + + + + + Units: + + + + + Rapid speed: + + + + + Acceleration: + + + + + + max.: + + + + + Spindle speed min.: + + + + + Laser power min.: + + + + + Control + + + + + Probe commands: + + + + + + + + + + Command 1; command 2; ... + + + + + Safe position commands: + + + + + "Restore origin" moves tool in: + + + + + Plane + + + + + Space + + + + + + User commands + + + + + Button 1: + + + + + Button 2: + + + + + Button 3: + + + + + Button 4: + + + + + + Heightmap + + + + + Heightmap probing feed: + + + + + Parser + + + + + Arc approximation segment size: + + + + + by length + + + + + by angle (deg.) + + + + + + Visualizer + + + + + Z-buffer + + + + + MSAA + + + + + Line width: + + + + + FPS lock: + + + + + 30 + + + + + 60 + + + + + 120 + + + + + Program draw mode: + + + + + Vectors + + + + + Raster + + + + + By 'Z'-code + + + + + By 'S'-code + + + + + Grayscale segments + + + + + Simplify geometry + + + + + Precision: + + + + + V-sync + + + + + Smoothing + + + + + Tool model + + + + + Type: + + + + + Diameter: + + + + + Flat + + + + + Conic + + + + + Angle: + + + + + Length: + + + + + Console + + + + + Show G-code program commands + + + + + Show UI commands + + + + + Command auto-completion + + + + + Panels + + + + + Jog + + + + + Spindle + + + + + Overriding + + + + + Colors + + + + + Z-movement: + + + + + Toolpath + + + + + Background: + + + + + Highlight: + + + + + Start point: + + + + + End point: + + + + + Text: + + + + + Tool: + + + + + Drawn: + + + + + Normal: + + + + + Font + + + + + Size: + + + + + + 8 + + + + + 9 + + + + + 10 + + + + + 11 + + + + + 12 + + + + + pt + + + + + (restart needed) + + + + + Set to defaults + + + + + OK + + + + + Cancel + + + + + Reset settings to default values? + + + + diff --git a/src/translations/candle_es.ts b/src/translations/candle_es.ts index f4681095..a4ae6b3a 100644 --- a/src/translations/candle_es.ts +++ b/src/translations/candle_es.ts @@ -62,7 +62,7 @@ GLWidget - + Vertices: %1 Vertices: %1 @@ -115,257 +115,225 @@ GRBL Control - - + G-code program Programa de G-Code - + Isometric view Vista isometrica - + Top view Vista superior - + Front view Vista Frontal - + Left view Vista izquierda - + Fit Ajustar vista - Heightmap settings - Ajuste de alturas + Ajuste de alturas - + Border: Bordes: - - - + + + X: X: - + H: - - - + + + Y: Y: - + W: - + Show border Mostrar borde - + Auto - + Probe grid: Grilla de medición: - + Zb: Zн: - + Zt: Zв: - Show grid - Mostrar grilla + Mostrar grilla - + Interpolation grid: Grilla de interpolación: - + Type: Tipo: - + Bicubic Bicubico - Show - Mostrar + Mostrar - - Check mode - Modo de prueba + Modo de prueba - - Autoscroll - Desplazamiento automático + Desplazamiento automático - - - - - + + + + + Open Abrir - - + + Reset Reiniciar - - + + Send Enviar - + Pause Pausar - - - - + + + + Abort Abandono - + State Estado - + Work coordinates: Coordenadas de trabajo: - - - X - - - - - - - - - 0 - 0 - - - - - Y - - - - - - Z - + 0 - + Machine coordinates: Coordenadas de máquina: - + Status: Estado: - + Control Control - - + + Home Origen - - - - - - - - - + + + + + + + + + ... ... - + Z-probe Medicion de Z - + Zero XY Cero XY - + Zero Z Cero Z - - - + + + Overriding @@ -383,72 +351,71 @@ - + Restore origin Restaure el origen - + Safe position Posición segura - + Unlock Desbloquear - - + + Heightmap Mapa de alturas - + Use heightmap Usar mapa de alturas - + Map: Mapa: - + Absent Ausente - + Create Crear - Edit mode - Modo edición + Modo edición - - - - - - + + + + + + Spindle Husillo - + Speed: Velocidad: - - - - - + + + + + Spindle on/off Husillo on/off @@ -465,45 +432,45 @@ % - - - - + + + + Jog Control manual - + X- - + Y- - + X+ - + Y+ - + Step: Pasos: - + Z+ - + Z- @@ -512,7 +479,7 @@ Presets: - + User commands @@ -529,305 +496,383 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 - + + Program + + + + + &View + + + + + &Windows + + + + + Modification + + + + + Edit + + + + + Show probe grid + + + + + Show interpolation grid + + + + + Device + + + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - + Keyboard control Control desde teclado - + + Visualizer + Visualizador + + + Console Consola - + Send command Enviar comando - + Clear console Limpiar cosola - + + &Device + + + + + &Modification + + + + + &Visualizer + + + + + &Console + + + + &File &Archivo - + &Recent files &Archivos recientes - + &Service &Servicio - + &Help &Ayuda - + + _spacerTop + + + + + _spacerLeft + + + + + _spacerRight + + + + &Open &Abrir - + E&xit S&alir - + &Settings &Opciones - + &New &Nuevo - + &Save &Guardar - + Save &as... Guardar &como... - + &About &Acerca de - + &Clear &Limpiar - + Save &transformed as... Salve &transformado como... - + Idle Listo - + Alarm Alarma - + Run Iniciar - - + + Hold Parada - + Queue En cola - - - - + + Check Chequeo - + Door Puerta - + Unknown Desconocido - + Send from current line - + Feed rate: - + Rapid speed: Velocidad de aproximación: - + Spindle speed: - + &Insert line &Insertar linea - + &Delete lines &Borrar lineas - + Don't show again - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -838,38 +883,38 @@ %1, %2, %3 - + G-code program file was changed. Save? El programa de G-code ha cambiado. Desea guardar? - + Heightmap file was changed. Save? El programa mapa de alturas ha cambiado. Desea guardar? - + Not connected Sin Conexión - + Probe Medición - + Opening file... - + Updating... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Archivos de G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -878,7 +923,7 @@ Conectado - + Job done. Time elapsed: %1 Trabajo terminado. @@ -889,18 +934,17 @@ Tiempo transcurrido: %1 Procesado - + Serial port error Error en puerto serie - - + Scroll Desplazamiento - + File sending in progress. Terminate and exit? Envio de archivo en progreso. Detener y salir? @@ -917,33 +961,33 @@ Tiempo transcurrido: %1 Archivos de G-Code (*.nc *.ncc *.tap *.txt) - - - + + + Heightmap files (*.map) Mapa de alturas (*.map) - + Port opened Puerto se abrió - - + + Restore origin: %1, %2, %3 Restaure origen: %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Archivos de G-Code (*.nc *.ncc *.ngc *.tap *.txt);;Todos los archivos (*.*) - - + + Can't open file: No se puede abrir el archivo: @@ -958,26 +1002,26 @@ Tiempo transcurrido: %1 Enviado - + Delete lines? Borrar lineas? - - - + + + (%1) - + Untitled Sin-título - - - + + + Save file as Guardar archivo como @@ -986,7 +1030,7 @@ Tiempo transcurrido: %1 Archivos de G-Code (*.nc;*.ncc;*.tap) - + Changing grid settings will reset probe data. Continue? El cambio de configuraciones de grilla reiniciará los datos de medición. Desea continuar? @@ -999,53 +1043,53 @@ Tiempo transcurrido: %1 Opciones - + Connection Conexión - + Port: Puerto: - + ... - + Baud: Baud: - - + + 9600 - + 14400 - + 19200 - + 38400 - + 57600 - + 115200 @@ -1062,23 +1106,23 @@ Tiempo transcurrido: %1 Seguridad en Z: - + Rapid speed: Velocidad de aproximación: - + Acceleration: Aceleración: - + Spindle speed min.: Velocidad mínima de husillo: - - + + max.: max.: @@ -1087,17 +1131,17 @@ Tiempo transcurrido: %1 Comandos de medición de Z: - - - - - - + + + + + + Command 1; command 2; ... Comando 1; Comando 2; ... - + Heightmap probing feed: Avance de medición de mapa de alturas: @@ -1114,7 +1158,7 @@ Tiempo transcurrido: %1 Imperial - + Parser Analizador @@ -1123,28 +1167,28 @@ Tiempo transcurrido: %1 Largo de segmento de aporximación de arco: - - + + Visualizer Visualizador - + Line width: Espesor de linea: - + Smoothing Suavizado - + MSAA MSAA - + Simplify geometry Simplificar geometria @@ -1153,27 +1197,27 @@ Tiempo transcurrido: %1 Largo de segmento: - + FPS lock: Bloqueo de FPS: - + 30 - + 60 - + 120 - + Z-buffer @@ -1182,68 +1226,68 @@ Tiempo transcurrido: %1 Represeantación gráfica de herramienta - + Type: Tipo: - + Diameter: Diametro: - + Flat Plana - + Conic Cónica - + Angle: Ángulo: - + Length: Largo: - + Console Consola - + Show G-code program commands Mostrar comandos de programa G-Code - + Show UI commands Mostrar comandos de interfaz del usuario - + Command auto-completion Auto-completar comandos - + Panels Paneles - - + + Heightmap Mapa de altura - + Units: Unidades: @@ -1252,62 +1296,62 @@ Tiempo transcurrido: %1 Avance - + Spindle Husillo - + Jog Control manual - + Sender - + Ignore error responses - + Automatically set parser state before sending from selected line - + Colors Color - + Z-movement: Movimiento en Z: - + Normal: Normal: - + Toolpath Recorrido de herramienta - + by length Por longitud - + Drawn: Dibujo: - + Background: Fondo: @@ -1320,229 +1364,229 @@ Tiempo transcurrido: %1 Unidades de medida de la aplicación: - + Machine information Información de la máquina - + Status query period: Período de la pregunta de estado: - + mm - + inch - + Laser power min.: - + Control Control - + Probe commands: Órdenes de sonda: - + Safe position commands: Órdenes de posición segura: - + "Restore origin" moves tool in: «Restaure el origen» mueve el instrumento al: - + Plane Avión - + Space Espacio - - + + User commands - + Button 1: - + Button 2: - + Button 3: - + Button 4: - + Arc approximation segment size: Talla de segmento de aproximación del arco: - + by angle (deg.) Por ángulo - + Program draw mode: - + Vectors - + Raster - + By 'Z'-code - + By 'S'-code - + Grayscale segments - + Precision: Precisión: - + V-sync - + Tool model Herramientas modelo - + Overriding - + Highlight: Resaltado: - + Start point: Origen: - + End point: Punto final: - + Text: Texto: - + Tool: Herramienta: - + Font Fuente - + Size: Tamaño: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt Puntos - + (restart needed) (Se requiere reinicio) - + Set to defaults Opciones por defecto - + OK ОК - + Cancel Cancelar diff --git a/src/translations/candle_fr.ts b/src/translations/candle_fr.ts index e76e52cb..337a376a 100644 --- a/src/translations/candle_fr.ts +++ b/src/translations/candle_fr.ts @@ -62,7 +62,7 @@ GLWidget - + Vertices: %1 Vertices: %1 @@ -115,257 +115,225 @@ grblControl - - + G-code program Programme G-Code - + Isometric view Vue isometrique - + Top view Vue de dessus - + Front view Vue de Face - + Left view Vue de gauche - + Fit Ajuster vue - Heightmap settings - Paramètres palpage surfacique + Paramètres palpage surfacique - + Border: Bords: - - - + + + X: X: - + H: - - - + + + Y: Y: - + W: - + Show border Montrer bord - + Auto - + Probe grid: Grille de palpage: - + Zb: Zb: - + Zt: Zt: - Show grid - Montrer grille + Montrer grille - + Interpolation grid: Espacement grille: - + Type: Type: - + Bicubic Bicubique - Show - Montrer + Montrer - - Check mode - Simulation d'usinage + Simulation d'usinage - - Autoscroll - Défilement auto + Défilement auto - - - - - + + + + + Open Ouvrir - - + + Reset Reinitialiser - - + + Send Envoyer - + Pause Pause - - - - + + + + Abort Abandon - + State Etât - + Work coordinates: Coordonnées de travail: - - - X - - - - - - - - - 0 - 0 - - - - - Y - - - - - - Z - + 0 - + Machine coordinates: Coordonnées machine: - + Status: Etât: - + Control Contrôle - - + + Home Origine - - - - - - - - - + + + + + + + + + ... ... - + Z-probe Palper Z - + Zero XY Zero XY - + Zero Z Zero Z - - - + + + Overriding @@ -383,72 +351,71 @@ - + Restore origin Restituez l'origine - + Safe position Position sûre - + Unlock Desbloquer - - + + Heightmap Palpage surfacique - + Use heightmap Utiliser palpage surfacique - + Map: Fichier: - + Absent Absent - + Create Créer - Edit mode - Paramètres de palpage + Paramètres de palpage - - - - - - + + + + + + Spindle Broche - + Speed: Vitesse: - - - - - + + + + + Spindle on/off Broche on/off @@ -465,45 +432,45 @@ % - - - - + + + + Jog Contrôle manuel - + X- - + Y- - + X+ - + Y+ - + Step: Pas: - + Z+ - + Z- @@ -512,7 +479,7 @@ Pre-selection: - + User commands @@ -529,305 +496,383 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 - + + Program + + + + + &View + + + + + &Windows + + + + + Modification + + + + + Edit + + + + + Show probe grid + + + + + Show interpolation grid + + + + + Device + + + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - + Keyboard control Contrôle avec le clavier - + + Visualizer + Apparence + + + Console Console - + Send command Envoyer commande - + Clear console Effacer consôle - + + &Device + + + + + &Modification + + + + + &Visualizer + + + + + &Console + + + + &File &Fichier - + &Recent files &Fichiers recents - + &Service &Paramètres - + &Help &Aide - + + _spacerTop + + + + + _spacerLeft + + + + + _spacerRight + + + + &Open &Ouvrir - + E&xit Q&uitter - + &Settings &Reglages - + &New &Nouveau - + &Save &Enregistrer - + Save &as... Enregistrer &sous... - + &About &A propos de - + &Clear &Effacer - + Save &transformed as... Sauvez &transformé comme... - + Idle Idle - + Alarm Alarme - + Run Demarrer - - + + Hold Stop - + Queue En attente - - - - + + Check Vérifié - + Door Porte - + Unknown Inconnu - + Send from current line - + Feed rate: - + Rapid speed: Vitesse d'approche: - + Spindle speed: - + &Insert line &Inserer ligne - + &Delete lines &Effacer ligne - + Don't show again - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -838,22 +883,22 @@ %1, %2, %3 - + G-code program file was changed. Save? Le programme G-code à changé. Sauvegarder? - + Heightmap file was changed. Save? Le fichier surface de palpage a changé. Sauvegarder? - + Not connected Non connecté - + Probe Palper @@ -862,7 +907,7 @@ Connecté - + Job done. Time elapsed: %1 Travail terminé. @@ -873,18 +918,17 @@ Temps écoulé: %1 Traité - + Serial port error Erreur port serie - - + Scroll Déplacement - + File sending in progress. Terminate and exit? Envoi de fichier en cours. Terminer et Sortir? @@ -893,38 +937,38 @@ Temps écoulé: %1 Envoyé - - - + + + Heightmap files (*.map) Fichier de palpage (*.map) - - + + Restore origin: %1, %2, %3 Restituez l'origine: %1, %2, %3 - + Port opened Le port s'est ouvert - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) G-Code fichiers (*.nc *.ncc *.ngc *.tap *.txt);;Tous les fichiers (*.*) - + Opening file... - - + + Can't open file: Impossible d'ouvrir du fichier: @@ -939,42 +983,42 @@ Temps écoulé: %1 Envoyé - + Delete lines? Effacer ligne? - + Updating... - - - + + + (%1) - + Untitled Sans titre - - - + + + Save file as Enregistrer le fichier sous - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) G-Code fichiers (*.nc *.ncc *.ngc *.tap *.txt) - + Changing grid settings will reset probe data. Continue? Changer les paramètres de la grille, réinitialise les données de palpage. Continuer? @@ -987,53 +1031,53 @@ Temps écoulé: %1 Paramètres - + Connection Connexion - + Port: Port: - + ... - + Baud: Baud: - - + + 9600 - + 14400 - + 19200 - + 38400 - + 57600 - + 115200 @@ -1050,23 +1094,23 @@ Temps écoulé: %1 Securite Z: - + Rapid speed: Vitesse d'approche: - + Acceleration: - + Spindle speed min.: Vitesse broche min.: - - + + max.: max.: @@ -1075,17 +1119,17 @@ Temps écoulé: %1 Commande de palpage Z: - - - - - - + + + + + + Command 1; command 2; ... Commande 1; Commande 2; ... - + Heightmap probing feed: Avance lors du palpage: @@ -1102,7 +1146,7 @@ Temps écoulé: %1 Imperial - + Parser Analyseur @@ -1111,28 +1155,28 @@ Temps écoulé: %1 Largeur de segment des arcs: - - + + Visualizer Apparence - + Line width: Espaisseur de ligne: - + Smoothing Lissage - + MSAA MSAA - + Simplify geometry Simplifier la geometrie @@ -1141,27 +1185,27 @@ Temps écoulé: %1 Largeur de segment: - + FPS lock: Bloquer FPS: - + 30 - + 60 - + 120 - + Z-buffer @@ -1170,68 +1214,68 @@ Temps écoulé: %1 Représentation de l'outil - + Type: - + Diameter: Diamètre: - + Flat Plat - + Conic Conique - + Angle: - + Length: Longueur: - + Console Console - + Show G-code program commands Montrer commande du programme G-Code - + Show UI commands Montrer les commandes de l'interface utilisateur - + Command auto-completion Commande Saisie auto - + Panels Panneaux de contrôle - - + + Heightmap Palpage surfacique - + Units: Unités: @@ -1240,62 +1284,62 @@ Temps écoulé: %1 Avance - + Spindle Broche - + Jog Contrôle manuel - + Sender - + Ignore error responses - + Automatically set parser state before sending from selected line - + Colors Couleurs - + Z-movement: Mouvement Z: - + Normal: Normal: - + Toolpath Parcours d'outil - + by length Par longueur - + Drawn: Dessin: - + Background: Fond: @@ -1308,229 +1352,229 @@ Temps écoulé: %1 Unités de mesure de l'application: - + Machine information Renseignements de machine - + Status query period: Période de question de statut: - + mm - + inch - + Laser power min.: - + Control Contrôle - + Probe commands: Commandes de sonde: - + Safe position commands: Commandes de position sûre: - + "Restore origin" moves tool in: "Restituez l'origine" déplace l'outil dans: - + Plane l'avion - + Space l'espace - - + + User commands - + Button 1: - + Button 2: - + Button 3: - + Button 4: - + Arc approximation segment size: Largeur de segment des arcs: - + by angle (deg.) Par Angle - + Program draw mode: - + Vectors - + Raster - + By 'Z'-code - + By 'S'-code - + Grayscale segments - + Precision: Precisión: - + V-sync - + Tool model Modèle de l'outil - + Overriding - + Highlight: Souligner: - + Start point: Origine: - + End point: Point final: - + Text: Texte: - + Tool: Outil: - + Font Ecriture - + Size: Taille: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt Points - + (restart needed) (Redémarrage nécessaire) - + Set to defaults Paramètres par default - + OK ОК - + Cancel Annuler diff --git a/src/translations/candle_pt.ts b/src/translations/candle_pt.ts index 2b01ac5d..a060c38f 100644 --- a/src/translations/candle_pt.ts +++ b/src/translations/candle_pt.ts @@ -62,7 +62,7 @@ GLWidget - + Vertices: %1 Vertices: %1 @@ -115,257 +115,225 @@ Controle GRBL - - + G-code program Programa de G-Code - + Isometric view Vista isométrica - + Top view Vista Superior - + Front view Vista Frontal - + Left view Vista Esquerda - + Fit Ajustar vista - Heightmap settings - Ajuste de alturas + Ajuste de alturas - + Border: Bordas: - - - + + + X: X: - + H: H: - - - + + + Y: Y: - + W: W: - + Show border Mostrar borda - + Auto - + Probe grid: Grade de medição: - + Zb: Zн: - + Zt: Zв: - Show grid - Mostrar grade + Mostrar grade - + Interpolation grid: Grade de interpolação: - + Type: Tipo: - + Bicubic Bicúbico - Show - Mostrar + Mostrar - - Check mode - Modo de verificação + Modo de verificação - - Autoscroll - Rolagem automática + Rolagem automática - - - - - + + + + + Open Abrir - - + + Reset Reiniciar - - + + Send Enviar - + Pause Pausar - - - - + + + + Abort Abortar - + State Estado - + Work coordinates: Coordenadas de trabalho: - - - X - - - - - - - - - 0 - 0 - - - - - Y - - - - - - Z - + 0 - + Machine coordinates: Coordenadas da máquina: - + Status: Estado: - + Control Controle - - + + Home Origem - - - - - - - - - + + + + + + + + + ... ... - + Z-probe Medição de Z - + Zero XY Zero XY - + Zero Z Zero Z - - - + + + Overriding @@ -383,72 +351,71 @@ - + Restore origin Restaure a origem - + Safe position Posição segura - + Unlock Desbloquear - - + + Heightmap Mapa de alturas - + Use heightmap Usar mapa de alturas - + Map: Mapa: - + Absent Ausente - + Create Criar - Edit mode - Modo edição + Modo edição - - - - - - + + + + + + Spindle Spindle - + Speed: Velocidade: - - - - - + + + + + Spindle on/off Spindle on/off @@ -465,45 +432,45 @@ % - - - - + + + + Jog Controle manual - + X- - + Y- - + X+ - + Y+ - + Step: Passos: - + Z+ - + Z- @@ -512,7 +479,7 @@ Presets: - + User commands @@ -529,305 +496,383 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 - + + Program + + + + + &View + + + + + &Windows + + + + + Modification + + + + + Edit + + + + + Show probe grid + + + + + Show interpolation grid + + + + + Device + + + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - + Keyboard control Controle por teclado - + + Visualizer + Visualizador + + + Console Console - + Send command Enviar comando - + Clear console Limpar cosole - + + &Device + + + + + &Modification + + + + + &Visualizer + + + + + &Console + + + + &File &Arquivo - + &Recent files &Arquivos recentes - + &Service &Serviço - + &Help &Ajuda - + + _spacerTop + + + + + _spacerLeft + + + + + _spacerRight + + + + &Open &Abrir - + E&xit S&air - + &Settings &Opções - + &New &Novo - + &Save &Salvar - + Save &as... Salvar &como... - + &About &Sobre - + &Clear &Limpar - + Save &transformed as... Salvar &transformado como... - + Idle Inativo - + Alarm Alarme - + Run Iniciar - - + + Hold Manter - + Queue Em fila - - - - + + Check Checar - + Door Porta - + Unknown Desconhecido - + Send from current line - + Feed rate: - + Rapid speed: Velocidade de aproximação: - + Spindle speed: - + &Insert line &Inserir linha - + &Delete lines &Apagar linhas - + Don't show again - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -838,38 +883,38 @@ %1, %2, %3 - + G-code program file was changed. Save? O programa G-code foi alterado. Deseja salvar? - + Heightmap file was changed. Save? O arquivo mapa de alturas foi alterado. Deseja salvar? - + Not connected Sem Conexão - + Probe Medição - + Opening file... - + Updating... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Arquivos G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -878,7 +923,7 @@ Conectado - + Job done. Time elapsed: %1 Trabalho terminado. @@ -889,18 +934,17 @@ Tempo transcorrido: %1 Processado - + Serial port error Erro na porta serial - - + Scroll Rolagem - + File sending in progress. Terminate and exit? Envio de arquivo en progreso. Terminar e sair? @@ -917,33 +961,33 @@ Tempo transcorrido: %1 Arquivos G-Code (*.nc *.ncc *.tap *.txt) - - - + + + Heightmap files (*.map) Mapa de alturas (*.map) - + Port opened Porta aberta - - + + Restore origin: %1, %2, %3 Restaure origem: %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Arquivos G-Code (*.nc *.ncc *.tap *.txt);;Todos os arquivos (*.*) - - + + Can't open file: Não foi possível abrir o arquivo: @@ -958,26 +1002,26 @@ Tempo transcorrido: %1 Enviado - + Delete lines? Apagar linhas? - - - + + + (%1) - + Untitled Sem-título - - - + + + Save file as Salvar arquivo como @@ -986,7 +1030,7 @@ Tempo transcorrido: %1 Arquivos G-Code (*.nc;*.ncc;*.tap) - + Changing grid settings will reset probe data. Continue? A alteração nas configurações de grade reiniciará os dados de medição. Deseja continuar? @@ -999,53 +1043,53 @@ Tempo transcorrido: %1 Opções - + Connection Conexão - + Port: Porta: - + ... - + Baud: Baud: - - + + 9600 - + 14400 - + 19200 - + 38400 - + 57600 - + 115200 @@ -1062,23 +1106,23 @@ Tempo transcorrido: %1 Segurança em Z: - + Rapid speed: Velocidade de aproximação: - + Acceleration: Aceleração: - + Spindle speed min.: Velocidade mínima do Spindle: - - + + max.: max.: @@ -1087,17 +1131,17 @@ Tempo transcorrido: %1 Comandos de medição de Z: - - - - - - + + + + + + Command 1; command 2; ... Comando 1; Comando 2; ... - + Heightmap probing feed: Avanço de medição de mapa de alturas: @@ -1114,7 +1158,7 @@ Tempo transcorrido: %1 Imperial - + Parser Analizador @@ -1123,28 +1167,28 @@ Tempo transcorrido: %1 Tamanho do segmento de aproximação de arco: - - + + Visualizer Visualizador - + Line width: Largura da linha: - + Smoothing Suavizado - + MSAA MSAA - + Simplify geometry Simplificar geometria @@ -1153,27 +1197,27 @@ Tempo transcorrido: %1 Tamanho de segmento: - + FPS lock: Bloqueio de FPS: - + 30 - + 60 - + 120 - + Z-buffer @@ -1182,63 +1226,63 @@ Tempo transcorrido: %1 Representação gráfica de ferramenta - + Type: Tipo: - + Diameter: Diâmetro: - + Flat Plana - + Conic Cônica - + Angle: Ângulo: - + Length: Largura: - + Console Console - + Show G-code program commands Mostrar comandos de programa G-Code - + Show UI commands Mostrar comandos de interfce do usuário - + Command auto-completion Autocompletar comandos - + Panels Painéis - - + + Heightmap Mapa de altura @@ -1247,62 +1291,62 @@ Tempo transcorrido: %1 Avanço - + Spindle - + Jog Controle manual - + Sender - + Ignore error responses - + Automatically set parser state before sending from selected line - + Colors Cores - + Z-movement: Movimento em Z: - + Normal: Normal: - + Toolpath Caminho da ferramenta - + by length por tamanho - + Drawn: Desenhado: - + Background: Fundo: @@ -1315,234 +1359,234 @@ Tempo transcorrido: %1 Unidades de medição da aplicação: - + Machine information Informação sobre máquina - + Status query period: Período de pergunta de posição: - + mm - + inch - + Units: Unidades: - + Laser power min.: - + Control Controle - + Probe commands: Ordens de tenta: - + Safe position commands: Ordens de posição segura: - + "Restore origin" moves tool in: "Restaure a origem" move o instrumento para o: - + Plane Avião - + Space Espaço - - + + User commands - + Button 1: - + Button 2: - + Button 3: - + Button 4: - + Arc approximation segment size: Tamanho de segmento de aproximação de arco: - + by angle (deg.) por ângulo - + Program draw mode: - + Vectors - + Raster - + By 'Z'-code - + By 'S'-code - + Grayscale segments - + Precision: Precisión: - + V-sync - + Tool model Modelo da ferramenta - + Overriding - + Highlight: Realçado: - + Start point: Origem: - + End point: Ponto final: - + Text: Texto: - + Tool: Ferramenta: - + Font Fonte - + Size: Tamanho: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt - + (restart needed) (Requer reinicio) - + Set to defaults Opções padrão - + OK ОК - + Cancel Cancelar diff --git a/src/translations/candle_ru.qm b/src/translations/candle_ru.qm index 7546d6927253d1ef2225667f18ca448df77c1185..cf8a5bbbd77c6746527c8286a42e1753a6f8ffed 100644 GIT binary patch delta 2740 zcmai!d2mzL6~>RG`?NegN!}OX7_YL8yhwOo!5cQl9u@}!3e#e+j79N+ZE#E(M9Wfe zD9b#YAz&a-f`O725H?;YOM(feN!%$ei)R2sNkhSL0)b8kLg*)}7fH zz2`gMx!<=*dJaf-c-dzWQ79hg&rGD92quEvU<#4x3YZFh4dxQLPa={{#dwB`aZ|u- zqPTJ}2RsHY!hEcit;4(<;0}BrCSpBA`m01-I+1Foi}v&Mik%;q9g%Rh`kC2ZNx>)CQ45v&XkY9w}?wgBMQ7qTqO=V zahSNaJfg565b-4Ii96)nKNSKmB8vPcDcEi()k+~p?WnD)o+kYTfz?ElMsQ-ak&Mnj zf;$;^_kml;IDkwwQIybx@wib+=mSljlyuff3#A-$(oO~M?;_G=gO?H4mkRDNB*>^R z5((*!Q{j71EPR-&LwG%pevW}KpV zHjHOHqIsvZzju9tjm5$mZKjb^B-J{Tu7D^X~_H{ zSq2a%cLBX)eF=U}_JwjRj5hvO`dk`w@i0oWR~kEr z_`z>n%pA2#t@UoUVi)-%JfR_ZAE~b z0a@NgXDQap3h$t%#t_+ptLPAYv}|v`2T}e8*}jpVp)=}bU5YP}pgZ&JLPC?HS#*XD zO0Q?88R#;9`vX?_$*)iwPgc{=kIXe}RUmqELO5%7nnzd9Havhr=4!SrghS0n*zW1) z&^nLV?it}w-~>C8B;v{lU`M+kx#w+mVgM!Zn#H=d;h@QB>^u+Ul1kYf2|T4f%-)AL({+;@q$WSYn$w!gt zS-G&&0uKz!10I0^qCDbS6C|#Yr+1-rlUB=@RO9l=eJx+ssel=KN+4SyU~Te}j$RaWTVPwZ8!irW#fKU!caqdDV5}eq2be zR3jJR{t2gfVLvv?^yPzAJ%qFu_=*&UZYk%jN1&KzqKip8dF#=QFmEw$?Z)-%dC0}2 zD}3FIl_BM!S+ocL;Y?)eTgx9kmxlJ+&Yu|QK%md~ZuK@u ze4oFNvjndHrHgrO{2d7n82DVxn$dpQX0`vFm+;05^|Il`xVYx1o9_={pBnXM=eO~+ zi}^WfduLG#ZlpEp&Z0fwSrD1UKLdME`xy17JK)}somjlaDTX<`FbtJg&fW3CV0b3rDbPIp^RPB zy7%42#dA@cKf4)iw^Ca;2qnC$wM`=qX|l- zF4dLxL6N{Z-M!biko1pTOzF`5a2tt)&OluYvSe_FG}uQ8kQ|RB6rDl3f?UThl*v5j zMh2!APwKs;N`v@X?nht4t9Z+!!{mp_ z0hpG+Qdl0IG-hJcz?tLIHHMPf3R|UZNqM8Kw#Ko>bB+W}M@lU8z{G^{iJYNK{Lthj z)0075RvetBHk8>KR+cZft+v)XPpzn|uP!OK)kvI4@mL;+-7=YJJb=X#9JE6#d`{}%fa_lHU;z2*~~FzQ^xc4Ev>3;3bNHSTI=g-mygLSnqz(5`pLMW r#b56=9zr)3qOQJnvDIOY-OfZ?u~~FX-YPDPw}{u{EsmmuDE)r`H`R%g delta 2479 zcmYL~3se;6702(+ezVKY&h8>_S0ISI1c3#4E^m>_}f+EJcNz{ZG zN+bhf5Y$*JXp&RNCdk7=Dv}m$(pF84^oYjTY7k>IZBCAY_P=hA;T~4@7(%k?J`cjiL-9F#}2 zdK-9?xKI8_q>d(em{rk}Bu}%($t8K7l^aPuZZM#D4N2n%4@VMe|08J@f^?Bi?^Gkx@asAsz9)CO*bUmUrf5==;!wIY>=y=J3S&!MmxAdgpo7K&??^^`-TlkJ_JWq_}J0AI9{$(Qnn?o-U z`IPdJU!Td-2DfabZ z9DI8e2le>a=n@onw?B{jN+o-A5K(wc6}q$u-KUH&YlbkOZi2+`2_vbcc)r-i zv}!f0$CxE^>bX}Qzzd(N>%WQSlb>`FtGAMcWwgrns&b2f7)>+W$1e14qTK zVkjcZ5xaIAL9gw^!9JKVZ9*Kp3+csFaYzOxo;Hg%Gi?*6z0pf;kN8-oM}}=0?~S=I z<+vu)F$C@o)Wlzd)ZX_s8LeNzY<`;ZPMFMNKx1BymL%=ad?H>zz*jVrx8QbRndaIi zAMBs2xw!++)h(Lu-$3sjOSE&wF5^4WtW95Dk7;_gQ=54a3OKcD>!zpS(igRplU4YS z_^r+{6YHU~x*!9TiHXtWjX?pAA9Pn|@nO+B*cknWZssx)_bx=Aexb8e+2smSj}w#b zJETeL9gkY_oKj@cDp##!bn%qQq+C~bOQFklE>zF#SvX5&i7bgF@eM zWX;JnPx9)&SBXnnT}V(#i-kCo7beyUvrYM3^{P(UZ&QNL-q%mzL(ph5G*j1gli9 diff --git a/src/translations/candle_ru.ts b/src/translations/candle_ru.ts index 73d0a238..6b1f7422 100644 --- a/src/translations/candle_ru.ts +++ b/src/translations/candle_ru.ts @@ -74,7 +74,7 @@ Сегменты: %1 - + Vertices: %1 Вершины: %1 @@ -139,139 +139,131 @@ frmMain - - + G-code program G-code программа - + Isometric view Изометрия - + Top view Вид сверху - + Front view Вид спереди - + Left view Вид слева - + Fit Вписать - Heightmap settings - Настройки карты высот + Настройки карты высот - + Border: Границы: - - - + + + X: - + H: В: - + W: Ш: - - - + + + Y: - + Auto Авто - + Show border Показать границы - + Probe grid: Сетка зондирования: - + Zb: Zн: - + Zt: Zв: - Show grid - Показать сетку + Показать сетку - + Interpolation grid: Сетка интерполяции: - + Type: Тип: - + Bicubic Бикубический - Show - Отобразить + Отобразить - - Check mode - Режим проверки + Режим проверки - - Autoscroll - Автопрокрутка + Автопрокрутка - + State Состояние - + Control Управление @@ -284,18 +276,18 @@ Восстановить XYZ - + &Recent files &Недавние файлы - + &Open &Открыть - - + + Send Отправить @@ -308,56 +300,46 @@ Автопрокрутка - - + + Reset Сброс - + Pause Пауза - + Work coordinates: Рабочие координаты: - - - - - - - 0 - - - - + Machine coordinates: Машинные координаты: - + Status: Статус: - + Not connected Нет соединения - - - - - - - - - + + + + + + + + + ... @@ -366,12 +348,12 @@ Поиск стола - + Zero XY Обнулить XY - + Zero Z Обнулить Z @@ -380,7 +362,7 @@ Вернуться в XY(Z) - + Z-probe Z-щуп @@ -389,62 +371,61 @@ Безопасная Z - + Unlock Разблокировать - - + + Heightmap Карта высот - + Use heightmap Использовать карту высот - + Map: Карта: - + Absent Отсутствует - + Create Создать - Edit mode - Редактирование + Редактирование - - - - - - + + + + + + Spindle Шпиндель - + Speed: Скорость: - - - - - + + + + + Spindle on/off Вкл/выкл шпиндель @@ -457,20 +438,20 @@ Переопределить: - - - - + + + + Jog Перемещение - + Step: Шаг: - + X- @@ -480,52 +461,52 @@ - - - - + + + + Abort Прервать - + Restore origin Восстановить СК - + Safe position Безопасное положение - - - + + + Overriding Коррекция - + Y- - + X+ - + Y+ - + Z+ - + Z- @@ -534,326 +515,386 @@ Уставки: - - - X - - - - - - Y - - - - - - Z - - - - + User commands Команды - + Stop Стоп - + Continuously Непрерывно - + 0.01 - + 0.1 - + 1 - + 5 - - + + 10 - - + + 100 - + Feed: Подача: - + 500 - + 50 - + 1000 - + 2000 - + Keyboard control Управление с клавиатуры - + Console Консоль - + Send command Отправить команду - + Clear console Очистить консоль - + &File &Файл - + + Program + Программа + + + &Service &Сервис - + &Help С&правка - + + &View + &Вид + + + + &Windows + &Окна + + + + Modification + Модификация + + + + Edit + Редактирование + + + + Show probe grid + Показать сетку зондирования + + + + Show interpolation grid + Показать сетку интерполяции + + + + Device + Устройство + + + + Visualizer + Визуализатор + + + + _spacerTop + + + + + _spacerLeft + + + + + _spacerRight + + + + E&xit Вы&ход - + &Settings &Настройки - + &New &Новый - + &Save &Сохранить - + Save &as... Сохранить &как... - + &About &О программе - + &Clear &Очистить - + Save &transformed as... Сохранить &преобразованный как... - + + &Device + &Устройство + + + + &Modification + &Модификация + + + + &Visualizer + &Визуализатор + + + + &Console + &Консоль + + + Idle Готов - + Alarm Тревога - + Run Работа - - + + Home Домой - - + + Hold Пауза - + Queue Пауза - - - - + + Check Проверка - + Door Дверь - + Unknown Неизвестно - + Send from current line Отправить с текущей строки - + Feed rate: Подача: - + Rapid speed: Холостой ход: - + Spindle speed: Шпиндель: - + &Insert line &Вставить строку - + &Delete lines &Удалить строки - + Don't show again Больше не показывать - + PS: %1 СВ: %1 - + AS: %1 СУ: %1 - + F/S: %1 / %2 П/Ш: %1 / %2 - + Error message(s) received: Ошибка(и) при передаче файла: - + Buffer: %1 / %2 / %3 Буфер: %1 / %2 / %3 - + Following commands will be sent before selected line: Следующие команды будут отправлены перед выбранной строкой: - + Skip Пропустить - + (%1/%2/%3) - + (%1/%2) - + C Н - + Applying heightmap... Применяется карты высот... - + Subdividing segments... Разбиение отрезков... - + Updating Z-coordinates... Обновление Z-координат... - + Modifying G-code program... Правка G-код программы... @@ -864,23 +905,23 @@ %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Файлы G-Code (*.nc *.ncc *.ngc *.tap *.txt);;Все файлы (*.*) - + Opening file... Загрузка файла... - + Updating... Обновление... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Файлы G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -889,7 +930,7 @@ Файл был изменен. Сохранить? - + Job done. Time elapsed: %1 Задание выполнено. @@ -904,26 +945,25 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap *.txt);;Все файлы (*.*) - + Delete lines? Удалить строки? - - + Scroll Прокрутка - - + + Restore origin: %1, %2, %3 Восстановить СК: %1, %2, %3 - + File sending in progress. Terminate and exit? Идет процесс отправки файла. Прервать и выйти из программы? @@ -932,15 +972,15 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap);;Все файлы (*.*) - - - + + + Heightmap files (*.map) Файлы карт высот (*.map) - - + + Can't open file: Ошибка при открытии файла: @@ -951,14 +991,14 @@ Time elapsed: %1 Отправлена - - - + + + (%1) - + Untitled Без имени @@ -967,7 +1007,7 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap *.txt) - + Changing grid settings will reset probe data. Continue? Изменение сетки зондирования приведет к очистке табличных данных. Продолжить? @@ -976,22 +1016,22 @@ Time elapsed: %1 Подключен - + G-code program file was changed. Save? Файл G-code программы был изменен. Сохранить? - + Heightmap file was changed. Save? Файл карты высот был изменен. Сохранить? - + Probe Зонд - + Port opened Порт открыт @@ -1000,7 +1040,7 @@ Time elapsed: %1 Обработана - + Serial port error Ошибка последовательного порта @@ -1009,18 +1049,18 @@ Time elapsed: %1 Буфер/очередь: %1 / %2 - - - + + + Save file as Сохранить файл как - - - - - + + + + + Open Открыть @@ -1045,53 +1085,53 @@ Time elapsed: %1 Настройки - + Connection Соединение - + Port: Порт: - + ... - + Baud: Скорость: - - + + 9600 - + 14400 - + 19200 - + 38400 - + 57600 - + 115200 @@ -1104,12 +1144,12 @@ Time elapsed: %1 Единицы измерения приложения: - + Machine information Информация о станке - + Status query period: Период опроса: @@ -1118,37 +1158,37 @@ Time elapsed: %1 Единицы: - + Control Управление - + Probe commands: Команды щупа: - + Safe position commands: Команды безопасного положения: - + "Restore origin" moves tool in: Перемещение по "Восстановить СК" в: - + Plane Плоскости - + Space Пространстве - + Parser Парсер @@ -1157,165 +1197,165 @@ Time elapsed: %1 Точность аппроксимации дуг: - - + + Visualizer Визуализатор - + Line width: Толщина линий: - + Smoothing Сглаживание - + Precision: Точность: - + Sender Отправка файла - + Ignore error responses Игнорировать ошибки при отправке файла - + Automatically set parser state before sending from selected line Автоматически настраивать парсер перед отправкой с выбранной строки - + mm мм - + inch дюйм - + Laser power min.: Мощность лазера мин.: - - + + User commands Команды - + Button 1: Кнопка 1: - + Button 2: Кнопка 2: - + Button 3: Кнопка 3: - + Button 4: Кнопка 4: - + Program draw mode: Режим отрисовки: - + Vectors Векторный - + Raster Растр - + By 'Z'-code По 'Z'-коду - + By 'S'-code По 'S'-коду - + Grayscale segments Полутоновое окрашивание - + V-sync V-sync - + Tool model Модель фрезы - + Show UI commands Отображать команды интерфейса пользователя - + Overriding Коррекция - + Colors Цвета - + Normal: Основной: - + Toolpath Траектория - + Drawn: Выполненная: - + Tool: Фреза: - + Highlight: Подсветка: - + Z-movement: Z-перемещения: @@ -1324,22 +1364,22 @@ Time elapsed: %1 (Используется визуализатором и процедурой преобразования файлов в соответствии с картой высот) - + Start point: Начало: - + End point: Конец: - + Background: Фон: - + Arc approximation segment size: Размер сегментов, аппроксимирующих дуги: @@ -1348,7 +1388,7 @@ Time elapsed: %1 по длине (мм) - + by angle (deg.) по углу (градус) @@ -1361,58 +1401,58 @@ Time elapsed: %1 Длина сегмента (мм): - + Text: Текст: - + Font Шрифт - + Size: Размер: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt пт - + (restart needed) (необходим перезапуск) - + Set to defaults По умолчанию @@ -1421,12 +1461,12 @@ Time elapsed: %1 Линии - + MSAA - + Simplify geometry Упростить геометрию @@ -1439,17 +1479,17 @@ Time elapsed: %1 Команды Z-щупа: - - - - - - + + + + + + Command 1; command 2; ... Команда 1; Команда 2; ... - + Heightmap probing feed: Подача при снятии карты высот: @@ -1478,7 +1518,7 @@ Time elapsed: %1 Единицы измерения строки состояния: - + Units: Единицы: @@ -1495,12 +1535,12 @@ Time elapsed: %1 (используется визуализатором и процедурой преобразования файлов в соответствии с картой высот) - + Command auto-completion Автозавершение команды - + Z-buffer Буфер глубины @@ -1513,18 +1553,18 @@ Time elapsed: %1 Период опроса: - + Spindle speed min.: Скорость шпинделя мин.: - - + + max.: макс.: - + Acceleration: Ускорение: @@ -1545,22 +1585,22 @@ Time elapsed: %1 Сглаживание линий - + FPS lock: Частота кадров: - + 30 - + 60 - + 120 @@ -1569,32 +1609,32 @@ Time elapsed: %1 Модель фрезы - + Type: Тип: - + Diameter: Диаметр: - + Flat Плоская - + Conic Коническая - + Angle: Угол: - + Length: Длина: @@ -1603,7 +1643,7 @@ Time elapsed: %1 Период опроса состояния: - + Show G-code program commands Отображать команды G-code программы @@ -1616,12 +1656,12 @@ Time elapsed: %1 Безопасная Z: - + Rapid speed: Ускоренная подача: - + by length по длине @@ -1630,13 +1670,13 @@ Time elapsed: %1 (используется визуализатором и процедурой преобразования файлов в соответствии с картой высот) - + Panels Панели - - + + Heightmap Карта высот @@ -1645,12 +1685,12 @@ Time elapsed: %1 Подача - + Spindle Шпиндель - + Jog Перемещение @@ -1659,7 +1699,7 @@ Time elapsed: %1 Управление с клавиатуры - + Console Консоль @@ -1668,12 +1708,12 @@ Time elapsed: %1 Отображать команды G-code программы в консоли - + OK ОК - + Cancel Отмена From 6eb1c007b9b187a17790fa55cc0b54dec490dc5e Mon Sep 17 00:00:00 2001 From: Denvi Date: Wed, 30 Oct 2019 20:40:25 +0500 Subject: [PATCH 04/80] Version updated --- src/candle.pro | 2 +- src/frmmain.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/candle.pro b/src/candle.pro index d6acd5e4..eb7d751c 100644 --- a/src/candle.pro +++ b/src/candle.pro @@ -29,7 +29,7 @@ contains(QT_CONFIG, opengles.) { TARGET = Candle TEMPLATE = app -VERSION = 1.1.8 +VERSION = 1.2b RC_ICONS += images/candle.ico DEFINES += sNan=\"65536\" diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 3753ac94..9f686e55 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -540,7 +540,7 @@ void frmMain::loadSettings() qApp->processEvents(); restoreState(set.value("formMainState").toByteArray()); - // Adjust width + // Adjust width int w = qMax(ui->dockDevice->widget()->sizeHint().width(), ui->dockModification->widget()->sizeHint().width()); ui->dockDevice->setFixedWidth(w); From a6652f0567d94017e2e7be80d22e5ea7785984ad Mon Sep 17 00:00:00 2001 From: Denvi Date: Wed, 30 Oct 2019 22:33:50 +0500 Subject: [PATCH 05/80] Panels view menu fix --- src/candle.pro | 2 +- src/frmmain.cpp | 16 +++++++++++-- src/frmmain.h | 1 + src/frmmain.ui | 64 ------------------------------------------------- 4 files changed, 16 insertions(+), 67 deletions(-) diff --git a/src/candle.pro b/src/candle.pro index eb7d751c..1bdec193 100644 --- a/src/candle.pro +++ b/src/candle.pro @@ -29,7 +29,7 @@ contains(QT_CONFIG, opengles.) { TARGET = Candle TEMPLATE = app -VERSION = 1.2b +VERSION = 1.21b RC_ICONS += images/candle.ico DEFINES += sNan=\"65536\" diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 9f686e55..cc51ee12 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -457,8 +457,8 @@ void frmMain::loadSettings() m_lastFolder = set.value("lastFolder", QDir::homePath()).toString(); this->restoreGeometry(set.value("formGeometry", QByteArray()).toByteArray()); - m_settings->resize(set.value("formSettingsSize", m_settings->size()).toSize()); - m_settings->ui->splitMain->restoreState(set.value("settingsSplitMain").toByteArray()); + // m_settings->resize(set.value("formSettingsSize", m_settings->size()).toSize()); + // m_settings->ui->splitMain->restoreState(set.value("settingsSplitMain").toByteArray()); // QByteArray splitterState = set.value("splitter", QByteArray()).toByteArray(); @@ -546,6 +546,10 @@ void frmMain::loadSettings() ui->dockDevice->setFixedWidth(w); ui->dockModification->setFixedWidth(w); + // Settings form geometry + m_settings->resize(set.value("formSettingsSize", m_settings->size()).toSize()); + m_settings->ui->splitMain->restoreState(set.value("settingsSplitMain").toByteArray()); + m_settingsLoading = false; } @@ -4099,3 +4103,11 @@ void frmMain::on_cmdStop_clicked() m_queue.clear(); m_serialPort.write(QByteArray(1, char(0x85))); } + +void frmMain::on_mnuViewPanels_aboutToShow() +{ + ui->actViewPanelsDevice->setChecked(ui->dockDevice->isVisible()); + ui->actViewPanelsModification->setChecked(ui->dockModification->isVisible()); + ui->actViewPanelsVisualizer->setChecked(ui->dockVisualizer->isVisible()); + ui->actViewPanelsConsole->setChecked(ui->dockConsole->isVisible()); +} \ No newline at end of file diff --git a/src/frmmain.h b/src/frmmain.h index b1f23b25..9ad999b2 100644 --- a/src/frmmain.h +++ b/src/frmmain.h @@ -171,6 +171,7 @@ private slots: void on_cmdHeightMapBorderAuto_clicked(); void on_cmdFileAbort_clicked(); void on_cmdSpindle_clicked(bool checked); + void on_mnuViewPanels_aboutToShow(); void on_cmdYPlus_pressed(); diff --git a/src/frmmain.ui b/src/frmmain.ui index fddb8a2f..5ac3147e 100644 --- a/src/frmmain.ui +++ b/src/frmmain.ui @@ -3057,70 +3057,6 @@ padding-right: 8; - - dockDevice - visibilityChanged(bool) - actViewPanelsDevice - setChecked(bool) - - - 174 - 477 - - - -1 - -1 - - - - - dockModification - visibilityChanged(bool) - actViewPanelsModification - setChecked(bool) - - - 1265 - 477 - - - -1 - -1 - - - - - dockVisualizer - visibilityChanged(bool) - actViewPanelsVisualizer - setChecked(bool) - - - 720 - 162 - - - -1 - -1 - - - - - dockConsole - visibilityChanged(bool) - actViewPanelsConsole - setChecked(bool) - - - 720 - 797 - - - -1 - -1 - - - chkKeyboardControl toggled(bool) From 75ba3678321df37e26370fb8ef2375e379b4f085 Mon Sep 17 00:00:00 2001 From: Denvi Date: Thu, 31 Oct 2019 22:50:43 +0500 Subject: [PATCH 06/80] Visualizer, dconsole windows minimum size fix. Device buttons has adaptive size now. --- src/frmmain.cpp | 24 +- src/frmmain.ui | 670 ++++++++++++++----------------- src/widgets/styledtoolbutton.cpp | 3 +- src/widgets/styledtoolbutton.h | 5 +- 4 files changed, 333 insertions(+), 369 deletions(-) diff --git a/src/frmmain.cpp b/src/frmmain.cpp index cc51ee12..e148d188 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -531,6 +531,24 @@ void frmMain::loadSettings() ui->cboCommand->addItems(set.value("recentCommands", QStringList()).toStringList()); ui->cboCommand->setCurrentIndex(-1); + // Adjust docks width + int w = qMax(ui->dockDevice->widget()->sizeHint().width(), + ui->dockModification->widget()->sizeHint().width()); + ui->dockDevice->setFixedWidth(w); + ui->dockModification->setFixedWidth(w); + + // Buttons + int b = (w - ui->grpControl->layout()->margin() * 2 - ui->grpControl->layout()->spacing() * 3) / 4 * 0.8; + int c = b * 0.8; + setStyleSheet(styleSheet() + QString("\nStyledToolButton[adjustSize='true'] {\n\ + min-width: %1px;\n\ + min-height: %1px;\n\ + qproperty-iconSize: %2px;\n\ + }").arg(b).arg(c)); + // style()->unpolish(this); + ensurePolished(); + ui->dockDevice->setStyleSheet(""); + // Restore docks // Normal window state restoreState(set.value("formMainState").toByteArray()); @@ -540,12 +558,6 @@ void frmMain::loadSettings() qApp->processEvents(); restoreState(set.value("formMainState").toByteArray()); - // Adjust width - int w = qMax(ui->dockDevice->widget()->sizeHint().width(), - ui->dockModification->widget()->sizeHint().width()); - ui->dockDevice->setFixedWidth(w); - ui->dockModification->setFixedWidth(w); - // Settings form geometry m_settings->resize(set.value("formSettingsSize", m_settings->size()).toSize()); m_settings->ui->splitMain->restoreState(set.value("settingsSplitMain").toByteArray()); diff --git a/src/frmmain.ui b/src/frmmain.ui index 5ac3147e..d9fd9470 100644 --- a/src/frmmain.ui +++ b/src/frmmain.ui @@ -21,7 +21,13 @@ :/images/candle_256.png:/images/candle_256.png - QMainWindow::separator { + /*StyledToolButton[adjustSize="true"] { + min-width: 60px; + min-height: 60px; + qproperty-iconSize: 48px; +}*/ + +QMainWindow::separator { width: 26; } @@ -366,7 +372,7 @@ QLabel[overrided="false"] { 0 0 2033 - 31 + 21 @@ -423,12 +429,6 @@ QLabel[overrided="false"] { - - - 350 - 160 - - QDockWidget::AllDockWidgetFeatures @@ -462,8 +462,8 @@ QLabel[overrided="false"] { 0 0 - 324 - 749 + 188 + 562 @@ -598,12 +598,6 @@ QLabel[overrided="false"] { 0 - - - 0 - 25 - - Create @@ -617,12 +611,6 @@ QLabel[overrided="false"] { 0 - - - 0 - 25 - - Open @@ -638,12 +626,6 @@ QLabel[overrided="false"] { 0 - - - 42 - 25 - - Edit @@ -830,8 +812,8 @@ QLabel[overrided="false"] { - 44 - 18 + 0 + 0 @@ -1210,12 +1192,6 @@ QLabel[overrided="false"] { - - - 350 - 178 - - QDockWidget::AllDockWidgetFeatures @@ -1248,9 +1224,9 @@ QLabel[overrided="false"] { 0 - 0 - 324 - 922 + -286 + 269 + 720 @@ -1546,65 +1522,71 @@ QLabel[overrided="false"] { - - - - - 44 - 44 - + + + + + 0 + 0 + - Zero XY + Reset ... - :/images/axis_zero.png:/images/axis_zero.png + :/images/restart.png:/images/restart.png - 30 - 30 + 32 + 32 + + true + - - - - - 44 - 44 - + + + + + 0 + 0 + - Z-probe + Zero XY ... - :/images/search_for_z.png:/images/search_for_z.png + :/images/axis_zero.png:/images/axis_zero.png - 30 - 30 + 32 + 32 + + true + - - - 44 - 44 - + + + 0 + 0 + Home @@ -1618,74 +1600,80 @@ QLabel[overrided="false"] { - 30 - 30 + 32 + 32 + + true + - - - - - 44 - 44 - + + + + + 0 + 0 + - Reset + Z-probe ... - :/images/restart.png:/images/restart.png + :/images/search_for_z.png:/images/search_for_z.png - 30 - 30 + 32 + 32 + + true + - - - - false - - - - 42 - 42 - + + + + + 0 + 0 + - Restore origin + Safe position ... - :/images/origin.png:/images/origin.png + :/images/run.png:/images/run.png - 30 - 30 + 32 + 32 + + true + - - - 44 - 44 - + + + 0 + 0 + Zero Z @@ -1699,36 +1687,45 @@ QLabel[overrided="false"] { - 30 - 30 + 32 + 32 + + true + - - - - - 44 - 44 - + + + + false + + + + 0 + 0 + - Safe position + Restore origin ... - :/images/run.png:/images/run.png + :/images/origin.png:/images/origin.png - 30 - 30 + 32 + 32 + + true + @@ -1736,11 +1733,11 @@ QLabel[overrided="false"] { true - - - 44 - 44 - + + + 0 + 0 + Unlock @@ -1754,10 +1751,13 @@ QLabel[overrided="false"] { - 24 - 24 + 32 + 32 + + true + @@ -1779,10 +1779,10 @@ QLabel[overrided="false"] { false - + - + 0 @@ -1802,11 +1802,11 @@ QLabel[overrided="false"] { true - - - 44 - 44 - + + + 0 + 0 + Spindle on/off @@ -1817,62 +1817,71 @@ QLabel[overrided="false"] { - 30 - 30 + 32 + 32 + + true + - - + + true - - - 44 - 44 - + + + 0 + 0 + Spindle on/off - :/images/num4.png:/images/num4.png + :/images/num3.png:/images/num3.png - 30 - 30 + 32 + 32 + + true + - - + + true - - - 44 - 44 - + + + 0 + 0 + Spindle on/off - :/images/num3.png:/images/num3.png + :/images/num4.png:/images/num4.png - 30 - 30 + 32 + 32 + + true + @@ -1880,11 +1889,11 @@ QLabel[overrided="false"] { true - - - 44 - 44 - + + + 0 + 0 + Spindle on/off @@ -1895,10 +1904,13 @@ QLabel[overrided="false"] { - 30 - 30 + 32 + 32 + + true + @@ -1926,7 +1938,10 @@ QLabel[overrided="false"] { - + + + 10 + 0 @@ -1940,24 +1955,19 @@ QLabel[overrided="false"] { 0 - - - - - - true - + - + 0 0 - - - 44 - 44 - + + + + + + true Spindle on/off @@ -1968,13 +1978,16 @@ QLabel[overrided="false"] { - 28 - 28 + 32 + 32 true + + true + @@ -2015,20 +2028,43 @@ QLabel[overrided="false"] { - - + + 0 0 - + + X+ + + + + + + + :/images/1401562173_chevron-right.png:/images/1401562173_chevron-right.png + + - 44 - 44 + 32 + 32 + + true + + + + + + + + 0 + 0 + + X- @@ -2041,127 +2077,104 @@ QLabel[overrided="false"] { - 30 - 30 + 32 + 32 + + true + - - - 0 - - - - - - 0 - 0 - - - - - 44 - 44 - - - - Y- - - - - - - - :/images/1401562173_chevron-down.png:/images/1401562173_chevron-down.png - - - - 30 - 30 - - - - - - - - + 0 0 - + + Y- + + + + + + + :/images/1401562173_chevron-down.png:/images/1401562173_chevron-down.png + + - 44 - 44 + 32 + 32 + + true + + + + + + + + 0 + 0 + + - X+ + Stop - :/images/1401562173_chevron-right.png:/images/1401562173_chevron-right.png + :/images/brake.png:/images/brake.png - 30 - 30 + 32 + 32 + + true + - - - 0 + + + + 0 + 0 + - - - - - 0 - 0 - - - - - 44 - 44 - - - - Y+ - - - - - - - :/images/1401562173_chevron-up.png:/images/1401562173_chevron-up.png - - - - 30 - 30 - - - - - + + Y+ + + + + + + + :/images/1401562173_chevron-up.png:/images/1401562173_chevron-up.png + + + + 32 + 32 + + + + true + + - - - 0 - + @@ -2169,7 +2182,7 @@ QLabel[overrided="false"] { - 0 + 20 20 @@ -2183,12 +2196,6 @@ QLabel[overrided="false"] { 0 - - - 44 - 44 - - Z+ @@ -2201,19 +2208,19 @@ QLabel[overrided="false"] { - 28 - 28 + 32 + 32 + + true + - - - 0 - + @@ -2221,7 +2228,7 @@ QLabel[overrided="false"] { - 0 + 20 20 @@ -2235,12 +2242,6 @@ QLabel[overrided="false"] { 0 - - - 44 - 44 - - Z- @@ -2253,48 +2254,12 @@ QLabel[overrided="false"] { - 28 - 28 - - - - - - - - - - 0 - - - - - - 0 - 0 - - - - - 44 - 44 + 32 + 32 - - Stop - - - - - - - :/images/brake.png:/images/brake.png - - - - 30 - 30 - + + true @@ -2444,12 +2409,6 @@ QLabel[overrided="false"] { - - - 350 - 460 - - QDockWidget::AllDockWidgetFeatures @@ -2498,8 +2457,8 @@ QLabel[overrided="false"] { - 30 - 30 + 0 + 0 @@ -2514,8 +2473,8 @@ QLabel[overrided="false"] { - 20 - 20 + 24 + 24 @@ -2524,8 +2483,8 @@ QLabel[overrided="false"] { - 30 - 30 + 0 + 0 @@ -2540,8 +2499,8 @@ QLabel[overrided="false"] { - 20 - 20 + 24 + 24 @@ -2550,8 +2509,8 @@ QLabel[overrided="false"] { - 30 - 30 + 0 + 0 @@ -2566,8 +2525,8 @@ QLabel[overrided="false"] { - 20 - 20 + 24 + 24 @@ -2576,8 +2535,8 @@ QLabel[overrided="false"] { - 30 - 30 + 0 + 0 @@ -2592,8 +2551,8 @@ QLabel[overrided="false"] { - 20 - 20 + 24 + 24 @@ -2602,8 +2561,8 @@ QLabel[overrided="false"] { - 30 - 30 + 0 + 0 @@ -2618,8 +2577,8 @@ QLabel[overrided="false"] { - 20 - 20 + 24 + 24 @@ -2631,12 +2590,6 @@ QLabel[overrided="false"] { - - - 350 - 129 - - QDockWidget::AllDockWidgetFeatures @@ -2964,13 +2917,8 @@ padding-right: 8; cmdHeightMapCreate cmdHeightMapLoad cmdHeightMapMode - cmdSpindle cmdXMinus cmdXPlus - cmdYPlus - cmdYMinus - cmdZPlus - cmdZMinus chkKeyboardControl diff --git a/src/widgets/styledtoolbutton.cpp b/src/widgets/styledtoolbutton.cpp index 269f35eb..6bce5243 100644 --- a/src/widgets/styledtoolbutton.cpp +++ b/src/widgets/styledtoolbutton.cpp @@ -5,7 +5,7 @@ #include #include -StyledToolButton::StyledToolButton(QWidget *parent) : QAbstractButton(parent) +StyledToolButton::StyledToolButton(QWidget *parent) : QToolButton(parent) { m_hovered = false; m_backColor = palette().color(QPalette::Button); @@ -36,6 +36,7 @@ void StyledToolButton::paintEvent(QPaintEvent *e) { Q_UNUSED(e) + const int borderWidth = 4; const int borderRadius = 5; diff --git a/src/widgets/styledtoolbutton.h b/src/widgets/styledtoolbutton.h index 0e11b57c..18360deb 100644 --- a/src/widgets/styledtoolbutton.h +++ b/src/widgets/styledtoolbutton.h @@ -9,9 +9,12 @@ #include #include #include +#include -class StyledToolButton : public QAbstractButton +class StyledToolButton : public QToolButton { + Q_OBJECT + public: explicit StyledToolButton(QWidget *parent = 0); From 1fad7afbb61fd5ddd893f8c3346147109502f3d1 Mon Sep 17 00:00:00 2001 From: Denvi Date: Fri, 1 Nov 2019 22:35:15 +0500 Subject: [PATCH 07/80] "Device", "Modification" windows adjustable now. --- src/candle.pro | 10 ++-------- src/frmmain.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/candle.pro b/src/candle.pro index 1bdec193..89836455 100644 --- a/src/candle.pro +++ b/src/candle.pro @@ -29,7 +29,7 @@ contains(QT_CONFIG, opengles.) { TARGET = Candle TEMPLATE = app -VERSION = 1.21b +VERSION = 1.2.2b RC_ICONS += images/candle.ico DEFINES += sNan=\"65536\" @@ -109,10 +109,4 @@ DEFINES += _USE_MATH_DEFINES RESOURCES += \ shaders.qrc \ - images.qrc - -CONFIG(release, debug|release) { - QMAKE_CXXFLAGS += -Z7 -Fdrelease\\candle.pdb - QMAKE_CFLAGS += -Z7 -Fdrelease\\candle.pdb - QMAKE_LFLAGS += /DEBUG /OPT:REF -} \ No newline at end of file + images.qrc \ No newline at end of file diff --git a/src/frmmain.cpp b/src/frmmain.cpp index e148d188..bb0eac16 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -534,8 +534,10 @@ void frmMain::loadSettings() // Adjust docks width int w = qMax(ui->dockDevice->widget()->sizeHint().width(), ui->dockModification->widget()->sizeHint().width()); - ui->dockDevice->setFixedWidth(w); - ui->dockModification->setFixedWidth(w); + ui->dockDevice->setMinimumWidth(w); + ui->dockDevice->setMaximumWidth(w + ui->scrollArea->verticalScrollBar()->width()); + ui->dockModification->setMinimumWidth(w); + ui->dockModification->setMaximumWidth(w + ui->scrollArea->verticalScrollBar()->width()); // Buttons int b = (w - ui->grpControl->layout()->margin() * 2 - ui->grpControl->layout()->spacing() * 3) / 4 * 0.8; From 6db5dc4dbfab3a97533961619b8062876936997f Mon Sep 17 00:00:00 2001 From: Denvi Date: Sun, 3 Nov 2019 12:20:28 +0500 Subject: [PATCH 08/80] Shortcuts settings added. --- src/candle.pro | 2 +- src/frmmain.cpp | 297 +++++++---- src/frmmain.h | 29 +- src/frmmain.ui | 942 ++++++++++++++++++++++++++++++++-- src/frmsettings.cpp | 57 ++ src/frmsettings.ui | 35 +- src/translations/candle_en.ts | 519 ++++++++++++------- src/translations/candle_es.ts | 519 ++++++++++++------- src/translations/candle_fr.ts | 519 ++++++++++++------- src/translations/candle_pt.ts | 519 ++++++++++++------- src/translations/candle_ru.qm | Bin 20410 -> 22475 bytes src/translations/candle_ru.ts | 519 ++++++++++++------- src/widgets/sliderbox.cpp | 5 + src/widgets/sliderbox.h | 7 +- 14 files changed, 2878 insertions(+), 1091 deletions(-) diff --git a/src/candle.pro b/src/candle.pro index 89836455..3356b518 100644 --- a/src/candle.pro +++ b/src/candle.pro @@ -29,7 +29,7 @@ contains(QT_CONFIG, opengles.) { TARGET = Candle TEMPLATE = app -VERSION = 1.2.2b +VERSION = 1.2.3b RC_ICONS += images/candle.ico DEFINES += sNan=\"65536\" diff --git a/src/frmmain.cpp b/src/frmmain.cpp index bb0eac16..0af05be2 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -320,10 +320,10 @@ frmMain::frmMain(QWidget *parent) : connect(&m_serialPort, SIGNAL(readyRead()), this, SLOT(onSerialPortReadyRead()), Qt::QueuedConnection); connect(&m_serialPort, SIGNAL(error(QSerialPort::SerialPortError)), this, SLOT(onSerialPortError(QSerialPort::SerialPortError))); - this->installEventFilter(this); - ui->tblProgram->installEventFilter(this); - ui->cboJogStep->installEventFilter(this); - ui->cboJogFeed->installEventFilter(this); + qApp->installEventFilter(this); + // ui->tblProgram->installEventFilter(this); + // ui->cboJogStep->installEventFilter(this); + // ui->cboJogFeed->installEventFilter(this); // ui->splitPanels->handle(1)->installEventFilter(this); // ui->splitPanels->installEventFilter(this); @@ -564,6 +564,73 @@ void frmMain::loadSettings() m_settings->resize(set.value("formSettingsSize", m_settings->size()).toSize()); m_settings->ui->splitMain->restoreState(set.value("settingsSplitMain").toByteArray()); + // Shortcuts + qRegisterMetaTypeStreamOperators("ShortcutsMap"); + + ShortcutsMap m; + QByteArray ba = set .value("shortcuts").toByteArray(); + QDataStream s(&ba, QIODevice::ReadOnly); + + s >> m; + for (int i = 0; i < m.count(); i++) { + QAction *a = findChild(m.keys().at(i)); + if (a) a->setShortcuts(m.values().at(i)); + } + + addAction(ui->actControlHome); + addAction(ui->actControlTouch); + addAction(ui->actControlZeroXY); + addAction(ui->actControlZeroZ); + addAction(ui->actControlRestoreOrigin); + addAction(ui->actControlSafePosition); + addAction(ui->actControlReset); + addAction(ui->actControlUnlock); + addAction(ui->actUserCommand1); + addAction(ui->actUserCommand2); + addAction(ui->actUserCommand3); + addAction(ui->actUserCommand4); + + addAction(ui->actVisualizerFit); + addAction(ui->actVisualizerIsometric); + addAction(ui->actVisualizerTop); + addAction(ui->actVisualizerFront); + addAction(ui->actVisualizerLeft); + + addAction(ui->actProgramCheck); + addAction(ui->actProgramScroll); + addAction(ui->actProgramReset); + addAction(ui->actProgramSend); + addAction(ui->actProgramPause); + addAction(ui->actProgramAbort); + + addAction(ui->actHeightmapUse); + addAction(ui->actHeightmapCreate); + addAction(ui->actHeightmapOpen); + addAction(ui->actHeightmapEdit); + addAction(ui->actHeightmapShowBorder); + addAction(ui->actHeightmapShowProbeGrid); + addAction(ui->actHeightmapShowInterpolationGrid); + + addAction(ui->actJogStepNext); + addAction(ui->actJogStepPrevious); + addAction(ui->actJogFeedNext); + addAction(ui->actJogFeedPrevious); + addAction(ui->actJogKeyboardControl); + addAction(ui->actSpindleSpeedPlus); + addAction(ui->actSpindleSpeedMinus); + addAction(ui->actSpindleOnOff); + addAction(ui->actOverrideFeed); + addAction(ui->actOverrideFeedPlus); + addAction(ui->actOverrideFeedMinus); + addAction(ui->actOverrideRapid); + addAction(ui->actOverrideRapidPlus); + addAction(ui->actOverrideRapidMinus); + addAction(ui->actOverrideSpindle); + addAction(ui->actOverrideSpindlePlus); + addAction(ui->actOverrideSpindleMinus); + + addAction(ui->actConsoleClear); + m_settingsLoading = false; } @@ -681,7 +748,18 @@ void frmMain::saveSettings() for (int i = 0; i < ui->cboCommand->count(); i++) list.append(ui->cboCommand->itemText(i)); set.setValue("recentCommands", list); + // Docks set.setValue("formMainState", saveState()); + + // Shortcuts + ShortcutsMap m; + QByteArray ba; + QDataStream s(&ba, QIODevice::WriteOnly); + QList acts = findChildren(QRegExp("act.*")); + + foreach (QAction *a, acts) m[a->objectName()] = a->shortcuts(); + s << m; + set.setValue("shortcuts", ba); } bool frmMain::saveChanges(bool heightMapMode) @@ -2287,8 +2365,39 @@ void frmMain::onTableDeleteLines() ui->tblProgram->selectRow(firstRow.row()); } +bool frmMain::actionLessThan(const QAction *a1, const QAction *a2) +{ + return a1->objectName() < a2->objectName(); +} + void frmMain::on_actServiceSettings_triggered() { + QList acts = findChildren(QRegExp("act.*")); + QTableWidget *table = m_settings->ui->tblShortcuts; + + table->clear(); + table->setColumnCount(3); + table->setRowCount(acts.count()); + table->setHorizontalHeaderLabels(QStringList() << "Command" << "Text" << "Shortcuts"); + + table->verticalHeader()->setDefaultAlignment(Qt::AlignCenter); + table->verticalHeader()->setFixedWidth(table->verticalHeader()->sizeHint().width() + 11); + + qSort(acts.begin(), acts.end(), frmMain::actionLessThan); + for (int i = 0; i < acts.count(); i++) { + table->setItem(i, 0, new QTableWidgetItem(acts.at(i)->objectName())); + table->setItem(i, 1, new QTableWidgetItem(acts.at(i)->text().remove("&"))); + table->setItem(i, 2, new QTableWidgetItem(acts.at(i)->shortcut().toString())); + + table->item(i, 0)->setFlags(Qt::ItemIsEnabled); + table->item(i, 1)->setFlags(Qt::ItemIsEnabled); + table->item(i, 2)->setFlags(Qt::ItemIsEnabled | Qt::ItemIsEditable); + } + + table->resizeColumnsToContents(); + table->setMinimumHeight(table->rowHeight(0) * 10 + + table->horizontalHeader()->height() + table->frameWidth() * 2); + if (m_settings->exec()) { qDebug() << "Applying settings"; qDebug() << "Port:" << m_settings->port() << "Baud:" << m_settings->baud(); @@ -2303,6 +2412,12 @@ void frmMain::on_actServiceSettings_triggered() updateControlsState(); applySettings(); + + // Update shortcuts + for (int i = 0; i < acts.count(); i++) { + acts[i]->setShortcut(QKeySequence(table->item(i, 2)->data(Qt::DisplayRole).toString())); + } + } else { m_settings->undo(); } @@ -2913,114 +3028,40 @@ void frmMain::on_grpUserCommands_toggled(bool checked) bool frmMain::eventFilter(QObject *obj, QEvent *event) { - // Main form events - if (obj == this || obj == ui->tblProgram || obj == ui->cboJogStep || obj == ui->cboJogFeed) { + if (obj->inherits("QWidgetWindow")) { + + QKeySequence ks; + + if ((event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease)) { + QKeyEvent *ev = static_cast(event); + ks = QKeySequence(ev->key() | ev->modifiers()); + } // Jog on keyboard control if (!m_processingFile && ui->chkKeyboardControl->isChecked() && (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) && !static_cast(event)->isAutoRepeat()) { - switch (static_cast(event)->key()) { - case Qt::Key_4: - if (event->type() == QEvent::KeyPress) emit ui->cmdXMinus->pressed(); else emit ui->cmdXMinus->released(); - break; - case Qt::Key_6: + if (ui->actJogXMinus->shortcuts().contains(ks)) { + if (event->type() == QEvent::KeyPress) emit ui->cmdXMinus->pressed(); else emit ui->cmdXMinus->released(); + } else if (ui->actJogXPlus->shortcuts().contains(ks)) { if (event->type() == QEvent::KeyPress) emit ui->cmdXPlus->pressed(); else emit ui->cmdXPlus->released(); - break; - case Qt::Key_8: + } else if (ui->actJogYPlus->shortcuts().contains(ks)) { if (event->type() == QEvent::KeyPress) emit ui->cmdYPlus->pressed(); else emit ui->cmdYPlus->released(); - break; - case Qt::Key_2: + } else if (ui->actJogYMinus->shortcuts().contains(ks)) { if (event->type() == QEvent::KeyPress) emit ui->cmdYMinus->pressed(); else emit ui->cmdYMinus->released(); - break; - case Qt::Key_9: + } else if (ui->actJogZPlus->shortcuts().contains(ks)) { if (event->type() == QEvent::KeyPress) emit ui->cmdZPlus->pressed(); else emit ui->cmdZPlus->released(); - break; - case Qt::Key_3: + } else if (ui->actJogZMinus->shortcuts().contains(ks)) { if (event->type() == QEvent::KeyPress) emit ui->cmdZMinus->pressed(); else emit ui->cmdZMinus->released(); - break; } } - - if (event->type() == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast(event); - - if (!m_processingFile && keyEvent->key() == Qt::Key_ScrollLock && obj == this) { - ui->chkKeyboardControl->toggle(); - if (!ui->chkKeyboardControl->isChecked()) ui->cboCommand->setFocus(); - } - - if (!m_processingFile && ui->chkKeyboardControl->isChecked()) { - if (keyEvent->key() == Qt::Key_7) { - ui->cboJogStep->setCurrentPrevious(); - } else if (keyEvent->key() == Qt::Key_1) { - ui->cboJogStep->setCurrentNext(); - } else if (keyEvent->key() == Qt::Key_Minus) { - ui->cboJogFeed->setCurrentPrevious(); - } else if (keyEvent->key() == Qt::Key_Plus) { - ui->cboJogFeed->setCurrentNext(); - } else if (keyEvent->key() == Qt::Key_5) { - on_cmdStop_clicked(); - } else if (keyEvent->key() == Qt::Key_0) { - on_cmdSpindle_clicked(!ui->cmdSpindle->isChecked()); - } else if (keyEvent->key() == Qt::Key_Asterisk) { - ui->slbSpindle->setSliderPosition(ui->slbSpindle->sliderPosition() + 1); - } else if (keyEvent->key() == Qt::Key_Slash) { - ui->slbSpindle->setSliderPosition(ui->slbSpindle->sliderPosition() - 1); - } - } - - if (obj == ui->tblProgram && m_processingFile) { - if (keyEvent->key() == Qt::Key_PageDown || keyEvent->key() == Qt::Key_PageUp - || keyEvent->key() == Qt::Key_Down || keyEvent->key() == Qt::Key_Up) { - ui->chkAutoScroll->setChecked(false); - } - } + } else if (obj == ui->tblProgram && m_processingFile) { + QKeyEvent *keyEvent = static_cast(event); + if (keyEvent->key() == Qt::Key_PageDown || keyEvent->key() == Qt::Key_PageUp + || keyEvent->key() == Qt::Key_Down || keyEvent->key() == Qt::Key_Up) { + ui->chkAutoScroll->setChecked(false); } - - // Splitter events - // } else if (obj == ui->splitPanels && event->type() == QEvent::Resize) { - // // Resize splited widgets - // onPanelsSizeChanged(ui->scrollAreaWidgetContents->sizeHint()); - - // // Splitter handle events - // } else if (obj == ui->splitPanels->handle(1)) { - // int minHeight = getConsoleMinHeight(); - // switch (event->type()) { - // case QEvent::MouseButtonPress: - // // Store current console group box minimum & real heights - // m_storedConsoleMinimumHeight = ui->grpConsole->minimumHeight(); - // m_storedConsoleHeight = ui->grpConsole->height(); - - // // Update splited sizes - // ui->splitPanels->setSizes(QList() << ui->scrollArea->height() << ui->grpConsole->height()); - - // // Set new console mimimum height - // ui->grpConsole->setMinimumHeight(qMax(minHeight, ui->splitPanels->height() - // - ui->scrollAreaWidgetContents->sizeHint().height() - ui->splitPanels->handleWidth() - 4)); - // break; - // case QEvent::MouseButtonRelease: - // // Store new console minimum height if height was changed with split handle - // if (ui->grpConsole->height() != m_storedConsoleHeight) { - // ui->grpConsole->setMinimumHeight(ui->grpConsole->height()); - // } else { - // ui->grpConsole->setMinimumHeight(m_storedConsoleMinimumHeight); - // } - // break; - // case QEvent::MouseButtonDblClick: - // // Switch to min/max console size - // if (ui->grpConsole->height() == minHeight || !ui->scrollArea->verticalScrollBar()->isVisible()) { - // ui->splitPanels->setSizes(QList() << ui->scrollArea->minimumHeight() - // << ui->splitPanels->height() - ui->splitPanels->handleWidth() - ui->scrollArea->minimumHeight()); - // } else { - // ui->grpConsole->setMinimumHeight(minHeight); - // onPanelsSizeChanged(ui->scrollAreaWidgetContents->sizeHint()); - // } - // break; - // default: - // break; - // } } return QMainWindow::eventFilter(obj, event); @@ -4124,4 +4165,64 @@ void frmMain::on_mnuViewPanels_aboutToShow() ui->actViewPanelsModification->setChecked(ui->dockModification->isVisible()); ui->actViewPanelsVisualizer->setChecked(ui->dockVisualizer->isVisible()); ui->actViewPanelsConsole->setChecked(ui->dockConsole->isVisible()); +} + +void frmMain::on_actJogStepNext_triggered() +{ + ui->cboJogStep->setCurrentNext(); +} + +void frmMain::on_actJogStepPrevious_triggered() +{ + ui->cboJogStep->setCurrentPrevious(); +} + +void frmMain::on_actJogFeedNext_triggered() +{ + ui->cboJogFeed->setCurrentNext(); +} + +void frmMain::on_actJogFeedPrevious_triggered() +{ + ui->cboJogFeed->setCurrentPrevious(); +} + +void frmMain::on_actSpindleSpeedPlus_triggered() +{ + ui->slbSpindle->setSliderPosition(ui->slbSpindle->sliderPosition() + 1); +} + +void frmMain::on_actSpindleSpeedMinus_triggered() +{ + ui->slbSpindle->setSliderPosition(ui->slbSpindle->sliderPosition() - 1); +} + +void frmMain::on_actOverrideFeedPlus_triggered() +{ + ui->slbFeedOverride->setSliderPosition(ui->slbFeedOverride->sliderPosition() + 1); +} + +void frmMain::on_actOverrideFeedMinus_triggered() +{ + ui->slbFeedOverride->setSliderPosition(ui->slbFeedOverride->sliderPosition() - 1); +} + +void frmMain::on_actOverrideRapidPlus_triggered() +{ + ui->slbRapidOverride->setSliderPosition(ui->slbRapidOverride->sliderPosition() + 1); +} + +void frmMain::on_actOverrideRapidMinus_triggered() +{ + ui->slbRapidOverride->setSliderPosition(ui->slbRapidOverride->sliderPosition() - 1); +} + +void frmMain::on_actOverrideSpindlePlus_triggered() +{ + ui->slbSpindleOverride->setSliderPosition(ui->slbSpindleOverride->sliderPosition() + 1); +} + +void frmMain::on_actOverrideSpindleMinus_triggered() +{ + ui->slbSpindleOverride->setSliderPosition(ui->slbSpindleOverride->sliderPosition() - 1); } \ No newline at end of file diff --git a/src/frmmain.h b/src/frmmain.h index 9ad999b2..4b2b0038 100644 --- a/src/frmmain.h +++ b/src/frmmain.h @@ -174,31 +174,32 @@ private slots: void on_mnuViewPanels_aboutToShow(); void on_cmdYPlus_pressed(); - void on_cmdYPlus_released(); - void on_cmdYMinus_pressed(); - void on_cmdYMinus_released(); - void on_cmdXPlus_pressed(); - void on_cmdXPlus_released(); - void on_cmdXMinus_pressed(); - void on_cmdXMinus_released(); - void on_cmdZPlus_pressed(); - void on_cmdZPlus_released(); - void on_cmdZMinus_pressed(); - void on_cmdZMinus_released(); - void on_cmdStop_clicked(); + void on_actJogStepNext_triggered(); + void on_actJogStepPrevious_triggered(); + void on_actJogFeedNext_triggered(); + void on_actJogFeedPrevious_triggered(); + void on_actSpindleSpeedPlus_triggered(); + void on_actSpindleSpeedMinus_triggered(); + void on_actOverrideFeedPlus_triggered(); + void on_actOverrideFeedMinus_triggered(); + void on_actOverrideRapidPlus_triggered(); + void on_actOverrideRapidMinus_triggered(); + void on_actOverrideSpindlePlus_triggered(); + void on_actOverrideSpindleMinus_triggered(); + protected: void showEvent(QShowEvent *se); void hideEvent(QHideEvent *he); @@ -385,6 +386,10 @@ private slots: void updateOverride(SliderBox *slider, int value, char command); void jogStep(); void updateJogTitle(); + + static bool actionLessThan(const QAction *a1, const QAction *a2); }; +typedef QMap> ShortcutsMap; + #endif // FRMMAIN_H diff --git a/src/frmmain.ui b/src/frmmain.ui index d9fd9470..4581a5ea 100644 --- a/src/frmmain.ui +++ b/src/frmmain.ui @@ -6,7 +6,7 @@ 0 0 - 2033 + 1469 1015 @@ -371,8 +371,8 @@ QLabel[overrided="false"] { 0 0 - 2033 - 21 + 1469 + 31 @@ -462,8 +462,8 @@ QLabel[overrided="false"] { 0 0 - 188 - 562 + 255 + 751 @@ -1224,9 +1224,9 @@ QLabel[overrided="false"] { 0 - -286 - 269 - 720 + 0 + 320 + 878 @@ -2762,24 +2762,14 @@ padding-right: 8; false - - - &Open - - - - - E&xit - - - + - &Settings + &New - + - &New + &Open @@ -2792,9 +2782,9 @@ padding-right: 8; Save &as... - + - &About + Save &transformed as... @@ -2802,9 +2792,19 @@ padding-right: 8; &Clear - + - Save &transformed as... + E&xit + + + + + &Settings + + + + + &About @@ -2851,6 +2851,281 @@ padding-right: 8; &Console + + + Home + + + + + Z-probe + + + + + Zero XY + + + + + Zero Z + + + + + Restore origin + + + + + Safe position + + + + + Reset + + + + + Unlock + + + + + User command 1 + + + + + User command 2 + + + + + User command 3 + + + + + User command 4 + + + + + Spindle speed + + + + + + Spindle speed - + + + + + Spindle on/off + + + + + Y+ + + + + + Y- + + + + + X+ + + + + + X- + + + + + Z+ + + + + + Z- + + + + + Stop + + + + + Jog step next + + + + + Jog step previous + + + + + Jog feed next + + + + + Jog feed previous + + + + + Keyboard control + + + + + Fit + + + + + Top view + + + + + Isometric view + + + + + Front view + + + + + Left view + + + + + Check + + + + + Scroll + + + + + Reset + + + + + Send + + + + + Pause + + + + + Abort + + + + + Use heightmap + + + + + Create + + + + + Open + + + + + Edit + + + + + Show border + + + + + Show probe grid + + + + + Show interpolation grid + + + + + Clear console + + + + + Feed override + + + + + + Feed override - + + + + + Rapid override + + + + + + Rapid override - + + + + + Spindle override + + + + + + Spindle override - + + + + + Feed override + + + + + Rapid speed override + + + + + Spindle speed override + + @@ -2881,6 +3156,9 @@ padding-right: 8; QWidget
widgets/sliderbox.h
1 + + click() + ComboBoxKey @@ -2932,12 +3210,12 @@ padding-right: 8; setVisible(bool) - 1282 - 482 + 1415 + 663 - 1272 - 534 + 1415 + 1060
@@ -3000,8 +3278,8 @@ padding-right: 8; -1 - 720 - 797 + 734 + 867 @@ -3012,12 +3290,12 @@ padding-right: 8; setDisabled(bool) - 271 - 1222 + 298 + 1196 - 1344 - 284 + 1415 + 450 @@ -3028,8 +3306,8 @@ padding-right: 8; setDisabled(bool) - 156 - 1208 + 183 + 1196 417 @@ -3044,8 +3322,8 @@ padding-right: 8; setDisabled(bool) - 117 - 1205 + 144 + 1196 428 @@ -3060,12 +3338,588 @@ padding-right: 8; setDisabled(bool) - 271 - 1222 + 298 + 1196 + + + 245 + 898 + + + + + actVisualizerFit + triggered() + cmdFit + click() + + + -1 + -1 + + + 29 + 121 + + + + + actVisualizerTop + triggered() + cmdTop + click() + + + -1 + -1 + + + 29 + 159 + + + + + actVisualizerIsometric + triggered() + cmdIsometric + click() + + + -1 + -1 + + + 29 + 197 + + + + + actVisualizerFront + triggered() + cmdFront + click() + + + -1 + -1 + + + 29 + 235 + + + + + actVisualizerLeft + triggered() + cmdLeft + click() + + + -1 + -1 + + + 29 + 273 + + + + + actControlHome + triggered() + cmdHome + click() + + + -1 + -1 + + + 89 + 660 + + + + + actControlTouch + triggered() + cmdTouch + click() + + + -1 + -1 + + + 169 + 660 + + + + + actControlZeroXY + triggered() + cmdZeroXY + click() + + + -1 + -1 + + + 243 + 660 + + + + + actControlZeroZ + triggered() + cmdZeroZ + click() + + + -1 + -1 + + + 318 + 660 + + + + + actControlRestoreOrigin + triggered() + cmdRestoreOrigin + click() + + + -1 + -1 + + + 89 + 707 + + + + + actControlSafePosition + triggered() + cmdSafePosition + click() + + + -1 + -1 + + + 169 + 707 + + + + + actControlReset + triggered() + cmdReset + click() + + + -1 + -1 + + + 243 + 707 + + + + + actControlUnlock + triggered() + cmdUnlock + click() + + + -1 + -1 + + + 318 + 707 + + + + + actUserCommand1 + triggered() + cmdUser0 + click() + + + -1 + -1 + + + 92 + 803 + + + + + actUserCommand2 + triggered() + cmdUser1 + click() + + + -1 + -1 + + + 169 + 803 + + + + + actUserCommand3 + triggered() + cmdUser2 + click() + + + -1 + -1 + + + 243 + 803 + + + + + actUserCommand4 + triggered() + cmdUser3 + click() + + + -1 + -1 + + + 318 + 803 + + + + + actProgramCheck + triggered() + chkTestMode + click() + + + -1 + -1 + + + 435 + 674 + + + + + actProgramScroll + triggered() + chkAutoScroll + click() + + + -1 + -1 + + + 516 + 674 + + + + + actProgramReset + triggered() + cmdFileReset + click() + + + -1 + -1 + + + 788 + 663 + + + + + actProgramSend + triggered() + cmdFileSend + click() + + + -1 + -1 + + + 879 + 663 + + + + + actProgramPause + triggered() + cmdFilePause + click() + + + -1 + -1 + + + 970 + 663 + + + + + actProgramAbort + triggered() + cmdFileAbort + click() + + + -1 + -1 + + + 1091 + 663 + + + + + actHeightmapUse + triggered() + chkHeightMapUse + click() + + + -1 + -1 + + + 1415 + 529 + + + + + actHeightmapCreate + triggered() + cmdHeightMapCreate + click() + + + -1 + -1 + + + 1297 + 628 + + + + + actHeightmapOpen + triggered() + cmdHeightMapLoad + click() + + + -1 + -1 + + + 1414 + 628 + + + + + actHeightmapEdit + triggered() + cmdHeightMapMode + click() + + + -1 + -1 + + + 1415 + 663 + + + + + actHeightmapShowBorder + triggered() + chkHeightMapBorderShow + click() + + + -1 + -1 + + + 1353 + 796 + + + + + actHeightmapShowProbeGrid + triggered() + chkHeightMapGridShow + click() + + + -1 + -1 + + + 1341 + 931 + + + + + actHeightmapShowInterpolationGrid + triggered() + chkHeightMapInterpolationShow + click() + + + -1 + -1 + + + 1389 + 1067 + + + + + actConsoleClear + triggered() + cmdClearConsole + click() + + + -1 + -1 + + + 1437 + 982 + + + + + actSpindleOnOff + triggered() + cmdSpindle + click() + + + -1 + -1 + + + 300 + 879 + + + + + actJogKeyboardControl + triggered() + chkKeyboardControl + click() + + + -1 + -1 + + + 173 + 1185 + + + + + actOverrideFeed + triggered() + slbFeedOverride + click() + + + -1 + -1 + + + 1302 + 407 + + + + + actOverrideRapid + triggered() + slbRapidOverride + click() + + + -1 + -1 + + + 1302 + 426 + + + + + actOverrideSpindle + triggered() + slbSpindleOverride + click() + + + -1 + -1 - 218 - 904 + 1302 + 445 diff --git a/src/frmsettings.cpp b/src/frmsettings.cpp index e10215bd..b543c785 100644 --- a/src/frmsettings.cpp +++ b/src/frmsettings.cpp @@ -8,6 +8,55 @@ #include #include #include +#include +#include +#include + +class CustomKeySequenceEdit : public QKeySequenceEdit +{ +public: + explicit CustomKeySequenceEdit(QWidget *parent = 0): QKeySequenceEdit(parent) {} + ~CustomKeySequenceEdit() {} + +protected: + void keyPressEvent(QKeyEvent *pEvent) { + QKeySequenceEdit::keyPressEvent(pEvent); + QString s = keySequence().toString().split(", ").first(); + + QString shiftedKeys = "~!@#$%^&*()_+{}|:?><\""; + QString key = s.right(1); + + if (pEvent->modifiers() & Qt::KeypadModifier) s = "Num+" + s; + else if (!key.isEmpty() && shiftedKeys.contains(key)) { + s.remove("Shift+"); + s = s.left(s.size() - 1) + QString("Shift+%1").arg(key); + } + + QKeySequence seq(QKeySequence::fromString(s)); + setKeySequence(seq); + } +}; + +class ShortcutDelegate: public QStyledItemDelegate +{ +public: + ShortcutDelegate() {} + + QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override + { + return new CustomKeySequenceEdit(parent); + } + + void setEditorData(QWidget *editor, const QModelIndex &index) const override + { + static_cast(editor)->setKeySequence(index.data(Qt::DisplayRole).toString()); + } + + void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override + { + model->setData(index, static_cast(editor)->keySequence().toString()); + } +}; frmSettings::frmSettings(QWidget *parent) : QDialog(parent), @@ -29,6 +78,11 @@ frmSettings::frmSettings(QWidget *parent) : ui->listCategories->item(0)->setSelected(true); connect(ui->scrollSettings->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(onScrollBarValueChanged(int))); + // Shortcuts table + ui->tblShortcuts->setItemDelegateForColumn(2, new ShortcutDelegate); + ui->tblShortcuts->setTabKeyNavigation(false); + ui->tblShortcuts->setEditTriggers(QAbstractItemView::AllEditTriggers); + searchPorts(); } @@ -686,6 +740,9 @@ void frmSettings::on_cmdDefaults_clicked() ui->clpToolpathEnd->setColor(QColor(0, 255, 0)); setFontSize(9); + + // Shortcuts + } void frmSettings::on_cboFontSize_currentTextChanged(const QString &arg1) diff --git a/src/frmsettings.ui b/src/frmsettings.ui index 29b53aff..4ddb9ccc 100644 --- a/src/frmsettings.ui +++ b/src/frmsettings.ui @@ -87,9 +87,9 @@ QSplitter::handle:horizontal { 0 - 0 + -1496 543 - 2028 + 2271 @@ -1384,6 +1384,37 @@ QSplitter::handle:horizontal { + + + + Shortcuts + + + + + + true + + + + Command + + + + + Text + + + + + Shortcuts + + + + + + + diff --git a/src/translations/candle_en.ts b/src/translations/candle_en.ts index c380e444..927d8c1b 100644 --- a/src/translations/candle_en.ts +++ b/src/translations/candle_en.ts @@ -112,82 +112,90 @@ - + Program - + + Check - + + Scroll - - - - - + + + + + + Open - - + + + + Reset - - + + + Send - + + Pause - - - - + + + + + Abort - + &File - + &Recent files - + &Service - + &Help - + &View - + &Windows @@ -198,19 +206,20 @@ - - + + Overriding - + Heightmap + Use heightmap @@ -225,170 +234,277 @@ - + + Create - + + Edit - + Border: - - - + + + X: - + H: - - - + + + Y: - + W: - + + Show border - + Auto - + Probe grid: - + Zb: - + Zt: - + + Show probe grid - + Interpolation grid: - + Type: - + Bicubic - + + Show interpolation grid - + Device - + State - + Work coordinates: - + Machine coordinates: - + Status: - + Control - + + Zero XY - - - - - - - - - + + User command 1 + + + + + User command 2 + + + + + User command 3 + + + + + User command 4 + + + + + Spindle speed + + + + + + Spindle speed - + + + + + Jog step next + + + + + Jog step previous + + + + + Jog feed next + + + + + Jog feed previous + + + + + Feed override + + + + + + Feed override - + + + + + Rapid override + + + + + + Rapid override - + + + + + Spindle override + + + + + + Spindle override - + + + + + Feed override + + + + + Rapid speed override + + + + + Spindle speed override + + + + + + + + + + + + ... - + + Z-probe - + + Home - + + Restore origin - + + Zero Z - + + Safe position - + + Unlock @@ -399,260 +515,275 @@ - - - - + + + + + Spindle on/off - - - - - - + + + + + + Spindle - + - - + + Jog - + + X- - + + Y- - + + X+ - + + Y+ - + + Z+ - + + Z- - + + Stop - + Continuously - + 0.01 - + 0.1 - + 1 - + 5 - - + + 10 - - + + 100 - + Step: - + Feed: - + 50 - + 500 - + 1000 - + 2000 - + + Keyboard control - + Visualizer - + + Fit - + + Top view - + + Isometric view - + + Front view - + + Left view - + Console - + Send command - + + Clear console - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open - + E&xit - + &Settings - + &New - + &Save - + Save &as... - + &About - + &Clear - + Save &transformed as... - + &Device - + &Modification - + &Visualizer - + &Console @@ -734,190 +865,190 @@ - + Restore origin: %1, %2, %3 - + G-code program file was changed. Save? - + Heightmap file was changed. Save? - + Not connected - + G-code program - + Probe - + Port opened - + Job done. Time elapsed: %1 - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Serial port error - + Buffer: %1 / %2 / %3 - + File sending in progress. Terminate and exit? - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) - - - + + + Heightmap files (*.map) - + Opening file... - - + + Can't open file: - + Following commands will be sent before selected line: - + Skip - - - + + + (%1) - + Delete lines? - + Updating... - + Untitled - - - + + + Save file as - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) - + (%1/%2/%3) - + (%1/%2) - + C - + Changing grid settings will reset probe data. Continue? - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1366,67 +1497,83 @@ Time elapsed: %1 + + Shortcuts + + + + + Command + + + + + Text + + + + Font - + Size: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt - + (restart needed) - + Set to defaults - + OK - + Cancel - + Reset settings to default values? diff --git a/src/translations/candle_es.ts b/src/translations/candle_es.ts index a4ae6b3a..91467e24 100644 --- a/src/translations/candle_es.ts +++ b/src/translations/candle_es.ts @@ -115,32 +115,37 @@ GRBL Control - + G-code program Programa de G-Code - + + Isometric view Vista isometrica - + + Top view Vista superior - + + Front view Vista Frontal - + + Left view Vista izquierda - + + Fit Ajustar vista @@ -149,56 +154,57 @@ Ajuste de alturas - + Border: Bordes: - - - + + + X: X: - + H: - - - + + + Y: Y: - + W: - + + Show border Mostrar borde - + Auto - + Probe grid: Grilla de medición: - + Zb: Zн: - + Zt: Zв: @@ -207,17 +213,17 @@ Mostrar grilla - + Interpolation grid: Grilla de interpolación: - + Type: Tipo: - + Bicubic Bicubico @@ -234,46 +240,52 @@ Desplazamiento automático - - - - - + + + + + + Open Abrir - - + + + + Reset Reiniciar - - + + + Send Enviar - + + Pause Pausar - - - - + + + + + Abort Abandono - + State Estado - + Work coordinates: Coordenadas de trabajo: @@ -282,58 +294,62 @@ 0 - + Machine coordinates: Coordenadas de máquina: - + Status: Estado: - + Control Control - + + Home Origen - - - - - - - - - + + + + + + + + + ... ... - + + Z-probe Medicion de Z - + + Zero XY Cero XY - + + Zero Z Cero Z - - + + Overriding @@ -351,28 +367,32 @@ - + + Restore origin Restaure el origen - + + Safe position Posición segura - + + Unlock Desbloquear - + Heightmap Mapa de alturas + Use heightmap Usar mapa de alturas @@ -387,7 +407,8 @@ Ausente - + + Create Crear @@ -396,12 +417,12 @@ Modo edición - - - - - - + + + + + + Spindle Husillo @@ -412,10 +433,11 @@ - - - - + + + + + Spindle on/off Husillo on/off @@ -432,45 +454,51 @@ % - + - - + + Jog Control manual - + + X- - + + Y- - + + X+ - + + Y+ - + Step: Pasos: - + + Z+ - + + Z- @@ -496,44 +524,44 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 - + Program - + &View - + &Windows @@ -543,187 +571,288 @@ - + + Edit - + + Show probe grid - + + Show interpolation grid - + Device - + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - + + Keyboard control Control desde teclado - + Visualizer Visualizador - + Console Consola - + Send command Enviar comando - + + Clear console Limpiar cosola - + &Device - + &Modification - + &Visualizer - + &Console - + + User command 1 + + + + + User command 2 + + + + + User command 3 + + + + + User command 4 + + + + + Spindle speed + + + + + + Spindle speed - + + + + + Jog step next + + + + + Jog step previous + + + + + Jog feed next + + + + + Jog feed previous + + + + + Feed override + + + + + + Feed override - + + + + + Rapid override + + + + + + Rapid override - + + + + + Spindle override + + + + + + Spindle override - + + + + + Feed override + + + + + Rapid speed override + + + + + Spindle speed override + + + + &File &Archivo - + &Recent files &Archivos recientes - + &Service &Servicio - + &Help &Ayuda - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Abrir - + E&xit S&alir - + &Settings &Opciones - + &New &Nuevo - + &Save &Guardar - + Save &as... Guardar &como... - + &About &Acerca de - + &Clear &Limpiar - + Save &transformed as... Salve &transformado como... @@ -754,7 +883,8 @@ En cola - + + Check Chequeo @@ -805,74 +935,74 @@ - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -883,38 +1013,38 @@ %1, %2, %3 - + G-code program file was changed. Save? El programa de G-code ha cambiado. Desea guardar? - + Heightmap file was changed. Save? El programa mapa de alturas ha cambiado. Desea guardar? - + Not connected Sin Conexión - + Probe Medición - + Opening file... - + Updating... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Archivos de G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -923,7 +1053,7 @@ Conectado - + Job done. Time elapsed: %1 Trabajo terminado. @@ -934,17 +1064,18 @@ Tiempo transcurrido: %1 Procesado - + Serial port error Error en puerto serie - + + Scroll Desplazamiento - + File sending in progress. Terminate and exit? Envio de archivo en progreso. Detener y salir? @@ -961,33 +1092,33 @@ Tiempo transcurrido: %1 Archivos de G-Code (*.nc *.ncc *.tap *.txt) - - - + + + Heightmap files (*.map) Mapa de alturas (*.map) - + Port opened Puerto se abrió - + Restore origin: %1, %2, %3 Restaure origen: %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Archivos de G-Code (*.nc *.ncc *.ngc *.tap *.txt);;Todos los archivos (*.*) - - + + Can't open file: No se puede abrir el archivo: @@ -1002,26 +1133,26 @@ Tiempo transcurrido: %1 Enviado - + Delete lines? Borrar lineas? - - - + + + (%1) - + Untitled Sin-título - - - + + + Save file as Guardar archivo como @@ -1030,7 +1161,7 @@ Tiempo transcurrido: %1 Archivos de G-Code (*.nc;*.ncc;*.tap) - + Changing grid settings will reset probe data. Continue? El cambio de configuraciones de grilla reiniciará los datos de medición. Desea continuar? @@ -1531,67 +1662,83 @@ Tiempo transcurrido: %1 + + Shortcuts + + + + + Command + Comando + + + + Text + + + + Font Fuente - + Size: Tamaño: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt Puntos - + (restart needed) (Se requiere reinicio) - + Set to defaults Opciones por defecto - + OK ОК - + Cancel Cancelar - + Reset settings to default values? Restablecer la configuración a sus valores predeterminados? diff --git a/src/translations/candle_fr.ts b/src/translations/candle_fr.ts index 337a376a..78cdaaab 100644 --- a/src/translations/candle_fr.ts +++ b/src/translations/candle_fr.ts @@ -115,32 +115,37 @@ grblControl - + G-code program Programme G-Code - + + Isometric view Vue isometrique - + + Top view Vue de dessus - + + Front view Vue de Face - + + Left view Vue de gauche - + + Fit Ajuster vue @@ -149,56 +154,57 @@ Paramètres palpage surfacique - + Border: Bords: - - - + + + X: X: - + H: - - - + + + Y: Y: - + W: - + + Show border Montrer bord - + Auto - + Probe grid: Grille de palpage: - + Zb: Zb: - + Zt: Zt: @@ -207,17 +213,17 @@ Montrer grille - + Interpolation grid: Espacement grille: - + Type: Type: - + Bicubic Bicubique @@ -234,46 +240,52 @@ Défilement auto - - - - - + + + + + + Open Ouvrir - - + + + + Reset Reinitialiser - - + + + Send Envoyer - + + Pause Pause - - - - + + + + + Abort Abandon - + State Etât - + Work coordinates: Coordonnées de travail: @@ -282,58 +294,62 @@ 0 - + Machine coordinates: Coordonnées machine: - + Status: Etât: - + Control Contrôle - + + Home Origine - - - - - - - - - + + + + + + + + + ... ... - + + Z-probe Palper Z - + + Zero XY Zero XY - + + Zero Z Zero Z - - + + Overriding @@ -351,28 +367,32 @@ - + + Restore origin Restituez l'origine - + + Safe position Position sûre - + + Unlock Desbloquer - + Heightmap Palpage surfacique + Use heightmap Utiliser palpage surfacique @@ -387,7 +407,8 @@ Absent - + + Create Créer @@ -396,12 +417,12 @@ Paramètres de palpage - - - - - - + + + + + + Spindle Broche @@ -412,10 +433,11 @@ - - - - + + + + + Spindle on/off Broche on/off @@ -432,45 +454,51 @@ % - + - - + + Jog Contrôle manuel - + + X- - + + Y- - + + X+ - + + Y+ - + Step: Pas: - + + Z+ - + + Z- @@ -496,44 +524,44 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 - + Program - + &View - + &Windows @@ -543,187 +571,288 @@ - + + Edit - + + Show probe grid - + + Show interpolation grid - + Device - + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - + + Keyboard control Contrôle avec le clavier - + Visualizer Apparence - + Console Console - + Send command Envoyer commande - + + Clear console Effacer consôle - + &Device - + &Modification - + &Visualizer - + &Console - + + User command 1 + + + + + User command 2 + + + + + User command 3 + + + + + User command 4 + + + + + Spindle speed + + + + + + Spindle speed - + + + + + Jog step next + + + + + Jog step previous + + + + + Jog feed next + + + + + Jog feed previous + + + + + Feed override + + + + + + Feed override - + + + + + Rapid override + + + + + + Rapid override - + + + + + Spindle override + + + + + + Spindle override - + + + + + Feed override + + + + + Rapid speed override + + + + + Spindle speed override + + + + &File &Fichier - + &Recent files &Fichiers recents - + &Service &Paramètres - + &Help &Aide - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Ouvrir - + E&xit Q&uitter - + &Settings &Reglages - + &New &Nouveau - + &Save &Enregistrer - + Save &as... Enregistrer &sous... - + &About &A propos de - + &Clear &Effacer - + Save &transformed as... Sauvez &transformé comme... @@ -754,7 +883,8 @@ En attente - + + Check Vérifié @@ -805,74 +935,74 @@ - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -883,22 +1013,22 @@ %1, %2, %3 - + G-code program file was changed. Save? Le programme G-code à changé. Sauvegarder? - + Heightmap file was changed. Save? Le fichier surface de palpage a changé. Sauvegarder? - + Not connected Non connecté - + Probe Palper @@ -907,7 +1037,7 @@ Connecté - + Job done. Time elapsed: %1 Travail terminé. @@ -918,17 +1048,18 @@ Temps écoulé: %1 Traité - + Serial port error Erreur port serie - + + Scroll Déplacement - + File sending in progress. Terminate and exit? Envoi de fichier en cours. Terminer et Sortir? @@ -937,38 +1068,38 @@ Temps écoulé: %1 Envoyé - - - + + + Heightmap files (*.map) Fichier de palpage (*.map) - + Restore origin: %1, %2, %3 Restituez l'origine: %1, %2, %3 - + Port opened Le port s'est ouvert - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) G-Code fichiers (*.nc *.ncc *.ngc *.tap *.txt);;Tous les fichiers (*.*) - + Opening file... - - + + Can't open file: Impossible d'ouvrir du fichier: @@ -983,42 +1114,42 @@ Temps écoulé: %1 Envoyé - + Delete lines? Effacer ligne? - + Updating... - - - + + + (%1) - + Untitled Sans titre - - - + + + Save file as Enregistrer le fichier sous - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) G-Code fichiers (*.nc *.ncc *.ngc *.tap *.txt) - + Changing grid settings will reset probe data. Continue? Changer les paramètres de la grille, réinitialise les données de palpage. Continuer? @@ -1519,67 +1650,83 @@ Temps écoulé: %1 + + Shortcuts + + + + + Command + Comande + + + + Text + + + + Font Ecriture - + Size: Taille: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt Points - + (restart needed) (Redémarrage nécessaire) - + Set to defaults Paramètres par default - + OK ОК - + Cancel Annuler - + Reset settings to default values? Réinitialiser les réglages par défaut? diff --git a/src/translations/candle_pt.ts b/src/translations/candle_pt.ts index a060c38f..4ce623a3 100644 --- a/src/translations/candle_pt.ts +++ b/src/translations/candle_pt.ts @@ -115,32 +115,37 @@ Controle GRBL - + G-code program Programa de G-Code - + + Isometric view Vista isométrica - + + Top view Vista Superior - + + Front view Vista Frontal - + + Left view Vista Esquerda - + + Fit Ajustar vista @@ -149,56 +154,57 @@ Ajuste de alturas - + Border: Bordas: - - - + + + X: X: - + H: H: - - - + + + Y: Y: - + W: W: - + + Show border Mostrar borda - + Auto - + Probe grid: Grade de medição: - + Zb: Zн: - + Zt: Zв: @@ -207,17 +213,17 @@ Mostrar grade - + Interpolation grid: Grade de interpolação: - + Type: Tipo: - + Bicubic Bicúbico @@ -234,46 +240,52 @@ Rolagem automática - - - - - + + + + + + Open Abrir - - + + + + Reset Reiniciar - - + + + Send Enviar - + + Pause Pausar - - - - + + + + + Abort Abortar - + State Estado - + Work coordinates: Coordenadas de trabalho: @@ -282,58 +294,62 @@ 0 - + Machine coordinates: Coordenadas da máquina: - + Status: Estado: - + Control Controle - + + Home Origem - - - - - - - - - + + + + + + + + + ... ... - + + Z-probe Medição de Z - + + Zero XY Zero XY - + + Zero Z Zero Z - - + + Overriding @@ -351,28 +367,32 @@ - + + Restore origin Restaure a origem - + + Safe position Posição segura - + + Unlock Desbloquear - + Heightmap Mapa de alturas + Use heightmap Usar mapa de alturas @@ -387,7 +407,8 @@ Ausente - + + Create Criar @@ -396,12 +417,12 @@ Modo edição - - - - - - + + + + + + Spindle Spindle @@ -412,10 +433,11 @@ - - - - + + + + + Spindle on/off Spindle on/off @@ -432,45 +454,51 @@ % - + - - + + Jog Controle manual - + + X- - + + Y- - + + X+ - + + Y+ - + Step: Passos: - + + Z+ - + + Z- @@ -496,44 +524,44 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 - + Program - + &View - + &Windows @@ -543,187 +571,288 @@ - + + Edit - + + Show probe grid - + + Show interpolation grid - + Device - + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - + + Keyboard control Controle por teclado - + Visualizer Visualizador - + Console Console - + Send command Enviar comando - + + Clear console Limpar cosole - + &Device - + &Modification - + &Visualizer - + &Console - + + User command 1 + + + + + User command 2 + + + + + User command 3 + + + + + User command 4 + + + + + Spindle speed + + + + + + Spindle speed - + + + + + Jog step next + + + + + Jog step previous + + + + + Jog feed next + + + + + Jog feed previous + + + + + Feed override + + + + + + Feed override - + + + + + Rapid override + + + + + + Rapid override - + + + + + Spindle override + + + + + + Spindle override - + + + + + Feed override + + + + + Rapid speed override + + + + + Spindle speed override + + + + &File &Arquivo - + &Recent files &Arquivos recentes - + &Service &Serviço - + &Help &Ajuda - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Abrir - + E&xit S&air - + &Settings &Opções - + &New &Novo - + &Save &Salvar - + Save &as... Salvar &como... - + &About &Sobre - + &Clear &Limpar - + Save &transformed as... Salvar &transformado como... @@ -754,7 +883,8 @@ Em fila - + + Check Checar @@ -805,74 +935,74 @@ - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -883,38 +1013,38 @@ %1, %2, %3 - + G-code program file was changed. Save? O programa G-code foi alterado. Deseja salvar? - + Heightmap file was changed. Save? O arquivo mapa de alturas foi alterado. Deseja salvar? - + Not connected Sem Conexão - + Probe Medição - + Opening file... - + Updating... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Arquivos G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -923,7 +1053,7 @@ Conectado - + Job done. Time elapsed: %1 Trabalho terminado. @@ -934,17 +1064,18 @@ Tempo transcorrido: %1 Processado - + Serial port error Erro na porta serial - + + Scroll Rolagem - + File sending in progress. Terminate and exit? Envio de arquivo en progreso. Terminar e sair? @@ -961,33 +1092,33 @@ Tempo transcorrido: %1 Arquivos G-Code (*.nc *.ncc *.tap *.txt) - - - + + + Heightmap files (*.map) Mapa de alturas (*.map) - + Port opened Porta aberta - + Restore origin: %1, %2, %3 Restaure origem: %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Arquivos G-Code (*.nc *.ncc *.tap *.txt);;Todos os arquivos (*.*) - - + + Can't open file: Não foi possível abrir o arquivo: @@ -1002,26 +1133,26 @@ Tempo transcorrido: %1 Enviado - + Delete lines? Apagar linhas? - - - + + + (%1) - + Untitled Sem-título - - - + + + Save file as Salvar arquivo como @@ -1030,7 +1161,7 @@ Tempo transcorrido: %1 Arquivos G-Code (*.nc;*.ncc;*.tap) - + Changing grid settings will reset probe data. Continue? A alteração nas configurações de grade reiniciará os dados de medição. Deseja continuar? @@ -1531,67 +1662,83 @@ Tempo transcorrido: %1 + + Shortcuts + + + + + Command + Comando + + + + Text + + + + Font Fonte - + Size: Tamanho: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt - + (restart needed) (Requer reinicio) - + Set to defaults Opções padrão - + OK ОК - + Cancel Cancelar - + Reset settings to default values? Redefinir as configurações para os valores padrão? diff --git a/src/translations/candle_ru.qm b/src/translations/candle_ru.qm index cf8a5bbbd77c6746527c8286a42e1753a6f8ffed..5fc43c8d3a2d8b2340be392ff14e9a0f27823820 100644 GIT binary patch delta 3901 zcmb`J3sjT$8OGlv|1Tk5E`U)4M2yHyAY8&Ngdl>TT)iubHz))Rt4IN{c-qFUb+yzv zUBoHghFVcaPgPb$ywIw&1E;J&ftU}`SN|wdwbqL zG;S4~`dDB#G~~Os-q}=jdbmeZPR-GdL?S8SYlQU&zQTx<0#TGJ2)(Er5U;2^;4<9z6}TGD&muCjMxr4f6LGN!Ji*SybKo8# zZ7ujaqHquJBTx_G{_q*#VXz!L3a$lP!TsPV@K4}r@HUYoj%fT8unep~JxU_QXLd%O zr3n=7jEsmVA{5L9CnD3IqfqPn?}#!Pk?TmJNm)dmYwS!=5zRbCqdz=_29O(IGhPF!d* zQu&%Vot|iTIB^At;+0O^rX(W&JP>+0TG)3lW&Ve66cee&8B zLzV%;F!!hrDWVybM72`XK``2xbi1vLvdj_snqwYP>dlQr0}fMK{y&J~#FTLug$$0R z=|1j62^lnfWfj~IL|OhwZOmrMGU4+v?UYru9M{*>J(&hCrV5nbpb)2af$NAr5~*!mMh!~P~T ze(ORMI7j$?Q#Jy9D_nEyEh0Z3VeL9pEWIe)69~KTuELWyZlGhe!b>ZmlO_~ie-8$C zF@bZy22s*->mc-^lnx9nG*>k959TJAUnSbuGJq)KnrL&^To|`R)F3&7PE2Hj8&I+C z3iJK?EE4f!K?X;RrjUiEV;S6ASi$kPi5yj|sI&!BFJk4MSRfBMtFXGnv4p+*O(mZ9 zW~;n7jJS)fPd!2uTf^3;`=C>GY^OQOf(vKat_I9Vb)MC=VP*p-vW8WtV3aRA#-qh? z@vK7t8_IUD?qe5FnSs;(s+%Y|n~M;PgMHh$>DENNe&q68u(57xZb3#kJQBk#*l-;D z8E1;#1AA}bN(VGTx0+kA2iKDWIJ2c5EgrpwTe}zMNQRE9UKa$Phj5$HaKqTC+@>GB zVIDcRed{z_zr^jdnls=&w|74(6Q1Mt9xNjYd53G36~aSbaLti0b4W6GBie|A= zU@t~~FBXY!6B)LP2t+}2PAOu zZSflkdbC_3e*cwvm?lA7eGiF_8!Wy#<^#CC5X548pA_GDV=@BmldvDRpo71V1o=TH z^Qa{3Ry(#NOA_P$06Z#54)w%hZ(efr< zeJYSBXc~ybf_Czw)dO(=e$MCX7}hY?PJ@Uy?nJ9qk#@$t$s2bq$2Mf}#zQ!@Rom>0 z+s_xLFUA%H*qK_$zw2(o{!1v#ZDU6vJgzJeouvaI6r1sp&%vK7|%T9cg_ z+hqsRDv9*rU^Vt%UxZ&!xqdg;2ws()SPj?v+>@PKf=XnwW#0wj*bi+4e~rHzuAl`h z2iJn_vPVZCn6yI9&v*@{ESFE7j)aBLc7`bBukJ&FZvT>(-Gh#&OkSHa2p!Ip*S=-m zMl`5X-gw{y++Qefyo1@w|1Li)0LOO7?JmxdcX`1yj_2jw0(Y3oPvKQO5oSwPgs6hC zR>=xOCpzI*q!?HAXSiFgn7x#6R4j|a$cC*_{9b+*y6Y4dufxRrGDWAj z1ncErWw|BsG)FE`CQqtBqO+AL?bXO@p>j?e4zR%8AP%s=Zsn4$F0B7eWwQ<=5BjI_ z;>AMzBhaF}+&UFond_)Z!E@1990Nnq(9u&Ir!=E6>c2Q%dW3^-$d`7;*El{rk9vID zO*q!KieM(;a2JRA5(f_#vzocHQEW86BblC!WjZ#2)GQv?B3LLJ$8-+3oy2%4#u|P6+ok`hzC5z9)Ff|7-qxuzn4Rnq%KLZqg^9x=zqVp(=Ib>RP`r|F~jSWaWv=Q*-| zr)RCitYgD^iV3xq7HKQifPz!;ihEpg0*l4F2sVa|$MsM)p+{ShwrIY(z*>Bf@%6Gk ziR%Aj0CR7Icw5{EmTrskbPVU77{w*Va?_&4rG4UPnLpABf9Vo*ECwZD;cUaR>X()o zi~Fx3;)UAJCT~}_i`$a7iT6#ueypz_GY3D%9DPR-^OQ}TCg&ELdQI1lO}mX@9qkO*M{JV@?KsdZ_t3?n-L|VtWJwj5S>Vj_z1?hrfO=a zHE}j%jG{(s04-^iRe1(9iWL$=JE8G0gQB$!MS{_2r-L!(Y<6dMetY+O-2XZM^L=0b zRn>Mx<;ZMV8PNNnw&v=DpstdmpAX~!x&i9)5ExFWHu1DoaBCSC&&`c=UVl4&ij`9fX~MPhu8*Kt^iU7pr7wy#(nZ65d8!B zXTVlUen##fIp21aY$v%`=4k-YBK`}lxSuj>5YoWD=+`6a@1byp2$7b! zQB3Kkl6W5^H@j&^>IpX;&Qc-Fk(h_s_YVTz?U=LjMS9_X>(aEfiXUqCGW$ z^#T@0u(Zt6SiG9!nL}7yvkRCIi6tFp$$l*9xden{!#=JW$leY6Dz3{OgT3KXmi&{4 z5zAn2q_l|hu=j0&1JjGKv~-Ly`U=Z5To_sBVQv~K|G)xfT)>;Hd;t#Nm_qj>tZ3TK zc3Dm6@olB^^>}z`4l_7gWx7iNd-0!3zaq%U%|mk}h`2bS}A2 z98fV;hU4OMN9Rpiua_pj{~VZFAx%-uWE_X2B6lHHr?kSa9tcR2%I77r=lN3k$6t^R zX>|%)kE9qr$5uIIj3b9+cjIW z)9JWX^WLj2W?_*-^I+>jZWy5ze?CmB-qqT|xnRaJZNm5cbYMiAW*K8f7Hae2gBhC1 z+BdQ-RQ#rPPiHSPFsiK?isASX?dc6|%ut~&^FMSZMWw5{Mp*!azjTtkKg-pV;|Ei z|4nW+?4`wb;mJPU2a}Zg5??x$uhefl2KWvtZRalX{O9SF zwg>Eu@`KW@BBwo6JYhSbjD)b~<{Qd$m4)*z8$;F=Ftr`VIGGXa+s}9*S%y7KJ!}5y28B$V%f8N>s%AQb34S^P8dtd9-_KcW t4RB>y>$R@(NUP|oi=Cixy`8*N?JCIlhu&3`cUyLCEr?aSt{48O{ssO#6U6`k diff --git a/src/translations/candle_ru.ts b/src/translations/candle_ru.ts index 6b1f7422..5b50eb9e 100644 --- a/src/translations/candle_ru.ts +++ b/src/translations/candle_ru.ts @@ -139,32 +139,37 @@ frmMain - + G-code program G-code программа - + + Isometric view Изометрия - + + Top view Вид сверху - + + Front view Вид спереди - + + Left view Вид слева - + + Fit Вписать @@ -173,56 +178,57 @@ Настройки карты высот - + Border: Границы: - - - + + + X: - + H: В: - + W: Ш: - - - + + + Y: - + Auto Авто - + + Show border Показать границы - + Probe grid: Сетка зондирования: - + Zb: Zн: - + Zt: Zв: @@ -231,17 +237,17 @@ Показать сетку - + Interpolation grid: Сетка интерполяции: - + Type: Тип: - + Bicubic Бикубический @@ -258,12 +264,12 @@ Автопрокрутка - + State Состояние - + Control Управление @@ -276,18 +282,19 @@ Восстановить XYZ - + &Recent files &Недавние файлы - + &Open &Открыть - - + + + Send Отправить @@ -300,46 +307,49 @@ Автопрокрутка - - + + + + Reset Сброс - + + Pause Пауза - + Work coordinates: Рабочие координаты: - + Machine coordinates: Машинные координаты: - + Status: Статус: - + Not connected Нет соединения - - - - - - - - - + + + + + + + + + ... @@ -348,12 +358,14 @@ Поиск стола - + + Zero XY Обнулить XY - + + Zero Z Обнулить Z @@ -362,7 +374,8 @@ Вернуться в XY(Z) - + + Z-probe Z-щуп @@ -371,18 +384,20 @@ Безопасная Z - + + Unlock Разблокировать - + Heightmap Карта высот + Use heightmap Использовать карту высот @@ -397,7 +412,8 @@ Отсутствует - + + Create Создать @@ -406,12 +422,12 @@ Редактирование - - - - - - + + + + + + Spindle Шпиндель @@ -422,10 +438,11 @@ - - - - + + + + + Spindle on/off Вкл/выкл шпиндель @@ -438,20 +455,21 @@ Переопределить: - + - - + + Jog Перемещение - + Step: Шаг: - + + X- @@ -461,52 +479,60 @@ - - - - + + + + + Abort Прервать - + + Restore origin Восстановить СК - + + Safe position Безопасное положение - - + + Overriding Коррекция - + + Y- - + + X+ - + + Y+ - + + Z+ - + + Z- @@ -520,119 +546,122 @@ Команды - + + Stop Стоп - + Continuously Непрерывно - + 0.01 - + 0.1 - + 1 - + 5 - - + + 10 - - + + 100 - + Feed: Подача: - + 500 - + 50 - + 1000 - + 2000 - + + Keyboard control Управление с клавиатуры - + Console Консоль - + Send command Отправить команду - + + Clear console Очистить консоль - + &File &Файл - + Program Программа - + &Service &Сервис - + &Help С&правка - + &View &Вид - + &Windows &Окна @@ -642,102 +671,200 @@ Модификация - + + Edit Редактирование - + + Show probe grid Показать сетку зондирования - + + Show interpolation grid Показать сетку интерполяции - + Device Устройство - + Visualizer Визуализатор - + _spacerTop - + _spacerLeft - + _spacerRight - + E&xit Вы&ход - + &Settings &Настройки - + + User command 1 + Пользовательская команда 1 + + + + User command 2 + Пользовательская команда 2 + + + + User command 3 + Пользовательская команда 3 + + + + User command 4 + Пользовательская команда 4 + + + + Spindle speed + + Скорость шпинделя + + + + + Spindle speed - + Скорость шпинделя - + + + + Jog step next + Шаг перемещения следующий + + + + Jog step previous + Шаг перемещения предыдущий + + + + Jog feed next + Подача перемещения следующая + + + + Jog feed previous + Подача перемещения предыдущая + + + + Feed override + + Коррекция подачи + + + + + Feed override - + Коррекция подачи - + + + + Rapid override + + Коррекция перемещений + + + + + Rapid override - + Коррекция перемещений - + + + + Spindle override + + Коррекция шпинделя + + + + + Spindle override - + Коррекция шпинделя - + + + + Feed override + Коррекция подачи + + + + Rapid speed override + Коррекция быстрых перемещений + + + + Spindle speed override + Коррекция скорости шпинделя + + + &New &Новый - + &Save &Сохранить - + Save &as... Сохранить &как... - + &About &О программе - + &Clear &Очистить - + Save &transformed as... Сохранить &преобразованный как... - + &Device &Устройство - + &Modification &Модификация - + &Visualizer &Визуализатор - + &Console &Консоль @@ -757,7 +884,8 @@ Работа - + + Home Домой @@ -774,7 +902,8 @@ Пауза - + + Check Проверка @@ -825,76 +954,76 @@ Больше не показывать - + PS: %1 СВ: %1 - + AS: %1 СУ: %1 - + F/S: %1 / %2 П/Ш: %1 / %2 - + Error message(s) received: Ошибка(и) при передаче файла: - + Buffer: %1 / %2 / %3 Буфер: %1 / %2 / %3 - + Following commands will be sent before selected line: Следующие команды будут отправлены перед выбранной строкой: - + Skip Пропустить - + (%1/%2/%3) - + (%1/%2) - + C Н - + Applying heightmap... Применяется карты высот... - + Subdividing segments... Разбиение отрезков... - + Updating Z-coordinates... Обновление Z-координат... - + Modifying G-code program... Правка G-код программы... @@ -905,23 +1034,23 @@ %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Файлы G-Code (*.nc *.ncc *.ngc *.tap *.txt);;Все файлы (*.*) - + Opening file... Загрузка файла... - + Updating... Обновление... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Файлы G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -930,7 +1059,7 @@ Файл был изменен. Сохранить? - + Job done. Time elapsed: %1 Задание выполнено. @@ -945,25 +1074,26 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap *.txt);;Все файлы (*.*) - + Delete lines? Удалить строки? - + + Scroll Прокрутка - + Restore origin: %1, %2, %3 Восстановить СК: %1, %2, %3 - + File sending in progress. Terminate and exit? Идет процесс отправки файла. Прервать и выйти из программы? @@ -972,15 +1102,15 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap);;Все файлы (*.*) - - - + + + Heightmap files (*.map) Файлы карт высот (*.map) - - + + Can't open file: Ошибка при открытии файла: @@ -991,14 +1121,14 @@ Time elapsed: %1 Отправлена - - - + + + (%1) - + Untitled Без имени @@ -1007,7 +1137,7 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap *.txt) - + Changing grid settings will reset probe data. Continue? Изменение сетки зондирования приведет к очистке табличных данных. Продолжить? @@ -1016,22 +1146,22 @@ Time elapsed: %1 Подключен - + G-code program file was changed. Save? Файл G-code программы был изменен. Сохранить? - + Heightmap file was changed. Save? Файл карты высот был изменен. Сохранить? - + Probe Зонд - + Port opened Порт открыт @@ -1040,7 +1170,7 @@ Time elapsed: %1 Обработана - + Serial port error Ошибка последовательного порта @@ -1049,18 +1179,19 @@ Time elapsed: %1 Буфер/очередь: %1 / %2 - - - + + + Save file as Сохранить файл как - - - - - + + + + + + Open Открыть @@ -1407,52 +1538,68 @@ Time elapsed: %1 + + Shortcuts + Быстрые клавиши + + + + Command + Команда + + + + Text + Текст + + + Font Шрифт - + Size: Размер: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt пт - + (restart needed) (необходим перезапуск) - + Set to defaults По умолчанию @@ -1708,17 +1855,17 @@ Time elapsed: %1 Отображать команды G-code программы в консоли - + OK ОК - + Cancel Отмена - + Reset settings to default values? Восстановить значения по-умолчанию? diff --git a/src/widgets/sliderbox.cpp b/src/widgets/sliderbox.cpp index a34292f5..d1c40370 100644 --- a/src/widgets/sliderbox.cpp +++ b/src/widgets/sliderbox.cpp @@ -92,6 +92,11 @@ void SliderBox::setRatio(int ratio) m_ratio = ratio; } +void SliderBox::click() +{ + ui->chkTitle->click(); +} + void SliderBox::on_txtValue_editingFinished() { ui->sliValue->setValue(ui->txtValue->value() / this->ratio()); diff --git a/src/widgets/sliderbox.h b/src/widgets/sliderbox.h index 76468f27..b126478f 100644 --- a/src/widgets/sliderbox.h +++ b/src/widgets/sliderbox.h @@ -50,15 +50,14 @@ class SliderBox : public QWidget void valueChanged(); void toggled(bool checked); +public slots: + void click(); + private slots: void onTimerValueChanged(); - void on_txtValue_editingFinished(); - void on_sliValue_actionTriggered(int action); - void on_sliValue_valueChanged(int value); - void on_chkTitle_toggled(bool checked); private: From c0ba82c8e5bea37ac13e9329123a48cee12d6fc1 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sun, 3 Nov 2019 13:39:59 +0500 Subject: [PATCH 09/80] Settings defaults updated. --- src/frmmain.cpp | 1 + src/frmmain.ui | 18 +++++++++++++++++- src/frmsettings.cpp | 26 ++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 0af05be2..53002b45 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -611,6 +611,7 @@ void frmMain::loadSettings() addAction(ui->actHeightmapShowProbeGrid); addAction(ui->actHeightmapShowInterpolationGrid); + addAction(ui->actJogStop); addAction(ui->actJogStepNext); addAction(ui->actJogStepPrevious); addAction(ui->actJogFeedNext); diff --git a/src/frmmain.ui b/src/frmmain.ui index 4581a5ea..57580ae9 100644 --- a/src/frmmain.ui +++ b/src/frmmain.ui @@ -1224,7 +1224,7 @@ QLabel[overrided="false"] { 0 - 0 + -588 320 878 @@ -3923,5 +3923,21 @@ padding-right: 8; + + actJogStop + triggered() + cmdStop + click() + + + -1 + -1 + + + 96 + 1023 + + + diff --git a/src/frmsettings.cpp b/src/frmsettings.cpp index b543c785..4db3ec2c 100644 --- a/src/frmsettings.cpp +++ b/src/frmsettings.cpp @@ -742,7 +742,33 @@ void frmSettings::on_cmdDefaults_clicked() setFontSize(9); // Shortcuts + QMap d; + d["actFileNew"] = "Ctrl+N"; + d["actFileOpen"] = "Ctrl+O"; + d["actFileSave"] = "Ctrl+S"; + d["actFileSaveAs"] = "Ctrl+Shift+S"; + d["actJogXPlus"] = "Num+6"; + d["actJogXMinus"] = "Num+4"; + d["actJogYPlus"] = "Num+8"; + d["actJogYMinus"] = "Num+2"; + d["actJogZPlus"] = "Num+9"; + d["actJogZMinus"] = "Num+3"; + d["actJogStop"] = "Num+5"; + d["actJogStepNext"] = "Num+1"; + d["actJogStepPrevious"] = "Num+7"; + d["actJogFeedNext"] = "Num++"; + d["actJogFeedPrevious"] = "Num+-"; + d["actJogKeyboardControl"] = "ScrollLock"; + d["actSpindleOnOff"] = "Num+0"; + d["actSpindleSpeedPlus"] = "Num+*"; + d["actSpindleSpeedMinus"] = "Num+/"; + QTableWidget *table = ui->tblShortcuts; + + for (int i = 0; i < table->rowCount(); i++) { + QString s = table->item(i, 0)->data(Qt::DisplayRole).toString(); + table->item(i, 2)->setData(Qt::DisplayRole, d.keys().contains(s) ? d[s] : ""); + } } void frmSettings::on_cboFontSize_currentTextChanged(const QString &arg1) From 8b9ae300592a3a6f637b8c04987dfd23d17a0cb4 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sun, 3 Nov 2019 18:07:28 +0500 Subject: [PATCH 10/80] Command evaluation added. --- src/candle.pro | 8 +- src/frmmain.cpp | 165 +++++++++++++++-- src/frmmain.h | 13 +- src/frmmain.ui | 20 +- src/scriptvars.cpp | 446 +++++++++++++++++++++++++++++++++++++++++++++ src/scriptvars.h | 209 +++++++++++++++++++++ 6 files changed, 838 insertions(+), 23 deletions(-) create mode 100644 src/scriptvars.cpp create mode 100644 src/scriptvars.h diff --git a/src/candle.pro b/src/candle.pro index 3356b518..7285b608 100644 --- a/src/candle.pro +++ b/src/candle.pro @@ -4,7 +4,7 @@ # #------------------------------------------------- -QT = core gui opengl serialport +QT = core gui opengl serialport script greaterThan(QT_MAJOR_VERSION, 4): QT += widgets win32: { @@ -66,7 +66,8 @@ SOURCES += main.cpp\ widgets/slider.cpp \ widgets/sliderbox.cpp \ drawers/selectiondrawer.cpp \ - widgets/comboboxkey.cpp + widgets/comboboxkey.cpp \ + scriptvars.cpp HEADERS += frmmain.h \ frmsettings.h \ @@ -98,7 +99,8 @@ HEADERS += frmmain.h \ widgets/slider.h \ widgets/sliderbox.h \ drawers/selectiondrawer.h \ - widgets/comboboxkey.h + widgets/comboboxkey.h \ + scriptvars.h FORMS += frmmain.ui \ frmsettings.ui \ diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 53002b45..021390ab 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -336,6 +336,10 @@ frmMain::frmMain(QWidget *parent) : if (qApp->arguments().count() > 1 && isGCodeFile(qApp->arguments().last())) { loadFile(qApp->arguments().last()); } + + // Delegate vars to script engine + QScriptValue vars = m_scriptEngine.newQObject(&m_scriptVars); + m_scriptEngine.globalObject().setProperty("vars", vars); } frmMain::~frmMain() @@ -906,21 +910,18 @@ void frmMain::openPort() } } -void frmMain::sendCommand(QString command, int tableIndex, bool showInConsole) +void frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, bool queue) { if (!m_serialPort.isOpen() || !m_resetCompleted) return; - command = command.toUpper(); - // Commands queue - if ((bufferLength() + command.length() + 1) > BUFFERLENGTH) { -// qDebug() << "queue:" << command; - + if (queue || (bufferLength() + command.length() + 1) > BUFFERLENGTH) { CommandQueue cq; cq.command = command; cq.tableIndex = tableIndex; cq.showInConsole = showInConsole; + cq.queue = queue; m_queue.append(cq); return; @@ -931,13 +932,13 @@ void frmMain::sendCommand(QString command, int tableIndex, bool showInConsole) // if (!(command == "$G" && tableIndex < -1) && !(command == "$#" && tableIndex < -1) // && (!m_transferringFile || (m_transferringFile && m_showAllCommands) || tableIndex < 0)) { if (showInConsole) { - ui->txtConsole->appendPlainText(command); + ui->txtConsole->appendPlainText(command.toUpper()); ca.consoleIndex = ui->txtConsole->blockCount() - 1; } else { ca.consoleIndex = -1; } - ca.command = command; + ca.command = command.toUpper(); ca.length = command.length() + 1; ca.tableIndex = tableIndex; @@ -1032,6 +1033,11 @@ void frmMain::onSerialPortReadyRead() ui->txtMPosX->setValue(mpx.cap(1).toDouble()); ui->txtMPosY->setValue(mpx.cap(2).toDouble()); ui->txtMPosZ->setValue(mpx.cap(3).toDouble()); + + // Update script vars + m_scriptVars.setMx(ui->txtMPosX->value()); + m_scriptVars.setMy(ui->txtMPosY->value()); + m_scriptVars.setMz(ui->txtMPosZ->value()); } // Status @@ -1161,6 +1167,11 @@ void frmMain::onSerialPortReadyRead() // ui->txtWPosX->setText(QString::number(ui->txtMPosX->text().toDouble() - workOffset.x(), 'f', prec)); // ui->txtWPosY->setText(QString::number(ui->txtMPosY->text().toDouble() - workOffset.y(), 'f', prec)); // ui->txtWPosZ->setText(QString::number(ui->txtMPosZ->text().toDouble() - workOffset.z(), 'f', prec)); + + // Update script vars + m_scriptVars.setWx(ui->txtWPosX->value()); + m_scriptVars.setWy(ui->txtWPosY->value()); + m_scriptVars.setWz(ui->txtWPosZ->value()); // Update tool position QVector3D toolPosition; @@ -1310,19 +1321,24 @@ void frmMain::onSerialPortReadyRead() m_updateParserStatus = true; } + // Offsets + if (ca.command == "$#" && ca.tableIndex == -1) { + storeOffsetsVars(response); + } + // Store origin if (ca.command == "$#" && ca.tableIndex == -2) { qDebug() << "Received offsets:" << response; - QRegExp rx(".*G92:([^,]*),([^,]*),([^\\]]*)"); + static QRegExp g92(".*G92:([^,]*),([^,]*),([^\\]]*)"); - if (rx.indexIn(response) != -1) { + if (g92.indexIn(response) != -1) { if (m_settingZeroXY) { m_settingZeroXY = false; - m_storedX = toMetric(rx.cap(1).toDouble()); - m_storedY = toMetric(rx.cap(2).toDouble()); + m_storedX = toMetric(g92.cap(1).toDouble()); + m_storedY = toMetric(g92.cap(2).toDouble()); } else if (m_settingZeroZ) { m_settingZeroZ = false; - m_storedZ = toMetric(rx.cap(3).toDouble()); + m_storedZ = toMetric(g92.cap(3).toDouble()); } ui->cmdRestoreOrigin->setToolTip(QString(tr("Restore origin:\n%1, %2, %3")).arg(m_storedX).arg(m_storedY).arg(m_storedZ)); } @@ -1343,6 +1359,16 @@ void frmMain::onSerialPortReadyRead() m_queue.clear(); } + // Update probe coords on user commands + if (ca.command.contains("G38.2") && ca.tableIndex < 0) { + static QRegExp PRB(".*PRB:([^,]*),([^,]*),([^]^:]*)"); + if (PRB.indexIn(response) != -1) { + m_scriptVars.setPRBx(PRB.cap(1).toDouble()); + m_scriptVars.setPRBy(PRB.cap(2).toDouble()); + m_scriptVars.setPRBz(PRB.cap(3).toDouble()); + } + } + // Process probing on heightmap mode only from table commands if (ca.command.contains("G38.2") && m_heightMapMode && ca.tableIndex > -1) { // Get probe Z coordinate @@ -1407,10 +1433,14 @@ void frmMain::onSerialPortReadyRead() // Check queue if (m_queue.length() > 0) { + qDebug() << "queue:" << m_queue.count(); CommandQueue cq = m_queue.takeFirst(); + while ((bufferLength() + cq.command.length() + 1) <= BUFFERLENGTH) { - sendCommand(cq.command, cq.tableIndex, cq.showInConsole); - if (m_queue.isEmpty()) break; else cq = m_queue.takeFirst(); + cq.command = evaluateCommand(cq.command); + if (!cq.command.isEmpty()) sendCommand(cq.command, cq.tableIndex, cq.showInConsole); + if (!cq.command.isEmpty() && (m_queue.isEmpty() || cq.queue)) break; + else cq = m_queue.takeFirst(); } } @@ -2227,6 +2257,89 @@ void frmMain::restoreOffsets() .arg(toMetric(ui->txtWPosZ->value())), -1, m_settings->showUICommands()); } +void frmMain::storeOffsetsVars(QString response) +{ + static QRegExp G54(".*G54:([^,]*),([^,]*),([^\\]]*)"); + static QRegExp G55(".*G55:([^,]*),([^,]*),([^\\]]*)"); + static QRegExp G56(".*G56:([^,]*),([^,]*),([^\\]]*)"); + static QRegExp G57(".*G57:([^,]*),([^,]*),([^\\]]*)"); + static QRegExp G58(".*G58:([^,]*),([^,]*),([^\\]]*)"); + static QRegExp G59(".*G59:([^,]*),([^,]*),([^\\]]*)"); + static QRegExp G28(".*G28:([^,]*),([^,]*),([^\\]]*)"); + static QRegExp G30(".*G30:([^,]*),([^,]*),([^\\]]*)"); + static QRegExp G92(".*G92:([^,]*),([^,]*),([^\\]]*)"); + static QRegExp TLO(".*TLO:([^,]*),([^,]*),([^\\]]*)"); + static QRegExp PRB(".*PRB:([^,]*),([^,]*),([^\\]]*)"); + + if (G54.indexIn(response) != -1) { + m_scriptVars.setG54x(G54.cap(1).toDouble()); + m_scriptVars.setG54y(G54.cap(2).toDouble()); + m_scriptVars.setG54z(G54.cap(3).toDouble()); + } + + if (G55.indexIn(response) != -1) { + m_scriptVars.setG55x(G55.cap(1).toDouble()); + m_scriptVars.setG55y(G55.cap(2).toDouble()); + m_scriptVars.setG55z(G55.cap(3).toDouble()); + } + + if (G56.indexIn(response) != -1) { + m_scriptVars.setG56x(G56.cap(1).toDouble()); + m_scriptVars.setG56y(G56.cap(2).toDouble()); + m_scriptVars.setG56z(G56.cap(3).toDouble()); + } + + if (G57.indexIn(response) != -1) { + m_scriptVars.setG57x(G57.cap(1).toDouble()); + m_scriptVars.setG57y(G57.cap(2).toDouble()); + m_scriptVars.setG57z(G57.cap(3).toDouble()); + } + + if (G58.indexIn(response) != -1) { + m_scriptVars.setG58x(G58.cap(1).toDouble()); + m_scriptVars.setG58y(G58.cap(2).toDouble()); + m_scriptVars.setG58z(G58.cap(3).toDouble()); + } + + if (G59.indexIn(response) != -1) { + m_scriptVars.setG59x(G59.cap(1).toDouble()); + m_scriptVars.setG59y(G59.cap(2).toDouble()); + m_scriptVars.setG59z(G59.cap(3).toDouble()); + } + + if (G28.indexIn(response) != -1) { + m_scriptVars.setG28x(G28.cap(1).toDouble()); + m_scriptVars.setG28y(G28.cap(2).toDouble()); + m_scriptVars.setG28z(G28.cap(3).toDouble()); + } + + if (G30.indexIn(response) != -1) { + m_scriptVars.setG30x(G30.cap(1).toDouble()); + m_scriptVars.setG30y(G30.cap(2).toDouble()); + m_scriptVars.setG30z(G30.cap(3).toDouble()); + } + + if (G92.indexIn(response) != -1) { + m_scriptVars.setG92x(G92.cap(1).toDouble()); + m_scriptVars.setG92y(G92.cap(2).toDouble()); + m_scriptVars.setG92z(G92.cap(3).toDouble()); + } + + if (TLO.indexIn(response) != -1) { + m_scriptVars.setTLOx(TLO.cap(1).toDouble()); + m_scriptVars.setTLOy(TLO.cap(2).toDouble()); + m_scriptVars.setTLOz(TLO.cap(3).toDouble()); + } + + if (PRB.indexIn(response) != -1) { + m_scriptVars.setPRBx(PRB.cap(1).toDouble()); + m_scriptVars.setPRBy(PRB.cap(2).toDouble()); + m_scriptVars.setPRBz(PRB.cap(3).toDouble()); + } + + qDebug() << "Storing vars:" << m_scriptVars.PRBx(); +} + void frmMain::sendNextFileCommands() { if (m_queue.length() > 0) return; @@ -2626,7 +2739,7 @@ void frmMain::on_cmdTouch_clicked() QStringList list = m_settings->touchCommand().split(";"); foreach (QString cmd, list) { - sendCommand(cmd.trimmed(), -1, m_settings->showUICommands()); + sendCommand(cmd.trimmed(), -1, m_settings->showUICommands(), list.indexOf(cmd)); } } @@ -2682,7 +2795,7 @@ void frmMain::on_cmdSafePosition_clicked() QStringList list = m_settings->safePositionCommand().split(";"); foreach (QString cmd, list) { - sendCommand(cmd.trimmed(), -1, m_settings->showUICommands()); + sendCommand(cmd.trimmed(), -1, m_settings->showUICommands(), list.indexOf(cmd)); } } @@ -4018,7 +4131,7 @@ void frmMain::onCmdUserClicked(bool checked) QStringList list = m_settings->userCommands(i).split(";"); foreach (QString cmd, list) { - sendCommand(cmd.trimmed(), -1, m_settings->showUICommands()); + sendCommand(cmd.trimmed(), -1, m_settings->showUICommands(), list.indexOf(cmd)); } } @@ -4082,6 +4195,22 @@ void frmMain::jogStep() } } +QString frmMain::evaluateCommand(QString command) +{ + // Evaluate script + static QRegExp sx("\\{([^\\}]+)\\}"); + QScriptValue v; + QString vs; + while (sx.indexIn(command) != -1) { + qDebug() << sx.cap(0) << command; + v = m_scriptEngine.evaluate(sx.cap(1)); + vs = v.isUndefined() ? "" : v.toString(); + command.replace(sx.cap(0), vs); + } + qDebug() << "command:" << command; + return command; +} + void frmMain::on_cmdYPlus_pressed() { m_jogVector += QVector3D(0, 1, 0); diff --git a/src/frmmain.h b/src/frmmain.h index 4b2b0038..e1af0d06 100644 --- a/src/frmmain.h +++ b/src/frmmain.h @@ -16,6 +16,7 @@ #include #include #include +#include #include #include "parser/gcodeviewparse.h" @@ -40,6 +41,8 @@ #include "frmsettings.h" #include "frmabout.h" +#include "scriptvars.h" + #ifdef WINDOWS #include #include "shobjidl.h" @@ -61,6 +64,7 @@ struct CommandQueue { QString command; int tableIndex; bool showInConsole; + bool queue; }; class CancelException : public std::exception { @@ -328,9 +332,14 @@ private slots: // Jog QVector3D m_jogVector; + // Recent files QStringList m_recentFiles; QStringList m_recentHeightmaps; + // Script + QScriptEngine m_scriptEngine; + ScriptVars m_scriptVars; + void loadFile(QString fileName); void loadFile(QList data); void clearTable(); @@ -340,7 +349,8 @@ private slots: bool saveChanges(bool heightMapMode); void updateControlsState(); void openPort(); - void sendCommand(QString command, int tableIndex = -1, bool showInConsole = true); + void sendCommand(QString command, int tableIndex = -1, bool showInConsole = true, bool queue = false); + QString evaluateCommand(QString command); void grblReset(); int bufferLength(); void sendNextFileCommands(); @@ -379,6 +389,7 @@ private slots: void restoreParserState(); void storeOffsets(); void restoreOffsets(); + void storeOffsetsVars(QString response); bool isGCodeFile(QString fileName); bool isHeightmapFile(QString fileName); bool compareCoordinates(double x, double y, double z); diff --git a/src/frmmain.ui b/src/frmmain.ui index 57580ae9..22d0e49b 100644 --- a/src/frmmain.ui +++ b/src/frmmain.ui @@ -1224,7 +1224,7 @@ QLabel[overrided="false"] { 0 - -588 + 0 320 878 @@ -1280,6 +1280,9 @@ QLabel[overrided="false"] { Qt::AlignCenter + + true + QAbstractSpinBox::NoButtons @@ -1311,6 +1314,9 @@ QLabel[overrided="false"] { Qt::AlignCenter + + true + QAbstractSpinBox::NoButtons @@ -1342,6 +1348,9 @@ QLabel[overrided="false"] { Qt::AlignCenter + + true + QAbstractSpinBox::NoButtons @@ -1392,6 +1401,9 @@ QLabel[overrided="false"] { Qt::AlignCenter + + true + QAbstractSpinBox::NoButtons @@ -1423,6 +1435,9 @@ QLabel[overrided="false"] { Qt::AlignCenter + + true + QAbstractSpinBox::NoButtons @@ -1454,6 +1469,9 @@ QLabel[overrided="false"] { Qt::AlignCenter + + true + QAbstractSpinBox::NoButtons diff --git a/src/scriptvars.cpp b/src/scriptvars.cpp new file mode 100644 index 00000000..5f05ebd9 --- /dev/null +++ b/src/scriptvars.cpp @@ -0,0 +1,446 @@ +#include "scriptvars.h" + +ScriptVars::ScriptVars() +{ + m_Mx = 10; + m_My = 20; + m_Mz = 30; + + m_Wx = 0; + m_Wy = 0; + m_Wz = 0; + + m_G54x = 0; + m_G54y = 0; + m_G54z = 0; + + m_G55x = 0; + m_G55y = 0; + m_G55z = 0; + + m_G56x = 0; + m_G56y = 0; + m_G56z = 0; + + m_G57x = 0; + m_G57y = 0; + m_G57z = 0; + + m_G58x = 0; + m_G58y = 0; + m_G58z = 0; + + m_G59x = 0; + m_G59y = 0; + m_G59z = 0; + + m_G28x = 0; + m_G28y = 0; + m_G28z = 0; + + m_G30x = 0; + m_G30y = 0; + m_G30z = 0; + + m_G92x = 0; + m_G92y = 0; + m_G92z = 0; + + m_TLOx = 0; + m_TLOy = 0; + m_TLOz = 0; + + m_PRBx = 0; + m_PRBy = 0; + m_PRBz = 0; +} + +void ScriptVars::setMx(double value) +{ + m_Mx = value; +} + +double ScriptVars::Mx() const +{ + return m_Mx; +} + +void ScriptVars::setMy(double value) +{ + m_My = value; +} + +double ScriptVars::My() const +{ + return m_My; +} + +void ScriptVars::setMz(double value) +{ + m_Mz = value; +} + +double ScriptVars::Mz() const +{ + return m_Mz; +} + +void ScriptVars::setWx(double value) +{ + m_Wx = value; +} + +double ScriptVars::Wx() const +{ + return m_Wx; +} + +void ScriptVars::setWy(double value) +{ + m_Wy = value; +} + +double ScriptVars::Wy() const +{ + return m_Wy; +} + +void ScriptVars::setWz(double value) +{ + m_Wz = value; +} + +double ScriptVars::Wz() const +{ + return m_Wz; +} + +void ScriptVars::setG54x(double value) +{ + m_G54x = value; +} + +double ScriptVars::G54x() const +{ + return m_G54x; +} + +void ScriptVars::setG54y(double value) +{ + m_G54y = value; +} + +double ScriptVars::G54y() const +{ + return m_G54y; +} + +void ScriptVars::setG54z(double value) +{ + m_G54z = value; +} + +double ScriptVars::G54z() const +{ + return m_G54z; +} + +void ScriptVars::setG55x(double value) +{ + m_G55x = value; +} + +double ScriptVars::G55x() const +{ + return m_G55x; +} + +void ScriptVars::setG55y(double value) +{ + m_G55y = value; +} + +double ScriptVars::G55y() const +{ + return m_G55y; +} + +void ScriptVars::setG55z(double value) +{ + m_G55z = value; +} + +double ScriptVars::G55z() const +{ + return m_G55z; +} + +void ScriptVars::setG56x(double value) +{ + m_G56x = value; +} + +double ScriptVars::G56x() const +{ + return m_G56x; +} + +void ScriptVars::setG56y(double value) +{ + m_G56y = value; +} + +double ScriptVars::G56y() const +{ + return m_G56y; +} + +void ScriptVars::setG56z(double value) +{ + m_G56z = value; +} + +double ScriptVars::G56z() const +{ + return m_G56z; +} + +void ScriptVars::setG57x(double value) +{ + m_G57x = value; +} + +double ScriptVars::G57x() const +{ + return m_G57x; +} + +void ScriptVars::setG57y(double value) +{ + m_G57y = value; +} + +double ScriptVars::G57y() const +{ + return m_G57y; +} + +void ScriptVars::setG57z(double value) +{ + m_G57z = value; +} + +double ScriptVars::G57z() const +{ + return m_G57z; +} + +void ScriptVars::setG58x(double value) +{ + m_G58x = value; +} + +double ScriptVars::G58x() const +{ + return m_G58x; +} + +void ScriptVars::setG58y(double value) +{ + m_G58y = value; +} + +double ScriptVars::G58y() const +{ + return m_G58y; +} + +void ScriptVars::setG58z(double value) +{ + m_G58z = value; +} + +double ScriptVars::G58z() const +{ + return m_G58z; +} + +void ScriptVars::setG59x(double value) +{ + m_G59x = value; +} + +double ScriptVars::G59x() const +{ + return m_G59x; +} + +void ScriptVars::setG59y(double value) +{ + m_G59y = value; +} + +double ScriptVars::G59y() const +{ + return m_G59y; +} + +void ScriptVars::setG59z(double value) +{ + m_G59z = value; +} + +double ScriptVars::G59z() const +{ + return m_G59z; +} + +void ScriptVars::setG28x(double value) +{ + m_G28x = value; +} + +double ScriptVars::G28x() const +{ + return m_G28x; +} + +void ScriptVars::setG28y(double value) +{ + m_G28y = value; +} + +double ScriptVars::G28y() const +{ + return m_G28y; +} + +void ScriptVars::setG28z(double value) +{ + m_G28z = value; +} + +double ScriptVars::G28z() const +{ + return m_G28z; +} + +void ScriptVars::setG30x(double value) +{ + m_G30x = value; +} + +double ScriptVars::G30x() const +{ + return m_G30x; +} + +void ScriptVars::setG30y(double value) +{ + m_G30y = value; +} + +double ScriptVars::G30y() const +{ + return m_G30y; +} + +void ScriptVars::setG30z(double value) +{ + m_G30z = value; +} + +double ScriptVars::G30z() const +{ + return m_G30z; +} + +void ScriptVars::setG92x(double value) +{ + m_G92x = value; +} + +double ScriptVars::G92x() const +{ + return m_G92x; +} + +void ScriptVars::setG92y(double value) +{ + m_G92y = value; +} + +double ScriptVars::G92y() const +{ + return m_G92y; +} + +void ScriptVars::setG92z(double value) +{ + m_G92z = value; +} + +double ScriptVars::G92z() const +{ + return m_G92z; +} + +void ScriptVars::setTLOx(double value) +{ + m_TLOx = value; +} + +double ScriptVars::TLOx() const +{ + return m_TLOx; +} + +void ScriptVars::setTLOy(double value) +{ + m_TLOy = value; +} + +double ScriptVars::TLOy() const +{ + return m_TLOy; +} + +void ScriptVars::setTLOz(double value) +{ + m_TLOz = value; +} + +double ScriptVars::TLOz() const +{ + return m_TLOz; +} + +void ScriptVars::setPRBx(double value) +{ + m_PRBx = value; +} + +double ScriptVars::PRBx() const +{ + return m_PRBx; +} + +void ScriptVars::setPRBy(double value) +{ + m_PRBy = value; +} + +double ScriptVars::PRBy() const +{ + return m_PRBy; +} + +void ScriptVars::setPRBz(double value) +{ + m_PRBz = value; +} + +double ScriptVars::PRBz() const +{ + return m_PRBz; +} \ No newline at end of file diff --git a/src/scriptvars.h b/src/scriptvars.h new file mode 100644 index 00000000..7f05498c --- /dev/null +++ b/src/scriptvars.h @@ -0,0 +1,209 @@ +#ifndef SCRIPTVARS_H +#define SCRIPTVARS_H + +#include + +class ScriptVars: public QObject +{ + Q_OBJECT + Q_PROPERTY(double Mx READ Mx WRITE setMx) + Q_PROPERTY(double My READ My WRITE setMy) + Q_PROPERTY(double Mz READ Mz WRITE setMz) + + Q_PROPERTY(double Wx READ Wx WRITE setWx) + Q_PROPERTY(double Wy READ Wy WRITE setWy) + Q_PROPERTY(double Wz READ Wz WRITE setWz) + + Q_PROPERTY(double G54x READ G54x WRITE setG54x) + Q_PROPERTY(double G54y READ G54y WRITE setG54y) + Q_PROPERTY(double G54z READ G54z WRITE setG54z) + + Q_PROPERTY(double G55x READ G55x WRITE setG55x) + Q_PROPERTY(double G55y READ G55y WRITE setG55y) + Q_PROPERTY(double G55z READ G55z WRITE setG55z) + + Q_PROPERTY(double G56x READ G56x WRITE setG56x) + Q_PROPERTY(double G56y READ G56y WRITE setG56y) + Q_PROPERTY(double G56z READ G56z WRITE setG56z) + + Q_PROPERTY(double G57x READ G57x WRITE setG57x) + Q_PROPERTY(double G57y READ G57y WRITE setG57y) + Q_PROPERTY(double G57z READ G57z WRITE setG57z) + + Q_PROPERTY(double G58x READ G58x WRITE setG58x) + Q_PROPERTY(double G58y READ G58y WRITE setG58y) + Q_PROPERTY(double G58z READ G58z WRITE setG58z) + + Q_PROPERTY(double G59x READ G59x WRITE setG59x) + Q_PROPERTY(double G59y READ G59y WRITE setG59y) + Q_PROPERTY(double G59z READ G59z WRITE setG59z) + + Q_PROPERTY(double G28x READ G28x WRITE setG28x) + Q_PROPERTY(double G28y READ G28y WRITE setG28y) + Q_PROPERTY(double G28z READ G28z WRITE setG28z) + + Q_PROPERTY(double G30x READ G30x WRITE setG30x) + Q_PROPERTY(double G30y READ G30y WRITE setG30y) + Q_PROPERTY(double G30z READ G30z WRITE setG30z) + + Q_PROPERTY(double G92x READ G92x WRITE setG92x) + Q_PROPERTY(double G92y READ G92y WRITE setG92y) + Q_PROPERTY(double G92z READ G92z WRITE setG92z) + + Q_PROPERTY(double TLOx READ TLOx WRITE setTLOx) + Q_PROPERTY(double TLOy READ TLOy WRITE setTLOy) + Q_PROPERTY(double TLOz READ TLOz WRITE setTLOz) + + Q_PROPERTY(double PRBx READ PRBx WRITE setPRBx) + Q_PROPERTY(double PRBy READ PRBy WRITE setPRBy) + Q_PROPERTY(double PRBz READ PRBz WRITE setPRBz) + +public: + ScriptVars(); + + void setMx(double value); + double Mx() const; + void setMy(double value); + double My() const; + void setMz(double value); + double Mz() const; + + void setWx(double value); + double Wx() const; + void setWy(double value); + double Wy() const; + void setWz(double value); + double Wz() const; + + void setG54x(double value); + double G54x() const; + void setG54y(double value); + double G54y() const; + void setG54z(double value); + double G54z() const; + + void setG55x(double value); + double G55x() const; + void setG55y(double value); + double G55y() const; + void setG55z(double value); + double G55z() const; + + void setG56x(double value); + double G56x() const; + void setG56y(double value); + double G56y() const; + void setG56z(double value); + double G56z() const; + + void setG57x(double value); + double G57x() const; + void setG57y(double value); + double G57y() const; + void setG57z(double value); + double G57z() const; + + void setG58x(double value); + double G58x() const; + void setG58y(double value); + double G58y() const; + void setG58z(double value); + double G58z() const; + + void setG59x(double value); + double G59x() const; + void setG59y(double value); + double G59y() const; + void setG59z(double value); + double G59z() const; + + void setG28x(double value); + double G28x() const; + void setG28y(double value); + double G28y() const; + void setG28z(double value); + double G28z() const; + + void setG30x(double value); + double G30x() const; + void setG30y(double value); + double G30y() const; + void setG30z(double value); + double G30z() const; + + void setG92x(double value); + double G92x() const; + void setG92y(double value); + double G92y() const; + void setG92z(double value); + double G92z() const; + + void setTLOx(double value); + double TLOx() const; + void setTLOy(double value); + double TLOy() const; + void setTLOz(double value); + double TLOz() const; + + void setPRBx(double value); + double PRBx() const; + void setPRBy(double value); + double PRBy() const; + void setPRBz(double value); + double PRBz() const; + +private: + double m_Mx; + double m_My; + double m_Mz; + + double m_Wx; + double m_Wy; + double m_Wz; + + double m_G54x; + double m_G54y; + double m_G54z; + + double m_G55x; + double m_G55y; + double m_G55z; + + double m_G56x; + double m_G56y; + double m_G56z; + + double m_G57x; + double m_G57y; + double m_G57z; + + double m_G58x; + double m_G58y; + double m_G58z; + + double m_G59x; + double m_G59y; + double m_G59z; + + double m_G28x; + double m_G28y; + double m_G28z; + + double m_G30x; + double m_G30y; + double m_G30z; + + double m_G92x; + double m_G92y; + double m_G92z; + + double m_TLOx; + double m_TLOy; + double m_TLOz; + + double m_PRBx; + double m_PRBy; + double m_PRBz; +}; + +#endif \ No newline at end of file From abb67cef2106c3da741f1204ab5da40debdfe942 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sun, 3 Nov 2019 20:00:20 +0500 Subject: [PATCH 11/80] Translations updated --- src/frmmain.cpp | 4 +- src/translations/candle_en.ts | 402 ++++++++++++++++---------------- src/translations/candle_es.ts | 402 ++++++++++++++++---------------- src/translations/candle_fr.ts | 418 ++++++++++++++++++---------------- src/translations/candle_pt.ts | 402 ++++++++++++++++---------------- src/translations/candle_ru.qm | Bin 22475 -> 21464 bytes src/translations/candle_ru.ts | 406 +++++++++++++++++---------------- 7 files changed, 1062 insertions(+), 972 deletions(-) diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 021390ab..b53ef172 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -2492,7 +2492,7 @@ void frmMain::on_actServiceSettings_triggered() table->clear(); table->setColumnCount(3); table->setRowCount(acts.count()); - table->setHorizontalHeaderLabels(QStringList() << "Command" << "Text" << "Shortcuts"); + table->setHorizontalHeaderLabels(QStringList() << tr("Command") << tr("Text") << tr("Shortcuts")); table->verticalHeader()->setDefaultAlignment(Qt::AlignCenter); table->verticalHeader()->setFixedWidth(table->verticalHeader()->sizeHint().width() + 11); @@ -4131,7 +4131,7 @@ void frmMain::onCmdUserClicked(bool checked) QStringList list = m_settings->userCommands(i).split(";"); foreach (QString cmd, list) { - sendCommand(cmd.trimmed(), -1, m_settings->showUICommands(), list.indexOf(cmd)); + if (!cmd.isEmpty()) sendCommand(cmd.trimmed(), -1, m_settings->showUICommands(), list.indexOf(cmd)); } } diff --git a/src/translations/candle_en.ts b/src/translations/candle_en.ts index 927d8c1b..215874ef 100644 --- a/src/translations/candle_en.ts +++ b/src/translations/candle_en.ts @@ -118,54 +118,54 @@ - + Check - + Scroll - - - - + + + + Open - - - + + + Reset - - + + Send - + Pause - - - - + + + + Abort @@ -206,20 +206,20 @@ - - + + Overriding - + Heightmap - + Use heightmap @@ -235,13 +235,13 @@ - + Create - + Edit @@ -276,7 +276,7 @@ - + Show border @@ -302,7 +302,7 @@ - + Show probe grid @@ -323,7 +323,7 @@ - + Show interpolation grid @@ -343,447 +343,447 @@ - + Machine coordinates: - + Status: - + Control - - + + Zero XY - + User command 1 - + User command 2 - + User command 3 - + User command 4 - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override - - - - - - - - - + + + + + + + + + ... - - + + Z-probe - - + + Home - - + + Restore origin - - + + Zero Z - - + + Safe position - - + + Unlock - + User commands - - - - - - + + + + + + Spindle on/off - - - - - - + + + + + + Spindle - + - - + + Jog - - + + X- - - + + Y- - - + + X+ - - + + Y+ - - + + Z+ - - + + Z- - - + + Stop - + Continuously - + 0.01 - + 0.1 - + 1 - + 5 - - + + 10 - - + + 100 - + Step: - + Feed: - + 50 - + 500 - + 1000 - + 2000 - - + + Keyboard control - + Visualizer - - + + Fit - - + + Top view - - + + Isometric view - - + + Front view - - + + Left view - + Console - + Send command - - + + Clear console - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open - + E&xit - + &Settings - + &New - + &Save - + Save &as... - + &About - + &Clear - + Save &transformed as... - + &Device - + &Modification - + &Visualizer - + &Console @@ -864,191 +864,209 @@ - - + + Restore origin: %1, %2, %3 - + G-code program file was changed. Save? - + Heightmap file was changed. Save? - + Not connected - + G-code program - + Probe - + Port opened - + Job done. Time elapsed: %1 - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Serial port error - + Buffer: %1 / %2 / %3 - + File sending in progress. Terminate and exit? - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) - - - + + + Heightmap files (*.map) - + Opening file... - - + + Can't open file: - + Following commands will be sent before selected line: - + Skip - - - + + + (%1) - + Delete lines? - + + + Command + + + + + + Text + + + + + + Shortcuts + + + + Updating... - + Untitled - - - + + + Save file as - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) - + (%1/%2/%3) - + (%1/%2) - + C - + Changing grid settings will reset probe data. Continue? - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... diff --git a/src/translations/candle_es.ts b/src/translations/candle_es.ts index 91467e24..475e7a89 100644 --- a/src/translations/candle_es.ts +++ b/src/translations/candle_es.ts @@ -115,37 +115,37 @@ GRBL Control - + G-code program Programa de G-Code - - + + Isometric view Vista isometrica - - + + Top view Vista superior - - + + Front view Vista Frontal - - + + Left view Vista izquierda - - + + Fit Ajustar vista @@ -184,7 +184,7 @@ - + Show border Mostrar borde @@ -242,40 +242,40 @@ - - - - + + + + Open Abrir - - - + + + Reset Reiniciar - - + + Send Enviar - + Pause Pausar - - - - + + + + Abort Abandono @@ -294,62 +294,62 @@ 0 - + Machine coordinates: Coordenadas de máquina: - + Status: Estado: - + Control Control - - + + Home Origen - - - - - - - - - + + + + + + + + + ... ... - - + + Z-probe Medicion de Z - - + + Zero XY Cero XY - - + + Zero Z Cero Z - - + + Overriding @@ -367,32 +367,32 @@ - - + + Restore origin Restaure el origen - - + + Safe position Posición segura - - + + Unlock Desbloquear - + Heightmap Mapa de alturas - + Use heightmap Usar mapa de alturas @@ -408,7 +408,7 @@ - + Create Crear @@ -417,12 +417,12 @@ Modo edición - - - - - - + + + + + + Spindle Husillo @@ -432,12 +432,12 @@ Velocidad: - - - - - - + + + + + + Spindle on/off Husillo on/off @@ -454,51 +454,51 @@ % - + - - + + Jog Control manual - - + + X- - - + + Y- - - + + X+ - - + + Y+ - + Step: Pasos: - - + + Z+ - - + + Z- @@ -507,7 +507,7 @@ Presets: - + User commands @@ -524,29 +524,29 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 @@ -572,19 +572,19 @@ - + Edit - + Show probe grid - + Show interpolation grid @@ -594,185 +594,185 @@ - - + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - - + + Keyboard control Control desde teclado - + Visualizer Visualizador - + Console Consola - + Send command Enviar comando - - + + Clear console Limpiar cosola - + &Device - + &Modification - + &Visualizer - + &Console - + User command 1 - + User command 2 - + User command 3 - + User command 4 - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override @@ -797,62 +797,62 @@ &Ayuda - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Abrir - + E&xit S&alir - + &Settings &Opciones - + &New &Nuevo - + &Save &Guardar - + Save &as... Guardar &como... - + &About &Acerca de - + &Clear &Limpiar - + Save &transformed as... Salve &transformado como... @@ -884,7 +884,7 @@ - + Check Chequeo @@ -935,74 +935,92 @@ - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - + + + Command + Comando + + + + + Text + + + + + + Shortcuts + + + + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1013,38 +1031,38 @@ %1, %2, %3 - + G-code program file was changed. Save? El programa de G-code ha cambiado. Desea guardar? - + Heightmap file was changed. Save? El programa mapa de alturas ha cambiado. Desea guardar? - + Not connected Sin Conexión - + Probe Medición - + Opening file... - + Updating... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Archivos de G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1053,7 +1071,7 @@ Conectado - + Job done. Time elapsed: %1 Trabajo terminado. @@ -1064,18 +1082,18 @@ Tiempo transcurrido: %1 Procesado - + Serial port error Error en puerto serie - + Scroll Desplazamiento - + File sending in progress. Terminate and exit? Envio de archivo en progreso. Detener y salir? @@ -1092,33 +1110,33 @@ Tiempo transcurrido: %1 Archivos de G-Code (*.nc *.ncc *.tap *.txt) - - - + + + Heightmap files (*.map) Mapa de alturas (*.map) - + Port opened Puerto se abrió - - + + Restore origin: %1, %2, %3 Restaure origen: %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Archivos de G-Code (*.nc *.ncc *.ngc *.tap *.txt);;Todos los archivos (*.*) - - + + Can't open file: No se puede abrir el archivo: @@ -1133,26 +1151,26 @@ Tiempo transcurrido: %1 Enviado - + Delete lines? Borrar lineas? - - - + + + (%1) - + Untitled Sin-título - - - + + + Save file as Guardar archivo como @@ -1161,7 +1179,7 @@ Tiempo transcurrido: %1 Archivos de G-Code (*.nc;*.ncc;*.tap) - + Changing grid settings will reset probe data. Continue? El cambio de configuraciones de grilla reiniciará los datos de medición. Desea continuar? diff --git a/src/translations/candle_fr.ts b/src/translations/candle_fr.ts index 78cdaaab..7040ba6f 100644 --- a/src/translations/candle_fr.ts +++ b/src/translations/candle_fr.ts @@ -115,37 +115,37 @@ grblControl - + G-code program Programme G-Code - - + + Isometric view Vue isometrique - - + + Top view Vue de dessus - - + + Front view Vue de Face - - + + Left view Vue de gauche - - + + Fit Ajuster vue @@ -184,7 +184,7 @@ - + Show border Montrer bord @@ -242,40 +242,40 @@ - - - - + + + + Open Ouvrir - - - + + + Reset Reinitialiser - - + + Send Envoyer - + Pause Pause - - - - + + + + Abort Abandon @@ -294,62 +294,62 @@ 0 - + Machine coordinates: Coordonnées machine: - + Status: Etât: - + Control Contrôle - - + + Home Origine - - - - - - - - - + + + + + + + + + ... ... - - + + Z-probe Palper Z - - + + Zero XY Zero XY - - + + Zero Z Zero Z - - + + Overriding @@ -367,32 +367,32 @@ - - + + Restore origin Restituez l'origine - - + + Safe position Position sûre - - + + Unlock Desbloquer - + Heightmap Palpage surfacique - + Use heightmap Utiliser palpage surfacique @@ -408,7 +408,7 @@ - + Create Créer @@ -417,12 +417,12 @@ Paramètres de palpage - - - - - - + + + + + + Spindle Broche @@ -432,12 +432,12 @@ Vitesse: - - - - - - + + + + + + Spindle on/off Broche on/off @@ -454,51 +454,51 @@ % - + - - + + Jog Contrôle manuel - - + + X- - - + + Y- - - + + X+ - - + + Y+ - + Step: Pas: - - + + Z+ - - + + Z- @@ -507,7 +507,7 @@ Pre-selection: - + User commands @@ -524,29 +524,29 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 @@ -572,19 +572,19 @@ - + Edit - + Show probe grid - + Show interpolation grid @@ -594,185 +594,185 @@ - - + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - - + + Keyboard control Contrôle avec le clavier - + Visualizer Apparence - + Console Console - + Send command Envoyer commande - - + + Clear console Effacer consôle - + &Device - + &Modification - + &Visualizer - + &Console - + User command 1 - + User command 2 - + User command 3 - + User command 4 - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override @@ -797,62 +797,62 @@ &Aide - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Ouvrir - + E&xit Q&uitter - + &Settings &Reglages - + &New &Nouveau - + &Save &Enregistrer - + Save &as... Enregistrer &sous... - + &About &A propos de - + &Clear &Effacer - + Save &transformed as... Sauvez &transformé comme... @@ -884,7 +884,7 @@ - + Check Vérifié @@ -935,74 +935,77 @@ - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - - (%1/%2/%3) - + + + Command + Comande - - (%1/%2) + + + Text - - C + + + Shortcuts - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1013,22 +1016,22 @@ %1, %2, %3 - + G-code program file was changed. Save? Le programme G-code à changé. Sauvegarder? - + Heightmap file was changed. Save? Le fichier surface de palpage a changé. Sauvegarder? - + Not connected Non connecté - + Probe Palper @@ -1037,7 +1040,7 @@ Connecté - + Job done. Time elapsed: %1 Travail terminé. @@ -1048,18 +1051,18 @@ Temps écoulé: %1 Traité - + Serial port error Erreur port serie - + Scroll Déplacement - + File sending in progress. Terminate and exit? Envoi de fichier en cours. Terminer et Sortir? @@ -1068,38 +1071,38 @@ Temps écoulé: %1 Envoyé - - - + + + Heightmap files (*.map) Fichier de palpage (*.map) - - + + Restore origin: %1, %2, %3 Restituez l'origine: %1, %2, %3 - + Port opened Le port s'est ouvert - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) G-Code fichiers (*.nc *.ncc *.ngc *.tap *.txt);;Tous les fichiers (*.*) - + Opening file... - - + + Can't open file: Impossible d'ouvrir du fichier: @@ -1114,42 +1117,57 @@ Temps écoulé: %1 Envoyé - + Delete lines? Effacer ligne? - - Updating... - - - - - - + + + (%1) - + + Updating... + + + + Untitled Sans titre - - - + + + Save file as Enregistrer le fichier sous - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) G-Code fichiers (*.nc *.ncc *.ngc *.tap *.txt) - + + (%1/%2/%3) + + + + + (%1/%2) + + + + + C + + + + Changing grid settings will reset probe data. Continue? Changer les paramètres de la grille, réinitialise les données de palpage. Continuer? diff --git a/src/translations/candle_pt.ts b/src/translations/candle_pt.ts index 4ce623a3..abf82b06 100644 --- a/src/translations/candle_pt.ts +++ b/src/translations/candle_pt.ts @@ -115,37 +115,37 @@ Controle GRBL - + G-code program Programa de G-Code - - + + Isometric view Vista isométrica - - + + Top view Vista Superior - - + + Front view Vista Frontal - - + + Left view Vista Esquerda - - + + Fit Ajustar vista @@ -184,7 +184,7 @@ - + Show border Mostrar borda @@ -242,40 +242,40 @@ - - - - + + + + Open Abrir - - - + + + Reset Reiniciar - - + + Send Enviar - + Pause Pausar - - - - + + + + Abort Abortar @@ -294,62 +294,62 @@ 0 - + Machine coordinates: Coordenadas da máquina: - + Status: Estado: - + Control Controle - - + + Home Origem - - - - - - - - - + + + + + + + + + ... ... - - + + Z-probe Medição de Z - - + + Zero XY Zero XY - - + + Zero Z Zero Z - - + + Overriding @@ -367,32 +367,32 @@ - - + + Restore origin Restaure a origem - - + + Safe position Posição segura - - + + Unlock Desbloquear - + Heightmap Mapa de alturas - + Use heightmap Usar mapa de alturas @@ -408,7 +408,7 @@ - + Create Criar @@ -417,12 +417,12 @@ Modo edição - - - - - - + + + + + + Spindle Spindle @@ -432,12 +432,12 @@ Velocidade: - - - - - - + + + + + + Spindle on/off Spindle on/off @@ -454,51 +454,51 @@ % - + - - + + Jog Controle manual - - + + X- - - + + Y- - - + + X+ - - + + Y+ - + Step: Passos: - - + + Z+ - - + + Z- @@ -507,7 +507,7 @@ Presets: - + User commands @@ -524,29 +524,29 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 @@ -572,19 +572,19 @@ - + Edit - + Show probe grid - + Show interpolation grid @@ -594,185 +594,185 @@ - - + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - - + + Keyboard control Controle por teclado - + Visualizer Visualizador - + Console Console - + Send command Enviar comando - - + + Clear console Limpar cosole - + &Device - + &Modification - + &Visualizer - + &Console - + User command 1 - + User command 2 - + User command 3 - + User command 4 - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override @@ -797,62 +797,62 @@ &Ajuda - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Abrir - + E&xit S&air - + &Settings &Opções - + &New &Novo - + &Save &Salvar - + Save &as... Salvar &como... - + &About &Sobre - + &Clear &Limpar - + Save &transformed as... Salvar &transformado como... @@ -884,7 +884,7 @@ - + Check Checar @@ -935,74 +935,92 @@ - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - + + + Command + Comando + + + + + Text + + + + + + Shortcuts + + + + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1013,38 +1031,38 @@ %1, %2, %3 - + G-code program file was changed. Save? O programa G-code foi alterado. Deseja salvar? - + Heightmap file was changed. Save? O arquivo mapa de alturas foi alterado. Deseja salvar? - + Not connected Sem Conexão - + Probe Medição - + Opening file... - + Updating... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Arquivos G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1053,7 +1071,7 @@ Conectado - + Job done. Time elapsed: %1 Trabalho terminado. @@ -1064,18 +1082,18 @@ Tempo transcorrido: %1 Processado - + Serial port error Erro na porta serial - + Scroll Rolagem - + File sending in progress. Terminate and exit? Envio de arquivo en progreso. Terminar e sair? @@ -1092,33 +1110,33 @@ Tempo transcorrido: %1 Arquivos G-Code (*.nc *.ncc *.tap *.txt) - - - + + + Heightmap files (*.map) Mapa de alturas (*.map) - + Port opened Porta aberta - - + + Restore origin: %1, %2, %3 Restaure origem: %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Arquivos G-Code (*.nc *.ncc *.tap *.txt);;Todos os arquivos (*.*) - - + + Can't open file: Não foi possível abrir o arquivo: @@ -1133,26 +1151,26 @@ Tempo transcorrido: %1 Enviado - + Delete lines? Apagar linhas? - - - + + + (%1) - + Untitled Sem-título - - - + + + Save file as Salvar arquivo como @@ -1161,7 +1179,7 @@ Tempo transcorrido: %1 Arquivos G-Code (*.nc;*.ncc;*.tap) - + Changing grid settings will reset probe data. Continue? A alteração nas configurações de grade reiniciará os dados de medição. Deseja continuar? diff --git a/src/translations/candle_ru.qm b/src/translations/candle_ru.qm index 5fc43c8d3a2d8b2340be392ff14e9a0f27823820..efa0ab88a3f3640b7fa2efcf72e7de41d8144047 100644 GIT binary patch delta 2365 zcmXAq3s6+|6~@2ay?2+rdv{kr1rY&x$YYV0yhR0(fS^$^5k!snK+%a#6a&FBt~D_l zA1GaLC>mOA6f~q7S11nyRwM}!L#s4uIy^Ksr9#4(7my7}oTgg~p#tkx#{25Rs z^7n^!Mr4plK*Sc3aU$x;T)sDt+|Bg|$)mi#00_;%qo73ULOUY@n1mzm z>tRM@7&9{hk&Bt}Ef#3IKMO1rfQi+>k}SY|lby5jf#t1$uPcz7!;MOTH9Hy98_G*x z0JVgGjk{2?4V4;V|$5E|A3&Wj+la6{)a5N^B& z%#4Qc&1+;nc^FXELwM{9xb>23h1*LA&spu{0EqrefZ2r*!%`UdHpJL?z*7ft0~7UZ zhInEg;P*bsc#3x+p5ki(T=#JuIpK6m-&PssOx> zBP)Ov&-n>ioA`TTAhIg<0#jAUzD(my{VTFNxsgvCa>gA1QpO=?BiE(uK~C*yD)Hhs znqg8Pr!Jlfm0S~?5asW9AQA>(`%u0CG@9^MKs3zc>Jx8lA-l^IBgQcgMW zAHe&ta{85z7~pMXNG~_=eqv`*s4~2=9hmZWW!_H{*}Hb-2W>etU8=I|hg~#dxw7Ur zNiE8ArahGQy7JnC2UO~Xa^Mi-ypp9H+P8v<_miur+Xa_KRu~m4OuK!PQ!pk3CvZ|G37sgt@WkqFT#E~%|>AV=JNaYmN zh|6q=cx@5aO{@W2D#ZK+Gw6*{G5?QO$t&Wf7`ABk&tid7Gvkhm`_J)tl36rctdut4 zd$Ifi4~?|LV%0GoLVlUziFCd&_pEs0r7z7Qi+}mk>%cUnc*bVNfR*Bfi>yp}OYG2X z<~nz=BZ{UCen)%|lgA2oh)?4tOOoO#af$kawN}pmF?H21Ol(@Ooyl*ihm(1XPQ62NYP@HtM@urf zk&8xnSxx1hYl8h5FWpHK{zESn`CJp{_KfcbYqll1vGOL(q1G-c5vr*en$G9uV$G*J znmIn@4hi2=qWHNE#rMg`vkt=#3phS?4$m5yh_OK%a{Oyna#)*R$3Vu1+5^}2af2v3 z=VWTD3;15LRoi);y_E~JH%&}P`CL14h11}+O_Hk_H!)lCD!flc+a#}U6X!p$g%`{u zNR|@4#?xfg()w6|W3|Rk$6`BUv!%QQ-n_og@p`5v_ zl#H=6I7xo#HZ{<_@UKy#d$QIN?I zvfZTh@|eQx#) z((jIDi>7SQUy^T9nPGkZ5KSsY=?AxSTKpRI|J}v+bWij@zQ3BS*<}zeEv0g42FH#& zJh;9xr1erE=X-`#>w0)H1sV;jdU!Gg<{64cMmPbLL~?i#r}HAerCo^hZ`VZMoLcHePel z`H5&*IcdbQ(QU6~wX51PFnOoNKgGk6Jk!~_+f-Z}#_DV86Riuw_b4n;i=(Yq ZBkBapxusJqu>pEZcg#0dbKC-t{{vs-V^#nF delta 3187 zcmZve30PFu701ua+&9Cls3Wqd@IVk`V1Qv8hE2ABfQq7Eh}*~vI8+eJqow z*g>nf)fJ@Vi;4^4mMX-8Rnti0(oe;xtyR<}jW#td{XfR=wQ2F2`OUrW-gD3SpL6c> zYJ=$fCn9@7tHq=1$(HpOe21N$x#Q%GR3bUyZ-nrLzX&3Y4;T#|1C2zn?}2gPHZYB7 zU@(znG@d6o8T|}QA&T(;VJ~JTh)>KDa52_>34VnA?-1Ep8`02Dh`4whJl@IFD_|3m zp#l6YQRFc2W6%U*edHAII9LOo1na;q@E~{|{2aUhJ|>bS5{=6TtHD~tqajlN&dKP@ zWT(i1@Q8?_!oeai51#%UfePbqiN-P_k5NPu3W>beIhmp*dixa7$bCdJg*{Niya>EN z;zQ?%l=nyy0p-*^BuNwO)RH7$;3krEg0ZKGt+<0j1MS4tAo>AG#E#4&8hoADaUAFt zLF|jAL`k=aeL0CJSquJxNPL*sGk>CCFF>SZ_()>k2Y`9R1x_GJ^(8Jm1BR~>XEYJ{ zMiN&7NBwe$+mcQcR1CtNXbEvUu`Jkr1`5w4(gzXOjA*mhkc@3a)X&JT5mCu2Dfn|7 zpv2l{UY72XVAgLC?vmH>U2AXT9{5>w`Zd}#)vduA&>#xB99S&AmXz{yaUQ=OGFL( zJ?)Uzlo8l%N3RvMGZh!CqiZzIDt%03vvH1RnXt^Oaa2nVuNnd6c za%GZa-9Qb5n+$ zf-6!}#=>*Zo?e}-6jbx`3kT@}!-4LM&mAl#N zQ`Zq$0%!Q;Yod%IE=rV%Zn(r12#)x@;);jh4)Nr<*}0LZkvMMlrZeDAI9qHJx@8+@ zuNu?_!}Z*XCOpUp<{T}Mc=S51Za;3eTq9S%Ap~s`#%;;Q^S35(TVDC2cvRf3?UONo zi`y#{XYey_|3O41zQXN4T1^zTgzHe2p@z-3Ny+k_L7ygw!8P<6Du_uw&BVxwuAirc29?$WX63RS;-CXE_G%jxTrLXPz{yDy+9>PM3FHK<-tii9cu-N1vjF$M zF1YUpjVV(s^|GNI9f~@^b3>=%H{+p%M}ea8gbDq9QPF$})vq|GIHp{SZs8TDQ;V_A z;AGBA#SIYx@SUM#wdn6Gi_-JPbJWyrWm(TG+>jHMwYRV10@|TmA&d<+f$0C-UCJZb ztB6dIU_Dq4B68C{unoMcJo^!|Rpg=AGSp#OJ=!WmozMd% z0?XBz>;Ht}R;f$3qNw@ZYI`|yp4p>b9D|hktW_Vft1iRv2KCMRsA9!pbx$SQD`>s? zukT}_Dpmb>If`tsT*D6KLqdmUV8=E5Uu2;sV?r$=n5xO@hGK4WHPbHPX4CBhakJ@O zYZmtQ;$C>D=`f-eLjI|_d9w`fmQKy>u1RQDv#T}>`(p37hUmf}_2_)p{0>OQ|Jn7{ zOWcS<|LA1$4%Zjg5b4Nn6vnviEnm3Q$sN<()p8d;C?Fy%z%a^@=RQ=ad@~9Qh-@hw zq?WozF&{RX8Ce30W{GS(zEfEW8}HC(c>3!J|6EY8B*n)qrJ`a^t*yM2pKZ03&aR$o zuF&iCj(m@o8ZjH*zf6?om>;5bO!QphQ_nnD>>JC1bt8)=9@d33Ow8y|2M@LLEV=J| z17@RyCs<*^Cy8ZZeM;X-VOJ^(XAvwObD6M|!!j@zg}KBxBR$4KBuSV}!nzo&Ol7&0 z-0xUy+H7-qso;NUrOm=uS*xpUD``jpKKEuLqw3T~8En&(2^7E{n;F5aK{!a_!$1wlq3FrKBu zUL1?ZFPzCt{cfr9%{5lO#5Tvuo2witf!dZ}{bEteqpeodV?#_5{g)7Cp`T-$|YDy8r+H diff --git a/src/translations/candle_ru.ts b/src/translations/candle_ru.ts index 5b50eb9e..96bfae0b 100644 --- a/src/translations/candle_ru.ts +++ b/src/translations/candle_ru.ts @@ -139,37 +139,37 @@ frmMain - + G-code program G-code программа - - + + Isometric view Изометрия - - + + Top view Вид сверху - - + + Front view Вид спереди - - + + Left view Вид слева - - + + Fit Вписать @@ -213,7 +213,7 @@ - + Show border Показать границы @@ -269,7 +269,7 @@ Состояние - + Control Управление @@ -287,14 +287,14 @@ &Недавние файлы - + &Open &Открыть - - + + Send Отправить @@ -308,15 +308,15 @@ - - - + + + Reset Сброс - + Pause Пауза @@ -326,30 +326,30 @@ Рабочие координаты: - + Machine coordinates: Машинные координаты: - + Status: Статус: - + Not connected Нет соединения - - - - - - - - - + + + + + + + + + ... @@ -358,14 +358,14 @@ Поиск стола - - + + Zero XY Обнулить XY - - + + Zero Z Обнулить Z @@ -374,8 +374,8 @@ Вернуться в XY(Z) - - + + Z-probe Z-щуп @@ -384,20 +384,20 @@ Безопасная Z - - + + Unlock Разблокировать - + Heightmap Карта высот - + Use heightmap Использовать карту высот @@ -413,7 +413,7 @@ - + Create Создать @@ -422,12 +422,12 @@ Редактирование - - - - - - + + + + + + Spindle Шпиндель @@ -437,12 +437,12 @@ Скорость: - - - - - - + + + + + + Spindle on/off Вкл/выкл шпиндель @@ -455,21 +455,21 @@ Переопределить: - + - - + + Jog Перемещение - + Step: Шаг: - - + + X- @@ -480,59 +480,59 @@ - - - - + + + + Abort Прервать - - + + Restore origin Восстановить СК - - + + Safe position Безопасное положение - - + + Overriding Коррекция - - + + Y- - - + + X+ - - + + Y+ - - + + Z+ - - + + Z- @@ -541,97 +541,97 @@ Уставки: - + User commands Команды - - + + Stop Стоп - + Continuously Непрерывно - + 0.01 - + 0.1 - + 1 - + 5 - - + + 10 - - + + 100 - + Feed: Подача: - + 500 - + 50 - + 1000 - + 2000 - - + + Keyboard control Управление с клавиатуры - + Console Консоль - + Send command Отправить команду - - + + Clear console Очистить консоль @@ -672,19 +672,19 @@ - + Edit Редактирование - + Show probe grid Показать сетку зондирования - + Show interpolation grid Показать сетку интерполяции @@ -694,177 +694,177 @@ Устройство - + Visualizer Визуализатор - + _spacerTop - + _spacerLeft - + _spacerRight - + E&xit Вы&ход - + &Settings &Настройки - + User command 1 Пользовательская команда 1 - + User command 2 Пользовательская команда 2 - + User command 3 Пользовательская команда 3 - + User command 4 Пользовательская команда 4 - + Spindle speed + Скорость шпинделя + - + Spindle speed - Скорость шпинделя - - + Jog step next Шаг перемещения следующий - + Jog step previous Шаг перемещения предыдущий - + Jog feed next Подача перемещения следующая - + Jog feed previous Подача перемещения предыдущая - + Feed override + Коррекция подачи + - + Feed override - Коррекция подачи - - + Rapid override + Коррекция перемещений + - + Rapid override - Коррекция перемещений - - + Spindle override + Коррекция шпинделя + - + Spindle override - Коррекция шпинделя - - + Feed override Коррекция подачи - + Rapid speed override Коррекция быстрых перемещений - + Spindle speed override Коррекция скорости шпинделя - + &New &Новый - + &Save &Сохранить - + Save &as... Сохранить &как... - + &About &О программе - + &Clear &Очистить - + Save &transformed as... Сохранить &преобразованный как... - + &Device &Устройство - + &Modification &Модификация - + &Visualizer &Визуализатор - + &Console &Консоль @@ -884,8 +884,8 @@ Работа - - + + Home Домой @@ -903,7 +903,7 @@ - + Check Проверка @@ -954,76 +954,94 @@ Больше не показывать - + PS: %1 СВ: %1 - + AS: %1 СУ: %1 - + F/S: %1 / %2 П/Ш: %1 / %2 - + Error message(s) received: Ошибка(и) при передаче файла: - + Buffer: %1 / %2 / %3 Буфер: %1 / %2 / %3 - + Following commands will be sent before selected line: Следующие команды будут отправлены перед выбранной строкой: - + Skip Пропустить - + + + Command + Команда + + + + + Text + Текст + + + + + Shortcuts + Быстрые клавиши + + + (%1/%2/%3) - + - + (%1/%2) - + - + C Н - + Applying heightmap... Применяется карты высот... - + Subdividing segments... Разбиение отрезков... - + Updating Z-coordinates... Обновление Z-координат... - + Modifying G-code program... Правка G-код программы... @@ -1034,23 +1052,23 @@ %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Файлы G-Code (*.nc *.ncc *.ngc *.tap *.txt);;Все файлы (*.*) - + Opening file... Загрузка файла... - + Updating... Обновление... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Файлы G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1059,7 +1077,7 @@ Файл был изменен. Сохранить? - + Job done. Time elapsed: %1 Задание выполнено. @@ -1074,26 +1092,26 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap *.txt);;Все файлы (*.*) - + Delete lines? Удалить строки? - + Scroll Прокрутка - - + + Restore origin: %1, %2, %3 Восстановить СК: %1, %2, %3 - + File sending in progress. Terminate and exit? Идет процесс отправки файла. Прервать и выйти из программы? @@ -1102,15 +1120,15 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap);;Все файлы (*.*) - - - + + + Heightmap files (*.map) Файлы карт высот (*.map) - - + + Can't open file: Ошибка при открытии файла: @@ -1121,14 +1139,14 @@ Time elapsed: %1 Отправлена - - - + + + (%1) - + Untitled Без имени @@ -1137,7 +1155,7 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap *.txt) - + Changing grid settings will reset probe data. Continue? Изменение сетки зондирования приведет к очистке табличных данных. Продолжить? @@ -1146,22 +1164,22 @@ Time elapsed: %1 Подключен - + G-code program file was changed. Save? Файл G-code программы был изменен. Сохранить? - + Heightmap file was changed. Save? Файл карты высот был изменен. Сохранить? - + Probe Зонд - + Port opened Порт открыт @@ -1170,7 +1188,7 @@ Time elapsed: %1 Обработана - + Serial port error Ошибка последовательного порта @@ -1179,19 +1197,19 @@ Time elapsed: %1 Буфер/очередь: %1 / %2 - - - + + + Save file as Сохранить файл как - - - - + + + + Open Открыть From 3232f7c7e7ee3c8c236f8249f72dca026bac18f4 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sun, 3 Nov 2019 21:32:29 +0500 Subject: [PATCH 12/80] Text boxes for user commands are multiline now. --- src/frmmain.cpp | 2 +- src/frmsettings.cpp | 6 +++--- src/frmsettings.h | 6 ------ src/frmsettings.ui | 28 ++++++++++++++-------------- 4 files changed, 18 insertions(+), 24 deletions(-) diff --git a/src/frmmain.cpp b/src/frmmain.cpp index b53ef172..e91c87bb 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -4128,7 +4128,7 @@ void frmMain::onCmdUserClicked(bool checked) { int i = sender()->objectName().right(1).toInt(); - QStringList list = m_settings->userCommands(i).split(";"); + QStringList list = m_settings->userCommands(i).remove("\n").split(";"); foreach (QString cmd, list) { if (!cmd.isEmpty()) sendCommand(cmd.trimmed(), -1, m_settings->showUICommands(), list.indexOf(cmd)); diff --git a/src/frmsettings.cpp b/src/frmsettings.cpp index 4db3ec2c..79ec49e2 100644 --- a/src/frmsettings.cpp +++ b/src/frmsettings.cpp @@ -609,12 +609,12 @@ void frmSettings::setDrawModeVectors(bool value) QString frmSettings::userCommands(int index) { - return this->findChild(QString("txtUserCommand%1").arg(index))->text(); + return this->findChild(QString("txtUserCommand%1").arg(index))->toPlainText(); } void frmSettings::setUserCommands(int index, QString commands) { - this->findChild(QString("txtUserCommand%1").arg(index))->setText(commands); + this->findChild(QString("txtUserCommand%1").arg(index))->setPlainText(commands); } bool frmSettings::ignoreErrors() @@ -798,4 +798,4 @@ void frmSettings::on_radGrayscaleS_toggled(bool checked) void frmSettings::on_radGrayscaleZ_toggled(bool checked) { ui->radGrayscaleS->setChecked(!checked); -} +} \ No newline at end of file diff --git a/src/frmsettings.h b/src/frmsettings.h index 849914aa..2fecd81e 100644 --- a/src/frmsettings.h +++ b/src/frmsettings.h @@ -131,17 +131,11 @@ private slots: void on_cmdCancel_clicked(); void on_cboToolType_currentIndexChanged(int index); void on_listCategories_currentRowChanged(int currentRow); - void on_cmdDefaults_clicked(); - void on_cboFontSize_currentTextChanged(const QString &arg1); - void on_radDrawModeVectors_toggled(bool checked); - void on_radDrawModeRaster_toggled(bool checked); - void on_radGrayscaleS_toggled(bool checked); - void on_radGrayscaleZ_toggled(bool checked); private: diff --git a/src/frmsettings.ui b/src/frmsettings.ui index 4ddb9ccc..28752a78 100644 --- a/src/frmsettings.ui +++ b/src/frmsettings.ui @@ -87,9 +87,9 @@ QSplitter::handle:horizontal { 0 - -1496 + -1023 543 - 2271 + 2939 @@ -570,9 +570,9 @@ QSplitter::handle:horizontal { - - - Qt::AlignCenter + + + Command 1; command 2; ... @@ -593,9 +593,9 @@ QSplitter::handle:horizontal { - - - Qt::AlignCenter + + + Command 1; command 2; ... @@ -616,9 +616,9 @@ QSplitter::handle:horizontal { - - - Qt::AlignCenter + + + Command 1; command 2; ... @@ -639,9 +639,9 @@ QSplitter::handle:horizontal { - - - Qt::AlignCenter + + + Command 1; command 2; ... From 0a979b1b72d559ecacb53c244581bb5928437eb5 Mon Sep 17 00:00:00 2001 From: Denvi Date: Mon, 4 Nov 2019 12:55:31 +0500 Subject: [PATCH 13/80] Units, rapid speed, acceleration settings removed. Determined auto after each reset. --- src/frmmain.cpp | 27 ++++- src/frmsettings.cpp | 12 +- src/frmsettings.h | 4 + src/frmsettings.ui | 279 ++++++++++++++++++-------------------------- 4 files changed, 148 insertions(+), 174 deletions(-) diff --git a/src/frmmain.cpp b/src/frmmain.cpp index e91c87bb..fe52fe33 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -1030,6 +1030,11 @@ void frmMain::onSerialPortReadyRead() // Update machine coordinates static QRegExp mpx("MPos:([^,]*),([^,]*),([^,^>^|]*)"); if (mpx.indexIn(data) != -1) { + int prec = m_settings->units() == 0 ? 3 : 4; + ui->txtMPosX->setDecimals(prec); + ui->txtMPosY->setDecimals(prec); + ui->txtMPosZ->setDecimals(prec); + ui->txtMPosX->setValue(mpx.cap(1).toDouble()); ui->txtMPosY->setValue(mpx.cap(2).toDouble()); ui->txtMPosZ->setValue(mpx.cap(3).toDouble()); @@ -1344,6 +1349,23 @@ void frmMain::onSerialPortReadyRead() } } + // Settings response + if (ca.command == "$$" && ca.tableIndex == -2) { + static QRegExp gs("\\$(\\d+)\\=([^;]+)\\; "); + QMap set; + int p = 0; + while ((p = gs.indexIn(response, p)) != -1) { + set[gs.cap(1).toInt()] = gs.cap(2).toDouble(); + p += gs.matchedLength(); + } + if (set.keys().contains(13)) m_settings->setUnits(set[13]); + if (set.keys().contains(110)) m_settings->setRapidSpeed(set[110]); + if (set.keys().contains(120)) m_settings->setAcceleration(set[120]); + + qDebug() << "GRBL settings:" << m_settings->units() << m_settings->rapidSpeed() + << m_settings->acceleration(); + } + // Homing response if ((ca.command.toUpper() == "$H" || ca.command.toUpper() == "$T") && m_homing) m_homing = false; @@ -1351,6 +1373,9 @@ void frmMain::onSerialPortReadyRead() if (ca.command == "[CTRL+X]") { m_resetCompleted = true; m_updateParserStatus = true; + + // Query grbl settings + sendCommand("$$", -2, false); } // Clear command buffer on "M2" & "M30" command (old firmwares) @@ -4121,7 +4146,7 @@ void frmMain::on_cmdHeightMapBorderAuto_clicked() bool frmMain::compareCoordinates(double x, double y, double z) { - return ui->txtMPosX->text().toDouble() == x && ui->txtMPosY->text().toDouble() == y && ui->txtMPosZ->text().toDouble() == z; + return ui->txtMPosX->value() == x && ui->txtMPosY->value() == y && ui->txtMPosZ->value() == z; } void frmMain::onCmdUserClicked(bool checked) diff --git a/src/frmsettings.cpp b/src/frmsettings.cpp index 79ec49e2..b98cd8ee 100644 --- a/src/frmsettings.cpp +++ b/src/frmsettings.cpp @@ -366,12 +366,12 @@ void frmSettings::setLaserPowerMax(int value) int frmSettings::rapidSpeed() { - return ui->txtRapidSpeed->value(); + return m_rapidSpeed; } void frmSettings::setRapidSpeed(int rapidSpeed) { - ui->txtRapidSpeed->setValue(rapidSpeed); + m_rapidSpeed = rapidSpeed; } int frmSettings::heightmapProbingFeed() @@ -386,12 +386,12 @@ void frmSettings::setHeightmapProbingFeed(int heightmapProbingFeed) int frmSettings::acceleration() { - return ui->txtAcceleration->value(); + return m_acceleration; } void frmSettings::setAcceleration(int acceleration) { - ui->txtAcceleration->setValue(acceleration); + m_acceleration = acceleration; } int frmSettings::queryStateTime() @@ -466,12 +466,12 @@ void frmSettings::setAutoCompletion(bool autoCompletion) int frmSettings::units() { - return ui->cboUnits->currentIndex(); + return m_units; } void frmSettings::setUnits(int units) { - ui->cboUnits->setCurrentIndex(units); + m_units = units; } QString frmSettings::touchCommand() diff --git a/src/frmsettings.h b/src/frmsettings.h index 2fecd81e..bb76c746 100644 --- a/src/frmsettings.h +++ b/src/frmsettings.h @@ -148,6 +148,10 @@ private slots: QList m_storedColors; QIntValidator m_intValidator; + + int m_units; + int m_acceleration; + int m_rapidSpeed; }; #endif // FRMSETTINGS_H diff --git a/src/frmsettings.ui b/src/frmsettings.ui index 28752a78..8faa2e5f 100644 --- a/src/frmsettings.ui +++ b/src/frmsettings.ui @@ -87,9 +87,9 @@ QSplitter::handle:horizontal { 0 - -1023 + 0 543 - 2939 + 2914 @@ -100,49 +100,22 @@ QSplitter::handle:horizontal { - - - - - Port: - - - - - - - true - - - - - - - - 0 - 0 - - - - padding: 0 1 0 2; - + + + - ... - - - - :/images/restart.png:/images/restart.png + Baud: - - + + - Baud: + Port: - + true @@ -182,107 +155,39 @@ QSplitter::handle:horizontal { - - - - - - - - - Sender - - - - - - Ignore error responses - - - - - - - Automatically set parser state before sending from selected line - - - - - - - - - - Machine information - - - - - - - - - 9 - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 99999 - - - - - - - Status query period: - - - - - - - 9 - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 9999 - - - - - - - - 0 - 0 - - + - - mm - + + + true + + - - inch - + + + + 0 + 0 + + + + padding: 0 1 0 2; + + + ... + + + + :/images/restart.png:/images/restart.png + + - + - + Qt::Horizontal @@ -297,22 +202,18 @@ QSplitter::handle:horizontal { - - + + - Units: + Status query period: - - - - - - Rapid speed: + + true - - + + 9 @@ -325,19 +226,48 @@ QSplitter::handle:horizontal { QAbstractSpinBox::NoButtons - 99999 - - - - - - - Acceleration: + 9999 - - + + + + + + + + + Sender + + + + + + Ignore error responses + + + + + + + Automatically set parser state before sending from selected line + + + + + + + + + + Machine information + + + + + + 9 @@ -354,7 +284,7 @@ QSplitter::handle:horizontal { - + max.: @@ -362,13 +292,20 @@ QSplitter::handle:horizontal { + + + Laser power min.: + + + + Spindle speed min.: - + @@ -386,14 +323,14 @@ QSplitter::handle:horizontal { - - + + - Laser power min.: + max.: - + @@ -411,14 +348,7 @@ QSplitter::handle:horizontal { - - - - max.: - - - - + @@ -436,6 +366,22 @@ QSplitter::handle:horizontal { + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 6 + 20 + + + + @@ -1600,7 +1546,6 @@ QSplitter::handle:horizontal { scrollSettings cboPort cmdRefresh - cboBaud cboToolType txtToolAngle txtToolDiameter From 7c818cb156239697cd38abaca265113707f69d95 Mon Sep 17 00:00:00 2001 From: Denvi Date: Mon, 4 Nov 2019 21:16:39 +0500 Subject: [PATCH 14/80] Restore origin fix. Should work properly with non-zero G54-G59 systems. Abort fix. Restores G54-G59, then set G92 offsets. --- src/frmmain.cpp | 214 +++++++++++++--------------- src/frmmain.h | 4 +- src/scriptvars.cpp | 347 +++++++++++---------------------------------- src/scriptvars.h | 186 ++++++++---------------- 4 files changed, 246 insertions(+), 505 deletions(-) diff --git a/src/frmmain.cpp b/src/frmmain.cpp index fe52fe33..4bab63e1 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -338,7 +338,7 @@ frmMain::frmMain(QWidget *parent) : } // Delegate vars to script engine - QScriptValue vars = m_scriptEngine.newQObject(&m_scriptVars); + QScriptValue vars = m_scriptEngine.newQObject(&m_storedVars); m_scriptEngine.globalObject().setProperty("vars", vars); } @@ -453,6 +453,7 @@ void frmMain::loadSettings() m_storedX = set.value("storedX", 0).toDouble(); m_storedY = set.value("storedY", 0).toDouble(); m_storedZ = set.value("storedZ", 0).toDouble(); + m_storedCS = set.value("storedCS", "G54").toString(); ui->cmdRestoreOrigin->setToolTip(QString(tr("Restore origin:\n%1, %2, %3")).arg(m_storedX).arg(m_storedY).arg(m_storedZ)); @@ -564,8 +565,12 @@ void frmMain::loadSettings() qApp->processEvents(); restoreState(set.value("formMainState").toByteArray()); + // Setup coords textboxes + setupCoordsTextboxes(); + // Settings form geometry - m_settings->resize(set.value("formSettingsSize", m_settings->size()).toSize()); + // m_settings->resize(set.value("formSettingsSize", m_settings->size()).toSize()); + m_settings->restoreGeometry(set.value("formSettingsGeometry").toByteArray()); m_settings->ui->splitMain->restoreState(set.value("settingsSplitMain").toByteArray()); // Shortcuts @@ -685,7 +690,8 @@ void frmMain::saveSettings() // set.setValue("splitter", ui->splitter->saveState()); set.setValue("settingsSplitMain", m_settings->ui->splitMain->saveState()); set.setValue("formGeometry", this->saveGeometry()); - set.setValue("formSettingsSize", m_settings->size()); + // set.setValue("formSettingsSize", m_settings->size()); + set.setValue("formSettingsGeometry", m_settings->saveGeometry()); set.setValue("userCommandsPanel", ui->grpUserCommands->isChecked()); set.setValue("heightmapPanel", ui->grpHeightMap->isChecked()); set.setValue("spindlePanel", ui->grpSpindle->isChecked()); @@ -697,6 +703,7 @@ void frmMain::saveSettings() set.setValue("storedX", m_storedX); set.setValue("storedY", m_storedY); set.setValue("storedZ", m_storedZ); + set.setValue("storedCS", m_storedCS); set.setValue("recentFiles", m_recentFiles); set.setValue("recentHeightmaps", m_recentHeightmaps); set.setValue("lastFolder", m_lastFolder); @@ -927,10 +934,10 @@ void frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, b return; } - CommandAttributes ca; + // Evaluate scripts in command + if (tableIndex < 0) command = evaluateCommand(command); -// if (!(command == "$G" && tableIndex < -1) && !(command == "$#" && tableIndex < -1) -// && (!m_transferringFile || (m_transferringFile && m_showAllCommands) || tableIndex < 0)) { + CommandAttributes ca; if (showInConsole) { ui->txtConsole->appendPlainText(command.toUpper()); ca.consoleIndex = ui->txtConsole->blockCount() - 1; @@ -1030,19 +1037,15 @@ void frmMain::onSerialPortReadyRead() // Update machine coordinates static QRegExp mpx("MPos:([^,]*),([^,]*),([^,^>^|]*)"); if (mpx.indexIn(data) != -1) { - int prec = m_settings->units() == 0 ? 3 : 4; - ui->txtMPosX->setDecimals(prec); - ui->txtMPosY->setDecimals(prec); - ui->txtMPosZ->setDecimals(prec); - ui->txtMPosX->setValue(mpx.cap(1).toDouble()); ui->txtMPosY->setValue(mpx.cap(2).toDouble()); ui->txtMPosZ->setValue(mpx.cap(3).toDouble()); - // Update script vars - m_scriptVars.setMx(ui->txtMPosX->value()); - m_scriptVars.setMy(ui->txtMPosY->value()); - m_scriptVars.setMz(ui->txtMPosZ->value()); + // Update stored vars + m_storedVars.setCoords("M", QVector3D( + ui->txtMPosX->value(), + ui->txtMPosY->value(), + ui->txtMPosZ->value())); } // Status @@ -1129,8 +1132,8 @@ void frmMain::onSerialPortReadyRead() case IDLE: // Idle if (!m_processingFile && m_resetCompleted) { m_aborting = false; - restoreOffsets(); restoreParserState(); + restoreOffsets(); return; } break; @@ -1162,10 +1165,6 @@ void frmMain::onSerialPortReadyRead() } // Update work coordinates - int prec = m_settings->units() == 0 ? 3 : 4; - ui->txtWPosX->setDecimals(prec); - ui->txtWPosY->setDecimals(prec); - ui->txtWPosZ->setDecimals(prec); ui->txtWPosX->setValue(ui->txtMPosX->value() - workOffset.x()); ui->txtWPosY->setValue(ui->txtMPosY->value() - workOffset.y()); ui->txtWPosZ->setValue(ui->txtMPosZ->value() - workOffset.z()); @@ -1173,10 +1172,11 @@ void frmMain::onSerialPortReadyRead() // ui->txtWPosY->setText(QString::number(ui->txtMPosY->text().toDouble() - workOffset.y(), 'f', prec)); // ui->txtWPosZ->setText(QString::number(ui->txtMPosZ->text().toDouble() - workOffset.z(), 'f', prec)); - // Update script vars - m_scriptVars.setWx(ui->txtWPosX->value()); - m_scriptVars.setWy(ui->txtWPosY->value()); - m_scriptVars.setWz(ui->txtWPosZ->value()); + // Update stored vars + m_storedVars.setCoords("W", QVector3D( + ui->txtWPosX->value(), + ui->txtWPosY->value(), + ui->txtWPosZ->value())); // Update tool position QVector3D toolPosition; @@ -1297,6 +1297,14 @@ void frmMain::onSerialPortReadyRead() QTextBlock tb = ui->txtConsole->document()->findBlockByNumber(ca.consoleIndex); QTextCursor tc(tb); + // Store current coordinate system + if (ca.command.toUpper() == "$G") { + static QRegExp g("G5[4-9]"); + if (g.indexIn(response) != -1) { + m_storedVars.setCS(g.cap(0)); + } + } + // Restore absolute/relative coordinate system after jog if (ca.command.toUpper() == "$G" && ca.tableIndex == -2) { if (ui->chkKeyboardControl->isChecked()) m_absoluteCoordinates = response.contains("G90"); @@ -1327,7 +1335,7 @@ void frmMain::onSerialPortReadyRead() } // Offsets - if (ca.command == "$#" && ca.tableIndex == -1) { + if (ca.command == "$#") { storeOffsetsVars(response); } @@ -1339,10 +1347,12 @@ void frmMain::onSerialPortReadyRead() if (g92.indexIn(response) != -1) { if (m_settingZeroXY) { m_settingZeroXY = false; + m_storedCS = m_storedVars.CS(); m_storedX = toMetric(g92.cap(1).toDouble()); m_storedY = toMetric(g92.cap(2).toDouble()); } else if (m_settingZeroZ) { m_settingZeroZ = false; + m_storedCS = m_storedVars.CS(); m_storedZ = toMetric(g92.cap(3).toDouble()); } ui->cmdRestoreOrigin->setToolTip(QString(tr("Restore origin:\n%1, %2, %3")).arg(m_storedX).arg(m_storedY).arg(m_storedZ)); @@ -1364,6 +1374,8 @@ void frmMain::onSerialPortReadyRead() qDebug() << "GRBL settings:" << m_settings->units() << m_settings->rapidSpeed() << m_settings->acceleration(); + + setupCoordsTextboxes(); } // Homing response @@ -1375,7 +1387,7 @@ void frmMain::onSerialPortReadyRead() m_updateParserStatus = true; // Query grbl settings - sendCommand("$$", -2, false); + sendCommand("$$", -2, false); } // Clear command buffer on "M2" & "M30" command (old firmwares) @@ -1388,9 +1400,11 @@ void frmMain::onSerialPortReadyRead() if (ca.command.contains("G38.2") && ca.tableIndex < 0) { static QRegExp PRB(".*PRB:([^,]*),([^,]*),([^]^:]*)"); if (PRB.indexIn(response) != -1) { - m_scriptVars.setPRBx(PRB.cap(1).toDouble()); - m_scriptVars.setPRBy(PRB.cap(2).toDouble()); - m_scriptVars.setPRBz(PRB.cap(3).toDouble()); + m_storedVars.setCoords("PRB", QVector3D( + PRB.cap(1).toDouble(), + PRB.cap(2).toDouble(), + PRB.cap(3).toDouble() + )); } } @@ -1458,11 +1472,9 @@ void frmMain::onSerialPortReadyRead() // Check queue if (m_queue.length() > 0) { - qDebug() << "queue:" << m_queue.count(); CommandQueue cq = m_queue.takeFirst(); while ((bufferLength() + cq.command.length() + 1) <= BUFFERLENGTH) { - cq.command = evaluateCommand(cq.command); if (!cq.command.isEmpty()) sendCommand(cq.command, cq.tableIndex, cq.showInConsole); if (!cq.command.isEmpty() && (m_queue.isEmpty() || cq.queue)) break; else cq = m_queue.takeFirst(); @@ -2284,85 +2296,27 @@ void frmMain::restoreOffsets() void frmMain::storeOffsetsVars(QString response) { - static QRegExp G54(".*G54:([^,]*),([^,]*),([^\\]]*)"); - static QRegExp G55(".*G55:([^,]*),([^,]*),([^\\]]*)"); - static QRegExp G56(".*G56:([^,]*),([^,]*),([^\\]]*)"); - static QRegExp G57(".*G57:([^,]*),([^,]*),([^\\]]*)"); - static QRegExp G58(".*G58:([^,]*),([^,]*),([^\\]]*)"); - static QRegExp G59(".*G59:([^,]*),([^,]*),([^\\]]*)"); - static QRegExp G28(".*G28:([^,]*),([^,]*),([^\\]]*)"); - static QRegExp G30(".*G30:([^,]*),([^,]*),([^\\]]*)"); - static QRegExp G92(".*G92:([^,]*),([^,]*),([^\\]]*)"); - static QRegExp TLO(".*TLO:([^,]*),([^,]*),([^\\]]*)"); - static QRegExp PRB(".*PRB:([^,]*),([^,]*),([^\\]]*)"); - - if (G54.indexIn(response) != -1) { - m_scriptVars.setG54x(G54.cap(1).toDouble()); - m_scriptVars.setG54y(G54.cap(2).toDouble()); - m_scriptVars.setG54z(G54.cap(3).toDouble()); - } - - if (G55.indexIn(response) != -1) { - m_scriptVars.setG55x(G55.cap(1).toDouble()); - m_scriptVars.setG55y(G55.cap(2).toDouble()); - m_scriptVars.setG55z(G55.cap(3).toDouble()); - } - - if (G56.indexIn(response) != -1) { - m_scriptVars.setG56x(G56.cap(1).toDouble()); - m_scriptVars.setG56y(G56.cap(2).toDouble()); - m_scriptVars.setG56z(G56.cap(3).toDouble()); - } + static QRegExp gx("\\[(G5[4-9]|G28|G30|G92|PRB):([\\d\\.]+),([\\d\\.]+),([\\d\\.]+)"); + static QRegExp tx("\\[(TLO):([\\d\\.]+)"); - if (G57.indexIn(response) != -1) { - m_scriptVars.setG57x(G57.cap(1).toDouble()); - m_scriptVars.setG57y(G57.cap(2).toDouble()); - m_scriptVars.setG57z(G57.cap(3).toDouble()); - } - - if (G58.indexIn(response) != -1) { - m_scriptVars.setG58x(G58.cap(1).toDouble()); - m_scriptVars.setG58y(G58.cap(2).toDouble()); - m_scriptVars.setG58z(G58.cap(3).toDouble()); - } - - if (G59.indexIn(response) != -1) { - m_scriptVars.setG59x(G59.cap(1).toDouble()); - m_scriptVars.setG59y(G59.cap(2).toDouble()); - m_scriptVars.setG59z(G59.cap(3).toDouble()); - } - - if (G28.indexIn(response) != -1) { - m_scriptVars.setG28x(G28.cap(1).toDouble()); - m_scriptVars.setG28y(G28.cap(2).toDouble()); - m_scriptVars.setG28z(G28.cap(3).toDouble()); - } - - if (G30.indexIn(response) != -1) { - m_scriptVars.setG30x(G30.cap(1).toDouble()); - m_scriptVars.setG30y(G30.cap(2).toDouble()); - m_scriptVars.setG30z(G30.cap(3).toDouble()); - } - - if (G92.indexIn(response) != -1) { - m_scriptVars.setG92x(G92.cap(1).toDouble()); - m_scriptVars.setG92y(G92.cap(2).toDouble()); - m_scriptVars.setG92z(G92.cap(3).toDouble()); - } - - if (TLO.indexIn(response) != -1) { - m_scriptVars.setTLOx(TLO.cap(1).toDouble()); - m_scriptVars.setTLOy(TLO.cap(2).toDouble()); - m_scriptVars.setTLOz(TLO.cap(3).toDouble()); + int p = 0; + while ((p = gx.indexIn(response, p)) != -1) { + m_storedVars.setCoords(gx.cap(1), QVector3D( + gx.cap(2).toDouble(), + gx.cap(3).toDouble(), + gx.cap(4).toDouble() + )); + + p += gx.matchedLength(); } - if (PRB.indexIn(response) != -1) { - m_scriptVars.setPRBx(PRB.cap(1).toDouble()); - m_scriptVars.setPRBy(PRB.cap(2).toDouble()); - m_scriptVars.setPRBz(PRB.cap(3).toDouble()); + if (tx.indexIn(response) != -1) { + m_storedVars.setCoords(tx.cap(1), QVector3D( + 0, + 0, + tx.cap(2).toDouble() + )); } - - qDebug() << "Storing vars:" << m_scriptVars.PRBx(); } void frmMain::sendNextFileCommands() { @@ -2772,26 +2726,32 @@ void frmMain::on_cmdZeroXY_clicked() { m_settingZeroXY = true; sendCommand("G92X0Y0", -1, m_settings->showUICommands()); - sendCommand("$#", -2, m_settings->showUICommands()); + sendCommand("$G", -2, m_settings->showUICommands()); + sendCommand("$#", -2, m_settings->showUICommands(), true); } void frmMain::on_cmdZeroZ_clicked() { m_settingZeroZ = true; sendCommand("G92Z0", -1, m_settings->showUICommands()); - sendCommand("$#", -2, m_settings->showUICommands()); + sendCommand("$G", -2, m_settings->showUICommands()); + sendCommand("$#", -2, m_settings->showUICommands(), true); } void frmMain::on_cmdRestoreOrigin_clicked() { // Restore offset - sendCommand(QString("G21"), -1, m_settings->showUICommands()); - sendCommand(QString("G53G90G0X%1Y%2Z%3").arg(toMetric(ui->txtMPosX->value())) + sendCommand(QString("G21G53G90G0X%1Y%2Z%3").arg(toMetric(ui->txtMPosX->value())) .arg(toMetric(ui->txtMPosY->value())) .arg(toMetric(ui->txtMPosZ->value())), -1, m_settings->showUICommands()); - sendCommand(QString("G92X%1Y%2Z%3").arg(toMetric(ui->txtMPosX->text().toDouble()) - m_storedX) + + // TODO: Add G54-G59 offsets. (m_storedParserStatus, m_storedOffsets) + m_storedVars.setCS(m_storedCS); + sendCommand("{vars.CS}", -1, m_settings->showUICommands()); + sendCommand(QString("G21G92X{%1 - vars.x}Y{%2 - vars.y}Z{%3 - vars.z}").arg(toMetric(ui->txtMPosX->text().toDouble()) - m_storedX) .arg(toMetric(ui->txtMPosY->text().toDouble()) - m_storedY) - .arg(toMetric(ui->txtMPosZ->text().toDouble()) - m_storedZ), -1, m_settings->showUICommands()); + .arg(toMetric(ui->txtMPosZ->text().toDouble()) - m_storedZ), + -1, m_settings->showUICommands()); // Move tool if (m_settings->moveOnRestore()) switch (m_settings->restoreMode()) { @@ -4227,15 +4187,41 @@ QString frmMain::evaluateCommand(QString command) QScriptValue v; QString vs; while (sx.indexIn(command) != -1) { - qDebug() << sx.cap(0) << command; + // qDebug() << sx.cap(0) << command; v = m_scriptEngine.evaluate(sx.cap(1)); vs = v.isUndefined() ? "" : v.toString(); command.replace(sx.cap(0), vs); } - qDebug() << "command:" << command; + // qDebug() << "Evaluated command:" << command; return command; } +void frmMain::setupCoordsTextboxes() +{ + int prec = m_settings->units() == 0 ? 3 : 4; + int bound = m_settings->units() == 0 ? 999 : 99; + + ui->txtMPosX->setDecimals(prec); + ui->txtMPosX->setMinimum(-bound); + ui->txtMPosX->setMaximum(bound); + ui->txtMPosY->setDecimals(prec); + ui->txtMPosY->setMinimum(-bound); + ui->txtMPosY->setMaximum(bound); + ui->txtMPosZ->setDecimals(prec); + ui->txtMPosZ->setMinimum(-bound); + ui->txtMPosZ->setMaximum(bound); + + ui->txtWPosX->setDecimals(prec); + ui->txtWPosX->setMinimum(-bound); + ui->txtWPosX->setMaximum(bound); + ui->txtWPosY->setDecimals(prec); + ui->txtWPosY->setMinimum(-bound); + ui->txtWPosY->setMaximum(bound); + ui->txtWPosZ->setDecimals(prec); + ui->txtWPosZ->setMinimum(-bound); + ui->txtWPosZ->setMaximum(bound); +} + void frmMain::on_cmdYPlus_pressed() { m_jogVector += QVector3D(0, 1, 0); diff --git a/src/frmmain.h b/src/frmmain.h index e1af0d06..f182531f 100644 --- a/src/frmmain.h +++ b/src/frmmain.h @@ -282,6 +282,7 @@ private slots: double m_storedX; double m_storedY; double m_storedZ; + QString m_storedCS; QString m_storedParserStatus; // Console window @@ -338,7 +339,7 @@ private slots: // Script QScriptEngine m_scriptEngine; - ScriptVars m_scriptVars; + ScriptVars m_storedVars; void loadFile(QString fileName); void loadFile(QList data); @@ -397,6 +398,7 @@ private slots: void updateOverride(SliderBox *slider, int value, char command); void jogStep(); void updateJogTitle(); + void setupCoordsTextboxes(); static bool actionLessThan(const QAction *a1, const QAction *a2); }; diff --git a/src/scriptvars.cpp b/src/scriptvars.cpp index 5f05ebd9..87b0ab52 100644 --- a/src/scriptvars.cpp +++ b/src/scriptvars.cpp @@ -2,445 +2,262 @@ ScriptVars::ScriptVars() { - m_Mx = 10; - m_My = 20; - m_Mz = 30; - - m_Wx = 0; - m_Wy = 0; - m_Wz = 0; - - m_G54x = 0; - m_G54y = 0; - m_G54z = 0; - - m_G55x = 0; - m_G55y = 0; - m_G55z = 0; - - m_G56x = 0; - m_G56y = 0; - m_G56z = 0; - - m_G57x = 0; - m_G57y = 0; - m_G57z = 0; - - m_G58x = 0; - m_G58y = 0; - m_G58z = 0; - - m_G59x = 0; - m_G59y = 0; - m_G59z = 0; - - m_G28x = 0; - m_G28y = 0; - m_G28z = 0; - - m_G30x = 0; - m_G30y = 0; - m_G30z = 0; - - m_G92x = 0; - m_G92y = 0; - m_G92z = 0; - - m_TLOx = 0; - m_TLOy = 0; - m_TLOz = 0; - - m_PRBx = 0; - m_PRBy = 0; - m_PRBz = 0; -} - -void ScriptVars::setMx(double value) -{ - m_Mx = value; + m_coords["M"] = QVector3D(); + m_coords["W"] = QVector3D(); + m_coords["G54"] = QVector3D(); + m_coords["G55"] = QVector3D(); + m_coords["G56"] = QVector3D(); + m_coords["G57"] = QVector3D(); + m_coords["G58"] = QVector3D(); + m_coords["G59"] = QVector3D(); + m_coords["G28"] = QVector3D(); + m_coords["G30"] = QVector3D(); + m_coords["G92"] = QVector3D(); + m_coords["TLO"] = QVector3D(); + m_coords["PRB"] = QVector3D(); } double ScriptVars::Mx() const { - return m_Mx; -} - -void ScriptVars::setMy(double value) -{ - m_My = value; + return m_coords["M"].x(); } double ScriptVars::My() const { - return m_My; -} - -void ScriptVars::setMz(double value) -{ - m_Mz = value; + return m_coords["M"].y(); } double ScriptVars::Mz() const { - return m_Mz; -} - -void ScriptVars::setWx(double value) -{ - m_Wx = value; + return m_coords["M"].z(); } double ScriptVars::Wx() const { - return m_Wx; -} - -void ScriptVars::setWy(double value) -{ - m_Wy = value; + return m_coords["W"].x(); } double ScriptVars::Wy() const { - return m_Wy; -} - -void ScriptVars::setWz(double value) -{ - m_Wz = value; + return m_coords["W"].y(); } double ScriptVars::Wz() const { - return m_Wz; -} - -void ScriptVars::setG54x(double value) -{ - m_G54x = value; + return m_coords["W"].z(); } double ScriptVars::G54x() const { - return m_G54x; -} - -void ScriptVars::setG54y(double value) -{ - m_G54y = value; + return m_coords["G54"].x(); } double ScriptVars::G54y() const { - return m_G54y; -} - -void ScriptVars::setG54z(double value) -{ - m_G54z = value; + return m_coords["G54"].y(); } double ScriptVars::G54z() const { - return m_G54z; -} - -void ScriptVars::setG55x(double value) -{ - m_G55x = value; + return m_coords["G54"].z(); } double ScriptVars::G55x() const { - return m_G55x; -} - -void ScriptVars::setG55y(double value) -{ - m_G55y = value; + return m_coords["G55"].x(); } double ScriptVars::G55y() const { - return m_G55y; -} - -void ScriptVars::setG55z(double value) -{ - m_G55z = value; + return m_coords["G55"].y(); } double ScriptVars::G55z() const { - return m_G55z; -} - -void ScriptVars::setG56x(double value) -{ - m_G56x = value; + return m_coords["G55"].z(); } double ScriptVars::G56x() const { - return m_G56x; -} - -void ScriptVars::setG56y(double value) -{ - m_G56y = value; + return m_coords["G56"].x(); } double ScriptVars::G56y() const { - return m_G56y; -} - -void ScriptVars::setG56z(double value) -{ - m_G56z = value; + return m_coords["G56"].y(); } double ScriptVars::G56z() const { - return m_G56z; -} - -void ScriptVars::setG57x(double value) -{ - m_G57x = value; + return m_coords["G56"].z(); } double ScriptVars::G57x() const { - return m_G57x; -} - -void ScriptVars::setG57y(double value) -{ - m_G57y = value; + return m_coords["G57"].x(); } double ScriptVars::G57y() const { - return m_G57y; -} - -void ScriptVars::setG57z(double value) -{ - m_G57z = value; + return m_coords["G57"].y(); } double ScriptVars::G57z() const { - return m_G57z; -} - -void ScriptVars::setG58x(double value) -{ - m_G58x = value; + return m_coords["G57"].z(); } double ScriptVars::G58x() const { - return m_G58x; -} - -void ScriptVars::setG58y(double value) -{ - m_G58y = value; + return m_coords["G58"].x(); } double ScriptVars::G58y() const { - return m_G58y; -} - -void ScriptVars::setG58z(double value) -{ - m_G58z = value; + return m_coords["G58"].y(); } double ScriptVars::G58z() const { - return m_G58z; -} - -void ScriptVars::setG59x(double value) -{ - m_G59x = value; + return m_coords["G58"].z(); } double ScriptVars::G59x() const { - return m_G59x; -} - -void ScriptVars::setG59y(double value) -{ - m_G59y = value; + return m_coords["G59"].x(); } double ScriptVars::G59y() const { - return m_G59y; -} - -void ScriptVars::setG59z(double value) -{ - m_G59z = value; + return m_coords["G59"].y(); } double ScriptVars::G59z() const { - return m_G59z; -} - -void ScriptVars::setG28x(double value) -{ - m_G28x = value; + return m_coords["G59"].z(); } double ScriptVars::G28x() const { - return m_G28x; -} - -void ScriptVars::setG28y(double value) -{ - m_G28y = value; + return m_coords["G28"].x(); } double ScriptVars::G28y() const { - return m_G28y; -} - -void ScriptVars::setG28z(double value) -{ - m_G28z = value; + return m_coords["G28"].y(); } double ScriptVars::G28z() const { - return m_G28z; -} - -void ScriptVars::setG30x(double value) -{ - m_G30x = value; + return m_coords["G28"].z(); } double ScriptVars::G30x() const { - return m_G30x; -} - -void ScriptVars::setG30y(double value) -{ - m_G30y = value; + return m_coords["G30"].x(); } double ScriptVars::G30y() const { - return m_G30y; + return m_coords["G30"].y(); } -void ScriptVars::setG30z(double value) +double ScriptVars::G30z() const { - m_G30z = value; + return m_coords["G30"].z(); } -double ScriptVars::G30z() const +double ScriptVars::G92x() const { - return m_G30z; + return m_coords["G92"].x(); } -void ScriptVars::setG92x(double value) +double ScriptVars::G92y() const { - m_G92x = value; + return m_coords["G92"].y(); } -double ScriptVars::G92x() const +double ScriptVars::G92z() const { - return m_G92x; + return m_coords["G92"].z(); } -void ScriptVars::setG92y(double value) +double ScriptVars::TLOx() const { - m_G92y = value; + return m_coords["TLO"].x(); } -double ScriptVars::G92y() const +double ScriptVars::TLOy() const { - return m_G92y; + return m_coords["TLO"].y(); } -void ScriptVars::setG92z(double value) +double ScriptVars::TLOz() const { - m_G92z = value; + return m_coords["TLO"].z(); } -double ScriptVars::G92z() const +double ScriptVars::PRBx() const { - return m_G92z; + return m_coords["PRB"].x(); } -void ScriptVars::setTLOx(double value) +double ScriptVars::PRBy() const { - m_TLOx = value; + return m_coords["PRB"].y(); } -double ScriptVars::TLOx() const +double ScriptVars::PRBz() const { - return m_TLOx; + return m_coords["PRB"].z(); } -void ScriptVars::setTLOy(double value) +void ScriptVars::setCoords(QString name, QVector3D coords) { - m_TLOy = value; + m_coords[name] = coords; } -double ScriptVars::TLOy() const +QVector3D ScriptVars::coords(QString name) const { - return m_TLOy; + return m_coords.keys().contains(name) ? m_coords[name] : QVector3D(); } -void ScriptVars::setTLOz(double value) +double ScriptVars::x(QString name) const { - m_TLOz = value; + return coords(name).x(); } -double ScriptVars::TLOz() const +double ScriptVars::y(QString name) const { - return m_TLOz; + return coords(name).y(); } -void ScriptVars::setPRBx(double value) +double ScriptVars::z(QString name) const { - m_PRBx = value; + return coords(name).z(); } -double ScriptVars::PRBx() const +double ScriptVars::x() const { - return m_PRBx; + return coords(m_cs).x(); } -void ScriptVars::setPRBy(double value) +double ScriptVars::y() const { - m_PRBy = value; + return coords(m_cs).y(); } -double ScriptVars::PRBy() const +double ScriptVars::z() const { - return m_PRBy; + return coords(m_cs).z(); } -void ScriptVars::setPRBz(double value) +void ScriptVars::setCS(QString cs) { - m_PRBz = value; + m_cs = cs; } -double ScriptVars::PRBz() const +QString ScriptVars::CS() const { - return m_PRBz; + return m_cs; } \ No newline at end of file diff --git a/src/scriptvars.h b/src/scriptvars.h index 7f05498c..2baae2f4 100644 --- a/src/scriptvars.h +++ b/src/scriptvars.h @@ -2,208 +2,144 @@ #define SCRIPTVARS_H #include +#include +#include class ScriptVars: public QObject { Q_OBJECT - Q_PROPERTY(double Mx READ Mx WRITE setMx) - Q_PROPERTY(double My READ My WRITE setMy) - Q_PROPERTY(double Mz READ Mz WRITE setMz) + Q_PROPERTY(double Mx READ Mx) + Q_PROPERTY(double My READ My) + Q_PROPERTY(double Mz READ Mz) - Q_PROPERTY(double Wx READ Wx WRITE setWx) - Q_PROPERTY(double Wy READ Wy WRITE setWy) - Q_PROPERTY(double Wz READ Wz WRITE setWz) + Q_PROPERTY(double Wx READ Wx) + Q_PROPERTY(double Wy READ Wy) + Q_PROPERTY(double Wz READ Wz) - Q_PROPERTY(double G54x READ G54x WRITE setG54x) - Q_PROPERTY(double G54y READ G54y WRITE setG54y) - Q_PROPERTY(double G54z READ G54z WRITE setG54z) + Q_PROPERTY(double G54x READ G54x) + Q_PROPERTY(double G54y READ G54y) + Q_PROPERTY(double G54z READ G54z) - Q_PROPERTY(double G55x READ G55x WRITE setG55x) - Q_PROPERTY(double G55y READ G55y WRITE setG55y) - Q_PROPERTY(double G55z READ G55z WRITE setG55z) + Q_PROPERTY(double G55x READ G55x) + Q_PROPERTY(double G55y READ G55y) + Q_PROPERTY(double G55z READ G55z) - Q_PROPERTY(double G56x READ G56x WRITE setG56x) - Q_PROPERTY(double G56y READ G56y WRITE setG56y) - Q_PROPERTY(double G56z READ G56z WRITE setG56z) + Q_PROPERTY(double G56x READ G56x) + Q_PROPERTY(double G56y READ G56y) + Q_PROPERTY(double G56z READ G56z) - Q_PROPERTY(double G57x READ G57x WRITE setG57x) - Q_PROPERTY(double G57y READ G57y WRITE setG57y) - Q_PROPERTY(double G57z READ G57z WRITE setG57z) + Q_PROPERTY(double G57x READ G57x) + Q_PROPERTY(double G57y READ G57y) + Q_PROPERTY(double G57z READ G57z) - Q_PROPERTY(double G58x READ G58x WRITE setG58x) - Q_PROPERTY(double G58y READ G58y WRITE setG58y) - Q_PROPERTY(double G58z READ G58z WRITE setG58z) + Q_PROPERTY(double G58x READ G58x) + Q_PROPERTY(double G58y READ G58y) + Q_PROPERTY(double G58z READ G58z) - Q_PROPERTY(double G59x READ G59x WRITE setG59x) - Q_PROPERTY(double G59y READ G59y WRITE setG59y) - Q_PROPERTY(double G59z READ G59z WRITE setG59z) + Q_PROPERTY(double G59x READ G59x) + Q_PROPERTY(double G59y READ G59y) + Q_PROPERTY(double G59z READ G59z) - Q_PROPERTY(double G28x READ G28x WRITE setG28x) - Q_PROPERTY(double G28y READ G28y WRITE setG28y) - Q_PROPERTY(double G28z READ G28z WRITE setG28z) + Q_PROPERTY(double G28x READ G28x) + Q_PROPERTY(double G28y READ G28y) + Q_PROPERTY(double G28z READ G28z) - Q_PROPERTY(double G30x READ G30x WRITE setG30x) - Q_PROPERTY(double G30y READ G30y WRITE setG30y) - Q_PROPERTY(double G30z READ G30z WRITE setG30z) + Q_PROPERTY(double G30x READ G30x) + Q_PROPERTY(double G30y READ G30y) + Q_PROPERTY(double G30z READ G30z) - Q_PROPERTY(double G92x READ G92x WRITE setG92x) - Q_PROPERTY(double G92y READ G92y WRITE setG92y) - Q_PROPERTY(double G92z READ G92z WRITE setG92z) + Q_PROPERTY(double G92x READ G92x) + Q_PROPERTY(double G92y READ G92y) + Q_PROPERTY(double G92z READ G92z) - Q_PROPERTY(double TLOx READ TLOx WRITE setTLOx) - Q_PROPERTY(double TLOy READ TLOy WRITE setTLOy) - Q_PROPERTY(double TLOz READ TLOz WRITE setTLOz) + Q_PROPERTY(double TLOx READ TLOx) + Q_PROPERTY(double TLOy READ TLOy) + Q_PROPERTY(double TLOz READ TLOz) - Q_PROPERTY(double PRBx READ PRBx WRITE setPRBx) - Q_PROPERTY(double PRBy READ PRBy WRITE setPRBy) - Q_PROPERTY(double PRBz READ PRBz WRITE setPRBz) + Q_PROPERTY(double PRBx READ PRBx) + Q_PROPERTY(double PRBy READ PRBy) + Q_PROPERTY(double PRBz READ PRBz) + + Q_PROPERTY(double x READ x) + Q_PROPERTY(double y READ y) + Q_PROPERTY(double z READ z) + + Q_PROPERTY(QString CS READ CS) public: ScriptVars(); - void setMx(double value); double Mx() const; - void setMy(double value); double My() const; - void setMz(double value); double Mz() const; - void setWx(double value); double Wx() const; - void setWy(double value); double Wy() const; - void setWz(double value); double Wz() const; - void setG54x(double value); double G54x() const; - void setG54y(double value); double G54y() const; - void setG54z(double value); double G54z() const; - void setG55x(double value); double G55x() const; - void setG55y(double value); double G55y() const; - void setG55z(double value); double G55z() const; - void setG56x(double value); double G56x() const; - void setG56y(double value); double G56y() const; - void setG56z(double value); double G56z() const; - void setG57x(double value); double G57x() const; - void setG57y(double value); double G57y() const; - void setG57z(double value); double G57z() const; - void setG58x(double value); double G58x() const; - void setG58y(double value); double G58y() const; - void setG58z(double value); double G58z() const; - void setG59x(double value); double G59x() const; - void setG59y(double value); double G59y() const; - void setG59z(double value); double G59z() const; - void setG28x(double value); double G28x() const; - void setG28y(double value); double G28y() const; - void setG28z(double value); double G28z() const; - void setG30x(double value); double G30x() const; - void setG30y(double value); double G30y() const; - void setG30z(double value); double G30z() const; - void setG92x(double value); double G92x() const; - void setG92y(double value); double G92y() const; - void setG92z(double value); double G92z() const; - void setTLOx(double value); double TLOx() const; - void setTLOy(double value); double TLOy() const; - void setTLOz(double value); double TLOz() const; - void setPRBx(double value); double PRBx() const; - void setPRBy(double value); double PRBy() const; - void setPRBz(double value); double PRBz() const; -private: - double m_Mx; - double m_My; - double m_Mz; - - double m_Wx; - double m_Wy; - double m_Wz; - - double m_G54x; - double m_G54y; - double m_G54z; - - double m_G55x; - double m_G55y; - double m_G55z; + QVector3D coords(QString name) const; + QString CS() const; - double m_G56x; - double m_G56y; - double m_G56z; +public slots: - double m_G57x; - double m_G57y; - double m_G57z; + void setCoords(QString name, QVector3D coords); + void setCS(QString cs); - double m_G58x; - double m_G58y; - double m_G58z; + double x() const; + double y() const; + double z() const; - double m_G59x; - double m_G59y; - double m_G59z; + double x(QString name) const; + double y(QString name) const; + double z(QString name) const; - double m_G28x; - double m_G28y; - double m_G28z; - - double m_G30x; - double m_G30y; - double m_G30z; - - double m_G92x; - double m_G92y; - double m_G92z; - - double m_TLOx; - double m_TLOy; - double m_TLOz; - - double m_PRBx; - double m_PRBy; - double m_PRBz; +private: + QMap m_coords; + QString m_cs; }; #endif \ No newline at end of file From ddbd4ccb2ae4ed03a8f00bd3e63896db0e4bb7f3 Mon Sep 17 00:00:00 2001 From: Denvi Date: Mon, 4 Nov 2019 21:55:11 +0500 Subject: [PATCH 15/80] Offsets regexp fix. --- src/frmmain.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 4bab63e1..85b720ab 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -2296,8 +2296,8 @@ void frmMain::restoreOffsets() void frmMain::storeOffsetsVars(QString response) { - static QRegExp gx("\\[(G5[4-9]|G28|G30|G92|PRB):([\\d\\.]+),([\\d\\.]+),([\\d\\.]+)"); - static QRegExp tx("\\[(TLO):([\\d\\.]+)"); + static QRegExp gx("\\[(G5[4-9]|G28|G30|G92|PRB):([\\d\\.\\-]+),([\\d\\.\\-]+),([\\d\\.\\-]+)"); + static QRegExp tx("\\[(TLO):([\\d\\.\\-]+)"); int p = 0; while ((p = gx.indexIn(response, p)) != -1) { @@ -2747,11 +2747,12 @@ void frmMain::on_cmdRestoreOrigin_clicked() // TODO: Add G54-G59 offsets. (m_storedParserStatus, m_storedOffsets) m_storedVars.setCS(m_storedCS); + sendCommand("$#", -1, m_settings->showUICommands()); sendCommand("{vars.CS}", -1, m_settings->showUICommands()); sendCommand(QString("G21G92X{%1 - vars.x}Y{%2 - vars.y}Z{%3 - vars.z}").arg(toMetric(ui->txtMPosX->text().toDouble()) - m_storedX) .arg(toMetric(ui->txtMPosY->text().toDouble()) - m_storedY) .arg(toMetric(ui->txtMPosZ->text().toDouble()) - m_storedZ), - -1, m_settings->showUICommands()); + -1, m_settings->showUICommands(), true); // Move tool if (m_settings->moveOnRestore()) switch (m_settings->restoreMode()) { @@ -4189,7 +4190,7 @@ QString frmMain::evaluateCommand(QString command) while (sx.indexIn(command) != -1) { // qDebug() << sx.cap(0) << command; v = m_scriptEngine.evaluate(sx.cap(1)); - vs = v.isUndefined() ? "" : v.toString(); + vs = v.isUndefined() ? "" : v.isNumber() ? QString::number(v.toNumber(), 'f', 4) : v.toString(); command.replace(sx.cap(0), vs); } // qDebug() << "Evaluated command:" << command; From e7f327bcfe97d209011dfbddb55bfacedd767b28 Mon Sep 17 00:00:00 2001 From: Denvi Date: Mon, 4 Nov 2019 22:09:51 +0500 Subject: [PATCH 16/80] Restore origin move fix. --- src/frmmain.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 85b720ab..d3320bc8 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -2748,7 +2748,7 @@ void frmMain::on_cmdRestoreOrigin_clicked() // TODO: Add G54-G59 offsets. (m_storedParserStatus, m_storedOffsets) m_storedVars.setCS(m_storedCS); sendCommand("$#", -1, m_settings->showUICommands()); - sendCommand("{vars.CS}", -1, m_settings->showUICommands()); + sendCommand("{vars.CS}", -1, m_settings->showUICommands(), true); sendCommand(QString("G21G92X{%1 - vars.x}Y{%2 - vars.y}Z{%3 - vars.z}").arg(toMetric(ui->txtMPosX->text().toDouble()) - m_storedX) .arg(toMetric(ui->txtMPosY->text().toDouble()) - m_storedY) .arg(toMetric(ui->txtMPosZ->text().toDouble()) - m_storedZ), @@ -2757,10 +2757,10 @@ void frmMain::on_cmdRestoreOrigin_clicked() // Move tool if (m_settings->moveOnRestore()) switch (m_settings->restoreMode()) { case 0: - sendCommand("G0X0Y0", -1, m_settings->showUICommands()); + sendCommand("G0X0Y0", -1, m_settings->showUICommands(), true); break; case 1: - sendCommand("G0X0Y0Z0", -1, m_settings->showUICommands()); + sendCommand("G0X0Y0Z0", -1, m_settings->showUICommands(), true); break; } } From 4e8824ef4bf5a28aec50cbb0f198b4e21bcf8bb0 Mon Sep 17 00:00:00 2001 From: Denvi Date: Tue, 5 Nov 2019 20:53:14 +0500 Subject: [PATCH 17/80] Cleanup --- src/candle.pro | 2 +- src/frmmain.cpp | 440 +++++++++--------------------------------------- src/frmmain.h | 6 - 3 files changed, 77 insertions(+), 371 deletions(-) diff --git a/src/candle.pro b/src/candle.pro index 7285b608..8b29744f 100644 --- a/src/candle.pro +++ b/src/candle.pro @@ -29,7 +29,7 @@ contains(QT_CONFIG, opengles.) { TARGET = Candle TEMPLATE = app -VERSION = 1.2.3b +VERSION = 1.2.4b RC_ICONS += images/candle.ico DEFINES += sNan=\"65536\" diff --git a/src/frmmain.cpp b/src/frmmain.cpp index d3320bc8..9f643ca5 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -1,9 +1,6 @@ // This file is a part of "Candle" application. // Copyright 2015-2016 Hayrullin Denis Ravilevich -//#define INITTIME //QTime time; time.start(); -//#define PRINTTIME(x) //qDebug() << "time elapse" << QString("%1:").arg(x) << time.elapsed(); time.start(); - #define UNKNOWN 0 #define IDLE 1 #define ALARM 2 @@ -173,8 +170,6 @@ frmMain::frmMain(QWidget *parent) : ui->cboJogStep->setValidator(new QDoubleValidator(0, 10000, 2)); ui->cboJogFeed->setValidator(new QIntValidator(0, 100000)); - // connect(ui->cboJogStep, &ComboBoxKey::currentTextChanged, [=] (QString) {updateJogTitle();}); - // connect(ui->cboJogFeed, &ComboBoxKey::currentTextChanged, [=] (QString) {updateJogTitle();}); connect(ui->cboJogStep, &ComboBoxKey::currentTextChanged, this, &frmMain::updateJogTitle); connect(ui->cboJogFeed, &ComboBoxKey::currentTextChanged, this, &frmMain::updateJogTitle); @@ -198,12 +193,6 @@ frmMain::frmMain(QWidget *parent) : ui->slbFeedOverride->setTitle(tr("Feed rate:")); ui->slbFeedOverride->setSuffix("%"); connect(ui->slbFeedOverride, SIGNAL(toggled(bool)), this, SLOT(onOverridingToggled(bool))); - // connect(ui->slbFeedOverride, &SliderBox::toggled, [=] { - // updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); - // }); - // connect(ui->slbFeedOverride, &SliderBox::valueChanged, [=] { - // updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); - // }); connect(ui->slbFeedOverride, &SliderBox::toggled, this, &frmMain::onOverrideChanged); connect(ui->slbFeedOverride, &SliderBox::valueChanged, this, &frmMain::onOverrideChanged); @@ -214,12 +203,6 @@ frmMain::frmMain(QWidget *parent) : ui->slbRapidOverride->setTitle(tr("Rapid speed:")); ui->slbRapidOverride->setSuffix("%"); connect(ui->slbRapidOverride, SIGNAL(toggled(bool)), this, SLOT(onOverridingToggled(bool))); - // connect(ui->slbRapidOverride, &SliderBox::toggled, [=] { - // updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); - // }); - // connect(ui->slbRapidOverride, &SliderBox::valueChanged, [=] { - // updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); - // }); connect(ui->slbRapidOverride, &SliderBox::toggled, this, &frmMain::onOverrideChanged); connect(ui->slbRapidOverride, &SliderBox::valueChanged, this, &frmMain::onOverrideChanged); @@ -274,10 +257,6 @@ frmMain::frmMain(QWidget *parent) : connect(ui->tblProgram->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(onTableCurrentChanged(QModelIndex,QModelIndex))); clearTable(); - // Console window handling - // connect(ui->grpConsole, SIGNAL(resized(QSize)), this, SLOT(onConsoleResized(QSize))); - // connect(ui->scrollAreaWidgetContents, SIGNAL(sizeChanged(QSize)), this, SLOT(onPanelsSizeChanged(QSize))); - m_senderErrorBox = new QMessageBox(QMessageBox::Warning, qApp->applicationDisplayName(), QString(), QMessageBox::Ignore | QMessageBox::Abort, this); m_senderErrorBox->setCheckBox(new QCheckBox(tr("Don't show again"))); @@ -298,11 +277,6 @@ frmMain::frmMain(QWidget *parent) : ui->slbSpindle->setTitle(tr("Speed:")); ui->slbSpindle->setCheckable(false); ui->slbSpindle->setChecked(true); - // connect(ui->slbSpindle, &SliderBox::valueUserChanged, [=] {m_updateSpindleSpeed = true;}); - // connect(ui->slbSpindle, &SliderBox::valueChanged, [=] { - // if (!ui->grpSpindle->isChecked() && ui->cmdSpindle->isChecked()) - // ui->grpSpindle->setTitle(tr("Spindle") + QString(tr(" (%1)")).arg(ui->slbSpindle->value())); - // }); connect(ui->slbSpindle, &SliderBox::valueUserChanged, this, &frmMain::onSlbSpindleValueUserChanged); connect(ui->slbSpindle, &SliderBox::valueChanged, this, &frmMain::onSlbSpindleValueChanged); @@ -317,20 +291,62 @@ frmMain::frmMain(QWidget *parent) : m_serialPort.setBaudRate(m_settings->baud()); } - connect(&m_serialPort, SIGNAL(readyRead()), this, SLOT(onSerialPortReadyRead()), Qt::QueuedConnection); - connect(&m_serialPort, SIGNAL(error(QSerialPort::SerialPortError)), this, SLOT(onSerialPortError(QSerialPort::SerialPortError))); + // Setup actions + addAction(ui->actControlHome); + addAction(ui->actControlTouch); + addAction(ui->actControlZeroXY); + addAction(ui->actControlZeroZ); + addAction(ui->actControlRestoreOrigin); + addAction(ui->actControlSafePosition); + addAction(ui->actControlReset); + addAction(ui->actControlUnlock); + addAction(ui->actUserCommand1); + addAction(ui->actUserCommand2); + addAction(ui->actUserCommand3); + addAction(ui->actUserCommand4); - qApp->installEventFilter(this); - // ui->tblProgram->installEventFilter(this); - // ui->cboJogStep->installEventFilter(this); - // ui->cboJogFeed->installEventFilter(this); - // ui->splitPanels->handle(1)->installEventFilter(this); - // ui->splitPanels->installEventFilter(this); + addAction(ui->actVisualizerFit); + addAction(ui->actVisualizerIsometric); + addAction(ui->actVisualizerTop); + addAction(ui->actVisualizerFront); + addAction(ui->actVisualizerLeft); + + addAction(ui->actProgramCheck); + addAction(ui->actProgramScroll); + addAction(ui->actProgramReset); + addAction(ui->actProgramSend); + addAction(ui->actProgramPause); + addAction(ui->actProgramAbort); + + addAction(ui->actHeightmapUse); + addAction(ui->actHeightmapCreate); + addAction(ui->actHeightmapOpen); + addAction(ui->actHeightmapEdit); + addAction(ui->actHeightmapShowBorder); + addAction(ui->actHeightmapShowProbeGrid); + addAction(ui->actHeightmapShowInterpolationGrid); + + addAction(ui->actJogStop); + addAction(ui->actJogStepNext); + addAction(ui->actJogStepPrevious); + addAction(ui->actJogFeedNext); + addAction(ui->actJogFeedPrevious); + addAction(ui->actJogKeyboardControl); + addAction(ui->actSpindleSpeedPlus); + addAction(ui->actSpindleSpeedMinus); + addAction(ui->actSpindleOnOff); + addAction(ui->actOverrideFeed); + addAction(ui->actOverrideFeedPlus); + addAction(ui->actOverrideFeedMinus); + addAction(ui->actOverrideRapid); + addAction(ui->actOverrideRapidPlus); + addAction(ui->actOverrideRapidMinus); + addAction(ui->actOverrideSpindle); + addAction(ui->actOverrideSpindlePlus); + addAction(ui->actOverrideSpindleMinus); + + addAction(ui->actConsoleClear); - connect(&m_timerConnection, SIGNAL(timeout()), this, SLOT(onTimerConnection())); - connect(&m_timerStateQuery, SIGNAL(timeout()), this, SLOT(onTimerStateQuery())); - m_timerConnection.start(1000); - m_timerStateQuery.start(); // Handle file drop if (qApp->arguments().count() > 1 && isGCodeFile(qApp->arguments().last())) { @@ -340,6 +356,19 @@ frmMain::frmMain(QWidget *parent) : // Delegate vars to script engine QScriptValue vars = m_scriptEngine.newQObject(&m_storedVars); m_scriptEngine.globalObject().setProperty("vars", vars); + + // Signals/slots + connect(&m_serialPort, SIGNAL(readyRead()), this, SLOT(onSerialPortReadyRead()), Qt::QueuedConnection); + connect(&m_serialPort, SIGNAL(error(QSerialPort::SerialPortError)), this, SLOT(onSerialPortError(QSerialPort::SerialPortError))); + connect(&m_timerConnection, SIGNAL(timeout()), this, SLOT(onTimerConnection())); + connect(&m_timerStateQuery, SIGNAL(timeout()), this, SLOT(onTimerStateQuery())); + + // Event filter + qApp->installEventFilter(this); + + // Start timers + m_timerConnection.start(1000); + m_timerStateQuery.start(); } frmMain::~frmMain() @@ -431,8 +460,6 @@ void frmMain::loadSettings() m_settings->setPanelOverriding(set.value("panelOverridingVisible", true).toBool()); m_settings->setPanelJog(set.value("panelJogVisible", true).toBool()); - // ui->grpConsole->setMinimumHeight(set.value("consoleMinHeight", 100).toInt()); - ui->chkAutoScroll->setChecked(set.value("autoScroll", false).toBool()); ui->slbSpindle->setRatio(100); @@ -462,18 +489,6 @@ void frmMain::loadSettings() m_lastFolder = set.value("lastFolder", QDir::homePath()).toString(); this->restoreGeometry(set.value("formGeometry", QByteArray()).toByteArray()); - // m_settings->resize(set.value("formSettingsSize", m_settings->size()).toSize()); - // m_settings->ui->splitMain->restoreState(set.value("settingsSplitMain").toByteArray()); - - // QByteArray splitterState = set.value("splitter", QByteArray()).toByteArray(); - - // if (splitterState.length() == 0) { - // ui->splitter->setStretchFactor(0, 1); - // ui->splitter->setStretchFactor(1, 1); - // } else ui->splitter->restoreState(splitterState); - - // ui->chkAutoScroll->setVisible(ui->splitter->sizes()[1]); - // resizeCheckBoxes(); ui->cboCommand->setMinimumHeight(ui->cboCommand->height()); ui->cmdClearConsole->setFixedHeight(ui->cboCommand->height()); @@ -520,10 +535,8 @@ void frmMain::loadSettings() ui->tblProgram->horizontalHeader()->restoreState(set.value("header", QByteArray()).toByteArray()); - // Update right panel width + // Apply settings applySettings(); - // show(); - // ui->scrollArea->updateMinimumWidth(); // Restore panels state ui->grpUserCommands->setChecked(set.value("userCommandsPanel", true).toBool()); @@ -569,7 +582,6 @@ void frmMain::loadSettings() setupCoordsTextboxes(); // Settings form geometry - // m_settings->resize(set.value("formSettingsSize", m_settings->size()).toSize()); m_settings->restoreGeometry(set.value("formSettingsGeometry").toByteArray()); m_settings->ui->splitMain->restoreState(set.value("settingsSplitMain").toByteArray()); @@ -586,61 +598,6 @@ void frmMain::loadSettings() if (a) a->setShortcuts(m.values().at(i)); } - addAction(ui->actControlHome); - addAction(ui->actControlTouch); - addAction(ui->actControlZeroXY); - addAction(ui->actControlZeroZ); - addAction(ui->actControlRestoreOrigin); - addAction(ui->actControlSafePosition); - addAction(ui->actControlReset); - addAction(ui->actControlUnlock); - addAction(ui->actUserCommand1); - addAction(ui->actUserCommand2); - addAction(ui->actUserCommand3); - addAction(ui->actUserCommand4); - - addAction(ui->actVisualizerFit); - addAction(ui->actVisualizerIsometric); - addAction(ui->actVisualizerTop); - addAction(ui->actVisualizerFront); - addAction(ui->actVisualizerLeft); - - addAction(ui->actProgramCheck); - addAction(ui->actProgramScroll); - addAction(ui->actProgramReset); - addAction(ui->actProgramSend); - addAction(ui->actProgramPause); - addAction(ui->actProgramAbort); - - addAction(ui->actHeightmapUse); - addAction(ui->actHeightmapCreate); - addAction(ui->actHeightmapOpen); - addAction(ui->actHeightmapEdit); - addAction(ui->actHeightmapShowBorder); - addAction(ui->actHeightmapShowProbeGrid); - addAction(ui->actHeightmapShowInterpolationGrid); - - addAction(ui->actJogStop); - addAction(ui->actJogStepNext); - addAction(ui->actJogStepPrevious); - addAction(ui->actJogFeedNext); - addAction(ui->actJogFeedPrevious); - addAction(ui->actJogKeyboardControl); - addAction(ui->actSpindleSpeedPlus); - addAction(ui->actSpindleSpeedMinus); - addAction(ui->actSpindleOnOff); - addAction(ui->actOverrideFeed); - addAction(ui->actOverrideFeedPlus); - addAction(ui->actOverrideFeedMinus); - addAction(ui->actOverrideRapid); - addAction(ui->actOverrideRapidPlus); - addAction(ui->actOverrideRapidMinus); - addAction(ui->actOverrideSpindle); - addAction(ui->actOverrideSpindlePlus); - addAction(ui->actOverrideSpindleMinus); - - addAction(ui->actConsoleClear); - m_settingsLoading = false; } @@ -687,10 +644,8 @@ void frmMain::saveSettings() set.setValue("queryStateTime", m_settings->queryStateTime()); set.setValue("autoScroll", ui->chkAutoScroll->isChecked()); set.setValue("header", ui->tblProgram->horizontalHeader()->saveState()); - // set.setValue("splitter", ui->splitter->saveState()); set.setValue("settingsSplitMain", m_settings->ui->splitMain->saveState()); set.setValue("formGeometry", this->saveGeometry()); - // set.setValue("formSettingsSize", m_settings->size()); set.setValue("formSettingsGeometry", m_settings->saveGeometry()); set.setValue("userCommandsPanel", ui->grpUserCommands->isChecked()); set.setValue("heightmapPanel", ui->grpHeightMap->isChecked()); @@ -715,7 +670,6 @@ void frmMain::saveSettings() set.setValue("panelOverridingVisible", m_settings->panelOverriding()); set.setValue("panelJogVisible", m_settings->panelJog()); set.setValue("fontSize", m_settings->fontSize()); - // set.setValue("consoleMinHeight", ui->grpConsole->minimumHeight()); set.setValue("feedOverride", ui->slbFeedOverride->isChecked()); set.setValue("feedOverrideValue", ui->slbFeedOverride->value()); @@ -809,10 +763,8 @@ void frmMain::updateControlsState() { ui->widgetUserCommands->setEnabled(portOpened && !m_processingFile); ui->widgetSpindle->setEnabled(portOpened); ui->widgetJog->setEnabled(portOpened && !m_processingFile); -// ui->grpConsole->setEnabled(portOpened); ui->cboCommand->setEnabled(portOpened && (!ui->chkKeyboardControl->isChecked())); ui->cmdCommandSend->setEnabled(portOpened); -// ui->widgetFeed->setEnabled(!m_transferringFile); ui->chkTestMode->setEnabled(portOpened && !m_processingFile); ui->cmdHome->setEnabled(!m_processingFile); @@ -873,22 +825,17 @@ void frmMain::updateControlsState() { m_heightMapGridDrawer.setVisible(ui->chkHeightMapGridShow->isChecked() && m_heightMapMode); m_heightMapInterpolationDrawer.setVisible(ui->chkHeightMapInterpolationShow->isChecked() && m_heightMapMode); - // ui->grpProgram->setTitle(m_heightMapMode ? tr("Heightmap") : tr("G-code program")); ui->grpProgram->setText(m_heightMapMode ? tr("Heightmap") : tr("G-code program")); ui->grpProgram->setProperty("overrided", m_heightMapMode); style()->unpolish(ui->grpProgram); ui->grpProgram->ensurePolished(); - // ui->grpHeightMapSettings->setVisible(m_heightMapMode); - // ui->grpHeightMapSettings->setEnabled(!m_processingFile && !ui->chkKeyboardControl->isChecked()); - ui->cboJogStep->setEditable(!ui->chkKeyboardControl->isChecked()); ui->cboJogFeed->setEditable(!ui->chkKeyboardControl->isChecked()); ui->cboJogStep->setStyleSheet(QString("font-size: %1").arg(m_settings->fontSize())); ui->cboJogFeed->setStyleSheet(ui->cboJogStep->styleSheet()); ui->chkTestMode->setVisible(!m_heightMapMode); - // ui->chkAutoScroll->setVisible(ui->splitter->sizes()[1] && !m_heightMapMode); ui->tblHeightMap->setVisible(m_heightMapMode); ui->tblProgram->setVisible(!m_heightMapMode); @@ -912,7 +859,6 @@ void frmMain::openPort() if (m_serialPort.open(QIODevice::ReadWrite)) { ui->txtStatus->setText(tr("Port opened")); ui->txtStatus->setStyleSheet(QString("background-color: palette(button); color: palette(text);")); -// updateControlsState(); grblReset(); } } @@ -970,10 +916,7 @@ void frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, b void frmMain::grblReset() { - qDebug() << "grbl reset"; - m_serialPort.write(QByteArray(1, (char)24)); -// m_serialPort.flush(); m_processingFile = false; m_transferCompleted = true; @@ -1020,7 +963,6 @@ void frmMain::onSerialPortReadyRead() // Filter prereset responses if (m_reseting) { - qDebug() << "reseting filter:" << data; if (!dataIsReset(data)) continue; else { m_reseting = false; @@ -1088,7 +1030,6 @@ void frmMain::onSerialPortReadyRead() // Test for job complete if (m_processingFile && m_transferCompleted && ((status == IDLE && m_lastGrblStatus == RUN) || status == CHECK)) { - qDebug() << "job completed:" << m_fileCommandIndex << m_currentModel->rowCount() - 1; // Shadow last segment GcodeViewParse *parser = m_currentDrawer->viewParser(); @@ -1168,9 +1109,6 @@ void frmMain::onSerialPortReadyRead() ui->txtWPosX->setValue(ui->txtMPosX->value() - workOffset.x()); ui->txtWPosY->setValue(ui->txtMPosY->value() - workOffset.y()); ui->txtWPosZ->setValue(ui->txtMPosZ->value() - workOffset.z()); - // ui->txtWPosX->setText(QString::number(ui->txtMPosX->text().toDouble() - workOffset.x(), 'f', prec)); - // ui->txtWPosY->setText(QString::number(ui->txtMPosY->text().toDouble() - workOffset.y(), 'f', prec)); - // ui->txtWPosZ->setText(QString::number(ui->txtMPosZ->text().toDouble() - workOffset.z(), 'f', prec)); // Update stored vars m_storedVars.setCoords("W", QVector3D( @@ -1188,7 +1126,7 @@ void frmMain::onSerialPortReadyRead() } - // toolpath shadowing + // Toolpath shadowing if (m_processingFile && status != CHECK) { GcodeViewParse *parser = m_currentDrawer->viewParser(); @@ -1213,10 +1151,6 @@ void frmMain::onSerialPortReadyRead() list.at(i)->setDrawn(true); } if (!drawnLines.isEmpty()) m_currentDrawer->update(drawnLines); - } else if (m_lastDrawnLineIndex < list.count()) { - qDebug() << "tool missed:" << list.at(m_lastDrawnLineIndex)->getLineNumber() - << m_currentModel->data(m_currentModel->index(m_fileProcessedCommandIndex, 4)).toInt() - << m_fileProcessedCommandIndex; } } @@ -1341,7 +1275,6 @@ void frmMain::onSerialPortReadyRead() // Store origin if (ca.command == "$#" && ca.tableIndex == -2) { - qDebug() << "Received offsets:" << response; static QRegExp g92(".*G92:([^,]*),([^,]*),([^\\]]*)"); if (g92.indexIn(response) != -1) { @@ -1372,16 +1305,13 @@ void frmMain::onSerialPortReadyRead() if (set.keys().contains(110)) m_settings->setRapidSpeed(set[110]); if (set.keys().contains(120)) m_settings->setAcceleration(set[120]); - qDebug() << "GRBL settings:" << m_settings->units() << m_settings->rapidSpeed() - << m_settings->acceleration(); - setupCoordsTextboxes(); } // Homing response if ((ca.command.toUpper() == "$H" || ca.command.toUpper() == "$T") && m_homing) m_homing = false; - // Reset complete + // Reset complete response if (ca.command == "[CTRL+X]") { m_resetCompleted = true; m_updateParserStatus = true; @@ -1415,7 +1345,6 @@ void frmMain::onSerialPortReadyRead() QRegExp rx(".*PRB:([^,]*),([^,]*),([^]^:]*)"); double z = qQNaN(); if (rx.indexIn(response) != -1) { - qDebug() << "probing coordinates:" << rx.cap(1) << rx.cap(2) << rx.cap(3); z = toMetric(rx.cap(3).toDouble()); } @@ -1428,7 +1357,6 @@ void frmMain::onSerialPortReadyRead() z -= firstZ; // Calculate table indexes - // int row = trunc(m_probeIndex / m_heightMapModel.columnCount()); int row = (m_probeIndex / m_heightMapModel.columnCount()); int column = m_probeIndex - row * m_heightMapModel.columnCount(); if (row % 2) column = m_heightMapModel.columnCount() - 1 - column; @@ -1581,12 +1509,8 @@ void frmMain::onSerialPortReadyRead() } else { // Unprocessed responses - qDebug() << "floating response:" << data; - // Handle hardware reset if (dataIsReset(data)) { - qDebug() << "hardware reset"; - m_processingFile = false; m_transferCompleted = true; m_fileCommandIndex = 0; @@ -1607,7 +1531,6 @@ void frmMain::onSerialPortReadyRead() } } else { // Blank response -// ui->txtConsole->appendPlainText(data); } } } @@ -1675,7 +1598,6 @@ void frmMain::placeVisualizerButtons() ui->cmdTop->move(ui->cmdIsometric->geometry().left() - ui->cmdTop->width() - 8, 8); ui->cmdLeft->move(ui->glwVisualizer->width() - ui->cmdLeft->width() - 8, ui->cmdIsometric->geometry().bottom() + 8); ui->cmdFront->move(ui->cmdLeft->geometry().left() - ui->cmdFront->width() - 8, ui->cmdIsometric->geometry().bottom() + 8); -// ui->cmdFit->move(ui->cmdTop->geometry().left() - ui->cmdFit->width() - 10, 10); ui->cmdFit->move(ui->glwVisualizer->width() - ui->cmdFit->width() - 8, ui->cmdLeft->geometry().bottom() + 8); } @@ -1696,8 +1618,6 @@ void frmMain::showEvent(QShowEvent *se) #endif ui->glwVisualizer->setUpdatesEnabled(true); - - // resizeCheckBoxes(); } void frmMain::hideEvent(QHideEvent *he) @@ -1712,7 +1632,6 @@ void frmMain::resizeEvent(QResizeEvent *re) Q_UNUSED(re) placeVisualizerButtons(); - // resizeCheckBoxes(); resizeTableHeightMapSections(); ui->dockDevice->setMinimumHeight(re->size().height() / 3); @@ -1728,48 +1647,6 @@ void frmMain::resizeTableHeightMapSections() } } -// void frmMain::resizeCheckBoxes() -// { -// static int widthCheckMode = ui->chkTestMode->sizeHint().width(); -// static int widthAutoScroll = ui->chkAutoScroll->sizeHint().width(); - -// // Transform checkboxes - -// this->setUpdatesEnabled(false); - -// updateLayouts(); - -// if (ui->chkTestMode->sizeHint().width() > ui->chkTestMode->width()) { -// widthCheckMode = ui->chkTestMode->sizeHint().width(); -// ui->chkTestMode->setText(tr("Check")); -// ui->chkTestMode->setMinimumWidth(ui->chkTestMode->sizeHint().width()); -// updateLayouts(); -// } - -// if (ui->chkAutoScroll->sizeHint().width() > ui->chkAutoScroll->width() -// && ui->chkTestMode->text() == tr("Check")) { -// widthAutoScroll = ui->chkAutoScroll->sizeHint().width(); -// ui->chkAutoScroll->setText(tr("Scroll")); -// ui->chkAutoScroll->setMinimumWidth(ui->chkAutoScroll->sizeHint().width()); -// updateLayouts(); -// } - -// if (ui->spacerBot->geometry().width() + ui->chkAutoScroll->sizeHint().width() -// - ui->spacerBot->sizeHint().width() > widthAutoScroll && ui->chkAutoScroll->text() == tr("Scroll")) { -// ui->chkAutoScroll->setText(tr("Autoscroll")); -// updateLayouts(); -// } - -// if (ui->spacerBot->geometry().width() + ui->chkTestMode->sizeHint().width() -// - ui->spacerBot->sizeHint().width() > widthCheckMode && ui->chkTestMode->text() == tr("Check")) { -// ui->chkTestMode->setText(tr("Check mode")); -// updateLayouts(); -// } - -// this->setUpdatesEnabled(true); -// this->repaint(); -// } - void frmMain::timerEvent(QTimerEvent *te) { if (te->timerId() == m_timerToolAnimation.timerId()) { @@ -1898,7 +1775,6 @@ void frmMain::resetHeightmap() { delete m_heightMapInterpolationDrawer.data(); m_heightMapInterpolationDrawer.setData(NULL); -// updateHeightMapInterpolationDrawer(); ui->tblHeightMap->setModel(NULL); m_heightMapModel.resize(1, 1); @@ -1910,9 +1786,6 @@ void frmMain::resetHeightmap() void frmMain::loadFile(QList data) { - QTime time; - time.start(); - // Reset tables clearTable(); m_probeModel.clear(); @@ -1944,9 +1817,6 @@ void frmMain::loadFile(QList data) gp.setTraverseSpeed(m_settings->rapidSpeed()); if (m_codeDrawer->getIgnoreZ()) gp.reset(QVector3D(qQNaN(), qQNaN(), 0)); - qDebug() << "Prepared to load:" << time.elapsed(); - time.start(); - // Block parser updates on table changes m_programLoading = true; @@ -1980,12 +1850,8 @@ void frmMain::loadFile(QList data) stripped = GcodePreprocessorUtils::removeComment(command); args = GcodePreprocessorUtils::splitCommand(stripped); -// PointSegment *ps = gp.addCommand(args); gp.addCommand(args); - // if (ps && (qIsNaN(ps->point()->x()) || qIsNaN(ps->point()->y()) || qIsNaN(ps->point()->z()))) - // qDebug() << "nan point segment added:" << *ps->point(); - item.command = trimmed; item.state = GCodeItem::InQueue; item.line = gp.getCommandNumber(); @@ -2004,11 +1870,7 @@ void frmMain::loadFile(QList data) m_programModel.insertRow(m_programModel.rowCount()); - qDebug() << "model filled:" << time.elapsed(); - time.start(); - updateProgramEstimatedTime(m_viewParser.getLinesFromParser(&gp, m_settings->arcPrecision(), m_settings->arcDegreeMode())); - qDebug() << "view parser filled:" << time.elapsed(); m_programLoading = false; @@ -2057,21 +1919,14 @@ QTime frmMain::updateProgramEstimatedTime(QList lines) for (int i = 0; i < lines.count(); i++) { LineSegment *ls = lines[i]; - // foreach (LineSegment *ls, lines) { double length = (ls->getEnd() - ls->getStart()).length(); + // TODO: Update for rapid override if (!qIsNaN(length) && !qIsNaN(ls->getSpeed()) && ls->getSpeed() != 0) time += length / ((ui->slbFeedOverride->isChecked() && !ls->isFastTraverse()) ? (ls->getSpeed() * ui->slbFeedOverride->value() / 100) : (ui->slbRapidOverride->isChecked() && ls->isFastTraverse()) - ? (ls->getSpeed() * ui->slbRapidOverride->value() / 100) : ls->getSpeed()); // TODO: Update for rapid override - -// qDebug() << "length/time:" << length << ((ui->chkFeedOverride->isChecked() && !ls->isFastTraverse()) -// ? (ls->getSpeed() * ui->txtFeed->value() / 100) : ls->getSpeed()) -// << time; - -// if (qIsNaN(length)) qDebug() << "length nan:" << i << ls->getLineNumber() << ls->getStart() << ls->getEnd(); -// if (qIsNaN(ls->getSpeed())) qDebug() << "speed nan:" << ls->getSpeed(); + ? (ls->getSpeed() * ui->slbRapidOverride->value() / 100) : ls->getSpeed()); } time *= 60; @@ -2104,8 +1959,6 @@ void frmMain::on_cmdFileSend_clicked() on_cmdFileReset_clicked(); - m_startTime.start(); - m_transferCompleted = false; m_processingFile = true; m_fileEndSent = false; @@ -2322,7 +2175,7 @@ void frmMain::storeOffsetsVars(QString response) void frmMain::sendNextFileCommands() { if (m_queue.length() > 0) return; - QString command = feedOverride(m_currentModel->data(m_currentModel->index(m_fileCommandIndex, 1)).toString()); + QString command = m_currentModel->data(m_currentModel->index(m_fileCommandIndex, 1)).toString(); while ((bufferLength() + command.length() + 1) <= BUFFERLENGTH && m_fileCommandIndex < m_currentModel->rowCount() - 1 @@ -2330,7 +2183,7 @@ void frmMain::sendNextFileCommands() { m_currentModel->setData(m_currentModel->index(m_fileCommandIndex, 2), GCodeItem::Sent); sendCommand(command, m_fileCommandIndex, m_settings->showProgramCommands()); m_fileCommandIndex++; - command = feedOverride(m_currentModel->data(m_currentModel->index(m_fileCommandIndex, 1)).toString()); + command = m_currentModel->data(m_currentModel->index(m_fileCommandIndex, 1)).toString(); } } @@ -2346,11 +2199,7 @@ void frmMain::onTableCellChanged(QModelIndex i1, QModelIndex i2) model->setData(model->index(model->rowCount() - 1, 2), GCodeItem::InQueue); model->insertRow(model->rowCount()); if (!m_programLoading) ui->tblProgram->setCurrentIndex(model->index(i1.row() + 1, 1)); - // Remove last line - } /*else if (i1.row() != (model->rowCount() - 1) && model->data(model->index(i1.row(), 1)).toString() == "") { - ui->tblProgram->setCurrentIndex(model->index(i1.row() + 1, 1)); - m_tableModel.removeRow(i1.row()); - }*/ + } if (!m_programLoading) { @@ -2392,7 +2241,6 @@ void frmMain::onTableCurrentChanged(QModelIndex idx1, QModelIndex idx2) int lineFirst = m_currentModel->data(m_currentModel->index(idx1.row(), 4)).toInt(); int lineLast = m_currentModel->data(m_currentModel->index(idx2.row(), 4)).toInt(); if (lineLast < lineFirst) qSwap(lineLast, lineFirst); -// qDebug() << "table current changed" << idx1.row() << idx2.row() << lineFirst << lineLast; QList indexes; for (int i = lineFirst + 1; i <= lineLast; i++) { @@ -2444,8 +2292,6 @@ void frmMain::onTableDeleteLines() int rowsCount = ui->tblProgram->selectionModel()->selectedRows().count(); if (ui->tblProgram->selectionModel()->selectedRows().last().row() == m_currentModel->rowCount() - 1) rowsCount--; - qDebug() << "deleting lines" << firstRow.row() << rowsCount; - if (firstRow.row() != m_currentModel->rowCount() - 1) { m_currentModel->removeRows(firstRow.row(), rowsCount); } else return; @@ -2492,9 +2338,6 @@ void frmMain::on_actServiceSettings_triggered() + table->horizontalHeader()->height() + table->frameWidth() * 2); if (m_settings->exec()) { - qDebug() << "Applying settings"; - qDebug() << "Port:" << m_settings->port() << "Baud:" << m_settings->baud(); - if (m_settings->port() != "" && (m_settings->port() != m_serialPort.portName() || m_settings->baud() != m_serialPort.baudRate())) { if (m_serialPort.isOpen()) m_serialPort.close(); @@ -2518,7 +2361,6 @@ void frmMain::on_actServiceSettings_triggered() bool buttonLessThan(StyledToolButton *b1, StyledToolButton *b2) { -// return b1->text().toDouble() < b2->text().toDouble(); return b1->objectName().right(1).toDouble() < b2->objectName().right(1).toDouble(); } @@ -2623,11 +2465,6 @@ void frmMain::applySettings() { void frmMain::updateParser() { - QTime time; - - qDebug() << "updating parser:" << m_currentModel << m_currentDrawer; - time.start(); - GcodeViewParse *parser = m_currentDrawer->viewParser(); GcodeParser gp; @@ -2685,8 +2522,6 @@ void frmMain::updateParser() updateControlsState(); if (m_currentModel == &m_programModel) m_fileChanged = true; - - qDebug() << "Update parser time: " << time.elapsed(); } void frmMain::on_cmdCommandSend_clicked() @@ -2713,8 +2548,6 @@ void frmMain::on_cmdHome_clicked() void frmMain::on_cmdTouch_clicked() { -// m_homing = true; - QStringList list = m_settings->touchCommand().split(";"); foreach (QString cmd, list) { @@ -2745,7 +2578,6 @@ void frmMain::on_cmdRestoreOrigin_clicked() .arg(toMetric(ui->txtMPosY->value())) .arg(toMetric(ui->txtMPosZ->value())), -1, m_settings->showUICommands()); - // TODO: Add G54-G59 offsets. (m_storedParserStatus, m_storedOffsets) m_storedVars.setCS(m_storedCS); sendCommand("$#", -1, m_settings->showUICommands()); sendCommand("{vars.CS}", -1, m_settings->showUICommands(), true); @@ -2760,6 +2592,7 @@ void frmMain::on_cmdRestoreOrigin_clicked() sendCommand("G0X0Y0", -1, m_settings->showUICommands(), true); break; case 1: + sendCommand("G0X0Y0Z0", -1, m_settings->showUICommands(), true); break; } @@ -2832,10 +2665,6 @@ void frmMain::on_cmdFileReset_clicked() m_probeIndex = -1; if (!m_heightMapMode) { - QTime time; - - time.start(); - QList list = m_viewParser.getLineSegmentList(); QList indexes; @@ -2845,10 +2674,6 @@ void frmMain::on_cmdFileReset_clicked() } m_codeDrawer->update(indexes); - qDebug() << "drawn false:" << time.elapsed(); - - time.start(); - ui->tblProgram->setUpdatesEnabled(false); for (int i = 0; i < m_currentModel->data().count() - 1; i++) { @@ -2857,8 +2682,6 @@ void frmMain::on_cmdFileReset_clicked() } ui->tblProgram->setUpdatesEnabled(true); - qDebug() << "table updated:" << time.elapsed(); - ui->tblProgram->scrollTo(m_currentModel->index(0, 0)); ui->tblProgram->clearSelection(); ui->tblProgram->selectRow(0); @@ -2880,8 +2703,6 @@ void frmMain::on_cmdFileReset_clicked() void frmMain::on_actFileNew_triggered() { - qDebug() << "changes:" << m_fileChanged << m_heightMapChanged; - if (!saveChanges(m_heightMapMode)) return; if (!m_heightMapMode) { @@ -2949,8 +2770,6 @@ bool frmMain::saveProgramToFile(QString fileName, GCodeTableModel *model) QFile file(fileName); QDir dir; - qDebug() << "Saving program"; - if (file.exists()) dir.remove(file.fileName()); if (!file.open(QIODevice::WriteOnly)) return false; @@ -3048,14 +2867,6 @@ bool frmMain::dataIsEnd(QString data) { ends << "ok"; ends << "error"; -// ends << "Reset to continue"; -// ends << "'$' for help"; -// ends << "'$H'|'$X' to unlock"; -// ends << "Caution: Unlocked"; -// ends << "Enabled"; -// ends << "Disabled"; -// ends << "Check Door"; -// ends << "Pgm End"; foreach (QString str, ends) { if (data.contains(str)) return true; @@ -3084,15 +2895,6 @@ bool frmMain::dataIsReset(QString data) { return QRegExp("^GRBL|GCARVIN\\s\\d\\.\\d.").indexIn(data.toUpper()) != -1; } -QString frmMain::feedOverride(QString command) -{ - // Feed override if not in heightmap probing mode -// if (!ui->cmdHeightMapMode->isChecked()) command = GcodePreprocessorUtils::overrideSpeed(command, ui->chkFeedOverride->isChecked() ? -// ui->txtFeed->value() : 100, &m_originalFeed); - - return command; -} - void frmMain::on_grpOverriding_toggled(bool checked) { if (checked) { @@ -3167,31 +2969,6 @@ bool frmMain::eventFilter(QObject *obj, QEvent *event) return QMainWindow::eventFilter(obj, event); } -// int frmMain::getConsoleMinHeight() -// { -// return ui->grpConsole->height() - ui->grpConsole->contentsRect().height() -// + ui->spacerConsole->geometry().height() + ui->grpConsole->layout()->margin() * 2 -// + ui->cboCommand->height(); -// } - -// void frmMain::onConsoleResized(QSize size) -// { -// Q_UNUSED(size) - -// int minHeight = getConsoleMinHeight(); -// bool visible = ui->grpConsole->height() > minHeight; -// if (ui->txtConsole->isVisible() != visible) { -// ui->txtConsole->setVisible(visible); -// } -// } - -// void frmMain::onPanelsSizeChanged(QSize size) -// { -// ui->splitPanels->setSizes(QList() << size.height() + 4 -// << ui->splitPanels->height() - size.height() -// - 4 - ui->splitPanels->handleWidth()); -// } - bool frmMain::keyIsMovement(int key) { return key == Qt::Key_4 || key == Qt::Key_6 || key == Qt::Key_8 || key == Qt::Key_2 || key == Qt::Key_9 || key == Qt::Key_3; @@ -3250,27 +3027,6 @@ void frmMain::on_tblProgram_customContextMenuRequested(const QPoint &pos) m_tableMenu->popup(ui->tblProgram->viewport()->mapToGlobal(pos)); } -// void frmMain::on_splitter_splitterMoved(int pos, int index) -// { -// Q_UNUSED(pos) -// Q_UNUSED(index) - -// static bool tableCollapsed = ui->splitter->sizes()[1] == 0; - -// if ((ui->splitter->sizes()[1] == 0) != tableCollapsed) { -// this->setUpdatesEnabled(false); -// ui->chkAutoScroll->setVisible(ui->splitter->sizes()[1] && !m_heightMapMode); -// updateLayouts(); -// resizeCheckBoxes(); - -// this->setUpdatesEnabled(true); -// ui->chkAutoScroll->repaint(); - -// // Store collapsed state -// tableCollapsed = ui->splitter->sizes()[1] == 0; -// } -// } - void frmMain::updateLayouts() { this->update(); @@ -3373,8 +3129,6 @@ void frmMain::updateHeightMapBorderDrawer() { if (m_settingsLoading) return; - qDebug() << "updating border drawer"; - m_heightMapBorderDrawer.setBorderRect(borderRectFromTextboxes()); } @@ -3389,8 +3143,6 @@ bool frmMain::updateHeightMapGrid() { if (m_settingsLoading) return true; - qDebug() << "updating heightmap grid drawer"; - // Grid map changing warning bool nan = true; for (int i = 0; i < m_heightMapModel.rowCount(); i++) @@ -3410,8 +3162,6 @@ bool frmMain::updateHeightMapGrid() m_heightMapGridDrawer.setZTop(ui->txtHeightMapGridZTop->value()); // Reset model -// int gridPointsX = trunc(borderRect.width() / ui->txtHeightMapGridX->value()) + 1; -// int gridPointsY = trunc(borderRect.height() / ui->txtHeightMapGridY->value()) + 1; int gridPointsX = ui->txtHeightMapGridX->value(); int gridPointsY = ui->txtHeightMapGridY->value(); @@ -3427,8 +3177,6 @@ bool frmMain::updateHeightMapGrid() double gridStepX = gridPointsX > 1 ? borderRect.width() / (gridPointsX - 1) : 0; double gridStepY = gridPointsY > 1 ? borderRect.height() / (gridPointsY - 1) : 0; - qDebug() << "generating probe program"; - m_programLoading = true; m_probeModel.clear(); m_probeModel.insertRow(0); @@ -3436,7 +3184,6 @@ bool frmMain::updateHeightMapGrid() m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G21G90F%1G0Z%2"). arg(m_settings->heightmapProbingFeed()).arg(ui->txtHeightMapGridZTop->value())); m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G0X0Y0")); -// .arg(ui->txtHeightMapGridZTop->value())); m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G38.2Z%1") .arg(ui->txtHeightMapGridZBottom->value())); m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G0Z%1") @@ -3469,8 +3216,6 @@ void frmMain::updateHeightMapInterpolationDrawer(bool reset) { if (m_settingsLoading) return; - qDebug() << "Updating interpolation"; - QRectF borderRect = borderRectFromTextboxes(); m_heightMapInterpolationDrawer.setBorderRect(borderRect); @@ -3580,7 +3325,6 @@ void frmMain::on_cmdHeightMapMode_toggled(bool checked) // Reset/restore g-code program modification on edit mode enter/exit if (ui->chkHeightMapUse->isChecked()) { on_chkHeightMapUse_clicked(!checked); // Update gcode program parser -// m_codeDrawer->updateData(); // Force update data to properly shadowing } if (checked) { @@ -3702,18 +3446,6 @@ void frmMain::loadHeightMap(QString fileName) list = textStream.readLine().split(";"); -// ui->chkHeightMapBorderAuto->setChecked(false); -// ui->chkHeightMapBorderAuto->setEnabled(false); -// ui->txtHeightMapBorderX->setEnabled(false); -// ui->txtHeightMapBorderY->setEnabled(false); -// ui->txtHeightMapBorderWidth->setEnabled(false); -// ui->txtHeightMapBorderHeight->setEnabled(false); - -// ui->txtHeightMapGridX->setEnabled(false); -// ui->txtHeightMapGridY->setEnabled(false); -// ui->txtHeightMapGridZBottom->setEnabled(false); -// ui->txtHeightMapGridZTop->setEnabled(false); - for (int i = 0; i < m_heightMapModel.rowCount(); i++) { QList row = textStream.readLine().split(";"); for (int j = 0; j < m_heightMapModel.columnCount(); j++) { @@ -3799,12 +3531,6 @@ void frmMain::on_chkHeightMapUse_clicked(bool checked) progress.show(); progress.setStyleSheet("QProgressBar {text-align: center; qproperty-format: \"\"}"); - // Performance test - QTime time; - - // Store fileChanged state -// fileChanged = m_fileChanged; - // Set current model to prevent reseting heightmap cache m_currentModel = &m_programHeightmapModel; @@ -3819,7 +3545,6 @@ void frmMain::on_chkHeightMapUse_clicked(bool checked) progress.setLabelText(tr("Subdividing segments...")); progress.setMaximum(list->count() - 1); - time.start(); for (int i = 0; i < list->count(); i++) { if (!list->at(i)->isZMovement()) { @@ -3841,11 +3566,8 @@ void frmMain::on_chkHeightMapUse_clicked(bool checked) } } - qDebug() << "Subdivide time: " << time.elapsed(); - progress.setLabelText(tr("Updating Z-coordinates...")); progress.setMaximum(list->count() - 1); - time.start(); for (int i = 0; i < list->count(); i++) { if (i == 0) { @@ -3867,11 +3589,8 @@ void frmMain::on_chkHeightMapUse_clicked(bool checked) } } - qDebug() << "Z update time (interpolation): " << time.elapsed(); - progress.setLabelText(tr("Modifying G-code program...")); progress.setMaximum(m_programModel.rowCount() - 2); - time.start(); // Modifying g-code program QString command; @@ -3980,8 +3699,6 @@ void frmMain::on_chkHeightMapUse_clicked(bool checked) } progress.close(); - qDebug() << "Program modification time: " << time.elapsed(); - ui->tblProgram->setModel(&m_programHeightmapModel); ui->tblProgram->horizontalHeader()->restoreState(headerState); @@ -4060,7 +3777,6 @@ QList frmMain::subdivideSegment(LineSegment* segment) length = fabs(length); if (qIsNaN(length)) { - qDebug() << "ERROR length:" << segment->getStart() << segment->getEnd(); return QList(); } @@ -4162,8 +3878,6 @@ void frmMain::jogStep() QVector3D vec = m_jogVector.normalized() * s; - // qDebug() << "jog" << speed << v << acc << dt < lines); bool saveProgramToFile(QString fileName, GCodeTableModel *model); - QString feedOverride(QString command); bool eventFilter(QObject *obj, QEvent *event); bool keyIsMovement(int key); - // void resizeCheckBoxes(); void updateLayouts(); void updateRecentFilesMenu(); void addRecentFile(QString fileName); @@ -394,7 +389,6 @@ private slots: bool isGCodeFile(QString fileName); bool isHeightmapFile(QString fileName); bool compareCoordinates(double x, double y, double z); - // int getConsoleMinHeight(); void updateOverride(SliderBox *slider, int value, char command); void jogStep(); void updateJogTitle(); From 1b34bf51e0fae13e5fb28f4a475512afdb25119e Mon Sep 17 00:00:00 2001 From: Denvi Date: Tue, 5 Nov 2019 23:52:50 +0500 Subject: [PATCH 18/80] Visualizer cpu consumption decreased on minimized. --- src/frmmain.cpp | 15 ++++++++++----- src/frmmain.h | 2 ++ src/widgets/glwidget.cpp | 11 +++++++---- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 9f643ca5..291392cf 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -1616,15 +1616,11 @@ void frmMain::showEvent(QShowEvent *se) } } #endif - - ui->glwVisualizer->setUpdatesEnabled(true); } void frmMain::hideEvent(QHideEvent *he) { Q_UNUSED(he) - - ui->glwVisualizer->setUpdatesEnabled(false); } void frmMain::resizeEvent(QResizeEvent *re) @@ -2966,7 +2962,11 @@ bool frmMain::eventFilter(QObject *obj, QEvent *event) } } - return QMainWindow::eventFilter(obj, event); + if (obj == this && event->type() == QEvent::WindowStateChange) { + ui->glwVisualizer->setUpdatesEnabled(!isMinimized() && ui->dockVisualizer->isVisible()); + } + + return false; } bool frmMain::keyIsMovement(int key) @@ -4079,4 +4079,9 @@ void frmMain::on_actOverrideSpindlePlus_triggered() void frmMain::on_actOverrideSpindleMinus_triggered() { ui->slbSpindleOverride->setSliderPosition(ui->slbSpindleOverride->sliderPosition() - 1); +} + +void frmMain::on_dockVisualizer_visibilityChanged(bool visible) +{ + ui->glwVisualizer->setUpdatesEnabled(visible); } \ No newline at end of file diff --git a/src/frmmain.h b/src/frmmain.h index 7003be8f..c29a17c1 100644 --- a/src/frmmain.h +++ b/src/frmmain.h @@ -201,6 +201,8 @@ private slots: void on_actOverrideSpindlePlus_triggered(); void on_actOverrideSpindleMinus_triggered(); + void on_dockVisualizer_visibilityChanged(bool visible); + protected: void showEvent(QShowEvent *se); void hideEvent(QHideEvent *he); diff --git a/src/widgets/glwidget.cpp b/src/widgets/glwidget.cpp index 6ee438e4..4b4e0fce 100644 --- a/src/widgets/glwidget.cpp +++ b/src/widgets/glwidget.cpp @@ -221,6 +221,12 @@ bool GLWidget::updatesEnabled() const void GLWidget::setUpdatesEnabled(bool updatesEnabled) { m_updatesEnabled = updatesEnabled; + + if (updatesEnabled) { + m_timerPaint.start(m_vsync ? 0 : 1000 / m_targetFps, Qt::PreciseTimer, this); + } else { + m_timerPaint.stop(); + } } bool GLWidget::zBuffer() const @@ -327,13 +333,10 @@ void GLWidget::setColorBackground(const QColor &colorBackground) m_colorBackground = colorBackground; } - void GLWidget::setFps(int fps) { if (fps <= 0) return; m_targetFps = fps; - m_timerPaint.stop(); - m_timerPaint.start(m_vsync ? 0 : 1000 / fps, Qt::PreciseTimer, this); } QTime GLWidget::estimatedTime() const @@ -574,7 +577,7 @@ void GLWidget::timerEvent(QTimerEvent *te) if (te->timerId() == m_timerPaint.timerId()) { if (m_animateView) viewAnimation(); #ifndef GLES - if (m_updatesEnabled) update(); + update(); #endif } else { #ifdef GLES From 887eff0ffd34f57823d7f9c2eb9e5c39ccc1a6d6 Mon Sep 17 00:00:00 2001 From: Denvi Date: Wed, 6 Nov 2019 22:31:22 +0500 Subject: [PATCH 19/80] Panels are movable now. --- src/candle.pro | 16 +- src/frmmain.cpp | 72 +++- src/frmmain.h | 4 + src/frmmain.ui | 211 +++++++++- src/frmsettings.ui | 13 +- src/translations/candle_en.ts | 742 +++++++++++++++++----------------- src/translations/candle_es.ts | 736 +++++++++++++++++---------------- src/translations/candle_fr.ts | 738 +++++++++++++++++---------------- src/translations/candle_pt.ts | 736 +++++++++++++++++---------------- src/translations/candle_ru.qm | Bin 21464 -> 22376 bytes src/translations/candle_ru.ts | 732 ++++++++++++++++----------------- src/widgets/dropwidget.cpp | 99 +++++ src/widgets/dropwidget.h | 28 ++ src/widgets/widgetmimedata.h | 34 ++ 14 files changed, 2270 insertions(+), 1891 deletions(-) create mode 100644 src/widgets/dropwidget.cpp create mode 100644 src/widgets/dropwidget.h create mode 100644 src/widgets/widgetmimedata.h diff --git a/src/candle.pro b/src/candle.pro index 8b29744f..154270ff 100644 --- a/src/candle.pro +++ b/src/candle.pro @@ -29,7 +29,7 @@ contains(QT_CONFIG, opengles.) { TARGET = Candle TEMPLATE = app -VERSION = 1.2.4b +VERSION = 1.2.5b RC_ICONS += images/candle.ico DEFINES += sNan=\"65536\" @@ -67,7 +67,8 @@ SOURCES += main.cpp\ widgets/sliderbox.cpp \ drawers/selectiondrawer.cpp \ widgets/comboboxkey.cpp \ - scriptvars.cpp + scriptvars.cpp \ + widgets/dropwidget.cpp HEADERS += frmmain.h \ frmsettings.h \ @@ -100,7 +101,8 @@ HEADERS += frmmain.h \ widgets/sliderbox.h \ drawers/selectiondrawer.h \ widgets/comboboxkey.h \ - scriptvars.h + scriptvars.h \ + widgets/dropwidget.h FORMS += frmmain.ui \ frmsettings.ui \ @@ -111,4 +113,10 @@ DEFINES += _USE_MATH_DEFINES RESOURCES += \ shaders.qrc \ - images.qrc \ No newline at end of file + images.qrc + +CONFIG(release, debug|release) { + QMAKE_CXXFLAGS += -Z7 -Fdrelease\\candle.pdb + QMAKE_CFLAGS += -Z7 -Fdrelease\\candle.pdb + QMAKE_LFLAGS += /DEBUG /OPT:REF +} \ No newline at end of file diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 291392cf..55e196d4 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -32,6 +32,7 @@ #include "frmmain.h" #include "ui_frmmain.h" #include "ui_frmsettings.h" +#include "widgets/widgetmimedata.h" frmMain::frmMain(QWidget *parent) : QMainWindow(parent), @@ -119,6 +120,11 @@ frmMain::frmMain(QWidget *parent) : m_settings = new frmSettings(this); ui->setupUi(this); + // Drop frames + ui->fraDropDevice->setVisible(false); + ui->fraDropModification->setVisible(false); + ui->fraDropUser->setVisible(false); + #ifdef WINDOWS if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { m_taskBarButton = NULL; @@ -149,6 +155,7 @@ frmMain::frmMain(QWidget *parent) : connect(ui->dockModification, &QDockWidget::topLevelChanged, this, &frmMain::onDockTopLevelChanged); connect(ui->dockVisualizer, &QDockWidget::topLevelChanged, this, &frmMain::onDockTopLevelChanged); connect(ui->dockConsole, &QDockWidget::topLevelChanged, this, &frmMain::onDockTopLevelChanged); + connect(ui->dockUser, &QDockWidget::topLevelChanged, this, &frmMain::onDockTopLevelChanged); ui->widgetHeightmapSettings->setVisible(false); @@ -347,7 +354,6 @@ frmMain::frmMain(QWidget *parent) : addAction(ui->actConsoleClear); - // Handle file drop if (qApp->arguments().count() > 1 && isGCodeFile(qApp->arguments().last())) { loadFile(qApp->arguments().last()); @@ -556,6 +562,8 @@ void frmMain::loadSettings() ui->dockDevice->setMaximumWidth(w + ui->scrollArea->verticalScrollBar()->width()); ui->dockModification->setMinimumWidth(w); ui->dockModification->setMaximumWidth(w + ui->scrollArea->verticalScrollBar()->width()); + ui->dockUser->setMinimumWidth(w); + ui->dockUser->setMaximumWidth(w + ui->scrollArea->verticalScrollBar()->width()); // Buttons int b = (w - ui->grpControl->layout()->margin() * 2 - ui->grpControl->layout()->spacing() * 3) / 4 * 0.8; @@ -568,8 +576,15 @@ void frmMain::loadSettings() // style()->unpolish(this); ensurePolished(); ui->dockDevice->setStyleSheet(""); + ui->dockModification->setStyleSheet(""); + ui->dockUser->setStyleSheet(""); // Restore docks + // Panels + ui->scrollContentsDevice->restoreState(this, set.value("panelsDevice").toStringList()); + ui->scrollContentsModification->restoreState(this, set.value("panelsModification").toStringList()); + ui->scrollContentsUser->restoreState(this, set.value("panelsUser").toStringList()); + // Normal window state restoreState(set.value("formMainState").toByteArray()); @@ -582,7 +597,7 @@ void frmMain::loadSettings() setupCoordsTextboxes(); // Settings form geometry - m_settings->restoreGeometry(set.value("formSettingsGeometry").toByteArray()); + // m_settings->restoreGeometry(set.value("formSettingsGeometry").toByteArray()); m_settings->ui->splitMain->restoreState(set.value("settingsSplitMain").toByteArray()); // Shortcuts @@ -598,6 +613,8 @@ void frmMain::loadSettings() if (a) a->setShortcuts(m.values().at(i)); } + // TODO: ... + m_settingsLoading = false; } @@ -726,6 +743,11 @@ void frmMain::saveSettings() foreach (QAction *a, acts) m[a->objectName()] = a->shortcuts(); s << m; set.setValue("shortcuts", ba); + + // Panels + set.setValue("panelsDevice", QVariant::fromValue(ui->scrollContentsDevice->saveState())); + set.setValue("panelsModification", QVariant::fromValue(ui->scrollContentsModification->saveState())); + set.setValue("panelsUser", QVariant::fromValue(ui->scrollContentsUser->saveState())); } bool frmMain::saveChanges(bool heightMapMode) @@ -1629,9 +1651,6 @@ void frmMain::resizeEvent(QResizeEvent *re) placeVisualizerButtons(); resizeTableHeightMapSections(); - - ui->dockDevice->setMinimumHeight(re->size().height() / 3); - ui->dockModification->setMinimumHeight(re->size().height() / 3); } void frmMain::resizeTableHeightMapSections() @@ -1682,6 +1701,8 @@ void frmMain::dragEnterEvent(QDragEnterEvent *dee) { if (m_processingFile) return; + if (dee->mimeData()->hasFormat("application/widget")) return; + if (dee->mimeData()->hasFormat("text/plain") && !m_heightMapMode) dee->acceptProposedAction(); else if (dee->mimeData()->hasFormat("text/uri-list") && dee->mimeData()->urls().count() == 1) { QString fileName = dee->mimeData()->urls().at(0).toLocalFile(); @@ -1720,6 +1741,11 @@ void frmMain::dropEvent(QDropEvent *de) } } +void frmMain::mousePressEvent(QMouseEvent *e) +{ + // qDebug() << childAt(e->pos()); +} + QMenu *frmMain::createPopupMenu() { QMenu *menu = QMainWindow::createPopupMenu(); @@ -2332,6 +2358,8 @@ void frmMain::on_actServiceSettings_triggered() table->resizeColumnsToContents(); table->setMinimumHeight(table->rowHeight(0) * 10 + table->horizontalHeader()->height() + table->frameWidth() * 2); + table->horizontalHeader()->setMinimumSectionSize(table->horizontalHeader()->sectionSize(2)); + table->horizontalHeader()->setStretchLastSection(true); if (m_settings->exec()) { if (m_settings->port() != "" && (m_settings->port() != m_serialPort.portName() || @@ -2966,6 +2994,39 @@ bool frmMain::eventFilter(QObject *obj, QEvent *event) ui->glwVisualizer->setUpdatesEnabled(!isMinimized() && ui->dockVisualizer->isVisible()); } + if (obj->inherits("QGroupBox") && (obj->parent()->objectName() == "scrollContentsDevice" + || obj->parent()->objectName() == "scrollContentsModification" + || obj->parent()->objectName() == "scrollContentsUser") + && obj->objectName().startsWith("grp")) { + + if (event->type() == QEvent::MouseButtonPress) { + + QMouseEvent *e = static_cast(event); + m_mousePressPos = e->pos(); + qDebug() << m_mousePressPos; + + } else if (event->type() == QEvent::MouseMove) { + + QMouseEvent *e = static_cast(event); + int d = (e->pos() - m_mousePressPos).manhattanLength(); + + if (e->buttons() & Qt::LeftButton && d > QApplication::startDragDistance()) { + QDrag *drag = new QDrag(this); + WidgetMimeData *mimeData = new WidgetMimeData(); + + mimeData->setWidget(static_cast(obj)); + mimeData->setText(obj->objectName()); + + QPixmap *pix = new QPixmap(static_cast(obj)->size()); + static_cast(obj)->render(pix); + + drag->setMimeData(mimeData); + drag->setPixmap(*pix); + drag->exec(); + } + } + } + return false; } @@ -4019,6 +4080,7 @@ void frmMain::on_mnuViewPanels_aboutToShow() ui->actViewPanelsModification->setChecked(ui->dockModification->isVisible()); ui->actViewPanelsVisualizer->setChecked(ui->dockVisualizer->isVisible()); ui->actViewPanelsConsole->setChecked(ui->dockConsole->isVisible()); + ui->actViewPanelsUser->setChecked(ui->dockUser->isVisible()); } void frmMain::on_actJogStepNext_triggered() diff --git a/src/frmmain.h b/src/frmmain.h index c29a17c1..571297d4 100644 --- a/src/frmmain.h +++ b/src/frmmain.h @@ -211,6 +211,7 @@ private slots: void closeEvent(QCloseEvent *ce); void dragEnterEvent(QDragEnterEvent *dee); void dropEvent(QDropEvent *de); + void mousePressEvent(QMouseEvent *e); QMenu *createPopupMenu() override; private: @@ -340,6 +341,9 @@ private slots: QScriptEngine m_scriptEngine; ScriptVars m_storedVars; + // Drag & drop + QPoint m_mousePressPos; + void loadFile(QString fileName); void loadFile(QList data); void clearTable(); diff --git a/src/frmmain.ui b/src/frmmain.ui index 22d0e49b..50b34d4f 100644 --- a/src/frmmain.ui +++ b/src/frmmain.ui @@ -7,7 +7,7 @@ 0 0 1469 - 1015 + 1260 @@ -420,6 +420,7 @@ QLabel[overrided="false"] { + @@ -457,15 +458,18 @@ QLabel[overrided="false"] { true - + 0 0 255 - 751 + 770 + + true + 0 @@ -524,6 +528,25 @@ QLabel[overrided="false"] { + + + + + 0 + 2 + + + + border: 2px solid blue; + + + QFrame::StyledPanel + + + QFrame::Raised + + + @@ -563,6 +586,9 @@ QLabel[overrided="false"] { Qt::NoFocus + + false + @@ -1167,7 +1193,7 @@ QLabel[overrided="false"] { - + 0 @@ -1220,15 +1246,18 @@ QLabel[overrided="false"] { true - + 0 0 320 - 878 + 897 + + true + 0 @@ -1510,6 +1539,9 @@ QLabel[overrided="false"] { false + + false + QLineEdit {color: palette(text);} @@ -1529,6 +1561,25 @@ QLabel[overrided="false"] { + + + + + 0 + 2 + + + + border: 2px solid blue; + + + QFrame::StyledPanel + + + QFrame::Raised + + + @@ -2402,7 +2453,7 @@ QLabel[overrided="false"] { - + 0 @@ -2780,6 +2831,107 @@ padding-right: 8; false + + + + 0 + 0 + + + + Qt::AllDockWidgetAreas + + + User + + + 1 + + + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + true + + + + + 0 + 0 + 320 + 106 + + + + true + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 2 + + + + border: 2px solid blue; + + + QFrame::StyledPanel + + + QFrame::Raised + + + + + + + + 0 + 0 + + + + QGroupBox { + margin-top: 7; +} + + + + + + + + + + + + + &New @@ -3144,9 +3296,26 @@ padding-right: 8; Spindle speed override + + + true + + + true + + + &User + + + + GroupBox + QGroupBox +
widgets/groupbox.h
+ 1 +
GLWidget QWidget @@ -3158,12 +3327,6 @@ padding-right: 8; QComboBox
widgets/combobox.h
- - GroupBox - QGroupBox -
widgets/groupbox.h
- 1 -
StyledToolButton QToolButton @@ -3183,6 +3346,12 @@ padding-right: 8; QComboBox
widgets/comboboxkey.h
+ + DropWidget + QWidget +
widgets/dropwidget.h
+ 1 +
txtHeightMapBorderX @@ -3957,5 +4126,21 @@ padding-right: 8;
+ + actViewPanelsUser + triggered(bool) + dockUser + setVisible(bool) + + + -1 + -1 + + + 173 + 760 + + + diff --git a/src/frmsettings.ui b/src/frmsettings.ui index 8faa2e5f..6b353570 100644 --- a/src/frmsettings.ui +++ b/src/frmsettings.ui @@ -6,8 +6,8 @@ 0 0 - 885 - 846 + 800 + 600 @@ -87,9 +87,9 @@ QSplitter::handle:horizontal { 0 - 0 - 543 - 2914 + -1850 + 433 + 2424 @@ -1338,9 +1338,6 @@ QSplitter::handle:horizontal { - - true - Command diff --git a/src/translations/candle_en.ts b/src/translations/candle_en.ts index 215874ef..c21cf633 100644 --- a/src/translations/candle_en.ts +++ b/src/translations/candle_en.ts @@ -62,7 +62,7 @@ GLWidget - + Vertices: %1 @@ -118,54 +118,54 @@ - - + + Check - + Scroll - - - - - + + + + + Open - - - + + + Reset - - + + Send - + Pause - - - - + + + + Abort @@ -200,873 +200,880 @@ - + Modification - - - + + + Overriding - - + + Heightmap - - + + Use heightmap - + Absent - + Map: - - + + Create - - + + Edit - + Border: - - - + + + X: - + H: - - - + + + Y: - + W: - - + + Show border - + Auto - + Probe grid: - + Zb: - + Zt: - - + + Show probe grid - + Interpolation grid: - + Type: - + Bicubic - - + + Show interpolation grid - + Device - + State - + Work coordinates: - + Machine coordinates: - + Status: - + Control - - + + Zero XY - + + User + + + + User command 1 - + User command 2 - + User command 3 - + User command 4 - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override - - - - - - - - - + + &User + + + + + + + + + + + + ... - - + + Z-probe - - - + + + Home - - + + Restore origin - - + + Zero Z - - + + Safe position - - + + Unlock - + User commands - - - - - - + + + + + + Spindle on/off - - - - - - + + + + + + Spindle - - - - + + + + Jog - - + + X- - - + + Y- - - + + X+ - - + + Y+ - - + + Z+ - - + + Z- - - + + Stop - + Continuously - + 0.01 - + 0.1 - + 1 - + 5 - - + + 10 - - + + 100 - + Step: - + Feed: - + 50 - + 500 - + 1000 - + 2000 - - + + Keyboard control - + Visualizer - - + + Fit - - + + Top view - - + + Isometric view - - + + Front view - - + + Left view - + Console - + Send command - - + + Clear console - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open - + E&xit - + &Settings - + &New - + &Save - + Save &as... - + &About - + &Clear - + Save &transformed as... - + &Device - + &Modification - + &Visualizer - + &Console - + Unknown - + Idle - + Alarm - + Run - - + + Hold - + Queue - + Door - + Send from current line - + Feed rate: - + Rapid speed: - + Spindle speed: - + &Insert line - + &Delete lines - + Don't show again - + Speed: - - + + Restore origin: %1, %2, %3 - + G-code program file was changed. Save? - + Heightmap file was changed. Save? - + Not connected - + G-code program - + Probe - + Port opened - + Job done. Time elapsed: %1 - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Serial port error - + Buffer: %1 / %2 / %3 - + File sending in progress. Terminate and exit? - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) - - - + + + Heightmap files (*.map) - + Opening file... - - + + Can't open file: - + Following commands will be sent before selected line: - + Skip - - - + + + (%1) - + Delete lines? - - + Command - - + Text - - + Shortcuts - + Updating... - + Untitled - - - + + + Save file as - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) - + (%1/%2/%3) - + (%1/%2) - + C - + Changing grid settings will reset probe data. Continue? - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1084,509 +1091,484 @@ Time elapsed: %1 - + Port: - + ... - + Baud: - - + + 9600 - + 14400 - + 19200 - + 38400 - + 57600 - + 115200 - + Sender - + Ignore error responses - + Automatically set parser state before sending from selected line - + Machine information - + Status query period: - - mm - - - - - inch - - - - - Units: - - - - - Rapid speed: - - - - - Acceleration: - - - - - + + max.: - + Spindle speed min.: - + Laser power min.: - + Control - + Probe commands: - - - - - - + + + + + + Command 1; command 2; ... - + Safe position commands: - + "Restore origin" moves tool in: - + Plane - + Space - - + + User commands - + Button 1: - + Button 2: - + Button 3: - + Button 4: - - + + Heightmap - + Heightmap probing feed: - + Parser - + Arc approximation segment size: - + by length - + by angle (deg.) - - + + Visualizer - + Z-buffer - + MSAA - + Line width: - + FPS lock: - + 30 - + 60 - + 120 - + Program draw mode: - + Vectors - + Raster - + By 'Z'-code - + By 'S'-code - + Grayscale segments - + Simplify geometry - + Precision: - + V-sync - + Smoothing - + Tool model - + Type: - + Diameter: - + Flat - + Conic - + Angle: - + Length: - + Console - + Show G-code program commands - + Show UI commands - + Command auto-completion - + Panels - + Jog - + Spindle - + Overriding - + Colors - + Z-movement: - + Toolpath - + Background: - + Highlight: - + Start point: - + End point: - + Text: - + Tool: - + Drawn: - + Normal: - - + + Shortcuts - + Command - + Text - + Font - + Size: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt - + (restart needed) - + Set to defaults - + OK - + Cancel diff --git a/src/translations/candle_es.ts b/src/translations/candle_es.ts index 475e7a89..b91b68df 100644 --- a/src/translations/candle_es.ts +++ b/src/translations/candle_es.ts @@ -62,7 +62,7 @@ GLWidget - + Vertices: %1 Vertices: %1 @@ -115,37 +115,37 @@ GRBL Control - + G-code program Programa de G-Code - - + + Isometric view Vista isometrica - - + + Top view Vista superior - - + + Front view Vista Frontal - - + + Left view Vista izquierda - - + + Fit Ajustar vista @@ -154,57 +154,57 @@ Ajuste de alturas - + Border: Bordes: - - - + + + X: X: - + H: - - - + + + Y: Y: - + W: - - + + Show border Mostrar borde - + Auto - + Probe grid: Grilla de medición: - + Zb: Zн: - + Zt: Zв: @@ -213,17 +213,17 @@ Mostrar grilla - + Interpolation grid: Grilla de interpolación: - + Type: Tipo: - + Bicubic Bicubico @@ -241,51 +241,51 @@ - - - - - + + + + + Open Abrir - - - + + + Reset Reiniciar - - + + Send Enviar - + Pause Pausar - - - - + + + + Abort Abandono - + State Estado - + Work coordinates: Coordenadas de trabajo: @@ -294,62 +294,62 @@ 0 - + Machine coordinates: Coordenadas de máquina: - + Status: Estado: - + Control Control - - - + + + Home Origen - - - - - - - - - + + + + + + + + + ... ... - - + + Z-probe Medicion de Z - - + + Zero XY Cero XY - - + + Zero Z Cero Z - - - + + + Overriding @@ -367,48 +367,48 @@ - - + + Restore origin Restaure el origen - - + + Safe position Posición segura - - + + Unlock Desbloquear - - + + Heightmap Mapa de alturas - - + + Use heightmap Usar mapa de alturas - + Map: Mapa: - + Absent Ausente - - + + Create Crear @@ -417,27 +417,27 @@ Modo edición - - - - - - + + + + + + Spindle Husillo - + Speed: Velocidad: - - - - - - + + + + + + Spindle on/off Husillo on/off @@ -454,51 +454,51 @@ % - - - - + + + + Jog Control manual - - + + X- - - + + Y- - - + + X+ - - + + Y+ - + Step: Pasos: - - + + Z+ - - + + Z- @@ -507,7 +507,7 @@ Presets: - + User commands @@ -524,29 +524,29 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 @@ -566,216 +566,226 @@ - + Modification - - + + Edit - - + + Show probe grid - - + + Show interpolation grid - + Device - - + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - - + + Keyboard control Control desde teclado - + Visualizer Visualizador - + Console Consola - + Send command Enviar comando - - + + Clear console Limpiar cosola - + + User + + + + &Device - + &Modification - + &Visualizer - + &Console - + User command 1 - + User command 2 - + User command 3 - + User command 4 - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override + + + &User + + &File @@ -797,230 +807,227 @@ &Ayuda - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Abrir - + E&xit S&alir - + &Settings &Opciones - + &New &Nuevo - + &Save &Guardar - + Save &as... Guardar &como... - + &About &Acerca de - + &Clear &Limpiar - + Save &transformed as... Salve &transformado como... - + Idle Listo - + Alarm Alarma - + Run Iniciar - - + + Hold Parada - + Queue En cola - - + + Check Chequeo - + Door Puerta - + Unknown Desconocido - + Send from current line - + Feed rate: - + Rapid speed: Velocidad de aproximación: - + Spindle speed: - + &Insert line &Insertar linea - + &Delete lines &Borrar lineas - + Don't show again - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - - + Command Comando - - + Text - - + Shortcuts - + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1031,38 +1038,38 @@ %1, %2, %3 - + G-code program file was changed. Save? El programa de G-code ha cambiado. Desea guardar? - + Heightmap file was changed. Save? El programa mapa de alturas ha cambiado. Desea guardar? - + Not connected Sin Conexión - + Probe Medición - + Opening file... - + Updating... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Archivos de G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1071,7 +1078,7 @@ Conectado - + Job done. Time elapsed: %1 Trabajo terminado. @@ -1082,18 +1089,18 @@ Tiempo transcurrido: %1 Procesado - + Serial port error Error en puerto serie - + Scroll Desplazamiento - + File sending in progress. Terminate and exit? Envio de archivo en progreso. Detener y salir? @@ -1110,33 +1117,33 @@ Tiempo transcurrido: %1 Archivos de G-Code (*.nc *.ncc *.tap *.txt) - - - + + + Heightmap files (*.map) Mapa de alturas (*.map) - + Port opened Puerto se abrió - - + + Restore origin: %1, %2, %3 Restaure origen: %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Archivos de G-Code (*.nc *.ncc *.ngc *.tap *.txt);;Todos los archivos (*.*) - - + + Can't open file: No se puede abrir el archivo: @@ -1151,26 +1158,26 @@ Tiempo transcurrido: %1 Enviado - + Delete lines? Borrar lineas? - - - + + + (%1) - + Untitled Sin-título - - - + + + Save file as Guardar archivo como @@ -1179,7 +1186,7 @@ Tiempo transcurrido: %1 Archivos de G-Code (*.nc;*.ncc;*.tap) - + Changing grid settings will reset probe data. Continue? El cambio de configuraciones de grilla reiniciará los datos de medición. Desea continuar? @@ -1197,48 +1204,48 @@ Tiempo transcurrido: %1 Conexión - + Port: Puerto: - + ... - + Baud: Baud: - - + + 9600 - + 14400 - + 19200 - + 38400 - + 57600 - + 115200 @@ -1255,23 +1262,21 @@ Tiempo transcurrido: %1 Seguridad en Z: - Rapid speed: - Velocidad de aproximación: + Velocidad de aproximación: - Acceleration: - Aceleración: + Aceleración: - + Spindle speed min.: Velocidad mínima de husillo: - - + + max.: max.: @@ -1280,17 +1285,17 @@ Tiempo transcurrido: %1 Comandos de medición de Z: - - - - - - + + + + + + Command 1; command 2; ... Comando 1; Comando 2; ... - + Heightmap probing feed: Avance de medición de mapa de alturas: @@ -1307,7 +1312,7 @@ Tiempo transcurrido: %1 Imperial - + Parser Analizador @@ -1316,28 +1321,28 @@ Tiempo transcurrido: %1 Largo de segmento de aporximación de arco: - - + + Visualizer Visualizador - + Line width: Espesor de linea: - + Smoothing Suavizado - + MSAA MSAA - + Simplify geometry Simplificar geometria @@ -1346,27 +1351,27 @@ Tiempo transcurrido: %1 Largo de segmento: - + FPS lock: Bloqueo de FPS: - + 30 - + 60 - + 120 - + Z-buffer @@ -1375,132 +1380,131 @@ Tiempo transcurrido: %1 Represeantación gráfica de herramienta - + Type: Tipo: - + Diameter: Diametro: - + Flat Plana - + Conic Cónica - + Angle: Ángulo: - + Length: Largo: - + Console Consola - + Show G-code program commands Mostrar comandos de programa G-Code - + Show UI commands Mostrar comandos de interfaz del usuario - + Command auto-completion Auto-completar comandos - + Panels Paneles - - + + Heightmap Mapa de altura - Units: - Unidades: + Unidades: Feed Avance - + Spindle Husillo - + Jog Control manual - + Sender - + Ignore error responses - + Automatically set parser state before sending from selected line - + Colors Color - + Z-movement: Movimiento en Z: - + Normal: Normal: - + Toolpath Recorrido de herramienta - + by length Por longitud - + Drawn: Dibujo: - + Background: Fondo: @@ -1513,245 +1517,235 @@ Tiempo transcurrido: %1 Unidades de medida de la aplicación: - + Machine information Información de la máquina - + Status query period: Período de la pregunta de estado: - - mm - - - - - inch - - - - + Laser power min.: - + Control Control - + Probe commands: Órdenes de sonda: - + Safe position commands: Órdenes de posición segura: - + "Restore origin" moves tool in: «Restaure el origen» mueve el instrumento al: - + Plane Avión - + Space Espacio - - + + User commands - + Button 1: - + Button 2: - + Button 3: - + Button 4: - + Arc approximation segment size: Talla de segmento de aproximación del arco: - + by angle (deg.) Por ángulo - + Program draw mode: - + Vectors - + Raster - + By 'Z'-code - + By 'S'-code - + Grayscale segments - + Precision: Precisión: - + V-sync - + Tool model Herramientas modelo - + Overriding - + Highlight: Resaltado: - + Start point: Origen: - + End point: Punto final: - + Text: Texto: - + Tool: Herramienta: - - + + Shortcuts - + Command Comando - + Text - + Font Fuente - + Size: Tamaño: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt Puntos - + (restart needed) (Se requiere reinicio) - + Set to defaults Opciones por defecto - + OK ОК - + Cancel Cancelar diff --git a/src/translations/candle_fr.ts b/src/translations/candle_fr.ts index 7040ba6f..d55ee8b3 100644 --- a/src/translations/candle_fr.ts +++ b/src/translations/candle_fr.ts @@ -62,7 +62,7 @@ GLWidget - + Vertices: %1 Vertices: %1 @@ -115,37 +115,37 @@ grblControl - + G-code program Programme G-Code - - + + Isometric view Vue isometrique - - + + Top view Vue de dessus - - + + Front view Vue de Face - - + + Left view Vue de gauche - - + + Fit Ajuster vue @@ -154,57 +154,57 @@ Paramètres palpage surfacique - + Border: Bords: - - - + + + X: X: - + H: - - - + + + Y: Y: - + W: - - + + Show border Montrer bord - + Auto - + Probe grid: Grille de palpage: - + Zb: Zb: - + Zt: Zt: @@ -213,17 +213,17 @@ Montrer grille - + Interpolation grid: Espacement grille: - + Type: Type: - + Bicubic Bicubique @@ -241,51 +241,51 @@ - - - - - + + + + + Open Ouvrir - - - + + + Reset Reinitialiser - - + + Send Envoyer - + Pause Pause - - - - + + + + Abort Abandon - + State Etât - + Work coordinates: Coordonnées de travail: @@ -294,62 +294,62 @@ 0 - + Machine coordinates: Coordonnées machine: - + Status: Etât: - + Control Contrôle - - - + + + Home Origine - - - - - - - - - + + + + + + + + + ... ... - - + + Z-probe Palper Z - - + + Zero XY Zero XY - - + + Zero Z Zero Z - - - + + + Overriding @@ -367,48 +367,48 @@ - - + + Restore origin Restituez l'origine - - + + Safe position Position sûre - - + + Unlock Desbloquer - - + + Heightmap Palpage surfacique - - + + Use heightmap Utiliser palpage surfacique - + Map: Fichier: - + Absent Absent - - + + Create Créer @@ -417,27 +417,27 @@ Paramètres de palpage - - - - - - + + + + + + Spindle Broche - + Speed: Vitesse: - - - - - - + + + + + + Spindle on/off Broche on/off @@ -454,51 +454,51 @@ % - - - - + + + + Jog Contrôle manuel - - + + X- - - + + Y- - - + + X+ - - + + Y+ - + Step: Pas: - - + + Z+ - - + + Z- @@ -507,7 +507,7 @@ Pre-selection: - + User commands @@ -524,29 +524,29 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 @@ -566,216 +566,226 @@ - + Modification - - + + Edit - - + + Show probe grid - - + + Show interpolation grid - + Device - - + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - - + + Keyboard control Contrôle avec le clavier - + Visualizer Apparence - + Console Console - + Send command Envoyer commande - - + + Clear console Effacer consôle - + + User + + + + &Device - + &Modification - + &Visualizer - + &Console - + User command 1 - + User command 2 - + User command 3 - + User command 4 - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override + + + &User + + &File @@ -797,215 +807,212 @@ &Aide - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Ouvrir - + E&xit Q&uitter - + &Settings &Reglages - + &New &Nouveau - + &Save &Enregistrer - + Save &as... Enregistrer &sous... - + &About &A propos de - + &Clear &Effacer - + Save &transformed as... Sauvez &transformé comme... - + Idle Idle - + Alarm Alarme - + Run Demarrer - - + + Hold Stop - + Queue En attente - - + + Check Vérifié - + Door Porte - + Unknown Inconnu - + Send from current line - + Feed rate: - + Rapid speed: Vitesse d'approche: - + Spindle speed: - + &Insert line &Inserer ligne - + &Delete lines &Effacer ligne - + Don't show again - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - - + Command Comande - - + Text - - + Shortcuts - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1016,22 +1023,22 @@ %1, %2, %3 - + G-code program file was changed. Save? Le programme G-code à changé. Sauvegarder? - + Heightmap file was changed. Save? Le fichier surface de palpage a changé. Sauvegarder? - + Not connected Non connecté - + Probe Palper @@ -1040,7 +1047,7 @@ Connecté - + Job done. Time elapsed: %1 Travail terminé. @@ -1051,18 +1058,18 @@ Temps écoulé: %1 Traité - + Serial port error Erreur port serie - + Scroll Déplacement - + File sending in progress. Terminate and exit? Envoi de fichier en cours. Terminer et Sortir? @@ -1071,38 +1078,38 @@ Temps écoulé: %1 Envoyé - - - + + + Heightmap files (*.map) Fichier de palpage (*.map) - - + + Restore origin: %1, %2, %3 Restituez l'origine: %1, %2, %3 - + Port opened Le port s'est ouvert - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) G-Code fichiers (*.nc *.ncc *.ngc *.tap *.txt);;Tous les fichiers (*.*) - + Opening file... - - + + Can't open file: Impossible d'ouvrir du fichier: @@ -1117,57 +1124,57 @@ Temps écoulé: %1 Envoyé - + Delete lines? Effacer ligne? - - - + + + (%1) - + Updating... - + Untitled Sans titre - - - + + + Save file as Enregistrer le fichier sous - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) G-Code fichiers (*.nc *.ncc *.ngc *.tap *.txt) - + (%1/%2/%3) - + (%1/%2) - + C - + Changing grid settings will reset probe data. Continue? Changer les paramètres de la grille, réinitialise les données de palpage. Continuer? @@ -1185,48 +1192,48 @@ Temps écoulé: %1 Connexion - + Port: Port: - + ... - + Baud: Baud: - - + + 9600 - + 14400 - + 19200 - + 38400 - + 57600 - + 115200 @@ -1243,23 +1250,17 @@ Temps écoulé: %1 Securite Z: - Rapid speed: - Vitesse d'approche: + Vitesse d'approche: - - Acceleration: - - - - + Spindle speed min.: Vitesse broche min.: - - + + max.: max.: @@ -1268,17 +1269,17 @@ Temps écoulé: %1 Commande de palpage Z: - - - - - - + + + + + + Command 1; command 2; ... Commande 1; Commande 2; ... - + Heightmap probing feed: Avance lors du palpage: @@ -1295,7 +1296,7 @@ Temps écoulé: %1 Imperial - + Parser Analyseur @@ -1304,28 +1305,28 @@ Temps écoulé: %1 Largeur de segment des arcs: - - + + Visualizer Apparence - + Line width: Espaisseur de ligne: - + Smoothing Lissage - + MSAA MSAA - + Simplify geometry Simplifier la geometrie @@ -1334,27 +1335,27 @@ Temps écoulé: %1 Largeur de segment: - + FPS lock: Bloquer FPS: - + 30 - + 60 - + 120 - + Z-buffer @@ -1363,132 +1364,131 @@ Temps écoulé: %1 Représentation de l'outil - + Type: - + Diameter: Diamètre: - + Flat Plat - + Conic Conique - + Angle: - + Length: Longueur: - + Console Console - + Show G-code program commands Montrer commande du programme G-Code - + Show UI commands Montrer les commandes de l'interface utilisateur - + Command auto-completion Commande Saisie auto - + Panels Panneaux de contrôle - - + + Heightmap Palpage surfacique - Units: - Unités: + Unités: Feed Avance - + Spindle Broche - + Jog Contrôle manuel - + Sender - + Ignore error responses - + Automatically set parser state before sending from selected line - + Colors Couleurs - + Z-movement: Mouvement Z: - + Normal: Normal: - + Toolpath Parcours d'outil - + by length Par longueur - + Drawn: Dessin: - + Background: Fond: @@ -1501,245 +1501,235 @@ Temps écoulé: %1 Unités de mesure de l'application: - + Machine information Renseignements de machine - + Status query period: Période de question de statut: - - mm - - - - - inch - - - - + Laser power min.: - + Control Contrôle - + Probe commands: Commandes de sonde: - + Safe position commands: Commandes de position sûre: - + "Restore origin" moves tool in: "Restituez l'origine" déplace l'outil dans: - + Plane l'avion - + Space l'espace - - + + User commands - + Button 1: - + Button 2: - + Button 3: - + Button 4: - + Arc approximation segment size: Largeur de segment des arcs: - + by angle (deg.) Par Angle - + Program draw mode: - + Vectors - + Raster - + By 'Z'-code - + By 'S'-code - + Grayscale segments - + Precision: Precisión: - + V-sync - + Tool model Modèle de l'outil - + Overriding - + Highlight: Souligner: - + Start point: Origine: - + End point: Point final: - + Text: Texte: - + Tool: Outil: - - + + Shortcuts - + Command Comande - + Text - + Font Ecriture - + Size: Taille: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt Points - + (restart needed) (Redémarrage nécessaire) - + Set to defaults Paramètres par default - + OK ОК - + Cancel Annuler diff --git a/src/translations/candle_pt.ts b/src/translations/candle_pt.ts index abf82b06..49db06d9 100644 --- a/src/translations/candle_pt.ts +++ b/src/translations/candle_pt.ts @@ -62,7 +62,7 @@ GLWidget - + Vertices: %1 Vertices: %1 @@ -115,37 +115,37 @@ Controle GRBL - + G-code program Programa de G-Code - - + + Isometric view Vista isométrica - - + + Top view Vista Superior - - + + Front view Vista Frontal - - + + Left view Vista Esquerda - - + + Fit Ajustar vista @@ -154,57 +154,57 @@ Ajuste de alturas - + Border: Bordas: - - - + + + X: X: - + H: H: - - - + + + Y: Y: - + W: W: - - + + Show border Mostrar borda - + Auto - + Probe grid: Grade de medição: - + Zb: Zн: - + Zt: Zв: @@ -213,17 +213,17 @@ Mostrar grade - + Interpolation grid: Grade de interpolação: - + Type: Tipo: - + Bicubic Bicúbico @@ -241,51 +241,51 @@ - - - - - + + + + + Open Abrir - - - + + + Reset Reiniciar - - + + Send Enviar - + Pause Pausar - - - - + + + + Abort Abortar - + State Estado - + Work coordinates: Coordenadas de trabalho: @@ -294,62 +294,62 @@ 0 - + Machine coordinates: Coordenadas da máquina: - + Status: Estado: - + Control Controle - - - + + + Home Origem - - - - - - - - - + + + + + + + + + ... ... - - + + Z-probe Medição de Z - - + + Zero XY Zero XY - - + + Zero Z Zero Z - - - + + + Overriding @@ -367,48 +367,48 @@ - - + + Restore origin Restaure a origem - - + + Safe position Posição segura - - + + Unlock Desbloquear - - + + Heightmap Mapa de alturas - - + + Use heightmap Usar mapa de alturas - + Map: Mapa: - + Absent Ausente - - + + Create Criar @@ -417,27 +417,27 @@ Modo edição - - - - - - + + + + + + Spindle Spindle - + Speed: Velocidade: - - - - - - + + + + + + Spindle on/off Spindle on/off @@ -454,51 +454,51 @@ % - - - - + + + + Jog Controle manual - - + + X- - - + + Y- - - + + X+ - - + + Y+ - + Step: Passos: - - + + Z+ - - + + Z- @@ -507,7 +507,7 @@ Presets: - + User commands @@ -524,29 +524,29 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 @@ -566,216 +566,226 @@ - + Modification - - + + Edit - - + + Show probe grid - - + + Show interpolation grid - + Device - - + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - - + + Keyboard control Controle por teclado - + Visualizer Visualizador - + Console Console - + Send command Enviar comando - - + + Clear console Limpar cosole - + + User + + + + &Device - + &Modification - + &Visualizer - + &Console - + User command 1 - + User command 2 - + User command 3 - + User command 4 - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override + + + &User + + &File @@ -797,230 +807,227 @@ &Ajuda - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Abrir - + E&xit S&air - + &Settings &Opções - + &New &Novo - + &Save &Salvar - + Save &as... Salvar &como... - + &About &Sobre - + &Clear &Limpar - + Save &transformed as... Salvar &transformado como... - + Idle Inativo - + Alarm Alarme - + Run Iniciar - - + + Hold Manter - + Queue Em fila - - + + Check Checar - + Door Porta - + Unknown Desconhecido - + Send from current line - + Feed rate: - + Rapid speed: Velocidade de aproximação: - + Spindle speed: - + &Insert line &Inserir linha - + &Delete lines &Apagar linhas - + Don't show again - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - - + Command Comando - - + Text - - + Shortcuts - + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1031,38 +1038,38 @@ %1, %2, %3 - + G-code program file was changed. Save? O programa G-code foi alterado. Deseja salvar? - + Heightmap file was changed. Save? O arquivo mapa de alturas foi alterado. Deseja salvar? - + Not connected Sem Conexão - + Probe Medição - + Opening file... - + Updating... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Arquivos G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1071,7 +1078,7 @@ Conectado - + Job done. Time elapsed: %1 Trabalho terminado. @@ -1082,18 +1089,18 @@ Tempo transcorrido: %1 Processado - + Serial port error Erro na porta serial - + Scroll Rolagem - + File sending in progress. Terminate and exit? Envio de arquivo en progreso. Terminar e sair? @@ -1110,33 +1117,33 @@ Tempo transcorrido: %1 Arquivos G-Code (*.nc *.ncc *.tap *.txt) - - - + + + Heightmap files (*.map) Mapa de alturas (*.map) - + Port opened Porta aberta - - + + Restore origin: %1, %2, %3 Restaure origem: %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Arquivos G-Code (*.nc *.ncc *.tap *.txt);;Todos os arquivos (*.*) - - + + Can't open file: Não foi possível abrir o arquivo: @@ -1151,26 +1158,26 @@ Tempo transcorrido: %1 Enviado - + Delete lines? Apagar linhas? - - - + + + (%1) - + Untitled Sem-título - - - + + + Save file as Salvar arquivo como @@ -1179,7 +1186,7 @@ Tempo transcorrido: %1 Arquivos G-Code (*.nc;*.ncc;*.tap) - + Changing grid settings will reset probe data. Continue? A alteração nas configurações de grade reiniciará os dados de medição. Deseja continuar? @@ -1197,48 +1204,48 @@ Tempo transcorrido: %1 Conexão - + Port: Porta: - + ... - + Baud: Baud: - - + + 9600 - + 14400 - + 19200 - + 38400 - + 57600 - + 115200 @@ -1255,23 +1262,21 @@ Tempo transcorrido: %1 Segurança em Z: - Rapid speed: - Velocidade de aproximação: + Velocidade de aproximação: - Acceleration: - Aceleração: + Aceleração: - + Spindle speed min.: Velocidade mínima do Spindle: - - + + max.: max.: @@ -1280,17 +1285,17 @@ Tempo transcorrido: %1 Comandos de medição de Z: - - - - - - + + + + + + Command 1; command 2; ... Comando 1; Comando 2; ... - + Heightmap probing feed: Avanço de medição de mapa de alturas: @@ -1307,7 +1312,7 @@ Tempo transcorrido: %1 Imperial - + Parser Analizador @@ -1316,28 +1321,28 @@ Tempo transcorrido: %1 Tamanho do segmento de aproximação de arco: - - + + Visualizer Visualizador - + Line width: Largura da linha: - + Smoothing Suavizado - + MSAA MSAA - + Simplify geometry Simplificar geometria @@ -1346,27 +1351,27 @@ Tempo transcorrido: %1 Tamanho de segmento: - + FPS lock: Bloqueio de FPS: - + 30 - + 60 - + 120 - + Z-buffer @@ -1375,63 +1380,63 @@ Tempo transcorrido: %1 Representação gráfica de ferramenta - + Type: Tipo: - + Diameter: Diâmetro: - + Flat Plana - + Conic Cônica - + Angle: Ângulo: - + Length: Largura: - + Console Console - + Show G-code program commands Mostrar comandos de programa G-Code - + Show UI commands Mostrar comandos de interfce do usuário - + Command auto-completion Autocompletar comandos - + Panels Painéis - - + + Heightmap Mapa de altura @@ -1440,62 +1445,62 @@ Tempo transcorrido: %1 Avanço - + Spindle - + Jog Controle manual - + Sender - + Ignore error responses - + Automatically set parser state before sending from selected line - + Colors Cores - + Z-movement: Movimento em Z: - + Normal: Normal: - + Toolpath Caminho da ferramenta - + by length por tamanho - + Drawn: Desenhado: - + Background: Fundo: @@ -1508,250 +1513,239 @@ Tempo transcorrido: %1 Unidades de medição da aplicação: - + Machine information Informação sobre máquina - + Status query period: Período de pergunta de posição: - - mm - - - - - inch - - - - Units: - Unidades: + Unidades: - + Laser power min.: - + Control Controle - + Probe commands: Ordens de tenta: - + Safe position commands: Ordens de posição segura: - + "Restore origin" moves tool in: "Restaure a origem" move o instrumento para o: - + Plane Avião - + Space Espaço - - + + User commands - + Button 1: - + Button 2: - + Button 3: - + Button 4: - + Arc approximation segment size: Tamanho de segmento de aproximação de arco: - + by angle (deg.) por ângulo - + Program draw mode: - + Vectors - + Raster - + By 'Z'-code - + By 'S'-code - + Grayscale segments - + Precision: Precisión: - + V-sync - + Tool model Modelo da ferramenta - + Overriding - + Highlight: Realçado: - + Start point: Origem: - + End point: Ponto final: - + Text: Texto: - + Tool: Ferramenta: - - + + Shortcuts - + Command Comando - + Text - + Font Fonte - + Size: Tamanho: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt - + (restart needed) (Requer reinicio) - + Set to defaults Opções padrão - + OK ОК - + Cancel Cancelar diff --git a/src/translations/candle_ru.qm b/src/translations/candle_ru.qm index efa0ab88a3f3640b7fa2efcf72e7de41d8144047..b2100cae97171bc93cfc7cc7916999239333e3a7 100644 GIT binary patch delta 3163 zcmZuz2~?EV6}~g`{u%gZK}2LxaFkV+VSs^QmjTHjiyMlH8f6(^lzmVnNgWflDq5F} zdK8!R*eGsI)Io!2Fo}>BttC|(HK(F+sZ@=c#Wu$!^!pjZY10D3_x|_4ci(rv``rgu zTSR>yh&B$hJ|QAMe1xw^B9#j;26zA%ho5v{Jg@|av8y+cBo*(&92k2VXdsI11*Q?{ z1A+5_$AQbR?sMQq>>o|U+KEPdLBu5zIZtw+HGK{S2Z^F9fro&%fWIfw5fB@6zQ9w! zB;d!u0^m8|65x5@R^SC-E0L_8Xd(zis)&?F9T>YEF+@O6<#Nz-_?a5Q&cy z`=>vVj}H)~@G%m59ssN*E@%o-+CJj683=rpxVQwO(bI@41<^4T#O)kU6ubh6c%tRR z?ZL9pKnOdZNVAT(!#@y3xH>TFQ{uY0&mdE#&0QQ~?Z!~iOQAhTPU%Iu1|*?hNV+Zo zH&X0J0$!oG0|LGv$}0Ju zD0waAoWi`v9Lf*yCNlhm^4D#F19QnbBN$1IA44TdF;r&!_I04BPQ$Y{nWId+Yre{RiMKni>eGwK1 zX7^BCAL0);kY%km9PrdiOHSe-YNkDkgGAwH>DV&(XiPJ8yPrha{ps7zEHps8NOcRD z4Cxek`u&MWy-=jKp+VeMiS9Tx6Q!EOK23K)beuT+llQSdNUXVx0|E|+Be$K!dR}b$ zZaAv)sd&wq0>o_-Z~A5_Tw;Aq+%h1gO?)u)9Y}gX+*4EYjyg%3?9Wi7m3g!w!T53( zc=Zy|s7w}?gl_j(%e2{OIIH)4R{Gi7sGWpWS-K%fC0p!^HXRwx8U;VO6tNYzAYt4A zwtftUn*NP#n}GID3S`@|1E9=KwlCI(=b3DO+g>R0j2-SliH6m(w)IFL{Ec2Cj{`#NF4Mh!WrDevC)wgv^mj zq>qq6uvD?B0JWPd9oYx;*&z)&*MRkj(!@5@QfrhJS9-#9HtB*BGMLm)`j#O9QU^=d z6xl)eb7}Ka5FC5afyNx^gLLa!xO^=JXdnN((#LO2#ewcJ_S0@i*dhxHLcrY9vdC{P zLzyMAc<*PxURj3L7gs=stk&QSiT@#6*KrP>nJ3%Q7mhfgvZM9w=%!Amq`yP4lsc!z zJHWVWPEEPm3-eQ&Djg1iif#^-mGVH%!qo-yIU?Dq5EA!Mz|-w4XQ& z_nQ^%k5OC2Ud1U9&^T1#F!No-!!huTOSht5+D#z4JM*oj3RYtgJV4iczq?=G8 zXoJ$Y<*)d|cTrik3+`5TDXmqgd8WH^SuAQc>O*C#;t~`(uk7uEoB0^!%{sJK@CoI; zrC2Bbm-5lCVX|Q%D%P3@1(&N_yRPA1g=AI6lt#4muT+_rp_u!6)!d%hG?T)V7~p0L zD^@i;e2Df@tGeRgf$-U?-rfa}cB1O*bJNfjT`r+oNSu1rC9exgsb9FN4H*VLHRJz*9Q#G5TMCIc1-`5IR64H3BS{rflab$GQ9jXgzv$9?uMG0ibiu)nY!F$E-SCEEUeLJG`2j?mnt#y8C)hx zx7CKZ*`|6eAJxn}nf_H|A$lB(AvK~4XC$yVn=)jCRn5i?oF9c*o$v-L67Wf3Myxjs ztQ2;oF)fQ^iI_7YQZ~!LoDOrzubwn`7BWe}Yzo%JVr3f3p>c!6^y%e=Rb>MIvO05# z+G47&H&^+US=0^YiVAg|2@~p?y6Pg6x}>naP@_(-uEK&vrg8R8uiH{lzHPrcpC61C zY6}@1YTv3pE}I!OaIls|At^1X$w=WCfe0uG$)&Jp{MJH$gM6hmky|E z3@@%OF$omP>Iy3%tvw<55tr!CMk7MTKm-=DyrKMAN@LSv2whCIdwT)6lSKKPw;-zktt=b*D)$OuM>sYOIyzUz_)9EZTndiTK=R4;; z@A>HYNOhr6wXvVG6+k3^p1 z$^VikfMgxXXUWmzX)*`UWdgZPWF`3(>o79WrCz4QG6{d)GeL7Q6El%7FyZs8FBwi4 z_W;ieAaDmTxd0eg>SbmLFyjai6%5QNIQr1EyMtmU%$mNf3v)U*FvjXWw)JqtYP0d66t3*8}PU5ci^h zkS>y~2zdhWkkt-|g%mRx7`+ry@;C;*0Lfwn!t{_9Fww9!NZTlX^jjq3ss0FQCqIkj zx)0|7@wJee?~*NEj=u_>khV~=JXe5vsPhbqQZB)~jLD}wfVqPl5r(wSJX`?F9uL>T zzPXM?-Xo8*ok6f)_7qbEM=WzUy$r`%ij+1P6K-w={GK9rKCP2J6VDyu^MHMr799d) zzK3b+>VfdBD2Qb(V}63Opp+kE#i5{n6);$X>4({}!5?9ICpU^rN17MAode!qHDtPNr9%kcU^ z?t=y=b}BUF&<=dMg8m8XL1(~0w%v`}$8%Z98!F>9R^k_>3XVJlghr^sT^tPmf2pqf zGyoZ?>OnRC1|rt0haLTZ>t9nRc5#DsfTYl1`PU}y7;F+cIBA*?e;?2$*$h? z!*bfpS*LD%CaFukH-06hJ*_@|;|8UAq`th4fyNi8dsfe6=9kD>lyaD6>?%*IHfS8( zY;Qt~X2zH8K=4h?*3Le_1gmCy?`#gq5)stO3R5j&$c1zC_fwIO!668^ERyp$WWn!= z1)u+clW6=>lvi|e;W4o^bP`AQx~TH_$P^>qyhaJlRiZXRV#Uc~%Y?(g$a`W-UNjZy z7Q542oTgaO)Vd4kGf_03VT<~7h}K#rZvDMDB2&@yI?=77PxUjz(<9%qpiNTBhNpn- zW67+ta}ozMO4B@U)&j|sb5yRe1l)3_XMwarS2tF>>>b91scYa4!MVne#T%vq$pnZpBe@I{hS z6EQ-2tJ;~*je>OI$qq{QP?r$HfVq8i!++?aB7fJVhdkhd1l?j=2rECRTX*CHl}OUn z_YC9nD%~fQZJeGupN#LRkTu(<>N;uO<8$+N1*fOk=RqqIF}3(6ZvBddtoJQxW*pOP z-s7qsey2^DTm7HP=i3DlaY5<>K8`)_<>;>1XBQrd5EflAXl| z2eR@Y`5CP``PIDF*rSbJj%%0eJQ*j2%7323$^%czO^2>F_e3s z+HSFz$}Z)Qip)t-ye2)MJXM8oY^x0suf9N&l^BxxCej-XhKwszAgbG7um2}aJJ;~a zcA7P`+Tbi_i^rxKR-~~-gBBR}E9W@>**6WBdgxL))o^7A$0fSe@So-UQ2&eJ$G2W) zYnB_u{wb8sVf62~$dl`o(a}YP`d%~6I>Uo0&P4KHiYqoQ>+R(xHr?o+!m`uDo*A*)M)N-ER>9 diff --git a/src/translations/candle_ru.ts b/src/translations/candle_ru.ts index 96bfae0b..842a0840 100644 --- a/src/translations/candle_ru.ts +++ b/src/translations/candle_ru.ts @@ -74,7 +74,7 @@ Сегменты: %1 - + Vertices: %1 Вершины: %1 @@ -139,37 +139,37 @@ frmMain - + G-code program G-code программа - - + + Isometric view Изометрия - - + + Top view Вид сверху - - + + Front view Вид спереди - - + + Left view Вид слева - - + + Fit Вписать @@ -178,57 +178,57 @@ Настройки карты высот - + Border: Границы: - - - + + + X: - + H: В: - + W: Ш: - - - + + + Y: - + Auto Авто - - + + Show border Показать границы - + Probe grid: Сетка зондирования: - + Zb: Zн: - + Zt: Zв: @@ -237,17 +237,17 @@ Показать сетку - + Interpolation grid: Сетка интерполяции: - + Type: Тип: - + Bicubic Бикубический @@ -264,12 +264,12 @@ Автопрокрутка - + State Состояние - + Control Управление @@ -287,14 +287,14 @@ &Недавние файлы - + &Open &Открыть - - + + Send Отправить @@ -308,48 +308,48 @@ - - - + + + Reset Сброс - + Pause Пауза - + Work coordinates: Рабочие координаты: - + Machine coordinates: Машинные координаты: - + Status: Статус: - + Not connected Нет соединения - - - - - - - - - + + + + + + + + + ... @@ -358,14 +358,14 @@ Поиск стола - - + + Zero XY Обнулить XY - - + + Zero Z Обнулить Z @@ -374,8 +374,8 @@ Вернуться в XY(Z) - - + + Z-probe Z-щуп @@ -384,36 +384,36 @@ Безопасная Z - - + + Unlock Разблокировать - - + + Heightmap Карта высот - - + + Use heightmap Использовать карту высот - + Map: Карта: - + Absent Отсутствует - - + + Create Создать @@ -422,27 +422,27 @@ Редактирование - - - - - - + + + + + + Spindle Шпиндель - + Speed: Скорость: - - - - - - + + + + + + Spindle on/off Вкл/выкл шпиндель @@ -455,21 +455,21 @@ Переопределить: - - - - + + + + Jog Перемещение - + Step: Шаг: - - + + X- @@ -480,59 +480,59 @@ - - - - + + + + Abort Прервать - - + + Restore origin Восстановить СК - - + + Safe position Безопасное положение - - - + + + Overriding Коррекция - - + + Y- - - + + X+ - - + + Y+ - - + + Z+ - - + + Z- @@ -541,97 +541,97 @@ Уставки: - + User commands Команды - - + + Stop Стоп - + Continuously Непрерывно - + 0.01 - + 0.1 - + 1 - + 5 - - + + 10 - - + + 100 - + Feed: Подача: - + 500 - + 50 - + 1000 - + 2000 - - + + Keyboard control Управление с клавиатуры - + Console Консоль - + Send command Отправить команду - - + + Clear console Очистить консоль @@ -666,382 +666,389 @@ &Окна - + Modification Модификация - - + + Edit Редактирование - - + + Show probe grid Показать сетку зондирования - - + + Show interpolation grid Показать сетку интерполяции - + Device Устройство - + Visualizer Визуализатор - + _spacerTop - + _spacerLeft - + _spacerRight - + + User + Пользователь + + + E&xit Вы&ход - + &Settings &Настройки - + User command 1 Пользовательская команда 1 - + User command 2 Пользовательская команда 2 - + User command 3 Пользовательская команда 3 - + User command 4 Пользовательская команда 4 - + Spindle speed + Скорость шпинделя + - + Spindle speed - Скорость шпинделя - - + Jog step next Шаг перемещения следующий - + Jog step previous Шаг перемещения предыдущий - + Jog feed next Подача перемещения следующая - + Jog feed previous Подача перемещения предыдущая - + Feed override + Коррекция подачи + - + Feed override - Коррекция подачи - - + Rapid override + Коррекция перемещений + - + Rapid override - Коррекция перемещений - - + Spindle override + Коррекция шпинделя + - + Spindle override - Коррекция шпинделя - - + Feed override Коррекция подачи - + Rapid speed override Коррекция быстрых перемещений - + Spindle speed override Коррекция скорости шпинделя - + + &User + &Пользователь + + + &New &Новый - + &Save &Сохранить - + Save &as... Сохранить &как... - + &About &О программе - + &Clear &Очистить - + Save &transformed as... Сохранить &преобразованный как... - + &Device &Устройство - + &Modification &Модификация - + &Visualizer &Визуализатор - + &Console &Консоль - + Idle Готов - + Alarm Тревога - + Run Работа - - - + + + Home Домой - - + + Hold Пауза - + Queue Пауза - - + + Check Проверка - + Door Дверь - + Unknown Неизвестно - + Send from current line Отправить с текущей строки - + Feed rate: Подача: - + Rapid speed: Холостой ход: - + Spindle speed: Шпиндель: - + &Insert line &Вставить строку - + &Delete lines &Удалить строки - + Don't show again Больше не показывать - + PS: %1 СВ: %1 - + AS: %1 СУ: %1 - + F/S: %1 / %2 П/Ш: %1 / %2 - + Error message(s) received: Ошибка(и) при передаче файла: - + Buffer: %1 / %2 / %3 Буфер: %1 / %2 / %3 - + Following commands will be sent before selected line: Следующие команды будут отправлены перед выбранной строкой: - + Skip Пропустить - - + Command Команда - - + Text Текст - - + Shortcuts Быстрые клавиши - + (%1/%2/%3) - + (%1/%2) - + C Н - + Applying heightmap... Применяется карты высот... - + Subdividing segments... Разбиение отрезков... - + Updating Z-coordinates... Обновление Z-координат... - + Modifying G-code program... Правка G-код программы... @@ -1052,23 +1059,23 @@ %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Файлы G-Code (*.nc *.ncc *.ngc *.tap *.txt);;Все файлы (*.*) - + Opening file... Загрузка файла... - + Updating... Обновление... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Файлы G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1077,7 +1084,7 @@ Файл был изменен. Сохранить? - + Job done. Time elapsed: %1 Задание выполнено. @@ -1092,26 +1099,26 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap *.txt);;Все файлы (*.*) - + Delete lines? Удалить строки? - + Scroll Прокрутка - - + + Restore origin: %1, %2, %3 Восстановить СК: %1, %2, %3 - + File sending in progress. Terminate and exit? Идет процесс отправки файла. Прервать и выйти из программы? @@ -1120,15 +1127,15 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap);;Все файлы (*.*) - - - + + + Heightmap files (*.map) Файлы карт высот (*.map) - - + + Can't open file: Ошибка при открытии файла: @@ -1139,14 +1146,14 @@ Time elapsed: %1 Отправлена - - - + + + (%1) - + Untitled Без имени @@ -1155,7 +1162,7 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap *.txt) - + Changing grid settings will reset probe data. Continue? Изменение сетки зондирования приведет к очистке табличных данных. Продолжить? @@ -1164,22 +1171,22 @@ Time elapsed: %1 Подключен - + G-code program file was changed. Save? Файл G-code программы был изменен. Сохранить? - + Heightmap file was changed. Save? Файл карты высот был изменен. Сохранить? - + Probe Зонд - + Port opened Порт открыт @@ -1188,7 +1195,7 @@ Time elapsed: %1 Обработана - + Serial port error Ошибка последовательного порта @@ -1197,19 +1204,19 @@ Time elapsed: %1 Буфер/очередь: %1 / %2 - - - + + + Save file as Сохранить файл как - - - - - + + + + + Open Открыть @@ -1239,48 +1246,48 @@ Time elapsed: %1 Соединение - + Port: Порт: - + ... - + Baud: Скорость: - - + + 9600 - + 14400 - + 19200 - + 38400 - + 57600 - + 115200 @@ -1293,12 +1300,12 @@ Time elapsed: %1 Единицы измерения приложения: - + Machine information Информация о станке - + Status query period: Период опроса: @@ -1307,37 +1314,37 @@ Time elapsed: %1 Единицы: - + Control Управление - + Probe commands: Команды щупа: - + Safe position commands: Команды безопасного положения: - + "Restore origin" moves tool in: Перемещение по "Восстановить СК" в: - + Plane Плоскости - + Space Пространстве - + Parser Парсер @@ -1346,165 +1353,163 @@ Time elapsed: %1 Точность аппроксимации дуг: - - + + Visualizer Визуализатор - + Line width: Толщина линий: - + Smoothing Сглаживание - + Precision: Точность: - + Sender Отправка файла - + Ignore error responses Игнорировать ошибки при отправке файла - + Automatically set parser state before sending from selected line Автоматически настраивать парсер перед отправкой с выбранной строки - mm - мм + мм - inch - дюйм + дюйм - + Laser power min.: Мощность лазера мин.: - - + + User commands Команды - + Button 1: Кнопка 1: - + Button 2: Кнопка 2: - + Button 3: Кнопка 3: - + Button 4: Кнопка 4: - + Program draw mode: Режим отрисовки: - + Vectors Векторный - + Raster Растр - + By 'Z'-code По 'Z'-коду - + By 'S'-code По 'S'-коду - + Grayscale segments Полутоновое окрашивание - + V-sync V-sync - + Tool model Модель фрезы - + Show UI commands Отображать команды интерфейса пользователя - + Overriding Коррекция - + Colors Цвета - + Normal: Основной: - + Toolpath Траектория - + Drawn: Выполненная: - + Tool: Фреза: - + Highlight: Подсветка: - + Z-movement: Z-перемещения: @@ -1513,22 +1518,22 @@ Time elapsed: %1 (Используется визуализатором и процедурой преобразования файлов в соответствии с картой высот) - + Start point: Начало: - + End point: Конец: - + Background: Фон: - + Arc approximation segment size: Размер сегментов, аппроксимирующих дуги: @@ -1537,7 +1542,7 @@ Time elapsed: %1 по длине (мм) - + by angle (deg.) по углу (градус) @@ -1550,74 +1555,74 @@ Time elapsed: %1 Длина сегмента (мм): - + Text: Текст: - - + + Shortcuts Быстрые клавиши - + Command Команда - + Text Текст - + Font Шрифт - + Size: Размер: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt пт - + (restart needed) (необходим перезапуск) - + Set to defaults По умолчанию @@ -1626,12 +1631,12 @@ Time elapsed: %1 Линии - + MSAA - + Simplify geometry Упростить геометрию @@ -1644,17 +1649,17 @@ Time elapsed: %1 Команды Z-щупа: - - - - - - + + + + + + Command 1; command 2; ... Команда 1; Команда 2; ... - + Heightmap probing feed: Подача при снятии карты высот: @@ -1683,9 +1688,8 @@ Time elapsed: %1 Единицы измерения строки состояния: - Units: - Единицы: + Единицы: Metric @@ -1700,12 +1704,12 @@ Time elapsed: %1 (используется визуализатором и процедурой преобразования файлов в соответствии с картой высот) - + Command auto-completion Автозавершение команды - + Z-buffer Буфер глубины @@ -1718,20 +1722,19 @@ Time elapsed: %1 Период опроса: - + Spindle speed min.: Скорость шпинделя мин.: - - + + max.: макс.: - Acceleration: - Ускорение: + Ускорение: Max.: @@ -1750,22 +1753,22 @@ Time elapsed: %1 Сглаживание линий - + FPS lock: Частота кадров: - + 30 - + 60 - + 120 @@ -1774,32 +1777,32 @@ Time elapsed: %1 Модель фрезы - + Type: Тип: - + Diameter: Диаметр: - + Flat Плоская - + Conic Коническая - + Angle: Угол: - + Length: Длина: @@ -1808,7 +1811,7 @@ Time elapsed: %1 Период опроса состояния: - + Show G-code program commands Отображать команды G-code программы @@ -1821,12 +1824,11 @@ Time elapsed: %1 Безопасная Z: - Rapid speed: - Ускоренная подача: + Ускоренная подача: - + by length по длине @@ -1835,13 +1837,13 @@ Time elapsed: %1 (используется визуализатором и процедурой преобразования файлов в соответствии с картой высот) - + Panels Панели - - + + Heightmap Карта высот @@ -1850,12 +1852,12 @@ Time elapsed: %1 Подача - + Spindle Шпиндель - + Jog Перемещение @@ -1864,7 +1866,7 @@ Time elapsed: %1 Управление с клавиатуры - + Console Консоль @@ -1873,12 +1875,12 @@ Time elapsed: %1 Отображать команды G-code программы в консоли - + OK ОК - + Cancel Отмена diff --git a/src/widgets/dropwidget.cpp b/src/widgets/dropwidget.cpp new file mode 100644 index 00000000..dcdd0c6b --- /dev/null +++ b/src/widgets/dropwidget.cpp @@ -0,0 +1,99 @@ +// This file is a part of "Candle" application. +// Copyright 2015-2016 Hayrullin Denis Ravilevich + +#include +#include +#include +#include +#include +#include +#include "dropwidget.h" +#include "widgetmimedata.h" + +DropWidget::DropWidget(QWidget *parent) : QWidget(parent) +{ +} + +void DropWidget::restoreState(QObject* parent, QStringList panels) +{ + QVBoxLayout *lo = static_cast(layout()); + int i = 0; + + foreach (QString s, panels) { + QGroupBox *b = parent->findChild(s); + if (b) lo->insertWidget(i++, b); + } +} + +QStringList DropWidget::saveState() +{ + QStringList sl; + QVBoxLayout *lo = static_cast(layout()); + + for (int i = 0; i < lo->count(); i++) sl << lo->itemAt(i)->widget()->objectName(); + + return sl; +} + +void DropWidget::dragEnterEvent(QDragEnterEvent *dee) +{ + if (dee->mimeData()->hasFormat(WidgetMimeData::mimeType())) { + m_layoutIndex = -2; + dee->acceptProposedAction(); + + } + + QWidget::dragEnterEvent(dee); +} + +void DropWidget::dragLeaveEvent(QDragLeaveEvent *dle) +{ + QFrame *f = findChild(QString(), Qt::FindDirectChildrenOnly); + if (f) f->setVisible(false); + // m_layoutIndex = -2; + + QWidget::dragLeaveEvent(dle); +} + +void DropWidget::dragMoveEvent(QDragMoveEvent *dme) +{ + if (dme->mimeData()->hasFormat(WidgetMimeData::mimeType())) { + + QFrame *f = findChild(QString(), Qt::FindDirectChildrenOnly); + + if (f) { + int y = dme->pos().y(); + QList bl = findChildren(QString(), Qt::FindDirectChildrenOnly); + + QList yl; + foreach (QGroupBox* b, bl) yl << b->pos().y(); + qSort(yl.begin(), yl.end()); + + int i = 0; + while (y >= yl.at(i) && i < yl.count()) i++; + + if (i != m_layoutIndex) { + static_cast(layout())->insertWidget(i - 1, f); + if (!f->isVisible()) f->setVisible(true); + f->update(); + } + m_layoutIndex = i; + } + } + + QWidget::dragMoveEvent(dme); +} + +void DropWidget::dropEvent(QDropEvent *de) +{ + if (de->mimeData()->hasFormat(WidgetMimeData::mimeType())) { + QFrame *f = findChild(QString(), Qt::FindDirectChildrenOnly); + if (f) { + const WidgetMimeData *md = static_cast(de->mimeData()); + f->setVisible(false); + f->update(); + static_cast(layout())->insertWidget(m_layoutIndex - 1, md->widget()); + md->widget()->update(); + } + } +} \ No newline at end of file diff --git a/src/widgets/dropwidget.h b/src/widgets/dropwidget.h new file mode 100644 index 00000000..5b8ed142 --- /dev/null +++ b/src/widgets/dropwidget.h @@ -0,0 +1,28 @@ +// This file is a part of "Candle" application. +// Copyright 2015-2016 Hayrullin Denis Ravilevich + +#ifndef DROPWIDGET_H +#define DROPWIDGET_H + +#include + +class DropWidget : public QWidget +{ + Q_OBJECT +public: + explicit DropWidget(QWidget *parent = 0); + + void restoreState(QObject* parent, QStringList panels); + QStringList saveState(); + +protected: + void dragEnterEvent(QDragEnterEvent *dee); + void dragLeaveEvent(QDragLeaveEvent *dle); + void dragMoveEvent(QDragMoveEvent *dme); + void dropEvent(QDropEvent *de); + +private: + int m_layoutIndex; +}; + +#endif // WIDGET_H diff --git a/src/widgets/widgetmimedata.h b/src/widgets/widgetmimedata.h new file mode 100644 index 00000000..d417c652 --- /dev/null +++ b/src/widgets/widgetmimedata.h @@ -0,0 +1,34 @@ +#ifndef WIDGETMIMEDATA_H +#define WIDGETMIMEDATA_H + +#include +#include + +class WidgetMimeData: public QMimeData +{ +public: + WidgetMimeData(): QMimeData() + { + } + + static QString mimeType() + { + return "application/widget"; + } + + void setWidget(QWidget *widget) + { + setData(WidgetMimeData::mimeType(), QByteArray()); + m_widget = widget; + } + + QWidget *widget() const + { + return m_widget; + } + +private: + QWidget* m_widget; +}; + +#endif \ No newline at end of file From a1b53dd735bbf40b218c36aa95e626c0dc28316d Mon Sep 17 00:00:00 2001 From: Denvi Date: Thu, 7 Nov 2019 11:57:57 +0500 Subject: [PATCH 20/80] Windows, panels lock option added. --- src/frmmain.cpp | 22 +- src/frmmain.h | 2 + src/frmmain.ui | 23 +- src/translations/candle_en.ts | 496 +++++++++++++++++---------------- src/translations/candle_es.ts | 496 +++++++++++++++++---------------- src/translations/candle_fr.ts | 496 +++++++++++++++++---------------- src/translations/candle_pt.ts | 496 +++++++++++++++++---------------- src/translations/candle_ru.qm | Bin 22376 -> 22694 bytes src/translations/candle_ru.ts | 502 +++++++++++++++++----------------- 9 files changed, 1310 insertions(+), 1223 deletions(-) diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 55e196d4..4898ab4a 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -544,6 +544,10 @@ void frmMain::loadSettings() // Apply settings applySettings(); + // Menu + ui->actViewLockWindows->setChecked(set.value("lockWindows").toBool()); + ui->actViewLockPanels->setChecked(set.value("lockPanels").toBool()); + // Restore panels state ui->grpUserCommands->setChecked(set.value("userCommandsPanel", true).toBool()); ui->grpHeightMap->setChecked(set.value("heightmapPanel", true).toBool()); @@ -613,8 +617,6 @@ void frmMain::loadSettings() if (a) a->setShortcuts(m.values().at(i)); } - // TODO: ... - m_settingsLoading = false; } @@ -748,6 +750,10 @@ void frmMain::saveSettings() set.setValue("panelsDevice", QVariant::fromValue(ui->scrollContentsDevice->saveState())); set.setValue("panelsModification", QVariant::fromValue(ui->scrollContentsModification->saveState())); set.setValue("panelsUser", QVariant::fromValue(ui->scrollContentsUser->saveState())); + + // Menu + set.setValue("lockWindows", ui->actViewLockWindows->isChecked()); + set.setValue("lockPanels", ui->actViewLockPanels->isChecked()); } bool frmMain::saveChanges(bool heightMapMode) @@ -2994,7 +3000,8 @@ bool frmMain::eventFilter(QObject *obj, QEvent *event) ui->glwVisualizer->setUpdatesEnabled(!isMinimized() && ui->dockVisualizer->isVisible()); } - if (obj->inherits("QGroupBox") && (obj->parent()->objectName() == "scrollContentsDevice" + if (!ui->actViewLockPanels->isChecked() && obj->inherits("QGroupBox") + && (obj->parent()->objectName() == "scrollContentsDevice" || obj->parent()->objectName() == "scrollContentsModification" || obj->parent()->objectName() == "scrollContentsUser") && obj->objectName().startsWith("grp")) { @@ -4146,4 +4153,13 @@ void frmMain::on_actOverrideSpindleMinus_triggered() void frmMain::on_dockVisualizer_visibilityChanged(bool visible) { ui->glwVisualizer->setUpdatesEnabled(visible); +} + +void frmMain::on_actViewLockWindows_toggled(bool checked) +{ + QList dl = findChildren(); + + foreach (QDockWidget *d, dl) { + d->setFeatures(checked ? QDockWidget::NoDockWidgetFeatures : QDockWidget::AllDockWidgetFeatures); + } } \ No newline at end of file diff --git a/src/frmmain.h b/src/frmmain.h index 571297d4..996bcf8d 100644 --- a/src/frmmain.h +++ b/src/frmmain.h @@ -203,6 +203,8 @@ private slots: void on_dockVisualizer_visibilityChanged(bool visible); + void on_actViewLockWindows_toggled(bool checked); + protected: void showEvent(QShowEvent *se); void hideEvent(QHideEvent *he); diff --git a/src/frmmain.ui b/src/frmmain.ui index 50b34d4f..1afdc66d 100644 --- a/src/frmmain.ui +++ b/src/frmmain.ui @@ -423,6 +423,9 @@ QLabel[overrided="false"] { + + + @@ -2834,8 +2837,8 @@ padding-right: 8; - 0 - 0 + 105 + 160 @@ -3307,6 +3310,22 @@ padding-right: 8; &User + + + true + + + &Lock windows + + + + + true + + + L&ock panels + + diff --git a/src/translations/candle_en.ts b/src/translations/candle_en.ts index c21cf633..d10f7951 100644 --- a/src/translations/candle_en.ts +++ b/src/translations/candle_en.ts @@ -118,54 +118,54 @@ - + Check - + Scroll - - - - - + + + + + Open - - - + + + Reset - - + + Send - + Pause - - - - + + + + Abort @@ -200,600 +200,610 @@ - + Modification - - - + + + Overriding - - + + Heightmap - - + + Use heightmap - + Absent - + Map: - - + + Create - - + + Edit - + Border: - - - + + + X: - + H: - - - + + + Y: - + W: - - + + Show border - + Auto - + Probe grid: - + Zb: - + Zt: - - + + Show probe grid - + Interpolation grid: - + Type: - + Bicubic - - + + Show interpolation grid - + Device - + State - + Work coordinates: - + Machine coordinates: - + Status: - + Control - - + + Zero XY - + User - + User command 1 - + User command 2 - + User command 3 - + User command 4 - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override - + &User - - - - - - - - - + + &Lock windows + + + + + L&ock panels + + + + + + + + + + + + ... - - + + Z-probe - - + + Home - - + + Restore origin - - + + Zero Z - - + + Safe position - - + + Unlock - + User commands - - - - - - + + + + + + Spindle on/off - - - - - - + + + + + + Spindle - + - - + + Jog - - + + X- - - + + Y- - - + + X+ - - + + Y+ - - + + Z+ - - + + Z- - - + + Stop - + Continuously - + 0.01 - + 0.1 - + 1 - + 5 - - + + 10 - - + + 100 - + Step: - + Feed: - + 50 - + 500 - + 1000 - + 2000 - - + + Keyboard control - + Visualizer - - + + Fit - - + + Top view - - + + Isometric view - - + + Front view - - + + Left view - + Console - + Send command - - + + Clear console - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open - + E&xit - + &Settings - + &New - + &Save - + Save &as... - + &About - + &Clear - + Save &transformed as... - + &Device - + &Modification - + &Visualizer - + &Console @@ -875,205 +885,205 @@ - + Restore origin: %1, %2, %3 - + G-code program file was changed. Save? - + Heightmap file was changed. Save? - + Not connected - + G-code program - + Probe - + Port opened - + Job done. Time elapsed: %1 - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Serial port error - + Buffer: %1 / %2 / %3 - + File sending in progress. Terminate and exit? - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) - - - + + + Heightmap files (*.map) - + Opening file... - - + + Can't open file: - + Following commands will be sent before selected line: - + Skip - - - + + + (%1) - + Delete lines? - + Command - + Text - + Shortcuts - + Updating... - + Untitled - - - + + + Save file as - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) - + (%1/%2/%3) - + (%1/%2) - + C - + Changing grid settings will reset probe data. Continue? - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1497,78 +1507,78 @@ Time elapsed: %1 - + Shortcuts - + Command - + Text - + Font - + Size: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt - + (restart needed) - + Set to defaults - + OK - + Cancel diff --git a/src/translations/candle_es.ts b/src/translations/candle_es.ts index b91b68df..0f18cebb 100644 --- a/src/translations/candle_es.ts +++ b/src/translations/candle_es.ts @@ -115,37 +115,37 @@ GRBL Control - + G-code program Programa de G-Code - - + + Isometric view Vista isometrica - - + + Top view Vista superior - - + + Front view Vista Frontal - - + + Left view Vista izquierda - - + + Fit Ajustar vista @@ -154,57 +154,57 @@ Ajuste de alturas - + Border: Bordes: - - - + + + X: X: - + H: - - - + + + Y: Y: - + W: - - + + Show border Mostrar borde - + Auto - + Probe grid: Grilla de medición: - + Zb: Zн: - + Zt: Zв: @@ -213,17 +213,17 @@ Mostrar grilla - + Interpolation grid: Grilla de interpolación: - + Type: Tipo: - + Bicubic Bicubico @@ -241,51 +241,51 @@ - - - - - + + + + + Open Abrir - - - + + + Reset Reiniciar - - + + Send Enviar - + Pause Pausar - - - - + + + + Abort Abandono - + State Estado - + Work coordinates: Coordenadas de trabajo: @@ -294,62 +294,62 @@ 0 - + Machine coordinates: Coordenadas de máquina: - + Status: Estado: - + Control Control - - + + Home Origen - - - - - - - - - + + + + + + + + + ... ... - - + + Z-probe Medicion de Z - - + + Zero XY Cero XY - - + + Zero Z Cero Z - - - + + + Overriding @@ -367,48 +367,48 @@ - - + + Restore origin Restaure el origen - - + + Safe position Posición segura - - + + Unlock Desbloquear - - + + Heightmap Mapa de alturas - - + + Use heightmap Usar mapa de alturas - + Map: Mapa: - + Absent Ausente - - + + Create Crear @@ -417,12 +417,12 @@ Modo edición - - - - - - + + + + + + Spindle Husillo @@ -432,12 +432,12 @@ Velocidad: - - - - - - + + + + + + Spindle on/off Husillo on/off @@ -454,51 +454,51 @@ % - + - - + + Jog Control manual - - + + X- - - + + Y- - - + + X+ - - + + Y+ - + Step: Pasos: - - + + Z+ - - + + Z- @@ -507,7 +507,7 @@ Presets: - + User commands @@ -524,29 +524,29 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 @@ -566,226 +566,236 @@ - + Modification - - + + Edit - - + + Show probe grid - - + + Show interpolation grid - + Device - - + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - - + + Keyboard control Control desde teclado - + Visualizer Visualizador - + Console Consola - + Send command Enviar comando - - + + Clear console Limpiar cosola - + User - + &Device - + &Modification - + &Visualizer - + &Console - + User command 1 - + User command 2 - + User command 3 - + User command 4 - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override - + &User + + + &Lock windows + + + + + L&ock panels + + &File @@ -807,62 +817,62 @@ &Ayuda - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Abrir - + E&xit S&alir - + &Settings &Opciones - + &New &Nuevo - + &Save &Guardar - + Save &as... Guardar &como... - + &About &Acerca de - + &Clear &Limpiar - + Save &transformed as... Salve &transformado como... @@ -894,7 +904,7 @@ - + Check Chequeo @@ -945,89 +955,89 @@ - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - + Command Comando - + Text - + Shortcuts - + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1038,38 +1048,38 @@ %1, %2, %3 - + G-code program file was changed. Save? El programa de G-code ha cambiado. Desea guardar? - + Heightmap file was changed. Save? El programa mapa de alturas ha cambiado. Desea guardar? - + Not connected Sin Conexión - + Probe Medición - + Opening file... - + Updating... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Archivos de G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1078,7 +1088,7 @@ Conectado - + Job done. Time elapsed: %1 Trabajo terminado. @@ -1089,18 +1099,18 @@ Tiempo transcurrido: %1 Procesado - + Serial port error Error en puerto serie - + Scroll Desplazamiento - + File sending in progress. Terminate and exit? Envio de archivo en progreso. Detener y salir? @@ -1117,33 +1127,33 @@ Tiempo transcurrido: %1 Archivos de G-Code (*.nc *.ncc *.tap *.txt) - - - + + + Heightmap files (*.map) Mapa de alturas (*.map) - + Port opened Puerto se abrió - + Restore origin: %1, %2, %3 Restaure origen: %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Archivos de G-Code (*.nc *.ncc *.ngc *.tap *.txt);;Todos los archivos (*.*) - - + + Can't open file: No se puede abrir el archivo: @@ -1158,26 +1168,26 @@ Tiempo transcurrido: %1 Enviado - + Delete lines? Borrar lineas? - - - + + + (%1) - + Untitled Sin-título - - - + + + Save file as Guardar archivo como @@ -1186,7 +1196,7 @@ Tiempo transcurrido: %1 Archivos de G-Code (*.nc;*.ncc;*.tap) - + Changing grid settings will reset probe data. Continue? El cambio de configuraciones de grilla reiniciará los datos de medición. Desea continuar? @@ -1674,78 +1684,78 @@ Tiempo transcurrido: %1 - + Shortcuts - + Command Comando - + Text - + Font Fuente - + Size: Tamaño: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt Puntos - + (restart needed) (Se requiere reinicio) - + Set to defaults Opciones por defecto - + OK ОК - + Cancel Cancelar diff --git a/src/translations/candle_fr.ts b/src/translations/candle_fr.ts index d55ee8b3..d1cb8ecc 100644 --- a/src/translations/candle_fr.ts +++ b/src/translations/candle_fr.ts @@ -115,37 +115,37 @@ grblControl - + G-code program Programme G-Code - - + + Isometric view Vue isometrique - - + + Top view Vue de dessus - - + + Front view Vue de Face - - + + Left view Vue de gauche - - + + Fit Ajuster vue @@ -154,57 +154,57 @@ Paramètres palpage surfacique - + Border: Bords: - - - + + + X: X: - + H: - - - + + + Y: Y: - + W: - - + + Show border Montrer bord - + Auto - + Probe grid: Grille de palpage: - + Zb: Zb: - + Zt: Zt: @@ -213,17 +213,17 @@ Montrer grille - + Interpolation grid: Espacement grille: - + Type: Type: - + Bicubic Bicubique @@ -241,51 +241,51 @@ - - - - - + + + + + Open Ouvrir - - - + + + Reset Reinitialiser - - + + Send Envoyer - + Pause Pause - - - - + + + + Abort Abandon - + State Etât - + Work coordinates: Coordonnées de travail: @@ -294,62 +294,62 @@ 0 - + Machine coordinates: Coordonnées machine: - + Status: Etât: - + Control Contrôle - - + + Home Origine - - - - - - - - - + + + + + + + + + ... ... - - + + Z-probe Palper Z - - + + Zero XY Zero XY - - + + Zero Z Zero Z - - - + + + Overriding @@ -367,48 +367,48 @@ - - + + Restore origin Restituez l'origine - - + + Safe position Position sûre - - + + Unlock Desbloquer - - + + Heightmap Palpage surfacique - - + + Use heightmap Utiliser palpage surfacique - + Map: Fichier: - + Absent Absent - - + + Create Créer @@ -417,12 +417,12 @@ Paramètres de palpage - - - - - - + + + + + + Spindle Broche @@ -432,12 +432,12 @@ Vitesse: - - - - - - + + + + + + Spindle on/off Broche on/off @@ -454,51 +454,51 @@ % - + - - + + Jog Contrôle manuel - - + + X- - - + + Y- - - + + X+ - - + + Y+ - + Step: Pas: - - + + Z+ - - + + Z- @@ -507,7 +507,7 @@ Pre-selection: - + User commands @@ -524,29 +524,29 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 @@ -566,226 +566,236 @@ - + Modification - - + + Edit - - + + Show probe grid - - + + Show interpolation grid - + Device - - + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - - + + Keyboard control Contrôle avec le clavier - + Visualizer Apparence - + Console Console - + Send command Envoyer commande - - + + Clear console Effacer consôle - + User - + &Device - + &Modification - + &Visualizer - + &Console - + User command 1 - + User command 2 - + User command 3 - + User command 4 - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override - + &User + + + &Lock windows + + + + + L&ock panels + + &File @@ -807,62 +817,62 @@ &Aide - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Ouvrir - + E&xit Q&uitter - + &Settings &Reglages - + &New &Nouveau - + &Save &Enregistrer - + Save &as... Enregistrer &sous... - + &About &A propos de - + &Clear &Effacer - + Save &transformed as... Sauvez &transformé comme... @@ -894,7 +904,7 @@ - + Check Vérifié @@ -945,74 +955,74 @@ - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - + Command Comande - + Text - + Shortcuts - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1023,22 +1033,22 @@ %1, %2, %3 - + G-code program file was changed. Save? Le programme G-code à changé. Sauvegarder? - + Heightmap file was changed. Save? Le fichier surface de palpage a changé. Sauvegarder? - + Not connected Non connecté - + Probe Palper @@ -1047,7 +1057,7 @@ Connecté - + Job done. Time elapsed: %1 Travail terminé. @@ -1058,18 +1068,18 @@ Temps écoulé: %1 Traité - + Serial port error Erreur port serie - + Scroll Déplacement - + File sending in progress. Terminate and exit? Envoi de fichier en cours. Terminer et Sortir? @@ -1078,38 +1088,38 @@ Temps écoulé: %1 Envoyé - - - + + + Heightmap files (*.map) Fichier de palpage (*.map) - + Restore origin: %1, %2, %3 Restituez l'origine: %1, %2, %3 - + Port opened Le port s'est ouvert - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) G-Code fichiers (*.nc *.ncc *.ngc *.tap *.txt);;Tous les fichiers (*.*) - + Opening file... - - + + Can't open file: Impossible d'ouvrir du fichier: @@ -1124,57 +1134,57 @@ Temps écoulé: %1 Envoyé - + Delete lines? Effacer ligne? - - - + + + (%1) - + Updating... - + Untitled Sans titre - - - + + + Save file as Enregistrer le fichier sous - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) G-Code fichiers (*.nc *.ncc *.ngc *.tap *.txt) - + (%1/%2/%3) - + (%1/%2) - + C - + Changing grid settings will reset probe data. Continue? Changer les paramètres de la grille, réinitialise les données de palpage. Continuer? @@ -1658,78 +1668,78 @@ Temps écoulé: %1 - + Shortcuts - + Command Comande - + Text - + Font Ecriture - + Size: Taille: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt Points - + (restart needed) (Redémarrage nécessaire) - + Set to defaults Paramètres par default - + OK ОК - + Cancel Annuler diff --git a/src/translations/candle_pt.ts b/src/translations/candle_pt.ts index 49db06d9..409f5348 100644 --- a/src/translations/candle_pt.ts +++ b/src/translations/candle_pt.ts @@ -115,37 +115,37 @@ Controle GRBL - + G-code program Programa de G-Code - - + + Isometric view Vista isométrica - - + + Top view Vista Superior - - + + Front view Vista Frontal - - + + Left view Vista Esquerda - - + + Fit Ajustar vista @@ -154,57 +154,57 @@ Ajuste de alturas - + Border: Bordas: - - - + + + X: X: - + H: H: - - - + + + Y: Y: - + W: W: - - + + Show border Mostrar borda - + Auto - + Probe grid: Grade de medição: - + Zb: Zн: - + Zt: Zв: @@ -213,17 +213,17 @@ Mostrar grade - + Interpolation grid: Grade de interpolação: - + Type: Tipo: - + Bicubic Bicúbico @@ -241,51 +241,51 @@ - - - - - + + + + + Open Abrir - - - + + + Reset Reiniciar - - + + Send Enviar - + Pause Pausar - - - - + + + + Abort Abortar - + State Estado - + Work coordinates: Coordenadas de trabalho: @@ -294,62 +294,62 @@ 0 - + Machine coordinates: Coordenadas da máquina: - + Status: Estado: - + Control Controle - - + + Home Origem - - - - - - - - - + + + + + + + + + ... ... - - + + Z-probe Medição de Z - - + + Zero XY Zero XY - - + + Zero Z Zero Z - - - + + + Overriding @@ -367,48 +367,48 @@ - - + + Restore origin Restaure a origem - - + + Safe position Posição segura - - + + Unlock Desbloquear - - + + Heightmap Mapa de alturas - - + + Use heightmap Usar mapa de alturas - + Map: Mapa: - + Absent Ausente - - + + Create Criar @@ -417,12 +417,12 @@ Modo edição - - - - - - + + + + + + Spindle Spindle @@ -432,12 +432,12 @@ Velocidade: - - - - - - + + + + + + Spindle on/off Spindle on/off @@ -454,51 +454,51 @@ % - + - - + + Jog Controle manual - - + + X- - - + + Y- - - + + X+ - - + + Y+ - + Step: Passos: - - + + Z+ - - + + Z- @@ -507,7 +507,7 @@ Presets: - + User commands @@ -524,29 +524,29 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 @@ -566,226 +566,236 @@ - + Modification - - + + Edit - - + + Show probe grid - - + + Show interpolation grid - + Device - - + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - - + + Keyboard control Controle por teclado - + Visualizer Visualizador - + Console Console - + Send command Enviar comando - - + + Clear console Limpar cosole - + User - + &Device - + &Modification - + &Visualizer - + &Console - + User command 1 - + User command 2 - + User command 3 - + User command 4 - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override - + &User + + + &Lock windows + + + + + L&ock panels + + &File @@ -807,62 +817,62 @@ &Ajuda - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Abrir - + E&xit S&air - + &Settings &Opções - + &New &Novo - + &Save &Salvar - + Save &as... Salvar &como... - + &About &Sobre - + &Clear &Limpar - + Save &transformed as... Salvar &transformado como... @@ -894,7 +904,7 @@ - + Check Checar @@ -945,89 +955,89 @@ - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - + Command Comando - + Text - + Shortcuts - + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1038,38 +1048,38 @@ %1, %2, %3 - + G-code program file was changed. Save? O programa G-code foi alterado. Deseja salvar? - + Heightmap file was changed. Save? O arquivo mapa de alturas foi alterado. Deseja salvar? - + Not connected Sem Conexão - + Probe Medição - + Opening file... - + Updating... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Arquivos G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1078,7 +1088,7 @@ Conectado - + Job done. Time elapsed: %1 Trabalho terminado. @@ -1089,18 +1099,18 @@ Tempo transcorrido: %1 Processado - + Serial port error Erro na porta serial - + Scroll Rolagem - + File sending in progress. Terminate and exit? Envio de arquivo en progreso. Terminar e sair? @@ -1117,33 +1127,33 @@ Tempo transcorrido: %1 Arquivos G-Code (*.nc *.ncc *.tap *.txt) - - - + + + Heightmap files (*.map) Mapa de alturas (*.map) - + Port opened Porta aberta - + Restore origin: %1, %2, %3 Restaure origem: %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Arquivos G-Code (*.nc *.ncc *.tap *.txt);;Todos os arquivos (*.*) - - + + Can't open file: Não foi possível abrir o arquivo: @@ -1158,26 +1168,26 @@ Tempo transcorrido: %1 Enviado - + Delete lines? Apagar linhas? - - - + + + (%1) - + Untitled Sem-título - - - + + + Save file as Salvar arquivo como @@ -1186,7 +1196,7 @@ Tempo transcorrido: %1 Arquivos G-Code (*.nc;*.ncc;*.tap) - + Changing grid settings will reset probe data. Continue? A alteração nas configurações de grade reiniciará os dados de medição. Deseja continuar? @@ -1674,78 +1684,78 @@ Tempo transcorrido: %1 - + Shortcuts - + Command Comando - + Text - + Font Fonte - + Size: Tamanho: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt - + (restart needed) (Requer reinicio) - + Set to defaults Opções padrão - + OK ОК - + Cancel Cancelar diff --git a/src/translations/candle_ru.qm b/src/translations/candle_ru.qm index b2100cae97171bc93cfc7cc7916999239333e3a7..8c8a5ec852470346be33324cce3bb495792d528e 100644 GIT binary patch delta 2587 zcmZ{mc~q3=6~>>LdA}Lvn{NhX5hSQAvcv%$lx)z5)@PiY{#VYx?_2MC?{lB~GVS|R zI}WI9aSi#N=bmg{cfr@YX=2S+t;vAi6M#Q|?LT3F=>sx?{FRIbtU08WpO45vK-VHb zGm!V^I~aADOah{wk&G7|M@}TaB^LqC?qnt3j{5%BH>NU>aasDmlR|F%~~>8TBPFpexT4VMDlu z2OAk=7&Bz0(L8q^0Avfmlh=oj1$wC*Ox_3NoCJcV0~2$(z&2nKRfr6S`q0;a;XX8B zcEx%@Gsqsd0h*C^UWcZIv~Gf^_$RXnf>_BUy8OWgaU>6L&wx121>I{PE`JORTmbRI zC~_aU3Q!-0_@y_{V+P4q^jHt^B7i&vDQGymZ~~Ggm4UBAijDz%pF^6$ME#ABHm3mZ z29S)WS^{Z1A2WYVVJ8CpY@v|$vQPaEI+%G4Qp;(|bRT|o?6JNWeZJ#D@?rGpUA|ej`99KDP}11XFy!GTz@-xz`TqeDYLIoD*FE-NOn?`Vd=Fz*u49Fd zF*cZ$r$%FJ5$~tY!q|07f!<>_68rv0` zwr@TTE~3-?W6|P%j2>ym)3X_zk_wgSCl=DxRpse_9`I>Y`BYhLfa?#cyH3?W(tLG~ zWsQX^!0)ZLounlMULXNuN-`#+aJoTqdxisBH^_oWu>7{$>opvep zRqEa5Kav;JXCFMECz92-SMvSLY<2sx_nGhway%6b)}$=8x1^gUz12n&gjH&CzTrr{ zvqZDPmG1O)(`;&S;RJMQwsd^JQ7YCn=q^&3(ZZvFmBuU-f!D8aDn1h-an1~QQ&=*; z;QLlF<@92H* zr#HahS}9zW2J}pn#@G|_KP64>wiD=HDHUc708*|>g&S$sRIOAL#a5+QC0mJ0BgZU4 zs@TmNgXc(9^^`g}L|VIl5EaOls@I1A!B3^l8N8qNxwQFpZ;p{7{pIt~9IF~>huxIs z7t;QNtW14P+JCf^UO6Z=N6@^MQt3fd0T9}7(|Wh_ zpvMDk(77^7{G&FufjzafYbXDn+i=z{?X)90y49*(kQ76y%e0^7)idEAwbjp=V4o5P z)AO|d$mDfHj`rc874%RD$!QAsMEhjH2tId2Cth!*lE3Ief*AL`%et^fS2-oN?mDYi zr~N>eYUxSSP0)RqLhPRp|=a9oW}51*FMv~Qd`8<O%_W&|=pK2Xj~h)IDd$HEWPM)=tiUT8Lp3;oDQ4P_=LSyo+-ywWO}gTaQh3T!;fC-;;Fn*dC_cfM!(s^XhNN_ zpKD)ws?8YJMkRtR#x&cy?>Pn~#;IHAe%~oZ+e~_3h}pO(l0ED7+IUF0LWS-aZ?)6y za)hz1xHrdctnuDLKBo*eKK_KJb1OHALnEo+WmDJY8~oxi(v&*9oO6HPlzx?pxwo3e zU*ZlJvXA5r7%EI<9UYvmNK;C4H0Lw)rRmnKX_PqMbm!bC&hr#!vxO2TJ$4@1OsRag zINyH7Ez>*6!K66nmp52p(0YFL8Jbrw>&F`s0ud-Yghix?Xb~fl_;;X45dC>2S!BV7 z$1x&aSe)oZX!&al%$hZMx=&fr%=}qpB~_I!?)B5%3f+_X2oFa3|8Wv|FJ455SP}id zSV~r)J=W|=GYe*vR4op3t^fYr$8J?mJdBEALdon&lM9No3Z|4+-SK$GsQh+eMA6j3 Tw^t1EZ&yamnq7Z5q2BYqMCOjc delta 2359 zcmXAr3sh9+6@~ZA+&jbExif$QA^}C-VR$O?mViJ&9*M7_qDBH@#AsFkE0Sd$l4wMr zs6||e#I!a7DoI3;03sv-Y{6Qr+NfCtjloKl1oE)WLK3^jVZr+D-231EKWCqP4pZN( z82eaZif-TNI5<&PePy0=Pu8C<4lf3*CIPtf&-@b%7_7;KLMZ))S$IRJ_yn*CFhOX`2JD_dxWEJLmqWO=2Y6uP4xwO-2ROu`u-u70d5oPMJP5ToA)f~P zdvUIWW^=2>fPDwO;eqe_QrIOC3d21nV$-K^bpIRR`ntlkD#8TJ+@~0|ss&8!JbJ@=?!_$i^%O=L;`CDbh8jEMFUYD}q~l%`Io53S;j z)k0(YNh&fWG!3yvcKJekB{PUQBXmoYbWxu$tT3BzjqtSlD`u82&Og8wOgtclD3aI> zlVXNB5cj!ajza@5J5Jo3wtzFLTikqO=A82zHn6I<-pu9TV_T%ZD;qy7g-3G1BFjN$ovY#22E} zQSGc{P?9=lnyW%1#wU2s#b_*lEq^^C;0H42RVN#m9Y^v5X=Av+wtLmWnVuF#mrA+y zlzwK0g)vGgw{b5AmqN7N$;1!wM!auS6#lb7CeR)y*EBqGud*Tkd9a zA}-byfBh9p`K7MZ{CPp3g=r^rZ7F5!|HyV;)RI4v%seW9>?HGay$9)fF9+StB4(ho z)%|2V#L-+r{(&4Js~AW$d6=x#{nAxNGwWq(bv_l{AurEhz{)TS1MB3i%?!}VN#6dL z`^@o^8?sFHlsH{(*nNV7K_Pdx_0s)$a_0nVE1#4vD9EH4vc=8!<#9Kf#(F@0s&JyI zy!38wE~Oba=>um5&^v?r=(|+H`+z>F`k(yocuoJ>`!u&}zuxo)Yo2VcF9~JI=6<4Y zm9JBw%lZ-17~L!_)ZZ;&d-=5KAMEBr-T(C8y+@PT`5J`Q6_oH@gKht9exX=oNL*IT zzW$vd`34oUuQaS5;$-vFlbmdRIfkO~adwZZp+B4+@Ly{f8QDT*Uow0>xRPDbZ*2^s z!m+okSM*aU*J*3#JHK!gKKFz5Gsb#ZPv2&SUXSzmts$*tzIMH?WyEf)eM_D1q+N?5 I_N3$g0a frmMain - + G-code program G-code программа - - + + Isometric view Изометрия - - + + Top view Вид сверху - - + + Front view Вид спереди - - + + Left view Вид слева - - + + Fit Вписать @@ -178,57 +178,57 @@ Настройки карты высот - + Border: Границы: - - - + + + X: - + H: В: - + W: Ш: - - - + + + Y: - + Auto Авто - - + + Show border Показать границы - + Probe grid: Сетка зондирования: - + Zb: Zн: - + Zt: Zв: @@ -237,17 +237,17 @@ Показать сетку - + Interpolation grid: Сетка интерполяции: - + Type: Тип: - + Bicubic Бикубический @@ -264,12 +264,12 @@ Автопрокрутка - + State Состояние - + Control Управление @@ -287,14 +287,14 @@ &Недавние файлы - + &Open &Открыть - - + + Send Отправить @@ -308,48 +308,48 @@ - - - + + + Reset Сброс - + Pause Пауза - + Work coordinates: Рабочие координаты: - + Machine coordinates: Машинные координаты: - + Status: Статус: - + Not connected Нет соединения - - - - - - - - - + + + + + + + + + ... @@ -358,14 +358,14 @@ Поиск стола - - + + Zero XY Обнулить XY - - + + Zero Z Обнулить Z @@ -374,8 +374,8 @@ Вернуться в XY(Z) - - + + Z-probe Z-щуп @@ -384,36 +384,36 @@ Безопасная Z - - + + Unlock Разблокировать - - + + Heightmap Карта высот - - + + Use heightmap Использовать карту высот - + Map: Карта: - + Absent Отсутствует - - + + Create Создать @@ -422,12 +422,12 @@ Редактирование - - - - - - + + + + + + Spindle Шпиндель @@ -437,12 +437,12 @@ Скорость: - - - - - - + + + + + + Spindle on/off Вкл/выкл шпиндель @@ -455,21 +455,21 @@ Переопределить: - + - - + + Jog Перемещение - + Step: Шаг: - - + + X- @@ -480,59 +480,59 @@ - - - - + + + + Abort Прервать - - + + Restore origin Восстановить СК - - + + Safe position Безопасное положение - - - + + + Overriding Коррекция - - + + Y- - - + + X+ - - + + Y+ - - + + Z+ - - + + Z- @@ -541,97 +541,97 @@ Уставки: - + User commands Команды - - + + Stop Стоп - + Continuously Непрерывно - + 0.01 - + 0.1 - + 1 - + 5 - - + + 10 - - + + 100 - + Feed: Подача: - + 500 - + 50 - + 1000 - + 2000 - - + + Keyboard control Управление с клавиатуры - + Console Консоль - + Send command Отправить команду - - + + Clear console Очистить консоль @@ -666,215 +666,225 @@ &Окна - + Modification Модификация - - + + Edit Редактирование - - + + Show probe grid Показать сетку зондирования - - + + Show interpolation grid Показать сетку интерполяции - + Device Устройство - + Visualizer Визуализатор - + _spacerTop - + - + _spacerLeft - + - + _spacerRight - + - + User Пользователь - + E&xit Вы&ход - + &Settings &Настройки - + User command 1 Пользовательская команда 1 - + User command 2 Пользовательская команда 2 - + User command 3 Пользовательская команда 3 - + User command 4 Пользовательская команда 4 - + Spindle speed + Скорость шпинделя + - + Spindle speed - Скорость шпинделя - - + Jog step next Шаг перемещения следующий - + Jog step previous Шаг перемещения предыдущий - + Jog feed next Подача перемещения следующая - + Jog feed previous Подача перемещения предыдущая - + Feed override + Коррекция подачи + - + Feed override - Коррекция подачи - - + Rapid override + Коррекция перемещений + - + Rapid override - Коррекция перемещений - - + Spindle override + Коррекция шпинделя + - + Spindle override - Коррекция шпинделя - - + Feed override Коррекция подачи - + Rapid speed override Коррекция быстрых перемещений - + Spindle speed override Коррекция скорости шпинделя - + &User &Пользователь - + + &Lock windows + &Зафиксировать окна + + + + L&ock panels + З&афиксировать панели + + + &New &Новый - + &Save &Сохранить - + Save &as... Сохранить &как... - + &About &О программе - + &Clear &Очистить - + Save &transformed as... Сохранить &преобразованный как... - + &Device &Устройство - + &Modification &Модификация - + &Visualizer &Визуализатор - + &Console &Консоль @@ -894,8 +904,8 @@ Работа - - + + Home Домой @@ -913,7 +923,7 @@ - + Check Проверка @@ -964,91 +974,91 @@ Больше не показывать - + PS: %1 СВ: %1 - + AS: %1 СУ: %1 - + F/S: %1 / %2 П/Ш: %1 / %2 - + Error message(s) received: Ошибка(и) при передаче файла: - + Buffer: %1 / %2 / %3 Буфер: %1 / %2 / %3 - + Following commands will be sent before selected line: Следующие команды будут отправлены перед выбранной строкой: - + Skip Пропустить - + Command Команда - + Text Текст - + Shortcuts Быстрые клавиши - + (%1/%2/%3) - + (%1/%2) - + C Н - + Applying heightmap... Применяется карты высот... - + Subdividing segments... Разбиение отрезков... - + Updating Z-coordinates... Обновление Z-координат... - + Modifying G-code program... Правка G-код программы... @@ -1059,23 +1069,23 @@ %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Файлы G-Code (*.nc *.ncc *.ngc *.tap *.txt);;Все файлы (*.*) - + Opening file... Загрузка файла... - + Updating... Обновление... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Файлы G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1084,7 +1094,7 @@ Файл был изменен. Сохранить? - + Job done. Time elapsed: %1 Задание выполнено. @@ -1099,26 +1109,26 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap *.txt);;Все файлы (*.*) - + Delete lines? Удалить строки? - + Scroll Прокрутка - + Restore origin: %1, %2, %3 Восстановить СК: %1, %2, %3 - + File sending in progress. Terminate and exit? Идет процесс отправки файла. Прервать и выйти из программы? @@ -1127,15 +1137,15 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap);;Все файлы (*.*) - - - + + + Heightmap files (*.map) Файлы карт высот (*.map) - - + + Can't open file: Ошибка при открытии файла: @@ -1146,14 +1156,14 @@ Time elapsed: %1 Отправлена - - - + + + (%1) - + Untitled Без имени @@ -1162,7 +1172,7 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap *.txt) - + Changing grid settings will reset probe data. Continue? Изменение сетки зондирования приведет к очистке табличных данных. Продолжить? @@ -1171,22 +1181,22 @@ Time elapsed: %1 Подключен - + G-code program file was changed. Save? Файл G-code программы был изменен. Сохранить? - + Heightmap file was changed. Save? Файл карты высот был изменен. Сохранить? - + Probe Зонд - + Port opened Порт открыт @@ -1195,7 +1205,7 @@ Time elapsed: %1 Обработана - + Serial port error Ошибка последовательного порта @@ -1204,19 +1214,19 @@ Time elapsed: %1 Буфер/очередь: %1 / %2 - - - + + + Save file as Сохранить файл как - - - - - + + + + + Open Открыть @@ -1561,68 +1571,68 @@ Time elapsed: %1 - + Shortcuts Быстрые клавиши - + Command Команда - + Text Текст - + Font Шрифт - + Size: Размер: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt пт - + (restart needed) (необходим перезапуск) - + Set to defaults По умолчанию @@ -1875,12 +1885,12 @@ Time elapsed: %1 Отображать команды G-code программы в консоли - + OK ОК - + Cancel Отмена From a701208b49e996354e74b214ec5034c8ea814e59 Mon Sep 17 00:00:00 2001 From: Denvi Date: Thu, 7 Nov 2019 16:59:56 +0500 Subject: [PATCH 21/80] Origin offsets stored on G92 command now. --- src/candle.pro | 2 +- src/frmmain.cpp | 63 ++++++++++++++++++++++--------------------------- src/frmmain.h | 2 -- 3 files changed, 29 insertions(+), 38 deletions(-) diff --git a/src/candle.pro b/src/candle.pro index 154270ff..cb73effd 100644 --- a/src/candle.pro +++ b/src/candle.pro @@ -29,7 +29,7 @@ contains(QT_CONFIG, opengles.) { TARGET = Candle TEMPLATE = app -VERSION = 1.2.5b +VERSION = 1.2.6b RC_ICONS += images/candle.ico DEFINES += sNan=\"65536\" diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 4898ab4a..317cfb16 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -91,8 +91,6 @@ frmMain::frmMain(QWidget *parent) : m_storedY = 0; m_storedZ = 0; - m_settingZeroXY = false; - m_settingZeroZ = false; m_homing = false; m_updateSpindleSpeed = false; m_updateParserStatus = false; @@ -911,15 +909,17 @@ void frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, b // Evaluate scripts in command if (tableIndex < 0) command = evaluateCommand(command); + command = command.toUpper(); + CommandAttributes ca; if (showInConsole) { - ui->txtConsole->appendPlainText(command.toUpper()); + ui->txtConsole->appendPlainText(command); ca.consoleIndex = ui->txtConsole->blockCount() - 1; } else { ca.consoleIndex = -1; } - ca.command = command.toUpper(); + ca.command = command; ca.length = command.length() + 1; ca.tableIndex = tableIndex; @@ -939,6 +939,12 @@ void frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, b m_fileEndSent = true; } + // Queue offsets request on G92 command + if (ca.tableIndex == -1 && command.contains("G92")) { + m_storedCS = m_storedVars.CS(); + sendCommand("$#", -3, showInConsole, true); + } + m_serialPort.write((command + "\r").toLatin1()); } @@ -1299,23 +1305,13 @@ void frmMain::onSerialPortReadyRead() // Offsets if (ca.command == "$#") { storeOffsetsVars(response); - } - // Store origin - if (ca.command == "$#" && ca.tableIndex == -2) { - static QRegExp g92(".*G92:([^,]*),([^,]*),([^\\]]*)"); - - if (g92.indexIn(response) != -1) { - if (m_settingZeroXY) { - m_settingZeroXY = false; - m_storedCS = m_storedVars.CS(); - m_storedX = toMetric(g92.cap(1).toDouble()); - m_storedY = toMetric(g92.cap(2).toDouble()); - } else if (m_settingZeroZ) { - m_settingZeroZ = false; - m_storedCS = m_storedVars.CS(); - m_storedZ = toMetric(g92.cap(3).toDouble()); - } + // Save G92 offsets + if (ca.tableIndex == -3) { + QVector3D v = m_storedVars.coords("G92"); + m_storedX = v.x(); + m_storedY = v.y(); + m_storedZ = v.z(); ui->cmdRestoreOrigin->setToolTip(QString(tr("Restore origin:\n%1, %2, %3")).arg(m_storedX).arg(m_storedY).arg(m_storedZ)); } } @@ -1987,6 +1983,8 @@ void frmMain::on_cmdFileSend_clicked() on_cmdFileReset_clicked(); + m_startTime.start(); + m_transferCompleted = false; m_processingFile = true; m_fileEndSent = false; @@ -2169,10 +2167,10 @@ void frmMain::restoreOffsets() // Still have pre-reset working position sendCommand(QString("G21G53G90X%1Y%2Z%3").arg(toMetric(ui->txtMPosX->value())) .arg(toMetric(ui->txtMPosY->value())) - .arg(toMetric(ui->txtMPosZ->value())), -1, m_settings->showUICommands()); + .arg(toMetric(ui->txtMPosZ->value())), -2, m_settings->showUICommands()); sendCommand(QString("G21G92X%1Y%2Z%3").arg(toMetric(ui->txtWPosX->value())) .arg(toMetric(ui->txtWPosY->value())) - .arg(toMetric(ui->txtWPosZ->value())), -1, m_settings->showUICommands()); + .arg(toMetric(ui->txtWPosZ->value())), -2, m_settings->showUICommands()); } void frmMain::storeOffsetsVars(QString response) @@ -2587,18 +2585,12 @@ void frmMain::on_cmdTouch_clicked() void frmMain::on_cmdZeroXY_clicked() { - m_settingZeroXY = true; sendCommand("G92X0Y0", -1, m_settings->showUICommands()); - sendCommand("$G", -2, m_settings->showUICommands()); - sendCommand("$#", -2, m_settings->showUICommands(), true); } void frmMain::on_cmdZeroZ_clicked() { - m_settingZeroZ = true; sendCommand("G92Z0", -1, m_settings->showUICommands()); - sendCommand("$G", -2, m_settings->showUICommands()); - sendCommand("$#", -2, m_settings->showUICommands(), true); } void frmMain::on_cmdRestoreOrigin_clicked() @@ -2606,24 +2598,24 @@ void frmMain::on_cmdRestoreOrigin_clicked() // Restore offset sendCommand(QString("G21G53G90G0X%1Y%2Z%3").arg(toMetric(ui->txtMPosX->value())) .arg(toMetric(ui->txtMPosY->value())) - .arg(toMetric(ui->txtMPosZ->value())), -1, m_settings->showUICommands()); + .arg(toMetric(ui->txtMPosZ->value())), -2, m_settings->showUICommands()); m_storedVars.setCS(m_storedCS); - sendCommand("$#", -1, m_settings->showUICommands()); - sendCommand("{vars.CS}", -1, m_settings->showUICommands(), true); + sendCommand("$#", -2, m_settings->showUICommands()); + sendCommand("{vars.CS}", -2, m_settings->showUICommands(), true); sendCommand(QString("G21G92X{%1 - vars.x}Y{%2 - vars.y}Z{%3 - vars.z}").arg(toMetric(ui->txtMPosX->text().toDouble()) - m_storedX) .arg(toMetric(ui->txtMPosY->text().toDouble()) - m_storedY) .arg(toMetric(ui->txtMPosZ->text().toDouble()) - m_storedZ), - -1, m_settings->showUICommands(), true); + -2, m_settings->showUICommands(), true); // Move tool if (m_settings->moveOnRestore()) switch (m_settings->restoreMode()) { case 0: - sendCommand("G0X0Y0", -1, m_settings->showUICommands(), true); + sendCommand("G0X0Y0", -2, m_settings->showUICommands(), true); break; case 1: - sendCommand("G0X0Y0Z0", -1, m_settings->showUICommands(), true); + sendCommand("G0X0Y0Z0", -2, m_settings->showUICommands(), true); break; } } @@ -3941,7 +3933,8 @@ void frmMain::jogStep() int speed = ui->cboJogFeed->currentText().toInt(); // Speed mm/min double v = (double)speed / 60; // Rapid speed mm/sec int N = 15; // Planner blocks - double dt = qMax(0.01, sqrt(v) / (2 * acc * (N - 1))); // Single jog command time + double tt = 0.002; // Transfer time + double dt = qMax(0.01, sqrt(v) / (2 * acc * (N - 1))) + tt; // Single jog command time double s = v * dt; // Jog distance QVector3D vec = m_jogVector.normalized() * s; diff --git a/src/frmmain.h b/src/frmmain.h index 996bcf8d..310e1a41 100644 --- a/src/frmmain.h +++ b/src/frmmain.h @@ -293,8 +293,6 @@ private slots: int m_consolePureHeight; // Flags - bool m_settingZeroXY; - bool m_settingZeroZ; bool m_homing; bool m_updateSpindleSpeed; bool m_updateParserStatus; From 35232c81c6ddec64a8c520bcf69ccabfeecec7d6 Mon Sep 17 00:00:00 2001 From: Denvi Date: Fri, 8 Nov 2019 17:14:20 +0500 Subject: [PATCH 22/80] Plugins support added. --- src/candle.pro | 10 +- src/frmmain.cpp | 182 +++++++++-- src/frmmain.h | 11 +- src/frmmain.ui | 66 ++-- src/frmsettings.cpp | 55 ---- src/frmsettings.h | 49 ++- src/frmsettings.ui | 50 +-- src/translations/candle_en.ts | 576 ++++++++++++++++----------------- src/translations/candle_es.ts | 572 ++++++++++++++++---------------- src/translations/candle_fr.ts | 572 ++++++++++++++++---------------- src/translations/candle_pt.ts | 574 ++++++++++++++++---------------- src/translations/candle_ru.qm | Bin 22694 -> 22497 bytes src/translations/candle_ru.ts | 570 ++++++++++++++++---------------- src/widgets/dropwidget.cpp | 5 +- src/widgets/sliderbox.h | 11 + src/widgets/styledtoolbutton.h | 3 + src/widgets/uiloader.cpp | 23 ++ src/widgets/uiloader.h | 15 + 18 files changed, 1720 insertions(+), 1624 deletions(-) create mode 100644 src/widgets/uiloader.cpp create mode 100644 src/widgets/uiloader.h diff --git a/src/candle.pro b/src/candle.pro index cb73effd..75a2d6ff 100644 --- a/src/candle.pro +++ b/src/candle.pro @@ -4,7 +4,7 @@ # #------------------------------------------------- -QT = core gui opengl serialport script +QT = core gui opengl serialport script uitools greaterThan(QT_MAJOR_VERSION, 4): QT += widgets win32: { @@ -29,7 +29,7 @@ contains(QT_CONFIG, opengles.) { TARGET = Candle TEMPLATE = app -VERSION = 1.2.6b +VERSION = 1.2.7b RC_ICONS += images/candle.ico DEFINES += sNan=\"65536\" @@ -68,7 +68,8 @@ SOURCES += main.cpp\ drawers/selectiondrawer.cpp \ widgets/comboboxkey.cpp \ scriptvars.cpp \ - widgets/dropwidget.cpp + widgets/dropwidget.cpp \ + widgets/uiloader.cpp HEADERS += frmmain.h \ frmsettings.h \ @@ -102,7 +103,8 @@ HEADERS += frmmain.h \ drawers/selectiondrawer.h \ widgets/comboboxkey.h \ scriptvars.h \ - widgets/dropwidget.h + widgets/dropwidget.h \ + widgets/uiloader.h FORMS += frmmain.ui \ frmsettings.ui \ diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 317cfb16..d08c11ca 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -33,6 +33,7 @@ #include "ui_frmmain.h" #include "ui_frmsettings.h" #include "widgets/widgetmimedata.h" +#include "widgets/uiloader.h" frmMain::frmMain(QWidget *parent) : QMainWindow(parent), @@ -377,8 +378,6 @@ frmMain::frmMain(QWidget *parent) : frmMain::~frmMain() { - saveSettings(); - delete m_senderErrorBox; delete ui; } @@ -458,12 +457,6 @@ void frmMain::loadSettings() m_settings->setFps(set.value("fps", 60).toInt()); m_settings->setQueryStateTime(set.value("queryStateTime", 250).toInt()); - m_settings->setPanelUserCommands(set.value("panelUserCommandsVisible", true).toBool()); - m_settings->setPanelHeightmap(set.value("panelHeightmapVisible", true).toBool()); - m_settings->setPanelSpindle(set.value("panelSpindleVisible", true).toBool()); - m_settings->setPanelOverriding(set.value("panelOverridingVisible", true).toBool()); - m_settings->setPanelJog(set.value("panelJogVisible", true).toBool()); - ui->chkAutoScroll->setChecked(set.value("autoScroll", false).toBool()); ui->slbSpindle->setRatio(100); @@ -557,6 +550,9 @@ void frmMain::loadSettings() ui->cboCommand->addItems(set.value("recentCommands", QStringList()).toStringList()); ui->cboCommand->setCurrentIndex(-1); + // Load plugins + loadPlugins(); + // Adjust docks width int w = qMax(ui->dockDevice->widget()->sizeHint().width(), ui->dockModification->widget()->sizeHint().width()); @@ -587,6 +583,12 @@ void frmMain::loadSettings() ui->scrollContentsModification->restoreState(this, set.value("panelsModification").toStringList()); ui->scrollContentsUser->restoreState(this, set.value("panelsUser").toStringList()); + QStringList hiddenPanels = set.value("hiddenPanels").toStringList(); + foreach (QString s, hiddenPanels) { + QGroupBox *b = findChild(s); + if (b) b->setHidden(true); + } + // Normal window state restoreState(set.value("formMainState").toByteArray()); @@ -681,11 +683,6 @@ void frmMain::saveSettings() set.setValue("lastFolder", m_lastFolder); set.setValue("touchCommand", m_settings->touchCommand()); set.setValue("safePositionCommand", m_settings->safePositionCommand()); - set.setValue("panelUserCommandsVisible", m_settings->panelUserCommands()); - set.setValue("panelHeightmapVisible", m_settings->panelHeightmap()); - set.setValue("panelSpindleVisible", m_settings->panelSpindle()); - set.setValue("panelOverridingVisible", m_settings->panelOverriding()); - set.setValue("panelJogVisible", m_settings->panelJog()); set.setValue("fontSize", m_settings->fontSize()); set.setValue("feedOverride", ui->slbFeedOverride->isChecked()); @@ -749,6 +746,17 @@ void frmMain::saveSettings() set.setValue("panelsModification", QVariant::fromValue(ui->scrollContentsModification->saveState())); set.setValue("panelsUser", QVariant::fromValue(ui->scrollContentsUser->saveState())); + QStringList panels; + QStringList hiddenPanels; + if (ui->scrollContentsDevice->isVisible()) panels << ui->scrollContentsDevice->saveState(); + if (ui->scrollContentsModification->isVisible()) panels << ui->scrollContentsModification->saveState(); + if (ui->scrollContentsUser->isVisible()) panels << ui->scrollContentsUser->saveState(); + foreach (QString s, panels) { + QGroupBox *b = findChild(s); + if (b && b->isHidden()) hiddenPanels << s; + } + set.setValue("hiddenPanels", hiddenPanels); + // Menu set.setValue("lockWindows", ui->actViewLockWindows->isChecked()); set.setValue("lockPanels", ui->actViewLockPanels->isChecked()); @@ -1422,6 +1430,9 @@ void frmMain::onSerialPortReadyRead() ui->txtConsole->verticalScrollBar()->maximum()); } + // Emit response signal + emit responseReceived(ca.command, ca.tableIndex, response); + // Check queue if (m_queue.length() > 0) { CommandQueue cq = m_queue.takeFirst(); @@ -1697,6 +1708,8 @@ void frmMain::closeEvent(QCloseEvent *ce) m_commands.clear(); m_queue.clear(); } + + saveSettings(); } void frmMain::dragEnterEvent(QDragEnterEvent *dee) @@ -2419,15 +2432,6 @@ void frmMain::applySettings() { ui->slbSpindle->setMinimum(m_settings->spindleSpeedMin()); ui->slbSpindle->setMaximum(m_settings->spindleSpeedMax()); - ui->scrollArea->setVisible(m_settings->panelHeightmap() || m_settings->panelOverriding() - || m_settings->panelJog() || m_settings->panelSpindle()); - - ui->grpUserCommands->setVisible(m_settings->panelUserCommands()); - ui->grpHeightMap->setVisible(m_settings->panelHeightmap()); - ui->grpSpindle->setVisible(m_settings->panelSpindle()); - ui->grpOverriding->setVisible(m_settings->panelOverriding()); - ui->grpJog->setVisible(m_settings->panelJog()); - ui->cboCommand->setAutoCompletion(m_settings->autoCompletion()); m_codeDrawer->setSimplify(m_settings->simplify()); @@ -3890,7 +3894,7 @@ void frmMain::onCmdUserClicked(bool checked) { int i = sender()->objectName().right(1).toInt(); - QStringList list = m_settings->userCommands(i).remove("\n").split(";"); + QStringList list = m_settings->userCommands(i).remove("\n").split(QRegExp(";(?![^\\{]+\\})")); foreach (QString cmd, list) { if (!cmd.isEmpty()) sendCommand(cmd.trimmed(), -1, m_settings->showUICommands(), list.indexOf(cmd)); @@ -3996,6 +4000,102 @@ void frmMain::setupCoordsTextboxes() ui->txtWPosZ->setMaximum(bound); } +void frmMain::loadPlugins() +{ + qDebug() << "loadPlugins"; + QString pluginsDir = qApp->applicationDirPath() + "/plugins/"; + + UiLoader uiLoader; + + // Get plugins list + QStringList pl = QDir(pluginsDir).entryList(QDir::Dirs | QDir::NoDotAndDotDot); + + qDebug() << pl; + + foreach (QString p, pl) { + // Config + QSettings set(pluginsDir + p + "/config.ini", QSettings::IniFormat); + QString title = set.value("title").toString(); + QString name = set.value("name").toString(); + qDebug() << "loading plugin:" << p << title; + + // Translation + QString loc = QLocale().name().left(2); + QString translationFileName = pluginsDir + p + "/translation_" + loc + ".qm"; + if(QFile::exists(translationFileName)) { + QTranslator *translator = new QTranslator(); + if (translator->load(translationFileName)) qApp->installTranslator(translator); + else delete translator; + } + + // Ui + QWidget *widget = 0; + QFile f(pluginsDir + p + "/widget.ui"); + if (f.open(QFile::ReadOnly)) { + // Load widget + uiLoader.setWorkingDirectory(pluginsDir + p); + widget = uiLoader.load(&f, this); + f.close(); + + // Create panel + GroupBox *box = new GroupBox(this); + QVBoxLayout *layout1 = new QVBoxLayout(box); + QWidget *bw = new QWidget(box); + QVBoxLayout *layout2 = new QVBoxLayout(bw); + box->setObjectName("grp" + name); + box->setTitle(tr(title.toLatin1())); + box->setLayout(layout1); + box->setCheckable(true); + box->setProperty("overrided", false); + layout1->addWidget(bw); + bw->setLayout(layout2); + layout2->addWidget(widget); + layout2->setMargin(0); + connect(box, &QGroupBox::toggled, bw, &QWidget::setVisible); + + // Add panel to user window + static_cast(ui->scrollContentsUser->layout())->insertWidget(0, box); + } + + // Delegate actions to main form + QList acts = widget->findChildren(); + foreach (QAction *a, acts) addAction(a); + + // Script + f.setFileName(pluginsDir + p + "/script.js"); + if (f.open(QFile::ReadOnly)) { + QScriptEngine *se = new QScriptEngine(); + + // Delegate Ui + if (widget) { + QScriptValue sw = se->newQObject(widget); + se->globalObject().setProperty("ui", sw); + } + + // Main form + QScriptValue main = se->newQObject(this); + se->globalObject().setProperty("main", main); + + // Settings + QScriptValue settings = se->newQObject(m_settings); + se->globalObject().setProperty("settings", settings); + + // Stored vars + QScriptValue vars = se->newQObject(&m_storedVars); + se->globalObject().setProperty("vars", vars); + + // Translator + se->installTranslatorFunctions(); + + // Run script + QString script = f.readAll(); + qDebug() << "Running plugin:" << p << se->evaluate(script).toString(); + + f.close(); + } + } +} + void frmMain::on_cmdYPlus_pressed() { m_jogVector += QVector3D(0, 1, 0); @@ -4074,13 +4174,39 @@ void frmMain::on_cmdStop_clicked() m_serialPort.write(QByteArray(1, char(0x85))); } +void frmMain::on_mnuViewWindows_aboutToShow() +{ + ui->actViewWindowsDevice->setChecked(ui->dockDevice->isVisible()); + ui->actViewWindowsModification->setChecked(ui->dockModification->isVisible()); + ui->actViewWindowsVisualizer->setChecked(ui->dockVisualizer->isVisible()); + ui->actViewWindowsConsole->setChecked(ui->dockConsole->isVisible()); + ui->actViewWindowsUser->setChecked(ui->dockUser->isVisible()); +} + void frmMain::on_mnuViewPanels_aboutToShow() { - ui->actViewPanelsDevice->setChecked(ui->dockDevice->isVisible()); - ui->actViewPanelsModification->setChecked(ui->dockModification->isVisible()); - ui->actViewPanelsVisualizer->setChecked(ui->dockVisualizer->isVisible()); - ui->actViewPanelsConsole->setChecked(ui->dockConsole->isVisible()); - ui->actViewPanelsUser->setChecked(ui->dockUser->isVisible()); + QAction *a; + + ui->mnuViewPanels->clear(); + + QStringList panels; + if (ui->scrollContentsDevice->isVisible()) panels << ui->scrollContentsDevice->saveState(); + if (ui->scrollContentsModification->isVisible()) panels << "\n" << ui->scrollContentsModification->saveState(); + if (ui->scrollContentsUser->isVisible()) panels << "\n" << ui->scrollContentsUser->saveState(); + + foreach (QString s, panels) { + if (s == "\n") { + ui->mnuViewPanels->addSeparator(); + } else { + QGroupBox *b = findChild(s); + if (b) { + a = ui->mnuViewPanels->addAction(b->title()); + a->setCheckable(true); + a->setChecked(b->isVisible()); + connect(a, &QAction::triggered, b, &QWidget::setVisible); + } + } + } } void frmMain::on_actJogStepNext_triggered() diff --git a/src/frmmain.h b/src/frmmain.h index 310e1a41..9354625b 100644 --- a/src/frmmain.h +++ b/src/frmmain.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include "parser/gcodeviewparse.h" @@ -88,8 +89,14 @@ class frmMain : public QMainWindow explicit frmMain(QWidget *parent = 0); ~frmMain(); + Q_INVOKABLE void sendCommand(QString command, int tableIndex = -1, bool showInConsole = true, bool queue = false); + double toolZPosition(); +signals: + + void responseReceived(QString command, int tableIndex, QString response); + private slots: void updateHeightMapInterpolationDrawer(bool reset = false); void placeVisualizerButtons(); @@ -172,6 +179,7 @@ private slots: void on_cmdHeightMapBorderAuto_clicked(); void on_cmdFileAbort_clicked(); void on_cmdSpindle_clicked(bool checked); + void on_mnuViewWindows_aboutToShow(); void on_mnuViewPanels_aboutToShow(); void on_cmdYPlus_pressed(); @@ -353,7 +361,6 @@ private slots: bool saveChanges(bool heightMapMode); void updateControlsState(); void openPort(); - void sendCommand(QString command, int tableIndex = -1, bool showInConsole = true, bool queue = false); QString evaluateCommand(QString command); void grblReset(); int bufferLength(); @@ -400,6 +407,8 @@ private slots: void updateJogTitle(); void setupCoordsTextboxes(); + void loadPlugins(); + static bool actionLessThan(const QAction *a1, const QAction *a2); }; diff --git a/src/frmmain.ui b/src/frmmain.ui index 1afdc66d..563ac95e 100644 --- a/src/frmmain.ui +++ b/src/frmmain.ui @@ -412,16 +412,22 @@ QLabel[overrided="false"] { &View - + &Windows - - - - - + + + + + + + + + &Panels + + @@ -2980,7 +2986,7 @@ padding-right: 8; &About - + true @@ -2991,7 +2997,7 @@ padding-right: 8; &Device - + true @@ -3002,7 +3008,7 @@ padding-right: 8; &Modification - + true @@ -3013,7 +3019,7 @@ padding-right: 8; &Visualizer - + true @@ -3299,7 +3305,7 @@ padding-right: 8; Spindle speed override - + true @@ -3329,6 +3335,20 @@ padding-right: 8; + + StyledToolButton + QToolButton +
widgets/styledtoolbutton.h
+
+ + SliderBox + QWidget +
widgets/sliderbox.h
+ 1 + + click() + +
GroupBox QGroupBox @@ -3346,20 +3366,6 @@ padding-right: 8; QComboBox
widgets/combobox.h
- - StyledToolButton - QToolButton -
widgets/styledtoolbutton.h
-
- - SliderBox - QWidget -
widgets/sliderbox.h
- 1 - - click() - -
ComboBoxKey QComboBox @@ -3426,7 +3432,7 @@ padding-right: 8; - actViewPanelsDevice + actViewWindowsDevice triggered(bool) dockDevice setVisible(bool) @@ -3442,7 +3448,7 @@ padding-right: 8; - actViewPanelsModification + actViewWindowsModification triggered(bool) dockModification setVisible(bool) @@ -3458,7 +3464,7 @@ padding-right: 8; - actViewPanelsVisualizer + actViewWindowsVisualizer triggered(bool) dockVisualizer setVisible(bool) @@ -3474,7 +3480,7 @@ padding-right: 8; - actViewPanelsConsole + actViewWindowsConsole triggered(bool) dockConsole setVisible(bool) @@ -4146,7 +4152,7 @@ padding-right: 8; - actViewPanelsUser + actViewWindowsUser triggered(bool) dockUser setVisible(bool) diff --git a/src/frmsettings.cpp b/src/frmsettings.cpp index b98cd8ee..f11043cc 100644 --- a/src/frmsettings.cpp +++ b/src/frmsettings.cpp @@ -504,56 +504,6 @@ void frmSettings::setSimplifyPrecision(double simplifyPrecision) ui->txtSimplifyPrecision->setValue(simplifyPrecision); } -bool frmSettings::panelUserCommands() -{ - return ui->chkPanelUserCommands->isChecked(); -} - -void frmSettings::setPanelUserCommands(bool value) -{ - ui->chkPanelUserCommands->setChecked(value); -} - -bool frmSettings::panelHeightmap() -{ - return ui->chkPanelHeightmap->isChecked(); -} - -void frmSettings::setPanelHeightmap(bool panelHeightmap) -{ - ui->chkPanelHeightmap->setChecked(panelHeightmap); -} - -bool frmSettings::panelSpindle() -{ - return ui->chkPanelSpindle->isChecked(); -} - -void frmSettings::setPanelSpindle(bool panelSpindle) -{ - ui->chkPanelSpindle->setChecked(panelSpindle); -} - -bool frmSettings::panelOverriding() -{ - return ui->chkPanelOverriding->isChecked(); -} - -void frmSettings::setPanelOverriding(bool panelFeed) -{ - ui->chkPanelOverriding->setChecked(panelFeed); -} - -bool frmSettings::panelJog() -{ - return ui->chkPanelJog->isChecked(); -} - -void frmSettings::setPanelJog(bool panelJog) -{ - ui->chkPanelJog->setChecked(panelJog); -} - QList frmSettings::colors() { return this->findChildren(); @@ -722,11 +672,6 @@ void frmSettings::on_cmdDefaults_clicked() setShowProgramCommands(false); setAutoCompletion(true); - setPanelOverriding(true); - setPanelHeightmap(true); - setPanelJog(true); - setPanelSpindle(true); - ui->clpTool->setColor(QColor(255, 153, 0)); ui->clpVisualizerBackground->setColor(QColor(255, 255, 255)); diff --git a/src/frmsettings.h b/src/frmsettings.h index bb76c746..43522309 100644 --- a/src/frmsettings.h +++ b/src/frmsettings.h @@ -16,6 +16,45 @@ class frmSettings; class frmSettings : public QDialog { Q_OBJECT + Q_PROPERTY(QString port READ port WRITE setPort) + Q_PROPERTY(int baud READ baud WRITE setBaud) + Q_PROPERTY(double toolDiameter READ toolDiameter WRITE setToolDiameter) + Q_PROPERTY(double toolLength READ toolLength WRITE setToolLength) + Q_PROPERTY(bool antialiasing READ antialiasing WRITE setAntialiasing) + Q_PROPERTY(bool zBuffer READ zBuffer WRITE setZBuffer) + Q_PROPERTY(double lineWidth READ lineWidth WRITE setLineWidth) + Q_PROPERTY(double arcLength READ arcLength WRITE setArcLength) + Q_PROPERTY(double arcDegree READ arcDegree WRITE setArcDegree) + Q_PROPERTY(bool arcDegreeMode READ arcDegreeMode WRITE setArcDegreeMode) + Q_PROPERTY(bool showProgramCommands READ showProgramCommands WRITE setShowProgramCommands) + Q_PROPERTY(bool showUICommands READ showUICommands WRITE setShowUICommands) + Q_PROPERTY(QString safePositionCommand READ safePositionCommand WRITE setSafePositionCommand) + Q_PROPERTY(bool moveOnRestore READ moveOnRestore WRITE setMoveOnRestore) + Q_PROPERTY(int restoreMode READ restoreMode WRITE setRestoreMode) + Q_PROPERTY(int spindleSpeedMin READ spindleSpeedMin WRITE setSpindleSpeedMin) + Q_PROPERTY(int spindleSpeedMax READ spindleSpeedMax WRITE setSpindleSpeedMax) + Q_PROPERTY(int laserPowerMin READ laserPowerMin WRITE setLaserPowerMin) + Q_PROPERTY(int laserPowerMax READ laserPowerMax WRITE setLaserPowerMax) + Q_PROPERTY(int rapidSpeed READ rapidSpeed WRITE setRapidSpeed) + Q_PROPERTY(int heightmapProbingFeed READ heightmapProbingFeed WRITE setHeightmapProbingFeed) + Q_PROPERTY(int acceleration READ acceleration WRITE setAcceleration) + Q_PROPERTY(int queryStateTime READ queryStateTime WRITE setQueryStateTime) + Q_PROPERTY(int toolType READ toolType WRITE setToolType) + Q_PROPERTY(double toolAngle READ toolAngle WRITE setToolAngle) + Q_PROPERTY(int fps READ fps WRITE setFps) + Q_PROPERTY(bool vsync READ vsync WRITE setVsync) + Q_PROPERTY(bool msaa READ msaa WRITE setMsaa) + Q_PROPERTY(bool autoCompletion READ autoCompletion WRITE setAutoCompletion) + Q_PROPERTY(bool units READ units WRITE setUnits) + Q_PROPERTY(QString touchCommand READ touchCommand WRITE setTouchCommand) + Q_PROPERTY(bool simplify READ simplify WRITE setSimplify) + Q_PROPERTY(double simplifyPrecision READ simplifyPrecision WRITE setSimplifyPrecision) + Q_PROPERTY(int fontSize READ fontSize WRITE setFontSize) + Q_PROPERTY(bool grayscaleSegments READ grayscaleSegments WRITE setGrayscaleSegments) + Q_PROPERTY(bool grayscaleSCode READ grayscaleSCode WRITE setGrayscaleSCode) + Q_PROPERTY(bool drawModeVectors READ drawModeVectors WRITE setDrawModeVectors) + Q_PROPERTY(bool ignoreErrors READ ignoreErrors WRITE setIgnoreErrors) + Q_PROPERTY(bool autoLine READ autoLine WRITE setAutoLine) public: explicit frmSettings(QWidget *parent = 0); @@ -93,16 +132,6 @@ class frmSettings : public QDialog void setSimplify(bool simplify); double simplifyPrecision(); void setSimplifyPrecision(double simplifyPrecision); - bool panelUserCommands(); - void setPanelUserCommands(bool value); - bool panelHeightmap(); - void setPanelHeightmap(bool panelHeightmap); - bool panelSpindle(); - void setPanelSpindle(bool panelSpindle); - bool panelOverriding(); - void setPanelOverriding(bool panelFeed); - bool panelJog(); - void setPanelJog(bool panelJog); QList colors(); QColor colors(QString name); int fontSize(); diff --git a/src/frmsettings.ui b/src/frmsettings.ui index 6b353570..5b5cf835 100644 --- a/src/frmsettings.ui +++ b/src/frmsettings.ui @@ -87,9 +87,9 @@ QSplitter::handle:horizontal { 0 - -1850 - 433 - 2424 + -1921 + 533 + 2776 @@ -1150,50 +1150,6 @@ QSplitter::handle:horizontal { - - - - Panels - - - - - - User commands - - - - - - - Heightmap - - - - - - - Jog - - - - - - - Spindle - - - - - - - Overriding - - - - - - diff --git a/src/translations/candle_en.ts b/src/translations/candle_en.ts index d10f7951..5c5c9209 100644 --- a/src/translations/candle_en.ts +++ b/src/translations/candle_en.ts @@ -118,54 +118,54 @@ - - + + Check - + Scroll - - - - - + + + + + Open - - - + + + Reset - - + + Send - + Pause - - - - + + + + Abort @@ -200,890 +200,896 @@ - + + &Panels + + + + Modification - + + - Overriding - - + + Heightmap - - + + Use heightmap - + Absent - + Map: - - + + Create - - + + Edit - + Border: - - - + + + X: - + H: - - - + + + Y: - + W: - - + + Show border - + Auto - + Probe grid: - + Zb: - + Zt: - - + + Show probe grid - + Interpolation grid: - + Type: - + Bicubic - - + + Show interpolation grid - + Device - + State - + Work coordinates: - + Machine coordinates: - + Status: - + Control - - + + Zero XY - + User - + User command 1 - + User command 2 - + User command 3 - + User command 4 - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override - + &User - + &Lock windows - + L&ock panels - - - - - - - - - + + + + + + + + + ... - - + + Z-probe - - - + + + Home - - + + Restore origin - - + + Zero Z - - + + Safe position - - + + Unlock - + User commands - - - - - - + + + + + + Spindle on/off - - + + + - - - + + Spindle - - + + + - Jog - - + + X- - - + + Y- - - + + X+ - - + + Y+ - - + + Z+ - - + + Z- - - + + Stop - + Continuously - + 0.01 - + 0.1 - + + 1 - + 5 - - + + 10 - - + + 100 - + Step: - + Feed: - + 50 - + 500 - + 1000 - + 2000 - - + + Keyboard control - + Visualizer - - + + Fit - - + + Top view - - + + Isometric view - - + + Front view - - + + Left view - + Console - + Send command - - + + Clear console - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open - + E&xit - + &Settings - + &New - + &Save - + Save &as... - + &About - + &Clear - + Save &transformed as... - + &Device - + &Modification - + &Visualizer - + &Console - + Unknown - + Idle - + Alarm - + Run - + Hold - + Queue - + Door - + Send from current line - + Feed rate: - + Rapid speed: - + Spindle speed: - + &Insert line - + &Delete lines - + Don't show again - + Speed: - - + + Restore origin: %1, %2, %3 - + G-code program file was changed. Save? - + Heightmap file was changed. Save? - + Not connected - + G-code program - + Probe - + Port opened - + Job done. Time elapsed: %1 - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Serial port error - + Buffer: %1 / %2 / %3 - + File sending in progress. Terminate and exit? - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) - - - + + + Heightmap files (*.map) - + Opening file... - - + + Can't open file: - + Following commands will be sent before selected line: - + Skip - - - + + + (%1) - + Delete lines? - + Command - + Text - + Shortcuts - + Updating... - + Untitled - - - + + + Save file as - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) - + (%1/%2/%3) - + (%1/%2) - + C - + Changing grid settings will reset probe data. Continue? - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1229,7 +1235,6 @@ Time elapsed: %1 - User commands @@ -1255,7 +1260,6 @@ Time elapsed: %1 - Heightmap @@ -1286,7 +1290,7 @@ Time elapsed: %1 - + Visualizer @@ -1432,158 +1436,138 @@ Time elapsed: %1 - Panels - - - - - Jog - - - - - Spindle - - - - - Overriding - - - - Colors - + Z-movement: - + Toolpath - + Background: - + Highlight: - + Start point: - + End point: - + Text: - + Tool: - + Drawn: - + Normal: - - + + Shortcuts - + Command - + Text - + Font - + Size: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt - + (restart needed) - + Set to defaults - + OK - + Cancel - + Reset settings to default values? diff --git a/src/translations/candle_es.ts b/src/translations/candle_es.ts index 0f18cebb..5992b8bb 100644 --- a/src/translations/candle_es.ts +++ b/src/translations/candle_es.ts @@ -115,37 +115,37 @@ GRBL Control - + G-code program Programa de G-Code - - + + Isometric view Vista isometrica - - + + Top view Vista superior - - + + Front view Vista Frontal - - + + Left view Vista izquierda - - + + Fit Ajustar vista @@ -154,57 +154,57 @@ Ajuste de alturas - + Border: Bordes: - - - + + + X: X: - + H: - - - + + + Y: Y: - + W: - - + + Show border Mostrar borde - + Auto - + Probe grid: Grilla de medición: - + Zb: Zн: - + Zt: Zв: @@ -213,17 +213,17 @@ Mostrar grilla - + Interpolation grid: Grilla de interpolación: - + Type: Tipo: - + Bicubic Bicubico @@ -241,51 +241,51 @@ - - - - - + + + + + Open Abrir - - - + + + Reset Reiniciar - - + + Send Enviar - + Pause Pausar - - - - + + + + Abort Abandono - + State Estado - + Work coordinates: Coordenadas de trabajo: @@ -294,62 +294,62 @@ 0 - + Machine coordinates: Coordenadas de máquina: - + Status: Estado: - + Control Control - - - + + + Home Origen - - - - - - - - - + + + + + + + + + ... ... - - + + Z-probe Medicion de Z - - + + Zero XY Cero XY - - + + Zero Z Cero Z - + + - Overriding @@ -367,48 +367,48 @@ - - + + Restore origin Restaure el origen - - + + Safe position Posición segura - - + + Unlock Desbloquear - - + + Heightmap Mapa de alturas - - + + Use heightmap Usar mapa de alturas - + Map: Mapa: - + Absent Ausente - - + + Create Crear @@ -417,27 +417,27 @@ Modo edición - - + + + - - - + + Spindle Husillo - + Speed: Velocidad: - - - - - - + + + + + + Spindle on/off Husillo on/off @@ -454,51 +454,51 @@ % - - + + + - Jog Control manual - - + + X- - - + + Y- - - + + X+ - - + + Y+ - + Step: Pasos: - - + + Z+ - - + + Z- @@ -507,7 +507,7 @@ Presets: - + User commands @@ -524,29 +524,29 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 @@ -566,233 +566,239 @@ - + + &Panels + + + + Modification - - + + Edit - - + + Show probe grid - - + + Show interpolation grid - + Device - - + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - - + + Keyboard control Control desde teclado - + Visualizer Visualizador - + Console Consola - + Send command Enviar comando - - + + Clear console Limpiar cosola - + User - + &Device - + &Modification - + &Visualizer - + &Console - + User command 1 - + User command 2 - + User command 3 - + User command 4 - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override - + &User - + &Lock windows - + L&ock panels @@ -817,227 +823,227 @@ &Ayuda - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Abrir - + E&xit S&alir - + &Settings &Opciones - + &New &Nuevo - + &Save &Guardar - + Save &as... Guardar &como... - + &About &Acerca de - + &Clear &Limpiar - + Save &transformed as... Salve &transformado como... - + Idle Listo - + Alarm Alarma - + Run Iniciar - + Hold Parada - + Queue En cola - - + + Check Chequeo - + Door Puerta - + Unknown Desconocido - + Send from current line - + Feed rate: - + Rapid speed: Velocidad de aproximación: - + Spindle speed: - + &Insert line &Insertar linea - + &Delete lines &Borrar lineas - + Don't show again - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - + Command Comando - + Text - + Shortcuts - + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1048,38 +1054,38 @@ %1, %2, %3 - + G-code program file was changed. Save? El programa de G-code ha cambiado. Desea guardar? - + Heightmap file was changed. Save? El programa mapa de alturas ha cambiado. Desea guardar? - + Not connected Sin Conexión - + Probe Medición - + Opening file... - + Updating... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Archivos de G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1088,7 +1094,7 @@ Conectado - + Job done. Time elapsed: %1 Trabajo terminado. @@ -1099,18 +1105,18 @@ Tiempo transcurrido: %1 Procesado - + Serial port error Error en puerto serie - + Scroll Desplazamiento - + File sending in progress. Terminate and exit? Envio de archivo en progreso. Detener y salir? @@ -1127,33 +1133,33 @@ Tiempo transcurrido: %1 Archivos de G-Code (*.nc *.ncc *.tap *.txt) - - - + + + Heightmap files (*.map) Mapa de alturas (*.map) - + Port opened Puerto se abrió - - + + Restore origin: %1, %2, %3 Restaure origen: %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Archivos de G-Code (*.nc *.ncc *.ngc *.tap *.txt);;Todos los archivos (*.*) - - + + Can't open file: No se puede abrir el archivo: @@ -1168,26 +1174,26 @@ Tiempo transcurrido: %1 Enviado - + Delete lines? Borrar lineas? - - - + + + (%1) - + Untitled Sin-título - - - + + + Save file as Guardar archivo como @@ -1196,7 +1202,7 @@ Tiempo transcurrido: %1 Archivos de G-Code (*.nc;*.ncc;*.tap) - + Changing grid settings will reset probe data. Continue? El cambio de configuraciones de grilla reiniciará los datos de medición. Desea continuar? @@ -1332,7 +1338,7 @@ Tiempo transcurrido: %1 - + Visualizer Visualizador @@ -1440,13 +1446,11 @@ Tiempo transcurrido: %1 Auto-completar comandos - Panels - Paneles + Paneles - Heightmap Mapa de altura @@ -1459,14 +1463,12 @@ Tiempo transcurrido: %1 Avance - Spindle - Husillo + Husillo - Jog - Control manual + Control manual @@ -1484,22 +1486,22 @@ Tiempo transcurrido: %1 - + Colors Color - + Z-movement: Movimiento en Z: - + Normal: Normal: - + Toolpath Recorrido de herramienta @@ -1509,12 +1511,12 @@ Tiempo transcurrido: %1 Por longitud - + Drawn: Dibujo: - + Background: Fondo: @@ -1573,7 +1575,6 @@ Tiempo transcurrido: %1 - User commands @@ -1653,114 +1654,109 @@ Tiempo transcurrido: %1 Herramientas modelo - - Overriding - - - - + Highlight: Resaltado: - + Start point: Origen: - + End point: Punto final: - + Text: Texto: - + Tool: Herramienta: - - + + Shortcuts - + Command Comando - + Text - + Font Fuente - + Size: Tamaño: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt Puntos - + (restart needed) (Se requiere reinicio) - + Set to defaults Opciones por defecto - + OK ОК - + Cancel Cancelar - + Reset settings to default values? Restablecer la configuración a sus valores predeterminados? diff --git a/src/translations/candle_fr.ts b/src/translations/candle_fr.ts index d1cb8ecc..65cd3322 100644 --- a/src/translations/candle_fr.ts +++ b/src/translations/candle_fr.ts @@ -115,37 +115,37 @@ grblControl - + G-code program Programme G-Code - - + + Isometric view Vue isometrique - - + + Top view Vue de dessus - - + + Front view Vue de Face - - + + Left view Vue de gauche - - + + Fit Ajuster vue @@ -154,57 +154,57 @@ Paramètres palpage surfacique - + Border: Bords: - - - + + + X: X: - + H: - - - + + + Y: Y: - + W: - - + + Show border Montrer bord - + Auto - + Probe grid: Grille de palpage: - + Zb: Zb: - + Zt: Zt: @@ -213,17 +213,17 @@ Montrer grille - + Interpolation grid: Espacement grille: - + Type: Type: - + Bicubic Bicubique @@ -241,51 +241,51 @@ - - - - - + + + + + Open Ouvrir - - - + + + Reset Reinitialiser - - + + Send Envoyer - + Pause Pause - - - - + + + + Abort Abandon - + State Etât - + Work coordinates: Coordonnées de travail: @@ -294,62 +294,62 @@ 0 - + Machine coordinates: Coordonnées machine: - + Status: Etât: - + Control Contrôle - - - + + + Home Origine - - - - - - - - - + + + + + + + + + ... ... - - + + Z-probe Palper Z - - + + Zero XY Zero XY - - + + Zero Z Zero Z - + + - Overriding @@ -367,48 +367,48 @@ - - + + Restore origin Restituez l'origine - - + + Safe position Position sûre - - + + Unlock Desbloquer - - + + Heightmap Palpage surfacique - - + + Use heightmap Utiliser palpage surfacique - + Map: Fichier: - + Absent Absent - - + + Create Créer @@ -417,27 +417,27 @@ Paramètres de palpage - - + + + - - - + + Spindle Broche - + Speed: Vitesse: - - - - - - + + + + + + Spindle on/off Broche on/off @@ -454,51 +454,51 @@ % - - + + + - Jog Contrôle manuel - - + + X- - - + + Y- - - + + X+ - - + + Y+ - + Step: Pas: - - + + Z+ - - + + Z- @@ -507,7 +507,7 @@ Pre-selection: - + User commands @@ -524,29 +524,29 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 @@ -566,233 +566,239 @@ - + + &Panels + + + + Modification - - + + Edit - - + + Show probe grid - - + + Show interpolation grid - + Device - - + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - - + + Keyboard control Contrôle avec le clavier - + Visualizer Apparence - + Console Console - + Send command Envoyer commande - - + + Clear console Effacer consôle - + User - + &Device - + &Modification - + &Visualizer - + &Console - + User command 1 - + User command 2 - + User command 3 - + User command 4 - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override - + &User - + &Lock windows - + L&ock panels @@ -817,212 +823,212 @@ &Aide - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Ouvrir - + E&xit Q&uitter - + &Settings &Reglages - + &New &Nouveau - + &Save &Enregistrer - + Save &as... Enregistrer &sous... - + &About &A propos de - + &Clear &Effacer - + Save &transformed as... Sauvez &transformé comme... - + Idle Idle - + Alarm Alarme - + Run Demarrer - + Hold Stop - + Queue En attente - - + + Check Vérifié - + Door Porte - + Unknown Inconnu - + Send from current line - + Feed rate: - + Rapid speed: Vitesse d'approche: - + Spindle speed: - + &Insert line &Inserer ligne - + &Delete lines &Effacer ligne - + Don't show again - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - + Command Comande - + Text - + Shortcuts - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1033,22 +1039,22 @@ %1, %2, %3 - + G-code program file was changed. Save? Le programme G-code à changé. Sauvegarder? - + Heightmap file was changed. Save? Le fichier surface de palpage a changé. Sauvegarder? - + Not connected Non connecté - + Probe Palper @@ -1057,7 +1063,7 @@ Connecté - + Job done. Time elapsed: %1 Travail terminé. @@ -1068,18 +1074,18 @@ Temps écoulé: %1 Traité - + Serial port error Erreur port serie - + Scroll Déplacement - + File sending in progress. Terminate and exit? Envoi de fichier en cours. Terminer et Sortir? @@ -1088,38 +1094,38 @@ Temps écoulé: %1 Envoyé - - - + + + Heightmap files (*.map) Fichier de palpage (*.map) - - + + Restore origin: %1, %2, %3 Restituez l'origine: %1, %2, %3 - + Port opened Le port s'est ouvert - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) G-Code fichiers (*.nc *.ncc *.ngc *.tap *.txt);;Tous les fichiers (*.*) - + Opening file... - - + + Can't open file: Impossible d'ouvrir du fichier: @@ -1134,57 +1140,57 @@ Temps écoulé: %1 Envoyé - + Delete lines? Effacer ligne? - - - + + + (%1) - + Updating... - + Untitled Sans titre - - - + + + Save file as Enregistrer le fichier sous - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) G-Code fichiers (*.nc *.ncc *.ngc *.tap *.txt) - + (%1/%2/%3) - + (%1/%2) - + C - + Changing grid settings will reset probe data. Continue? Changer les paramètres de la grille, réinitialise les données de palpage. Continuer? @@ -1316,7 +1322,7 @@ Temps écoulé: %1 - + Visualizer Apparence @@ -1424,13 +1430,11 @@ Temps écoulé: %1 Commande Saisie auto - Panels - Panneaux de contrôle + Panneaux de contrôle - Heightmap Palpage surfacique @@ -1443,14 +1447,12 @@ Temps écoulé: %1 Avance - Spindle - Broche + Broche - Jog - Contrôle manuel + Contrôle manuel @@ -1468,22 +1470,22 @@ Temps écoulé: %1 - + Colors Couleurs - + Z-movement: Mouvement Z: - + Normal: Normal: - + Toolpath Parcours d'outil @@ -1493,12 +1495,12 @@ Temps écoulé: %1 Par longueur - + Drawn: Dessin: - + Background: Fond: @@ -1557,7 +1559,6 @@ Temps écoulé: %1 - User commands @@ -1637,114 +1638,109 @@ Temps écoulé: %1 Modèle de l'outil - - Overriding - - - - + Highlight: Souligner: - + Start point: Origine: - + End point: Point final: - + Text: Texte: - + Tool: Outil: - - + + Shortcuts - + Command Comande - + Text - + Font Ecriture - + Size: Taille: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt Points - + (restart needed) (Redémarrage nécessaire) - + Set to defaults Paramètres par default - + OK ОК - + Cancel Annuler - + Reset settings to default values? Réinitialiser les réglages par défaut? diff --git a/src/translations/candle_pt.ts b/src/translations/candle_pt.ts index 409f5348..d11af8d8 100644 --- a/src/translations/candle_pt.ts +++ b/src/translations/candle_pt.ts @@ -115,37 +115,37 @@ Controle GRBL - + G-code program Programa de G-Code - - + + Isometric view Vista isométrica - - + + Top view Vista Superior - - + + Front view Vista Frontal - - + + Left view Vista Esquerda - - + + Fit Ajustar vista @@ -154,57 +154,57 @@ Ajuste de alturas - + Border: Bordas: - - - + + + X: X: - + H: H: - - - + + + Y: Y: - + W: W: - - + + Show border Mostrar borda - + Auto - + Probe grid: Grade de medição: - + Zb: Zн: - + Zt: Zв: @@ -213,17 +213,17 @@ Mostrar grade - + Interpolation grid: Grade de interpolação: - + Type: Tipo: - + Bicubic Bicúbico @@ -241,51 +241,51 @@ - - - - - + + + + + Open Abrir - - - + + + Reset Reiniciar - - + + Send Enviar - + Pause Pausar - - - - + + + + Abort Abortar - + State Estado - + Work coordinates: Coordenadas de trabalho: @@ -294,62 +294,62 @@ 0 - + Machine coordinates: Coordenadas da máquina: - + Status: Estado: - + Control Controle - - - + + + Home Origem - - - - - - - - - + + + + + + + + + ... ... - - + + Z-probe Medição de Z - - + + Zero XY Zero XY - - + + Zero Z Zero Z - + + - Overriding @@ -367,48 +367,48 @@ - - + + Restore origin Restaure a origem - - + + Safe position Posição segura - - + + Unlock Desbloquear - - + + Heightmap Mapa de alturas - - + + Use heightmap Usar mapa de alturas - + Map: Mapa: - + Absent Ausente - - + + Create Criar @@ -417,27 +417,27 @@ Modo edição - - + + + - - - + + Spindle Spindle - + Speed: Velocidade: - - - - - - + + + + + + Spindle on/off Spindle on/off @@ -454,51 +454,51 @@ % - - + + + - Jog Controle manual - - + + X- - - + + Y- - - + + X+ - - + + Y+ - + Step: Passos: - - + + Z+ - - + + Z- @@ -507,7 +507,7 @@ Presets: - + User commands @@ -524,29 +524,29 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 @@ -566,233 +566,239 @@ - + + &Panels + + + + Modification - - + + Edit - - + + Show probe grid - - + + Show interpolation grid - + Device - - + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - + + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - - + + Keyboard control Controle por teclado - + Visualizer Visualizador - + Console Console - + Send command Enviar comando - - + + Clear console Limpar cosole - + User - + &Device - + &Modification - + &Visualizer - + &Console - + User command 1 - + User command 2 - + User command 3 - + User command 4 - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override - + &User - + &Lock windows - + L&ock panels @@ -817,227 +823,227 @@ &Ajuda - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Abrir - + E&xit S&air - + &Settings &Opções - + &New &Novo - + &Save &Salvar - + Save &as... Salvar &como... - + &About &Sobre - + &Clear &Limpar - + Save &transformed as... Salvar &transformado como... - + Idle Inativo - + Alarm Alarme - + Run Iniciar - + Hold Manter - + Queue Em fila - - + + Check Checar - + Door Porta - + Unknown Desconhecido - + Send from current line - + Feed rate: - + Rapid speed: Velocidade de aproximação: - + Spindle speed: - + &Insert line &Inserir linha - + &Delete lines &Apagar linhas - + Don't show again - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + Skip - + Command Comando - + Text - + Shortcuts - + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1048,38 +1054,38 @@ %1, %2, %3 - + G-code program file was changed. Save? O programa G-code foi alterado. Deseja salvar? - + Heightmap file was changed. Save? O arquivo mapa de alturas foi alterado. Deseja salvar? - + Not connected Sem Conexão - + Probe Medição - + Opening file... - + Updating... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Arquivos G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1088,7 +1094,7 @@ Conectado - + Job done. Time elapsed: %1 Trabalho terminado. @@ -1099,18 +1105,18 @@ Tempo transcorrido: %1 Processado - + Serial port error Erro na porta serial - + Scroll Rolagem - + File sending in progress. Terminate and exit? Envio de arquivo en progreso. Terminar e sair? @@ -1127,33 +1133,33 @@ Tempo transcorrido: %1 Arquivos G-Code (*.nc *.ncc *.tap *.txt) - - - + + + Heightmap files (*.map) Mapa de alturas (*.map) - + Port opened Porta aberta - - + + Restore origin: %1, %2, %3 Restaure origem: %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Arquivos G-Code (*.nc *.ncc *.tap *.txt);;Todos os arquivos (*.*) - - + + Can't open file: Não foi possível abrir o arquivo: @@ -1168,26 +1174,26 @@ Tempo transcorrido: %1 Enviado - + Delete lines? Apagar linhas? - - - + + + (%1) - + Untitled Sem-título - - - + + + Save file as Salvar arquivo como @@ -1196,7 +1202,7 @@ Tempo transcorrido: %1 Arquivos G-Code (*.nc;*.ncc;*.tap) - + Changing grid settings will reset probe data. Continue? A alteração nas configurações de grade reiniciará os dados de medição. Deseja continuar? @@ -1332,7 +1338,7 @@ Tempo transcorrido: %1 - + Visualizer Visualizador @@ -1440,13 +1446,11 @@ Tempo transcorrido: %1 Autocompletar comandos - Panels - Painéis + Painéis - Heightmap Mapa de altura @@ -1455,14 +1459,8 @@ Tempo transcorrido: %1 Avanço - - Spindle - - - - Jog - Controle manual + Controle manual @@ -1480,22 +1478,22 @@ Tempo transcorrido: %1 - + Colors Cores - + Z-movement: Movimento em Z: - + Normal: Normal: - + Toolpath Caminho da ferramenta @@ -1505,12 +1503,12 @@ Tempo transcorrido: %1 por tamanho - + Drawn: Desenhado: - + Background: Fundo: @@ -1573,7 +1571,6 @@ Tempo transcorrido: %1 - User commands @@ -1653,114 +1650,109 @@ Tempo transcorrido: %1 Modelo da ferramenta - - Overriding - - - - + Highlight: Realçado: - + Start point: Origem: - + End point: Ponto final: - + Text: Texto: - + Tool: Ferramenta: - - + + Shortcuts - + Command Comando - + Text - + Font Fonte - + Size: Tamanho: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt - + (restart needed) (Requer reinicio) - + Set to defaults Opções padrão - + OK ОК - + Cancel Cancelar - + Reset settings to default values? Redefinir as configurações para os valores padrão? diff --git a/src/translations/candle_ru.qm b/src/translations/candle_ru.qm index 8c8a5ec852470346be33324cce3bb495792d528e..b38d92840847379c0a26e06da2f3e66f1714451b 100644 GIT binary patch delta 2326 zcmXAq2~%{KTt*5GL;8aip?PJr<0CasJh9x&mcBG1`R-L zJq9@a1EO^S;Py7eDL%)o7ovAPF!3nF%^A%9#6DiU2PjWK{1gCq?qhJW6GAfy|ahH)fup4kOA*=9vU_vi)PI2A+OUw-P1d{tO zb88J?4H$)4A&e~bJZ3HBhSXm$t7ZcbunDtIp8x`*FuR)%3Oa*)rwSmm3i*q9FiVO2 z`Z`AZ!p`t($Zv>eq%p|vp`Gm6c&+F;c@?j#d5+opojDe)?5F+V=TKVdNexV%hrhJ* zL8!$6{ShF%2FKS?JpRkj?bc2W{Dfy0v#9=dh4B$1aZXiu_Z}a=^dL+0i!%I%C-2`@M((=6{T0fh?}h`R)yger^QoyJ<&LLonYs{< z>N6^LYrL{=E4OFuSN3mujfs-Ux#S#G>IPdO(p4GvSkcIHsyUa>0wY^gl`fRp=rq;t z?qQU1u4?b#Jodv%Rh#Au=3%37Z(~^T$3)QW>y-9o5t`sgsq2I}n>{wNSS&jK4h#9N zSYF!ALgd~QZ~07NmmU@6HYqti66+r^adF>@ZGI9f`MTJZc^VjBB6ej50>iw-q1bBP zeX?VsqM?U{aeXG*wlR>z??k7}JSOVIJq4wzs~1C^cNySaDQf!=FeyTcR-^+y zE2Nop#0vjs(!$|~ff47VB_C3fsa4X_u`Ebxq*OYrgT1my+I)oTX+u(VGZUITSK8T_ z0_5zMYTxH%7~?1H$>Q(nW28O51yC7!>En<7!1Z3~kWG4_p;F^<2Bf?tHJ)5WMLd?e zVkl8_o%G+aMQp}|0qN&BHj61-tx|tY&HhQP-;vKsMX0^{NuQDG;45W3U{H^1Tgy_6 zP%kX;pu}FNi(566<^}bdqA&j~$Ma?D?-wq0_J#31a?zn8iteVJiJ5Xy{RTi*$VKg56j_R$iEHH**>AG8 z1@cat0`7szYmcHK6XY@K{Ic_H5lSM1CwlJ6-PfZsH$ zPL#8oGvjn4?meeETXjovTo~abUGakjoQvmmow+()YgPs4-4Izz z4aJkpK*F132id5*P{l3?>et;WV*om5-4CW69Kh4azmkn)we2-!2EYrO_O@nDi ztDkDzt;_Yxn&_5it$x*yJm%A&KV0C(gy!lGuRXvi_Kv=z^#XgKSKskXDcuazpHh(N z$Mw`Sn=@2D=tspkW$K3%o}3cf4Sp-~s5FZq!X=!_xot>z!1zPv8`5k3$zgZUuy`*e zKKcWLb$K(VLdFThx>#1oH^R`OzfQw%81DB|({haA!O8$O*Ji_4Yq?QhX83v|rR93W zC|aiT&8RXucirJDc)c-gYB`(wr7`0M^E2FNoZG|k7TQO0yoJRW%LWJ8LtBhp7CIar zX1ssDnE9+RKD;smW|%&3G?|&uv5F**m96(VQ^(nAGeyW4-u4 DtpQ5P delta 2407 zcmXAr2~<;e7RJ9M?Nrj-C{i6lt5%BW z;6$wAQn5vG85L1PWYkfa7V0u1wl1eAcI=3XdYsXo9^B?j!%5CBFYo`q@80iz_aE*Y zQtWP0)Oc9E0R-}G{|g5Uzat~bU&t81oJX4Z`iPtWxXuSu<9UC%gV9&W1R(kunaC}1 zC#n=+}VmK2+g$#fCvO!5+93s%$&2L)A%| zw?e4=H?s(aP|YM<{sf_=0PswQaFWmStcP%Al@%Dj0>byx$b;lMKzR(p&%*)Vg(O?y zy9vUJAo2{v;3@1vJ491517C+2GY0T~4sk9M4b(&2mIVAJh-5s)N{G9-%=k5hodt{v zgLr^#8g<0MjB5}(#j}*@zD=(TwyuM*lUMpM7%#Iv{X9gJvW}RK5z%4iZbTio^ATe9 z+Us*e%BGF%a0Pju9UX*}+xEIjkQ%}=obMxbE%l219BB`?0&W9HFZ>@ct{#(4^7}#i zkrU(tB;G?#buC~Ge2m->)|DKC-1%IP{72;0t_FtZU`G2fAV`53oqW)UYUI0A0qJVw zzt4^7%aGsLzG^cdK&8U)BP(%rS9k|r0Q}k%el|1U z{=MR^Qyq}7T3=h@~RILPgjO-KF9TW%A)^z0igxT&ravlQJ0h( z9+lGx!S|GVewEUu+-LlRl3rAvfAD}EPgLHnW`GQfvTx11%=iX5lM;rgl2+SW;-yOM zVTZ$ORC(WUUfx=%TI){h`Fp6gcDm8t1FG%)^t-rN)vCEfWu^;*T3P6ra$&^vZd(3x zAvDhF%z!rqQwE3cEweE9?8ofkRAEtZCop-XuyiOVcE}2$%x*2`CSlc&l+t`!SRWv= za-*<0tsNK}Cv46LqB0MK-BC7PFA^GC8vu_q;lO3K%HxdCx}Jr^|6MpGQQ2`fg&qa1 zt7{bASWn$#g=@rj{`>}**dRtIQh=fHVvaqLz%$|;uRXxv8gbsF(LmBwao!f1HCZjr zk7lcq%wn-y8)qm|tlY=%CoU0f&6GMZRNQ!Y0u```b(=zgkf-9dbly+-LfrOxI6Wha zUw$#2GgB{GciUZQd?6k_!pfA_#KXr+XqF>lMz*^gw~MWg52*#}e`WB7E>Hb%!djXrl;k)CeX4%4Vk#H5XoS~0DCN(Z&|n6h zd_@!f=qjgVu*U2&Kw34)rlB<5dzudud?@uBP4%fRdT5EJwl9qLFKFs`93rYw(^S$% z1#ddV{f7$1TPvN)?(&2AiBpy3JEY92y7rCJKr0h+Y0!?`O7o2E*3LV?z%ISo zkD6$*kOpnl`88}&rGrVEwL6NrK6S6QejVK(m8b2zNKeRTwcSQ0u6&{GKf`JA)k^XX zJ}-HPBUgF@`9a7P5 zw#L1|!FX?}sBtwQDWswkL#ULSgYg#WgN!8{yHO6NACorP3yCmEJ2SgD|K9(Q8r#Qk z?z^P}mpLBN3h9JyJ;y3jI-NL&KO`t$*dp&K-^FtzOKxj9$LX-jZBMN1wfsyzsUTBBWQW^d$o&B{lZ&_fM&U!V z#pwe+$f5}~`cdv9X{ug*TrZUfG3irkzvC1X>)+o__xsP)TNlv-X-0iT6k9gzwf?Bw zO@;30Z}rjbQl!3j@o frmMain - + G-code program G-code программа - - + + Isometric view Изометрия - - + + Top view Вид сверху - - + + Front view Вид спереди - - + + Left view Вид слева - - + + Fit Вписать @@ -178,57 +178,57 @@ Настройки карты высот - + Border: Границы: - - - + + + X: - + H: В: - + W: Ш: - - - + + + Y: - + Auto Авто - - + + Show border Показать границы - + Probe grid: Сетка зондирования: - + Zb: Zн: - + Zt: Zв: @@ -237,17 +237,17 @@ Показать сетку - + Interpolation grid: Сетка интерполяции: - + Type: Тип: - + Bicubic Бикубический @@ -264,12 +264,12 @@ Автопрокрутка - + State Состояние - + Control Управление @@ -287,14 +287,14 @@ &Недавние файлы - + &Open &Открыть - - + + Send Отправить @@ -308,48 +308,48 @@ - - - + + + Reset Сброс - + Pause Пауза - + Work coordinates: Рабочие координаты: - + Machine coordinates: Машинные координаты: - + Status: Статус: - + Not connected Нет соединения - - - - - - - - - + + + + + + + + + ... @@ -358,14 +358,14 @@ Поиск стола - - + + Zero XY Обнулить XY - - + + Zero Z Обнулить Z @@ -374,8 +374,8 @@ Вернуться в XY(Z) - - + + Z-probe Z-щуп @@ -384,36 +384,36 @@ Безопасная Z - - + + Unlock Разблокировать - - + + Heightmap Карта высот - - + + Use heightmap Использовать карту высот - + Map: Карта: - + Absent Отсутствует - - + + Create Создать @@ -422,27 +422,27 @@ Редактирование - - + + + - - - + + Spindle Шпиндель - + Speed: Скорость: - - - - - - + + + + + + Spindle on/off Вкл/выкл шпиндель @@ -455,21 +455,21 @@ Переопределить: - - + + + - Jog Перемещение - + Step: Шаг: - - + + X- @@ -480,59 +480,59 @@ - - - - + + + + Abort Прервать - - + + Restore origin Восстановить СК - - + + Safe position Безопасное положение - + + - Overriding Коррекция - - + + Y- - - + + X+ - - + + Y+ - - + + Z+ - - + + Z- @@ -541,97 +541,98 @@ Уставки: - + User commands Команды - - + + Stop Стоп - + Continuously Непрерывно - + 0.01 - + 0.1 - + + 1 - + 5 - - + + 10 - - + + 100 - + Feed: Подача: - + 500 - + 50 - + 1000 - + 2000 - - + + Keyboard control Управление с клавиатуры - + Console Консоль - + Send command Отправить команду - - + + Clear console Очистить консоль @@ -666,399 +667,404 @@ &Окна - + + &Panels + &Панели + + + Modification Модификация - - + + Edit Редактирование - - + + Show probe grid Показать сетку зондирования - - + + Show interpolation grid Показать сетку интерполяции - + Device Устройство - + Visualizer Визуализатор - + _spacerTop - + _spacerLeft - + _spacerRight - + User Пользователь - + E&xit Вы&ход - + &Settings &Настройки - + User command 1 Пользовательская команда 1 - + User command 2 Пользовательская команда 2 - + User command 3 Пользовательская команда 3 - + User command 4 Пользовательская команда 4 - + Spindle speed + Скорость шпинделя + - + Spindle speed - Скорость шпинделя - - + Jog step next Шаг перемещения следующий - + Jog step previous Шаг перемещения предыдущий - + Jog feed next Подача перемещения следующая - + Jog feed previous Подача перемещения предыдущая - + Feed override + Коррекция подачи + - + Feed override - Коррекция подачи - - + Rapid override + Коррекция перемещений + - + Rapid override - Коррекция перемещений - - + Spindle override + Коррекция шпинделя + - + Spindle override - Коррекция шпинделя - - + Feed override Коррекция подачи - + Rapid speed override Коррекция быстрых перемещений - + Spindle speed override Коррекция скорости шпинделя - + &User &Пользователь - + &Lock windows &Зафиксировать окна - + L&ock panels З&афиксировать панели - + &New &Новый - + &Save &Сохранить - + Save &as... Сохранить &как... - + &About &О программе - + &Clear &Очистить - + Save &transformed as... Сохранить &преобразованный как... - + &Device &Устройство - + &Modification &Модификация - + &Visualizer &Визуализатор - + &Console &Консоль - + Idle Готов - + Alarm Тревога - + Run Работа - - - + + + Home Домой - + Hold Пауза - + Queue Пауза - - + + Check Проверка - + Door Дверь - + Unknown Неизвестно - + Send from current line Отправить с текущей строки - + Feed rate: Подача: - + Rapid speed: Холостой ход: - + Spindle speed: Шпиндель: - + &Insert line &Вставить строку - + &Delete lines &Удалить строки - + Don't show again Больше не показывать - + PS: %1 СВ: %1 - + AS: %1 СУ: %1 - + F/S: %1 / %2 П/Ш: %1 / %2 - + Error message(s) received: Ошибка(и) при передаче файла: - + Buffer: %1 / %2 / %3 Буфер: %1 / %2 / %3 - + Following commands will be sent before selected line: Следующие команды будут отправлены перед выбранной строкой: - + Skip Пропустить - + Command Команда - + Text Текст - + Shortcuts Быстрые клавиши - + (%1/%2/%3) - + (%1/%2) - + C Н - + Applying heightmap... Применяется карты высот... - + Subdividing segments... Разбиение отрезков... - + Updating Z-coordinates... Обновление Z-координат... - + Modifying G-code program... Правка G-код программы... @@ -1069,23 +1075,23 @@ %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Файлы G-Code (*.nc *.ncc *.ngc *.tap *.txt);;Все файлы (*.*) - + Opening file... Загрузка файла... - + Updating... Обновление... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Файлы G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1094,7 +1100,7 @@ Файл был изменен. Сохранить? - + Job done. Time elapsed: %1 Задание выполнено. @@ -1109,26 +1115,26 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap *.txt);;Все файлы (*.*) - + Delete lines? Удалить строки? - + Scroll Прокрутка - - + + Restore origin: %1, %2, %3 Восстановить СК: %1, %2, %3 - + File sending in progress. Terminate and exit? Идет процесс отправки файла. Прервать и выйти из программы? @@ -1137,15 +1143,15 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap);;Все файлы (*.*) - - - + + + Heightmap files (*.map) Файлы карт высот (*.map) - - + + Can't open file: Ошибка при открытии файла: @@ -1156,14 +1162,14 @@ Time elapsed: %1 Отправлена - - - + + + (%1) - + Untitled Без имени @@ -1172,7 +1178,7 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap *.txt) - + Changing grid settings will reset probe data. Continue? Изменение сетки зондирования приведет к очистке табличных данных. Продолжить? @@ -1181,22 +1187,22 @@ Time elapsed: %1 Подключен - + G-code program file was changed. Save? Файл G-code программы был изменен. Сохранить? - + Heightmap file was changed. Save? Файл карты высот был изменен. Сохранить? - + Probe Зонд - + Port opened Порт открыт @@ -1205,7 +1211,7 @@ Time elapsed: %1 Обработана - + Serial port error Ошибка последовательного порта @@ -1214,19 +1220,19 @@ Time elapsed: %1 Буфер/очередь: %1 / %2 - - - + + + Save file as Сохранить файл как - - - - - + + + + + Open Открыть @@ -1364,7 +1370,7 @@ Time elapsed: %1 - + Visualizer Визуализатор @@ -1414,7 +1420,6 @@ Time elapsed: %1 - User commands Команды @@ -1484,42 +1489,41 @@ Time elapsed: %1 Отображать команды интерфейса пользователя - Overriding - Коррекция + Коррекция - + Colors Цвета - + Normal: Основной: - + Toolpath Траектория - + Drawn: Выполненная: - + Tool: Фреза: - + Highlight: Подсветка: - + Z-movement: Z-перемещения: @@ -1528,17 +1532,17 @@ Time elapsed: %1 (Используется визуализатором и процедурой преобразования файлов в соответствии с картой высот) - + Start point: Начало: - + End point: Конец: - + Background: Фон: @@ -1565,74 +1569,74 @@ Time elapsed: %1 Длина сегмента (мм): - + Text: Текст: - - + + Shortcuts Быстрые клавиши - + Command Команда - + Text Текст - + Font Шрифт - + Size: Размер: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt пт - + (restart needed) (необходим перезапуск) - + Set to defaults По умолчанию @@ -1847,13 +1851,11 @@ Time elapsed: %1 (используется визуализатором и процедурой преобразования файлов в соответствии с картой высот) - Panels - Панели + Панели - Heightmap Карта высот @@ -1862,14 +1864,12 @@ Time elapsed: %1 Подача - Spindle - Шпиндель + Шпиндель - Jog - Перемещение + Перемещение Keyboard control @@ -1885,17 +1885,17 @@ Time elapsed: %1 Отображать команды G-code программы в консоли - + OK ОК - + Cancel Отмена - + Reset settings to default values? Восстановить значения по-умолчанию? diff --git a/src/widgets/dropwidget.cpp b/src/widgets/dropwidget.cpp index dcdd0c6b..b6641477 100644 --- a/src/widgets/dropwidget.cpp +++ b/src/widgets/dropwidget.cpp @@ -30,7 +30,10 @@ QStringList DropWidget::saveState() QStringList sl; QVBoxLayout *lo = static_cast(layout()); - for (int i = 0; i < lo->count(); i++) sl << lo->itemAt(i)->widget()->objectName(); + for (int i = 0; i < lo->count(); i++) { + QString n = lo->itemAt(i)->widget()->objectName(); + if (n.startsWith("grp")) sl << n; + } return sl; } diff --git a/src/widgets/sliderbox.h b/src/widgets/sliderbox.h index b126478f..8b2380f0 100644 --- a/src/widgets/sliderbox.h +++ b/src/widgets/sliderbox.h @@ -11,6 +11,17 @@ class SliderBox; class SliderBox : public QWidget { Q_OBJECT + Q_PROPERTY(int value READ value WRITE setValue) + Q_PROPERTY(int currentValue READ currentValue WRITE setCurrentValue) + Q_PROPERTY(int sliderPosition READ sliderPosition WRITE setSliderPosition) + Q_PROPERTY(bool isCheckable READ isCheckable WRITE setCheckable) + Q_PROPERTY(bool isChecked READ isChecked WRITE setChecked) + Q_PROPERTY(int ratio READ ratio WRITE setRatio) + Q_PROPERTY(int minimum READ minimum WRITE setMinimum) + Q_PROPERTY(int maximum READ maximum WRITE setMaximum) + Q_PROPERTY(QString suffix READ suffix WRITE setSuffix) + Q_PROPERTY(QString title READ title WRITE setTitle) + public: explicit SliderBox(QWidget *parent = 0); ~SliderBox(); diff --git a/src/widgets/styledtoolbutton.h b/src/widgets/styledtoolbutton.h index 18360deb..ffcb8597 100644 --- a/src/widgets/styledtoolbutton.h +++ b/src/widgets/styledtoolbutton.h @@ -14,6 +14,9 @@ class StyledToolButton : public QToolButton { Q_OBJECT + Q_PROPERTY(QColor backgroundColor READ backColor WRITE setBackColor) + Q_PROPERTY(QColor foregroundColor READ foreColor WRITE setForeColor) + Q_PROPERTY(QColor highlightColor READ highlightColor WRITE setHighlightColor) public: explicit StyledToolButton(QWidget *parent = 0); diff --git a/src/widgets/uiloader.cpp b/src/widgets/uiloader.cpp new file mode 100644 index 00000000..8b239568 --- /dev/null +++ b/src/widgets/uiloader.cpp @@ -0,0 +1,23 @@ +#include "uiloader.h" +#include "styledtoolbutton.h" +#include "sliderbox.h" + +UiLoader::UiLoader(QObject *parent): QUiLoader(parent) +{ +} + +QWidget *UiLoader::createWidget(const QString &className, QWidget *parent, const QString &name) +{ + // Custom widgets + if (className == "StyledToolButton") { + StyledToolButton *w = new StyledToolButton(parent); + w->setObjectName(name); + return w; + } else if (className == "SliderBox") { + SliderBox *w = new SliderBox(parent); + w->setObjectName(name); + return w; + } + + return QUiLoader::createWidget(className, parent, name); +} \ No newline at end of file diff --git a/src/widgets/uiloader.h b/src/widgets/uiloader.h new file mode 100644 index 00000000..1a270ef7 --- /dev/null +++ b/src/widgets/uiloader.h @@ -0,0 +1,15 @@ +#ifndef UILOADER_H +#define UILOADER_H + +#include + +class UiLoader: public QUiLoader +{ + Q_OBJECT +public: + UiLoader(QObject *parent = 0); + + QWidget *createWidget(const QString &className, QWidget *parent = 0, const QString &name = QString()) override; +}; + +#endif \ No newline at end of file From b02557144ed79a30c5a65934555265e652daf7c1 Mon Sep 17 00:00:00 2001 From: Denvi Date: Fri, 8 Nov 2019 18:01:30 +0500 Subject: [PATCH 23/80] Plugins can save/restore values now. --- src/frmmain.cpp | 16 ++++++++++++++++ src/frmmain.h | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/frmmain.cpp b/src/frmmain.cpp index d08c11ca..316662dd 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -4096,6 +4096,22 @@ void frmMain::loadPlugins() } } +void frmMain::saveValue(QString key, QVariant value) +{ + QSettings set(m_settingsFileName, QSettings::IniFormat); + set.setIniCodec("UTF-8"); + + set.setValue(key, value); +} + +QVariant frmMain::restoreValue(QString key) +{ + QSettings set(m_settingsFileName, QSettings::IniFormat); + set.setIniCodec("UTF-8"); + + return set.value(key); +} + void frmMain::on_cmdYPlus_pressed() { m_jogVector += QVector3D(0, 1, 0); diff --git a/src/frmmain.h b/src/frmmain.h index 9354625b..2e83f594 100644 --- a/src/frmmain.h +++ b/src/frmmain.h @@ -90,7 +90,9 @@ class frmMain : public QMainWindow ~frmMain(); Q_INVOKABLE void sendCommand(QString command, int tableIndex = -1, bool showInConsole = true, bool queue = false); - + Q_INVOKABLE void saveValue(QString key, QVariant value); + Q_INVOKABLE QVariant restoreValue(QString key); + double toolZPosition(); signals: From d55944805801be36b5535366ce61590f4d879fdd Mon Sep 17 00:00:00 2001 From: Denvi Date: Fri, 8 Nov 2019 18:43:03 +0500 Subject: [PATCH 24/80] Sample plugin added. --- src/plugins/test1/config.ini | 3 + src/plugins/test1/images/tool.png | Bin 0 -> 543 bytes src/plugins/test1/script.js | 13 ++++ src/plugins/test1/translation_ru.qm | Bin 0 -> 240 bytes src/plugins/test1/translation_ru.ts | 22 ++++++ src/plugins/test1/widget.ui | 108 ++++++++++++++++++++++++++++ 6 files changed, 146 insertions(+) create mode 100644 src/plugins/test1/config.ini create mode 100644 src/plugins/test1/images/tool.png create mode 100644 src/plugins/test1/script.js create mode 100644 src/plugins/test1/translation_ru.qm create mode 100644 src/plugins/test1/translation_ru.ts create mode 100644 src/plugins/test1/widget.ui diff --git a/src/plugins/test1/config.ini b/src/plugins/test1/config.ini new file mode 100644 index 00000000..dac9e433 --- /dev/null +++ b/src/plugins/test1/config.ini @@ -0,0 +1,3 @@ +[General] +title="Test plugin 1" +name="TestPlugin1" \ No newline at end of file diff --git a/src/plugins/test1/images/tool.png b/src/plugins/test1/images/tool.png new file mode 100644 index 0000000000000000000000000000000000000000..506158a3e91c905a7ee03b3862f284463fe6a8b5 GIT binary patch literal 543 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=EX7WqAsj$Z!;#Vf4nJ za0`PlBg3pY5)2HC2R&UJLn`LHogM4NY$(!d-~C!(>Foxm=WW>=jcyt1CVCS-+u>EFPtoVtp#iN9>k z=10pnZ0=!fKXZSXz`D@g`$}sW!sfc_^c5ez5fhaZQJI64AMgMqUI-G{0W>oUZrv=^xvYPx8<@-w z7<{{AP?mdTqsJj`Ui~Rw?{igfKg&~oe8`)3>&)2yhCxpjCfo~7xmU~GsC;JKex|r) zrT8b&iM)SUisyBzr+;K)h+(|%xG+Tf$fEz8Fm39TfWe zimCd_`K?W+zkFG~t(c$1n*C)qXHKmBHLi{6I={{W#pJU=Vq9+mfnw8MEN9tPw`yWm z>!la`f1;TmIl?g2h`-vV#%PuV$Wg?w9uHvg2k3Wfx!@NB`?Sp pg@T;Y^vpa3Ly*1fX+^odiJ5tf9Y7ARAmd+6?*Af8EPr*lgaIjwEFS;> literal 0 HcmV?d00001 diff --git a/src/plugins/test1/translation_ru.ts b/src/plugins/test1/translation_ru.ts new file mode 100644 index 00000000..df598f4b --- /dev/null +++ b/src/plugins/test1/translation_ru.ts @@ -0,0 +1,22 @@ + + + + + frmMain + + Test plugin 1 + Тестовый плагин 1 + + + + Test1 + + Command: + Команда: + + + Response: + Ответ: + + + \ No newline at end of file diff --git a/src/plugins/test1/widget.ui b/src/plugins/test1/widget.ui new file mode 100644 index 00000000..32a1ad85 --- /dev/null +++ b/src/plugins/test1/widget.ui @@ -0,0 +1,108 @@ + + + Test1 + + + + 0 + 0 + 400 + 300 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + Command: + + + + + + + + + + + + ... + + + + images/tool.pngimages/tool.png + + + true + + + + + + + + + Response: + + + + + + + true + + + + + + + &Send + + + + + + StyledToolButton + QToolButton +
styledtoolbutton.h
+
+
+ + + + actPluginTest1Send + triggered() + cmdTest + click() + + + -1 + -1 + + + 383 + 27 + + + + +
From 85a37e47ac1dce40be31f5548fd7e4e8feeaec1d Mon Sep 17 00:00:00 2001 From: Denvi Date: Fri, 8 Nov 2019 20:02:05 +0500 Subject: [PATCH 25/80] Added signals for settings load/save. --- src/frmmain.cpp | 4 ++++ src/frmmain.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 316662dd..4b931e3d 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -617,6 +617,8 @@ void frmMain::loadSettings() if (a) a->setShortcuts(m.values().at(i)); } + emit settingsLoaded(); + m_settingsLoading = false; } @@ -760,6 +762,8 @@ void frmMain::saveSettings() // Menu set.setValue("lockWindows", ui->actViewLockWindows->isChecked()); set.setValue("lockPanels", ui->actViewLockPanels->isChecked()); + + emit settingsSaved(); } bool frmMain::saveChanges(bool heightMapMode) diff --git a/src/frmmain.h b/src/frmmain.h index 2e83f594..678ffc1d 100644 --- a/src/frmmain.h +++ b/src/frmmain.h @@ -98,6 +98,8 @@ class frmMain : public QMainWindow signals: void responseReceived(QString command, int tableIndex, QString response); + void settingsSaved(); + void settingsLoaded(); private slots: void updateHeightMapInterpolationDrawer(bool reset = false); From 947ebf22aaafa14e8f6d306ed2e1f2c5d07ab2c7 Mon Sep 17 00:00:00 2001 From: Denvi Date: Fri, 8 Nov 2019 21:16:48 +0500 Subject: [PATCH 26/80] Fps set fix. --- src/frmmain.cpp | 1 + src/widgets/glwidget.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 4b931e3d..d263d421 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -4094,6 +4094,7 @@ void frmMain::loadPlugins() // Run script QString script = f.readAll(); qDebug() << "Running plugin:" << p << se->evaluate(script).toString(); + qDebug() << se->uncaughtExceptionBacktrace(); f.close(); } diff --git a/src/widgets/glwidget.cpp b/src/widgets/glwidget.cpp index 4b4e0fce..f14e790b 100644 --- a/src/widgets/glwidget.cpp +++ b/src/widgets/glwidget.cpp @@ -337,6 +337,7 @@ void GLWidget::setFps(int fps) { if (fps <= 0) return; m_targetFps = fps; + setUpdatesEnabled(m_updatesEnabled); } QTime GLWidget::estimatedTime() const From 67bc3f5c006bc5cf862ddf694fba2d326dbb6dfb Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 9 Nov 2019 11:27:32 +0500 Subject: [PATCH 27/80] Some fixes for imperial system. --- src/frmmain.cpp | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/frmmain.cpp b/src/frmmain.cpp index d263d421..d3d216ee 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -2182,12 +2182,17 @@ void frmMain::storeOffsets() void frmMain::restoreOffsets() { // Still have pre-reset working position - sendCommand(QString("G21G53G90X%1Y%2Z%3").arg(toMetric(ui->txtMPosX->value())) - .arg(toMetric(ui->txtMPosY->value())) - .arg(toMetric(ui->txtMPosZ->value())), -2, m_settings->showUICommands()); - sendCommand(QString("G21G92X%1Y%2Z%3").arg(toMetric(ui->txtWPosX->value())) - .arg(toMetric(ui->txtWPosY->value())) - .arg(toMetric(ui->txtWPosZ->value())), -2, m_settings->showUICommands()); + sendCommand(QString("%4G53G90X%1Y%2Z%3").arg(ui->txtMPosX->value()) + .arg(ui->txtMPosY->value()) + .arg(ui->txtMPosZ->value()) + .arg(m_settings->units() ? "G20" : "G21"), + -2, m_settings->showUICommands()); + + sendCommand(QString("%4G92X%1Y%2Z%3").arg(ui->txtWPosX->value()) + .arg(ui->txtWPosY->value()) + .arg(ui->txtWPosZ->value()) + .arg(m_settings->units() ? "G20" : "G21"), + -2, m_settings->showUICommands()); } void frmMain::storeOffsetsVars(QString response) @@ -2604,16 +2609,20 @@ void frmMain::on_cmdZeroZ_clicked() void frmMain::on_cmdRestoreOrigin_clicked() { // Restore offset - sendCommand(QString("G21G53G90G0X%1Y%2Z%3").arg(toMetric(ui->txtMPosX->value())) - .arg(toMetric(ui->txtMPosY->value())) - .arg(toMetric(ui->txtMPosZ->value())), -2, m_settings->showUICommands()); + sendCommand(QString("%4G53G90G0X%1Y%2Z%3").arg(ui->txtMPosX->value()) + .arg(ui->txtMPosY->value()) + .arg(ui->txtMPosZ->value()) + .arg(m_settings->units() ? "G20" : "G21"), + -2, m_settings->showUICommands()); m_storedVars.setCS(m_storedCS); sendCommand("$#", -2, m_settings->showUICommands()); sendCommand("{vars.CS}", -2, m_settings->showUICommands(), true); - sendCommand(QString("G21G92X{%1 - vars.x}Y{%2 - vars.y}Z{%3 - vars.z}").arg(toMetric(ui->txtMPosX->text().toDouble()) - m_storedX) - .arg(toMetric(ui->txtMPosY->text().toDouble()) - m_storedY) - .arg(toMetric(ui->txtMPosZ->text().toDouble()) - m_storedZ), + sendCommand(QString("%4G92X{%1 - vars.x}Y{%2 - vars.y}Z{%3 - vars.z}") + .arg(ui->txtMPosX->value() - m_storedX) + .arg(ui->txtMPosY->value() - m_storedY) + .arg(ui->txtMPosZ->value() - m_storedZ) + .arg(m_settings->units() ? "G20" : "G21"), -2, m_settings->showUICommands(), true); // Move tool From 9d8c4bf73d17e81ae22d058377d812f70b9e2a60 Mon Sep 17 00:00:00 2001 From: Denvi Date: Wed, 13 Nov 2019 18:56:20 +0500 Subject: [PATCH 28/80] Plugin settings saved & loaded now automatically. --- src/frmmain.cpp | 57 +++++++----- src/frmmain.h | 7 +- src/frmsettings.cpp | 134 +++++++++++++++++++++------- src/frmsettings.h | 11 +++ src/plugins/test1/script.js | 22 ++++- src/plugins/test1/settings.ui | 43 +++++++++ src/plugins/test1/translation_ru.qm | Bin 240 -> 329 bytes src/plugins/test1/translation_ru.ts | 7 +- 8 files changed, 224 insertions(+), 57 deletions(-) create mode 100644 src/plugins/test1/settings.ui diff --git a/src/frmmain.cpp b/src/frmmain.cpp index d3d216ee..8318b437 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -553,6 +553,10 @@ void frmMain::loadSettings() // Load plugins loadPlugins(); + // Load custom settings + m_settings->loadCustomSettings(set); + emit settingsLoaded(); + // Adjust docks width int w = qMax(ui->dockDevice->widget()->sizeHint().width(), ui->dockModification->widget()->sizeHint().width()); @@ -617,8 +621,6 @@ void frmMain::loadSettings() if (a) a->setShortcuts(m.values().at(i)); } - emit settingsLoaded(); - m_settingsLoading = false; } @@ -763,7 +765,9 @@ void frmMain::saveSettings() set.setValue("lockWindows", ui->actViewLockWindows->isChecked()); set.setValue("lockPanels", ui->actViewLockPanels->isChecked()); - emit settingsSaved(); + // Custom settings + emit settingsAboutToSave(); + m_settings->saveCustomSettings(set); } bool frmMain::saveChanges(bool heightMapMode) @@ -2404,6 +2408,8 @@ void frmMain::on_actServiceSettings_triggered() acts[i]->setShortcut(QKeySequence(table->item(i, 2)->data(Qt::DisplayRole).toString())); } + emit settingsChanged(); + } else { m_settings->undo(); } @@ -4070,6 +4076,27 @@ void frmMain::loadPlugins() static_cast(ui->scrollContentsUser->layout())->insertWidget(0, box); } + // Settings ui + QWidget *settingsWidget = 0; + f.setFileName(pluginsDir + p + "/settings.ui"); + if (f.open(QFile::ReadOnly)) { + // Load settings widget + uiLoader.setWorkingDirectory(pluginsDir + p); + settingsWidget = uiLoader.load(&f, this); + f.close(); + + // Create groupbox + GroupBox *box = new GroupBox(m_settings); + QVBoxLayout *layout1 = new QVBoxLayout(box); + box->setObjectName("grpSettings" + name); + box->setTitle(tr(title.toLatin1())); + box->setLayout(layout1); + layout1->addWidget(settingsWidget); + + // Add to settings form + m_settings->addCustomSettings(box); + } + // Delegate actions to main form QList acts = widget->findChildren(); foreach (QAction *a, acts) addAction(a); @@ -4085,13 +4112,19 @@ void frmMain::loadPlugins() se->globalObject().setProperty("ui", sw); } + // Settings ui + if (settingsWidget) { + QScriptValue setw = se->newQObject(settingsWidget); + se->globalObject().setProperty("settings", setw); + } + // Main form QScriptValue main = se->newQObject(this); se->globalObject().setProperty("main", main); // Settings QScriptValue settings = se->newQObject(m_settings); - se->globalObject().setProperty("settings", settings); + se->globalObject().setProperty("mainSettings", settings); // Stored vars QScriptValue vars = se->newQObject(&m_storedVars); @@ -4110,22 +4143,6 @@ void frmMain::loadPlugins() } } -void frmMain::saveValue(QString key, QVariant value) -{ - QSettings set(m_settingsFileName, QSettings::IniFormat); - set.setIniCodec("UTF-8"); - - set.setValue(key, value); -} - -QVariant frmMain::restoreValue(QString key) -{ - QSettings set(m_settingsFileName, QSettings::IniFormat); - set.setIniCodec("UTF-8"); - - return set.value(key); -} - void frmMain::on_cmdYPlus_pressed() { m_jogVector += QVector3D(0, 1, 0); diff --git a/src/frmmain.h b/src/frmmain.h index 678ffc1d..1bd4a499 100644 --- a/src/frmmain.h +++ b/src/frmmain.h @@ -90,16 +90,16 @@ class frmMain : public QMainWindow ~frmMain(); Q_INVOKABLE void sendCommand(QString command, int tableIndex = -1, bool showInConsole = true, bool queue = false); - Q_INVOKABLE void saveValue(QString key, QVariant value); - Q_INVOKABLE QVariant restoreValue(QString key); + Q_INVOKABLE void applySettings(); double toolZPosition(); signals: void responseReceived(QString command, int tableIndex, QString response); - void settingsSaved(); void settingsLoaded(); + void settingsAboutToSave(); + void settingsChanged(); private slots: void updateHeightMapInterpolationDrawer(bool reset = false); @@ -369,7 +369,6 @@ private slots: void grblReset(); int bufferLength(); void sendNextFileCommands(); - void applySettings(); void updateParser(); bool dataIsFloating(QString data); bool dataIsEnd(QString data); diff --git a/src/frmsettings.cpp b/src/frmsettings.cpp index f11043cc..0cbf953d 100644 --- a/src/frmsettings.cpp +++ b/src/frmsettings.cpp @@ -98,49 +98,123 @@ int frmSettings::exec() m_storedChecks.clear(); m_storedCombos.clear(); m_storedColors.clear(); + m_storedTextBoxes.clear(); + m_storedPlainTexts.clear(); - foreach (QAbstractSpinBox* sb, this->findChildren()) - { - m_storedValues.append(sb->property("value").toDouble()); - } + foreach (QAbstractSpinBox* o, this->findChildren()) + m_storedValues.append(o->property("value").toDouble()); - foreach (QAbstractButton* cb, this->findChildren()) - { - m_storedChecks.append(cb->isChecked()); - } + foreach (QAbstractButton* o, this->findChildren()) + m_storedChecks.append(o->isChecked()); - foreach (QComboBox* cb, this->findChildren()) - { - m_storedCombos.append(cb->currentText()); - } + foreach (QComboBox* o, this->findChildren()) + m_storedCombos.append(o->currentText()); - foreach (ColorPicker* pick, this->findChildren()) - { - m_storedColors.append(pick->color()); - } + foreach (ColorPicker* o, this->findChildren()) + m_storedColors.append(o->color()); + + foreach (QLineEdit* o, this->findChildren()) + m_storedTextBoxes.append(o->text()); + + foreach (QPlainTextEdit* o, this->findChildren()) + m_storedPlainTexts.append(o->toPlainText()); return QDialog::exec(); } void frmSettings::undo() { - foreach (QAbstractSpinBox* sb, this->findChildren()) - { - sb->setProperty("value", m_storedValues.takeFirst()); - } + foreach (QAbstractSpinBox* o, this->findChildren()) + o->setProperty("value", m_storedValues.takeFirst()); - foreach (QAbstractButton* cb, this->findChildren()) - { - cb->setChecked(m_storedChecks.takeFirst()); - } - foreach (QComboBox* cb, this->findChildren()) - { - cb->setCurrentText(m_storedCombos.takeFirst()); + foreach (QAbstractButton* o, this->findChildren()) + o->setChecked(m_storedChecks.takeFirst()); + + foreach (QComboBox* o, this->findChildren()) + o->setCurrentText(m_storedCombos.takeFirst()); + + foreach (ColorPicker* o, this->findChildren()) + o->setColor(m_storedColors.takeFirst()); + + foreach (QLineEdit* o, this->findChildren()) + o->setText(m_storedTextBoxes.takeFirst()); + + foreach (QPlainTextEdit* o, this->findChildren()) + o->setPlainText(m_storedPlainTexts.takeFirst()); +} + +void frmSettings::addCustomSettings(GroupBox *box) +{ + static_cast(ui->scrollAreaWidgetContents->layout())->addWidget(box); + + ui->listCategories->addItem(box->title()); + ui->listCategories->item(ui->listCategories->count() - 1)->setData(Qt::UserRole, box->objectName()); + + m_customSettings.append(box); +} + +void frmSettings::saveCustomSettings(QSettings &set) +{ + set.beginGroup("Plugins"); + + foreach (QWidget *w, m_customSettings) { + + set.beginGroup(w->objectName()); + + foreach (QAbstractSpinBox* o, w->findChildren()) + set.setValue(o->objectName(), o->property("value").toDouble()); + + foreach (QAbstractButton* o, w->findChildren()) + set.setValue(o->objectName(), o->isChecked()); + + foreach (QComboBox* o, w->findChildren()) + set.setValue(o->objectName(), o->currentText()); + + foreach (ColorPicker* o, w->findChildren()) + set.setValue(o->objectName(), o->color()); + + foreach (QLineEdit* o, w->findChildren()) + set.setValue(o->objectName(), o->text()); + + foreach (QPlainTextEdit* o, w->findChildren()) + set.setValue(o->objectName(), o->toPlainText()); + + set.endGroup(); } - foreach (ColorPicker* pick, this->findChildren()) - { - pick->setColor(m_storedColors.takeFirst()); + + set.endGroup(); +} + +void frmSettings::loadCustomSettings(QSettings &set) +{ + set.beginGroup("Plugins"); + + foreach (QWidget *w, m_customSettings) { + + set.beginGroup(w->objectName()); + + foreach (QAbstractSpinBox* o, w->findChildren()) + o->setProperty("value", set.value(o->objectName()).toDouble()); + + foreach (QAbstractButton* o, w->findChildren()) + o->setChecked(set.value(o->objectName()).toBool()); + + foreach (QComboBox* o, w->findChildren()) + o->setCurrentText(set.value(o->objectName()).toString()); + + foreach (ColorPicker* o, w->findChildren()) + o->setColor(set.value(o->objectName()).value()); + + foreach (QLineEdit* o, w->findChildren()) + o->setText(set.value(o->objectName()).toString()); + + foreach (QPlainTextEdit* o, w->findChildren()) + o->setPlainText(set.value(o->objectName()).toString()); + + set.endGroup(); } + + set.endGroup(); } void frmSettings::on_listCategories_currentRowChanged(int currentRow) diff --git a/src/frmsettings.h b/src/frmsettings.h index 43522309..4a4e442b 100644 --- a/src/frmsettings.h +++ b/src/frmsettings.h @@ -7,12 +7,15 @@ #include #include #include +#include #include "widgets/colorpicker.h" namespace Ui { class frmSettings; } +class GroupBox; + class frmSettings : public QDialog { Q_OBJECT @@ -65,6 +68,10 @@ class frmSettings : public QDialog int exec(); void undo(); + void addCustomSettings(GroupBox *box); + void saveCustomSettings(QSettings &set); + void loadCustomSettings(QSettings &set); + QString port(); void setPort(QString port); int baud(); @@ -175,9 +182,13 @@ private slots: QList m_storedChecks; QList m_storedCombos; QList m_storedColors; + QList m_storedTextBoxes; + QList m_storedPlainTexts; QIntValidator m_intValidator; + QList m_customSettings; + int m_units; int m_acceleration; int m_rapidSpeed; diff --git a/src/plugins/test1/script.js b/src/plugins/test1/script.js index 32cfdf13..8db15be5 100644 --- a/src/plugins/test1/script.js +++ b/src/plugins/test1/script.js @@ -1,5 +1,5 @@ function on_cmdTest_clicked() { - main.sendCommand("$#", -10, settings.showUICommands); + main.sendCommand(ui.txtTest.text, -10, mainSettings.showUICommands); } function on_responseReceived(command, index, response) @@ -9,5 +9,23 @@ function on_responseReceived(command, index, response) } } +function on_settings_aboutToSave() +{ + settings.txtTest.text = ui.txtTest.text; +} + +function on_settings_loaded() +{ + ui.txtTest.text = settings.txtTest.text; +} + +function on_settings_changed() +{ + ui.txtTest.text = settings.txtTest.text; +} + ui.cmdTest.clicked.connect(on_cmdTest_clicked); -main.responseReceived.connect(on_responseReceived); \ No newline at end of file +main.responseReceived.connect(on_responseReceived); +main.settingsLoaded.connect(on_settings_loaded); +main.settingsAboutToSave.connect(on_settings_aboutToSave); +main.settingsChanged.connect(on_settings_changed); \ No newline at end of file diff --git a/src/plugins/test1/settings.ui b/src/plugins/test1/settings.ui new file mode 100644 index 00000000..468f97e7 --- /dev/null +++ b/src/plugins/test1/settings.ui @@ -0,0 +1,43 @@ + + + Test1Settings + + + + 0 + 0 + 400 + 300 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Test param: + + + + + + + + + + + diff --git a/src/plugins/test1/translation_ru.qm b/src/plugins/test1/translation_ru.qm index 259d7372e3f7cfa464a7a491871ec6bb42d0d457..7e1075aa5537f7fd5d46be1688f4058dc4b67a94 100644 GIT binary patch delta 128 zcmeysc#>&?h?)YMbHgnLAYeE0%K}n~oaM_4f%GP>GDa^TZIlTl{!TPX^-*C_VlicL zWN~7#V=-d!X0c>YV6kU0U~vFq8=#C6ivxod2T(Nw8xV7cq!yPb6eJcU=321>`Me;$ QVQ^|mNoHPp@x)1S0DWf~_5c6? delta 43 tcmX@f^nr1Lh@1qQbHgnLAmA)tUI?TTxyl&5fV5F2kXSR(Ds|$ANC5H13r_$5 diff --git a/src/plugins/test1/translation_ru.ts b/src/plugins/test1/translation_ru.ts index df598f4b..711e5f00 100644 --- a/src/plugins/test1/translation_ru.ts +++ b/src/plugins/test1/translation_ru.ts @@ -17,6 +17,11 @@ Response: Ответ: - + + Test1Settings + + Test param: + Тестовый параметр: +
\ No newline at end of file From fe184cc8ec6586a42094e2ae4cb68200b674adad Mon Sep 17 00:00:00 2001 From: Denvi Date: Thu, 14 Nov 2019 20:42:50 +0500 Subject: [PATCH 29/80] Plugins can be "Panel" or "Window" type now. --- src/frmmain.cpp | 183 +++++++++++++++++----------- src/frmmain.h | 1 + src/frmmain.ui | 140 --------------------- src/frmsettings.ui | 6 +- src/plugins/test1/config.ini | 3 +- src/plugins/test2/config.ini | 4 + src/plugins/test2/images/tool.png | Bin 0 -> 543 bytes src/plugins/test2/script.js | 31 +++++ src/plugins/test2/settings.ui | 43 +++++++ src/plugins/test2/translation_ru.qm | Bin 0 -> 329 bytes src/plugins/test2/translation_ru.ts | 27 ++++ src/plugins/test2/widget.ui | 108 ++++++++++++++++ 12 files changed, 332 insertions(+), 214 deletions(-) create mode 100644 src/plugins/test2/config.ini create mode 100644 src/plugins/test2/images/tool.png create mode 100644 src/plugins/test2/script.js create mode 100644 src/plugins/test2/settings.ui create mode 100644 src/plugins/test2/translation_ru.qm create mode 100644 src/plugins/test2/translation_ru.ts create mode 100644 src/plugins/test2/widget.ui diff --git a/src/frmmain.cpp b/src/frmmain.cpp index 8318b437..3c6f7d18 100644 --- a/src/frmmain.cpp +++ b/src/frmmain.cpp @@ -150,12 +150,6 @@ frmMain::frmMain(QWidget *parent) : setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea); setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea); - connect(ui->dockDevice, &QDockWidget::topLevelChanged, this, &frmMain::onDockTopLevelChanged); - connect(ui->dockModification, &QDockWidget::topLevelChanged, this, &frmMain::onDockTopLevelChanged); - connect(ui->dockVisualizer, &QDockWidget::topLevelChanged, this, &frmMain::onDockTopLevelChanged); - connect(ui->dockConsole, &QDockWidget::topLevelChanged, this, &frmMain::onDockTopLevelChanged); - connect(ui->dockUser, &QDockWidget::topLevelChanged, this, &frmMain::onDockTopLevelChanged); - ui->widgetHeightmapSettings->setVisible(false); ui->cmdXMinus->setBackColor(QColor(153, 180, 209)); @@ -535,17 +529,6 @@ void frmMain::loadSettings() // Apply settings applySettings(); - // Menu - ui->actViewLockWindows->setChecked(set.value("lockWindows").toBool()); - ui->actViewLockPanels->setChecked(set.value("lockPanels").toBool()); - - // Restore panels state - ui->grpUserCommands->setChecked(set.value("userCommandsPanel", true).toBool()); - ui->grpHeightMap->setChecked(set.value("heightmapPanel", true).toBool()); - ui->grpSpindle->setChecked(set.value("spindlePanel", true).toBool()); - ui->grpOverriding->setChecked(set.value("feedPanel", true).toBool()); - ui->grpJog->setChecked(set.value("jogPanel", true).toBool()); - // Restore last commands list ui->cboCommand->addItems(set.value("recentCommands", QStringList()).toStringList()); ui->cboCommand->setCurrentIndex(-1); @@ -571,17 +554,19 @@ void frmMain::loadSettings() int b = (w - ui->grpControl->layout()->margin() * 2 - ui->grpControl->layout()->spacing() * 3) / 4 * 0.8; int c = b * 0.8; setStyleSheet(styleSheet() + QString("\nStyledToolButton[adjustSize='true'] {\n\ - min-width: %1px;\n\ - min-height: %1px;\n\ - qproperty-iconSize: %2px;\n\ - }").arg(b).arg(c)); - // style()->unpolish(this); + min-width: %1px;\n\ + min-height: %1px;\n\ + qproperty-iconSize: %2px;\n\ + }").arg(b).arg(c)); ensurePolished(); - ui->dockDevice->setStyleSheet(""); - ui->dockModification->setStyleSheet(""); - ui->dockUser->setStyleSheet(""); + + foreach (QDockWidget *w, findChildren()) w->setStyleSheet(""); // Restore docks + // Signals/slots + foreach (QDockWidget *w, findChildren()) + connect(w, &QDockWidget::topLevelChanged, this, &frmMain::onDockTopLevelChanged); + // Panels ui->scrollContentsDevice->restoreState(this, set.value("panelsDevice").toStringList()); ui->scrollContentsModification->restoreState(this, set.value("panelsModification").toStringList()); @@ -593,6 +578,12 @@ void frmMain::loadSettings() if (b) b->setHidden(true); } + QStringList collapsedPanels = set.value("collapsedPanels").toStringList(); + foreach (QString s, collapsedPanels) { + QGroupBox *b = findChild(s); + if (b) b->setChecked(false); + } + // Normal window state restoreState(set.value("formMainState").toByteArray()); @@ -621,6 +612,10 @@ void frmMain::loadSettings() if (a) a->setShortcuts(m.values().at(i)); } + // Menu + ui->actViewLockWindows->setChecked(set.value("lockWindows").toBool()); + ui->actViewLockPanels->setChecked(set.value("lockPanels").toBool()); + m_settingsLoading = false; } @@ -669,13 +664,8 @@ void frmMain::saveSettings() set.setValue("header", ui->tblProgram->horizontalHeader()->saveState()); set.setValue("settingsSplitMain", m_settings->ui->splitMain->saveState()); set.setValue("formGeometry", this->saveGeometry()); - set.setValue("formSettingsGeometry", m_settings->saveGeometry()); - set.setValue("userCommandsPanel", ui->grpUserCommands->isChecked()); - set.setValue("heightmapPanel", ui->grpHeightMap->isChecked()); - set.setValue("spindlePanel", ui->grpSpindle->isChecked()); - set.setValue("feedPanel", ui->grpOverriding->isChecked()); - set.setValue("jogPanel", ui->grpJog->isChecked()); - set.setValue("keyboardControl", ui->chkKeyboardControl->isChecked()); + set.setValue("formSettingsGeometry", m_settings->saveGeometry()); + set.setValue("autoCompletion", m_settings->autoCompletion()); set.setValue("units", m_settings->units()); set.setValue("storedX", m_storedX); @@ -752,14 +742,17 @@ void frmMain::saveSettings() QStringList panels; QStringList hiddenPanels; + QStringList collapsedPanels; if (ui->scrollContentsDevice->isVisible()) panels << ui->scrollContentsDevice->saveState(); if (ui->scrollContentsModification->isVisible()) panels << ui->scrollContentsModification->saveState(); if (ui->scrollContentsUser->isVisible()) panels << ui->scrollContentsUser->saveState(); foreach (QString s, panels) { QGroupBox *b = findChild(s); if (b && b->isHidden()) hiddenPanels << s; + if (b && b->isCheckable() && !b->isChecked()) collapsedPanels << s; } set.setValue("hiddenPanels", hiddenPanels); + set.setValue("collapsedPanels", collapsedPanels); // Menu set.setValue("lockWindows", ui->actViewLockWindows->isChecked()); @@ -2361,6 +2354,11 @@ bool frmMain::actionLessThan(const QAction *a1, const QAction *a2) return a1->objectName() < a2->objectName(); } +bool frmMain::actionTextLessThan(const QAction *a1, const QAction *a2) +{ + return a1->text() < a2->text(); +} + void frmMain::on_actServiceSettings_triggered() { QList acts = findChildren(QRegExp("act.*")); @@ -4021,7 +4019,6 @@ void frmMain::setupCoordsTextboxes() void frmMain::loadPlugins() { - qDebug() << "loadPlugins"; QString pluginsDir = qApp->applicationDirPath() + "/plugins/"; UiLoader uiLoader; @@ -4029,14 +4026,15 @@ void frmMain::loadPlugins() // Get plugins list QStringList pl = QDir(pluginsDir).entryList(QDir::Dirs | QDir::NoDotAndDotDot); - qDebug() << pl; + qDebug() << "Loading plugins:" << pl; foreach (QString p, pl) { // Config QSettings set(pluginsDir + p + "/config.ini", QSettings::IniFormat); QString title = set.value("title").toString(); QString name = set.value("name").toString(); - qDebug() << "loading plugin:" << p << title; + QString type = set.value("type").toString(); + qDebug() << "Loading plugin:" << p << title << name << type; // Translation QString loc = QLocale().name().left(2); @@ -4048,35 +4046,68 @@ void frmMain::loadPlugins() } // Ui + uiLoader.setWorkingDirectory(pluginsDir + p); + uiLoader.addPluginPath(pluginsDir + p + "/plugins"); + + // Main QWidget *widget = 0; QFile f(pluginsDir + p + "/widget.ui"); if (f.open(QFile::ReadOnly)) { // Load widget - uiLoader.setWorkingDirectory(pluginsDir + p); widget = uiLoader.load(&f, this); f.close(); - // Create panel - GroupBox *box = new GroupBox(this); - QVBoxLayout *layout1 = new QVBoxLayout(box); - QWidget *bw = new QWidget(box); - QVBoxLayout *layout2 = new QVBoxLayout(bw); - box->setObjectName("grp" + name); - box->setTitle(tr(title.toLatin1())); - box->setLayout(layout1); - box->setCheckable(true); - box->setProperty("overrided", false); - layout1->addWidget(bw); - bw->setLayout(layout2); - layout2->addWidget(widget); - layout2->setMargin(0); - connect(box, &QGroupBox::toggled, bw, &QWidget::setVisible); - - // Add panel to user window - static_cast(ui->scrollContentsUser->layout())->insertWidget(0, box); + if (widget) { + if (type.toUpper() == "PANEL") { + // Create panel + GroupBox *box = new GroupBox(this); + QVBoxLayout *layout1 = new QVBoxLayout(box); + QWidget *bw = new QWidget(box); + QVBoxLayout *layout2 = new QVBoxLayout(bw); + box->setObjectName("grp" + name); + box->setTitle(tr(title.toLatin1())); + box->setLayout(layout1); + box->setCheckable(true); + box->setProperty("overrided", false); + layout1->addWidget(bw); + bw->setLayout(layout2); + layout2->addWidget(widget); + layout2->setMargin(0); + connect(box, &QGroupBox::toggled, bw, &QWidget::setVisible); + + // Add panel to user window + static_cast(ui->scrollContentsUser->layout())->insertWidget(0, box); + + } else if (type.toUpper() == "WINDOW") { + // Create dock widget + QDockWidget *dock = new QDockWidget(this); + QWidget *contents = new QWidget(dock); + QFrame *frame = new QFrame(contents); + QVBoxLayout *layout1 = new QVBoxLayout(contents); + QVBoxLayout *layout2 = new QVBoxLayout(frame); + dock->setObjectName("dock" + name); + dock->setWindowTitle(tr(title.toLatin1())); + dock->setWidget(contents); + contents->setLayout(layout1); + layout1->addWidget(frame); + QMargins m = layout1->contentsMargins(); + m.setLeft(0); + m.setRight(0); + layout1->setContentsMargins(m); + frame->setLayout(layout2); + layout2->addWidget(widget); + layout2->setMargin(0); + + // Add to main form + this->addDockWidget(Qt::RightDockWidgetArea, dock); + + } else { + qDebug() << "Unknown plugin type" << type; + } + } } - // Settings ui + // Settings QWidget *settingsWidget = 0; f.setFileName(pluginsDir + p + "/settings.ui"); if (f.open(QFile::ReadOnly)) { @@ -4085,16 +4116,18 @@ void frmMain::loadPlugins() settingsWidget = uiLoader.load(&f, this); f.close(); - // Create groupbox - GroupBox *box = new GroupBox(m_settings); - QVBoxLayout *layout1 = new QVBoxLayout(box); - box->setObjectName("grpSettings" + name); - box->setTitle(tr(title.toLatin1())); - box->setLayout(layout1); - layout1->addWidget(settingsWidget); - - // Add to settings form - m_settings->addCustomSettings(box); + if (settingsWidget) { + // Create groupbox + GroupBox *box = new GroupBox(m_settings); + QVBoxLayout *layout1 = new QVBoxLayout(box); + box->setObjectName("grpSettings" + name); + box->setTitle(tr(title.toLatin1())); + box->setLayout(layout1); + layout1->addWidget(settingsWidget); + + // Add to settings form + m_settings->addCustomSettings(box); + } } // Delegate actions to main form @@ -4223,11 +4256,21 @@ void frmMain::on_cmdStop_clicked() void frmMain::on_mnuViewWindows_aboutToShow() { - ui->actViewWindowsDevice->setChecked(ui->dockDevice->isVisible()); - ui->actViewWindowsModification->setChecked(ui->dockModification->isVisible()); - ui->actViewWindowsVisualizer->setChecked(ui->dockVisualizer->isVisible()); - ui->actViewWindowsConsole->setChecked(ui->dockConsole->isVisible()); - ui->actViewWindowsUser->setChecked(ui->dockUser->isVisible()); + QAction *a; + QList al; + + foreach (QDockWidget *d, findChildren()) { + a = new QAction(d->windowTitle(), ui->mnuViewWindows); + a->setCheckable(true); + a->setChecked(d->isVisible()); + connect(a, &QAction::triggered, d, &QDockWidget::setVisible); + al.append(a); + } + + qSort(al.begin(), al.end(), frmMain::actionTextLessThan); + + ui->mnuViewWindows->clear(); + ui->mnuViewWindows->addActions(al); } void frmMain::on_mnuViewPanels_aboutToShow() diff --git a/src/frmmain.h b/src/frmmain.h index 1bd4a499..332e12e9 100644 --- a/src/frmmain.h +++ b/src/frmmain.h @@ -413,6 +413,7 @@ private slots: void loadPlugins(); static bool actionLessThan(const QAction *a1, const QAction *a2); + static bool actionTextLessThan(const QAction *a1, const QAction *a2); }; typedef QMap> ShortcutsMap; diff --git a/src/frmmain.ui b/src/frmmain.ui index 563ac95e..50fbf8a9 100644 --- a/src/frmmain.ui +++ b/src/frmmain.ui @@ -416,11 +416,6 @@ QLabel[overrided="false"] { &Windows - - - - - @@ -2986,50 +2981,6 @@ padding-right: 8; &About - - - true - - - true - - - &Device - - - - - true - - - true - - - &Modification - - - - - true - - - true - - - &Visualizer - - - - - true - - - true - - - &Console - - Home @@ -3305,17 +3256,6 @@ padding-right: 8; Spindle speed override - - - true - - - true - - - &User - - true @@ -3431,70 +3371,6 @@ padding-right: 8; - - actViewWindowsDevice - triggered(bool) - dockDevice - setVisible(bool) - - - -1 - -1 - - - 174 - 477 - - - - - actViewWindowsModification - triggered(bool) - dockModification - setVisible(bool) - - - -1 - -1 - - - 1265 - 477 - - - - - actViewWindowsVisualizer - triggered(bool) - dockVisualizer - setVisible(bool) - - - -1 - -1 - - - 720 - 162 - - - - - actViewWindowsConsole - triggered(bool) - dockConsole - setVisible(bool) - - - -1 - -1 - - - 734 - 867 - - - chkKeyboardControl toggled(bool) @@ -4151,21 +4027,5 @@ padding-right: 8; - - actViewWindowsUser - triggered(bool) - dockUser - setVisible(bool) - - - -1 - -1 - - - 173 - 760 - - - diff --git a/src/frmsettings.ui b/src/frmsettings.ui index 5b5cf835..cc5c3a3a 100644 --- a/src/frmsettings.ui +++ b/src/frmsettings.ui @@ -6,7 +6,7 @@ 0 0 - 800 + 1000 600 @@ -87,8 +87,8 @@ QSplitter::handle:horizontal { 0 - -1921 - 533 + 0 + 621 2776 diff --git a/src/plugins/test1/config.ini b/src/plugins/test1/config.ini index dac9e433..8af961f2 100644 --- a/src/plugins/test1/config.ini +++ b/src/plugins/test1/config.ini @@ -1,3 +1,4 @@ [General] title="Test plugin 1" -name="TestPlugin1" \ No newline at end of file +name="TestPlugin1" +type="panel" \ No newline at end of file diff --git a/src/plugins/test2/config.ini b/src/plugins/test2/config.ini new file mode 100644 index 00000000..6e182a28 --- /dev/null +++ b/src/plugins/test2/config.ini @@ -0,0 +1,4 @@ +[General] +title="Test plugin 2" +name="TestPlugin2" +type="window" \ No newline at end of file diff --git a/src/plugins/test2/images/tool.png b/src/plugins/test2/images/tool.png new file mode 100644 index 0000000000000000000000000000000000000000..506158a3e91c905a7ee03b3862f284463fe6a8b5 GIT binary patch literal 543 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=EX7WqAsj$Z!;#Vf4nJ za0`PlBg3pY5)2HC2R&UJLn`LHogM4NY$(!d-~C!(>Foxm=WW>=jcyt1CVCS-+u>EFPtoVtp#iN9>k z=10pnZ0=!fKXZSXz`D@g`$}sW!sfc_^c5ez5fhaZQJI64AMgMqUI-G{0W>oUZrv=^xvYPx8<@-w z7<{{AP?mdTqsJj`Ui~Rw?{igfKg&~oe8`)3>&)2yhCxpjCfo~7xmU~GsC;JKex|r) zrT8b&iM)SUisyBzr+;K)h+(|%xG+Tf$fEz8Fm39TfWe zimCd_`K?W+zkFG~t(c$1n*C)qXHKmBHLi{6I={{W#pJU=Vq9+mfnw8MEN9tPw`yWm z>!la`f1;Tm + + Test1Settings + + + + 0 + 0 + 400 + 300 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Test param: + + + + + + + + + + + diff --git a/src/plugins/test2/translation_ru.qm b/src/plugins/test2/translation_ru.qm new file mode 100644 index 0000000000000000000000000000000000000000..a2f641897ebededdb8f1acd102989b3b8f8171f4 GIT binary patch literal 329 zcmcE7ks@*G{hX<16=n7(EZlq7iGhJZfz7$$7LaCOH}cB@Qi+`9%Zq^YCay9@FCcA{ z2_*h90|@~ZDHb~x8x{i=TNV=*0|qM&pdbSq5OX-^=jJBnrC6~8IjkY6#U)0JARRm` zax6|PMl7Z*PDrXbgHnqN^7D#Q(Uq&PC;^o^0=3uyHF>jGGAOXv1FdraVjGYlEDlJ< zaD(hoC`c?y%mo|73$`~nwWK67FTEISzY + + + + frmMain + + Test plugin 2 + Тестовый плагин 2 + + + + Test2 + + Command: + Команда: + + + Response: + Ответ: + + Test2Settings + + Test param: + Тестовый параметр: + + + \ No newline at end of file diff --git a/src/plugins/test2/widget.ui b/src/plugins/test2/widget.ui new file mode 100644 index 00000000..1af54765 --- /dev/null +++ b/src/plugins/test2/widget.ui @@ -0,0 +1,108 @@ + + + Test1 + + + + 0 + 0 + 400 + 300 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + Command: + + + + + + + + + + + + ... + + + + images/tool.pngimages/tool.png + + + true + + + + + + + + + Response: + + + + + + + true + + + + + + + &Send + + + + + + StyledToolButton + QToolButton +
styledtoolbutton.h
+
+
+ + + + actPluginTest2Send + triggered() + cmdTest + click() + + + -1 + -1 + + + 383 + 27 + + + + +
From 402bc1342a7a704e0821e6cf542262378ab557b7 Mon Sep 17 00:00:00 2001 From: Denvi Date: Mon, 18 Nov 2019 22:02:30 +0500 Subject: [PATCH 30/80] Project structure refactor. Camera plugin added. --- .gitignore | 19 +- candle.pro | 22 ++ src/candle/Candle_resource.rc | 41 ++++ src/{ => candle}/Info.plist | 0 src/{ => candle}/candle.pro | 8 +- src/{ => candle}/drawers/gcodedrawer.cpp | 0 src/{ => candle}/drawers/gcodedrawer.h | 0 .../drawers/heightmapborderdrawer.cpp | 0 .../drawers/heightmapborderdrawer.h | 0 .../drawers/heightmapgriddrawer.cpp | 0 .../drawers/heightmapgriddrawer.h | 0 .../drawers/heightmapinterpolationdrawer.cpp | 0 .../drawers/heightmapinterpolationdrawer.h | 0 src/{ => candle}/drawers/origindrawer.cpp | 0 src/{ => candle}/drawers/origindrawer.h | 0 src/{ => candle}/drawers/selectiondrawer.cpp | 0 src/{ => candle}/drawers/selectiondrawer.h | 0 src/{ => candle}/drawers/shaderdrawable.cpp | 0 src/{ => candle}/drawers/shaderdrawable.h | 0 src/{ => candle}/drawers/tooldrawer.cpp | 0 src/{ => candle}/drawers/tooldrawer.h | 0 src/{ => candle}/fonts.qrc | 0 src/{ => candle}/fonts/Ubuntu-Regular.ttf | Bin src/{ => candle}/frmabout.cpp | 0 src/{ => candle}/frmabout.h | 0 src/{ => candle}/frmabout.ui | 0 src/{ => candle}/frmmain.cpp | 8 +- src/{ => candle}/frmmain.h | 0 src/{ => candle}/frmmain.ui | 0 src/{ => candle}/frmsettings.cpp | 0 src/{ => candle}/frmsettings.h | 0 src/{ => candle}/frmsettings.ui | 0 src/{ => candle}/images.qrc | 0 .../images/1401561986_chevron-left.png | Bin .../images/1401562173_chevron-down.png | Bin .../images/1401562173_chevron-right.png | Bin .../images/1401562173_chevron-up.png | Bin .../images/1401562699_icon-arrow-down-b.png | Bin .../images/1401562699_icon-arrow-up-b.png | Bin src/{ => candle}/images/axis_return.png | Bin src/{ => candle}/images/axis_return.svg | 0 src/{ => candle}/images/axis_zero.png | Bin src/{ => candle}/images/axis_zero.svg | 0 src/{ => candle}/images/brake.png | Bin src/{ => candle}/images/candle.ico | Bin src/{ => candle}/images/candle_16.png | Bin src/{ => candle}/images/candle_20.png | Bin src/{ => candle}/images/candle_256.png | Bin src/{ => candle}/images/collapse.png | Bin src/{ => candle}/images/collapse_disabled.png | Bin src/{ => candle}/images/cube.png | Bin src/{ => candle}/images/cubeFront.png | Bin src/{ => candle}/images/cubeLeft.png | Bin src/{ => candle}/images/cubeTop.png | Bin src/{ => candle}/images/cutter.png | Bin src/{ => candle}/images/cutter1.ico | Bin src/{ => candle}/images/erase_1.png | Bin src/{ => candle}/images/expand.png | Bin src/{ => candle}/images/expand_disabled.png | Bin src/{ => candle}/images/fit_1.png | Bin src/{ => candle}/images/g7567.png | Bin src/{ => candle}/images/grblControl1.ico | Bin src/{ => candle}/images/grblControl2.ico | Bin src/{ => candle}/images/guard.png | Bin src/{ => candle}/images/guard.svg | 0 src/{ => candle}/images/handle2s.png | Bin src/{ => candle}/images/handle2s1.png | Bin src/{ => candle}/images/handle2sh.png | Bin src/{ => candle}/images/handle_horizontal.png | Bin src/{ => candle}/images/handle_small.png | Bin src/{ => candle}/images/handle_vertical.png | Bin src/{ => candle}/images/home.svg | 0 src/{ => candle}/images/icon.png | Bin src/{ => candle}/images/icon.svg | 0 src/{ => candle}/images/icon1.png | Bin src/{ => candle}/images/icon1.svg | 0 src/{ => candle}/images/icon2.svg | 0 src/{ => candle}/images/icon3.svg | 0 src/{ => candle}/images/icon3_16.png | Bin src/{ => candle}/images/icon3_20.png | Bin src/{ => candle}/images/icon3png.png | Bin src/{ => candle}/images/icons.svg | 0 src/{ => candle}/images/icons_arrow.svg | 0 src/{ => candle}/images/laser.svg | 0 src/{ => candle}/images/laser1.svg | 0 src/{ => candle}/images/list.png | Bin src/{ => candle}/images/list_collapsed.png | Bin src/{ => candle}/images/menu.png | Bin src/{ => candle}/images/menu.svg | 0 src/{ => candle}/images/menu_13.png | Bin src/{ => candle}/images/menu_16.png | Bin src/{ => candle}/images/menu_collapse.png | Bin src/{ => candle}/images/menu_collapse_13.png | Bin src/{ => candle}/images/menu_collapse_16.png | Bin src/{ => candle}/images/num1.png | Bin src/{ => candle}/images/num1.svg | 0 src/{ => candle}/images/num2.png | Bin src/{ => candle}/images/num3.png | Bin src/{ => candle}/images/num4.png | Bin src/{ => candle}/images/origin.png | Bin src/{ => candle}/images/origin.svg | 0 src/{ => candle}/images/restart.png | Bin src/{ => candle}/images/restart.svg | 0 src/{ => candle}/images/run.png | Bin src/{ => candle}/images/run.svg | 0 src/{ => candle}/images/safe_z.png | Bin src/{ => candle}/images/safe_z.svg | 0 src/{ => candle}/images/search_for_home2.png | Bin src/{ => candle}/images/search_for_z.png | Bin src/{ => candle}/images/search_home.svg | 0 src/{ => candle}/images/search_z.svg | 0 src/{ => candle}/images/send_1.png | Bin src/{ => candle}/images/shadow.png | Bin src/{ => candle}/images/small_arrow.png | Bin src/{ => candle}/images/small_arrow.svg | 0 src/{ => candle}/images/unlock.png | Bin src/{ => candle}/images/zero_z.png | Bin src/{ => candle}/images/zero_z.svg | 0 src/{ => candle}/main.cpp | 0 src/{ => candle}/parser/arcproperties.cpp | 0 src/{ => candle}/parser/arcproperties.h | 0 src/{ => candle}/parser/gcodeparser.cpp | 0 src/{ => candle}/parser/gcodeparser.h | 0 .../parser/gcodepreprocessorutils.cpp | 0 .../parser/gcodepreprocessorutils.h | 0 src/{ => candle}/parser/gcodeviewparse.cpp | 0 src/{ => candle}/parser/gcodeviewparse.h | 0 src/{ => candle}/parser/linesegment.cpp | 0 src/{ => candle}/parser/linesegment.h | 0 src/{ => candle}/parser/pointsegment.cpp | 0 src/{ => candle}/parser/pointsegment.h | 0 src/{ => candle}/scriptvars.cpp | 0 src/{ => candle}/scriptvars.h | 0 src/{ => candle}/shaders.qrc | 0 src/{ => candle}/shaders/fshader.glsl | 0 src/{ => candle}/shaders/vshader.glsl | 0 src/{ => candle}/tables/gcodetablemodel.cpp | 0 src/{ => candle}/tables/gcodetablemodel.h | 0 .../tables/heightmaptablemodel.cpp | 0 src/{ => candle}/tables/heightmaptablemodel.h | 0 src/{ => candle}/translations/candle_en.ts | 0 src/{ => candle}/translations/candle_es.qm | Bin src/{ => candle}/translations/candle_es.ts | 0 src/{ => candle}/translations/candle_fr.qm | Bin src/{ => candle}/translations/candle_fr.ts | 0 src/{ => candle}/translations/candle_pt.qm | Bin src/{ => candle}/translations/candle_pt.ts | 0 src/{ => candle}/translations/candle_ru.qm | Bin src/{ => candle}/translations/candle_ru.ts | 0 src/{ => candle}/utils/interpolation.h | 0 src/{ => candle}/utils/util.h | 0 src/{ => candle}/widgets/colorpicker.cpp | 0 src/{ => candle}/widgets/colorpicker.h | 0 src/{ => candle}/widgets/combobox.cpp | 0 src/{ => candle}/widgets/combobox.h | 0 src/{ => candle}/widgets/comboboxkey.cpp | 0 src/{ => candle}/widgets/comboboxkey.h | 0 src/{ => candle}/widgets/dropwidget.cpp | 0 src/{ => candle}/widgets/dropwidget.h | 0 src/{ => candle}/widgets/glwidget.cpp | 0 src/{ => candle}/widgets/glwidget.h | 0 src/{ => candle}/widgets/groupbox.cpp | 0 src/{ => candle}/widgets/groupbox.h | 0 src/{ => candle}/widgets/scrollarea.cpp | 0 src/{ => candle}/widgets/scrollarea.h | 0 src/{ => candle}/widgets/slider.cpp | 0 src/{ => candle}/widgets/slider.h | 0 src/{ => candle}/widgets/sliderbox.cpp | 0 src/{ => candle}/widgets/sliderbox.h | 0 src/{ => candle}/widgets/sliderbox.ui | 0 src/{ => candle}/widgets/styledtoolbutton.cpp | 0 src/{ => candle}/widgets/styledtoolbutton.h | 0 src/{ => candle}/widgets/uiloader.cpp | 0 src/{ => candle}/widgets/uiloader.h | 0 src/{ => candle}/widgets/widget.cpp | 0 src/{ => candle}/widgets/widget.h | 0 src/{ => candle}/widgets/widgetmimedata.h | 0 src/candleplugins/camera/config.ini | 4 + .../camera/plugins/cameraplugin.dll | Bin 0 -> 44544 bytes src/candleplugins/camera/script.js | 59 +++++ src/candleplugins/camera/settings.ui | 89 ++++++++ src/candleplugins/camera/translation_ru.qm | Bin 0 -> 404 bytes src/candleplugins/camera/translation_ru.ts | 30 +++ .../camera/widget.ui} | 28 ++- src/candleplugins/candleplugins.pro | 16 ++ .../test1/config.ini | 0 .../test1/images/tool.png | Bin .../test1/script.js | 0 .../test1/settings.ui | 0 .../test1/translation_ru.qm | Bin .../test1/translation_ru.ts | 0 .../test1/widget.ui | 0 .../cameraplugin/cameraplugin.cpp | 75 +++++++ .../cameraplugin/cameraplugin.h | 26 +++ .../cameraplugin/cameraplugin.pro | 11 + .../cameraplugin/camerawidget.cpp | 206 ++++++++++++++++++ .../cameraplugin/camerawidget.h | 68 ++++++ src/designerplugins/designerplugins.pro | 8 + src/plugins/test2/config.ini | 4 - src/plugins/test2/images/tool.png | Bin 543 -> 0 bytes src/plugins/test2/script.js | 31 --- src/plugins/test2/translation_ru.qm | Bin 329 -> 0 bytes src/plugins/test2/translation_ru.ts | 27 --- src/plugins/test2/widget.ui | 108 --------- 204 files changed, 688 insertions(+), 200 deletions(-) create mode 100644 candle.pro create mode 100644 src/candle/Candle_resource.rc rename src/{ => candle}/Info.plist (100%) rename src/{ => candle}/candle.pro (94%) rename src/{ => candle}/drawers/gcodedrawer.cpp (100%) rename src/{ => candle}/drawers/gcodedrawer.h (100%) rename src/{ => candle}/drawers/heightmapborderdrawer.cpp (100%) rename src/{ => candle}/drawers/heightmapborderdrawer.h (100%) rename src/{ => candle}/drawers/heightmapgriddrawer.cpp (100%) rename src/{ => candle}/drawers/heightmapgriddrawer.h (100%) rename src/{ => candle}/drawers/heightmapinterpolationdrawer.cpp (100%) rename src/{ => candle}/drawers/heightmapinterpolationdrawer.h (100%) rename src/{ => candle}/drawers/origindrawer.cpp (100%) rename src/{ => candle}/drawers/origindrawer.h (100%) rename src/{ => candle}/drawers/selectiondrawer.cpp (100%) rename src/{ => candle}/drawers/selectiondrawer.h (100%) rename src/{ => candle}/drawers/shaderdrawable.cpp (100%) rename src/{ => candle}/drawers/shaderdrawable.h (100%) rename src/{ => candle}/drawers/tooldrawer.cpp (100%) rename src/{ => candle}/drawers/tooldrawer.h (100%) rename src/{ => candle}/fonts.qrc (100%) rename src/{ => candle}/fonts/Ubuntu-Regular.ttf (100%) mode change 100755 => 100644 rename src/{ => candle}/frmabout.cpp (100%) rename src/{ => candle}/frmabout.h (100%) rename src/{ => candle}/frmabout.ui (100%) rename src/{ => candle}/frmmain.cpp (100%) rename src/{ => candle}/frmmain.h (100%) rename src/{ => candle}/frmmain.ui (100%) rename src/{ => candle}/frmsettings.cpp (100%) rename src/{ => candle}/frmsettings.h (100%) rename src/{ => candle}/frmsettings.ui (100%) rename src/{ => candle}/images.qrc (100%) rename src/{ => candle}/images/1401561986_chevron-left.png (100%) rename src/{ => candle}/images/1401562173_chevron-down.png (100%) rename src/{ => candle}/images/1401562173_chevron-right.png (100%) rename src/{ => candle}/images/1401562173_chevron-up.png (100%) rename src/{ => candle}/images/1401562699_icon-arrow-down-b.png (100%) rename src/{ => candle}/images/1401562699_icon-arrow-up-b.png (100%) rename src/{ => candle}/images/axis_return.png (100%) rename src/{ => candle}/images/axis_return.svg (100%) rename src/{ => candle}/images/axis_zero.png (100%) rename src/{ => candle}/images/axis_zero.svg (100%) rename src/{ => candle}/images/brake.png (100%) rename src/{ => candle}/images/candle.ico (100%) rename src/{ => candle}/images/candle_16.png (100%) rename src/{ => candle}/images/candle_20.png (100%) rename src/{ => candle}/images/candle_256.png (100%) rename src/{ => candle}/images/collapse.png (100%) rename src/{ => candle}/images/collapse_disabled.png (100%) rename src/{ => candle}/images/cube.png (100%) rename src/{ => candle}/images/cubeFront.png (100%) rename src/{ => candle}/images/cubeLeft.png (100%) rename src/{ => candle}/images/cubeTop.png (100%) rename src/{ => candle}/images/cutter.png (100%) rename src/{ => candle}/images/cutter1.ico (100%) rename src/{ => candle}/images/erase_1.png (100%) rename src/{ => candle}/images/expand.png (100%) rename src/{ => candle}/images/expand_disabled.png (100%) rename src/{ => candle}/images/fit_1.png (100%) rename src/{ => candle}/images/g7567.png (100%) rename src/{ => candle}/images/grblControl1.ico (100%) rename src/{ => candle}/images/grblControl2.ico (100%) rename src/{ => candle}/images/guard.png (100%) rename src/{ => candle}/images/guard.svg (100%) rename src/{ => candle}/images/handle2s.png (100%) rename src/{ => candle}/images/handle2s1.png (100%) rename src/{ => candle}/images/handle2sh.png (100%) rename src/{ => candle}/images/handle_horizontal.png (100%) rename src/{ => candle}/images/handle_small.png (100%) rename src/{ => candle}/images/handle_vertical.png (100%) rename src/{ => candle}/images/home.svg (100%) rename src/{ => candle}/images/icon.png (100%) rename src/{ => candle}/images/icon.svg (100%) rename src/{ => candle}/images/icon1.png (100%) rename src/{ => candle}/images/icon1.svg (100%) rename src/{ => candle}/images/icon2.svg (100%) rename src/{ => candle}/images/icon3.svg (100%) rename src/{ => candle}/images/icon3_16.png (100%) rename src/{ => candle}/images/icon3_20.png (100%) rename src/{ => candle}/images/icon3png.png (100%) rename src/{ => candle}/images/icons.svg (100%) rename src/{ => candle}/images/icons_arrow.svg (100%) rename src/{ => candle}/images/laser.svg (100%) rename src/{ => candle}/images/laser1.svg (100%) rename src/{ => candle}/images/list.png (100%) rename src/{ => candle}/images/list_collapsed.png (100%) rename src/{ => candle}/images/menu.png (100%) rename src/{ => candle}/images/menu.svg (100%) rename src/{ => candle}/images/menu_13.png (100%) rename src/{ => candle}/images/menu_16.png (100%) rename src/{ => candle}/images/menu_collapse.png (100%) rename src/{ => candle}/images/menu_collapse_13.png (100%) rename src/{ => candle}/images/menu_collapse_16.png (100%) rename src/{ => candle}/images/num1.png (100%) rename src/{ => candle}/images/num1.svg (100%) rename src/{ => candle}/images/num2.png (100%) rename src/{ => candle}/images/num3.png (100%) rename src/{ => candle}/images/num4.png (100%) rename src/{ => candle}/images/origin.png (100%) rename src/{ => candle}/images/origin.svg (100%) rename src/{ => candle}/images/restart.png (100%) rename src/{ => candle}/images/restart.svg (100%) rename src/{ => candle}/images/run.png (100%) rename src/{ => candle}/images/run.svg (100%) rename src/{ => candle}/images/safe_z.png (100%) rename src/{ => candle}/images/safe_z.svg (100%) rename src/{ => candle}/images/search_for_home2.png (100%) rename src/{ => candle}/images/search_for_z.png (100%) rename src/{ => candle}/images/search_home.svg (100%) rename src/{ => candle}/images/search_z.svg (100%) rename src/{ => candle}/images/send_1.png (100%) rename src/{ => candle}/images/shadow.png (100%) rename src/{ => candle}/images/small_arrow.png (100%) rename src/{ => candle}/images/small_arrow.svg (100%) rename src/{ => candle}/images/unlock.png (100%) rename src/{ => candle}/images/zero_z.png (100%) rename src/{ => candle}/images/zero_z.svg (100%) rename src/{ => candle}/main.cpp (100%) rename src/{ => candle}/parser/arcproperties.cpp (100%) rename src/{ => candle}/parser/arcproperties.h (100%) rename src/{ => candle}/parser/gcodeparser.cpp (100%) rename src/{ => candle}/parser/gcodeparser.h (100%) rename src/{ => candle}/parser/gcodepreprocessorutils.cpp (100%) rename src/{ => candle}/parser/gcodepreprocessorutils.h (100%) rename src/{ => candle}/parser/gcodeviewparse.cpp (100%) rename src/{ => candle}/parser/gcodeviewparse.h (100%) rename src/{ => candle}/parser/linesegment.cpp (100%) rename src/{ => candle}/parser/linesegment.h (100%) rename src/{ => candle}/parser/pointsegment.cpp (100%) rename src/{ => candle}/parser/pointsegment.h (100%) rename src/{ => candle}/scriptvars.cpp (100%) rename src/{ => candle}/scriptvars.h (100%) rename src/{ => candle}/shaders.qrc (100%) rename src/{ => candle}/shaders/fshader.glsl (100%) rename src/{ => candle}/shaders/vshader.glsl (100%) rename src/{ => candle}/tables/gcodetablemodel.cpp (100%) rename src/{ => candle}/tables/gcodetablemodel.h (100%) rename src/{ => candle}/tables/heightmaptablemodel.cpp (100%) rename src/{ => candle}/tables/heightmaptablemodel.h (100%) rename src/{ => candle}/translations/candle_en.ts (100%) rename src/{ => candle}/translations/candle_es.qm (100%) rename src/{ => candle}/translations/candle_es.ts (100%) rename src/{ => candle}/translations/candle_fr.qm (100%) rename src/{ => candle}/translations/candle_fr.ts (100%) rename src/{ => candle}/translations/candle_pt.qm (100%) rename src/{ => candle}/translations/candle_pt.ts (100%) rename src/{ => candle}/translations/candle_ru.qm (100%) rename src/{ => candle}/translations/candle_ru.ts (100%) rename src/{ => candle}/utils/interpolation.h (100%) rename src/{ => candle}/utils/util.h (100%) rename src/{ => candle}/widgets/colorpicker.cpp (100%) rename src/{ => candle}/widgets/colorpicker.h (100%) rename src/{ => candle}/widgets/combobox.cpp (100%) rename src/{ => candle}/widgets/combobox.h (100%) rename src/{ => candle}/widgets/comboboxkey.cpp (100%) rename src/{ => candle}/widgets/comboboxkey.h (100%) rename src/{ => candle}/widgets/dropwidget.cpp (100%) rename src/{ => candle}/widgets/dropwidget.h (100%) rename src/{ => candle}/widgets/glwidget.cpp (100%) rename src/{ => candle}/widgets/glwidget.h (100%) rename src/{ => candle}/widgets/groupbox.cpp (100%) rename src/{ => candle}/widgets/groupbox.h (100%) rename src/{ => candle}/widgets/scrollarea.cpp (100%) rename src/{ => candle}/widgets/scrollarea.h (100%) rename src/{ => candle}/widgets/slider.cpp (100%) rename src/{ => candle}/widgets/slider.h (100%) rename src/{ => candle}/widgets/sliderbox.cpp (100%) rename src/{ => candle}/widgets/sliderbox.h (100%) rename src/{ => candle}/widgets/sliderbox.ui (100%) rename src/{ => candle}/widgets/styledtoolbutton.cpp (100%) rename src/{ => candle}/widgets/styledtoolbutton.h (100%) rename src/{ => candle}/widgets/uiloader.cpp (100%) rename src/{ => candle}/widgets/uiloader.h (100%) rename src/{ => candle}/widgets/widget.cpp (100%) rename src/{ => candle}/widgets/widget.h (100%) rename src/{ => candle}/widgets/widgetmimedata.h (100%) create mode 100644 src/candleplugins/camera/config.ini create mode 100644 src/candleplugins/camera/plugins/cameraplugin.dll create mode 100644 src/candleplugins/camera/script.js create mode 100644 src/candleplugins/camera/settings.ui create mode 100644 src/candleplugins/camera/translation_ru.qm create mode 100644 src/candleplugins/camera/translation_ru.ts rename src/{plugins/test2/settings.ui => candleplugins/camera/widget.ui} (55%) create mode 100644 src/candleplugins/candleplugins.pro rename src/{plugins => candleplugins}/test1/config.ini (100%) rename src/{plugins => candleplugins}/test1/images/tool.png (100%) rename src/{plugins => candleplugins}/test1/script.js (100%) rename src/{plugins => candleplugins}/test1/settings.ui (100%) rename src/{plugins => candleplugins}/test1/translation_ru.qm (100%) rename src/{plugins => candleplugins}/test1/translation_ru.ts (100%) rename src/{plugins => candleplugins}/test1/widget.ui (100%) create mode 100644 src/designerplugins/cameraplugin/cameraplugin.cpp create mode 100644 src/designerplugins/cameraplugin/cameraplugin.h create mode 100644 src/designerplugins/cameraplugin/cameraplugin.pro create mode 100644 src/designerplugins/cameraplugin/camerawidget.cpp create mode 100644 src/designerplugins/cameraplugin/camerawidget.h create mode 100644 src/designerplugins/designerplugins.pro delete mode 100644 src/plugins/test2/config.ini delete mode 100644 src/plugins/test2/images/tool.png delete mode 100644 src/plugins/test2/script.js delete mode 100644 src/plugins/test2/translation_ru.qm delete mode 100644 src/plugins/test2/translation_ru.ts delete mode 100644 src/plugins/test2/widget.ui diff --git a/.gitignore b/.gitignore index 7d07f2a2..295c0ff0 100644 --- a/.gitignore +++ b/.gitignore @@ -56,16 +56,19 @@ bin/* # VS .vs -/src/debug -/src/release -/src/candle.vcxproj.filters -/src/Candle_resource.aps -/src/Candle_resource.rc -/src/ui_* -/src/release +debug +release +ui_* +uic_* #vscode .vscode #makefiles -Makefile* \ No newline at end of file +Makefile* + +#binaries +bin + +#wrappers +*_wrapper.bat \ No newline at end of file diff --git a/candle.pro b/candle.pro new file mode 100644 index 00000000..03ab6305 --- /dev/null +++ b/candle.pro @@ -0,0 +1,22 @@ +TEMPLATE = subdirs + +SUBDIRS = src/candle \ + src/candleplugins \ + src/designerplugins + +# Make plugins translations +system(qmake src/candleplugins/candleplugins.pro) + +install_main.path = bin +install_main.files += src/candle/release/candle.exe + +install_plugins.path = bin/plugins +install_plugins.files = src/candleplugins/camera src/candleplugins/test1 + +install_translations.path = bin/translations +install_translations.files = src/candle/translations/* + +install_license.path = bin +install_license.files = LICENSE + +INSTALLS += install_main install_plugins install_translations install_license diff --git a/src/candle/Candle_resource.rc b/src/candle/Candle_resource.rc new file mode 100644 index 00000000..73092052 --- /dev/null +++ b/src/candle/Candle_resource.rc @@ -0,0 +1,41 @@ +# if defined(UNDER_CE) +# include +# else +# include +# endif + +IDI_ICON1 ICON DISCARDABLE "D:\\prj\\qtcode\\prj\\candle\\src\\candle\\images\\candle.ico" + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,2,7b,0 + PRODUCTVERSION 1,2,7b,0 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE 0x0L + BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904b0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "\0" + VALUE "FileVersion", "1.2.7b.0\0" + VALUE "LegalCopyright", "\0" + VALUE "OriginalFilename", "Candle.exe\0" + VALUE "ProductName", "Candle\0" + VALUE "ProductVersion", "1.2.7b.0\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 1200 + END + END +/* End of Version info */ + diff --git a/src/Info.plist b/src/candle/Info.plist similarity index 100% rename from src/Info.plist rename to src/candle/Info.plist diff --git a/src/candle.pro b/src/candle/candle.pro similarity index 94% rename from src/candle.pro rename to src/candle/candle.pro index 75a2d6ff..193ad1de 100644 --- a/src/candle.pro +++ b/src/candle/candle.pro @@ -115,10 +115,4 @@ DEFINES += _USE_MATH_DEFINES RESOURCES += \ shaders.qrc \ - images.qrc - -CONFIG(release, debug|release) { - QMAKE_CXXFLAGS += -Z7 -Fdrelease\\candle.pdb - QMAKE_CFLAGS += -Z7 -Fdrelease\\candle.pdb - QMAKE_LFLAGS += /DEBUG /OPT:REF -} \ No newline at end of file + images.qrc \ No newline at end of file diff --git a/src/drawers/gcodedrawer.cpp b/src/candle/drawers/gcodedrawer.cpp similarity index 100% rename from src/drawers/gcodedrawer.cpp rename to src/candle/drawers/gcodedrawer.cpp diff --git a/src/drawers/gcodedrawer.h b/src/candle/drawers/gcodedrawer.h similarity index 100% rename from src/drawers/gcodedrawer.h rename to src/candle/drawers/gcodedrawer.h diff --git a/src/drawers/heightmapborderdrawer.cpp b/src/candle/drawers/heightmapborderdrawer.cpp similarity index 100% rename from src/drawers/heightmapborderdrawer.cpp rename to src/candle/drawers/heightmapborderdrawer.cpp diff --git a/src/drawers/heightmapborderdrawer.h b/src/candle/drawers/heightmapborderdrawer.h similarity index 100% rename from src/drawers/heightmapborderdrawer.h rename to src/candle/drawers/heightmapborderdrawer.h diff --git a/src/drawers/heightmapgriddrawer.cpp b/src/candle/drawers/heightmapgriddrawer.cpp similarity index 100% rename from src/drawers/heightmapgriddrawer.cpp rename to src/candle/drawers/heightmapgriddrawer.cpp diff --git a/src/drawers/heightmapgriddrawer.h b/src/candle/drawers/heightmapgriddrawer.h similarity index 100% rename from src/drawers/heightmapgriddrawer.h rename to src/candle/drawers/heightmapgriddrawer.h diff --git a/src/drawers/heightmapinterpolationdrawer.cpp b/src/candle/drawers/heightmapinterpolationdrawer.cpp similarity index 100% rename from src/drawers/heightmapinterpolationdrawer.cpp rename to src/candle/drawers/heightmapinterpolationdrawer.cpp diff --git a/src/drawers/heightmapinterpolationdrawer.h b/src/candle/drawers/heightmapinterpolationdrawer.h similarity index 100% rename from src/drawers/heightmapinterpolationdrawer.h rename to src/candle/drawers/heightmapinterpolationdrawer.h diff --git a/src/drawers/origindrawer.cpp b/src/candle/drawers/origindrawer.cpp similarity index 100% rename from src/drawers/origindrawer.cpp rename to src/candle/drawers/origindrawer.cpp diff --git a/src/drawers/origindrawer.h b/src/candle/drawers/origindrawer.h similarity index 100% rename from src/drawers/origindrawer.h rename to src/candle/drawers/origindrawer.h diff --git a/src/drawers/selectiondrawer.cpp b/src/candle/drawers/selectiondrawer.cpp similarity index 100% rename from src/drawers/selectiondrawer.cpp rename to src/candle/drawers/selectiondrawer.cpp diff --git a/src/drawers/selectiondrawer.h b/src/candle/drawers/selectiondrawer.h similarity index 100% rename from src/drawers/selectiondrawer.h rename to src/candle/drawers/selectiondrawer.h diff --git a/src/drawers/shaderdrawable.cpp b/src/candle/drawers/shaderdrawable.cpp similarity index 100% rename from src/drawers/shaderdrawable.cpp rename to src/candle/drawers/shaderdrawable.cpp diff --git a/src/drawers/shaderdrawable.h b/src/candle/drawers/shaderdrawable.h similarity index 100% rename from src/drawers/shaderdrawable.h rename to src/candle/drawers/shaderdrawable.h diff --git a/src/drawers/tooldrawer.cpp b/src/candle/drawers/tooldrawer.cpp similarity index 100% rename from src/drawers/tooldrawer.cpp rename to src/candle/drawers/tooldrawer.cpp diff --git a/src/drawers/tooldrawer.h b/src/candle/drawers/tooldrawer.h similarity index 100% rename from src/drawers/tooldrawer.h rename to src/candle/drawers/tooldrawer.h diff --git a/src/fonts.qrc b/src/candle/fonts.qrc similarity index 100% rename from src/fonts.qrc rename to src/candle/fonts.qrc diff --git a/src/fonts/Ubuntu-Regular.ttf b/src/candle/fonts/Ubuntu-Regular.ttf old mode 100755 new mode 100644 similarity index 100% rename from src/fonts/Ubuntu-Regular.ttf rename to src/candle/fonts/Ubuntu-Regular.ttf diff --git a/src/frmabout.cpp b/src/candle/frmabout.cpp similarity index 100% rename from src/frmabout.cpp rename to src/candle/frmabout.cpp diff --git a/src/frmabout.h b/src/candle/frmabout.h similarity index 100% rename from src/frmabout.h rename to src/candle/frmabout.h diff --git a/src/frmabout.ui b/src/candle/frmabout.ui similarity index 100% rename from src/frmabout.ui rename to src/candle/frmabout.ui diff --git a/src/frmmain.cpp b/src/candle/frmmain.cpp similarity index 100% rename from src/frmmain.cpp rename to src/candle/frmmain.cpp index 3c6f7d18..a5a078e2 100644 --- a/src/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -536,10 +536,6 @@ void frmMain::loadSettings() // Load plugins loadPlugins(); - // Load custom settings - m_settings->loadCustomSettings(set); - emit settingsLoaded(); - // Adjust docks width int w = qMax(ui->dockDevice->widget()->sizeHint().width(), ui->dockModification->widget()->sizeHint().width()); @@ -616,6 +612,10 @@ void frmMain::loadSettings() ui->actViewLockWindows->setChecked(set.value("lockWindows").toBool()); ui->actViewLockPanels->setChecked(set.value("lockPanels").toBool()); + // Load custom settings + m_settings->loadCustomSettings(set); + emit settingsLoaded(); + m_settingsLoading = false; } diff --git a/src/frmmain.h b/src/candle/frmmain.h similarity index 100% rename from src/frmmain.h rename to src/candle/frmmain.h diff --git a/src/frmmain.ui b/src/candle/frmmain.ui similarity index 100% rename from src/frmmain.ui rename to src/candle/frmmain.ui diff --git a/src/frmsettings.cpp b/src/candle/frmsettings.cpp similarity index 100% rename from src/frmsettings.cpp rename to src/candle/frmsettings.cpp diff --git a/src/frmsettings.h b/src/candle/frmsettings.h similarity index 100% rename from src/frmsettings.h rename to src/candle/frmsettings.h diff --git a/src/frmsettings.ui b/src/candle/frmsettings.ui similarity index 100% rename from src/frmsettings.ui rename to src/candle/frmsettings.ui diff --git a/src/images.qrc b/src/candle/images.qrc similarity index 100% rename from src/images.qrc rename to src/candle/images.qrc diff --git a/src/images/1401561986_chevron-left.png b/src/candle/images/1401561986_chevron-left.png similarity index 100% rename from src/images/1401561986_chevron-left.png rename to src/candle/images/1401561986_chevron-left.png diff --git a/src/images/1401562173_chevron-down.png b/src/candle/images/1401562173_chevron-down.png similarity index 100% rename from src/images/1401562173_chevron-down.png rename to src/candle/images/1401562173_chevron-down.png diff --git a/src/images/1401562173_chevron-right.png b/src/candle/images/1401562173_chevron-right.png similarity index 100% rename from src/images/1401562173_chevron-right.png rename to src/candle/images/1401562173_chevron-right.png diff --git a/src/images/1401562173_chevron-up.png b/src/candle/images/1401562173_chevron-up.png similarity index 100% rename from src/images/1401562173_chevron-up.png rename to src/candle/images/1401562173_chevron-up.png diff --git a/src/images/1401562699_icon-arrow-down-b.png b/src/candle/images/1401562699_icon-arrow-down-b.png similarity index 100% rename from src/images/1401562699_icon-arrow-down-b.png rename to src/candle/images/1401562699_icon-arrow-down-b.png diff --git a/src/images/1401562699_icon-arrow-up-b.png b/src/candle/images/1401562699_icon-arrow-up-b.png similarity index 100% rename from src/images/1401562699_icon-arrow-up-b.png rename to src/candle/images/1401562699_icon-arrow-up-b.png diff --git a/src/images/axis_return.png b/src/candle/images/axis_return.png similarity index 100% rename from src/images/axis_return.png rename to src/candle/images/axis_return.png diff --git a/src/images/axis_return.svg b/src/candle/images/axis_return.svg similarity index 100% rename from src/images/axis_return.svg rename to src/candle/images/axis_return.svg diff --git a/src/images/axis_zero.png b/src/candle/images/axis_zero.png similarity index 100% rename from src/images/axis_zero.png rename to src/candle/images/axis_zero.png diff --git a/src/images/axis_zero.svg b/src/candle/images/axis_zero.svg similarity index 100% rename from src/images/axis_zero.svg rename to src/candle/images/axis_zero.svg diff --git a/src/images/brake.png b/src/candle/images/brake.png similarity index 100% rename from src/images/brake.png rename to src/candle/images/brake.png diff --git a/src/images/candle.ico b/src/candle/images/candle.ico similarity index 100% rename from src/images/candle.ico rename to src/candle/images/candle.ico diff --git a/src/images/candle_16.png b/src/candle/images/candle_16.png similarity index 100% rename from src/images/candle_16.png rename to src/candle/images/candle_16.png diff --git a/src/images/candle_20.png b/src/candle/images/candle_20.png similarity index 100% rename from src/images/candle_20.png rename to src/candle/images/candle_20.png diff --git a/src/images/candle_256.png b/src/candle/images/candle_256.png similarity index 100% rename from src/images/candle_256.png rename to src/candle/images/candle_256.png diff --git a/src/images/collapse.png b/src/candle/images/collapse.png similarity index 100% rename from src/images/collapse.png rename to src/candle/images/collapse.png diff --git a/src/images/collapse_disabled.png b/src/candle/images/collapse_disabled.png similarity index 100% rename from src/images/collapse_disabled.png rename to src/candle/images/collapse_disabled.png diff --git a/src/images/cube.png b/src/candle/images/cube.png similarity index 100% rename from src/images/cube.png rename to src/candle/images/cube.png diff --git a/src/images/cubeFront.png b/src/candle/images/cubeFront.png similarity index 100% rename from src/images/cubeFront.png rename to src/candle/images/cubeFront.png diff --git a/src/images/cubeLeft.png b/src/candle/images/cubeLeft.png similarity index 100% rename from src/images/cubeLeft.png rename to src/candle/images/cubeLeft.png diff --git a/src/images/cubeTop.png b/src/candle/images/cubeTop.png similarity index 100% rename from src/images/cubeTop.png rename to src/candle/images/cubeTop.png diff --git a/src/images/cutter.png b/src/candle/images/cutter.png similarity index 100% rename from src/images/cutter.png rename to src/candle/images/cutter.png diff --git a/src/images/cutter1.ico b/src/candle/images/cutter1.ico similarity index 100% rename from src/images/cutter1.ico rename to src/candle/images/cutter1.ico diff --git a/src/images/erase_1.png b/src/candle/images/erase_1.png similarity index 100% rename from src/images/erase_1.png rename to src/candle/images/erase_1.png diff --git a/src/images/expand.png b/src/candle/images/expand.png similarity index 100% rename from src/images/expand.png rename to src/candle/images/expand.png diff --git a/src/images/expand_disabled.png b/src/candle/images/expand_disabled.png similarity index 100% rename from src/images/expand_disabled.png rename to src/candle/images/expand_disabled.png diff --git a/src/images/fit_1.png b/src/candle/images/fit_1.png similarity index 100% rename from src/images/fit_1.png rename to src/candle/images/fit_1.png diff --git a/src/images/g7567.png b/src/candle/images/g7567.png similarity index 100% rename from src/images/g7567.png rename to src/candle/images/g7567.png diff --git a/src/images/grblControl1.ico b/src/candle/images/grblControl1.ico similarity index 100% rename from src/images/grblControl1.ico rename to src/candle/images/grblControl1.ico diff --git a/src/images/grblControl2.ico b/src/candle/images/grblControl2.ico similarity index 100% rename from src/images/grblControl2.ico rename to src/candle/images/grblControl2.ico diff --git a/src/images/guard.png b/src/candle/images/guard.png similarity index 100% rename from src/images/guard.png rename to src/candle/images/guard.png diff --git a/src/images/guard.svg b/src/candle/images/guard.svg similarity index 100% rename from src/images/guard.svg rename to src/candle/images/guard.svg diff --git a/src/images/handle2s.png b/src/candle/images/handle2s.png similarity index 100% rename from src/images/handle2s.png rename to src/candle/images/handle2s.png diff --git a/src/images/handle2s1.png b/src/candle/images/handle2s1.png similarity index 100% rename from src/images/handle2s1.png rename to src/candle/images/handle2s1.png diff --git a/src/images/handle2sh.png b/src/candle/images/handle2sh.png similarity index 100% rename from src/images/handle2sh.png rename to src/candle/images/handle2sh.png diff --git a/src/images/handle_horizontal.png b/src/candle/images/handle_horizontal.png similarity index 100% rename from src/images/handle_horizontal.png rename to src/candle/images/handle_horizontal.png diff --git a/src/images/handle_small.png b/src/candle/images/handle_small.png similarity index 100% rename from src/images/handle_small.png rename to src/candle/images/handle_small.png diff --git a/src/images/handle_vertical.png b/src/candle/images/handle_vertical.png similarity index 100% rename from src/images/handle_vertical.png rename to src/candle/images/handle_vertical.png diff --git a/src/images/home.svg b/src/candle/images/home.svg similarity index 100% rename from src/images/home.svg rename to src/candle/images/home.svg diff --git a/src/images/icon.png b/src/candle/images/icon.png similarity index 100% rename from src/images/icon.png rename to src/candle/images/icon.png diff --git a/src/images/icon.svg b/src/candle/images/icon.svg similarity index 100% rename from src/images/icon.svg rename to src/candle/images/icon.svg diff --git a/src/images/icon1.png b/src/candle/images/icon1.png similarity index 100% rename from src/images/icon1.png rename to src/candle/images/icon1.png diff --git a/src/images/icon1.svg b/src/candle/images/icon1.svg similarity index 100% rename from src/images/icon1.svg rename to src/candle/images/icon1.svg diff --git a/src/images/icon2.svg b/src/candle/images/icon2.svg similarity index 100% rename from src/images/icon2.svg rename to src/candle/images/icon2.svg diff --git a/src/images/icon3.svg b/src/candle/images/icon3.svg similarity index 100% rename from src/images/icon3.svg rename to src/candle/images/icon3.svg diff --git a/src/images/icon3_16.png b/src/candle/images/icon3_16.png similarity index 100% rename from src/images/icon3_16.png rename to src/candle/images/icon3_16.png diff --git a/src/images/icon3_20.png b/src/candle/images/icon3_20.png similarity index 100% rename from src/images/icon3_20.png rename to src/candle/images/icon3_20.png diff --git a/src/images/icon3png.png b/src/candle/images/icon3png.png similarity index 100% rename from src/images/icon3png.png rename to src/candle/images/icon3png.png diff --git a/src/images/icons.svg b/src/candle/images/icons.svg similarity index 100% rename from src/images/icons.svg rename to src/candle/images/icons.svg diff --git a/src/images/icons_arrow.svg b/src/candle/images/icons_arrow.svg similarity index 100% rename from src/images/icons_arrow.svg rename to src/candle/images/icons_arrow.svg diff --git a/src/images/laser.svg b/src/candle/images/laser.svg similarity index 100% rename from src/images/laser.svg rename to src/candle/images/laser.svg diff --git a/src/images/laser1.svg b/src/candle/images/laser1.svg similarity index 100% rename from src/images/laser1.svg rename to src/candle/images/laser1.svg diff --git a/src/images/list.png b/src/candle/images/list.png similarity index 100% rename from src/images/list.png rename to src/candle/images/list.png diff --git a/src/images/list_collapsed.png b/src/candle/images/list_collapsed.png similarity index 100% rename from src/images/list_collapsed.png rename to src/candle/images/list_collapsed.png diff --git a/src/images/menu.png b/src/candle/images/menu.png similarity index 100% rename from src/images/menu.png rename to src/candle/images/menu.png diff --git a/src/images/menu.svg b/src/candle/images/menu.svg similarity index 100% rename from src/images/menu.svg rename to src/candle/images/menu.svg diff --git a/src/images/menu_13.png b/src/candle/images/menu_13.png similarity index 100% rename from src/images/menu_13.png rename to src/candle/images/menu_13.png diff --git a/src/images/menu_16.png b/src/candle/images/menu_16.png similarity index 100% rename from src/images/menu_16.png rename to src/candle/images/menu_16.png diff --git a/src/images/menu_collapse.png b/src/candle/images/menu_collapse.png similarity index 100% rename from src/images/menu_collapse.png rename to src/candle/images/menu_collapse.png diff --git a/src/images/menu_collapse_13.png b/src/candle/images/menu_collapse_13.png similarity index 100% rename from src/images/menu_collapse_13.png rename to src/candle/images/menu_collapse_13.png diff --git a/src/images/menu_collapse_16.png b/src/candle/images/menu_collapse_16.png similarity index 100% rename from src/images/menu_collapse_16.png rename to src/candle/images/menu_collapse_16.png diff --git a/src/images/num1.png b/src/candle/images/num1.png similarity index 100% rename from src/images/num1.png rename to src/candle/images/num1.png diff --git a/src/images/num1.svg b/src/candle/images/num1.svg similarity index 100% rename from src/images/num1.svg rename to src/candle/images/num1.svg diff --git a/src/images/num2.png b/src/candle/images/num2.png similarity index 100% rename from src/images/num2.png rename to src/candle/images/num2.png diff --git a/src/images/num3.png b/src/candle/images/num3.png similarity index 100% rename from src/images/num3.png rename to src/candle/images/num3.png diff --git a/src/images/num4.png b/src/candle/images/num4.png similarity index 100% rename from src/images/num4.png rename to src/candle/images/num4.png diff --git a/src/images/origin.png b/src/candle/images/origin.png similarity index 100% rename from src/images/origin.png rename to src/candle/images/origin.png diff --git a/src/images/origin.svg b/src/candle/images/origin.svg similarity index 100% rename from src/images/origin.svg rename to src/candle/images/origin.svg diff --git a/src/images/restart.png b/src/candle/images/restart.png similarity index 100% rename from src/images/restart.png rename to src/candle/images/restart.png diff --git a/src/images/restart.svg b/src/candle/images/restart.svg similarity index 100% rename from src/images/restart.svg rename to src/candle/images/restart.svg diff --git a/src/images/run.png b/src/candle/images/run.png similarity index 100% rename from src/images/run.png rename to src/candle/images/run.png diff --git a/src/images/run.svg b/src/candle/images/run.svg similarity index 100% rename from src/images/run.svg rename to src/candle/images/run.svg diff --git a/src/images/safe_z.png b/src/candle/images/safe_z.png similarity index 100% rename from src/images/safe_z.png rename to src/candle/images/safe_z.png diff --git a/src/images/safe_z.svg b/src/candle/images/safe_z.svg similarity index 100% rename from src/images/safe_z.svg rename to src/candle/images/safe_z.svg diff --git a/src/images/search_for_home2.png b/src/candle/images/search_for_home2.png similarity index 100% rename from src/images/search_for_home2.png rename to src/candle/images/search_for_home2.png diff --git a/src/images/search_for_z.png b/src/candle/images/search_for_z.png similarity index 100% rename from src/images/search_for_z.png rename to src/candle/images/search_for_z.png diff --git a/src/images/search_home.svg b/src/candle/images/search_home.svg similarity index 100% rename from src/images/search_home.svg rename to src/candle/images/search_home.svg diff --git a/src/images/search_z.svg b/src/candle/images/search_z.svg similarity index 100% rename from src/images/search_z.svg rename to src/candle/images/search_z.svg diff --git a/src/images/send_1.png b/src/candle/images/send_1.png similarity index 100% rename from src/images/send_1.png rename to src/candle/images/send_1.png diff --git a/src/images/shadow.png b/src/candle/images/shadow.png similarity index 100% rename from src/images/shadow.png rename to src/candle/images/shadow.png diff --git a/src/images/small_arrow.png b/src/candle/images/small_arrow.png similarity index 100% rename from src/images/small_arrow.png rename to src/candle/images/small_arrow.png diff --git a/src/images/small_arrow.svg b/src/candle/images/small_arrow.svg similarity index 100% rename from src/images/small_arrow.svg rename to src/candle/images/small_arrow.svg diff --git a/src/images/unlock.png b/src/candle/images/unlock.png similarity index 100% rename from src/images/unlock.png rename to src/candle/images/unlock.png diff --git a/src/images/zero_z.png b/src/candle/images/zero_z.png similarity index 100% rename from src/images/zero_z.png rename to src/candle/images/zero_z.png diff --git a/src/images/zero_z.svg b/src/candle/images/zero_z.svg similarity index 100% rename from src/images/zero_z.svg rename to src/candle/images/zero_z.svg diff --git a/src/main.cpp b/src/candle/main.cpp similarity index 100% rename from src/main.cpp rename to src/candle/main.cpp diff --git a/src/parser/arcproperties.cpp b/src/candle/parser/arcproperties.cpp similarity index 100% rename from src/parser/arcproperties.cpp rename to src/candle/parser/arcproperties.cpp diff --git a/src/parser/arcproperties.h b/src/candle/parser/arcproperties.h similarity index 100% rename from src/parser/arcproperties.h rename to src/candle/parser/arcproperties.h diff --git a/src/parser/gcodeparser.cpp b/src/candle/parser/gcodeparser.cpp similarity index 100% rename from src/parser/gcodeparser.cpp rename to src/candle/parser/gcodeparser.cpp diff --git a/src/parser/gcodeparser.h b/src/candle/parser/gcodeparser.h similarity index 100% rename from src/parser/gcodeparser.h rename to src/candle/parser/gcodeparser.h diff --git a/src/parser/gcodepreprocessorutils.cpp b/src/candle/parser/gcodepreprocessorutils.cpp similarity index 100% rename from src/parser/gcodepreprocessorutils.cpp rename to src/candle/parser/gcodepreprocessorutils.cpp diff --git a/src/parser/gcodepreprocessorutils.h b/src/candle/parser/gcodepreprocessorutils.h similarity index 100% rename from src/parser/gcodepreprocessorutils.h rename to src/candle/parser/gcodepreprocessorutils.h diff --git a/src/parser/gcodeviewparse.cpp b/src/candle/parser/gcodeviewparse.cpp similarity index 100% rename from src/parser/gcodeviewparse.cpp rename to src/candle/parser/gcodeviewparse.cpp diff --git a/src/parser/gcodeviewparse.h b/src/candle/parser/gcodeviewparse.h similarity index 100% rename from src/parser/gcodeviewparse.h rename to src/candle/parser/gcodeviewparse.h diff --git a/src/parser/linesegment.cpp b/src/candle/parser/linesegment.cpp similarity index 100% rename from src/parser/linesegment.cpp rename to src/candle/parser/linesegment.cpp diff --git a/src/parser/linesegment.h b/src/candle/parser/linesegment.h similarity index 100% rename from src/parser/linesegment.h rename to src/candle/parser/linesegment.h diff --git a/src/parser/pointsegment.cpp b/src/candle/parser/pointsegment.cpp similarity index 100% rename from src/parser/pointsegment.cpp rename to src/candle/parser/pointsegment.cpp diff --git a/src/parser/pointsegment.h b/src/candle/parser/pointsegment.h similarity index 100% rename from src/parser/pointsegment.h rename to src/candle/parser/pointsegment.h diff --git a/src/scriptvars.cpp b/src/candle/scriptvars.cpp similarity index 100% rename from src/scriptvars.cpp rename to src/candle/scriptvars.cpp diff --git a/src/scriptvars.h b/src/candle/scriptvars.h similarity index 100% rename from src/scriptvars.h rename to src/candle/scriptvars.h diff --git a/src/shaders.qrc b/src/candle/shaders.qrc similarity index 100% rename from src/shaders.qrc rename to src/candle/shaders.qrc diff --git a/src/shaders/fshader.glsl b/src/candle/shaders/fshader.glsl similarity index 100% rename from src/shaders/fshader.glsl rename to src/candle/shaders/fshader.glsl diff --git a/src/shaders/vshader.glsl b/src/candle/shaders/vshader.glsl similarity index 100% rename from src/shaders/vshader.glsl rename to src/candle/shaders/vshader.glsl diff --git a/src/tables/gcodetablemodel.cpp b/src/candle/tables/gcodetablemodel.cpp similarity index 100% rename from src/tables/gcodetablemodel.cpp rename to src/candle/tables/gcodetablemodel.cpp diff --git a/src/tables/gcodetablemodel.h b/src/candle/tables/gcodetablemodel.h similarity index 100% rename from src/tables/gcodetablemodel.h rename to src/candle/tables/gcodetablemodel.h diff --git a/src/tables/heightmaptablemodel.cpp b/src/candle/tables/heightmaptablemodel.cpp similarity index 100% rename from src/tables/heightmaptablemodel.cpp rename to src/candle/tables/heightmaptablemodel.cpp diff --git a/src/tables/heightmaptablemodel.h b/src/candle/tables/heightmaptablemodel.h similarity index 100% rename from src/tables/heightmaptablemodel.h rename to src/candle/tables/heightmaptablemodel.h diff --git a/src/translations/candle_en.ts b/src/candle/translations/candle_en.ts similarity index 100% rename from src/translations/candle_en.ts rename to src/candle/translations/candle_en.ts diff --git a/src/translations/candle_es.qm b/src/candle/translations/candle_es.qm similarity index 100% rename from src/translations/candle_es.qm rename to src/candle/translations/candle_es.qm diff --git a/src/translations/candle_es.ts b/src/candle/translations/candle_es.ts similarity index 100% rename from src/translations/candle_es.ts rename to src/candle/translations/candle_es.ts diff --git a/src/translations/candle_fr.qm b/src/candle/translations/candle_fr.qm similarity index 100% rename from src/translations/candle_fr.qm rename to src/candle/translations/candle_fr.qm diff --git a/src/translations/candle_fr.ts b/src/candle/translations/candle_fr.ts similarity index 100% rename from src/translations/candle_fr.ts rename to src/candle/translations/candle_fr.ts diff --git a/src/translations/candle_pt.qm b/src/candle/translations/candle_pt.qm similarity index 100% rename from src/translations/candle_pt.qm rename to src/candle/translations/candle_pt.qm diff --git a/src/translations/candle_pt.ts b/src/candle/translations/candle_pt.ts similarity index 100% rename from src/translations/candle_pt.ts rename to src/candle/translations/candle_pt.ts diff --git a/src/translations/candle_ru.qm b/src/candle/translations/candle_ru.qm similarity index 100% rename from src/translations/candle_ru.qm rename to src/candle/translations/candle_ru.qm diff --git a/src/translations/candle_ru.ts b/src/candle/translations/candle_ru.ts similarity index 100% rename from src/translations/candle_ru.ts rename to src/candle/translations/candle_ru.ts diff --git a/src/utils/interpolation.h b/src/candle/utils/interpolation.h similarity index 100% rename from src/utils/interpolation.h rename to src/candle/utils/interpolation.h diff --git a/src/utils/util.h b/src/candle/utils/util.h similarity index 100% rename from src/utils/util.h rename to src/candle/utils/util.h diff --git a/src/widgets/colorpicker.cpp b/src/candle/widgets/colorpicker.cpp similarity index 100% rename from src/widgets/colorpicker.cpp rename to src/candle/widgets/colorpicker.cpp diff --git a/src/widgets/colorpicker.h b/src/candle/widgets/colorpicker.h similarity index 100% rename from src/widgets/colorpicker.h rename to src/candle/widgets/colorpicker.h diff --git a/src/widgets/combobox.cpp b/src/candle/widgets/combobox.cpp similarity index 100% rename from src/widgets/combobox.cpp rename to src/candle/widgets/combobox.cpp diff --git a/src/widgets/combobox.h b/src/candle/widgets/combobox.h similarity index 100% rename from src/widgets/combobox.h rename to src/candle/widgets/combobox.h diff --git a/src/widgets/comboboxkey.cpp b/src/candle/widgets/comboboxkey.cpp similarity index 100% rename from src/widgets/comboboxkey.cpp rename to src/candle/widgets/comboboxkey.cpp diff --git a/src/widgets/comboboxkey.h b/src/candle/widgets/comboboxkey.h similarity index 100% rename from src/widgets/comboboxkey.h rename to src/candle/widgets/comboboxkey.h diff --git a/src/widgets/dropwidget.cpp b/src/candle/widgets/dropwidget.cpp similarity index 100% rename from src/widgets/dropwidget.cpp rename to src/candle/widgets/dropwidget.cpp diff --git a/src/widgets/dropwidget.h b/src/candle/widgets/dropwidget.h similarity index 100% rename from src/widgets/dropwidget.h rename to src/candle/widgets/dropwidget.h diff --git a/src/widgets/glwidget.cpp b/src/candle/widgets/glwidget.cpp similarity index 100% rename from src/widgets/glwidget.cpp rename to src/candle/widgets/glwidget.cpp diff --git a/src/widgets/glwidget.h b/src/candle/widgets/glwidget.h similarity index 100% rename from src/widgets/glwidget.h rename to src/candle/widgets/glwidget.h diff --git a/src/widgets/groupbox.cpp b/src/candle/widgets/groupbox.cpp similarity index 100% rename from src/widgets/groupbox.cpp rename to src/candle/widgets/groupbox.cpp diff --git a/src/widgets/groupbox.h b/src/candle/widgets/groupbox.h similarity index 100% rename from src/widgets/groupbox.h rename to src/candle/widgets/groupbox.h diff --git a/src/widgets/scrollarea.cpp b/src/candle/widgets/scrollarea.cpp similarity index 100% rename from src/widgets/scrollarea.cpp rename to src/candle/widgets/scrollarea.cpp diff --git a/src/widgets/scrollarea.h b/src/candle/widgets/scrollarea.h similarity index 100% rename from src/widgets/scrollarea.h rename to src/candle/widgets/scrollarea.h diff --git a/src/widgets/slider.cpp b/src/candle/widgets/slider.cpp similarity index 100% rename from src/widgets/slider.cpp rename to src/candle/widgets/slider.cpp diff --git a/src/widgets/slider.h b/src/candle/widgets/slider.h similarity index 100% rename from src/widgets/slider.h rename to src/candle/widgets/slider.h diff --git a/src/widgets/sliderbox.cpp b/src/candle/widgets/sliderbox.cpp similarity index 100% rename from src/widgets/sliderbox.cpp rename to src/candle/widgets/sliderbox.cpp diff --git a/src/widgets/sliderbox.h b/src/candle/widgets/sliderbox.h similarity index 100% rename from src/widgets/sliderbox.h rename to src/candle/widgets/sliderbox.h diff --git a/src/widgets/sliderbox.ui b/src/candle/widgets/sliderbox.ui similarity index 100% rename from src/widgets/sliderbox.ui rename to src/candle/widgets/sliderbox.ui diff --git a/src/widgets/styledtoolbutton.cpp b/src/candle/widgets/styledtoolbutton.cpp similarity index 100% rename from src/widgets/styledtoolbutton.cpp rename to src/candle/widgets/styledtoolbutton.cpp diff --git a/src/widgets/styledtoolbutton.h b/src/candle/widgets/styledtoolbutton.h similarity index 100% rename from src/widgets/styledtoolbutton.h rename to src/candle/widgets/styledtoolbutton.h diff --git a/src/widgets/uiloader.cpp b/src/candle/widgets/uiloader.cpp similarity index 100% rename from src/widgets/uiloader.cpp rename to src/candle/widgets/uiloader.cpp diff --git a/src/widgets/uiloader.h b/src/candle/widgets/uiloader.h similarity index 100% rename from src/widgets/uiloader.h rename to src/candle/widgets/uiloader.h diff --git a/src/widgets/widget.cpp b/src/candle/widgets/widget.cpp similarity index 100% rename from src/widgets/widget.cpp rename to src/candle/widgets/widget.cpp diff --git a/src/widgets/widget.h b/src/candle/widgets/widget.h similarity index 100% rename from src/widgets/widget.h rename to src/candle/widgets/widget.h diff --git a/src/widgets/widgetmimedata.h b/src/candle/widgets/widgetmimedata.h similarity index 100% rename from src/widgets/widgetmimedata.h rename to src/candle/widgets/widgetmimedata.h diff --git a/src/candleplugins/camera/config.ini b/src/candleplugins/camera/config.ini new file mode 100644 index 00000000..aa97eb75 --- /dev/null +++ b/src/candleplugins/camera/config.ini @@ -0,0 +1,4 @@ +[General] +title="Camera" +name="CameraPlugin" +type="window" \ No newline at end of file diff --git a/src/candleplugins/camera/plugins/cameraplugin.dll b/src/candleplugins/camera/plugins/cameraplugin.dll new file mode 100644 index 0000000000000000000000000000000000000000..66bba3e103c7ce205d9821b3850e99caf672cc18 GIT binary patch literal 44544 zcmeIb4_s7L`agbw0mmF=Dkv(dsm7L)+yUk=-Cb*~+}8HvXTR>QyG!M#Fj>K3TQV~&HEP{H*JKOJH7d6GzMpgNow+lB*5~#8 z{l4GV_q*fkIrrXkp65BwdCqg5^PF?f#iBblb8#HUsQ|$s$93RJKQ~Lyp9mvgsDy1d&P7mGtz zZU7miH2h*YcMKyUIwD|K@v{4Qj$4CV)qNbdor=f%^#T8)@e0HFo9m+brjq0Or~}9O zP4{_Qd?@?jZAeHiYO5qS?$}R<)=zJ$uJToJ+)Z#M5nrTk6+bQrAwH)@#P4d5Ao;^*eL8H&e$ z-Tp7sKncHCuX%5#s_b~4K54XY6B)rmm`-eQIq_r-g0Cq6%Vu>aln2Z&S3@%|J01UHox>a`VZ zcdM4R#qj$U?e9M&+#F)|ZZ(+g6RwcZ;<^=xz0$9^jQ8m^fqnX7{*CTDy_!@JOx{(= zY54<77rv_EWJKx8&raEJ(3cRLx~YoO?(gjlJ#QAD1A{4L?Rk2Qhd&cc?p)4k-L@n;IM8-eaeP&zKIL?H^g2K98d+iRrb&Qrz(~%dR42P_iKDj5b^^v`mu+^ zEYcpxABlk#U&>GL1m9{)K%0@nq1~t7fGqU9F@J;}U*Xpc@=MhAuYEVR?_g6bf6qwZ zQx#NpF=?z1Rh0?%f;AZ1zxIDX1|l?4RYhmzhC-42-OHKG%`}@AB^Z8p?l_4o6gZS+-Vb~-~@VBK)Di$eti27Uq z9rU+Eqfp-GzB^W`gESVWJX!Ar zlQ+Q|w9nPIE!OM06Sk~?0nAeSaA{kb(zY};nA{Kj9u>N0rBT4qJuAHr)93M}hLySl zd3t?J+fr-WQit%e5i$*viLBM9p+Falj=#2y|4T6WB)nVqguPy*x2m_YOUg!EPRC{i zS87Ej_oWJJqdCNZ!s5MvDnI3 z7(ojml8D7$z~bP_7_t7j@G9GY!q3&Mj0q-h7jH{~$vf!Ixs%eK;5#Tr-mcIS#wbzl zri?Njlv*;6|1uqdKi>uIoP%qQ@l7lf>av(EV)`Hi zR$jPFQC>K@+@mZ{k0^&dOe_ogpE895(kP5Ujn0SfNuoh7jwUvpC5fJOFEs(aR&D^i zC(T{-3!GA)DgcrAM9(Rw(m)k{R-dv)Jr_hh55qgl_-L;{D=nw`kUVA@1y9$KjpbYLV~rxtBZrM7Me`mVqr(68h?WTtzVnHJuO<}%aZ z%Tfb>3C@E(>)Pg~pp#J!*64oR6!Tr(!~+v+N?Wx)Etp&`7PH9?W`n2pxoO3irKmm~ zVshwqyM$A!*UW>xiBA}Sbn}Mr&o6>On$=JvM%`A*EYv5-dZ%eCDKe&D_R$Eukiyb4 zlnO)RRAnrfD20)rhM%DZW?7=fnFiq=lLGe_#_(tSDG*-GbWuo^tJ~&Ud5@~C%)w^3 zv*1BOs6#@)KL$>A1_q6oRN%G(_ZM*dnfuho19~ zFq<8H4Uq}rKZ3#cxcA&DSn2UwQ}{O!5*UtsdHhyg|Cyt&oj7^);E4~9 zzS@8A=&L7QgJj2gPrQEO^wHOjFV-7Qe1Oy{+;a}$!dxBiq>+yifAwOqmbWlPry$}= zIR=hG%=fA5bsiu%%S8lo4k6#5#I_1=O_#7kt^;+WDG)DJFT8yN$4T>CWXK464=C+j z6Xnr$qQz&OgGWz6XB!_WNaAmy;Amr^{_+FvB#ID>E7M?r>C6D%re_vLsSrlJjjp%y z6EI4qdDQ&XyFs_%(0!HsEyHwo&X-uT6Ws;9TE(ags0He{H~7+x+V;GS+Ihv`=HR>9 z)Tr7KbZgp6^=^y>{k-7Yfi4ZBdy8l^(+bqH>}S^Q5@lmD-Gtg@Stz7qPmh%9FW*?4 zG`av`wxNSs&^9F|mpB`#GvK+?xZqpNzv{xng#2p?^H6O5=Vxm8+u$kMeF1IzT3(CL z;W8;6iHaZK*+DQSrzY470N6c%(++ z_O*ZPc;w%eCUK#7t`0RQLJ}6wsfCMC#sBhnjx|R3Rl2APIiA~&=dofH(uWvd^?j@M zoIyAWAHz>*OW@UT@A|-(LEpp|$S8&q_o-n7qk={i2k$kHB1Ded8Ch?8;YKZ=0E;iC zhtkd3dF`-f;7B?Wt~eVEp8hSLKgg?#L*~GOu6L$|Cpr=yKT-an|C8jOIIjGckCq=Z zBu2dN(!f_iUq;}yAQY)h{849Xr~igBK7*fy5&e*spQVP99@5Se{sX+rLP}Y>zxO-R z|8pdYUeupRZc2)VTiY3)TOp!9E-MGk*H#v?q5 zXgXql=mPlv5si=d?rCM`=pq;F26;h)h}TWcPbnq`!FJIMi0KM3=&-1W*iGAoh>h<- zWaP#wmbTJ(u9)wI#%PtIYl}gcHc!}rAenbkyeGzK2y?+b2~<`N0WFBh&mt^*Gw@Zc ze+f^Mrc(_+yON42>J^v8w@8ui+Y$*}TN1AhBT4Jzw~JAK9^VTIQs)WX!>IfXVfPgn zid2&tEulqX5R*FVI!i>?-NcYWUB?fFdagi7{X{vTz#I&UC@|2K9$KhGjOWg<%8SSK zmT-n#U^vES!~|ei8B+uK?iUI%`0%XZi{SpT?qEB;qkKNXj`^4}i_{VV#TN8pBABe9 zsj5hgfO!leMnGFxEZV5Wnm`)A17UeDJU=p_Z-$UJ%0j;bp(Qtd`Wk-zARikn(6Bn< zQHLm$IwSAxO68vq1uVn|672$xUGK{etP`WTJ#Gm-mc1;1^&lr8H zu<@ME#}U_0WtkU>>bg{v`8I~ZmZr2YXYZmW(DCMO{e+c(gR z`;mUumEvw+>wEt4AVjA&s1sW=;Ojt|D(d_T$bTJlp4fT?J{EseAMb7%Qs5G(lax5<(T>*9^;keH2SNn?a zsKc=R>laLhP~@Oo!&2m+lYF$&Bc;J3HAO}aunagMfperJ3f`<6-R3t6}>HXN-XP>#0|8g&(KHr%MI*((-^+z-7Ciu{?q}Q z7SJWCbNgcxTldlMs>3KHIsO?T$8%Klr%12yxQzZS6<9X53*SF8+#VV0;CWcakfgo8p02(9dhz#&Cnl zi;+uj*2D!vSW$zZJ%v5puxmX;Yw06?b9H|#BN3bU$$5Y+X zn+Iw!a|V@?GpL4=nKP&fIRmZl4)96mW5ULFDfxmt(d=Txy3Clf()rsp`~vjA5Af=) zeeI8F7dB}#Ka1u%kFYvL)H(J~!#?|EI@Hs)hqZ!+{KXjTkk2hDWhaX_N{+i{XL>5o4%E9o6_gYRn7Q2%lI9 z-o`KX(@`VeVvrj6mDDU3~ITi>lmqm{_ z$@}vrLVzT7Qf&~Pgp;1)gGb;9E1?{;-ACio%K8GHN!b^-Mi{=0z4N$L!`}{Le3%*I z56BqB_wABBew2Lv{y;F&C5s;DYK3u);SY0_{!ka;4>94&&Jc!}M~0Xh z-rz7I#`1tCR;bDi4(1|j_OM+JtYGpYH#t)2^;26+OgT0=UO5R>C^k8g*d_S7qm|4rS3cYEwX~r@eXpXE~FcAhYLqOm|X_nmQ_XmD1}r- zQs%`8<+Pl}D{NZwBnflygn?ZERcW!}7T*0EQx)E&lMIro+~-l1R-vl!`XfcicrU_C zWY0+EjGaDmi)nOA9>1GBp~8qnUC|a8^mXMOiulABH69COg@HpkpIe9xu*415L25K7 z1$zVRR6vW0PlKYS-RGEAj~Byik1zC&d|G$d;v8(R5bc(RF*`}q6MSnLPM#rZKBR*OU$0}PKypqq*3*U zaD#)WJt%ar(Vd)5f#WcC-R98|3LS%NrxLyW6$Z&ur`7AiALdLw?V|G(|3gn2$TAf1eXSZ z6)b7-jOt8^SNv*k8R$GN7=$> zbFm+xioqe8?t~sFg3ezJPG-}d^bTPC8WrbP9mrM1h&}a4t}3Df(O)lx`)jQ8oo?Yd zkt3X}3aw{;8J2nt1W!R{3A6i|5l0;CRB>6ID38j6iHPl4Ii)7G23u(|JF)AqlOJxF zXihS|rY8M6;ZLb?d>4GBem!JFp|j7$H6OxEYdqivVWs2I213EKLT9cav~mn!E|tzJ z8G+P2OHJL2fWG{{JPYJvl8#oY)jk1$jhfc>| zbtv#|aOt8Ahx`frKBC0yqZ$l;x(zWW`EXb%Nk4C842DZmO)5@C7t5Undq@fAar9+i)q4@ha;v%n3e2&N1v8s^PgdnV*X1~%AYDteh_LyXX1vR zLsST83=GF5KAeIjW>CMOXC@Px4#nZ6n)o_v81Wln=6)r2!s2%y^!4pzQEb)1f9 zr$b?M-0LGO6-FbXTsZcZ@k$PjRT3D!$iG~wf!Fde&h0Kv>%R`}B_Tkb>+)`TEl+2_ zB877H<#5`>4Kq;++=~b|af1m@-Ld4HN8z(Dpaw;x4@?YJJ~J>JpZIVrNT8K|(h9^! zmm55S8ruot+Y{F7!cMdnhDPrz_0-40FFzckk-)$!HBw^-A}EQTgb{{6VDuC}iS)OM z3Xg0OtDjC)3N>#qdhtyNS-3P+L@Pm(SnCm~kxFJ{M{`D@@xdK# zPJ0OOH6S^c)4mA!3Xna6)7AlY0eS$_(TXy_I>65XXs)_sJ~k4QaGn&$Qs;XX@JEBm zb<0pRwBcOhrbp0v`0J|!->BAU5bT!-H;vGqmloSd6>wNf=&OrBP~*RnFedUvTz3o^ zU1Txd>IQMBDQdQJMb}`a)OGUzpPR77d!um zu06BiJ>L}U^zQ&SY%=h}^d*2T$CruMUX%Fl@S(m0_@@+c+eC{u67)FHBixE$4rFaP zZAX{)3xu1+Lh3bkhBGW}Z!bGS+8VzeV)?%}kzH#VF(Guvw;&6)#dXK8 zmF|R(MMh6k5$a70w5T}W#DJ3__^08knAb6+AqNU4VXvS^aAN-zE$Q^UKs3S>7@kb6 zVblpv6Y>76&i%ou!%%H->RFZ!v2>870!s&2dW@z0EIrK9K9=^fw1=e~EZxh}jVx_t z>3Wu~WoZjbeJtI$oa$|5>3Wu~WoZjbeJpKcX&p;zSX#}}N|r8WX*o+vS?XbFAxjHb zn#WQ%OC2n=ved{@1549cn#NK+OLZ(wWoZgalUS-{sfML$ma16Fv2+CP0s3Sqoly@? zrG;2<>L5!6mY!tk085Xtw4bGiS=z_aUY7Q-w2P&kEZxh}4wmj=>28+pV(Ctn?qKP5 zmTqI|R+esI>1LL0V(CVf_Atp?+5LK!u4QQpOMNWmSgK;Fnxz_+YFV1Z(iE1avQ)=X zJxkMAn$A)KON}hGvedy+H%s$aTENm{7>~iJ11vqsQh}v|EFEI$S)}rq3OKudk8$I> z1qVYA+yqVzBfj}8F2I54O>>d=?32n^i6A~1Zv?=6O`3!EG}+IbYK`uFj9 z*86pO_K_PV02*tK6Q?#DT64|OR6VcJKX3-)a{UAQFq-ZU^l`K>4IJW5r%R<`e!rOi zE_XVK5WaYou>BoJ@dAb5;Qrp=)UA-*KAFBx^v8a_|J0+{Sx4>`)~d}c-Gr16LcVkP z>evPRm%gcGHOKIQWBWZLLGwz@0^#KZoFK@@nqoqkKou{9mpPpz=fC*TEm0198yQ2aWNjMyl_~!nXXAcwgez1pPQH-(d z81Rlr=)ohv3z~XC2^tU$wC4}t>%Eg6(DA0VA}^272C}yNV?qDP;E`vko}hmqcqGu3 z^emC$SPUZ6pny-zIX?fGunXAxQCSgHwx2Z{?1Z_%`J(@-&M*2G7A!$_S2%Y z)oIJu_@~(7ThST!If9ev8d#@^;U^bRH4||xt8H=zgihRW7`0dPlWFO|uTk-)G$7!t zuji#s6raZDkEaeIPNcV7H3Ix`FgYCvE4c+F!6O?w{r`1(LU+D~0?DWM0)J)fQkp_m zUMu`;0>_ghAzV0q*d^k9Q5PR3w1AL2U&|xT@0qsK;i~9ZmOSVZEI0chl}kK z+m?9VMvaiHtWk&-eUs6o9;))x?~y&q$~0Kfv_8yAL@UC!P`(D1q;11zJD;lT>oiTp z0T<`{JecgEwoLGy3R=kShQ*Aw3BmcpB3rz5VWvoBNBAOq@~5#CY5noGe6?>6z7K6H z(%=vl=Ja2ZVJFvs-9nKGGZ$t!S)I?43T^o#ezix^A8ZJpT^yv(X0_fizz&Ek}=})gm1cXCp z>IG#b!9E&i>rUb%!4H9h9HAMj5@eEE)=ODGf*e}9qc8$=BalMefkzJ{&*+`1p zgmnzDT#=ZzuRH%FS<2}fsCtg)oFK)b&v`Xn;t+~JwXztJ2z>rY;Zd-VsvJzo>MVi2 z+w#w%&r7zI^F8?fRL6Oq+;+#bH+|O@Kbh5;_zaaU5!&VtwiOMrI15?xK{LGQi+uW= zSmm1{EJiz^6LJ?6CoMX-U-${Ko~2m?k}x0iz+f60{_N)8p^qnTqBMCUrB}C7YFbaJ zb1l*po0503%j9kBa&-&4#QWG~Y9qVcQisd7AH;9R1&0%!-NLS_XSd>t1Mtu8pyv$( zSVVNk4?xo~c$fGz6+XKKPu=kwkxo=`o!#-9SSf}aO(1O>`a$w^DZ4#}TO6)}oj==; zjFmBh3Zdgd9D_|xL1s-WEHRjziravb5IDaYI0IHMVAe@9osQqfI3EOvm;A9%pJym{4tZ&G*uF;J0v-!E)H z1u!q!to{@EuWHFedWd^1<9-sK8DQHm@qgrNWAfEDEO8WNnko~12FYcl3x*Chz6fk>F*+c4d?1Evkg=WjFeN3#Cp zY4Zv}KRnZjR2{6RJ%32tm)Xx34ar+872?-&#iGS1C8$|82h~v*36Ier=t^0#zh*Z% zJzZJHEl*BEs@~pZh292lfqUCk?fk$n3s2(q^IxmR7*K1*evREI75CrHffw$-l+oI$+0$Fd59v+MkWlIQH=0&hCy*7 zQS2g$%OWWFd~9!Bp}^Pha|Ga@!;V+SS;GGaci|dDrV`SdgtW;AqX!?!x>T$uK|XETkq&mj0Lb3}QAZt-zf9!NKlFJJx3c~vRXs;|dkF6dh9@^GLZ1&1l4CWH z?v{}v%B!e+3zZj-S)NPf!&IIzs{AB`y^hLT??L&+qspn%W2ju!g7P!i{uA}h)GRgP z1LSrrrt&xC^7bOtss3*4zZUf??es7|rwO6I=#P;&hZ1?bUc7yHz0J9DsvHiKo zmd{_W;J2Rf+j@ZU+bmjVd(p;IM_wn5cAa{IT~7w5_F)vY7af*wT2EDjhUx0T7ILnS z_>iJL7uDBE^?hHgkNU?7+^GKP}d<1?D8~?;71vCGti)B7fH)31o+3;J$r+1=x&ss4( ziBX8WJ9&k?f2x&pCU}GoKB0DDWc>g4t9zc~$^f$f=>RQYWGDWV72s9CuK_;=tOfW0 zO92l8hkmPniF?3iz*B%<16BY!0Y?BI19ZU8COX`E06737ARTZeKm&*ceEb~8y$k39 z>;XIlpx?kRfQS2Pg6$l4AK-DoZonIWj{!*txy*pYfF{63zz)ERfR6zw&!ByPM!++G zBY+XW_0Mu#0iYhR4e%o1T>!TObposa58z(FHb5s}0B{XtvI6D;S^;|j^t)y|$K?U& z_vk~=M;pgI1TX+%0Vg*?X23Im7Qie(Ea2F~$OCvbaNJ73gMe*-E`SDn<^V3idzizx z4g#(rT)=$*`dtRR{#NJ=PzT5cr~roo$OHHu1mHRckO1h%^L7CJ%s)jx0y+TS031KV zGvK#?L4Xd&q*nlT0tCR#PjcKcz$U z0l+u-Z00avE1(`=035+d*+&730Xcvqz-K>(4ggO9e1LL5CLjT@_X*e?pc>!+=m5h% z;<(oU+W_?dHy{@9?iR=oxED|WNCJF>ZHZlg^?*D;5@7go^bg=6Kq26Iz~E!(cfb}v z4ImTn&1R140c-`-0Hy;tz~LXDjexa)c>o`(!8|r0@0avrvcSl3RD$Z~>ryaPQ)20@1+Uo&nfaw4uARFLm0NVgHx1wHL69D((emy{g`%3^RfNKDHz|DZID0>R9 z1Mn-rZh!&#dvP`6`YNstT;IU;FklAm3jlKgrGU?nHw^d&a0i|*f=pUKCGJ-M>HtlE z7Jvio=!5JVQT`}k3*e`K?SSV1y8yohbO2rkbOBxi^Z||ljsZw}DGi)<9`4HlO95K& zd$%x+GXH#zIN54T-mP1E5hxnw4pvc zkJqk0fR^mb1Dp%BOKD%x?aITr$pjxOAO~OoKcyW+_eUOZ<^Vi^GQeVhJR0FS+&}#Z z{Z6^WytA%!9mipedK#M9b)L7mq0TQ2;a=3;=zwivBj$WCkPSNlaCX!Se8)Yt)pvS* zy5)6M&CSm1r)FHQtFKz+#a-t0-_PN=<#=eS5|O6YaNJDxynqprTr>U6zJ^sg5dm`1 z&*87t)m7Es>94vIjFwNEc74u8x~PhjeB>&{x686I`i=i zyWWng8$8ZuBcx9(LxLK*!LJiQ&k%wA{!@CE9@*b+rt&x`<9VrklJtzJn$fGIXPPny zKVEvq)D%&U5Q06+hPg(1PLlBNm7ZmJ?vHw=a%Eq0jSbB+YhWDSYD`?PbxR{=5R*X_M0UWoeRU{nv_F=n;^+3U#QJf011Gb<;c z!MIq7kvF|K&)ZykXT7&c^a0|yon7zqHm#^y?gjG;A#A}|XobHbIcUe9-UQHn0VV&< zA8iH>fbX?Y^s3#McW7S0kNT1Na|F*?%th&d8o)LHl@qQ!erRk^o*O{)I+Rgg(@$Ae zAkh+UqAkaBG+!%diH?3s+E$5{@`-*6o=F~h_DD2jBTAZ%D4HHT_eIeV{a7@_i+)O- zh&fn0puQx;74%H9ke%uA>;^0bDBHAM!Xp~8N%|@4BR-o@M!Ke-vaCg-r8(X%YG1J9*^ zM!;?W_1Pe1iX_A2O!|1msA%cTP?ikQz) z>P6is=2IEfpMqzdlqb_r*;q8PE|oeWT>3dsU$w-C_>w*O@VptY3oryw+LTN)mOT-l za_}2VuRSOuTDfof@jM>?wcs(9{xx@pc~BjxcpghWsz+|KvVD|Kzb)WjF7cvgs;dUi zEr2Zmd2AEjSiXd4ccF~hLO-R>ccVF>QMREA+MI8Pj5F9(l;g7{|_yZFhK04>{p(Tfp z137#U$KfL{4j&S6_&9~bfqf2#-pBlrj6*ozbbb5}ub{Rx;+4=?h*Ud1%~(DEBB; zFM~CAnzq)k$)d<0|u{EAb&5@(+ij%BY-vvh3R-Gd(|#E9L!Ox^_y}*KuWX zl!g0Z$G%AxpoXUoFxSFS-9VgI4ap ze%w>p_9%XG-7=r;lHBwx>;8QG*LKb5zLI$nZvypdQ4W$T1^1MfhAS?iALY42PaHS< z+6(ioRPb$-_^!VI-@`h@D2jSC*Nv`6Znu1uZLJ@?sST<3jFw$yDYv;t!X)=pvQ$F`;=S`*$WkidDrLz-o?8|K*PCt_UAJ5;x2X>_R6p?< zz&+&;;VR?NmGazlBmGW&3%+T13n}xp;+}XE;41T=E9H?+HZKtKx8f?(tdGK#>7r%% z=Z#`aKz@V#0+sKP>LwpIBGug$#ZRsqD4{ViUjNAXZbFuR%f1(>YkDTxsm`ry#C~kV zRmP_))hYkzp1>jDD*G`Vd2*fK_Ue`y<64?FnqDrJ>+L}uvab7aPx%6_G9FziPi|8l z-hnF1Z2LB5>M)@try_gDABgzO7%P@J=2xO-%oHQ zUbL=1c>!LX675l3iPwj?l6)Ua&veBjdzRzRZ*%<&bhLi|8dq9-s}_p7H{eSAthma0 zF2!qC%8UNVI=ok+sl=7?YH=kQn{wY`*~S z0R?XF1#q>CME)t#RVQ83aHaZ4hT-$@Kru&0vFM5;4D2dDH{qR&vb-;<{F2+n@)L9M z-U1-g9ai8i0nQo;PcB#1lU9r`(g4bOl=PJU>!@;k`y7(<^%73|KA>hjVTwQV2E22t zg5SJf&cPUd1fehTcB~KQP1%n7Wtb}zc;(0|1YVvZ@A2o*XO);+?gPH`JBK_+CHN`w zwmpwRD2qxwHN4qD4|G! z#rnS((s_N#>@jR7)Hg~zsyLo=xiZEem=6mj>niq{iu`rHS|*&>)6LVX>*^5iO>nW7 zSh5W%5TEetHCfa#IMY}yCyt`267>^m*Xqz<4lxdkAewgcs1G4Bz5a|z zFte)B=Wp^B;lGNNMG%`%=F%6>s;ffVX(*0?B>IdwDpy@YRdpmS6naUNo+1%wEJci5 zH0pck0ohZD`VMPR>?@*@oD;Ly->Am$S8n$>Uh3EJV|gi{D|}O>0w?U77|sPe(nTs) zZF8>t9+mu7cqoxX6?4hT{v*~Uy=$$ltM#o3D}_0u1xAShD=hI<`TWh`6f%D1rnrZw z-*=0Y*D|>MXmr_GDpcC4cKPea#%2Cbfy(_^F=Cj8SY7a< zpx@=jTtJ>SVys5U4j#J3Zm+&Ni>}$e^V@-W2q^;1K=}3~2TzGKUX<;p< z9eKow+}to*9N?%`)+1W%9VEkwDri+4A7il0pr#y$1^XKt8=8FH>hP!xk63h##K2w5 zL=Ouh4ODm7fWr*JgAn>~E3`Eh3eD1FHxWLNIlpzu(mdi0P2r>5#JUNte1 z$7XbSo)qORW|@q?FP40;TpaSeS1`X`)r5E2?&89#H4T2B=o|_ldsDots=8XDDW1{L zqC_A=l-U(1T}f^oUS+R>NaS1G#o#CQ%4b(mT{5?l2x^2ZkR^=8+B-FcYRj*uGY=RSvZSQJin*xZEsd+D zp{e#>Xz#yS!#>uYvS=Ya4Ry84G496{6}2xgh9s3yNkw;XuQ7=WMhhjQeP@nmne9dB zYK)lB!E8Y4+6YCFTIDXMK6xyLMt)hOA&iPKw=gV)!U@CRR+`8H_^O6`O4l^P!G-MO z>x<-wPo@n86k?3SW`q->)@z$<(Xruvg+Yt`dLUI14a$t713@nJV%MtL`r1|gRWy*r z&~ZHEHdqQf;xwzF2{^tQMXfXP3uvHlcLJxXxnO)WHaR?pS{wY$-g(|SZ&kA#xykjS zwafz-5sIS4vm~m#20xwOfpy&_#e5f{T$Jd#%e%&dXta48irc(v6gAZ_{PRl}N%6x; zt`!Z-{mrxM$Ejczm4>T$LBhY?F9+e#ZHOY^_P{FWAj~-Y!>qZVCAy&2P^ccwSb=%( zB@yd@Xw0Z3z)Ph6aoI)&|A-xz*EPu97aB}**Uk)=kug6mdG8iP*7g2zS~!#ZyAp#a zv#xRZ$g_>7#ZpBf;lHJF!E0hd9;cFAMIqs*T;!^5s=71(JetpoEGMc=kt(c`Q3@cU za52&7MVi9%^c)c>%864Q-W(bJG3{B>|!>_eeYyfZGEF3w&AO3 zs2&G>b~FZ2J`zD$?DsZdK9a3m@`YtpO|?~6F(Zgl@Q`rD35nYwjn=uaKX{SVGiz$= z6muza&ulW~x+WsxS}i(sMMVWHvXMtyJ%S9S%NFNtakPnLZ03GfOEG^_?eeh9Mewr- z_GoFI=cTw9I$;QkEH;PEq?XtEST^=RLX8H4@amp6N1&z8lMr83*U~9fWrP4!n)f0& zvy2AXU?4)yK^9d7;<4%p5mPnP{*99VKA#_s_W3I$n($Z&H)ZT;!g8JKo*J*WZX7#V z5H6!8^f4WWHUgAWI_zVt9iY6V$hB1jiDG^A;-z6cT3aNJqbgDa8Yn+fMlO-X5xZDlq3^=6OEjkl zRBk$Ot6JnZ=lr-gOmcZ!8msE7u{g_P!vgaKmO!IKQEVIB-c*a(nSJ~sMRH{EkF!Yj zR_Ta&BnR{j`9^VJ0+oC{$t9mfk5C=8BfNUaMBg>%uWF-w$Bexqr54xb z>qkd&k!UQK`$tH>(ed0E$lOWl`PEf*wbfNVI5#BE@qzRM`C<|g%){cbfrRd;<7rl{evJw zLUXfCC~3_Be+R+-Bhp(a7Zl@oi|eAiMFfe$Tl_f6TSVbqz*~G2S}`c;*tA3gFFciU z8rU{%7|*J$LoA6VDpsE%e0l35inc>JE|r96d*o<~hu02|OmS5))}k$%@UAgth_UEo zHyAxz@DhDwQTv4$L`CqG5fS|PiRD0_YF-l+KhJ8y*D7wetnhI6a8HjNy(+s2ezRh(7{N}% zDEIpOjkHHcJAz|x;K-qc9OKfQ{wa2Hr~PAj?|n7v**xzuKX%ut017Emxm@PrQmo)W z;jLQ53UX;fj^5PHAGehDNOM_fm>(k(U-5F6Vf?a+@HV2k8J{N>Hr#n9>vz!-B`Qdu zVe&>}(MIHqyaEG_pf@oN*m|m>-cM@=+U(D(@?mEpJvXZS!{{DwlK<<}PbR8Dk}owYV433mbf{#%vH)Mlyu<8lZ_bRzHS2Tt>K` zOK5*Y?rUI`kagj(0rpzMNa))z61kQ|GFHW%O%3;qi|WZ`KJ=&Pv4+{~kU+>T*bAefI}A1}5u z!WiWm*NUcwRr7r-tYL=i{Tgf=Ly_d~CLI+v+{0pId8A2o(kQuHj=g_4vQSnRFguh}S;OXT@zHd>F3$<=IS zrSQ0JW-j43#n`WaHsqrt{|>8IgDX8CeYy43^SmqE`7Kz5)K}HvekN@PFtLh#CE}(MO?%`?OGuv?nb2Oi zspzB~mya%2`_9CtA+Ckr-<5y(#7+`$o2 zX$^){e#>$%dymU;iNMMP7LaC>rA&*fXvC=kyq>G$ib~36&a)X<9UsM2`0McpG4A4? zKy5h0(NOPgsr7LyV=BD$%W(#wqET!gw>q|h;ibk^NH~=-71iDdoQGp8RXq=U6)UQ1 zSHtI%J{lX#mp4iaL+-X1st8iRePK4MsA*`p3oCfeMZ9aV-HT8Ynu4{MIah@bhK`z7 zG*ndk8k%q?_9~r|B7YkyW^*pv3uuPqOs5st119|&E0#B`T7^FyvI(**$NP(V1y}m> z0nH({_-Zy5?#tUmTJu(;Z`eLE_ghs-o!8sQol=(0Y*^KZ9m)_A*QqL%o8W0`SdKXx zUt-1F>h;a^H#K2pEN8x@nqM!Te7AZJAE_<=QcxlFWqss<u%bGC(Ed+Mr1=A{`LF6PXj~v(~@hYZ{w#U5E74%$O{DgEh9x)Xt@J5MC8l9JUTz( zl|&ScSW)k`Gv&!;z4)(H1_7P)cY35B{q@)1T=7bt(moW^3j0@N(lztWupueUfD{RvDi#?ljIcm74A`wVHU-k4^8Gj+;)JPMfYUUu(Y6oNZog zUS_T}-*0}zyv6)e^G@>%=7Z)#=6{%zEhbBerOL9w@*~R)R-^SkYpeAs>o2YUX?@-L zf%Q}CuywM{WV^%mi0vucLED?Q4{e5QYxbkrPh|fwyDR&z*_YaHw9m5NXWwXl%>Fa` zhxU6M4>}Gw&Nyy#TAd}%m!0RF>YRl+kLCO!rzhtMSF!6k*GH~%E>4GU=h0TR!DRTt zkd$H0D9G?hNzoTbB(W{tC5W}9i7Z)>)-+D_O8ZI{?@wj1oX*(>bL z_8iAN$L}0(IX-fH{`$Hf%SzGioya zkWrMmAoJ!dYgSKIZ&qK{;jI3wV_5@PC$ogCLA32`)^OHH*5$?zj8~fGm>x4d1FgRf zy$_l0G&h)i=6lVp<{z1V0Xurj{GoZ!{F!;!{Eb;9!p^xH1WZ_#%zTe>W-S^6wTEXOP#S_I1{ zma~?xpuGgE#(If0#d?iZZ@t-Su$rw7>kMmwb*{D4dWW^ry24s#ZL+p7>wUz!+4_Wa zoAnv%PV29&d#o>7JFN$-z1Bn4e(MSAN$bbfA?rEoh&9%xwoS1m*{-zdY&Y7{ZJ9Q! zEytE;n`86X%4~~m%WO5adYjL7uWh~UA=@U~6B13PTLwY_0mnq8gk%f2^zefE~@ zL)k~OPiB9d{SC&#HFmST(7w>V&HfAfF8gon-S)TaXY60v;~Y~QddDq}e8&<;lj9!8 zI>%PWlaA*dFF0PoXgTiqt3&0S=)BUI>73*AIIEo-oKHBPc0TVs?0nBTfc_nHeu+N* zUXBs{`}3UMoFvyw*RTsl>cKbv=+{Yxiw&0>t~T6YxXEBJSPVIad_$q3#BhgUnPH`& z33mLjVH0e5o8cFR-G;q}eTFw-)yE7U8iox)gF0hHMo-2Y8HY2DW}M5InOOk4Sdn>G z=BCWYG7GYbvMRFHWj&Vl<1EgYVAL2dG2USOzHz2;g|XRqzwu$?4~#!EzGCb)9y0bD zPZ&=cKQ{iuILYKRtuj4s`UPx8FvXj%GP})XX0Q1^Sj>OIT4G@xGc3zs15a9hXE|i~ z%yNl!s&%^cR_hXYpFQZOFRYwRZ*$s8Y+m%jFKoZJy=?o3Ek1inc6xSx_T20R*_GL~ z*$-y_B>T_VUuDm*7u(D1RrVDaHvv2JQi;C{8jEoZnUSp@R%h+S=HTD?~qxHv(18Bcs95fCY&l-n~BSy}oGO0}(lh%}E zN-?FHbSAwi&6I93n2aW?$!*Fr6_^U))k;m}rp2a8Q?;qaRA*{5`AjXQwWjs(GN+hR%{sH*oMuip8_Y(t)$BlzqM#@K4!X5Mbzfq7#WJnkNIhk38L)7)k5G54DL%!keW=40@}C(Q!< zz>xVYJi&;Wv#2a;iw52x$&vzpptI=V5z;LN_ynuP0k4o}DS%(_z(4VJ)*D(48x5NcI}N)GU53MkevIk?!%2f+7{a(t$wm;bsms)78Z)h#j!ZW^L1kuj=301y z&6(RXcVzC#?8xlQ?9cRNtwDBZX-_4SFZ7=Vg{>67j!&|1W9ae*)!} Bpql^y literal 0 HcmV?d00001 diff --git a/src/candleplugins/camera/script.js b/src/candleplugins/camera/script.js new file mode 100644 index 00000000..86095d8b --- /dev/null +++ b/src/candleplugins/camera/script.js @@ -0,0 +1,59 @@ +function on_settings_aboutToSave() +{ +} + +function on_settings_loaded() +{ + updateSettings(); + + var l = ui.camMain.availableCameras; + var s = ""; + + for (var i = 0; i < l.length - 1; i++) s += l[i] + "\r\n"; + s += l[l.length - 1]; + + settings.txtCameraName.toolTip = s; + + // s = ""; + // l = ui.camMain.availableResolutions; + // for (var i = 0; i < l.length; i += 2) { + // s += l[i] + "x" + l[i + 1] + (i != (l.length - 2) ? "\r\n" : ""); + // } + + // settings.txtCameraResolution.toolTip = s; +} + +function on_settings_changed() +{ + updateSettings(); +} + +function updateSettings() +{ + ui.camMain.cameraName = settings.txtCameraName.text; + + var l = settings.txtCameraResolution.text.split("x"); + ui.camMain.resolution = [parseInt(l[0]), parseInt(l[1])]; + + ui.camMain.zoom = parseFloat(settings.txtCameraZoom.text); + + l = settings.txtCameraPosition.text.split(","); + ui.camMain.pos = [parseInt(l[0]), parseInt(l[1])]; +} + +function on_pos_changed(pos) +{ + settings.txtCameraPosition.text = pos[0] + ", " + pos[1]; +} + +function on_zoom_changed(zoom) +{ + settings.txtCameraZoom.text = zoom.toFixed(3); +} + +main.settingsLoaded.connect(on_settings_loaded); +main.settingsAboutToSave.connect(on_settings_aboutToSave); +main.settingsChanged.connect(on_settings_changed); + +ui.camMain.posChanged.connect(on_pos_changed); +ui.camMain.zoomChanged.connect(on_zoom_changed); \ No newline at end of file diff --git a/src/candleplugins/camera/settings.ui b/src/candleplugins/camera/settings.ui new file mode 100644 index 00000000..392156c9 --- /dev/null +++ b/src/candleplugins/camera/settings.ui @@ -0,0 +1,89 @@ + + + pluginCameraSettings + + + + 0 + 0 + 554 + 115 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + Name: + + + + + + + Resolution: + + + + + + + + + + + + + Position: + + + + + + + Zoom: + + + + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 11 + 20 + + + + + + + + + diff --git a/src/candleplugins/camera/translation_ru.qm b/src/candleplugins/camera/translation_ru.qm new file mode 100644 index 0000000000000000000000000000000000000000..f548682091de1b76f03ba2cf5037a0c5d6bc03c2 GIT binary patch literal 404 zcmcE7ks@*G{hX<16=n7(EZlq7iGhJZgCV533rOoRB&KmOFfcMPPYS34@^`SzuxSL+ z3|w5BLHx2zprivckj29y#bUr>!(z(fz+%7wQo;tp&WX9HMTzV{CVN^@u5V&y9wSJ# z6pJiSwFOwcEsGtC5s+sK|ZY0JPg2=xS3I4 + + + + frmMain + + Camera + Камера + + + + pluginCameraSettings + + Name: + Наименование: + + + Resolution: + Разрешение: + + + Position: + Позиция: + + + Zoom: + Масштаб: + + + \ No newline at end of file diff --git a/src/plugins/test2/settings.ui b/src/candleplugins/camera/widget.ui similarity index 55% rename from src/plugins/test2/settings.ui rename to src/candleplugins/camera/widget.ui index ef848ffe..20a39545 100644 --- a/src/plugins/test2/settings.ui +++ b/src/candleplugins/camera/widget.ui @@ -1,7 +1,7 @@ - Test1Settings - + pluginCamera + 0 @@ -13,7 +13,7 @@ Form - + 0 @@ -27,17 +27,23 @@ 0 - - - Test param: - - - - - + + + + &Send + + + + + CameraWidget + QWidget +
camerawidget.h
+ 1 +
+
diff --git a/src/candleplugins/candleplugins.pro b/src/candleplugins/candleplugins.pro new file mode 100644 index 00000000..5789e4cb --- /dev/null +++ b/src/candleplugins/candleplugins.pro @@ -0,0 +1,16 @@ +TEMPLATE = subdirs + +TRANSLATIONS = camera/translation_ru.ts \ + test1/translation_ru.ts + +qtPrepareTool(LRELEASE, lrelease) +for(tsfile, TRANSLATIONS) { + qmfile = $$tsfile + qmfile ~= s,.ts$,.qm, + qmdir = $$dirname(qmfile) + !exists($$qmdir) { + mkpath($$qmdir)|error("Aborting.") + } + command = $$LRELEASE -removeidentical $$tsfile -qm $$qmfile + system($$command)|error("Failed to run: $$command") +} \ No newline at end of file diff --git a/src/plugins/test1/config.ini b/src/candleplugins/test1/config.ini similarity index 100% rename from src/plugins/test1/config.ini rename to src/candleplugins/test1/config.ini diff --git a/src/plugins/test1/images/tool.png b/src/candleplugins/test1/images/tool.png similarity index 100% rename from src/plugins/test1/images/tool.png rename to src/candleplugins/test1/images/tool.png diff --git a/src/plugins/test1/script.js b/src/candleplugins/test1/script.js similarity index 100% rename from src/plugins/test1/script.js rename to src/candleplugins/test1/script.js diff --git a/src/plugins/test1/settings.ui b/src/candleplugins/test1/settings.ui similarity index 100% rename from src/plugins/test1/settings.ui rename to src/candleplugins/test1/settings.ui diff --git a/src/plugins/test1/translation_ru.qm b/src/candleplugins/test1/translation_ru.qm similarity index 100% rename from src/plugins/test1/translation_ru.qm rename to src/candleplugins/test1/translation_ru.qm diff --git a/src/plugins/test1/translation_ru.ts b/src/candleplugins/test1/translation_ru.ts similarity index 100% rename from src/plugins/test1/translation_ru.ts rename to src/candleplugins/test1/translation_ru.ts diff --git a/src/plugins/test1/widget.ui b/src/candleplugins/test1/widget.ui similarity index 100% rename from src/plugins/test1/widget.ui rename to src/candleplugins/test1/widget.ui diff --git a/src/designerplugins/cameraplugin/cameraplugin.cpp b/src/designerplugins/cameraplugin/cameraplugin.cpp new file mode 100644 index 00000000..9d89e212 --- /dev/null +++ b/src/designerplugins/cameraplugin/cameraplugin.cpp @@ -0,0 +1,75 @@ +#include "cameraplugin.h" +#include "camerawidget.h" + +CameraPlugin::CameraPlugin(QObject *parent): QObject(parent), m_initialized(false) +{ + +} + +void CameraPlugin::initialize(QDesignerFormEditorInterface *core) +{ + if (m_initialized) return; + + m_initialized = true; +} + +bool CameraPlugin::isInitialized() const +{ + return m_initialized; +} + +QWidget *CameraPlugin::createWidget(QWidget *parent) +{ + return new CameraWidget(parent); +} + +QString CameraPlugin::includeFile() const +{ + return QStringLiteral("camerawidget.h"); +} + +QString CameraPlugin::name() const +{ + return QStringLiteral("CameraWidget"); +} + +QString CameraPlugin::group() const +{ + return QStringLiteral("Custom widgets"); +} + +QIcon CameraPlugin::icon() const +{ + return QIcon(); +} + +QString CameraPlugin::toolTip() const +{ + return QString(); +} + +QString CameraPlugin::whatsThis() const +{ + return QString(); +} + +bool CameraPlugin::isContainer() const +{ + return false; +} + +QString CameraPlugin::domXml() const +{ + return "\n" + " \n" + " \n" + " \n" + " 0\n" + " 0\n" + " 100\n" + " 100\n" + " \n" + " \n" + " \n" + "\n"; +} \ No newline at end of file diff --git a/src/designerplugins/cameraplugin/cameraplugin.h b/src/designerplugins/cameraplugin/cameraplugin.h new file mode 100644 index 00000000..e90e3c48 --- /dev/null +++ b/src/designerplugins/cameraplugin/cameraplugin.h @@ -0,0 +1,26 @@ +#include + +class CameraPlugin: public QObject, QDesignerCustomWidgetInterface +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface") + Q_INTERFACES(QDesignerCustomWidgetInterface) + +public: + explicit CameraPlugin(QObject *parent = 0); + + bool isContainer() const override; + bool isInitialized() const override; + QIcon icon() const override; + QString domXml() const override; + QString group() const override; + QString includeFile() const override; + QString name() const override; + QString toolTip() const override; + QString whatsThis() const override; + QWidget *createWidget(QWidget *parent) override; + void initialize(QDesignerFormEditorInterface *core) override; + +private: + bool m_initialized; +}; \ No newline at end of file diff --git a/src/designerplugins/cameraplugin/cameraplugin.pro b/src/designerplugins/cameraplugin/cameraplugin.pro new file mode 100644 index 00000000..97ef1fa2 --- /dev/null +++ b/src/designerplugins/cameraplugin/cameraplugin.pro @@ -0,0 +1,11 @@ +CONFIG += plugin +TEMPLATE = lib +QT += widgets uiplugin multimedia multimediawidgets + +TARGET = cameraplugin + +HEADERS += camerawidget.h \ + cameraplugin.h + +SOURCES += camerawidget.cpp \ + cameraplugin.cpp \ No newline at end of file diff --git a/src/designerplugins/cameraplugin/camerawidget.cpp b/src/designerplugins/cameraplugin/camerawidget.cpp new file mode 100644 index 00000000..7d5c4a6b --- /dev/null +++ b/src/designerplugins/cameraplugin/camerawidget.cpp @@ -0,0 +1,206 @@ +#include "camerawidget.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +CameraWidget::CameraWidget(QWidget *parent): QWidget(parent), m_camera(0), m_viewFinder(0), + m_resolution(QSize(1280, 720)), m_zoom(1.0), m_mousePos(QPoint(0, 0)) +{ + m_viewFinder = new QCameraViewfinder(this); + + QVBoxLayout *layout = new QVBoxLayout(this); + setLayout(layout); + + m_scrollArea = new QScrollArea(this); + m_scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + m_scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + m_scrollArea->horizontalScrollBar()->setEnabled(false); + m_scrollArea->verticalScrollBar()->setEnabled(false); + m_scrollArea->setWidget(m_viewFinder); + + layout->addWidget(m_scrollArea); + layout->setMargin(0); + + // setCameraName(QString()); +} + +void CameraWidget::setCameraName(QString cameraName) +{ + m_cameraName = cameraName; + + if (m_cameraName.isEmpty()) { + setCamera(QCameraInfo::defaultCamera()); + return; + } + + foreach (const QCameraInfo &i, QCameraInfo::availableCameras()) { + if (i.description() == m_cameraName) { + setCamera(i); + break; + } + } +} + +QString CameraWidget::cameraName() const +{ + return m_cameraName; +} + +QStringList CameraWidget::availableCameras() const +{ + QStringList l; + + foreach (const QCameraInfo &i, QCameraInfo::availableCameras()) l << i.description(); + + return l; +} + +QVariantList CameraWidget::availableResolutions() const +{ + QVariantList l; + foreach (QSize s, m_camera->supportedViewfinderResolutions()) l.append(QVariantList() << s.width() << s.height()); + return l; +} + +void CameraWidget::setCamera(const QCameraInfo &cameraInfo) +{ + if (m_camera) delete m_camera; + + m_camera = new QCamera(cameraInfo); + m_camera->setViewfinder(m_viewFinder); + + m_camera->load(); + m_camera->setCaptureMode(QCamera::CaptureViewfinder); + + QCameraViewfinderSettings fs = m_camera->viewfinderSettings(); + fs.setResolution(m_resolution); + m_camera->setViewfinderSettings(fs); + + m_camera->start(); + + updateSize(); +} + +void CameraWidget::start() +{ + if (m_camera) m_camera->start(); +} + +void CameraWidget::stop() +{ + if (m_camera) m_camera->stop(); +} + +void CameraWidget::resizeEvent(QResizeEvent *e) +{ + QWidget::resizeEvent(e); + + updateSize(); +} + +void CameraWidget::updateSize() +{ + QSize size = contentsRect().size(); + + double aspect = (double)(size.width()) / (size.height()); + double cameraAspect = (double)m_resolution.width() / m_resolution.height(); + + if (aspect >= cameraAspect) { + m_viewFinder->resize(size.width() * m_zoom, size.width() / cameraAspect * m_zoom); + } else { + m_viewFinder->resize(size.height() * cameraAspect * m_zoom, size.height() * m_zoom); + } +} + +void CameraWidget::setResolution(QVariantList resolution) +{ + qDebug() << "setResolution" << resolution; + if (resolution.size() != 2) return; + m_resolution = QSize(resolution.at(0).toInt(), resolution.at(1).toInt()); + setCameraName(m_cameraName); +} + +QVariantList CameraWidget::resolution() const +{ + return QVariantList() << m_resolution.width() << m_resolution.height(); +} + +void CameraWidget::setZoom(double zoom) +{ + qDebug() << "setZoom" << zoom; + if (zoom >= 1) { + m_zoom = zoom; + updateSize(); + } +} + +double CameraWidget::zoom() const +{ + return m_zoom; +} + +void CameraWidget::setPos(QVariantList pos) +{ + qDebug() << "setPos" << pos; + + if (pos.size() != 2) return; + + m_scrollArea->horizontalScrollBar()->setValue(pos.at(0).toInt()); + m_scrollArea->verticalScrollBar()->setValue(pos.at(1).toInt()); + + emit posChanged(pos); +} + +QVariantList CameraWidget::pos() const +{ + return QVariantList() << m_scrollArea->horizontalScrollBar()->value() + << m_scrollArea->verticalScrollBar()->value(); +} + +void CameraWidget::mousePressEvent(QMouseEvent *e) +{ + if (e->buttons() == Qt::LeftButton) { + m_mousePos = e->pos(); + } + + QWidget::mousePressEvent(e); +} + +void CameraWidget::mouseMoveEvent(QMouseEvent *e) +{ + + if (e->buttons() == Qt::LeftButton) { + QPoint d = e->pos() - m_mousePos; + + setPos(QVariantList() << m_scrollArea->horizontalScrollBar()->value() - d.x() + << m_scrollArea->verticalScrollBar()->value() - d.y()); + + m_mousePos = e->pos(); + } + + QWidget::mouseMoveEvent(e); +} + +void CameraWidget::wheelEvent(QWheelEvent *e) +{ + double f = e->delta() > 0 ? 1.25 : 0.8; + + double prevZoom = m_zoom; + m_zoom = qBound(1, m_zoom * f, 8); + + QPointF deltaPos = e->posF() / prevZoom - m_scrollArea->widget()->pos() / prevZoom; + QPointF delta = deltaPos * m_zoom - deltaPos * prevZoom; + + updateSize(); + + m_scrollArea->horizontalScrollBar()->setValue(m_scrollArea->horizontalScrollBar()->value() + delta.x()); + m_scrollArea->verticalScrollBar()->setValue(m_scrollArea->verticalScrollBar()->value() + delta.y()); + + emit zoomChanged(m_zoom); +} diff --git a/src/designerplugins/cameraplugin/camerawidget.h b/src/designerplugins/cameraplugin/camerawidget.h new file mode 100644 index 00000000..2301de9a --- /dev/null +++ b/src/designerplugins/cameraplugin/camerawidget.h @@ -0,0 +1,68 @@ +#ifndef CAMERAWIDGET_H +#define CAMERAWIDGET_H + +#include +#include + +class QCamera; +class QCameraViewfinder; + +class CameraWidget: public QWidget +{ + Q_OBJECT + Q_PROPERTY(QStringList availableCameras READ availableCameras); + Q_PROPERTY(QVariantList availableResolutions READ availableResolutions); + Q_PROPERTY(QString cameraName READ cameraName WRITE setCameraName); + Q_PROPERTY(QVariantList resolution READ resolution WRITE setResolution); + Q_PROPERTY(double zoom READ zoom WRITE setZoom); + Q_PROPERTY(QVariantList pos READ pos WRITE setPos); + +public: + CameraWidget(QWidget *parent = 0); + + QStringList availableCameras() const; + QVariantList availableResolutions() const; + + void setCameraName(QString cameraName); + QString cameraName() const; + + void setResolution(QVariantList resolution); + QVariantList resolution() const; + + void setZoom(double zoom); + double zoom() const; + + void setPos(QVariantList pos); + QVariantList pos() const; + +signals: + + void posChanged(QVariantList pos); + void zoomChanged(double zoom); + +public slots: + + void start(); + void stop(); + +private: + QCamera *m_camera; + QCameraViewfinder *m_viewFinder; + QScrollArea *m_scrollArea; + + QString m_cameraName; + QSize m_resolution; + double m_zoom; + + QPoint m_mousePos; + + void setCamera(const QCameraInfo &cameraInfo); + void resizeEvent(QResizeEvent *e); + void updateSize(); + + void mousePressEvent(QMouseEvent *e) override; + void mouseMoveEvent(QMouseEvent *e) override; + void wheelEvent(QWheelEvent *e) override; +}; + +#endif \ No newline at end of file diff --git a/src/designerplugins/designerplugins.pro b/src/designerplugins/designerplugins.pro new file mode 100644 index 00000000..c3fd54e8 --- /dev/null +++ b/src/designerplugins/designerplugins.pro @@ -0,0 +1,8 @@ +TEMPLATE = subdirs + +SUBDIRS = cameraplugin + +install_cameraplugin.path = ../candleplugins/camera/plugins +install_cameraplugin.files = cameraplugin/release/cameraplugin.dll + +INSTALLS += install_cameraplugin \ No newline at end of file diff --git a/src/plugins/test2/config.ini b/src/plugins/test2/config.ini deleted file mode 100644 index 6e182a28..00000000 --- a/src/plugins/test2/config.ini +++ /dev/null @@ -1,4 +0,0 @@ -[General] -title="Test plugin 2" -name="TestPlugin2" -type="window" \ No newline at end of file diff --git a/src/plugins/test2/images/tool.png b/src/plugins/test2/images/tool.png deleted file mode 100644 index 506158a3e91c905a7ee03b3862f284463fe6a8b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 543 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=EX7WqAsj$Z!;#Vf4nJ za0`PlBg3pY5)2HC2R&UJLn`LHogM4NY$(!d-~C!(>Foxm=WW>=jcyt1CVCS-+u>EFPtoVtp#iN9>k z=10pnZ0=!fKXZSXz`D@g`$}sW!sfc_^c5ez5fhaZQJI64AMgMqUI-G{0W>oUZrv=^xvYPx8<@-w z7<{{AP?mdTqsJj`Ui~Rw?{igfKg&~oe8`)3>&)2yhCxpjCfo~7xmU~GsC;JKex|r) zrT8b&iM)SUisyBzr+;K)h+(|%xG+Tf$fEz8Fm39TfWe zimCd_`K?W+zkFG~t(c$1n*C)qXHKmBHLi{6I={{W#pJU=Vq9+mfnw8MEN9tPw`yWm z>!la`f1;TmjGGAOXv1FdraVjGYlEDlJ< zaD(hoC`c?y%mo|73$`~nwWK67FTEISzY - - - - frmMain - - Test plugin 2 - Тестовый плагин 2 - - - - Test2 - - Command: - Команда: - - - Response: - Ответ: - - Test2Settings - - Test param: - Тестовый параметр: - - - \ No newline at end of file diff --git a/src/plugins/test2/widget.ui b/src/plugins/test2/widget.ui deleted file mode 100644 index 1af54765..00000000 --- a/src/plugins/test2/widget.ui +++ /dev/null @@ -1,108 +0,0 @@ - - - Test1 - - - - 0 - 0 - 400 - 300 - - - - Form - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - Command: - - - - - - - - - - - - ... - - - - images/tool.pngimages/tool.png - - - true - - - - - - - - - Response: - - - - - - - true - - - - - - - &Send - - - - - - StyledToolButton - QToolButton -
styledtoolbutton.h
-
-
- - - - actPluginTest2Send - triggered() - cmdTest - click() - - - -1 - -1 - - - 383 - 27 - - - - -
From 2254b540a858efb0706e24c8fee65dabd9c46f3a Mon Sep 17 00:00:00 2001 From: Denvi Date: Mon, 18 Nov 2019 22:09:54 +0500 Subject: [PATCH 31/80] Removed text mime data from panel drag object. --- src/candle/frmmain.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index a5a078e2..6a20fb9f 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -3035,7 +3035,6 @@ bool frmMain::eventFilter(QObject *obj, QEvent *event) WidgetMimeData *mimeData = new WidgetMimeData(); mimeData->setWidget(static_cast(obj)); - mimeData->setText(obj->objectName()); QPixmap *pix = new QPixmap(static_cast(obj)->size()); static_cast(obj)->render(pix); From ec5e4347c85f7b70c916748c1bfd24f959c5a1a8 Mon Sep 17 00:00:00 2001 From: Denvi Date: Thu, 21 Nov 2019 20:39:07 +0500 Subject: [PATCH 32/80] Cleanup --- src/candle/Candle_resource.rc | 8 +-- src/candle/candle.pro | 2 +- src/candle/frmmain.h | 2 +- src/candle/frmsettings.ui | 7 +- src/candle/main.cpp | 68 ------------------ .../camera/plugins/cameraplugin.dll | Bin 44544 -> 0 bytes src/candleplugins/camera/script.js | 10 +-- .../cameraplugin/camerawidget.cpp | 20 +++++- .../cameraplugin/camerawidget.h | 3 + src/designerplugins/designerplugins.pro | 2 +- 10 files changed, 32 insertions(+), 90 deletions(-) delete mode 100644 src/candleplugins/camera/plugins/cameraplugin.dll diff --git a/src/candle/Candle_resource.rc b/src/candle/Candle_resource.rc index 73092052..133cf981 100644 --- a/src/candle/Candle_resource.rc +++ b/src/candle/Candle_resource.rc @@ -7,8 +7,8 @@ IDI_ICON1 ICON DISCARDABLE "D:\\prj\\qtcode\\prj\\candle\\src\\candle\\images\\candle.ico" VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,2,7b,0 - PRODUCTVERSION 1,2,7b,0 + FILEVERSION 1,2,8b,0 + PRODUCTVERSION 1,2,8b,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -25,11 +25,11 @@ VS_VERSION_INFO VERSIONINFO BEGIN VALUE "CompanyName", "\0" VALUE "FileDescription", "\0" - VALUE "FileVersion", "1.2.7b.0\0" + VALUE "FileVersion", "1.2.8b.0\0" VALUE "LegalCopyright", "\0" VALUE "OriginalFilename", "Candle.exe\0" VALUE "ProductName", "Candle\0" - VALUE "ProductVersion", "1.2.7b.0\0" + VALUE "ProductVersion", "1.2.8b.0\0" END END BLOCK "VarFileInfo" diff --git a/src/candle/candle.pro b/src/candle/candle.pro index 193ad1de..01870666 100644 --- a/src/candle/candle.pro +++ b/src/candle/candle.pro @@ -29,7 +29,7 @@ contains(QT_CONFIG, opengles.) { TARGET = Candle TEMPLATE = app -VERSION = 1.2.7b +VERSION = 1.2.8b RC_ICONS += images/candle.ico DEFINES += sNan=\"65536\" diff --git a/src/candle/frmmain.h b/src/candle/frmmain.h index 332e12e9..bf4c010f 100644 --- a/src/candle/frmmain.h +++ b/src/candle/frmmain.h @@ -75,7 +75,7 @@ class CancelException : public std::exception { #define _GLIBCXX_USE_NOEXCEPT _NOEXCEPT #endif - const char* what() const override + const char* what() const throw() { return "Operation was cancelled by user"; } diff --git a/src/candle/frmsettings.ui b/src/candle/frmsettings.ui index cc5c3a3a..66f90af9 100644 --- a/src/candle/frmsettings.ui +++ b/src/candle/frmsettings.ui @@ -42,7 +42,7 @@ QSplitter::handle:horizontal { background-image: url(":/images/handle_vertical.png"); } - + true @@ -71,9 +71,6 @@ QSplitter::handle:horizontal { 0 - - QFrame::NoFrame - Qt::ScrollBarAlwaysOn @@ -88,7 +85,7 @@ QSplitter::handle:horizontal { 0 0 - 621 + 619 2776 diff --git a/src/candle/main.cpp b/src/candle/main.cpp index aeed2e05..5dbf8867 100644 --- a/src/candle/main.cpp +++ b/src/candle/main.cpp @@ -29,9 +29,6 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); -// QFontDatabase::addApplicationFont(":/fonts/segoeui.ttf"); -// QFontDatabase::addApplicationFont(":/fonts/tahoma.ttf"); - #ifdef GLES QFontDatabase::addApplicationFont(":/fonts/Ubuntu-R.ttf"); #endif @@ -41,8 +38,6 @@ int main(int argc, char *argv[]) glf.setSamples(8); QGLFormat::setDefaultFormat(glf); -// QLocale::setDefault(QLocale("es")); - QString loc = QLocale().name().left(2); QString translationsFolder = qApp->applicationDirPath() + "/translations/"; QString translationFileName = translationsFolder + qApp->applicationDisplayName() + "_" + loc + ".qm"; @@ -93,68 +88,5 @@ int main(int argc, char *argv[]) frmMain w; w.show(); -// qDebug() << GcodePreprocessorUtils::overrideSpeed("G0 X0 Y10 Z200 F123", 50); -// qDebug() << GcodePreprocessorUtils::removeComment("G1 X10 ((test comment 1))"); -// qDebug() << GcodePreprocessorUtils::removeComment("G1 X10 ;;test comment 2"); -// qDebug() << GcodePreprocessorUtils::parseComment("G1 X10 ((test comment 1))"); -// qDebug() << GcodePreprocessorUtils::parseComment("G1 X10 ;;test comment 2"); -// qDebug() << GcodePreprocessorUtils::truncateDecimals(1, "G0 X123.4456 Y3.12345 Z0.5"); -// qDebug() << GcodePreprocessorUtils::removeAllWhitespace(" test spaces "); -// qDebug() << GcodePreprocessorUtils::parseCodes(QString("G0 X123.4456 Y3.12345 Z0.5").split(' '), 'X'); -// qDebug() << GcodePreprocessorUtils::parseGCodes("G0 G02 G12 G3 G021 M03"); -// qDebug() << GcodePreprocessorUtils::parseMCodes("G0 G02 G12 G3 G021 M03"); -// qDebug() << GcodePreprocessorUtils::splitCommand("G0 X123.4456 Y3.12345 Z0.5"); -// qDebug() << GcodePreprocessorUtils::updatePointWithCommand("G0 X10 Y20 Z30", QVector3D(10, 10, 10), false); -// qDebug() << GcodePreprocessorUtils::updateCenterWithCommand(GcodePreprocessorUtils::splitCommand("G0 X10 Y20 I0 J20 K6"), QVector3D(10, 10, 10), QVector3D(20, 20, 20), false, true); -// qDebug() << GcodePreprocessorUtils::generateG1FromPoints(QVector3D(10, 10, 10), QVector3D(20, 20, 20), true, 3); -// qDebug() << GcodePreprocessorUtils::getAngle(QVector3D(0, 0, 0), QVector3D(-10, 0, 10)); -// qDebug() << GcodePreprocessorUtils::calculateSweep(M_PI / 2, 0, false); -// qDebug() << GcodePreprocessorUtils::generatePointsAlongArcBDring(QVector3D(10, 0, 0), QVector3D(0, 10, 0), QVector3D(0, 0, 0), false, 10, 0.1, 5); - -// GcodeParser gp; - -// gp.addCommand("G1 X0 Y10"); -// gp.addCommand("G1 X10 Y0"); -// gp.addCommand("G1 X10 Y10 Z0"); -// gp.addCommand("G2 X20 Y0 R10"); - -// qDebug() << "PointSegment list"; - -// for (int i = 0; i < 10000; i++) { -// GcodeParser gp1; - -// gp1.addCommand("G1 X0 Y10"); -// gp1.addCommand("G1 X10 Y0"); -// gp1.addCommand("G1 X10 Y10 Z0"); -// gp1.addCommand("G2 X20 Y0 R10"); -// } - -// foreach (PointSegment *ps, gp.getPointSegmentList()) { -// qDebug() << *ps->point() << ps->isArc() << ps->isClockwise(); -// } - -// GcodeViewParse gvp; -// QList commands; - -// commands.append("G1 X0 Y10"); -// commands.append("G1 X10 Y0"); -// commands.append("G1 X10 Y10 Z0"); -// commands.append("G2 X20 Y0 Z0 R10"); - -// qDebug() << "LineSegment list"; - -// for (int i = 0; i < 10000; i++) -// { -// GcodeViewParse gvp1; -// foreach (LineSegment* ls, gvp1.toObjRedux(commands, 5)) { -// } -// } - -// foreach (LineSegment* ls, gvp.toObjRedux(commands, 5)) { -// qDebug() << ls->getStart() << ls->getEnd() << ls->getLineNumber() << ls->isArc(); -// } - -// return 0; - return a.exec(); } diff --git a/src/candleplugins/camera/plugins/cameraplugin.dll b/src/candleplugins/camera/plugins/cameraplugin.dll deleted file mode 100644 index 66bba3e103c7ce205d9821b3850e99caf672cc18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 44544 zcmeIb4_s7L`agbw0mmF=Dkv(dsm7L)+yUk=-Cb*~+}8HvXTR>QyG!M#Fj>K3TQV~&HEP{H*JKOJH7d6GzMpgNow+lB*5~#8 z{l4GV_q*fkIrrXkp65BwdCqg5^PF?f#iBblb8#HUsQ|$s$93RJKQ~Lyp9mvgsDy1d&P7mGtz zZU7miH2h*YcMKyUIwD|K@v{4Qj$4CV)qNbdor=f%^#T8)@e0HFo9m+brjq0Or~}9O zP4{_Qd?@?jZAeHiYO5qS?$}R<)=zJ$uJToJ+)Z#M5nrTk6+bQrAwH)@#P4d5Ao;^*eL8H&e$ z-Tp7sKncHCuX%5#s_b~4K54XY6B)rmm`-eQIq_r-g0Cq6%Vu>aln2Z&S3@%|J01UHox>a`VZ zcdM4R#qj$U?e9M&+#F)|ZZ(+g6RwcZ;<^=xz0$9^jQ8m^fqnX7{*CTDy_!@JOx{(= zY54<77rv_EWJKx8&raEJ(3cRLx~YoO?(gjlJ#QAD1A{4L?Rk2Qhd&cc?p)4k-L@n;IM8-eaeP&zKIL?H^g2K98d+iRrb&Qrz(~%dR42P_iKDj5b^^v`mu+^ zEYcpxABlk#U&>GL1m9{)K%0@nq1~t7fGqU9F@J;}U*Xpc@=MhAuYEVR?_g6bf6qwZ zQx#NpF=?z1Rh0?%f;AZ1zxIDX1|l?4RYhmzhC-42-OHKG%`}@AB^Z8p?l_4o6gZS+-Vb~-~@VBK)Di$eti27Uq z9rU+Eqfp-GzB^W`gESVWJX!Ar zlQ+Q|w9nPIE!OM06Sk~?0nAeSaA{kb(zY};nA{Kj9u>N0rBT4qJuAHr)93M}hLySl zd3t?J+fr-WQit%e5i$*viLBM9p+Falj=#2y|4T6WB)nVqguPy*x2m_YOUg!EPRC{i zS87Ej_oWJJqdCNZ!s5MvDnI3 z7(ojml8D7$z~bP_7_t7j@G9GY!q3&Mj0q-h7jH{~$vf!Ixs%eK;5#Tr-mcIS#wbzl zri?Njlv*;6|1uqdKi>uIoP%qQ@l7lf>av(EV)`Hi zR$jPFQC>K@+@mZ{k0^&dOe_ogpE895(kP5Ujn0SfNuoh7jwUvpC5fJOFEs(aR&D^i zC(T{-3!GA)DgcrAM9(Rw(m)k{R-dv)Jr_hh55qgl_-L;{D=nw`kUVA@1y9$KjpbYLV~rxtBZrM7Me`mVqr(68h?WTtzVnHJuO<}%aZ z%Tfb>3C@E(>)Pg~pp#J!*64oR6!Tr(!~+v+N?Wx)Etp&`7PH9?W`n2pxoO3irKmm~ zVshwqyM$A!*UW>xiBA}Sbn}Mr&o6>On$=JvM%`A*EYv5-dZ%eCDKe&D_R$Eukiyb4 zlnO)RRAnrfD20)rhM%DZW?7=fnFiq=lLGe_#_(tSDG*-GbWuo^tJ~&Ud5@~C%)w^3 zv*1BOs6#@)KL$>A1_q6oRN%G(_ZM*dnfuho19~ zFq<8H4Uq}rKZ3#cxcA&DSn2UwQ}{O!5*UtsdHhyg|Cyt&oj7^);E4~9 zzS@8A=&L7QgJj2gPrQEO^wHOjFV-7Qe1Oy{+;a}$!dxBiq>+yifAwOqmbWlPry$}= zIR=hG%=fA5bsiu%%S8lo4k6#5#I_1=O_#7kt^;+WDG)DJFT8yN$4T>CWXK464=C+j z6Xnr$qQz&OgGWz6XB!_WNaAmy;Amr^{_+FvB#ID>E7M?r>C6D%re_vLsSrlJjjp%y z6EI4qdDQ&XyFs_%(0!HsEyHwo&X-uT6Ws;9TE(ags0He{H~7+x+V;GS+Ihv`=HR>9 z)Tr7KbZgp6^=^y>{k-7Yfi4ZBdy8l^(+bqH>}S^Q5@lmD-Gtg@Stz7qPmh%9FW*?4 zG`av`wxNSs&^9F|mpB`#GvK+?xZqpNzv{xng#2p?^H6O5=Vxm8+u$kMeF1IzT3(CL z;W8;6iHaZK*+DQSrzY470N6c%(++ z_O*ZPc;w%eCUK#7t`0RQLJ}6wsfCMC#sBhnjx|R3Rl2APIiA~&=dofH(uWvd^?j@M zoIyAWAHz>*OW@UT@A|-(LEpp|$S8&q_o-n7qk={i2k$kHB1Ded8Ch?8;YKZ=0E;iC zhtkd3dF`-f;7B?Wt~eVEp8hSLKgg?#L*~GOu6L$|Cpr=yKT-an|C8jOIIjGckCq=Z zBu2dN(!f_iUq;}yAQY)h{849Xr~igBK7*fy5&e*spQVP99@5Se{sX+rLP}Y>zxO-R z|8pdYUeupRZc2)VTiY3)TOp!9E-MGk*H#v?q5 zXgXql=mPlv5si=d?rCM`=pq;F26;h)h}TWcPbnq`!FJIMi0KM3=&-1W*iGAoh>h<- zWaP#wmbTJ(u9)wI#%PtIYl}gcHc!}rAenbkyeGzK2y?+b2~<`N0WFBh&mt^*Gw@Zc ze+f^Mrc(_+yON42>J^v8w@8ui+Y$*}TN1AhBT4Jzw~JAK9^VTIQs)WX!>IfXVfPgn zid2&tEulqX5R*FVI!i>?-NcYWUB?fFdagi7{X{vTz#I&UC@|2K9$KhGjOWg<%8SSK zmT-n#U^vES!~|ei8B+uK?iUI%`0%XZi{SpT?qEB;qkKNXj`^4}i_{VV#TN8pBABe9 zsj5hgfO!leMnGFxEZV5Wnm`)A17UeDJU=p_Z-$UJ%0j;bp(Qtd`Wk-zARikn(6Bn< zQHLm$IwSAxO68vq1uVn|672$xUGK{etP`WTJ#Gm-mc1;1^&lr8H zu<@ME#}U_0WtkU>>bg{v`8I~ZmZr2YXYZmW(DCMO{e+c(gR z`;mUumEvw+>wEt4AVjA&s1sW=;Ojt|D(d_T$bTJlp4fT?J{EseAMb7%Qs5G(lax5<(T>*9^;keH2SNn?a zsKc=R>laLhP~@Oo!&2m+lYF$&Bc;J3HAO}aunagMfperJ3f`<6-R3t6}>HXN-XP>#0|8g&(KHr%MI*((-^+z-7Ciu{?q}Q z7SJWCbNgcxTldlMs>3KHIsO?T$8%Klr%12yxQzZS6<9X53*SF8+#VV0;CWcakfgo8p02(9dhz#&Cnl zi;+uj*2D!vSW$zZJ%v5puxmX;Yw06?b9H|#BN3bU$$5Y+X zn+Iw!a|V@?GpL4=nKP&fIRmZl4)96mW5ULFDfxmt(d=Txy3Clf()rsp`~vjA5Af=) zeeI8F7dB}#Ka1u%kFYvL)H(J~!#?|EI@Hs)hqZ!+{KXjTkk2hDWhaX_N{+i{XL>5o4%E9o6_gYRn7Q2%lI9 z-o`KX(@`VeVvrj6mDDU3~ITi>lmqm{_ z$@}vrLVzT7Qf&~Pgp;1)gGb;9E1?{;-ACio%K8GHN!b^-Mi{=0z4N$L!`}{Le3%*I z56BqB_wABBew2Lv{y;F&C5s;DYK3u);SY0_{!ka;4>94&&Jc!}M~0Xh z-rz7I#`1tCR;bDi4(1|j_OM+JtYGpYH#t)2^;26+OgT0=UO5R>C^k8g*d_S7qm|4rS3cYEwX~r@eXpXE~FcAhYLqOm|X_nmQ_XmD1}r- zQs%`8<+Pl}D{NZwBnflygn?ZERcW!}7T*0EQx)E&lMIro+~-l1R-vl!`XfcicrU_C zWY0+EjGaDmi)nOA9>1GBp~8qnUC|a8^mXMOiulABH69COg@HpkpIe9xu*415L25K7 z1$zVRR6vW0PlKYS-RGEAj~Byik1zC&d|G$d;v8(R5bc(RF*`}q6MSnLPM#rZKBR*OU$0}PKypqq*3*U zaD#)WJt%ar(Vd)5f#WcC-R98|3LS%NrxLyW6$Z&ur`7AiALdLw?V|G(|3gn2$TAf1eXSZ z6)b7-jOt8^SNv*k8R$GN7=$> zbFm+xioqe8?t~sFg3ezJPG-}d^bTPC8WrbP9mrM1h&}a4t}3Df(O)lx`)jQ8oo?Yd zkt3X}3aw{;8J2nt1W!R{3A6i|5l0;CRB>6ID38j6iHPl4Ii)7G23u(|JF)AqlOJxF zXihS|rY8M6;ZLb?d>4GBem!JFp|j7$H6OxEYdqivVWs2I213EKLT9cav~mn!E|tzJ z8G+P2OHJL2fWG{{JPYJvl8#oY)jk1$jhfc>| zbtv#|aOt8Ahx`frKBC0yqZ$l;x(zWW`EXb%Nk4C842DZmO)5@C7t5Undq@fAar9+i)q4@ha;v%n3e2&N1v8s^PgdnV*X1~%AYDteh_LyXX1vR zLsST83=GF5KAeIjW>CMOXC@Px4#nZ6n)o_v81Wl
n=6)r2!s2%y^!4pzQEb)1f9 zr$b?M-0LGO6-FbXTsZcZ@k$PjRT3D!$iG~wf!Fde&h0Kv>%R`}B_Tkb>+)`TEl+2_ zB877H<#5`>4Kq;++=~b|af1m@-Ld4HN8z(Dpaw;x4@?YJJ~J>JpZIVrNT8K|(h9^! zmm55S8ruot+Y{F7!cMdnhDPrz_0-40FFzckk-)$!HBw^-A}EQTgb{{6VDuC}iS)OM z3Xg0OtDjC)3N>#qdhtyNS-3P+L@Pm(SnCm~kxFJ{M{`D@@xdK# zPJ0OOH6S^c)4mA!3Xna6)7AlY0eS$_(TXy_I>65XXs)_sJ~k4QaGn&$Qs;XX@JEBm zb<0pRwBcOhrbp0v`0J|!->BAU5bT!-H;vGqmloSd6>wNf=&OrBP~*RnFedUvTz3o^ zU1Txd>IQMBDQdQJMb}`a)OGUzpPR77d!um zu06BiJ>L}U^zQ&SY%=h}^d*2T$CruMUX%Fl@S(m0_@@+c+eC{u67)FHBixE$4rFaP zZAX{)3xu1+Lh3bkhBGW}Z!bGS+8VzeV)?%}kzH#VF(Guvw;&6)#dXK8 zmF|R(MMh6k5$a70w5T}W#DJ3__^08knAb6+AqNU4VXvS^aAN-zE$Q^UKs3S>7@kb6 zVblpv6Y>76&i%ou!%%H->RFZ!v2>870!s&2dW@z0EIrK9K9=^fw1=e~EZxh}jVx_t z>3Wu~WoZjbeJtI$oa$|5>3Wu~WoZjbeJpKcX&p;zSX#}}N|r8WX*o+vS?XbFAxjHb zn#WQ%OC2n=ved{@1549cn#NK+OLZ(wWoZgalUS-{sfML$ma16Fv2+CP0s3Sqoly@? zrG;2<>L5!6mY!tk085Xtw4bGiS=z_aUY7Q-w2P&kEZxh}4wmj=>28+pV(Ctn?qKP5 zmTqI|R+esI>1LL0V(CVf_Atp?+5LK!u4QQpOMNWmSgK;Fnxz_+YFV1Z(iE1avQ)=X zJxkMAn$A)KON}hGvedy+H%s$aTENm{7>~iJ11vqsQh}v|EFEI$S)}rq3OKudk8$I> z1qVYA+yqVzBfj}8F2I54O>>d=?32n^i6A~1Zv?=6O`3!EG}+IbYK`uFj9 z*86pO_K_PV02*tK6Q?#DT64|OR6VcJKX3-)a{UAQFq-ZU^l`K>4IJW5r%R<`e!rOi zE_XVK5WaYou>BoJ@dAb5;Qrp=)UA-*KAFBx^v8a_|J0+{Sx4>`)~d}c-Gr16LcVkP z>evPRm%gcGHOKIQWBWZLLGwz@0^#KZoFK@@nqoqkKou{9mpPpz=fC*TEm0198yQ2aWNjMyl_~!nXXAcwgez1pPQH-(d z81Rlr=)ohv3z~XC2^tU$wC4}t>%Eg6(DA0VA}^272C}yNV?qDP;E`vko}hmqcqGu3 z^emC$SPUZ6pny-zIX?fGunXAxQCSgHwx2Z{?1Z_%`J(@-&M*2G7A!$_S2%Y z)oIJu_@~(7ThST!If9ev8d#@^;U^bRH4||xt8H=zgihRW7`0dPlWFO|uTk-)G$7!t zuji#s6raZDkEaeIPNcV7H3Ix`FgYCvE4c+F!6O?w{r`1(LU+D~0?DWM0)J)fQkp_m zUMu`;0>_ghAzV0q*d^k9Q5PR3w1AL2U&|xT@0qsK;i~9ZmOSVZEI0chl}kK z+m?9VMvaiHtWk&-eUs6o9;))x?~y&q$~0Kfv_8yAL@UC!P`(D1q;11zJD;lT>oiTp z0T<`{JecgEwoLGy3R=kShQ*Aw3BmcpB3rz5VWvoBNBAOq@~5#CY5noGe6?>6z7K6H z(%=vl=Ja2ZVJFvs-9nKGGZ$t!S)I?43T^o#ezix^A8ZJpT^yv(X0_fizz&Ek}=})gm1cXCp z>IG#b!9E&i>rUb%!4H9h9HAMj5@eEE)=ODGf*e}9qc8$=BalMefkzJ{&*+`1p zgmnzDT#=ZzuRH%FS<2}fsCtg)oFK)b&v`Xn;t+~JwXztJ2z>rY;Zd-VsvJzo>MVi2 z+w#w%&r7zI^F8?fRL6Oq+;+#bH+|O@Kbh5;_zaaU5!&VtwiOMrI15?xK{LGQi+uW= zSmm1{EJiz^6LJ?6CoMX-U-${Ko~2m?k}x0iz+f60{_N)8p^qnTqBMCUrB}C7YFbaJ zb1l*po0503%j9kBa&-&4#QWG~Y9qVcQisd7AH;9R1&0%!-NLS_XSd>t1Mtu8pyv$( zSVVNk4?xo~c$fGz6+XKKPu=kwkxo=`o!#-9SSf}aO(1O>`a$w^DZ4#}TO6)}oj==; zjFmBh3Zdgd9D_|xL1s-WEHRjziravb5IDaYI0IHMVAe@9osQqfI3EOvm;A9%pJym{4tZ&G*uF;J0v-!E)H z1u!q!to{@EuWHFedWd^1<9-sK8DQHm@qgrNWAfEDEO8WNnko~12FYcl3x*Chz6fk>F*+c4d?1Evkg=WjFeN3#Cp zY4Zv}KRnZjR2{6RJ%32tm)Xx34ar+872?-&#iGS1C8$|82h~v*36Ier=t^0#zh*Z% zJzZJHEl*BEs@~pZh292lfqUCk?fk$n3s2(q^IxmR7*K1*evREI75CrHffw$-l+oI$+0$Fd59v+MkWlIQH=0&hCy*7 zQS2g$%OWWFd~9!Bp}^Pha|Ga@!;V+SS;GGaci|dDrV`SdgtW;AqX!?!x>T$uK|XETkq&mj0Lb3}QAZt-zf9!NKlFJJx3c~vRXs;|dkF6dh9@^GLZ1&1l4CWH z?v{}v%B!e+3zZj-S)NPf!&IIzs{AB`y^hLT??L&+qspn%W2ju!g7P!i{uA}h)GRgP z1LSrrrt&xC^7bOtss3*4zZUf??es7|rwO6I=#P;&hZ1?bUc7yHz0J9DsvHiKo zmd{_W;J2Rf+j@ZU+bmjVd(p;IM_wn5cAa{IT~7w5_F)vY7af*wT2EDjhUx0T7ILnS z_>iJL7uDBE^?hHgkNU?7+^GKP}d<1?D8~?;71vCGti)B7fH)31o+3;J$r+1=x&ss4( ziBX8WJ9&k?f2x&pCU}GoKB0DDWc>g4t9zc~$^f$f=>RQYWGDWV72s9CuK_;=tOfW0 zO92l8hkmPniF?3iz*B%<16BY!0Y?BI19ZU8COX`E06737ARTZeKm&*ceEb~8y$k39 z>;XIlpx?kRfQS2Pg6$l4AK-DoZonIWj{!*txy*pYfF{63zz)ERfR6zw&!ByPM!++G zBY+XW_0Mu#0iYhR4e%o1T>!TObposa58z(FHb5s}0B{XtvI6D;S^;|j^t)y|$K?U& z_vk~=M;pgI1TX+%0Vg*?X23Im7Qie(Ea2F~$OCvbaNJ73gMe*-E`SDn<^V3idzizx z4g#(rT)=$*`dtRR{#NJ=PzT5cr~roo$OHHu1mHRckO1h%^L7CJ%s)jx0y+TS031KV zGvK#?L4Xd&q*nlT0tCR#PjcKcz$U z0l+u-Z00avE1(`=035+d*+&730Xcvqz-K>(4ggO9e1LL5CLjT@_X*e?pc>!+=m5h% z;<(oU+W_?dHy{@9?iR=oxED|WNCJF>ZHZlg^?*D;5@7go^bg=6Kq26Iz~E!(cfb}v z4ImTn&1R140c-`-0Hy;tz~LXDjexa)c>o`(!8|r0@0avrvcSl3RD$Z~>ryaPQ)20@1+Uo&nfaw4uARFLm0NVgHx1wHL69D((emy{g`%3^RfNKDHz|DZID0>R9 z1Mn-rZh!&#dvP`6`YNstT;IU;FklAm3jlKgrGU?nHw^d&a0i|*f=pUKCGJ-M>HtlE z7Jvio=!5JVQT`}k3*e`K?SSV1y8yohbO2rkbOBxi^Z||ljsZw}DGi)<9`4HlO95K& zd$%x+GXH#zIN54T-mP1E5hxnw4pvc zkJqk0fR^mb1Dp%BOKD%x?aITr$pjxOAO~OoKcyW+_eUOZ<^Vi^GQeVhJR0FS+&}#Z z{Z6^WytA%!9mipedK#M9b)L7mq0TQ2;a=3;=zwivBj$WCkPSNlaCX!Se8)Yt)pvS* zy5)6M&CSm1r)FHQtFKz+#a-t0-_PN=<#=eS5|O6YaNJDxynqprTr>U6zJ^sg5dm`1 z&*87t)m7Es>94vIjFwNEc74u8x~PhjeB>&{x686I`i=i zyWWng8$8ZuBcx9(LxLK*!LJiQ&k%wA{!@CE9@*b+rt&x`<9VrklJtzJn$fGIXPPny zKVEvq)D%&U5Q06+hPg(1PLlBNm7ZmJ?vHw=a%Eq0jSbB+YhWDSYD`?PbxR{=5R*X_M0UWoeRU{nv_F=n;^+3U#QJf011Gb<;c z!MIq7kvF|K&)ZykXT7&c^a0|yon7zqHm#^y?gjG;A#A}|XobHbIcUe9-UQHn0VV&< zA8iH>fbX?Y^s3#McW7S0kNT1Na|F*?%th&d8o)LHl@qQ!erRk^o*O{)I+Rgg(@$Ae zAkh+UqAkaBG+!%diH?3s+E$5{@`-*6o=F~h_DD2jBTAZ%D4HHT_eIeV{a7@_i+)O- zh&fn0puQx;74%H9ke%uA>;^0bDBHAM!Xp~8N%|@4BR-o@M!Ke-vaCg-r8(X%YG1J9*^ zM!;?W_1Pe1iX_A2O!|1msA%cTP?ikQz) z>P6is=2IEfpMqzdlqb_r*;q8PE|oeWT>3dsU$w-C_>w*O@VptY3oryw+LTN)mOT-l za_}2VuRSOuTDfof@jM>?wcs(9{xx@pc~BjxcpghWsz+|KvVD|Kzb)WjF7cvgs;dUi zEr2Zmd2AEjSiXd4ccF~hLO-R>ccVF>QMREA+MI8Pj5F9(l;g7{|_yZFhK04>{p(Tfp z137#U$KfL{4j&S6_&9~bfqf2#-pBlrj6*ozbbb5}ub{Rx;+4=?h*Ud1%~(DEBB; zFM~CAnzq)k$)d<0|u{EAb&5@(+ij%BY-vvh3R-Gd(|#E9L!Ox^_y}*KuWX zl!g0Z$G%AxpoXUoFxSFS-9VgI4ap ze%w>p_9%XG-7=r;lHBwx>;8QG*LKb5zLI$nZvypdQ4W$T1^1MfhAS?iALY42PaHS< z+6(ioRPb$-_^!VI-@`h@D2jSC*Nv`6Znu1uZLJ@?sST<3jFw$yDYv;t!X)=pvQ$F`;=S`*$WkidDrLz-o?8|K*PCt_UAJ5;x2X>_R6p?< zz&+&;;VR?NmGazlBmGW&3%+T13n}xp;+}XE;41T=E9H?+HZKtKx8f?(tdGK#>7r%% z=Z#`aKz@V#0+sKP>LwpIBGug$#ZRsqD4{ViUjNAXZbFuR%f1(>YkDTxsm`ry#C~kV zRmP_))hYkzp1>jDD*G`Vd2*fK_Ue`y<64?FnqDrJ>+L}uvab7aPx%6_G9FziPi|8l z-hnF1Z2LB5>M)@try_gDABgzO7%P@J=2xO-%oHQ zUbL=1c>!LX675l3iPwj?l6)Ua&veBjdzRzRZ*%<&bhLi|8dq9-s}_p7H{eSAthma0 zF2!qC%8UNVI=ok+sl=7?YH=kQn{wY`*~S z0R?XF1#q>CME)t#RVQ83aHaZ4hT-$@Kru&0vFM5;4D2dDH{qR&vb-;<{F2+n@)L9M z-U1-g9ai8i0nQo;PcB#1lU9r`(g4bOl=PJU>!@;k`y7(<^%73|KA>hjVTwQV2E22t zg5SJf&cPUd1fehTcB~KQP1%n7Wtb}zc;(0|1YVvZ@A2o*XO);+?gPH`JBK_+CHN`w zwmpwRD2qxwHN4qD4|G! z#rnS((s_N#>@jR7)Hg~zsyLo=xiZEem=6mj>niq{iu`rHS|*&>)6LVX>*^5iO>nW7 zSh5W%5TEetHCfa#IMY}yCyt`267>^m*Xqz<4lxdkAewgcs1G4Bz5a|z zFte)B=Wp^B;lGNNMG%`%=F%6>s;ffVX(*0?B>IdwDpy@YRdpmS6naUNo+1%wEJci5 zH0pck0ohZD`VMPR>?@*@oD;Ly->Am$S8n$>Uh3EJV|gi{D|}O>0w?U77|sPe(nTs) zZF8>t9+mu7cqoxX6?4hT{v*~Uy=$$ltM#o3D}_0u1xAShD=hI<`TWh`6f%D1rnrZw z-*=0Y*D|>MXmr_GDpcC4cKPea#%2Cbfy(_^F=Cj8SY7a< zpx@=jTtJ>SVys5U4j#J3Zm+&Ni>}$e^V@-W2q^;1K=}3~2TzGKUX<;p< z9eKow+}to*9N?%`)+1W%9VEkwDri+4A7il0pr#y$1^XKt8=8FH>hP!xk63h##K2w5 zL=Ouh4ODm7fWr*JgAn>~E3`Eh3eD1FHxWLNIlpzu(mdi0P2r>5#JUNte1 z$7XbSo)qORW|@q?FP40;TpaSeS1`X`)r5E2?&89#H4T2B=o|_ldsDots=8XDDW1{L zqC_A=l-U(1T}f^oUS+R>NaS1G#o#CQ%4b(mT{5?l2x^2ZkR^=8+B-FcYRj*uGY=RSvZSQJin*xZEsd+D zp{e#>Xz#yS!#>uYvS=Ya4Ry84G496{6}2xgh9s3yNkw;XuQ7=WMhhjQeP@nmne9dB zYK)lB!E8Y4+6YCFTIDXMK6xyLMt)hOA&iPKw=gV)!U@CRR+`8H_^O6`O4l^P!G-MO z>x<-wPo@n86k?3SW`q->)@z$<(Xruvg+Yt`dLUI14a$t713@nJV%MtL`r1|gRWy*r z&~ZHEHdqQf;xwzF2{^tQMXfXP3uvHlcLJxXxnO)WHaR?pS{wY$-g(|SZ&kA#xykjS zwafz-5sIS4vm~m#20xwOfpy&_#e5f{T$Jd#%e%&dXta48irc(v6gAZ_{PRl}N%6x; zt`!Z-{mrxM$Ejczm4>T$LBhY?F9+e#ZHOY^_P{FWAj~-Y!>qZVCAy&2P^ccwSb=%( zB@yd@Xw0Z3z)Ph6aoI)&|A-xz*EPu97aB}**Uk)=kug6mdG8iP*7g2zS~!#ZyAp#a zv#xRZ$g_>7#ZpBf;lHJF!E0hd9;cFAMIqs*T;!^5s=71(JetpoEGMc=kt(c`Q3@cU za52&7MVi9%^c)c>%864Q-W(bJG3{B>|!>_eeYyfZGEF3w&AO3 zs2&G>b~FZ2J`zD$?DsZdK9a3m@`YtpO|?~6F(Zgl@Q`rD35nYwjn=uaKX{SVGiz$= z6muza&ulW~x+WsxS}i(sMMVWHvXMtyJ%S9S%NFNtakPnLZ03GfOEG^_?eeh9Mewr- z_GoFI=cTw9I$;QkEH;PEq?XtEST^=RLX8H4@amp6N1&z8lMr83*U~9fWrP4!n)f0& zvy2AXU?4)yK^9d7;<4%p5mPnP{*99VKA#_s_W3I$n($Z&H)ZT;!g8JKo*J*WZX7#V z5H6!8^f4WWHUgAWI_zVt9iY6V$hB1jiDG^A;-z6cT3aNJqbgDa8Yn+fMlO-X5xZDlq3^=6OEjkl zRBk$Ot6JnZ=lr-gOmcZ!8msE7u{g_P!vgaKmO!IKQEVIB-c*a(nSJ~sMRH{EkF!Yj zR_Ta&BnR{j`9^VJ0+oC{$t9mfk5C=8BfNUaMBg>%uWF-w$Bexqr54xb z>qkd&k!UQK`$tH>(ed0E$lOWl`PEf*wbfNVI5#BE@qzRM`C<|g%){cbfrRd;<7rl{evJw zLUXfCC~3_Be+R+-Bhp(a7Zl@oi|eAiMFfe$Tl_f6TSVbqz*~G2S}`c;*tA3gFFciU z8rU{%7|*J$LoA6VDpsE%e0l35inc>JE|r96d*o<~hu02|OmS5))}k$%@UAgth_UEo zHyAxz@DhDwQTv4$L`CqG5fS|PiRD0_YF-l+KhJ8y*D7wetnhI6a8HjNy(+s2ezRh(7{N}% zDEIpOjkHHcJAz|x;K-qc9OKfQ{wa2Hr~PAj?|n7v**xzuKX%ut017Emxm@PrQmo)W z;jLQ53UX;fj^5PHAGehDNOM_fm>(k(U-5F6Vf?a+@HV2k8J{N>Hr#n9>vz!-B`Qdu zVe&>}(MIHqyaEG_pf@oN*m|m>-cM@=+U(D(@?mEpJvXZS!{{DwlK<<}PbR8Dk}owYV433mbf{#%vH)Mlyu<8lZ_bRzHS2Tt>K` zOK5*Y?rUI`kagj(0rpzMNa))z61kQ|GFHW%O%3;qi|WZ`KJ=&Pv4+{~kU+>T*bAefI}A1}5u z!WiWm*NUcwRr7r-tYL=i{Tgf=Ly_d~CLI+v+{0pId8A2o(kQuHj=g_4vQSnRFguh}S;OXT@zHd>F3$<=IS zrSQ0JW-j43#n`WaHsqrt{|>8IgDX8CeYy43^SmqE`7Kz5)K}HvekN@PFtLh#CE}(MO?%`?OGuv?nb2Oi zspzB~mya%2`_9CtA+Ckr-<5y(#7+`$o2 zX$^){e#>$%dymU;iNMMP7LaC>rA&*fXvC=kyq>G$ib~36&a)X<9UsM2`0McpG4A4? zKy5h0(NOPgsr7LyV=BD$%W(#wqET!gw>q|h;ibk^NH~=-71iDdoQGp8RXq=U6)UQ1 zSHtI%J{lX#mp4iaL+-X1st8iRePK4MsA*`p3oCfeMZ9aV-HT8Ynu4{MIah@bhK`z7 zG*ndk8k%q?_9~r|B7YkyW^*pv3uuPqOs5st119|&E0#B`T7^FyvI(**$NP(V1y}m> z0nH({_-Zy5?#tUmTJu(;Z`eLE_ghs-o!8sQol=(0Y*^KZ9m)_A*QqL%o8W0`SdKXx zUt-1F>h;a^H#K2pEN8x@nqM!Te7AZJAE_<=QcxlFWqss<u%bGC(Ed+Mr1=A{`LF6PXj~v(~@hYZ{w#U5E74%$O{DgEh9x)Xt@J5MC8l9JUTz( zl|&ScSW)k`Gv&!;z4)(H1_7P)cY35B{q@)1T=7bt(moW^3j0@N(lztWupueUfD{RvDi#?ljIcm74A`wVHU-k4^8Gj+;)JPMfYUUu(Y6oNZog zUS_T}-*0}zyv6)e^G@>%=7Z)#=6{%zEhbBerOL9w@*~R)R-^SkYpeAs>o2YUX?@-L zf%Q}CuywM{WV^%mi0vucLED?Q4{e5QYxbkrPh|fwyDR&z*_YaHw9m5NXWwXl%>Fa` zhxU6M4>}Gw&Nyy#TAd}%m!0RF>YRl+kLCO!rzhtMSF!6k*GH~%E>4GU=h0TR!DRTt zkd$H0D9G?hNzoTbB(W{tC5W}9i7Z)>)-+D_O8ZI{?@wj1oX*(>bL z_8iAN$L}0(IX-fH{`$Hf%SzGioya zkWrMmAoJ!dYgSKIZ&qK{;jI3wV_5@PC$ogCLA32`)^OHH*5$?zj8~fGm>x4d1FgRf zy$_l0G&h)i=6lVp<{z1V0Xurj{GoZ!{F!;!{Eb;9!p^xH1WZ_#%zTe>W-S^6wTEXOP#S_I1{ zma~?xpuGgE#(If0#d?iZZ@t-Su$rw7>kMmwb*{D4dWW^ry24s#ZL+p7>wUz!+4_Wa zoAnv%PV29&d#o>7JFN$-z1Bn4e(MSAN$bbfA?rEoh&9%xwoS1m*{-zdY&Y7{ZJ9Q! zEytE;n`86X%4~~m%WO5adYjL7uWh~UA=@U~6B13PTLwY_0mnq8gk%f2^zefE~@ zL)k~OPiB9d{SC&#HFmST(7w>V&HfAfF8gon-S)TaXY60v;~Y~QddDq}e8&<;lj9!8 zI>%PWlaA*dFF0PoXgTiqt3&0S=)BUI>73*AIIEo-oKHBPc0TVs?0nBTfc_nHeu+N* zUXBs{`}3UMoFvyw*RTsl>cKbv=+{Yxiw&0>t~T6YxXEBJSPVIad_$q3#BhgUnPH`& z33mLjVH0e5o8cFR-G;q}eTFw-)yE7U8iox)gF0hHMo-2Y8HY2DW}M5InOOk4Sdn>G z=BCWYG7GYbvMRFHWj&Vl<1EgYVAL2dG2USOzHz2;g|XRqzwu$?4~#!EzGCb)9y0bD zPZ&=cKQ{iuILYKRtuj4s`UPx8FvXj%GP})XX0Q1^Sj>OIT4G@xGc3zs15a9hXE|i~ z%yNl!s&%^cR_hXYpFQZOFRYwRZ*$s8Y+m%jFKoZJy=?o3Ek1inc6xSx_T20R*_GL~ z*$-y_B>T_VUuDm*7u(D1RrVDaHvv2JQi;C{8jEoZnUSp@R%h+S=HTD?~qxHv(18Bcs95fCY&l-n~BSy}oGO0}(lh%}E zN-?FHbSAwi&6I93n2aW?$!*Fr6_^U))k;m}rp2a8Q?;qaRA*{5`AjXQwWjs(GN+hR%{sH*oMuip8_Y(t)$BlzqM#@K4!X5Mbzfq7#WJnkNIhk38L)7)k5G54DL%!keW=40@}C(Q!< zz>xVYJi&;Wv#2a;iw52x$&vzpptI=V5z;LN_ynuP0k4o}DS%(_z(4VJ)*D(48x5NcI}N)GU53MkevIk?!%2f+7{a(t$wm;bsms)78Z)h#j!ZW^L1kuj=301y z&6(RXcVzC#?8xlQ?9cRNtwDBZX-_4SFZ7=Vg{>67j!&|1W9ae*)!} Bpql^y diff --git a/src/candleplugins/camera/script.js b/src/candleplugins/camera/script.js index 86095d8b..0dcd538d 100644 --- a/src/candleplugins/camera/script.js +++ b/src/candleplugins/camera/script.js @@ -13,14 +13,6 @@ function on_settings_loaded() s += l[l.length - 1]; settings.txtCameraName.toolTip = s; - - // s = ""; - // l = ui.camMain.availableResolutions; - // for (var i = 0; i < l.length; i += 2) { - // s += l[i] + "x" + l[i + 1] + (i != (l.length - 2) ? "\r\n" : ""); - // } - - // settings.txtCameraResolution.toolTip = s; } function on_settings_changed() @@ -43,7 +35,7 @@ function updateSettings() function on_pos_changed(pos) { - settings.txtCameraPosition.text = pos[0] + ", " + pos[1]; + settings.txtCameraPosition.text = pos.join(", "); } function on_zoom_changed(zoom) diff --git a/src/designerplugins/cameraplugin/camerawidget.cpp b/src/designerplugins/cameraplugin/camerawidget.cpp index 7d5c4a6b..3a5465a1 100644 --- a/src/designerplugins/cameraplugin/camerawidget.cpp +++ b/src/designerplugins/cameraplugin/camerawidget.cpp @@ -70,7 +70,7 @@ QVariantList CameraWidget::availableResolutions() const void CameraWidget::setCamera(const QCameraInfo &cameraInfo) { - if (m_camera) delete m_camera; + if (m_camera) m_camera->deleteLater(); m_camera = new QCamera(cameraInfo); m_camera->setViewfinder(m_viewFinder); @@ -204,3 +204,21 @@ void CameraWidget::wheelEvent(QWheelEvent *e) emit zoomChanged(m_zoom); } + +void CameraWidget::hideEvent(QHideEvent *e) +{ + QWidget::hideEvent(e); + + if (m_camera && m_camera->state() == QCamera::ActiveState) { + m_camera->stop(); + } +} + +void CameraWidget::showEvent(QShowEvent *e) +{ + QWidget::showEvent(e); + + if (m_camera && m_camera->state() == QCamera::LoadedState) { + setCameraName(m_cameraName); + } +} \ No newline at end of file diff --git a/src/designerplugins/cameraplugin/camerawidget.h b/src/designerplugins/cameraplugin/camerawidget.h index 2301de9a..fdfc2f24 100644 --- a/src/designerplugins/cameraplugin/camerawidget.h +++ b/src/designerplugins/cameraplugin/camerawidget.h @@ -63,6 +63,9 @@ public slots: void mousePressEvent(QMouseEvent *e) override; void mouseMoveEvent(QMouseEvent *e) override; void wheelEvent(QWheelEvent *e) override; + + void hideEvent(QHideEvent *e) override; + void showEvent(QShowEvent *e) override; }; #endif \ No newline at end of file diff --git a/src/designerplugins/designerplugins.pro b/src/designerplugins/designerplugins.pro index c3fd54e8..caba9adb 100644 --- a/src/designerplugins/designerplugins.pro +++ b/src/designerplugins/designerplugins.pro @@ -2,7 +2,7 @@ TEMPLATE = subdirs SUBDIRS = cameraplugin -install_cameraplugin.path = ../candleplugins/camera/plugins +install_cameraplugin.path = ../../bin/plugins/camera/plugins install_cameraplugin.files = cameraplugin/release/cameraplugin.dll INSTALLS += install_cameraplugin \ No newline at end of file From e1fd041bdc1c051201f77bef48dc15dffb3fb2be Mon Sep 17 00:00:00 2001 From: Denvi Date: Fri, 22 Nov 2019 17:48:35 +0500 Subject: [PATCH 33/80] Camera stays off on hided window now. --- src/designerplugins/cameraplugin/camerawidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/designerplugins/cameraplugin/camerawidget.cpp b/src/designerplugins/cameraplugin/camerawidget.cpp index 3a5465a1..71b8a516 100644 --- a/src/designerplugins/cameraplugin/camerawidget.cpp +++ b/src/designerplugins/cameraplugin/camerawidget.cpp @@ -82,7 +82,7 @@ void CameraWidget::setCamera(const QCameraInfo &cameraInfo) fs.setResolution(m_resolution); m_camera->setViewfinderSettings(fs); - m_camera->start(); + if (isVisible()) m_camera->start(); updateSize(); } From 84d5bbe765d1c9299cbd6a262f8c8af6fd718a56 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 6 Jun 2020 22:55:54 +0500 Subject: [PATCH 34/80] Camera plugin crosshair added. Status coords has +-9999.999 limits now. --- candle.pro | 8 +- src/candle/Candle_resource.rc | 8 +- src/candle/candle.pro | 2 +- src/candle/frmmain.ui | 28 +++--- src/candle/frmsettings.cpp | 2 +- src/candle/widgets/colorpicker.cpp | 11 +++ src/candle/widgets/colorpicker.h | 5 + src/candle/widgets/uiloader.cpp | 5 + src/candleplugins/camera/script.js | 48 +++++++++- src/candleplugins/camera/settings.ui | 74 +++++++++++--- src/candleplugins/camera/translation_ru.qm | Bin 404 -> 787 bytes src/candleplugins/camera/translation_ru.ts | 16 ++++ .../cameraplugin/cameraplugin.pro | 6 +- .../cameraplugin/camerawidget.cpp | 90 ++++++++++++++++-- .../cameraplugin/camerawidget.h | 22 +++++ src/designerplugins/cameraplugin/overlay.cpp | 70 ++++++++++++++ src/designerplugins/cameraplugin/overlay.h | 40 ++++++++ 17 files changed, 385 insertions(+), 50 deletions(-) create mode 100644 src/designerplugins/cameraplugin/overlay.cpp create mode 100644 src/designerplugins/cameraplugin/overlay.h diff --git a/candle.pro b/candle.pro index 03ab6305..63bde4d3 100644 --- a/candle.pro +++ b/candle.pro @@ -1,9 +1,9 @@ TEMPLATE = subdirs -SUBDIRS = src/candle \ - src/candleplugins \ - src/designerplugins - +SUBDIRS = src/designerplugins \ + src/candle \ + src/candleplugins + # Make plugins translations system(qmake src/candleplugins/candleplugins.pro) diff --git a/src/candle/Candle_resource.rc b/src/candle/Candle_resource.rc index 133cf981..ce2533e0 100644 --- a/src/candle/Candle_resource.rc +++ b/src/candle/Candle_resource.rc @@ -7,8 +7,8 @@ IDI_ICON1 ICON DISCARDABLE "D:\\prj\\qtcode\\prj\\candle\\src\\candle\\images\\candle.ico" VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,2,8b,0 - PRODUCTVERSION 1,2,8b,0 + FILEVERSION 1,2,9b,0 + PRODUCTVERSION 1,2,9b,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -25,11 +25,11 @@ VS_VERSION_INFO VERSIONINFO BEGIN VALUE "CompanyName", "\0" VALUE "FileDescription", "\0" - VALUE "FileVersion", "1.2.8b.0\0" + VALUE "FileVersion", "1.2.9b.0\0" VALUE "LegalCopyright", "\0" VALUE "OriginalFilename", "Candle.exe\0" VALUE "ProductName", "Candle\0" - VALUE "ProductVersion", "1.2.8b.0\0" + VALUE "ProductVersion", "1.2.9b.0\0" END END BLOCK "VarFileInfo" diff --git a/src/candle/candle.pro b/src/candle/candle.pro index 01870666..f41e456c 100644 --- a/src/candle/candle.pro +++ b/src/candle/candle.pro @@ -29,7 +29,7 @@ contains(QT_CONFIG, opengles.) { TARGET = Candle TEMPLATE = app -VERSION = 1.2.8b +VERSION = 1.2.9b RC_ICONS += images/candle.ico DEFINES += sNan=\"65536\" diff --git a/src/candle/frmmain.ui b/src/candle/frmmain.ui index 50fbf8a9..d6aaaa43 100644 --- a/src/candle/frmmain.ui +++ b/src/candle/frmmain.ui @@ -467,7 +467,7 @@ QLabel[overrided="false"] { 0 0 - 255 + 257 770 @@ -1255,7 +1255,7 @@ QLabel[overrided="false"] { 0 0 - 320 + 347 897 @@ -1323,10 +1323,10 @@ QLabel[overrided="false"] { 3 - -999.000000000000000 + -9999.000000000000000 - 999.000000000000000 + 9999.000000000000000 0.000000000000000 @@ -1357,10 +1357,10 @@ QLabel[overrided="false"] { 3 - -999.000000000000000 + -9999.000000000000000 - 999.000000000000000 + 9999.000000000000000 0.000000000000000 @@ -1391,10 +1391,10 @@ QLabel[overrided="false"] { 3 - -999.000000000000000 + -9999.000000000000000 - 999.000000000000000 + 9999.000000000000000 0.000000000000000 @@ -1444,10 +1444,10 @@ QLabel[overrided="false"] { 3 - -999.000000000000000 + -9999.000000000000000 - 999.000000000000000 + 9999.000000000000000 0.000000000000000 @@ -1478,10 +1478,10 @@ QLabel[overrided="false"] { 3 - -999.000000000000000 + -9999.000000000000000 - 999.000000000000000 + 9999.000000000000000 0.000000000000000 @@ -1512,10 +1512,10 @@ QLabel[overrided="false"] { 3 - -999.000000000000000 + -9999.000000000000000 - 999.000000000000000 + 9999.000000000000000 0.000000000000000 diff --git a/src/candle/frmsettings.cpp b/src/candle/frmsettings.cpp index 0cbf953d..fd216a79 100644 --- a/src/candle/frmsettings.cpp +++ b/src/candle/frmsettings.cpp @@ -580,7 +580,7 @@ void frmSettings::setSimplifyPrecision(double simplifyPrecision) QList frmSettings::colors() { - return this->findChildren(); + return ui->grpColors->findChildren(); } QColor frmSettings::colors(QString name) diff --git a/src/candle/widgets/colorpicker.cpp b/src/candle/widgets/colorpicker.cpp index 75c144ee..07dca3a0 100644 --- a/src/candle/widgets/colorpicker.cpp +++ b/src/candle/widgets/colorpicker.cpp @@ -29,6 +29,17 @@ void ColorPicker::setColor(const QColor &color) m_frame->setStyleSheet(QString("background-color: %1").arg(color.name())); } +int ColorPicker::colorInt() const +{ + return m_color.rgb(); +} + +void ColorPicker::setColorInt(int color) +{ + m_color = QColor::fromRgb(color); + m_frame->setStyleSheet(QString("background-color: %1").arg(m_color.name())); +} + void ColorPicker::onButtonClicked() { QColor color = QColorDialog::getColor(m_color, this); diff --git a/src/candle/widgets/colorpicker.h b/src/candle/widgets/colorpicker.h index 56a9485d..0e9b533e 100644 --- a/src/candle/widgets/colorpicker.h +++ b/src/candle/widgets/colorpicker.h @@ -10,12 +10,17 @@ class ColorPicker : public QWidget { Q_OBJECT + Q_PROPERTY(int colorInt READ colorInt WRITE setColorInt); + public: explicit ColorPicker(QWidget *parent = 0); QColor color() const; void setColor(const QColor &color); + int colorInt() const; + void setColorInt(int color); + signals: void colorSelected(QColor color); diff --git a/src/candle/widgets/uiloader.cpp b/src/candle/widgets/uiloader.cpp index 8b239568..bb1a7b60 100644 --- a/src/candle/widgets/uiloader.cpp +++ b/src/candle/widgets/uiloader.cpp @@ -1,6 +1,7 @@ #include "uiloader.h" #include "styledtoolbutton.h" #include "sliderbox.h" +#include "colorpicker.h" UiLoader::UiLoader(QObject *parent): QUiLoader(parent) { @@ -17,6 +18,10 @@ QWidget *UiLoader::createWidget(const QString &className, QWidget *parent, const SliderBox *w = new SliderBox(parent); w->setObjectName(name); return w; + } else if (className == "ColorPicker") { + ColorPicker *w = new ColorPicker(parent); + w->setObjectName(name); + return w; } return QUiLoader::createWidget(className, parent, name); diff --git a/src/candleplugins/camera/script.js b/src/candleplugins/camera/script.js index 0dcd538d..32c72aef 100644 --- a/src/candleplugins/camera/script.js +++ b/src/candleplugins/camera/script.js @@ -13,6 +13,13 @@ function on_settings_loaded() s += l[l.length - 1]; settings.txtCameraName.toolTip = s; + + ui.camMain.posChanged.connect(on_pos_changed); + ui.camMain.aimPosChanged.connect(on_aimPos_changed); + ui.camMain.aimSizeChanged.connect(on_aimSize_changed); + ui.camMain.aimLineWidthChanged.connect(on_aimLineWidth_changed); + ui.camMain.aimColorChanged.connect(on_aimColor_changed); + ui.camMain.zoomChanged.connect(on_zoom_changed); } function on_settings_changed() @@ -24,13 +31,28 @@ function updateSettings() { ui.camMain.cameraName = settings.txtCameraName.text; + if (settings.txtCameraResolution.text == "") settings.txtCameraResolution.text = "1280x720"; var l = settings.txtCameraResolution.text.split("x"); ui.camMain.resolution = [parseInt(l[0]), parseInt(l[1])]; + if (settings.txtCameraZoom.text == "") settings.txtCameraZoom.text = "1.0"; ui.camMain.zoom = parseFloat(settings.txtCameraZoom.text); + if (settings.txtCameraPosition.text == "") settings.txtCameraPosition.text = "0, 0"; l = settings.txtCameraPosition.text.split(","); ui.camMain.pos = [parseInt(l[0]), parseInt(l[1])]; + + if (settings.txtCameraAimPosition.text == "") settings.txtCameraAimPosition.text = "0, 0"; + l = settings.txtCameraAimPosition.text.split(","); + ui.camMain.aimPos = [parseFloat(l[0]), parseFloat(l[1])]; + + if (settings.txtCameraAimSize.text == "") settings.txtCameraAimSize.text = "20"; + ui.camMain.aimSize = parseInt(settings.txtCameraAimSize.text); + + if (settings.txtCameraAimLineWidth.text == "") settings.txtCameraAimLineWidth.text = "1.0"; + ui.camMain.aimLineWidth = parseInt(settings.txtCameraAimLineWidth.text); + + ui.camMain.aimColor = parseInt(settings.colCameraAimColor.colorInt); } function on_pos_changed(pos) @@ -38,6 +60,27 @@ function on_pos_changed(pos) settings.txtCameraPosition.text = pos.join(", "); } +function on_aimPos_changed(aimPos) +{ + p = [parseFloat(aimPos[0].toFixed(3)), parseFloat(aimPos[1].toFixed(3))]; + settings.txtCameraAimPosition.text = p.join(", "); +} + +function on_aimSize_changed(aimSize) +{ + settings.txtCameraAimSize.text = aimSize; +} + +function on_aimLineWidth_changed(aimLineWidth) +{ + settings.txtCameraAimLineWidth.text = aimLineWidth; +} + +function on_aimColor_changed(aimColor) +{ + settings.colCameraAimColor.colorInt = aimColor; +} + function on_zoom_changed(zoom) { settings.txtCameraZoom.text = zoom.toFixed(3); @@ -45,7 +88,4 @@ function on_zoom_changed(zoom) main.settingsLoaded.connect(on_settings_loaded); main.settingsAboutToSave.connect(on_settings_aboutToSave); -main.settingsChanged.connect(on_settings_changed); - -ui.camMain.posChanged.connect(on_pos_changed); -ui.camMain.zoomChanged.connect(on_zoom_changed); \ No newline at end of file +main.settingsChanged.connect(on_settings_changed); \ No newline at end of file diff --git a/src/candleplugins/camera/settings.ui b/src/candleplugins/camera/settings.ui index 392156c9..11d2c649 100644 --- a/src/candleplugins/camera/settings.ui +++ b/src/candleplugins/camera/settings.ui @@ -7,7 +7,7 @@ 0 0 554 - 115 + 127 @@ -26,9 +26,6 @@ 0 - - - @@ -36,12 +33,8 @@ - - - - Resolution: - - + + @@ -56,6 +49,13 @@
+ + + + Resolution: + + + @@ -63,9 +63,6 @@ - - - @@ -82,8 +79,59 @@ + + + + Aim position: + + + + + + + + + + + + + Aim size: + + + + + + + + + + Aim color: + + + + + + + Aim line width: + + + + + + + + + + + + ColorPicker + QWidget +
colorpicker.h
+ 1 +
+
diff --git a/src/candleplugins/camera/translation_ru.qm b/src/candleplugins/camera/translation_ru.qm index f548682091de1b76f03ba2cf5037a0c5d6bc03c2..c12f8553a706656dc10fca2b4973bb6e4d6496a3 100644 GIT binary patch delta 328 zcmbQjJeh5Rh@S^TNOKnh17j~kVj33%15+aNq<|_QEzUB-rjY>%*cN530#bS$Yb&jQ zbTb#%W}rOdRsO1Q5N*o;buvi&dL~fQ{E1FRW=bq-EJiG*EKUpxEcQU!0f?=@q$7(H ziv^26gB1r*0|Ofnb2(<_DkSIUB-5=OI0Y(Oex6#YP8T`kq2rt2P$?0TR_-iUXURL6K|+ls<9}r7y$L!fSgK%lQ}^; Pi!-ZIffjEpQD6iBAU!*O delta 61 zcmbQtHidbDh@J*RNOKnh1A`tzVj33%10xgjq<|_Qe+SD9n?@kbz{Ry0#4pPPN;*tT LGTQu^QGpQvkTnfV diff --git a/src/candleplugins/camera/translation_ru.ts b/src/candleplugins/camera/translation_ru.ts index 356851cb..8ab50ec1 100644 --- a/src/candleplugins/camera/translation_ru.ts +++ b/src/candleplugins/camera/translation_ru.ts @@ -26,5 +26,21 @@ Zoom: Масштаб: + + Aim position: + Позиция перекрестия: + + + Aim size: + Размер перекрестия: + + + Aim line width: + Толщина линии: + + + Aim color: + Цвет перекрестия: +
\ No newline at end of file diff --git a/src/designerplugins/cameraplugin/cameraplugin.pro b/src/designerplugins/cameraplugin/cameraplugin.pro index 97ef1fa2..17cd167d 100644 --- a/src/designerplugins/cameraplugin/cameraplugin.pro +++ b/src/designerplugins/cameraplugin/cameraplugin.pro @@ -4,8 +4,10 @@ QT += widgets uiplugin multimedia multimediawidgets TARGET = cameraplugin -HEADERS += camerawidget.h \ +HEADERS += overlay.h \ + camerawidget.h \ cameraplugin.h -SOURCES += camerawidget.cpp \ +SOURCES += overlay.cpp \ + camerawidget.cpp \ cameraplugin.cpp \ No newline at end of file diff --git a/src/designerplugins/cameraplugin/camerawidget.cpp b/src/designerplugins/cameraplugin/camerawidget.cpp index 71b8a516..32b286da 100644 --- a/src/designerplugins/cameraplugin/camerawidget.cpp +++ b/src/designerplugins/cameraplugin/camerawidget.cpp @@ -27,7 +27,7 @@ CameraWidget::CameraWidget(QWidget *parent): QWidget(parent), m_camera(0), m_vie layout->addWidget(m_scrollArea); layout->setMargin(0); - // setCameraName(QString()); + m_overlay = new Overlay(m_viewFinder); } void CameraWidget::setCameraName(QString cameraName) @@ -70,7 +70,7 @@ QVariantList CameraWidget::availableResolutions() const void CameraWidget::setCamera(const QCameraInfo &cameraInfo) { - if (m_camera) m_camera->deleteLater(); + if (m_camera) delete m_camera; m_camera = new QCamera(cameraInfo); m_camera->setViewfinder(m_viewFinder); @@ -102,6 +102,8 @@ void CameraWidget::resizeEvent(QResizeEvent *e) QWidget::resizeEvent(e); updateSize(); + + setAimPos(QVariantList() << m_overlay->aimPosition().x() << m_overlay->aimPosition().y()); } void CameraWidget::updateSize() @@ -116,6 +118,12 @@ void CameraWidget::updateSize() } else { m_viewFinder->resize(size.height() * cameraAspect * m_zoom, size.height() * m_zoom); } + + QPointF o((double)m_overlay->aimPosition().x() / m_overlay->width() * m_viewFinder->width(), + (double)m_overlay->aimPosition().y() / m_overlay->height() * m_viewFinder->height()); + + m_overlay->resize(m_viewFinder->size()); + m_overlay->setAimPosition(o); } void CameraWidget::setResolution(QVariantList resolution) @@ -147,8 +155,6 @@ double CameraWidget::zoom() const void CameraWidget::setPos(QVariantList pos) { - qDebug() << "setPos" << pos; - if (pos.size() != 2) return; m_scrollArea->horizontalScrollBar()->setValue(pos.at(0).toInt()); @@ -163,6 +169,61 @@ QVariantList CameraWidget::pos() const << m_scrollArea->verticalScrollBar()->value(); } +void CameraWidget::setAimPos(QVariantList aimPos) +{ + if (aimPos.size() != 2) return; + + if (qIsNaN(aimPos.at(0).toDouble()) || qIsNaN(aimPos.at(1).toDouble())) return; + + m_overlay->setAimPosition(QPointF(aimPos.at(0).toDouble(), aimPos.at(1).toDouble())); + + emit aimPosChanged(aimPos); + +} + +QVariantList CameraWidget::aimPos() const +{ + QPointF p = m_overlay->aimPosition(); + + return QVariantList() << p.x() << p.y(); +} + +void CameraWidget::setAimSize(int aimSize) +{ + m_overlay->setAimSize(aimSize); + + emit aimSizeChanged(aimSize); +} + +int CameraWidget::aimSize() const +{ + return m_overlay->aimSize(); +} + +void CameraWidget::setAimLineWidth(int aimLineWidth) +{ + m_overlay->setAimLineWidth(aimLineWidth); + + emit aimLineWidthChanged(aimLineWidth); +} + +int CameraWidget::aimLineWidth() const +{ + return m_overlay->aimLineWidth(); +} + +void CameraWidget::setAimColor(int aimColor) +{ + m_overlay->setAimColor(aimColor); + + emit aimColorChanged(aimColor); +} + +int CameraWidget::aimColor() const +{ + return m_overlay->aimColor(); +} + void CameraWidget::mousePressEvent(QMouseEvent *e) { if (e->buttons() == Qt::LeftButton) { @@ -175,7 +236,16 @@ void CameraWidget::mousePressEvent(QMouseEvent *e) void CameraWidget::mouseMoveEvent(QMouseEvent *e) { - if (e->buttons() == Qt::LeftButton) { + if (e->buttons() == Qt::LeftButton && e->modifiers() == Qt::ShiftModifier) { + + QPoint d = e->pos() - m_mousePos; + + QPointF o = m_overlay->aimPosition() + d; + setAimPos(QVariantList() << o.x() << o.y()); + + m_mousePos = e->pos(); + + } else if (e->buttons() == Qt::LeftButton) { QPoint d = e->pos() - m_mousePos; setPos(QVariantList() << m_scrollArea->horizontalScrollBar()->value() - d.x() @@ -196,11 +266,17 @@ void CameraWidget::wheelEvent(QWheelEvent *e) QPointF deltaPos = e->posF() / prevZoom - m_scrollArea->widget()->pos() / prevZoom; QPointF delta = deltaPos * m_zoom - deltaPos * prevZoom; + QPoint d = delta.toPoint(); updateSize(); - m_scrollArea->horizontalScrollBar()->setValue(m_scrollArea->horizontalScrollBar()->value() + delta.x()); - m_scrollArea->verticalScrollBar()->setValue(m_scrollArea->verticalScrollBar()->value() + delta.y()); + setPos(QVariantList() << m_scrollArea->horizontalScrollBar()->value() + d.x() << + m_scrollArea->verticalScrollBar()->value() + d.y()); + + // QPointF o((double)m_overlay->aimPosition().x() / prevZoom * m_zoom, + // (double)m_overlay->aimPosition().y() / prevZoom * m_zoom); + // setAimPos(QVariantList() << o.x() << o.y()); + setAimPos(QVariantList() << m_overlay->aimPosition().x() << m_overlay->aimPosition().y()); emit zoomChanged(m_zoom); } diff --git a/src/designerplugins/cameraplugin/camerawidget.h b/src/designerplugins/cameraplugin/camerawidget.h index fdfc2f24..0561606e 100644 --- a/src/designerplugins/cameraplugin/camerawidget.h +++ b/src/designerplugins/cameraplugin/camerawidget.h @@ -3,6 +3,7 @@ #include #include +#include "overlay.h" class QCamera; class QCameraViewfinder; @@ -16,6 +17,10 @@ class CameraWidget: public QWidget Q_PROPERTY(QVariantList resolution READ resolution WRITE setResolution); Q_PROPERTY(double zoom READ zoom WRITE setZoom); Q_PROPERTY(QVariantList pos READ pos WRITE setPos); + Q_PROPERTY(QVariantList aimPos READ aimPos WRITE setAimPos); + Q_PROPERTY(int aimSize READ aimSize WRITE setAimSize); + Q_PROPERTY(int aimLineWidth READ aimLineWidth WRITE setAimLineWidth); + Q_PROPERTY(int aimColor READ aimColor WRITE setAimColor); public: CameraWidget(QWidget *parent = 0); @@ -35,9 +40,25 @@ class CameraWidget: public QWidget void setPos(QVariantList pos); QVariantList pos() const; + void setAimPos(QVariantList aimPos); + QVariantList aimPos() const; + + void setAimSize(int aimSize); + int aimSize() const; + + void setAimLineWidth(int aimLineWidth); + int aimLineWidth() const; + + void setAimColor(int aimColor); + int aimColor() const; + signals: void posChanged(QVariantList pos); + void aimPosChanged(QVariantList aimPos); + void aimSizeChanged(int aimSize); + void aimLineWidthChanged(int aimLineWidth); + void aimColorChanged(int aimColor); void zoomChanged(double zoom); public slots: @@ -49,6 +70,7 @@ public slots: QCamera *m_camera; QCameraViewfinder *m_viewFinder; QScrollArea *m_scrollArea; + Overlay *m_overlay; QString m_cameraName; QSize m_resolution; diff --git a/src/designerplugins/cameraplugin/overlay.cpp b/src/designerplugins/cameraplugin/overlay.cpp new file mode 100644 index 00000000..caabf4c6 --- /dev/null +++ b/src/designerplugins/cameraplugin/overlay.cpp @@ -0,0 +1,70 @@ +#include "overlay.h" +#include +#include +#include + +Overlay::Overlay(QWidget *parent): QWidget(parent) +{ + m_aimPosition = QPoint(0, 0); + m_aimSize = 20; + m_aimLineWidth = 2; + m_aimColor = QColor(Qt::black).rgb(); +} + +void Overlay::setAimPosition(QPointF aimPosition) +{ + m_aimPosition = aimPosition; +} + +QPointF Overlay::aimPosition() const +{ + return m_aimPosition; +} + +void Overlay::setAimSize(int aimSize) +{ + m_aimSize = aimSize; + update(); +} + +int Overlay::aimSize() const +{ + return m_aimSize; +} + +void Overlay::setAimLineWidth(int aimLineWidth) +{ + m_aimLineWidth = aimLineWidth; + update(); +} + +int Overlay::aimLineWidth() const +{ + return m_aimLineWidth; +} + +void Overlay::setAimColor(int aimColor) +{ + m_aimColor = aimColor; + update(); +} + +int Overlay::aimColor() const +{ + return m_aimColor; +} + +void Overlay::paintEvent(QPaintEvent *e) +{ + QPainter p(this); + + QPen pen; + pen.setWidth(m_aimLineWidth); + pen.setColor(QColor::fromRgb(m_aimColor)); + + p.setRenderHint(QPainter::Antialiasing, true); + p.setPen(pen); + p.drawLine(0, m_aimPosition.y(), width(), m_aimPosition.y()); + p.drawLine(m_aimPosition.x(), 0, m_aimPosition.x(), height()); + p.drawEllipse(m_aimPosition, m_aimSize / 2, m_aimSize / 2); +} \ No newline at end of file diff --git a/src/designerplugins/cameraplugin/overlay.h b/src/designerplugins/cameraplugin/overlay.h new file mode 100644 index 00000000..458d600c --- /dev/null +++ b/src/designerplugins/cameraplugin/overlay.h @@ -0,0 +1,40 @@ +#ifndef OVERLAY_H +#define OVERLAY_H + +#include +#include + +class Overlay: public QWidget +{ + Q_OBJECT + Q_PROPERTY(QPointF aimPosition READ aimPosition WRITE setAimPosition); + Q_PROPERTY(int aimSize READ aimSize WRITE setAimSize); + Q_PROPERTY(int aimLineWidth READ aimLineWidth WRITE setAimLineWidth); + Q_PROPERTY(int aimColor READ aimColor WRITE setAimColor); + +public: + Overlay(QWidget *parent); + + void setAimPosition(QPointF aimPosition); + QPointF aimPosition() const; + + void setAimSize(int aimSize); + int aimSize() const; + + void setAimLineWidth(int aimLineWidth); + int aimLineWidth() const; + + void setAimColor(int aimColor); + int aimColor() const; + +protected: + void paintEvent(QPaintEvent *e) override; + +private: + QPointF m_aimPosition; + int m_aimSize; + int m_aimLineWidth; + int m_aimColor; +}; + +#endif \ No newline at end of file From 72a573380dd79db07c2f9a33ca3e028268f8e4f0 Mon Sep 17 00:00:00 2001 From: Denvi Date: Fri, 12 Jun 2020 16:30:18 +0500 Subject: [PATCH 35/80] Status coords limits fix --- src/candle/Candle_resource.rc | 8 ++++---- src/candle/candle.pro | 2 +- src/candle/frmmain.cpp | 2 +- src/designerplugins/cameraplugin/camerawidget.cpp | 5 +---- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/candle/Candle_resource.rc b/src/candle/Candle_resource.rc index ce2533e0..25cf0ddd 100644 --- a/src/candle/Candle_resource.rc +++ b/src/candle/Candle_resource.rc @@ -7,8 +7,8 @@ IDI_ICON1 ICON DISCARDABLE "D:\\prj\\qtcode\\prj\\candle\\src\\candle\\images\\candle.ico" VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,2,9b,0 - PRODUCTVERSION 1,2,9b,0 + FILEVERSION 1,2,9,1b + PRODUCTVERSION 1,2,9,1b FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -25,11 +25,11 @@ VS_VERSION_INFO VERSIONINFO BEGIN VALUE "CompanyName", "\0" VALUE "FileDescription", "\0" - VALUE "FileVersion", "1.2.9b.0\0" + VALUE "FileVersion", "1.2.9.1b\0" VALUE "LegalCopyright", "\0" VALUE "OriginalFilename", "Candle.exe\0" VALUE "ProductName", "Candle\0" - VALUE "ProductVersion", "1.2.9b.0\0" + VALUE "ProductVersion", "1.2.9.1b\0" END END BLOCK "VarFileInfo" diff --git a/src/candle/candle.pro b/src/candle/candle.pro index f41e456c..b9527b12 100644 --- a/src/candle/candle.pro +++ b/src/candle/candle.pro @@ -29,7 +29,7 @@ contains(QT_CONFIG, opengles.) { TARGET = Candle TEMPLATE = app -VERSION = 1.2.9b +VERSION = 1.2.9.1b RC_ICONS += images/candle.ico DEFINES += sNan=\"65536\" diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index 6a20fb9f..c2d19e0d 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -3993,7 +3993,7 @@ QString frmMain::evaluateCommand(QString command) void frmMain::setupCoordsTextboxes() { int prec = m_settings->units() == 0 ? 3 : 4; - int bound = m_settings->units() == 0 ? 999 : 99; + int bound = m_settings->units() == 0 ? 9999 : 999; ui->txtMPosX->setDecimals(prec); ui->txtMPosX->setMinimum(-bound); diff --git a/src/designerplugins/cameraplugin/camerawidget.cpp b/src/designerplugins/cameraplugin/camerawidget.cpp index 32b286da..8641e237 100644 --- a/src/designerplugins/cameraplugin/camerawidget.cpp +++ b/src/designerplugins/cameraplugin/camerawidget.cpp @@ -176,9 +176,9 @@ void CameraWidget::setAimPos(QVariantList aimPos) if (qIsNaN(aimPos.at(0).toDouble()) || qIsNaN(aimPos.at(1).toDouble())) return; m_overlay->setAimPosition(QPointF(aimPos.at(0).toDouble(), aimPos.at(1).toDouble())); + m_overlay->update(); emit aimPosChanged(aimPos); - } QVariantList CameraWidget::aimPos() const @@ -273,9 +273,6 @@ void CameraWidget::wheelEvent(QWheelEvent *e) setPos(QVariantList() << m_scrollArea->horizontalScrollBar()->value() + d.x() << m_scrollArea->verticalScrollBar()->value() + d.y()); - // QPointF o((double)m_overlay->aimPosition().x() / prevZoom * m_zoom, - // (double)m_overlay->aimPosition().y() / prevZoom * m_zoom); - // setAimPos(QVariantList() << o.x() << o.y()); setAimPos(QVariantList() << m_overlay->aimPosition().x() << m_overlay->aimPosition().y()); emit zoomChanged(m_zoom); From c8f92cc91c22e9df286a4bacd03a197b73e209a8 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 2 Jan 2021 22:33:14 +0500 Subject: [PATCH 36/80] Plugins can use comboboxes now. Camera plugin update. --- src/candle/frmsettings.cpp | 11 +++- src/candle/widgets/combobox.h | 3 + src/candle/widgets/uiloader.cpp | 5 ++ src/candleplugins/camera/script.js | 60 +++++++++++++++---- .../cameraplugin/camerawidget.cpp | 31 +++++----- .../cameraplugin/camerawidget.h | 7 ++- src/designerplugins/cameraplugin/overlay.cpp | 9 ++- 7 files changed, 90 insertions(+), 36 deletions(-) diff --git a/src/candle/frmsettings.cpp b/src/candle/frmsettings.cpp index fd216a79..f5de5ecc 100644 --- a/src/candle/frmsettings.cpp +++ b/src/candle/frmsettings.cpp @@ -167,8 +167,12 @@ void frmSettings::saveCustomSettings(QSettings &set) foreach (QAbstractButton* o, w->findChildren()) set.setValue(o->objectName(), o->isChecked()); - foreach (QComboBox* o, w->findChildren()) + foreach (QComboBox* o, w->findChildren()) { set.setValue(o->objectName(), o->currentText()); + QStringList l; + for (int i = 0; i < o->count(); i++) l << o->itemText(i); + set.setValue(o->objectName() + "/Items", l); + } foreach (ColorPicker* o, w->findChildren()) set.setValue(o->objectName(), o->color()); @@ -199,8 +203,11 @@ void frmSettings::loadCustomSettings(QSettings &set) foreach (QAbstractButton* o, w->findChildren()) o->setChecked(set.value(o->objectName()).toBool()); - foreach (QComboBox* o, w->findChildren()) + foreach (QComboBox* o, w->findChildren()) { + QStringList l = set.value(o->objectName() + "/Items").toStringList(); + o->addItems(l); o->setCurrentText(set.value(o->objectName()).toString()); + } foreach (ColorPicker* o, w->findChildren()) o->setColor(set.value(o->objectName()).value()); diff --git a/src/candle/widgets/combobox.h b/src/candle/widgets/combobox.h index 56790626..3cbeabe4 100644 --- a/src/candle/widgets/combobox.h +++ b/src/candle/widgets/combobox.h @@ -16,6 +16,9 @@ class ComboBox : public QComboBox void storeText(); +public slots: + void addItems(const QStringList &texts) {QComboBox::addItems(texts);} + signals: void returnPressed(); diff --git a/src/candle/widgets/uiloader.cpp b/src/candle/widgets/uiloader.cpp index bb1a7b60..18a76f68 100644 --- a/src/candle/widgets/uiloader.cpp +++ b/src/candle/widgets/uiloader.cpp @@ -2,6 +2,7 @@ #include "styledtoolbutton.h" #include "sliderbox.h" #include "colorpicker.h" +#include "combobox.h" UiLoader::UiLoader(QObject *parent): QUiLoader(parent) { @@ -18,6 +19,10 @@ QWidget *UiLoader::createWidget(const QString &className, QWidget *parent, const SliderBox *w = new SliderBox(parent); w->setObjectName(name); return w; + } else if (className == "ComboBox") { + ComboBox *w = new ComboBox(parent); + w->setObjectName(name); + return w; } else if (className == "ColorPicker") { ColorPicker *w = new ColorPicker(parent); w->setObjectName(name); diff --git a/src/candleplugins/camera/script.js b/src/candleplugins/camera/script.js index 32c72aef..0b80f0e4 100644 --- a/src/candleplugins/camera/script.js +++ b/src/candleplugins/camera/script.js @@ -2,24 +2,36 @@ function on_settings_aboutToSave() { } -function on_settings_loaded() +function on_settings_aboutToLoad() { - updateSettings(); - var l = ui.camMain.availableCameras; - var s = ""; +} + +function on_settings_loaded() +{ + // Update cameras list + var n = settings.txtCameraName.currentText; + settings.txtCameraName.clear(); + settings.txtCameraName.addItems(ui.camMain.availableCameras); + settings.txtCameraName.currentText = n; - for (var i = 0; i < l.length - 1; i++) s += l[i] + "\r\n"; - s += l[l.length - 1]; + // Apply settings + updateSettings(); - settings.txtCameraName.toolTip = s; + // Update resolutions list + var r = settings.txtCameraResolution.currentText; + settings.txtCameraResolution.clear(); + settings.txtCameraResolution.addItems(ui.camMain.availableResolutions); + settings.txtCameraResolution.currentText = r; + // Connect signals/slots ui.camMain.posChanged.connect(on_pos_changed); ui.camMain.aimPosChanged.connect(on_aimPos_changed); ui.camMain.aimSizeChanged.connect(on_aimSize_changed); ui.camMain.aimLineWidthChanged.connect(on_aimLineWidth_changed); ui.camMain.aimColorChanged.connect(on_aimColor_changed); ui.camMain.zoomChanged.connect(on_zoom_changed); + settings.txtCameraName.currentTextChanged.connect(on_cameraName_changed); } function on_settings_changed() @@ -29,30 +41,51 @@ function on_settings_changed() function updateSettings() { - ui.camMain.cameraName = settings.txtCameraName.text; - - if (settings.txtCameraResolution.text == "") settings.txtCameraResolution.text = "1280x720"; - var l = settings.txtCameraResolution.text.split("x"); - ui.camMain.resolution = [parseInt(l[0]), parseInt(l[1])]; + // Resolution + if (settings.txtCameraResolution.currentText != "") { + var l = settings.txtCameraResolution.currentText.split("x"); + ui.camMain.resolution = [parseInt(l[0]), parseInt(l[1])]; + } + // Zoom if (settings.txtCameraZoom.text == "") settings.txtCameraZoom.text = "1.0"; ui.camMain.zoom = parseFloat(settings.txtCameraZoom.text); + // Padding if (settings.txtCameraPosition.text == "") settings.txtCameraPosition.text = "0, 0"; l = settings.txtCameraPosition.text.split(","); ui.camMain.pos = [parseInt(l[0]), parseInt(l[1])]; + // Aim position if (settings.txtCameraAimPosition.text == "") settings.txtCameraAimPosition.text = "0, 0"; l = settings.txtCameraAimPosition.text.split(","); ui.camMain.aimPos = [parseFloat(l[0]), parseFloat(l[1])]; + // Aim size if (settings.txtCameraAimSize.text == "") settings.txtCameraAimSize.text = "20"; ui.camMain.aimSize = parseInt(settings.txtCameraAimSize.text); - + + // Aim line width if (settings.txtCameraAimLineWidth.text == "") settings.txtCameraAimLineWidth.text = "1.0"; ui.camMain.aimLineWidth = parseInt(settings.txtCameraAimLineWidth.text); + // Aim color ui.camMain.aimColor = parseInt(settings.colCameraAimColor.colorInt); + + // Update camera + ui.camMain.cameraName = settings.txtCameraName.currentText; +} + +function on_cameraName_changed(name) +{ + // Update camera + ui.camMain.cameraName = name; + + // Update resolutions list + var r = settings.txtCameraResolution.currentText; + settings.txtCameraResolution.clear(); + settings.txtCameraResolution.addItems(ui.camMain.availableResolutions); + settings.txtCameraResolution.currentText = r; } function on_pos_changed(pos) @@ -86,6 +119,7 @@ function on_zoom_changed(zoom) settings.txtCameraZoom.text = zoom.toFixed(3); } +main.settingsAboutToLoad.connect(on_settings_aboutToLoad); main.settingsLoaded.connect(on_settings_loaded); main.settingsAboutToSave.connect(on_settings_aboutToSave); main.settingsChanged.connect(on_settings_changed); \ No newline at end of file diff --git a/src/designerplugins/cameraplugin/camerawidget.cpp b/src/designerplugins/cameraplugin/camerawidget.cpp index 8641e237..2068e274 100644 --- a/src/designerplugins/cameraplugin/camerawidget.cpp +++ b/src/designerplugins/cameraplugin/camerawidget.cpp @@ -61,10 +61,10 @@ QStringList CameraWidget::availableCameras() const return l; } -QVariantList CameraWidget::availableResolutions() const +QStringList CameraWidget::availableResolutions() const { - QVariantList l; - foreach (QSize s, m_camera->supportedViewfinderResolutions()) l.append(QVariantList() << s.width() << s.height()); + QStringList l; + foreach (QSize s, m_camera->supportedViewfinderResolutions()) l.append(QString("%1x%2").arg(s.width()).arg(s.height())); return l; } @@ -119,11 +119,7 @@ void CameraWidget::updateSize() m_viewFinder->resize(size.height() * cameraAspect * m_zoom, size.height() * m_zoom); } - QPointF o((double)m_overlay->aimPosition().x() / m_overlay->width() * m_viewFinder->width(), - (double)m_overlay->aimPosition().y() / m_overlay->height() * m_viewFinder->height()); - m_overlay->resize(m_viewFinder->size()); - m_overlay->setAimPosition(o); } void CameraWidget::setResolution(QVariantList resolution) @@ -131,7 +127,6 @@ void CameraWidget::setResolution(QVariantList resolution) qDebug() << "setResolution" << resolution; if (resolution.size() != 2) return; m_resolution = QSize(resolution.at(0).toInt(), resolution.at(1).toInt()); - setCameraName(m_cameraName); } QVariantList CameraWidget::resolution() const @@ -157,16 +152,17 @@ void CameraWidget::setPos(QVariantList pos) { if (pos.size() != 2) return; - m_scrollArea->horizontalScrollBar()->setValue(pos.at(0).toInt()); - m_scrollArea->verticalScrollBar()->setValue(pos.at(1).toInt()); + m_pos = QPoint(pos.at(0).toInt(), pos.at(1).toInt()); + + m_scrollArea->horizontalScrollBar()->setValue(m_pos.x()); + m_scrollArea->verticalScrollBar()->setValue(m_pos.y()); emit posChanged(pos); } QVariantList CameraWidget::pos() const { - return QVariantList() << m_scrollArea->horizontalScrollBar()->value() - << m_scrollArea->verticalScrollBar()->value(); + return QVariantList() << m_pos.x() << m_pos.y(); } void CameraWidget::setAimPos(QVariantList aimPos) @@ -228,6 +224,7 @@ void CameraWidget::mousePressEvent(QMouseEvent *e) { if (e->buttons() == Qt::LeftButton) { m_mousePos = e->pos(); + m_aimPos = m_overlay->aimPosition(); } QWidget::mousePressEvent(e); @@ -238,13 +235,12 @@ void CameraWidget::mouseMoveEvent(QMouseEvent *e) if (e->buttons() == Qt::LeftButton && e->modifiers() == Qt::ShiftModifier) { - QPoint d = e->pos() - m_mousePos; + QPointF d = QPointF((double)(e->pos() - m_mousePos).x() / m_overlay->width(), + (double)(e->pos() - m_mousePos).y() / m_overlay->height()); - QPointF o = m_overlay->aimPosition() + d; + QPointF o = m_aimPos + d; setAimPos(QVariantList() << o.x() << o.y()); - m_mousePos = e->pos(); - } else if (e->buttons() == Qt::LeftButton) { QPoint d = e->pos() - m_mousePos; @@ -294,4 +290,7 @@ void CameraWidget::showEvent(QShowEvent *e) if (m_camera && m_camera->state() == QCamera::LoadedState) { setCameraName(m_cameraName); } + + m_scrollArea->horizontalScrollBar()->setValue(m_pos.x()); + m_scrollArea->verticalScrollBar()->setValue(m_pos.y()); } \ No newline at end of file diff --git a/src/designerplugins/cameraplugin/camerawidget.h b/src/designerplugins/cameraplugin/camerawidget.h index 0561606e..9f0f70bc 100644 --- a/src/designerplugins/cameraplugin/camerawidget.h +++ b/src/designerplugins/cameraplugin/camerawidget.h @@ -12,7 +12,7 @@ class CameraWidget: public QWidget { Q_OBJECT Q_PROPERTY(QStringList availableCameras READ availableCameras); - Q_PROPERTY(QVariantList availableResolutions READ availableResolutions); + Q_PROPERTY(QStringList availableResolutions READ availableResolutions); Q_PROPERTY(QString cameraName READ cameraName WRITE setCameraName); Q_PROPERTY(QVariantList resolution READ resolution WRITE setResolution); Q_PROPERTY(double zoom READ zoom WRITE setZoom); @@ -26,7 +26,7 @@ class CameraWidget: public QWidget CameraWidget(QWidget *parent = 0); QStringList availableCameras() const; - QVariantList availableResolutions() const; + QStringList availableResolutions() const; void setCameraName(QString cameraName); QString cameraName() const; @@ -77,6 +77,9 @@ public slots: double m_zoom; QPoint m_mousePos; + QPointF m_aimPos; + + QPoint m_pos; void setCamera(const QCameraInfo &cameraInfo); void resizeEvent(QResizeEvent *e); diff --git a/src/designerplugins/cameraplugin/overlay.cpp b/src/designerplugins/cameraplugin/overlay.cpp index caabf4c6..a6b05909 100644 --- a/src/designerplugins/cameraplugin/overlay.cpp +++ b/src/designerplugins/cameraplugin/overlay.cpp @@ -62,9 +62,12 @@ void Overlay::paintEvent(QPaintEvent *e) pen.setWidth(m_aimLineWidth); pen.setColor(QColor::fromRgb(m_aimColor)); + double x = m_aimPosition.x() * size().width(); + double y = m_aimPosition.y() * size().height(); + p.setRenderHint(QPainter::Antialiasing, true); p.setPen(pen); - p.drawLine(0, m_aimPosition.y(), width(), m_aimPosition.y()); - p.drawLine(m_aimPosition.x(), 0, m_aimPosition.x(), height()); - p.drawEllipse(m_aimPosition, m_aimSize / 2, m_aimSize / 2); + p.drawLine(0, y, width(), y); + p.drawLine(x, 0, x, height()); + p.drawEllipse(QPoint(x, y), m_aimSize / 2, m_aimSize / 2); } \ No newline at end of file From a40c42f654b5c01a76713da187d9f4aa2e6b02b6 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 2 Jan 2021 22:38:25 +0500 Subject: [PATCH 37/80] Camera plugin update --- src/candleplugins/camera/settings.ui | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/candleplugins/camera/settings.ui b/src/candleplugins/camera/settings.ui index 11d2c649..405319c6 100644 --- a/src/candleplugins/camera/settings.ui +++ b/src/candleplugins/camera/settings.ui @@ -34,10 +34,10 @@ - + - + From 5f9f89bc1e0bd351b4f2deaccca4987241c1c2c9 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 2 Jan 2021 22:42:54 +0500 Subject: [PATCH 38/80] User commands has '\n' separator now. 'Touch', 'Safe position' commands editors updated. --- src/candle/frmmain.cpp | 111 +++++++++++++++++++++++-------------- src/candle/frmmain.h | 5 +- src/candle/frmsettings.cpp | 9 +-- src/candle/frmsettings.ui | 36 +++--------- 4 files changed, 86 insertions(+), 75 deletions(-) diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index c2d19e0d..d305784b 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -50,7 +50,7 @@ frmMain::frmMain(QWidget *parent) : << "Queue" << "Check" << "Door" // TODO: Update "Door" state - << "Jog"; + << "Jog"; // TODO: Add "Sleep" state m_statusCaptions << tr("Unknown") << tr("Idle") << tr("Alarm") @@ -613,9 +613,12 @@ void frmMain::loadSettings() ui->actViewLockPanels->setChecked(set.value("lockPanels").toBool()); // Load custom settings + emit settingsAboutToLoad(); m_settings->loadCustomSettings(set); emit settingsLoaded(); + m_settings->restoreGeometry(set.value("formSettingsGeometry", m_settings->saveGeometry()).toByteArray()); + m_settingsLoading = false; } @@ -898,9 +901,15 @@ void frmMain::openPort() } } -void frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, bool queue) +int frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, bool queue) { - if (!m_serialPort.isOpen() || !m_resetCompleted) return; + // tableIndex: + // 0...n - commands from g-code program + // -1 - ui commands + // -2 - utility commands + // -3 - utility commands + + if (!m_serialPort.isOpen() || !m_resetCompleted) return 0; // Commands queue if (queue || (bufferLength() + command.length() + 1) > BUFFERLENGTH) { @@ -912,12 +921,14 @@ void frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, b cq.queue = queue; m_queue.append(cq); - return; + return 0; } // Evaluate scripts in command if (tableIndex < 0) command = evaluateCommand(command); + if (command.isEmpty()) return 1; + command = command.toUpper(); CommandAttributes ca; @@ -934,9 +945,11 @@ void frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, b m_commands.append(ca); + QString uncomment = GcodePreprocessorUtils::removeComment(command); + // Processing spindle speed only from g-code program QRegExp s("[Ss]0*(\\d+)"); - if (s.indexIn(command) != -1 && ca.tableIndex > -2) { + if (s.indexIn(uncomment) != -1 && ca.tableIndex > -2) { int speed = s.cap(1).toInt(); if (ui->slbSpindle->value() != speed) { ui->slbSpindle->setValue(speed); @@ -944,17 +957,30 @@ void frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, b } // Set M2 & M30 commands sent flag - if (command.contains(QRegExp("M0*2|M30"))) { + static QRegExp M230("M0*2|M30"); + if (uncomment.contains(M230)) { m_fileEndSent = true; } // Queue offsets request on G92 command - if (ca.tableIndex == -1 && command.contains("G92")) { + if (ca.tableIndex == -1 && uncomment.contains("G92")) { m_storedCS = m_storedVars.CS(); sendCommand("$#", -3, showInConsole, true); } m_serialPort.write((command + "\r").toLatin1()); + + return 0; +} + +void frmMain::sendCommands(QString commands, int tableIndex) +{ + QStringList list = commands.split("\n"); + + bool q = false; + foreach (QString cmd, list) { + if (!cmd.isEmpty()) if (sendCommand(cmd.trimmed(), tableIndex, m_settings->showUICommands(), q) == 0) q = true; + } } void frmMain::grblReset() @@ -1256,9 +1282,12 @@ void frmMain::onSerialPortReadyRead() ui->glwVisualizer->setSpeedState((QString(tr("F/S: %1 / %2")).arg(fs.cap(1)).arg(fs.cap(2)))); } + // Emit status signal + emit statusReceived(data); + + // Command response } else if (data.length() > 0) { - // Processed commands if (m_commands.length() > 0 && !dataIsFloating(data) && !(m_commands[0].command != "[CTRL+X]" && dataIsReset(data))) { @@ -1274,8 +1303,10 @@ void frmMain::onSerialPortReadyRead() QTextBlock tb = ui->txtConsole->document()->findBlockByNumber(ca.consoleIndex); QTextCursor tc(tb); + QString uncomment = GcodePreprocessorUtils::removeComment(ca.command).toUpper(); + // Store current coordinate system - if (ca.command.toUpper() == "$G") { + if (uncomment == "$G") { static QRegExp g("G5[4-9]"); if (g.indexIn(response) != -1) { m_storedVars.setCS(g.cap(0)); @@ -1283,18 +1314,18 @@ void frmMain::onSerialPortReadyRead() } // Restore absolute/relative coordinate system after jog - if (ca.command.toUpper() == "$G" && ca.tableIndex == -2) { + if (uncomment == "$G" && ca.tableIndex == -2) { if (ui->chkKeyboardControl->isChecked()) m_absoluteCoordinates = response.contains("G90"); else if (response.contains("G90")) sendCommand("G90", -1, m_settings->showUICommands()); } // Jog - if (ca.command.toUpper().contains("$J=") && ca.tableIndex == -2) { + if (uncomment.contains("$J=") && ca.tableIndex == -2) { jogStep(); } // Process parser status - if (ca.command.toUpper() == "$G" && ca.tableIndex == -3) { + if (uncomment == "$G" && ca.tableIndex == -3) { // Update status in visualizer window ui->glwVisualizer->setParserStatus(response.left(response.indexOf("; "))); @@ -1312,7 +1343,7 @@ void frmMain::onSerialPortReadyRead() } // Offsets - if (ca.command == "$#") { + if (uncomment == "$#") { storeOffsetsVars(response); // Save G92 offsets @@ -1326,7 +1357,7 @@ void frmMain::onSerialPortReadyRead() } // Settings response - if (ca.command == "$$" && ca.tableIndex == -2) { + if (uncomment == "$$" && ca.tableIndex == -2) { static QRegExp gs("\\$(\\d+)\\=([^;]+)\\; "); QMap set; int p = 0; @@ -1342,10 +1373,10 @@ void frmMain::onSerialPortReadyRead() } // Homing response - if ((ca.command.toUpper() == "$H" || ca.command.toUpper() == "$T") && m_homing) m_homing = false; + if ((uncomment == "$H" || uncomment == "$T") && m_homing) m_homing = false; // Reset complete response - if (ca.command == "[CTRL+X]") { + if (uncomment == "[CTRL+X]") { m_resetCompleted = true; m_updateParserStatus = true; @@ -1354,13 +1385,14 @@ void frmMain::onSerialPortReadyRead() } // Clear command buffer on "M2" & "M30" command (old firmwares) - if ((ca.command.contains("M2") || ca.command.contains("M30")) && response.contains("ok") && !response.contains("[Pgm End]")) { + static QRegExp M230("M0*2|M30"); + if (uncomment.contains(M230) && response.contains("ok") && !response.contains("Pgm End")) { m_commands.clear(); m_queue.clear(); } // Update probe coords on user commands - if (ca.command.contains("G38.2") && ca.tableIndex < 0) { + if (uncomment.contains("G38.2") && ca.tableIndex < 0) { static QRegExp PRB(".*PRB:([^,]*),([^,]*),([^]^:]*)"); if (PRB.indexIn(response) != -1) { m_storedVars.setCoords("PRB", QVector3D( @@ -1372,7 +1404,7 @@ void frmMain::onSerialPortReadyRead() } // Process probing on heightmap mode only from table commands - if (ca.command.contains("G38.2") && m_heightMapMode && ca.tableIndex > -1) { + if (uncomment.contains("G38.2") && m_heightMapMode && ca.tableIndex > -1) { // Get probe Z coordinate // "[PRB:0.000,0.000,0.000:0];ok" QRegExp rx(".*PRB:([^,]*),([^,]*),([^]^:]*)"); @@ -1404,7 +1436,7 @@ void frmMain::onSerialPortReadyRead() } // Change state query time on check mode on - if (ca.command.contains(QRegExp("$[cC]"))) { + if (uncomment.contains(QRegExp("$[cC]"))) { m_timerStateQuery.setInterval(response.contains("Enable") ? 1000 : m_settings->queryStateTime()); } @@ -1431,16 +1463,14 @@ void frmMain::onSerialPortReadyRead() ui->txtConsole->verticalScrollBar()->maximum()); } - // Emit response signal - emit responseReceived(ca.command, ca.tableIndex, response); - // Check queue if (m_queue.length() > 0) { CommandQueue cq = m_queue.takeFirst(); while ((bufferLength() + cq.command.length() + 1) <= BUFFERLENGTH) { - if (!cq.command.isEmpty()) sendCommand(cq.command, cq.tableIndex, cq.showInConsole); - if (!cq.command.isEmpty() && (m_queue.isEmpty() || cq.queue)) break; + int r = 0; + if (!cq.command.isEmpty()) r = sendCommand(cq.command, cq.tableIndex, cq.showInConsole); + if (!r && !cq.command.isEmpty() && (m_queue.isEmpty() || cq.queue)) break; else cq = m_queue.takeFirst(); } } @@ -1495,13 +1525,14 @@ void frmMain::onSerialPortReadyRead() // Check transfer complete (last row always blank, last command row = rowcount - 2) if (m_fileProcessedCommandIndex == m_currentModel->rowCount() - 2 - || ca.command.contains(QRegExp("M0*2|M30"))) m_transferCompleted = true; + || uncomment.contains(QRegExp("M0*2|M30"))) + m_transferCompleted = true; // Send next program commands else if (!m_fileEndSent && (m_fileCommandIndex < m_currentModel->rowCount()) && !holding) sendNextFileCommands(); } // Scroll to first line on "M30" command - if (ca.command.contains("M30")) ui->tblProgram->setCurrentIndex(m_currentModel->index(0, 1)); + if (uncomment.contains("M30")) ui->tblProgram->setCurrentIndex(m_currentModel->index(0, 1)); // Toolpath shadowing on check mode if (m_statusCaptions.indexOf(ui->txtStatus->text()) == CHECK) { @@ -1538,6 +1569,9 @@ void frmMain::onSerialPortReadyRead() } } + // Emit response signal + emit responseReceived(ca.command, ca.tableIndex, response); + response.clear(); } else { response.append(data + "; "); @@ -2221,10 +2255,12 @@ void frmMain::sendNextFileCommands() { if (m_queue.length() > 0) return; QString command = m_currentModel->data(m_currentModel->index(m_fileCommandIndex, 1)).toString(); + static QRegExp M230("M0*2|M30"); while ((bufferLength() + command.length() + 1) <= BUFFERLENGTH && m_fileCommandIndex < m_currentModel->rowCount() - 1 - && !(!m_commands.isEmpty() && m_commands.last().command.contains(QRegExp("M0*2|M30")))) { + && !(!m_commands.isEmpty() + && GcodePreprocessorUtils::removeComment(m_commands.last().command).contains(M230))) { m_currentModel->setData(m_currentModel->index(m_fileCommandIndex, 2), GCodeItem::Sent); sendCommand(command, m_fileCommandIndex, m_settings->showProgramCommands()); m_fileCommandIndex++; @@ -2593,11 +2629,7 @@ void frmMain::on_cmdHome_clicked() void frmMain::on_cmdTouch_clicked() { - QStringList list = m_settings->touchCommand().split(";"); - - foreach (QString cmd, list) { - sendCommand(cmd.trimmed(), -1, m_settings->showUICommands(), list.indexOf(cmd)); - } + sendCommands(m_settings->touchCommand()); } void frmMain::on_cmdZeroXY_clicked() @@ -2654,11 +2686,7 @@ void frmMain::on_cmdUnlock_clicked() void frmMain::on_cmdSafePosition_clicked() { - QStringList list = m_settings->safePositionCommand().split(";"); - - foreach (QString cmd, list) { - sendCommand(cmd.trimmed(), -1, m_settings->showUICommands(), list.indexOf(cmd)); - } + sendCommands(m_settings->safePositionCommand()); } void frmMain::on_cmdSpindle_toggled(bool checked) @@ -3910,11 +3938,7 @@ void frmMain::onCmdUserClicked(bool checked) { int i = sender()->objectName().right(1).toInt(); - QStringList list = m_settings->userCommands(i).remove("\n").split(QRegExp(";(?![^\\{]+\\})")); - - foreach (QString cmd, list) { - if (!cmd.isEmpty()) sendCommand(cmd.trimmed(), -1, m_settings->showUICommands(), list.indexOf(cmd)); - } + sendCommands(m_settings->userCommands(i)); } void frmMain::onOverridingToggled(bool checked) @@ -3979,6 +4003,7 @@ void frmMain::jogStep() QString frmMain::evaluateCommand(QString command) { // Evaluate script + // TODO: Change brackets static QRegExp sx("\\{([^\\}]+)\\}"); QScriptValue v; QString vs; diff --git a/src/candle/frmmain.h b/src/candle/frmmain.h index bf4c010f..c97e3d8c 100644 --- a/src/candle/frmmain.h +++ b/src/candle/frmmain.h @@ -89,7 +89,8 @@ class frmMain : public QMainWindow explicit frmMain(QWidget *parent = 0); ~frmMain(); - Q_INVOKABLE void sendCommand(QString command, int tableIndex = -1, bool showInConsole = true, bool queue = false); + Q_INVOKABLE int sendCommand(QString command, int tableIndex = -1, bool showInConsole = true, bool queue = false); + Q_INVOKABLE void sendCommands(QString commands, int tableIndex = -1); Q_INVOKABLE void applySettings(); double toolZPosition(); @@ -97,6 +98,8 @@ class frmMain : public QMainWindow signals: void responseReceived(QString command, int tableIndex, QString response); + void statusReceived(QString status); + void settingsAboutToLoad(); void settingsLoaded(); void settingsAboutToSave(); void settingsChanged(); diff --git a/src/candle/frmsettings.cpp b/src/candle/frmsettings.cpp index f5de5ecc..7a5763b5 100644 --- a/src/candle/frmsettings.cpp +++ b/src/candle/frmsettings.cpp @@ -11,6 +11,7 @@ #include #include #include +#include class CustomKeySequenceEdit : public QKeySequenceEdit { @@ -377,12 +378,12 @@ void frmSettings::setShowUICommands(bool showUICommands) QString frmSettings::safePositionCommand() { - return ui->txtSafeCommand->text(); + return ui->txtSafeCommand->toPlainText(); } void frmSettings::setSafePositionCommand(QString command) { - ui->txtSafeCommand->setText(command); + ui->txtSafeCommand->setPlainText(command); } bool frmSettings::moveOnRestore() @@ -557,12 +558,12 @@ void frmSettings::setUnits(int units) QString frmSettings::touchCommand() { - return ui->txtTouchCommand->text(); + return ui->txtTouchCommand->toPlainText(); } void frmSettings::setTouchCommand(QString touchCommand) { - ui->txtTouchCommand->setText(touchCommand); + ui->txtTouchCommand->setPlainText(touchCommand); } bool frmSettings::simplify() diff --git a/src/candle/frmsettings.ui b/src/candle/frmsettings.ui index 66f90af9..142e1966 100644 --- a/src/candle/frmsettings.ui +++ b/src/candle/frmsettings.ui @@ -84,9 +84,9 @@ QSplitter::handle:horizontal { 0 - 0 - 619 - 2776 + -1308 + 620 + 3110 @@ -404,12 +404,9 @@ QSplitter::handle:horizontal { - - - Qt::AlignCenter - - - Command 1; command 2; ... + + + @@ -427,12 +424,9 @@ QSplitter::handle:horizontal { - - - Qt::AlignCenter - - - Command 1; command 2; ... + + + @@ -517,9 +511,6 @@ QSplitter::handle:horizontal { - - Command 1; command 2; ... - @@ -540,9 +531,6 @@ QSplitter::handle:horizontal { - - Command 1; command 2; ... - @@ -563,9 +551,6 @@ QSplitter::handle:horizontal { - - Command 1; command 2; ... - @@ -586,9 +571,6 @@ QSplitter::handle:horizontal { - - Command 1; command 2; ... - From ab00a85637c3ec0a6733bf330c941bc1b4660b27 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sun, 3 Jan 2021 10:33:23 +0500 Subject: [PATCH 39/80] Plugins can use spinboxes. Camera plugin update. --- src/candle/frmsettings.cpp | 14 ++++++++++++ src/candleplugins/camera/script.js | 6 ++---- src/candleplugins/camera/settings.ui | 32 +++++++++++++++++++++------- 3 files changed, 40 insertions(+), 12 deletions(-) diff --git a/src/candle/frmsettings.cpp b/src/candle/frmsettings.cpp index 7a5763b5..ff30e6bd 100644 --- a/src/candle/frmsettings.cpp +++ b/src/candle/frmsettings.cpp @@ -184,6 +184,14 @@ void frmSettings::saveCustomSettings(QSettings &set) foreach (QPlainTextEdit* o, w->findChildren()) set.setValue(o->objectName(), o->toPlainText()); + foreach (QSpinBox* o, w->findChildren()) { + set.setValue(o->objectName(), o->value()); + } + + foreach (QDoubleSpinBox* o, w->findChildren()) { + set.setValue(o->objectName(), o->value()); + } + set.endGroup(); } @@ -219,6 +227,12 @@ void frmSettings::loadCustomSettings(QSettings &set) foreach (QPlainTextEdit* o, w->findChildren()) o->setPlainText(set.value(o->objectName()).toString()); + foreach (QSpinBox* o, w->findChildren()) + o->setValue(set.value(o->objectName()).toInt()); + + foreach (QDoubleSpinBox* o, w->findChildren()) + o->setValue(set.value(o->objectName()).toDouble()); + set.endGroup(); } diff --git a/src/candleplugins/camera/script.js b/src/candleplugins/camera/script.js index 0b80f0e4..e1de5220 100644 --- a/src/candleplugins/camera/script.js +++ b/src/candleplugins/camera/script.js @@ -62,12 +62,10 @@ function updateSettings() ui.camMain.aimPos = [parseFloat(l[0]), parseFloat(l[1])]; // Aim size - if (settings.txtCameraAimSize.text == "") settings.txtCameraAimSize.text = "20"; - ui.camMain.aimSize = parseInt(settings.txtCameraAimSize.text); + ui.camMain.aimSize = parseInt(settings.txtCameraAimSize.value); // Aim line width - if (settings.txtCameraAimLineWidth.text == "") settings.txtCameraAimLineWidth.text = "1.0"; - ui.camMain.aimLineWidth = parseInt(settings.txtCameraAimLineWidth.text); + ui.camMain.aimLineWidth = parseInt(settings.txtCameraAimLineWidth.value); // Aim color ui.camMain.aimColor = parseInt(settings.colCameraAimColor.colorInt); diff --git a/src/candleplugins/camera/settings.ui b/src/candleplugins/camera/settings.ui index 405319c6..47552c82 100644 --- a/src/candleplugins/camera/settings.ui +++ b/src/candleplugins/camera/settings.ui @@ -34,10 +34,10 @@ - + - + @@ -99,9 +99,6 @@ - - - @@ -116,12 +113,26 @@ - - - + + + + 1 + + + 100 + + + + + + + 1 + + + @@ -131,6 +142,11 @@
colorpicker.h
1 + + ComboBox + QWidget +
combobox.h
+
From 57c141ae4872ca3e10eb4348ea94d922d76f7e7b Mon Sep 17 00:00:00 2001 From: Denvi Date: Sun, 3 Jan 2021 14:26:20 +0500 Subject: [PATCH 40/80] Control buttons count reduced to 4. Removed: "Z-probe", "Zero XY", "Zero Z", "Restore origin", "Safe position". Added: "Check". --- src/candle/drawers/gcodedrawer.cpp | 6 +- src/candle/drawers/heightmapgriddrawer.cpp | 2 +- src/candle/frmmain.cpp | 162 +---- src/candle/frmmain.h | 8 +- src/candle/frmmain.ui | 339 +++------- src/candle/frmsettings.cpp | 55 -- src/candle/frmsettings.h | 15 - src/candle/frmsettings.ui | 744 ++++++++------------- src/candle/images.qrc | 84 ++- src/candle/images/check.png | Bin 0 -> 882 bytes src/candle/images/check1.png | Bin 0 -> 975 bytes src/candle/images/unlock1.png | Bin 0 -> 755 bytes src/candle/widgets/comboboxkey.cpp | 1 + 13 files changed, 452 insertions(+), 964 deletions(-) create mode 100644 src/candle/images/check.png create mode 100644 src/candle/images/check1.png create mode 100644 src/candle/images/unlock1.png diff --git a/src/candle/drawers/gcodedrawer.cpp b/src/candle/drawers/gcodedrawer.cpp index 67343370..676c0975 100644 --- a/src/candle/drawers/gcodedrawer.cpp +++ b/src/candle/drawers/gcodedrawer.cpp @@ -38,6 +38,8 @@ bool GcodeDrawer::updateData() if (m_indexes.isEmpty()) return prepareVectors(); else return updateVectors(); case GcodeDrawer::Raster: if (m_indexes.isEmpty()) return prepareRaster(); else return updateRaster(); + default: + return true; } } @@ -303,9 +305,9 @@ QColor GcodeDrawer::getSegmentColor(LineSegment *segment) else if (segment->isFastTraverse()) return m_colorNormal;// QVector3D(0.0, 0.0, 0.0); else if (segment->isZMovement()) return m_colorZMovement;//QVector3D(1.0, 0.0, 0.0); else if (m_grayscaleSegments) switch (m_grayscaleCode) { - case GrayscaleCode::S: + case GcodeDrawer::S: return QColor::fromHsl(0, 0, qBound(0, 255 - 255.0 / (m_grayscaleMax - m_grayscaleMin) * segment->getSpindleSpeed(), 255)); - case GrayscaleCode::Z: + case GcodeDrawer::Z: return QColor::fromHsl(0, 0, qBound(0, 255 - 255.0 / (m_grayscaleMax - m_grayscaleMin) * segment->getStart().z(), 255)); } return m_colorNormal;//QVector3D(0.0, 0.0, 0.0); diff --git a/src/candle/drawers/heightmapgriddrawer.cpp b/src/candle/drawers/heightmapgriddrawer.cpp index c4fe6f6c..f73c9146 100644 --- a/src/candle/drawers/heightmapgriddrawer.cpp +++ b/src/candle/drawers/heightmapgriddrawer.cpp @@ -30,7 +30,7 @@ bool HeightMapGridDrawer::updateData() for (int i = 0; i < gridPointsY; i++) { for (int j = 0; j < gridPointsX; j++) { if (m_model == NULL || qIsNaN(m_model->data(m_model->index(i, j), Qt::UserRole).toDouble())) { - vertex.color = QVector3D(1.0, 0.6, 0.0); + vertex.color = QVector3D(1.0f, 0.6f, 0.0f); vertex.position = QVector3D(m_borderRect.x() + gridStepX * j, m_borderRect.y() + gridStepY * i, m_zTop); m_lines.append(vertex); vertex.position = QVector3D(m_borderRect.x() + gridStepX * j, m_borderRect.y() + gridStepY * i, m_zBottom); diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index d305784b..bd549430 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -88,10 +88,6 @@ frmMain::frmMain(QWidget *parent) : m_fileChanged = false; m_heightMapChanged = false; - m_storedX = 0; - m_storedY = 0; - m_storedZ = 0; - m_homing = false; m_updateSpindleSpeed = false; m_updateParserStatus = false; @@ -431,8 +427,6 @@ void frmMain::loadSettings() m_settings->setGrayscaleSegments(set.value("grayscaleSegments", false).toBool()); m_settings->setGrayscaleSCode(set.value("grayscaleSCode", true).toBool()); m_settings->setDrawModeVectors(set.value("drawModeVectors", true).toBool()); - m_settings->setMoveOnRestore(set.value("moveOnRestore", false).toBool()); - m_settings->setRestoreMode(set.value("restoreMode", 0).toInt()); m_settings->setLineWidth(set.value("lineWidth", 1).toDouble()); m_settings->setArcLength(set.value("arcLength", 0).toDouble()); m_settings->setArcDegree(set.value("arcDegree", 0).toDouble()); @@ -444,7 +438,6 @@ void frmMain::loadSettings() m_settings->setLaserPowerMin(set.value("laserPowerMin", 0).toInt()); m_settings->setLaserPowerMax(set.value("laserPowerMax", 100).toInt()); m_settings->setRapidSpeed(set.value("rapidSpeed", 0).toInt()); - m_settings->setHeightmapProbingFeed(set.value("heightmapProbingFeed", 0).toInt()); m_settings->setAcceleration(set.value("acceleration", 10).toInt()); m_settings->setToolAngle(set.value("toolAngle", 0).toDouble()); m_settings->setToolType(set.value("toolType", 0).toInt()); @@ -468,12 +461,6 @@ void frmMain::loadSettings() ui->slbSpindleOverride->setValue(set.value("spindleOverrideValue", 100).toInt()); m_settings->setUnits(set.value("units", 0).toInt()); - m_storedX = set.value("storedX", 0).toDouble(); - m_storedY = set.value("storedY", 0).toDouble(); - m_storedZ = set.value("storedZ", 0).toDouble(); - m_storedCS = set.value("storedCS", "G54").toString(); - - ui->cmdRestoreOrigin->setToolTip(QString(tr("Restore origin:\n%1, %2, %3")).arg(m_storedX).arg(m_storedY).arg(m_storedZ)); m_recentFiles = set.value("recentFiles", QStringList()).toStringList(); m_recentHeightmaps = set.value("recentHeightmaps", QStringList()).toStringList(); @@ -488,15 +475,17 @@ void frmMain::loadSettings() m_storedKeyboardControl = set.value("keyboardControl", false).toBool(); m_settings->setAutoCompletion(set.value("autoCompletion", true).toBool()); - m_settings->setTouchCommand(set.value("touchCommand").toString()); - m_settings->setSafePositionCommand(set.value("safePositionCommand").toString()); foreach (StyledToolButton* button, this->findChildren(QRegExp("cmdUser\\d"))) { int i = button->objectName().right(1).toInt(); m_settings->setUserCommands(i, set.value(QString("userCommands%1").arg(i)).toString()); } - ui->cboJogStep->setItems(set.value("jogSteps").toStringList()); + QStringList steps = set.value("jogSteps").toStringList(); + if (steps.count() > 0) { + steps.insert(0, ui->cboJogStep->items().first()); + ui->cboJogStep->setItems(steps); + } ui->cboJogStep->setCurrentIndex(ui->cboJogStep->findText(set.value("jogStep").toString())); ui->cboJogFeed->setItems(set.value("jogFeeds").toStringList()); ui->cboJogFeed->setCurrentIndex(ui->cboJogFeed->findText(set.value("jogFeed").toString())); @@ -511,6 +500,7 @@ void frmMain::loadSettings() ui->txtHeightMapGridY->setValue(set.value("heightmapGridY", 1).toDouble()); ui->txtHeightMapGridZTop->setValue(set.value("heightmapGridZTop", 1).toDouble()); ui->txtHeightMapGridZBottom->setValue(set.value("heightmapGridZBottom", -1).toDouble()); + ui->txtHeightMapProbeFeed->setValue(set.value("heightmapProbeFeed", 10).toDouble()); ui->chkHeightMapGridShow->setChecked(set.value("heightmapGridShow", false).toBool()); ui->txtHeightMapInterpolationStepX->setValue(set.value("heightmapInterpolationStepX", 1).toDouble()); @@ -654,10 +644,7 @@ void frmMain::saveSettings() set.setValue("spindleSpeedMax", m_settings->spindleSpeedMax()); set.setValue("laserPowerMin", m_settings->laserPowerMin()); set.setValue("laserPowerMax", m_settings->laserPowerMax()); - set.setValue("moveOnRestore", m_settings->moveOnRestore()); - set.setValue("restoreMode", m_settings->restoreMode()); set.setValue("rapidSpeed", m_settings->rapidSpeed()); - set.setValue("heightmapProbingFeed", m_settings->heightmapProbingFeed()); set.setValue("acceleration", m_settings->acceleration()); set.setValue("toolAngle", m_settings->toolAngle()); set.setValue("toolType", m_settings->toolType()); @@ -671,15 +658,9 @@ void frmMain::saveSettings() set.setValue("autoCompletion", m_settings->autoCompletion()); set.setValue("units", m_settings->units()); - set.setValue("storedX", m_storedX); - set.setValue("storedY", m_storedY); - set.setValue("storedZ", m_storedZ); - set.setValue("storedCS", m_storedCS); set.setValue("recentFiles", m_recentFiles); set.setValue("recentHeightmaps", m_recentHeightmaps); set.setValue("lastFolder", m_lastFolder); - set.setValue("touchCommand", m_settings->touchCommand()); - set.setValue("safePositionCommand", m_settings->safePositionCommand()); set.setValue("fontSize", m_settings->fontSize()); set.setValue("feedOverride", ui->slbFeedOverride->isChecked()); @@ -694,7 +675,7 @@ void frmMain::saveSettings() set.setValue(QString("userCommands%1").arg(i), m_settings->userCommands(i)); } - set.setValue("jogSteps", ui->cboJogStep->items()); + set.setValue("jogSteps", (QStringList)ui->cboJogStep->items().mid(1, ui->cboJogStep->items().count() - 1)); set.setValue("jogStep", ui->cboJogStep->currentText()); set.setValue("jogFeeds", ui->cboJogFeed->items()); set.setValue("jogFeed", ui->cboJogFeed->currentText()); @@ -709,6 +690,7 @@ void frmMain::saveSettings() set.setValue("heightmapGridY", ui->txtHeightMapGridY->value()); set.setValue("heightmapGridZTop", ui->txtHeightMapGridZTop->value()); set.setValue("heightmapGridZBottom", ui->txtHeightMapGridZBottom->value()); + set.setValue("heightmapProbeFeed", ui->txtHeightMapProbeFeed->value()); set.setValue("heightmapGridShow", ui->chkHeightMapGridShow->isChecked()); set.setValue("heightmapInterpolationStepX", ui->txtHeightMapInterpolationStepX->value()); @@ -804,13 +786,9 @@ void frmMain::updateControlsState() { ui->cboCommand->setEnabled(portOpened && (!ui->chkKeyboardControl->isChecked())); ui->cmdCommandSend->setEnabled(portOpened); - ui->chkTestMode->setEnabled(portOpened && !m_processingFile); + ui->cmdCheck->setEnabled(portOpened && !m_processingFile); ui->cmdHome->setEnabled(!m_processingFile); - ui->cmdTouch->setEnabled(!m_processingFile); - ui->cmdZeroXY->setEnabled(!m_processingFile); - ui->cmdZeroZ->setEnabled(!m_processingFile); - ui->cmdRestoreOrigin->setEnabled(!m_processingFile); - ui->cmdSafePosition->setEnabled(!m_processingFile); + ui->cmdCheck->setEnabled(!m_processingFile); ui->cmdUnlock->setEnabled(!m_processingFile); ui->cmdSpindle->setEnabled(!m_processingFile); @@ -819,7 +797,7 @@ void frmMain::updateControlsState() { ui->cmdFileOpen->setEnabled(!m_processingFile); ui->cmdFileReset->setEnabled(!m_processingFile && m_programModel.rowCount() > 1); ui->cmdFileSend->setEnabled(portOpened && !m_processingFile && m_programModel.rowCount() > 1); - ui->cmdFilePause->setEnabled(m_processingFile && !ui->chkTestMode->isChecked()); + ui->cmdFilePause->setEnabled(m_processingFile && !ui->cmdCheck->isChecked()); ui->cmdFileAbort->setEnabled(m_processingFile); ui->actFileOpen->setEnabled(!m_processingFile); ui->mnuRecent->setEnabled(!m_processingFile && ((m_recentFiles.count() > 0 && !m_heightMapMode) @@ -873,8 +851,6 @@ void frmMain::updateControlsState() { ui->cboJogStep->setStyleSheet(QString("font-size: %1").arg(m_settings->fontSize())); ui->cboJogFeed->setStyleSheet(ui->cboJogStep->styleSheet()); - ui->chkTestMode->setVisible(!m_heightMapMode); - ui->tblHeightMap->setVisible(m_heightMapMode); ui->tblProgram->setVisible(!m_heightMapMode); @@ -963,8 +939,8 @@ int frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, bo } // Queue offsets request on G92 command + // TODO: G54-59 if (ca.tableIndex == -1 && uncomment.contains("G92")) { - m_storedCS = m_storedVars.CS(); sendCommand("$#", -3, showInConsole, true); } @@ -1075,12 +1051,8 @@ void frmMain::onSerialPortReadyRead() } // Update controls - ui->cmdRestoreOrigin->setEnabled(status == IDLE); - ui->cmdSafePosition->setEnabled(status == IDLE); - ui->cmdZeroXY->setEnabled(status == IDLE); - ui->cmdZeroZ->setEnabled(status == IDLE); - ui->chkTestMode->setEnabled(status != RUN && !m_processingFile); - ui->chkTestMode->setChecked(status == CHECK); + ui->cmdCheck->setEnabled(status != RUN && !m_processingFile); + ui->cmdCheck->setChecked(status == CHECK); ui->cmdFilePause->setChecked(status == HOLD0 || status == HOLD1 || status == QUEUE); ui->cmdSpindle->setEnabled(!m_processingFile || status == HOLD0); #ifdef WINDOWS @@ -1227,8 +1199,8 @@ void frmMain::onSerialPortReadyRead() static QRegExp ov("Ov:([^,]*),([^,]*),([^,^>^|]*)"); if (ov.indexIn(data) != -1) { - updateOverride(ui->slbFeedOverride, ov.cap(1).toInt(), 0x91); - updateOverride(ui->slbSpindleOverride, ov.cap(3).toInt(), 0x9a); + updateOverride(ui->slbFeedOverride, ov.cap(1).toInt(), '\x91'); + updateOverride(ui->slbSpindleOverride, ov.cap(3).toInt(), '\x9a'); int rapid = ov.cap(2).toInt(); ui->slbRapidOverride->setCurrentValue(rapid); @@ -1343,18 +1315,7 @@ void frmMain::onSerialPortReadyRead() } // Offsets - if (uncomment == "$#") { - storeOffsetsVars(response); - - // Save G92 offsets - if (ca.tableIndex == -3) { - QVector3D v = m_storedVars.coords("G92"); - m_storedX = v.x(); - m_storedY = v.y(); - m_storedZ = v.z(); - ui->cmdRestoreOrigin->setToolTip(QString(tr("Restore origin:\n%1, %2, %3")).arg(m_storedX).arg(m_storedY).arg(m_storedZ)); - } - } + if (uncomment == "$#") storeOffsetsVars(response); // Settings response if (uncomment == "$$" && ca.tableIndex == -2) { @@ -1791,11 +1752,6 @@ void frmMain::dropEvent(QDropEvent *de) } } -void frmMain::mousePressEvent(QMouseEvent *e) -{ - // qDebug() << childAt(e->pos()); -} - QMenu *frmMain::createPopupMenu() { QMenu *menu = QMainWindow::createPopupMenu(); @@ -2039,7 +1995,7 @@ void frmMain::on_cmdFileSend_clicked() m_storedKeyboardControl = ui->chkKeyboardControl->isChecked(); ui->chkKeyboardControl->setChecked(false); - if (!ui->chkTestMode->isChecked()) storeOffsets(); // Allready stored on check + if (!ui->cmdCheck->isChecked()) storeOffsets(); // Allready stored on check storeParserState(); #ifdef WINDOWS @@ -2147,7 +2103,7 @@ void frmMain::onActSendFromLineTriggered() m_storedKeyboardControl = ui->chkKeyboardControl->isChecked(); ui->chkKeyboardControl->setChecked(false); - if (!ui->chkTestMode->isChecked()) storeOffsets(); // Allready stored on check + if (!ui->cmdCheck->isChecked()) storeOffsets(); // Allready stored on check storeParserState(); #ifdef WINDOWS @@ -2181,13 +2137,14 @@ void frmMain::onSlbSpindleValueChanged() void frmMain::onDockTopLevelChanged(bool topLevel) { + Q_UNUSED(topLevel) static_cast(sender())->setStyleSheet(""); } void frmMain::on_cmdFileAbort_clicked() { m_aborting = true; - if (!ui->chkTestMode->isChecked()) { + if (!ui->cmdCheck->isChecked()) { m_serialPort.write("!"); } else { grblReset(); @@ -2627,50 +2584,16 @@ void frmMain::on_cmdHome_clicked() sendCommand("$H", -1, m_settings->showUICommands()); } -void frmMain::on_cmdTouch_clicked() -{ - sendCommands(m_settings->touchCommand()); -} - -void frmMain::on_cmdZeroXY_clicked() +void frmMain::on_cmdCheck_clicked(bool checked) { - sendCommand("G92X0Y0", -1, m_settings->showUICommands()); -} - -void frmMain::on_cmdZeroZ_clicked() -{ - sendCommand("G92Z0", -1, m_settings->showUICommands()); -} - -void frmMain::on_cmdRestoreOrigin_clicked() -{ - // Restore offset - sendCommand(QString("%4G53G90G0X%1Y%2Z%3").arg(ui->txtMPosX->value()) - .arg(ui->txtMPosY->value()) - .arg(ui->txtMPosZ->value()) - .arg(m_settings->units() ? "G20" : "G21"), - -2, m_settings->showUICommands()); - - m_storedVars.setCS(m_storedCS); - sendCommand("$#", -2, m_settings->showUICommands()); - sendCommand("{vars.CS}", -2, m_settings->showUICommands(), true); - sendCommand(QString("%4G92X{%1 - vars.x}Y{%2 - vars.y}Z{%3 - vars.z}") - .arg(ui->txtMPosX->value() - m_storedX) - .arg(ui->txtMPosY->value() - m_storedY) - .arg(ui->txtMPosZ->value() - m_storedZ) - .arg(m_settings->units() ? "G20" : "G21"), - -2, m_settings->showUICommands(), true); - - // Move tool - if (m_settings->moveOnRestore()) switch (m_settings->restoreMode()) { - case 0: - sendCommand("G0X0Y0", -2, m_settings->showUICommands(), true); - break; - case 1: - - sendCommand("G0X0Y0Z0", -2, m_settings->showUICommands(), true); - break; - } + if (checked) { + storeOffsets(); + storeParserState(); + sendCommand("$C", -1, m_settings->showUICommands()); + } else { + m_aborting = true; + grblReset(); + }; } void frmMain::on_cmdReset_clicked() @@ -2684,11 +2607,6 @@ void frmMain::on_cmdUnlock_clicked() sendCommand("$X", -1, m_settings->showUICommands()); } -void frmMain::on_cmdSafePosition_clicked() -{ - sendCommands(m_settings->safePositionCommand()); -} - void frmMain::on_cmdSpindle_toggled(bool checked) { ui->grpSpindle->setProperty("overrided", checked); @@ -2711,18 +2629,6 @@ void frmMain::on_cmdSpindle_clicked(bool checked) } } -void frmMain::on_chkTestMode_clicked(bool checked) -{ - if (checked) { - storeOffsets(); - storeParserState(); - sendCommand("$C", -1, m_settings->showUICommands()); - } else { - m_aborting = true; - grblReset(); - }; -} - void frmMain::on_cmdFilePause_clicked(bool checked) { m_serialPort.write(checked ? "!" : "~"); @@ -3290,7 +3196,7 @@ bool frmMain::updateHeightMapGrid() m_probeModel.insertRow(0); m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G21G90F%1G0Z%2"). - arg(m_settings->heightmapProbingFeed()).arg(ui->txtHeightMapGridZTop->value())); + arg(ui->txtHeightMapProbeFeed->value()).arg(ui->txtHeightMapGridZTop->value())); m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G0X0Y0")); m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G38.2Z%1") .arg(ui->txtHeightMapGridZBottom->value())); @@ -3775,7 +3681,7 @@ void frmMain::on_chkHeightMapUse_clicked(bool checked) point = list->at(j)->getEnd(); if (!list->at(j)->isAbsolute()) point -= list->at(j)->getStart(); - if (!list->at(j)->isMetric()) point /= 25.4; + if (!list->at(j)->isMetric()) point /= 25.4f; item.command = newCommand + QString("X%1Y%2Z%3") .arg(point.x(), 0, 'f', 3).arg(point.y(), 0, 'f', 3).arg(point.z(), 0, 'f', 3); @@ -3936,6 +3842,8 @@ bool frmMain::compareCoordinates(double x, double y, double z) void frmMain::onCmdUserClicked(bool checked) { + Q_UNUSED(checked) + int i = sender()->objectName().right(1).toInt(); sendCommands(m_settings->userCommands(i)); @@ -3943,6 +3851,8 @@ void frmMain::onCmdUserClicked(bool checked) void frmMain::onOverridingToggled(bool checked) { + Q_UNUSED(checked) + ui->grpOverriding->setProperty("overrided", ui->slbFeedOverride->isChecked() || ui->slbRapidOverride->isChecked() || ui->slbSpindleOverride->isChecked()); style()->unpolish(ui->grpOverriding); diff --git a/src/candle/frmmain.h b/src/candle/frmmain.h index c97e3d8c..280596a0 100644 --- a/src/candle/frmmain.h +++ b/src/candle/frmmain.h @@ -137,15 +137,10 @@ private slots: void on_actFileOpen_triggered(); void on_cmdCommandSend_clicked(); void on_cmdHome_clicked(); - void on_cmdTouch_clicked(); - void on_cmdZeroXY_clicked(); - void on_cmdZeroZ_clicked(); - void on_cmdRestoreOrigin_clicked(); + void on_cmdCheck_clicked(bool checked); void on_cmdReset_clicked(); void on_cmdUnlock_clicked(); - void on_cmdSafePosition_clicked(); void on_cmdSpindle_toggled(bool checked); - void on_chkTestMode_clicked(bool checked); void on_cmdFilePause_clicked(bool checked); void on_cmdFileReset_clicked(); void on_actFileNew_triggered(); @@ -228,7 +223,6 @@ private slots: void closeEvent(QCloseEvent *ce); void dragEnterEvent(QDragEnterEvent *dee); void dropEvent(QDropEvent *de); - void mousePressEvent(QMouseEvent *e); QMenu *createPopupMenu() override; private: diff --git a/src/candle/frmmain.ui b/src/candle/frmmain.ui index d6aaaa43..d6f8ba3c 100644 --- a/src/candle/frmmain.ui +++ b/src/candle/frmmain.ui @@ -282,13 +282,6 @@ QLabel[overrided="false"] { - - - - Check - - - @@ -466,9 +459,9 @@ QLabel[overrided="false"] { 0 - 0 - 257 - 770 + -239 + 275 + 804 @@ -715,10 +708,10 @@ QLabel[overrided="false"] { QAbstractSpinBox::NoButtons - -999.000000000000000 + -9999.000000000000000 - 999.000000000000000 + 9999.000000000000000 @@ -740,10 +733,10 @@ QLabel[overrided="false"] { QAbstractSpinBox::NoButtons - -999.000000000000000 + -9999.000000000000000 - 999.000000000000000 + 9999.000000000000000 10.000000000000000 @@ -775,10 +768,10 @@ QLabel[overrided="false"] { QAbstractSpinBox::NoButtons - -999.000000000000000 + -9999.000000000000000 - 999.000000000000000 + 9999.000000000000000 @@ -814,10 +807,10 @@ QLabel[overrided="false"] { QAbstractSpinBox::NoButtons - -999.000000000000000 + -9999.000000000000000 - 999.000000000000000 + 9999.000000000000000 10.000000000000000 @@ -866,6 +859,13 @@ QLabel[overrided="false"] { + + + + Zt: + + + @@ -904,8 +904,8 @@ QLabel[overrided="false"] { - - + + 0 @@ -928,12 +928,12 @@ QLabel[overrided="false"] { 999.000000000000000 - 1.000000000000000 + -1.000000000000000 - - + + 0 @@ -956,7 +956,21 @@ QLabel[overrided="false"] { 999.000000000000000 - -1.000000000000000 + 1.000000000000000 + + + + + + + Y: + + + + + + + Zb: @@ -991,24 +1005,41 @@ QLabel[overrided="false"] { - - + + - Zb: + F: - - - - Y: + + + + + 0 + 0 + - - - - - - Zt: + + + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 0 + + + 0.000000000000000 + + + 9999.000000000000000 + + + 0.000000000000000 @@ -1253,10 +1284,10 @@ QLabel[overrided="false"] { - 0 - 0 + -26 + -506 347 - 897 + 850 @@ -1595,8 +1626,8 @@ QLabel[overrided="false"] { - - + + 0 @@ -1604,14 +1635,14 @@ QLabel[overrided="false"] { - Reset + Check ... - :/images/restart.png:/images/restart.png + :/images/check1.png:/images/check1.png @@ -1619,35 +1650,9 @@ QLabel[overrided="false"] { 32 - + true - - - - - - - 0 - 0 - - - - Zero XY - - - ... - - - - :/images/axis_zero.png:/images/axis_zero.png - - - - 32 - 32 - - true @@ -1682,37 +1687,8 @@ QLabel[overrided="false"] { - - - - - 0 - 0 - - - - Z-probe - - - ... - - - - :/images/search_for_z.png:/images/search_for_z.png - - - - 32 - 32 - - - - true - - - - - + + 0 @@ -1720,14 +1696,14 @@ QLabel[overrided="false"] { - Safe position + Reset ... - :/images/run.png:/images/run.png + :/images/restart.png:/images/restart.png @@ -1741,67 +1717,6 @@ QLabel[overrided="false"] { - - - - 0 - 0 - - - - Zero Z - - - ... - - - - :/images/zero_z.png:/images/zero_z.png - - - - 32 - 32 - - - - true - - - - - - - false - - - - 0 - 0 - - - - Restore origin - - - ... - - - - :/images/origin.png:/images/origin.png - - - - 32 - 32 - - - - true - - - - true @@ -1820,7 +1735,7 @@ QLabel[overrided="false"] { - :/images/unlock.png:/images/unlock.png + :/images/unlock1.png:/images/unlock1.png @@ -2872,7 +2787,7 @@ padding-right: 8; 0 0 - 320 + 347 106 @@ -3336,13 +3251,7 @@ padding-right: 8; chkHeightMapInterpolationShow txtStatus cmdHome - cmdTouch - cmdZeroXY - cmdZeroZ - cmdRestoreOrigin - cmdSafePosition - cmdReset - cmdUnlock + cmdCheck chkHeightMapUse cmdHeightMapCreate cmdHeightMapLoad @@ -3534,7 +3443,7 @@ padding-right: 8; actControlTouch triggered() - cmdTouch + cmdCheck click() @@ -3547,70 +3456,6 @@ padding-right: 8; - - actControlZeroXY - triggered() - cmdZeroXY - click() - - - -1 - -1 - - - 243 - 660 - - - - - actControlZeroZ - triggered() - cmdZeroZ - click() - - - -1 - -1 - - - 318 - 660 - - - - - actControlRestoreOrigin - triggered() - cmdRestoreOrigin - click() - - - -1 - -1 - - - 89 - 707 - - - - - actControlSafePosition - triggered() - cmdSafePosition - click() - - - -1 - -1 - - - 169 - 707 - - - actControlReset triggered() @@ -3707,22 +3552,6 @@ padding-right: 8; - - actProgramCheck - triggered() - chkTestMode - click() - - - -1 - -1 - - - 435 - 674 - - - actProgramScroll triggered() diff --git a/src/candle/frmsettings.cpp b/src/candle/frmsettings.cpp index ff30e6bd..fd3c04b2 100644 --- a/src/candle/frmsettings.cpp +++ b/src/candle/frmsettings.cpp @@ -390,36 +390,6 @@ void frmSettings::setShowUICommands(bool showUICommands) ui->chkShowUICommands->setChecked(showUICommands); } -QString frmSettings::safePositionCommand() -{ - return ui->txtSafeCommand->toPlainText(); -} - -void frmSettings::setSafePositionCommand(QString command) -{ - ui->txtSafeCommand->setPlainText(command); -} - -bool frmSettings::moveOnRestore() -{ - return ui->chkMoveOnRestore->isChecked(); -} - -void frmSettings::setMoveOnRestore(bool value) -{ - ui->chkMoveOnRestore->setChecked(value); -} - -int frmSettings::restoreMode() -{ - return ui->cboRestoreMode->currentIndex(); -} - -void frmSettings::setRestoreMode(int value) -{ - ui->cboRestoreMode->setCurrentIndex(value); -} - int frmSettings::spindleSpeedMin() { return ui->txtSpindleSpeedMin->value(); @@ -470,16 +440,6 @@ void frmSettings::setRapidSpeed(int rapidSpeed) m_rapidSpeed = rapidSpeed; } -int frmSettings::heightmapProbingFeed() -{ - return ui->txtHeightMapProbingFeed->value(); -} - -void frmSettings::setHeightmapProbingFeed(int heightmapProbingFeed) -{ - ui->txtHeightMapProbingFeed->setValue(heightmapProbingFeed); -} - int frmSettings::acceleration() { return m_acceleration; @@ -570,16 +530,6 @@ void frmSettings::setUnits(int units) m_units = units; } -QString frmSettings::touchCommand() -{ - return ui->txtTouchCommand->toPlainText(); -} - -void frmSettings::setTouchCommand(QString touchCommand) -{ - ui->txtTouchCommand->setPlainText(touchCommand); -} - bool frmSettings::simplify() { return ui->chkSimplify->isChecked(); @@ -738,11 +688,6 @@ void frmSettings::on_cmdDefaults_clicked() setSpindleSpeedMax(10000); setLaserPowerMin(0); setLaserPowerMax(100); - setTouchCommand("G21G91G38.2Z-30F100; G0Z1; G38.2Z-2F10"); - setSafePositionCommand("G21G90; G53G0Z0"); - setMoveOnRestore(false); - setRestoreMode(0); - setHeightmapProbingFeed(10); setUnits(0); setArcLength(0.0); diff --git a/src/candle/frmsettings.h b/src/candle/frmsettings.h index 4a4e442b..56c4ea4a 100644 --- a/src/candle/frmsettings.h +++ b/src/candle/frmsettings.h @@ -31,15 +31,11 @@ class frmSettings : public QDialog Q_PROPERTY(bool arcDegreeMode READ arcDegreeMode WRITE setArcDegreeMode) Q_PROPERTY(bool showProgramCommands READ showProgramCommands WRITE setShowProgramCommands) Q_PROPERTY(bool showUICommands READ showUICommands WRITE setShowUICommands) - Q_PROPERTY(QString safePositionCommand READ safePositionCommand WRITE setSafePositionCommand) - Q_PROPERTY(bool moveOnRestore READ moveOnRestore WRITE setMoveOnRestore) - Q_PROPERTY(int restoreMode READ restoreMode WRITE setRestoreMode) Q_PROPERTY(int spindleSpeedMin READ spindleSpeedMin WRITE setSpindleSpeedMin) Q_PROPERTY(int spindleSpeedMax READ spindleSpeedMax WRITE setSpindleSpeedMax) Q_PROPERTY(int laserPowerMin READ laserPowerMin WRITE setLaserPowerMin) Q_PROPERTY(int laserPowerMax READ laserPowerMax WRITE setLaserPowerMax) Q_PROPERTY(int rapidSpeed READ rapidSpeed WRITE setRapidSpeed) - Q_PROPERTY(int heightmapProbingFeed READ heightmapProbingFeed WRITE setHeightmapProbingFeed) Q_PROPERTY(int acceleration READ acceleration WRITE setAcceleration) Q_PROPERTY(int queryStateTime READ queryStateTime WRITE setQueryStateTime) Q_PROPERTY(int toolType READ toolType WRITE setToolType) @@ -49,7 +45,6 @@ class frmSettings : public QDialog Q_PROPERTY(bool msaa READ msaa WRITE setMsaa) Q_PROPERTY(bool autoCompletion READ autoCompletion WRITE setAutoCompletion) Q_PROPERTY(bool units READ units WRITE setUnits) - Q_PROPERTY(QString touchCommand READ touchCommand WRITE setTouchCommand) Q_PROPERTY(bool simplify READ simplify WRITE setSimplify) Q_PROPERTY(double simplifyPrecision READ simplifyPrecision WRITE setSimplifyPrecision) Q_PROPERTY(int fontSize READ fontSize WRITE setFontSize) @@ -97,12 +92,6 @@ class frmSettings : public QDialog void setShowProgramCommands(bool showProgramCommands); bool showUICommands(); void setShowUICommands(bool showUICommands); - QString safePositionCommand(); - void setSafePositionCommand(QString command); - bool moveOnRestore(); - void setMoveOnRestore(bool value); - int restoreMode(); - void setRestoreMode(int value); int spindleSpeedMin(); void setSpindleSpeedMin(int speed); int spindleSpeedMax(); @@ -113,8 +102,6 @@ class frmSettings : public QDialog void setLaserPowerMax(int value); int rapidSpeed(); void setRapidSpeed(int rapidSpeed); - int heightmapProbingFeed(); - void setHeightmapProbingFeed(int heightmapProbingFeed); int acceleration(); void setAcceleration(int acceleration); int queryStateTime(); @@ -133,8 +120,6 @@ class frmSettings : public QDialog void setAutoCompletion(bool autoCompletion); int units(); void setUnits(int units); - QString touchCommand(); - void setTouchCommand(QString touchCommand); bool simplify(); void setSimplify(bool simplify); double simplifyPrecision(); diff --git a/src/candle/frmsettings.ui b/src/candle/frmsettings.ui index 142e1966..c0da1c32 100644 --- a/src/candle/frmsettings.ui +++ b/src/candle/frmsettings.ui @@ -84,9 +84,9 @@ QSplitter::handle:horizontal { 0 - -1308 + -1960 620 - 3110 + 2487 @@ -232,29 +232,6 @@ QSplitter::handle:horizontal { - - - - Sender - - - - - - Ignore error responses - - - - - - - Automatically set parser state before sending from selected line - - - - - - @@ -385,89 +362,49 @@ QSplitter::handle:horizontal { - + - Control + Parser - - - - - padding-top: 3; - - - Probe commands: - - - 0 - - - - - - - - - - - - - - padding-top: 3; - - - Safe position commands: - - - 0 - - - + - - - - - + + + + + Arc approximation segment size: + + + + + + + Qt::Horizontal + + + + 0 + 20 + + + + + - - - - - - - - 0 - 0 - - - - "Restore origin" moves tool in: - - - - - - - - - false + + + + + by length + + + true - - - Plane - - - - - Space - - - - + + Qt::Horizontal @@ -476,17 +413,85 @@ QSplitter::handle:horizontal { - 9 + 6 20 + + + + true + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 2 + + + 99.000000000000000 + + + + + + + by angle (deg.) + + + + + + + false + + + Qt::AlignCenter + + + QAbstractSpinBox::NoButtons + + + 2 + + + 180.000000000000000 + + + + + + + Sender + + + + + + Ignore error responses + + + + + + + Automatically set parser state before sending from selected line + + + + + + @@ -576,165 +581,6 @@ QSplitter::handle:horizontal { - - - - Heightmap - - - - - - - - Heightmap probing feed: - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 9 - - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 99999 - - - - - - - - - - - - Parser - - - - - - - - Arc approximation segment size: - - - - - - - Qt::Horizontal - - - - 0 - 20 - - - - - - - - - - - - by length - - - true - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 6 - 20 - - - - - - - - true - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 2 - - - 99.000000000000000 - - - - - - - by angle (deg.) - - - - - - - false - - - Qt::AlignCenter - - - QAbstractSpinBox::NoButtons - - - 2 - - - 180.000000000000000 - - - - - - - - @@ -916,39 +762,175 @@ QSplitter::handle:horizontal { 2 - - 99.000000000000000 + + 99.000000000000000 + + + + + + + Simplify geometry + + + + + + + false + + + Precision: + + + + + + + V-sync + + + + + + + Smoothing + + + + + + + + + + + + Colors + + + + + + + + Z-movement: + + + + + + + Toolpath + + + true + + + + + + + + + + Background: + + + + + + + + + + + + + Highlight: + + + + + + + Start point: + + + + + + + + + + End point: + + + + + + + + + + + + + Visualizer + + + + + + + Text: - + - Simplify geometry + Tool: - - - - false + + + + + + + Qt::Vertical - - Precision: + + QSizePolicy::Fixed - + + + 20 + 6 + + + - - + + - V-sync + Drawn: - - + + + + + + + + - Smoothing + Normal: @@ -1099,6 +1081,34 @@ QSplitter::handle:horizontal { + + + + Shortcuts + + + + + + + Command + + + + + Text + + + + + Shortcuts + + + + + + + @@ -1129,170 +1139,6 @@ QSplitter::handle:horizontal { - - - - Colors - - - - - - - - Z-movement: - - - - - - - Toolpath - - - true - - - - - - - - - - Background: - - - - - - - - - - - - - Highlight: - - - - - - - Start point: - - - - - - - - - - End point: - - - - - - - - - - - - - Visualizer - - - - - - - Text: - - - - - - - Tool: - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Fixed - - - - 20 - 6 - - - - - - - - Drawn: - - - - - - - - - - - - - Normal: - - - - - - - - - - - - Shortcuts - - - - - - - Command - - - - - Text - - - - - Shortcuts - - - - - - - @@ -1574,22 +1420,6 @@ QSplitter::handle:horizontal { - - chkMoveOnRestore - toggled(bool) - cboRestoreMode - setEnabled(bool) - - - 333 - -47 - - - 498 - -64 - - - radArcDegreeMode toggled(bool) diff --git a/src/candle/images.qrc b/src/candle/images.qrc index c0aac4f6..5e98242f 100644 --- a/src/candle/images.qrc +++ b/src/candle/images.qrc @@ -1,48 +1,40 @@ - - images/search_for_home2.png - images/search_for_z.png - images/safe_z.png - images/axis_zero.png - images/axis_return.png - images/restart.png - images/handle_horizontal.png - images/handle_vertical.png - images/unlock.png - images/1401562699_icon-arrow-up-b.png - images/1401562699_icon-arrow-down-b.png - images/1401562173_chevron-down.png - images/1401562173_chevron-up.png - images/1401562173_chevron-right.png - images/1401561986_chevron-left.png - images/zero_z.png - images/cutter.png - images/handle2s.png - images/handle2sh.png - images/cube.png - images/fit_1.png - images/send_1.png - images/erase_1.png - images/cubeFront.png - images/cubeLeft.png - images/cubeTop.png - images/icon3png.png - images/expand.png - images/collapse.png - images/collapse_disabled.png - images/expand_disabled.png - images/small_arrow.png - images/shadow.png - images/handle_small.png - images/guard.png - images/origin.png - images/candle_256.png - images/run.png - images/num1.png - images/num2.png - images/num3.png - images/num4.png - images/handle2s1.png - images/brake.png - + + images/search_for_home2.png + images/check1.png + images/restart.png + images/handle_horizontal.png + images/handle_vertical.png + images/1401562699_icon-arrow-up-b.png + images/1401562699_icon-arrow-down-b.png + images/1401562173_chevron-down.png + images/1401562173_chevron-up.png + images/1401562173_chevron-right.png + images/1401561986_chevron-left.png + images/cutter.png + images/handle2s.png + images/handle2sh.png + images/cube.png + images/fit_1.png + images/send_1.png + images/erase_1.png + images/cubeFront.png + images/cubeLeft.png + images/cubeTop.png + images/expand.png + images/collapse.png + images/collapse_disabled.png + images/expand_disabled.png + images/small_arrow.png + images/shadow.png + images/handle_small.png + images/candle_256.png + images/num1.png + images/num2.png + images/unlock1.png + images/num3.png + images/num4.png + images/handle2s1.png + images/brake.png + diff --git a/src/candle/images/check.png b/src/candle/images/check.png new file mode 100644 index 0000000000000000000000000000000000000000..2c350a17f5a0a6e84c2bdd838cf3379d61ce6745 GIT binary patch literal 882 zcmV-&1C9KNP)Bl1zSb` zf$Md#Q4~2F6;xamixV3W;m#{8wbSCxLKF`LvG7pwD#1dq)6=Wm13L>j&{n|@P&m(6 zOoA~x?_54+GI5g!LN+s#$veNiGxJW81!w~^z*is`!fgpSg@Kt080mWZ4eXKx7}h(V z+-~a{-vTyB$_yDBb&0LAt*9Dnh4g7)p-e+8GYRZSQ&19M0hqI9PWklG7OZ_2Xaw+W zfNvTBd>i1KMgZRi_@)uSw*kJ%E5ID)mDiD2Sr;q2c>RT_y$48Zfh;@<_gjIkA>Sq+ zZB=ALfL?5`6Cm}%#0O0muuw;|Y~Hd;zD=fq*ETA$A;95+`FVI~tD>e0 zcz}gEqUEk>P>gd7^|8WR;0~}HrfPY2RI0flxV{Mc|BkX^Hh|aqptuHLfLiUejasa(_r=61*cD4flIYwZnl-32ZJmxa7OstW{;Z7`BmfD6E9;2X-VP3MmTSB1Pjus5vBJ88SX0ZqBP z=tVdy)EfYAfK66gFi7eykYx}Y)ufGu`!lGI5u>!5LLJFF-vRb#up#0l7T*n|^?(VX zY}^x00xLq9#2Y!{%c&h?r=>k7ck=qkswbxBgRnw z+E^-htvFVe!Vykg%oCMa3{{>+0N)1qrV+rm0luld08$*V(~$Q+AbqekfYiuwONLaQ z+IN8#@ZGl&CGka<*aGgCY={p6U{=a(1GgC7KT*F2PDqXa17>CZqJ*88!vFvP07*qo IM6N<$f+LoBZ2$lO literal 0 HcmV?d00001 diff --git a/src/candle/images/check1.png b/src/candle/images/check1.png new file mode 100644 index 0000000000000000000000000000000000000000..d5f8b32b78d51d426772d583ce2fead501322b83 GIT binary patch literal 975 zcmV;=12FuFP)dw%Eq&ToF_oZs)>_vq>A>6u_w7qAJJER8y~a~=orI{q3(a1D-N zZkd!LgE=Lb$}qr7c&L!6y1_d9izt3$Wro0}Cbema)H$unXdGYj8!=O>I?XeULqpf8 z`&gC%;>_rt0Sb||1SW>w0BtMKHeENs(>R6$xVp}cBMSqG={h^FiRUcT@vYeX>Dc`! zt&^^Lz%$t1V)KhW`_JH0$#=AlCFLnci}`uT^10@_kcTbMzKU>v9eb(E8UvXZVxWT>VClu8FMJ)0a--y z4Y0R{i4T`+V*Ou%uNRT|6*uP0q0vq7`;u~L{DD)ky3@E9KW50B#N9Yrb?~x#z&7Dw z!z~rZKZ_msJLTRC?hz82wL|r1gvozfaqL_o;}ZvLHox{S;=Y1%jh_Nb#mCryhlRc8 zyE;4Xf&mEb{z?-acQq0mW*sgqE8JxROyM2;Cd31`mFc9b2AINbJTbVwQb>+QW}FRh znGog0qr{a$IQ&?w{^vRekFqflsyHe@FZ@kIR2~fj?aKg}71vU|XOTt6sPn8lZZi?%|QQ24lH z8rwN0{ut~H(6$0?Gw}u}x(SZs*W?zXkj_~KI3K${l-jCWoJ*_BS^@_fRHQ8qjM8|y x{bc4d8TrO?|IySr;XnVTj3v<1)6+B2{10SgwQ{NMpd|nR002ovPDHLkV1jz`$}Ru^ literal 0 HcmV?d00001 diff --git a/src/candle/images/unlock1.png b/src/candle/images/unlock1.png new file mode 100644 index 0000000000000000000000000000000000000000..693155b355308434d8438cbff7c5386667aba3d2 GIT binary patch literal 755 zcmVdrcY#XSL?O3Mag8vuz6R+?R-&?%yLS3ulIAvrpziL1FEGC0QA7V-0L}hPe?b7vj$*dv?|`cz#Y3M09Y+cvwt?8B z0Ad@6O$s2kf!MV3$6_uHV>6btsnv=u%xUNk_;=CdH6G$PzLqrqsH|1{XO{OmUso!%q%dbDsp?9^gn|s zfY=6NlLClsAT}w0*al(~>$dZ6oK@Qq0y}UJQ>!)-BY;8d!tI9V`fwe$RDA0z#wl=7 zbMeF6t{EE8!Z7;)|ySlsY93NZuNWCCo8p7f_c3Lv(D*c1uiM{pP6 z$nC920NHJ86NwPp^2TJM-Wzxu87lvjVrpXm9O3A4k;o2P|z Date: Sun, 3 Jan 2021 16:52:59 +0500 Subject: [PATCH 41/80] Plugins should save/load settings by own. Added 'saveValue', 'loadValue' methods to 'main' object in scripts. Camera plugin update. --- src/candle/frmmain.cpp | 30 +++++-- src/candle/frmmain.h | 5 +- src/candle/frmsettings.cpp | 85 ------------------- src/candle/frmsettings.h | 2 - src/candle/widgets/combobox.h | 2 + src/candleplugins/camera/script.js | 61 +++++++------ src/candleplugins/camera/settings.ui | 22 +++-- .../cameraplugin/camerawidget.cpp | 15 +++- 8 files changed, 87 insertions(+), 135 deletions(-) diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index bd549430..3f1509d1 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -411,6 +411,8 @@ void frmMain::loadSettings() m_settingsLoading = true; + emit settingsAboutToLoad(); + m_settings->setFontSize(set.value("fontSize", 8).toInt()); m_settings->setPort(set.value("port").toString()); m_settings->setBaud(set.value("baud").toInt()); @@ -602,13 +604,9 @@ void frmMain::loadSettings() ui->actViewLockWindows->setChecked(set.value("lockWindows").toBool()); ui->actViewLockPanels->setChecked(set.value("lockPanels").toBool()); - // Load custom settings - emit settingsAboutToLoad(); - m_settings->loadCustomSettings(set); - emit settingsLoaded(); - m_settings->restoreGeometry(set.value("formSettingsGeometry", m_settings->saveGeometry()).toByteArray()); + emit settingsLoaded(); m_settingsLoading = false; } @@ -617,6 +615,8 @@ void frmMain::saveSettings() QSettings set(m_settingsFileName, QSettings::IniFormat); set.setIniCodec("UTF-8"); + emit settingsAboutToSave(); + set.setValue("port", m_settings->port()); set.setValue("baud", m_settings->baud()); set.setValue("ignoreErrors", m_settings->ignoreErrors()); @@ -743,9 +743,7 @@ void frmMain::saveSettings() set.setValue("lockWindows", ui->actViewLockWindows->isChecked()); set.setValue("lockPanels", ui->actViewLockPanels->isChecked()); - // Custom settings - emit settingsAboutToSave(); - m_settings->saveCustomSettings(set); + emit settingsSaved(); } bool frmMain::saveChanges(bool heightMapMode) @@ -4305,4 +4303,20 @@ void frmMain::on_actViewLockWindows_toggled(bool checked) foreach (QDockWidget *d, dl) { d->setFeatures(checked ? QDockWidget::NoDockWidgetFeatures : QDockWidget::AllDockWidgetFeatures); } +} + +void frmMain::saveValue(QString key, QVariant value) +{ + QSettings set(m_settingsFileName, QSettings::IniFormat); + set.setIniCodec("UTF-8"); + + set.setValue("Plugins/" + key, value); +} + +QVariant frmMain::loadValue(QString key) +{ + QSettings set(m_settingsFileName, QSettings::IniFormat); + set.setIniCodec("UTF-8"); + + return set.value("Plugins/" + key); } \ No newline at end of file diff --git a/src/candle/frmmain.h b/src/candle/frmmain.h index 280596a0..037907a9 100644 --- a/src/candle/frmmain.h +++ b/src/candle/frmmain.h @@ -91,7 +91,9 @@ class frmMain : public QMainWindow Q_INVOKABLE int sendCommand(QString command, int tableIndex = -1, bool showInConsole = true, bool queue = false); Q_INVOKABLE void sendCommands(QString commands, int tableIndex = -1); - Q_INVOKABLE void applySettings(); + Q_INVOKABLE void applySettings(); + Q_INVOKABLE void saveValue(QString key, QVariant value); + Q_INVOKABLE QVariant loadValue(QString key); double toolZPosition(); @@ -102,6 +104,7 @@ class frmMain : public QMainWindow void settingsAboutToLoad(); void settingsLoaded(); void settingsAboutToSave(); + void settingsSaved(); void settingsChanged(); private slots: diff --git a/src/candle/frmsettings.cpp b/src/candle/frmsettings.cpp index fd3c04b2..edfca6af 100644 --- a/src/candle/frmsettings.cpp +++ b/src/candle/frmsettings.cpp @@ -154,91 +154,6 @@ void frmSettings::addCustomSettings(GroupBox *box) m_customSettings.append(box); } -void frmSettings::saveCustomSettings(QSettings &set) -{ - set.beginGroup("Plugins"); - - foreach (QWidget *w, m_customSettings) { - - set.beginGroup(w->objectName()); - - foreach (QAbstractSpinBox* o, w->findChildren()) - set.setValue(o->objectName(), o->property("value").toDouble()); - - foreach (QAbstractButton* o, w->findChildren()) - set.setValue(o->objectName(), o->isChecked()); - - foreach (QComboBox* o, w->findChildren()) { - set.setValue(o->objectName(), o->currentText()); - QStringList l; - for (int i = 0; i < o->count(); i++) l << o->itemText(i); - set.setValue(o->objectName() + "/Items", l); - } - - foreach (ColorPicker* o, w->findChildren()) - set.setValue(o->objectName(), o->color()); - - foreach (QLineEdit* o, w->findChildren()) - set.setValue(o->objectName(), o->text()); - - foreach (QPlainTextEdit* o, w->findChildren()) - set.setValue(o->objectName(), o->toPlainText()); - - foreach (QSpinBox* o, w->findChildren()) { - set.setValue(o->objectName(), o->value()); - } - - foreach (QDoubleSpinBox* o, w->findChildren()) { - set.setValue(o->objectName(), o->value()); - } - - set.endGroup(); - } - - set.endGroup(); -} - -void frmSettings::loadCustomSettings(QSettings &set) -{ - set.beginGroup("Plugins"); - - foreach (QWidget *w, m_customSettings) { - - set.beginGroup(w->objectName()); - - foreach (QAbstractSpinBox* o, w->findChildren()) - o->setProperty("value", set.value(o->objectName()).toDouble()); - - foreach (QAbstractButton* o, w->findChildren()) - o->setChecked(set.value(o->objectName()).toBool()); - - foreach (QComboBox* o, w->findChildren()) { - QStringList l = set.value(o->objectName() + "/Items").toStringList(); - o->addItems(l); - o->setCurrentText(set.value(o->objectName()).toString()); - } - - foreach (ColorPicker* o, w->findChildren()) - o->setColor(set.value(o->objectName()).value()); - - foreach (QLineEdit* o, w->findChildren()) - o->setText(set.value(o->objectName()).toString()); - - foreach (QPlainTextEdit* o, w->findChildren()) - o->setPlainText(set.value(o->objectName()).toString()); - - foreach (QSpinBox* o, w->findChildren()) - o->setValue(set.value(o->objectName()).toInt()); - - foreach (QDoubleSpinBox* o, w->findChildren()) - o->setValue(set.value(o->objectName()).toDouble()); - - set.endGroup(); - } - - set.endGroup(); -} - void frmSettings::on_listCategories_currentRowChanged(int currentRow) { // Scroll to selected groupbox diff --git a/src/candle/frmsettings.h b/src/candle/frmsettings.h index 56c4ea4a..1248f468 100644 --- a/src/candle/frmsettings.h +++ b/src/candle/frmsettings.h @@ -64,8 +64,6 @@ class frmSettings : public QDialog void undo(); void addCustomSettings(GroupBox *box); - void saveCustomSettings(QSettings &set); - void loadCustomSettings(QSettings &set); QString port(); void setPort(QString port); diff --git a/src/candle/widgets/combobox.h b/src/candle/widgets/combobox.h index 3cbeabe4..9c1affb8 100644 --- a/src/candle/widgets/combobox.h +++ b/src/candle/widgets/combobox.h @@ -18,6 +18,8 @@ class ComboBox : public QComboBox public slots: void addItems(const QStringList &texts) {QComboBox::addItems(texts);} + void setItems(const QStringList &texts) {QComboBox::clear(); addItems(texts);} + QStringList items() {QStringList l; for (int i = 0; i < count(); i++) l << itemText(i); return l;}; signals: void returnPressed(); diff --git a/src/candleplugins/camera/script.js b/src/candleplugins/camera/script.js index e1de5220..53b2b56c 100644 --- a/src/candleplugins/camera/script.js +++ b/src/candleplugins/camera/script.js @@ -1,28 +1,35 @@ -function on_settings_aboutToSave() +function on_settings_saved() { -} - -function on_settings_aboutToLoad() -{ - + main.saveValue("camera/name", settings.cboCameraName.currentText); + main.saveValue("camera/resolution", settings.cboCameraResolution.currentText); + main.saveValue("camera/zoom", settings.txtCameraZoom.text); + main.saveValue("camera/position", settings.txtCameraPosition.text); + main.saveValue("camera/aimPosition", settings.txtCameraAimPosition.text); + main.saveValue("camera/aimSize", settings.txtCameraAimSize.value); + main.saveValue("camera/aimLineWidth", settings.txtCameraAimLineWidth.value); + main.saveValue("camera/aimColor", settings.colCameraAimColor.colorInt); } function on_settings_loaded() { - // Update cameras list - var n = settings.txtCameraName.currentText; - settings.txtCameraName.clear(); - settings.txtCameraName.addItems(ui.camMain.availableCameras); - settings.txtCameraName.currentText = n; + // Load settings + settings.cboCameraName.setItems(ui.camMain.availableCameras); + settings.cboCameraName.currentText = main.loadValue("camera/name"); + settings.cboCameraResolution.currentText = main.loadValue("camera/resolution"); + settings.txtCameraZoom.text = main.loadValue("camera/zoom"); + settings.txtCameraPosition.text = main.loadValue("camera/position"); + settings.txtCameraAimPosition.text = main.loadValue("camera/aimPosition"); + settings.txtCameraAimSize.value = main.loadValue("camera/aimSize"); + settings.txtCameraAimLineWidth.value = main.loadValue("camera/aimLineWidth"); + settings.colCameraAimColor.colorInt = main.loadValue("camera/aimColor"); // Apply settings - updateSettings(); + applySettings(); // Update resolutions list - var r = settings.txtCameraResolution.currentText; - settings.txtCameraResolution.clear(); - settings.txtCameraResolution.addItems(ui.camMain.availableResolutions); - settings.txtCameraResolution.currentText = r; + var r = settings.cboCameraResolution.currentText; + settings.cboCameraResolution.setItems(ui.camMain.availableResolutions); + settings.cboCameraResolution.currentText = r; // Connect signals/slots ui.camMain.posChanged.connect(on_pos_changed); @@ -31,19 +38,19 @@ function on_settings_loaded() ui.camMain.aimLineWidthChanged.connect(on_aimLineWidth_changed); ui.camMain.aimColorChanged.connect(on_aimColor_changed); ui.camMain.zoomChanged.connect(on_zoom_changed); - settings.txtCameraName.currentTextChanged.connect(on_cameraName_changed); + settings.cboCameraName.currentTextChanged.connect(on_cameraName_changed); } function on_settings_changed() { - updateSettings(); + applySettings(); } -function updateSettings() +function applySettings() { // Resolution - if (settings.txtCameraResolution.currentText != "") { - var l = settings.txtCameraResolution.currentText.split("x"); + if (settings.cboCameraResolution.currentText != "") { + var l = settings.cboCameraResolution.currentText.split("x"); ui.camMain.resolution = [parseInt(l[0]), parseInt(l[1])]; } @@ -71,7 +78,7 @@ function updateSettings() ui.camMain.aimColor = parseInt(settings.colCameraAimColor.colorInt); // Update camera - ui.camMain.cameraName = settings.txtCameraName.currentText; + ui.camMain.cameraName = settings.cboCameraName.currentText; } function on_cameraName_changed(name) @@ -80,10 +87,9 @@ function on_cameraName_changed(name) ui.camMain.cameraName = name; // Update resolutions list - var r = settings.txtCameraResolution.currentText; - settings.txtCameraResolution.clear(); - settings.txtCameraResolution.addItems(ui.camMain.availableResolutions); - settings.txtCameraResolution.currentText = r; + var r = settings.cboCameraResolution.currentText; + settings.cboCameraResolution.setItems(ui.camMain.availableResolutions); + settings.cboCameraResolution.currentText = r; } function on_pos_changed(pos) @@ -117,7 +123,6 @@ function on_zoom_changed(zoom) settings.txtCameraZoom.text = zoom.toFixed(3); } -main.settingsAboutToLoad.connect(on_settings_aboutToLoad); +main.settingsSaved.connect(on_settings_saved); main.settingsLoaded.connect(on_settings_loaded); -main.settingsAboutToSave.connect(on_settings_aboutToSave); main.settingsChanged.connect(on_settings_changed); \ No newline at end of file diff --git a/src/candleplugins/camera/settings.ui b/src/candleplugins/camera/settings.ui index 47552c82..683f9bce 100644 --- a/src/candleplugins/camera/settings.ui +++ b/src/candleplugins/camera/settings.ui @@ -33,12 +33,6 @@ - - - - - - @@ -133,6 +127,20 @@ + + + + true + + + + + + + true + + + @@ -144,7 +152,7 @@ ComboBox - QWidget + QComboBox
combobox.h
diff --git a/src/designerplugins/cameraplugin/camerawidget.cpp b/src/designerplugins/cameraplugin/camerawidget.cpp index 2068e274..d221e4b6 100644 --- a/src/designerplugins/cameraplugin/camerawidget.cpp +++ b/src/designerplugins/cameraplugin/camerawidget.cpp @@ -63,14 +63,21 @@ QStringList CameraWidget::availableCameras() const QStringList CameraWidget::availableResolutions() const { - QStringList l; - foreach (QSize s, m_camera->supportedViewfinderResolutions()) l.append(QString("%1x%2").arg(s.width()).arg(s.height())); - return l; + if (m_camera) { + QStringList l; + foreach (QSize s, m_camera->supportedViewfinderResolutions()) l.append(QString("%1x%2").arg(s.width()).arg(s.height())); + return l; + } else { + return QStringList(); + } } void CameraWidget::setCamera(const QCameraInfo &cameraInfo) { - if (m_camera) delete m_camera; + if (m_camera) { + m_camera->stop(); + m_camera->deleteLater(); + } m_camera = new QCamera(cameraInfo); m_camera->setViewfinder(m_viewFinder); From 0109519234bf0c3a1cc1da2a6a7e754436ff831c Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 9 Jan 2021 21:49:35 +0500 Subject: [PATCH 42/80] Script api updated. Qt script bindings added. 'User commands' panel replaced with appropriate plugin. Minor frmMain refactoring. --- .gitignore | 8 +- candle.pro | 10 +- src/candle/Candle_resource.rc | 8 +- src/candle/candle.pro | 31 +- src/candle/frmmain.cpp | 6038 ++++++----- src/candle/frmmain.h | 299 +- src/candle/frmmain.ui | 297 +- src/candle/frmsettings.cpp | 11 +- src/candle/frmsettings.h | 4 +- src/candle/frmsettings.ui | 95 +- src/candle/main.cpp | 4 +- src/candle/scriptfunctions.cpp | 41 + src/candle/scriptfunctions.h | 44 + src/candle/widgets/uiloader.cpp | 33 - src/candle/widgets/uiloader.h | 15 - src/candleplugins/camera/script.js | 10 +- src/candleplugins/camera/settings.ui | 4 +- src/candleplugins/candleplugins.pro | 3 +- src/candleplugins/test1/config.ini | 4 - src/candleplugins/test1/images/tool.png | Bin 543 -> 0 bytes src/candleplugins/test1/script.js | 31 - src/candleplugins/test1/translation_ru.qm | Bin 329 -> 0 bytes src/candleplugins/test1/translation_ru.ts | 27 - src/candleplugins/test1/widget.ui | 108 - src/candleplugins/usercommands/config.ini | 3 + .../usercommands/images/axis_return.png | Bin 0 -> 741 bytes .../usercommands/images/axis_zero.png | Bin 0 -> 1127 bytes .../usercommands/images/guard.png | Bin 0 -> 1024 bytes .../usercommands/images/num1.png | Bin 0 -> 1234 bytes .../usercommands/images/num2.png | Bin 0 -> 1447 bytes .../usercommands/images/num3.png | Bin 0 -> 1243 bytes .../usercommands/images/num4.png | Bin 0 -> 951 bytes .../usercommands/images/origin.png | Bin 0 -> 857 bytes src/candleplugins/usercommands/images/run.png | Bin 0 -> 928 bytes .../usercommands/images/safe_z.png | Bin 0 -> 537 bytes .../usercommands/images/search_for_z.png | Bin 0 -> 1250 bytes .../usercommands/images/zero_z.png | Bin 0 -> 1162 bytes src/candleplugins/usercommands/script.js | 434 + src/candleplugins/usercommands/settings.ui | 133 + .../usercommands/translation_ru.qm | Bin 0 -> 766 bytes .../usercommands/translation_ru.ts | 50 + .../settings.ui => usercommands/widget.ui} | 19 +- .../customwidgetsplugin}/colorpicker.cpp | 0 .../customwidgetsplugin}/colorpicker.h | 3 +- .../customwidgetsplugin/colorpickerplugin.cpp | 75 + .../customwidgetsplugin/colorpickerplugin.h | 25 + .../customwidgetsplugin/customwidgets.h | 4 + .../customwidgetsplugin.cpp | 18 + .../customwidgetsplugin/customwidgetsplugin.h | 16 + .../customwidgetsplugin.pro | 29 + .../customwidgetsplugin/customwidgetsshared.h | 5 + .../customwidgetsplugin}/slider.cpp | 2 +- .../customwidgetsplugin}/slider.h | 3 +- .../customwidgetsplugin}/sliderbox.cpp | 0 .../customwidgetsplugin}/sliderbox.h | 3 +- .../customwidgetsplugin}/sliderbox.ui | 2 +- .../customwidgetsplugin/sliderboxplugin.cpp | 75 + .../customwidgetsplugin/sliderboxplugin.h | 25 + .../customwidgetsplugin/sliderplugin.cpp | 75 + .../customwidgetsplugin/sliderplugin.h | 25 + .../customwidgetsplugin}/styledtoolbutton.cpp | 0 .../customwidgetsplugin}/styledtoolbutton.h | 5 +- .../styledtoolbuttonplugin.cpp | 75 + .../styledtoolbuttonplugin.h | 25 + src/designerplugins/designerplugins.pro | 5 +- .../com_trolltech_qt_core.pri | 199 + .../com_trolltech_qt_core_init.cpp | 317 + .../com_trolltech_qt_core/qtscript_Global.cpp | 208 + .../qtscript_QAbstractAnimation.cpp | 270 + .../qtscript_QAbstractItemModel.cpp | 555 ++ .../qtscript_QAbstractListModel.cpp | 155 + .../qtscript_QAbstractState.cpp | 165 + .../qtscript_QAbstractTableModel.cpp | 155 + .../qtscript_QAbstractTransition.cpp | 204 + .../qtscript_QAnimationGroup.cpp | 243 + .../qtscript_QBasicMutex.cpp | 171 + .../qtscript_QBasicTimer.cpp | 180 + .../qtscript_QBitArray.cpp | 429 + .../qtscript_QBuffer.cpp | 193 + .../qtscript_QByteArray.cpp | 1233 +++ .../qtscript_QByteArrayMatcher.cpp | 204 + .../qtscript_QChildEvent.cpp | 178 + .../qtscript_QCoreApplication.cpp | 523 + .../qtscript_QCryptographicHash.cpp | 290 + .../com_trolltech_qt_core/qtscript_QDate.cpp | 588 ++ .../qtscript_QDateTime.cpp | 638 ++ .../com_trolltech_qt_core/qtscript_QDir.cpp | 1268 +++ .../qtscript_QDirIterator.cpp | 444 + .../qtscript_QDynamicPropertyChangeEvent.cpp | 142 + .../qtscript_QEasingCurve.cpp | 460 + .../com_trolltech_qt_core/qtscript_QEvent.cpp | 657 ++ .../qtscript_QEventLoop.cpp | 418 + .../qtscript_QEventTransition.cpp | 170 + .../com_trolltech_qt_core/qtscript_QFile.cpp | 418 + .../qtscript_QFileDevice.cpp | 763 ++ .../qtscript_QFileInfo.cpp | 614 ++ .../qtscript_QFileSystemWatcher.cpp | 238 + .../qtscript_QFinalState.cpp | 152 + .../qtscript_QFuture.cpp | 322 + .../qtscript_QFutureIterator.cpp | 171 + .../qtscript_QFutureSynchronizer.cpp | 125 + .../qtscript_QFutureSynchronizerVoid.cpp | 125 + .../qtscript_QFutureVoid.cpp | 299 + .../qtscript_QFutureWatcher.cpp | 145 + .../qtscript_QFutureWatcherVoid.cpp | 145 + .../qtscript_QHistoryState.cpp | 253 + .../qtscript_QIODevice.cpp | 654 ++ .../qtscript_QLibraryInfo.cpp | 311 + .../qtscript_QLocale.cpp | 3215 ++++++ .../qtscript_QMargins.cpp | 244 + .../qtscript_QMimeData.cpp | 374 + .../qtscript_QModelIndex.cpp | 275 + .../com_trolltech_qt_core/qtscript_QMutex.cpp | 230 + .../qtscript_QObject.cpp | 373 + .../qtscript_QParallelAnimationGroup.cpp | 151 + .../qtscript_QPauseAnimation.cpp | 165 + .../qtscript_QPersistentModelIndex.cpp | 304 + .../com_trolltech_qt_core/qtscript_QPoint.cpp | 283 + .../qtscript_QPointF.cpp | 288 + .../qtscript_QProcess.cpp | 706 ++ .../qtscript_QProcessEnvironment.cpp | 282 + .../qtscript_QPropertyAnimation.cpp | 172 + .../qtscript_QReadWriteLock.cpp | 277 + .../com_trolltech_qt_core/qtscript_QRect.cpp | 821 ++ .../com_trolltech_qt_core/qtscript_QRectF.cpp | 778 ++ .../qtscript_QRegExp.cpp | 596 ++ .../qtscript_QRunnable.cpp | 162 + .../qtscript_QSemaphore.cpp | 194 + .../qtscript_QSequentialAnimationGroup.cpp | 182 + .../qtscript_QSettings.cpp | 875 ++ .../qtscript_QSignalMapper.cpp | 234 + .../qtscript_QSignalTransition.cpp | 171 + .../com_trolltech_qt_core/qtscript_QSize.cpp | 345 + .../com_trolltech_qt_core/qtscript_QSizeF.cpp | 360 + .../qtscript_QSocketNotifier.cpp | 244 + .../com_trolltech_qt_core/qtscript_QState.cpp | 325 + .../qtscript_QStateMachine.cpp | 463 + .../qtscript_QStateMachine_SignalEvent.cpp | 166 + .../qtscript_QStateMachine_WrappedEvent.cpp | 153 + .../qtscript_QStringMatcher.cpp | 208 + .../qtscript_QSystemSemaphore.cpp | 385 + .../qtscript_QTemporaryFile.cpp | 276 + .../qtscript_QTextBoundaryFinder.cpp | 518 + .../qtscript_QTextCodec.cpp | 529 + .../qtscript_QTextDecoder.cpp | 159 + .../qtscript_QTextEncoder.cpp | 159 + .../qtscript_QTextStream.cpp | 1189 +++ .../qtscript_QThreadPool.cpp | 257 + .../com_trolltech_qt_core/qtscript_QTime.cpp | 426 + .../qtscript_QTimeLine.cpp | 502 + .../com_trolltech_qt_core/qtscript_QTimer.cpp | 164 + .../qtscript_QTimerEvent.cpp | 145 + .../qtscript_QTranslator.cpp | 257 + .../com_trolltech_qt_core/qtscript_QUrl.cpp | 729 ++ .../com_trolltech_qt_core/qtscript_QUuid.cpp | 485 + .../qtscript_QVariantAnimation.cpp | 180 + .../qtscript_QWaitCondition.cpp | 184 + .../qtscript_QXmlStreamAttribute.cpp | 240 + .../qtscript_QXmlStreamAttributes.cpp | 668 ++ .../qtscript_QXmlStreamEntityDeclaration.cpp | 217 + .../qtscript_QXmlStreamEntityResolver.cpp | 154 + ...tscript_QXmlStreamNamespaceDeclaration.cpp | 181 + ...qtscript_QXmlStreamNotationDeclaration.cpp | 189 + .../qtscript_QXmlStreamReader.cpp | 999 ++ .../qtscript_QXmlStreamWriter.cpp | 494 + .../com_trolltech_qt_core/qtscript_Qt.cpp | 8793 +++++++++++++++++ .../qtscriptshell_QAbstractAnimation.cpp | 149 + .../qtscriptshell_QAbstractAnimation.h | 28 + .../qtscriptshell_QAbstractItemModel.cpp | 628 ++ .../qtscriptshell_QAbstractItemModel.h | 58 + .../qtscriptshell_QAbstractListModel.cpp | 588 ++ .../qtscriptshell_QAbstractListModel.h | 55 + .../qtscriptshell_QAbstractState.cpp | 122 + .../qtscriptshell_QAbstractState.h | 26 + .../qtscriptshell_QAbstractTableModel.cpp | 602 ++ .../qtscriptshell_QAbstractTableModel.h | 56 + .../qtscriptshell_QAbstractTransition.cpp | 124 + .../qtscriptshell_QAbstractTransition.h | 26 + .../qtscriptshell_QAnimationGroup.cpp | 149 + .../qtscriptshell_QAnimationGroup.h | 28 + .../qtscriptshell_QBasicMutex.cpp | 13 + .../qtscriptshell_QBasicMutex.h | 19 + .../qtscriptshell_QBuffer.cpp | 298 + .../qtscriptshell_QBuffer.h | 41 + .../qtscriptshell_QChildEvent.cpp | 15 + .../qtscriptshell_QChildEvent.h | 19 + .../qtscriptshell_QCoreApplication.cpp | 110 + .../qtscriptshell_QCoreApplication.h | 25 + .../qtscriptshell_QEvent.cpp | 17 + .../qtscriptshell_QEvent.h | 20 + .../qtscriptshell_QEventLoop.cpp | 91 + .../qtscriptshell_QEventLoop.h | 24 + .../qtscriptshell_QEventTransition.cpp | 127 + .../qtscriptshell_QEventTransition.h | 27 + .../qtscriptshell_QFile.cpp | 355 + .../qtscriptshell_QFile.h | 47 + .../qtscriptshell_QFileDevice.cpp | 349 + .../qtscriptshell_QFileDevice.h | 45 + .../qtscriptshell_QFileSystemWatcher.cpp | 96 + .../qtscriptshell_QFileSystemWatcher.h | 25 + .../qtscriptshell_QFinalState.cpp | 122 + .../qtscriptshell_QFinalState.h | 26 + .../qtscriptshell_QFutureSynchronizer.cpp | 13 + .../qtscriptshell_QFutureSynchronizer.h | 19 + .../qtscriptshell_QFutureSynchronizerVoid.cpp | 13 + .../qtscriptshell_QFutureSynchronizerVoid.h | 19 + .../qtscriptshell_QFutureWatcher.cpp | 14 + .../qtscriptshell_QFutureWatcher.h | 19 + .../qtscriptshell_QFutureWatcherVoid.cpp | 14 + .../qtscriptshell_QFutureWatcherVoid.h | 19 + .../qtscriptshell_QHistoryState.cpp | 127 + .../qtscriptshell_QHistoryState.h | 27 + .../qtscriptshell_QIODevice.cpp | 298 + .../qtscriptshell_QIODevice.h | 41 + .../qtscriptshell_QMimeData.cpp | 137 + .../qtscriptshell_QMimeData.h | 27 + .../qtscriptshell_QObject.cpp | 92 + .../qtscriptshell_QObject.h | 24 + .../qtscriptshell_QParallelAnimationGroup.cpp | 150 + .../qtscriptshell_QParallelAnimationGroup.h | 28 + .../qtscriptshell_QPauseAnimation.cpp | 152 + .../qtscriptshell_QPauseAnimation.h | 29 + .../qtscriptshell_QProcess.cpp | 307 + .../qtscriptshell_QProcess.h | 41 + .../qtscriptshell_QPropertyAnimation.cpp | 183 + .../qtscriptshell_QPropertyAnimation.h | 31 + .../qtscriptshell_QRunnable.cpp | 24 + .../qtscriptshell_QRunnable.h | 20 + ...tscriptshell_QSequentialAnimationGroup.cpp | 151 + .../qtscriptshell_QSequentialAnimationGroup.h | 28 + .../qtscriptshell_QSettings.cpp | 107 + .../qtscriptshell_QSettings.h | 28 + .../qtscriptshell_QSignalMapper.cpp | 92 + .../qtscriptshell_QSignalMapper.h | 24 + .../qtscriptshell_QSignalTransition.cpp | 127 + .../qtscriptshell_QSignalTransition.h | 27 + .../qtscriptshell_QState.cpp | 127 + .../qtscriptshell_QState.h | 27 + .../qtscriptshell_QStateMachine.cpp | 184 + .../qtscriptshell_QStateMachine.h | 31 + .../qtscriptshell_QTemporaryFile.cpp | 345 + .../qtscriptshell_QTemporaryFile.h | 46 + .../qtscriptshell_QTextCodec.cpp | 85 + .../qtscriptshell_QTextCodec.h | 24 + .../qtscriptshell_QTextStream.cpp | 24 + .../qtscriptshell_QTextStream.h | 23 + .../qtscriptshell_QThreadPool.cpp | 93 + .../qtscriptshell_QThreadPool.h | 24 + .../qtscriptshell_QTimeLine.cpp | 107 + .../qtscriptshell_QTimeLine.h | 25 + .../qtscriptshell_QTimer.cpp | 92 + .../qtscriptshell_QTimer.h | 24 + .../qtscriptshell_QTimerEvent.cpp | 14 + .../qtscriptshell_QTimerEvent.h | 19 + .../qtscriptshell_QTranslator.cpp | 104 + .../qtscriptshell_QTranslator.h | 25 + .../qtscriptshell_QUuid.cpp | 24 + .../qtscriptshell_QUuid.h | 23 + .../qtscriptshell_QVariantAnimation.cpp | 180 + .../qtscriptshell_QVariantAnimation.h | 30 + ...qtscriptshell_QXmlStreamEntityResolver.cpp | 42 + .../qtscriptshell_QXmlStreamEntityResolver.h | 21 + .../com_trolltech_qt_custom.pri | 16 + .../com_trolltech_qt_custom_init.cpp | 32 + .../qtscript_ColorPicker.cpp | 196 + .../qtscript_Slider.cpp | 198 + .../qtscript_SliderBox.cpp | 168 + .../qtscript_StyledToolButton.cpp | 189 + .../qtscriptshell_ColorPicker.cpp | 667 ++ .../qtscriptshell_ColorPicker.h | 63 + .../qtscriptshell_Slider.cpp | 646 ++ .../qtscriptshell_Slider.h | 61 + .../qtscriptshell_SliderBox.cpp | 666 ++ .../qtscriptshell_SliderBox.h | 63 + .../qtscriptshell_StyledToolButton.cpp | 669 ++ .../qtscriptshell_StyledToolButton.h | 63 + .../com_trolltech_qt_gui.pri | 209 + .../com_trolltech_qt_gui_init.cpp | 347 + .../qtscript_QActionEvent.cpp | 161 + .../com_trolltech_qt_gui/qtscript_QBitmap.cpp | 227 + .../com_trolltech_qt_gui/qtscript_QBrush.cpp | 371 + .../qtscript_QClipboard.cpp | 430 + .../qtscript_QCloseEvent.cpp | 124 + .../com_trolltech_qt_gui/qtscript_QColor.cpp | 1290 +++ .../qtscript_QConicalGradient.cpp | 198 + .../qtscript_QContextMenuEvent.cpp | 311 + .../com_trolltech_qt_gui/qtscript_QCursor.cpp | 293 + .../qtscript_QDesktopServices.cpp | 170 + .../qtscript_QDoubleValidator.cpp | 276 + .../com_trolltech_qt_gui/qtscript_QDrag.cpp | 304 + .../qtscript_QDragEnterEvent.cpp | 137 + .../qtscript_QDragLeaveEvent.cpp | 124 + .../qtscript_QDragMoveEvent.cpp | 191 + .../qtscript_QDropEvent.cpp | 270 + .../qtscript_QFileOpenEvent.cpp | 159 + .../qtscript_QFocusEvent.cpp | 159 + .../com_trolltech_qt_gui/qtscript_QFont.cpp | 1476 +++ .../qtscript_QFontInfo.cpp | 311 + .../qtscript_QFontMetrics.cpp | 463 + .../qtscript_QFontMetricsF.cpp | 426 + .../qtscript_QGradient.cpp | 344 + .../qtscript_QGuiApplication.cpp | 436 + .../qtscript_QHelpEvent.cpp | 195 + .../qtscript_QHideEvent.cpp | 124 + .../qtscript_QHoverEvent.cpp | 189 + .../com_trolltech_qt_gui/qtscript_QIcon.cpp | 716 ++ .../qtscript_QIconDragEvent.cpp | 124 + .../com_trolltech_qt_gui/qtscript_QImage.cpp | 1293 +++ .../qtscript_QImageIOHandler.cpp | 438 + .../qtscript_QImageIOPlugin.cpp | 372 + .../qtscript_QImageReader.cpp | 800 ++ .../qtscript_QImageWriter.cpp | 580 ++ .../qtscript_QInputEvent.cpp | 186 + .../qtscript_QIntValidator.cpp | 183 + .../qtscript_QKeyEvent.cpp | 313 + .../qtscript_QKeySequence.cpp | 643 ++ .../com_trolltech_qt_gui/qtscript_QLine.cpp | 329 + .../com_trolltech_qt_gui/qtscript_QLineF.cpp | 551 ++ .../qtscript_QLinearGradient.cpp | 205 + .../com_trolltech_qt_gui/qtscript_QMatrix.cpp | 429 + .../qtscript_QMatrix3x3.cpp | 127 + .../qtscript_QMatrix4x4.cpp | 714 ++ .../qtscript_QMouseEvent.cpp | 277 + .../qtscript_QMoveEvent.cpp | 157 + .../com_trolltech_qt_gui/qtscript_QMovie.cpp | 529 + .../qtscript_QPaintEngine.cpp | 1115 +++ .../qtscript_QPaintEngineState.cpp | 338 + .../qtscript_QPaintEvent.cpp | 165 + .../qtscript_QPainter.cpp | 2675 +++++ .../qtscript_QPainterPath.cpp | 1024 ++ .../qtscript_QPainterPathStroker.cpp | 305 + .../qtscript_QPalette.cpp | 654 ++ .../com_trolltech_qt_gui/qtscript_QPen.cpp | 450 + .../qtscript_QPicture.cpp | 313 + .../qtscript_QPictureIO.cpp | 419 + .../com_trolltech_qt_gui/qtscript_QPixmap.cpp | 896 ++ .../qtscript_QPixmapCache.cpp | 234 + .../qtscript_QPixmapCache_Key.cpp | 168 + .../qtscript_QPolygon.cpp | 814 ++ .../qtscript_QPolygonF.cpp | 833 ++ .../qtscript_QQuaternion.cpp | 636 ++ .../qtscript_QRadialGradient.cpp | 307 + .../qtscript_QRegExpValidator.cpp | 166 + .../com_trolltech_qt_gui/qtscript_QRegion.cpp | 508 + .../qtscript_QResizeEvent.cpp | 157 + .../qtscript_QShortcutEvent.cpp | 175 + .../qtscript_QShowEvent.cpp | 124 + .../qtscript_QStatusTipEvent.cpp | 141 + .../qtscript_QSyntaxHighlighter.cpp | 184 + .../qtscript_QTabletEvent.cpp | 477 + .../qtscript_QTextBlock.cpp | 500 + .../qtscript_QTextBlockFormat.cpp | 484 + .../qtscript_QTextBlockGroup.cpp | 138 + .../qtscript_QTextBlockUserData.cpp | 125 + .../qtscript_QTextCharFormat.cpp | 897 ++ .../qtscript_QTextCursor.cpp | 1159 +++ .../qtscript_QTextDocument.cpp | 1195 +++ .../qtscript_QTextDocumentFragment.cpp | 222 + .../qtscript_QTextDocumentWriter.cpp | 277 + .../qtscript_QTextFormat.cpp | 779 ++ .../qtscript_QTextFragment.cpp | 230 + .../qtscript_QTextFrame.cpp | 261 + .../qtscript_QTextFrameFormat.cpp | 601 ++ .../qtscript_QTextImageFormat.cpp | 206 + .../qtscript_QTextInlineObject.cpp | 265 + .../qtscript_QTextItem.cpp | 382 + .../qtscript_QTextLayout.cpp | 702 ++ .../qtscript_QTextLength.cpp | 265 + .../qtscript_QTextLine.cpp | 562 ++ .../qtscript_QTextList.cpp | 253 + .../qtscript_QTextListFormat.cpp | 323 + .../qtscript_QTextObject.cpp | 184 + .../qtscript_QTextTable.cpp | 361 + .../qtscript_QTextTableCell.cpp | 294 + .../qtscript_QTextTableCellFormat.cpp | 238 + .../qtscript_QTextTableFormat.cpp | 280 + .../qtscript_QTileRules.cpp | 142 + .../qtscript_QToolBarChangeEvent.cpp | 141 + .../qtscript_QTouchEvent_TouchPoint.cpp | 594 ++ .../qtscript_QTransform.cpp | 824 ++ .../qtscript_QValidator.cpp | 285 + .../qtscript_QVector2D.cpp | 420 + .../qtscript_QVector3D.cpp | 526 + .../qtscript_QVector4D.cpp | 474 + .../qtscript_QWhatsThisClickedEvent.cpp | 141 + .../qtscript_QWheelEvent.cpp | 326 + .../qtscript_QWindowStateChangeEvent.cpp | 158 + .../qtscriptshell_QBitmap.cpp | 123 + .../qtscriptshell_QBitmap.h | 29 + .../qtscriptshell_QContextMenuEvent.cpp | 21 + .../qtscriptshell_QContextMenuEvent.h | 21 + .../qtscriptshell_QDesktopServices.cpp | 15 + .../qtscriptshell_QDesktopServices.h | 19 + .../qtscriptshell_QDoubleValidator.cpp | 142 + .../qtscriptshell_QDoubleValidator.h | 28 + .../qtscriptshell_QDrag.cpp | 97 + .../qtscriptshell_QDrag.h | 24 + .../qtscriptshell_QDragMoveEvent.cpp | 18 + .../qtscriptshell_QDragMoveEvent.h | 19 + .../qtscriptshell_QDropEvent.cpp | 17 + .../qtscriptshell_QDropEvent.h | 19 + .../qtscriptshell_QGuiApplication.cpp | 116 + .../qtscriptshell_QGuiApplication.h | 25 + .../qtscriptshell_QHoverEvent.cpp | 15 + .../qtscriptshell_QHoverEvent.h | 19 + .../qtscriptshell_QImage.cpp | 121 + .../qtscriptshell_QImage.h | 30 + .../qtscriptshell_QImageIOHandler.cpp | 183 + .../qtscriptshell_QImageIOHandler.h | 32 + .../qtscriptshell_QImageIOPlugin.cpp | 126 + .../qtscriptshell_QImageIOPlugin.h | 26 + .../qtscriptshell_QInputEvent.cpp | 14 + .../qtscriptshell_QInputEvent.h | 19 + .../qtscriptshell_QIntValidator.cpp | 141 + .../qtscriptshell_QIntValidator.h | 28 + .../qtscriptshell_QKeyEvent.cpp | 17 + .../qtscriptshell_QKeyEvent.h | 20 + .../qtscriptshell_QMatrix3x3.cpp | 13 + .../qtscriptshell_QMatrix3x3.h | 19 + .../qtscriptshell_QMouseEvent.cpp | 21 + .../qtscriptshell_QMouseEvent.h | 21 + .../qtscriptshell_QMoveEvent.cpp | 15 + .../qtscriptshell_QMoveEvent.h | 19 + .../qtscriptshell_QMovie.cpp | 109 + .../qtscriptshell_QMovie.h | 26 + .../qtscriptshell_QPaintEngine.cpp | 326 + .../qtscriptshell_QPaintEngine.h | 39 + .../qtscriptshell_QPaintEngineState.cpp | 23 + .../qtscriptshell_QPaintEngineState.h | 19 + .../qtscriptshell_QPaintEvent.cpp | 19 + .../qtscriptshell_QPaintEvent.h | 20 + .../qtscriptshell_QPicture.cpp | 103 + .../qtscriptshell_QPicture.h | 26 + .../qtscriptshell_QPixmap.cpp | 126 + .../qtscriptshell_QPixmap.h | 30 + .../qtscriptshell_QPixmapCache.cpp | 15 + .../qtscriptshell_QPixmapCache.h | 19 + .../qtscriptshell_QRegExpValidator.cpp | 127 + .../qtscriptshell_QRegExpValidator.h | 27 + .../qtscriptshell_QResizeEvent.cpp | 15 + .../qtscriptshell_QResizeEvent.h | 19 + .../qtscriptshell_QShortcutEvent.cpp | 15 + .../qtscriptshell_QShortcutEvent.h | 19 + .../qtscriptshell_QSyntaxHighlighter.cpp | 114 + .../qtscriptshell_QSyntaxHighlighter.h | 26 + .../qtscriptshell_QTabletEvent.cpp | 18 + .../qtscriptshell_QTabletEvent.h | 20 + .../qtscriptshell_QTextBlockFormat.cpp | 22 + .../qtscriptshell_QTextBlockFormat.h | 20 + .../qtscriptshell_QTextBlockGroup.cpp | 137 + .../qtscriptshell_QTextBlockGroup.h | 27 + .../qtscriptshell_QTextBlockUserData.cpp | 13 + .../qtscriptshell_QTextBlockUserData.h | 19 + .../qtscriptshell_QTextCharFormat.cpp | 23 + .../qtscriptshell_QTextCharFormat.h | 20 + .../qtscriptshell_QTextDocument.cpp | 150 + .../qtscriptshell_QTextDocument.h | 28 + .../qtscriptshell_QTextFrame.cpp | 97 + .../qtscriptshell_QTextFrame.h | 24 + .../qtscriptshell_QTextFrameFormat.cpp | 21 + .../qtscriptshell_QTextFrameFormat.h | 20 + .../qtscriptshell_QTextImageFormat.cpp | 23 + .../qtscriptshell_QTextImageFormat.h | 20 + .../qtscriptshell_QTextItem.cpp | 14 + .../qtscriptshell_QTextItem.h | 19 + .../qtscriptshell_QTextList.cpp | 138 + .../qtscriptshell_QTextList.h | 27 + .../qtscriptshell_QTextListFormat.cpp | 21 + .../qtscriptshell_QTextListFormat.h | 20 + .../qtscriptshell_QTextObject.cpp | 94 + .../qtscriptshell_QTextObject.h | 24 + .../qtscriptshell_QTextTable.cpp | 98 + .../qtscriptshell_QTextTable.h | 24 + .../qtscriptshell_QTextTableCellFormat.cpp | 23 + .../qtscriptshell_QTextTableCellFormat.h | 20 + .../qtscriptshell_QTextTableFormat.cpp | 21 + .../qtscriptshell_QTextTableFormat.h | 20 + .../qtscriptshell_QTileRules.cpp | 16 + .../qtscriptshell_QTileRules.h | 20 + .../qtscriptshell_QValidator.cpp | 123 + .../qtscriptshell_QValidator.h | 26 + .../qtscriptshell_QWheelEvent.cpp | 21 + .../qtscriptshell_QWheelEvent.h | 21 + .../com_trolltech_qt_multimedia.pri | 10 + .../com_trolltech_qt_multimedia_init.cpp | 26 + .../qtscript_QSound.cpp | 306 + .../qtscript_QSoundEffect.cpp | 474 + .../qtscriptshell_QSound.cpp | 91 + .../qtscriptshell_QSound.h | 24 + .../qtscriptshell_QSoundEffect.cpp | 94 + .../qtscriptshell_QSoundEffect.h | 24 + .../com_trolltech_qt_network.pri | 54 + .../com_trolltech_qt_network_init.cpp | 92 + .../qtscript_QAbstractNetworkCache.cpp | 221 + .../qtscript_QAbstractSocket.cpp | 587 ++ .../qtscript_QAuthenticator.cpp | 252 + .../qtscript_QHostAddress.cpp | 459 + .../qtscript_QHostInfo.cpp | 404 + .../qtscript_QIPv6Address.cpp | 128 + .../qtscript_QLocalServer.cpp | 301 + .../qtscript_QLocalSocket.cpp | 501 + .../qtscript_QNetworkAccessManager.cpp | 547 + .../qtscript_QNetworkAddressEntry.cpp | 242 + .../qtscript_QNetworkCacheMetaData.cpp | 254 + .../qtscript_QNetworkCookie.cpp | 473 + .../qtscript_QNetworkCookieJar.cpp | 214 + .../qtscript_QNetworkDiskCache.cpp | 212 + .../qtscript_QNetworkInterface.cpp | 464 + .../qtscript_QNetworkProxy.cpp | 707 ++ .../qtscript_QNetworkProxyFactory.cpp | 205 + .../qtscript_QNetworkProxyQuery.cpp | 439 + .../qtscript_QNetworkReply.cpp | 445 + .../qtscript_QNetworkRequest.cpp | 783 ++ .../qtscript_QSsl.cpp | 395 + .../qtscript_QTcpServer.cpp | 337 + .../qtscript_QTcpSocket.cpp | 152 + .../qtscript_QUdpSocket.cpp | 278 + .../qtscriptshell_QAbstractNetworkCache.cpp | 202 + .../qtscriptshell_QAbstractNetworkCache.h | 32 + .../qtscriptshell_QAbstractSocket.cpp | 427 + .../qtscriptshell_QAbstractSocket.h | 49 + .../qtscriptshell_QIPv6Address.cpp | 13 + .../qtscriptshell_QIPv6Address.h | 19 + .../qtscriptshell_QLocalServer.cpp | 131 + .../qtscriptshell_QLocalServer.h | 27 + .../qtscriptshell_QLocalSocket.cpp | 295 + .../qtscriptshell_QLocalSocket.h | 40 + .../qtscriptshell_QNetworkAccessManager.cpp | 118 + .../qtscriptshell_QNetworkAccessManager.h | 25 + .../qtscriptshell_QNetworkCookieJar.cpp | 181 + .../qtscriptshell_QNetworkCookieJar.h | 30 + .../qtscriptshell_QNetworkDiskCache.cpp | 214 + .../qtscriptshell_QNetworkDiskCache.h | 33 + .../qtscriptshell_QNetworkProxyFactory.cpp | 31 + .../qtscriptshell_QNetworkProxyFactory.h | 20 + .../qtscriptshell_QNetworkReply.cpp | 379 + .../qtscriptshell_QNetworkReply.h | 46 + .../qtscriptshell_QTcpServer.cpp | 118 + .../qtscriptshell_QTcpServer.h | 26 + .../qtscriptshell_QTcpSocket.cpp | 427 + .../qtscriptshell_QTcpSocket.h | 49 + .../qtscriptshell_QUdpSocket.cpp | 428 + .../qtscriptshell_QUdpSocket.h | 49 + .../com_trolltech_qt_opengl.pri | 26 + .../com_trolltech_qt_opengl_init.cpp | 44 + .../qtscript_QGLColormap.cpp | 247 + .../qtscript_QGLContext.cpp | 666 ++ .../qtscript_QGLFramebufferObject.cpp | 551 ++ .../qtscript_QGLFramebufferObjectFormat.cpp | 263 + .../qtscript_QGLPixelBuffer.cpp | 424 + .../qtscript_QGLShader.cpp | 470 + .../qtscript_QGLShaderProgram.cpp | 1378 +++ .../qtscript_QGLWidget.cpp | 667 ++ .../qtscriptshell_QGLColormap.cpp | 18 + .../qtscriptshell_QGLColormap.h | 20 + .../qtscriptshell_QGLContext.cpp | 85 + .../qtscriptshell_QGLContext.h | 25 + .../qtscriptshell_QGLFramebufferObject.cpp | 116 + .../qtscriptshell_QGLFramebufferObject.h | 30 + .../qtscriptshell_QGLPixelBuffer.cpp | 107 + .../qtscriptshell_QGLPixelBuffer.h | 26 + .../qtscriptshell_QGLShader.cpp | 96 + .../qtscriptshell_QGLShader.h | 25 + .../qtscriptshell_QGLShaderProgram.cpp | 116 + .../qtscriptshell_QGLShaderProgram.h | 26 + .../qtscriptshell_QGLWidget.cpp | 800 ++ .../qtscriptshell_QGLWidget.h | 75 + .../com_trolltech_qt_printsupport.pri | 25 + .../com_trolltech_qt_printsupport_init.cpp | 41 + .../qtscript_QAbstractPrintDialog.cpp | 605 ++ .../qtscript_QPageSetupDialog.cpp | 220 + .../qtscript_QPrintDialog.cpp | 239 + .../qtscript_QPrintEngine.cpp | 343 + .../qtscript_QPrintPreviewDialog.cpp | 240 + .../qtscript_QPrintPreviewWidget.cpp | 445 + .../qtscript_QPrinter.cpp | 1595 +++ .../qtscriptshell_QAbstractPrintDialog.cpp | 708 ++ .../qtscriptshell_QAbstractPrintDialog.h | 66 + .../qtscriptshell_QPageSetupDialog.cpp | 700 ++ .../qtscriptshell_QPageSetupDialog.h | 66 + .../qtscriptshell_QPrintDialog.cpp | 700 ++ .../qtscriptshell_QPrintDialog.h | 66 + .../qtscriptshell_QPrintEngine.cpp | 92 + .../qtscriptshell_QPrintEngine.h | 25 + .../qtscriptshell_QPrintPreviewDialog.cpp | 700 ++ .../qtscriptshell_QPrintPreviewDialog.h | 66 + .../qtscriptshell_QPrintPreviewWidget.cpp | 674 ++ .../qtscriptshell_QPrintPreviewWidget.h | 64 + .../qtscriptshell_QPrinter.cpp | 23 + .../qtscriptshell_QPrinter.h | 20 + .../com_trolltech_qt_sql.pri | 32 + .../com_trolltech_qt_sql_init.cpp | 62 + .../com_trolltech_qt_sql/qtscript_QSql.cpp | 487 + .../qtscript_QSqlDatabase.cpp | 614 ++ .../qtscript_QSqlDriver.cpp | 734 ++ .../qtscript_QSqlDriverCreatorBase.cpp | 144 + .../qtscript_QSqlError.cpp | 396 + .../qtscript_QSqlField.cpp | 520 + .../qtscript_QSqlIndex.cpp | 230 + .../qtscript_QSqlQuery.cpp | 677 ++ .../qtscript_QSqlQueryModel.cpp | 240 + .../qtscript_QSqlRecord.cpp | 408 + .../qtscript_QSqlRelation.cpp | 176 + .../qtscript_QSqlRelationalTableModel.cpp | 211 + .../qtscript_QSqlResult.cpp | 144 + .../qtscript_QSqlTableModel.cpp | 420 + .../qtscriptshell_QSqlDatabase.cpp | 35 + .../qtscriptshell_QSqlDatabase.h | 22 + .../qtscriptshell_QSqlDriver.cpp | 434 + .../qtscriptshell_QSqlDriver.h | 48 + .../qtscriptshell_QSqlDriverCreatorBase.cpp | 27 + .../qtscriptshell_QSqlDriverCreatorBase.h | 20 + .../qtscriptshell_QSqlQueryModel.cpp | 645 ++ .../qtscriptshell_QSqlQueryModel.h | 59 + ...qtscriptshell_QSqlRelationalTableModel.cpp | 839 ++ .../qtscriptshell_QSqlRelationalTableModel.h | 73 + .../qtscriptshell_QSqlResult.cpp | 387 + .../qtscriptshell_QSqlResult.h | 47 + .../qtscriptshell_QSqlTableModel.cpp | 807 ++ .../qtscriptshell_QSqlTableModel.h | 71 + .../com_trolltech_qt_uitools.pri | 7 + .../com_trolltech_qt_uitools_init.cpp | 23 + .../qtscript_QUiLoader.cpp | 399 + .../qtscriptshell_QUiLoader.cpp | 166 + .../qtscriptshell_QUiLoader.h | 28 + .../com_trolltech_qt_widgets.pri | 551 ++ .../com_trolltech_qt_widgets_init.cpp | 605 ++ .../qtscript_QAbstractButton.cpp | 191 + .../qtscript_QAbstractGraphicsShapeItem.cpp | 202 + .../qtscript_QAbstractItemDelegate.cpp | 385 + .../qtscript_QAbstractItemView.cpp | 688 ++ .../qtscript_QAbstractScrollArea.cpp | 323 + .../qtscript_QAbstractSlider.cpp | 286 + .../qtscript_QAbstractSpinBox.cpp | 570 ++ .../qtscript_QAction.cpp | 513 + .../qtscript_QActionGroup.cpp | 207 + .../qtscript_QApplication.cpp | 527 + .../qtscript_QBoxLayout.cpp | 518 + .../qtscript_QButtonGroup.cpp | 249 + .../qtscript_QCalendarWidget.cpp | 375 + .../qtscript_QCheckBox.cpp | 239 + .../qtscript_QColorDialog.cpp | 543 + .../qtscript_QColumnView.cpp | 231 + .../qtscript_QComboBox.cpp | 791 ++ .../qtscript_QCommandLinkButton.cpp | 211 + .../qtscript_QCommonStyle.cpp | 154 + .../qtscript_QCompleter.cpp | 500 + .../qtscript_QDataWidgetMapper.cpp | 380 + .../qtscript_QDateEdit.cpp | 193 + .../qtscript_QDateTimeEdit.cpp | 583 ++ .../qtscript_QDesktopWidget.cpp | 270 + .../qtscript_QDial.cpp | 212 + .../qtscript_QDialog.cpp | 323 + .../qtscript_QDialogButtonBox.cpp | 703 ++ .../qtscript_QDockWidget.cpp | 498 + .../qtscript_QDoubleSpinBox.cpp | 216 + .../qtscript_QErrorMessage.cpp | 191 + .../qtscript_QFileDialog.cpp | 1186 +++ .../qtscript_QFileIconProvider.cpp | 256 + .../qtscript_QFocusFrame.cpp | 201 + .../qtscript_QFontComboBox.cpp | 372 + .../qtscript_QFontDialog.cpp | 520 + .../qtscript_QFormLayout.cpp | 489 + .../qtscript_QFrame.cpp | 313 + .../qtscript_QGesture.cpp | 249 + .../qtscript_QGraphicsAnchor.cpp | 147 + .../qtscript_QGraphicsAnchorLayout.cpp | 265 + .../qtscript_QGraphicsBlurEffect.cpp | 335 + .../qtscript_QGraphicsColorizeEffect.cpp | 154 + .../qtscript_QGraphicsDropShadowEffect.cpp | 154 + .../qtscript_QGraphicsEffect.cpp | 439 + .../qtscript_QGraphicsEllipseItem.cpp | 266 + .../qtscript_QGraphicsGridLayout.cpp | 607 ++ .../qtscript_QGraphicsItem.cpp | 2501 +++++ .../qtscript_QGraphicsItemAnimation.cpp | 473 + .../qtscript_QGraphicsItemGroup.cpp | 180 + .../qtscript_QGraphicsLayout.cpp | 262 + .../qtscript_QGraphicsLayoutItem.cpp | 517 + .../qtscript_QGraphicsLineItem.cpp | 244 + .../qtscript_QGraphicsLinearLayout.cpp | 356 + .../qtscript_QGraphicsObject.cpp | 206 + .../qtscript_QGraphicsOpacityEffect.cpp | 154 + .../qtscript_QGraphicsPathItem.cpp | 198 + .../qtscript_QGraphicsPixmapItem.cpp | 351 + .../qtscript_QGraphicsPolygonItem.cpp | 219 + .../qtscript_QGraphicsProxyWidget.cpp | 234 + .../qtscript_QGraphicsRectItem.cpp | 224 + .../qtscript_QGraphicsRotation.cpp | 168 + .../qtscript_QGraphicsScale.cpp | 150 + .../qtscript_QGraphicsScene.cpp | 1332 +++ ...tscript_QGraphicsSceneContextMenuEvent.cpp | 330 + .../qtscript_QGraphicsSceneDragDropEvent.cpp | 343 + .../qtscript_QGraphicsSceneEvent.cpp | 144 + .../qtscript_QGraphicsSceneHelpEvent.cpp | 180 + .../qtscript_QGraphicsSceneHoverEvent.cpp | 286 + .../qtscript_QGraphicsSceneMouseEvent.cpp | 399 + .../qtscript_QGraphicsSceneMoveEvent.cpp | 174 + .../qtscript_QGraphicsSceneResizeEvent.cpp | 174 + .../qtscript_QGraphicsSceneWheelEvent.cpp | 288 + .../qtscript_QGraphicsSimpleTextItem.cpp | 219 + .../qtscript_QGraphicsTextItem.cpp | 415 + .../qtscript_QGraphicsTransform.cpp | 166 + .../qtscript_QGraphicsView.cpp | 953 ++ .../qtscript_QGraphicsWidget.cpp | 578 ++ .../qtscript_QGridLayout.cpp | 534 + .../qtscript_QGroupBox.cpp | 216 + .../qtscript_QHBoxLayout.cpp | 156 + .../qtscript_QHeaderView.cpp | 715 ++ .../qtscript_QInputDialog.cpp | 1122 +++ .../qtscript_QItemDelegate.cpp | 189 + .../qtscript_QItemEditorCreatorBase.cpp | 155 + .../qtscript_QItemEditorFactory.cpp | 200 + .../qtscript_QItemSelection.cpp | 707 ++ .../qtscript_QItemSelectionModel.cpp | 359 + .../qtscript_QItemSelectionRange.cpp | 366 + .../qtscript_QKeyEventTransition.cpp | 172 + .../qtscript_QLCDNumber.cpp | 301 + .../qtscript_QLabel.cpp | 293 + .../qtscript_QLayout.cpp | 553 ++ .../qtscript_QLayoutItem.cpp | 322 + .../qtscript_QLineEdit.cpp | 558 ++ .../qtscript_QListView.cpp | 305 + .../qtscript_QListWidget.cpp | 449 + .../qtscript_QListWidgetItem.cpp | 645 ++ .../qtscript_QMainWindow.cpp | 798 ++ .../qtscript_QMdiArea.cpp | 528 + .../qtscript_QMdiSubWindow.cpp | 509 + .../qtscript_QMenu.cpp | 505 + .../qtscript_QMenuBar.cpp | 356 + .../qtscript_QMessageBox.cpp | 952 ++ .../qtscript_QMouseEventTransition.cpp | 202 + .../qtscript_QPaintDevice.cpp | 400 + .../qtscript_QPanGesture.cpp | 149 + .../qtscript_QPictureFormatPlugin.cpp | 193 + .../qtscript_QPlainTextDocumentLayout.cpp | 232 + .../qtscript_QPlainTextEdit.cpp | 761 ++ .../qtscript_QProgressBar.cpp | 294 + .../qtscript_QProgressDialog.cpp | 270 + .../qtscript_QPushButton.cpp | 259 + .../qtscript_QRadioButton.cpp | 217 + .../qtscript_QRubberBand.cpp | 328 + .../qtscript_QScrollArea.cpp | 264 + .../qtscript_QScrollBar.cpp | 207 + .../qtscript_QSessionManager.cpp | 393 + .../qtscript_QShortcut.cpp | 183 + .../qtscript_QSizeGrip.cpp | 195 + .../qtscript_QSizePolicy.cpp | 521 + .../qtscript_QSlider.cpp | 305 + .../qtscript_QSpacerItem.cpp | 196 + .../qtscript_QSpinBox.cpp | 194 + .../qtscript_QSplashScreen.cpp | 257 + .../qtscript_QSplitter.cpp | 401 + .../qtscript_QSplitterHandle.cpp | 228 + .../qtscript_QStackedLayout.cpp | 298 + .../qtscript_QStackedWidget.cpp | 247 + .../qtscript_QStandardItem.cpp | 1150 +++ .../qtscript_QStandardItemModel.cpp | 545 + .../qtscript_QStatusBar.cpp | 272 + .../qtscript_QStringListModel.cpp | 199 + .../qtscript_QStyle.cpp | 2219 +++++ .../qtscript_QStyleFactory.cpp | 156 + .../qtscript_QStyleHintReturn.cpp | 360 + .../qtscript_QStyleHintReturnMask.cpp | 277 + .../qtscript_QStyleHintReturnVariant.cpp | 277 + .../qtscript_QStyleOption.cpp | 453 + .../qtscript_QStyleOptionButton.cpp | 466 + .../qtscript_QStyleOptionComboBox.cpp | 288 + .../qtscript_QStyleOptionComplex.cpp | 303 + .../qtscript_QStyleOptionDockWidget.cpp | 288 + .../qtscript_QStyleOptionFocusRect.cpp | 288 + .../qtscript_QStyleOptionFrame.cpp | 456 + .../qtscript_QStyleOptionGraphicsItem.cpp | 307 + .../qtscript_QStyleOptionGroupBox.cpp | 288 + .../qtscript_QStyleOptionHeader.cpp | 508 + .../qtscript_QStyleOptionMenuItem.cpp | 442 + .../qtscript_QStyleOptionProgressBar.cpp | 288 + .../qtscript_QStyleOptionRubberBand.cpp | 288 + .../qtscript_QStyleOptionSizeGrip.cpp | 288 + .../qtscript_QStyleOptionSlider.cpp | 288 + .../qtscript_QStyleOptionSpinBox.cpp | 288 + .../qtscript_QStyleOptionTab.cpp | 602 ++ .../qtscript_QStyleOptionTabBarBase.cpp | 288 + .../qtscript_QStyleOptionTabWidgetFrame.cpp | 288 + .../qtscript_QStyleOptionTitleBar.cpp | 288 + .../qtscript_QStyleOptionToolBar.cpp | 528 + .../qtscript_QStyleOptionToolBox.cpp | 434 + .../qtscript_QStyleOptionToolButton.cpp | 464 + .../qtscript_QStyleOptionViewItem.cpp | 636 ++ .../qtscript_QStylePainter.cpp | 273 + .../qtscript_QStylePlugin.cpp | 166 + .../qtscript_QStyledItemDelegate.cpp | 199 + .../qtscript_QSwipeGesture.cpp | 239 + .../qtscript_QSystemTrayIcon.cpp | 395 + .../qtscript_QTabBar.cpp | 638 ++ .../qtscript_QTabWidget.cpp | 611 ++ .../qtscript_QTableView.cpp | 427 + .../qtscript_QTableWidget.cpp | 631 ++ .../qtscript_QTableWidgetItem.cpp | 613 ++ .../qtscript_QTableWidgetSelectionRange.cpp | 203 + .../qtscript_QTextBrowser.cpp | 264 + .../qtscript_QTextEdit.cpp | 823 ++ .../qtscript_QTextEdit_ExtraSelection.cpp | 128 + .../qtscript_QTimeEdit.cpp | 193 + .../qtscript_QToolBar.cpp | 435 + .../qtscript_QToolBox.cpp | 364 + .../qtscript_QToolButton.cpp | 322 + .../qtscript_QToolTip.cpp | 236 + .../qtscript_QTouchEvent.cpp | 194 + .../qtscript_QTreeView.cpp | 416 + .../qtscript_QTreeWidget.cpp | 586 ++ .../qtscript_QTreeWidgetItem.cpp | 1034 ++ .../qtscript_QUndoCommand.cpp | 247 + .../qtscript_QUndoGroup.cpp | 285 + .../qtscript_QUndoStack.cpp | 336 + .../qtscript_QUndoView.cpp | 242 + .../qtscript_QVBoxLayout.cpp | 156 + .../qtscript_QWhatsThis.cpp | 202 + .../qtscript_QWidget.cpp | 1822 ++++ .../qtscript_QWidgetAction.cpp | 201 + .../qtscript_QWidgetItem.cpp | 134 + .../qtscript_QWizard.cpp | 707 ++ .../qtscript_QWizardPage.cpp | 319 + .../qtscriptshell_QAbstractButton.cpp | 708 ++ .../qtscriptshell_QAbstractButton.h | 66 + ...scriptshell_QAbstractGraphicsShapeItem.cpp | 508 + ...qtscriptshell_QAbstractGraphicsShapeItem.h | 52 + .../qtscriptshell_QAbstractItemDelegate.cpp | 260 + .../qtscriptshell_QAbstractItemDelegate.h | 34 + .../qtscriptshell_QAbstractItemView.cpp | 1222 +++ .../qtscriptshell_QAbstractItemView.h | 106 + .../qtscriptshell_QAbstractScrollArea.cpp | 706 ++ .../qtscriptshell_QAbstractScrollArea.h | 65 + .../qtscriptshell_QAbstractSlider.cpp | 671 ++ .../qtscriptshell_QAbstractSlider.h | 63 + .../qtscriptshell_QAbstractSpinBox.cpp | 718 ++ .../qtscriptshell_QAbstractSpinBox.h | 66 + .../qtscriptshell_QAction.cpp | 105 + .../qtscriptshell_QAction.h | 26 + .../qtscriptshell_QActionGroup.cpp | 94 + .../qtscriptshell_QActionGroup.h | 24 + .../qtscriptshell_QApplication.cpp | 124 + .../qtscriptshell_QApplication.h | 25 + .../qtscriptshell_QBoxLayout.cpp | 345 + .../qtscriptshell_QBoxLayout.h | 44 + .../qtscriptshell_QButtonGroup.cpp | 93 + .../qtscriptshell_QButtonGroup.h | 24 + .../qtscriptshell_QCalendarWidget.cpp | 690 ++ .../qtscriptshell_QCalendarWidget.h | 64 + .../qtscriptshell_QCheckBox.cpp | 690 ++ .../qtscriptshell_QCheckBox.h | 65 + .../qtscriptshell_QColorDialog.cpp | 700 ++ .../qtscriptshell_QColorDialog.h | 66 + .../qtscriptshell_QColumnView.cpp | 1238 +++ .../qtscriptshell_QColumnView.h | 103 + .../qtscriptshell_QComboBox.cpp | 679 ++ .../qtscriptshell_QComboBox.h | 63 + .../qtscriptshell_QCommandLinkButton.cpp | 694 ++ .../qtscriptshell_QCommandLinkButton.h | 66 + .../qtscriptshell_QCommonStyle.cpp | 474 + .../qtscriptshell_QCommonStyle.h | 46 + .../qtscriptshell_QCompleter.cpp | 131 + .../qtscriptshell_QCompleter.h | 28 + .../qtscriptshell_QDataWidgetMapper.cpp | 109 + .../qtscriptshell_QDataWidgetMapper.h | 25 + .../qtscriptshell_QDateEdit.cpp | 751 ++ .../qtscriptshell_QDateEdit.h | 69 + .../qtscriptshell_QDateTimeEdit.cpp | 760 ++ .../qtscriptshell_QDateTimeEdit.h | 72 + .../qtscriptshell_QDesktopWidget.cpp | 671 ++ .../qtscriptshell_QDesktopWidget.h | 63 + .../qtscriptshell_QDial.cpp | 650 ++ .../qtscriptshell_QDial.h | 61 + .../qtscriptshell_QDialog.cpp | 707 ++ .../qtscriptshell_QDialog.h | 66 + .../qtscriptshell_QDialogButtonBox.cpp | 682 ++ .../qtscriptshell_QDialogButtonBox.h | 66 + .../qtscriptshell_QDockWidget.cpp | 675 ++ .../qtscriptshell_QDockWidget.h | 64 + .../qtscriptshell_QDoubleSpinBox.cpp | 746 ++ .../qtscriptshell_QDoubleSpinBox.h | 68 + .../qtscriptshell_QErrorMessage.cpp | 707 ++ .../qtscriptshell_QErrorMessage.h | 66 + .../qtscriptshell_QFileDialog.cpp | 706 ++ .../qtscriptshell_QFileDialog.h | 66 + .../qtscriptshell_QFileIconProvider.cpp | 59 + .../qtscriptshell_QFileIconProvider.h | 22 + .../qtscriptshell_QFocusFrame.cpp | 672 ++ .../qtscriptshell_QFocusFrame.h | 63 + .../qtscriptshell_QFontComboBox.cpp | 679 ++ .../qtscriptshell_QFontComboBox.h | 63 + .../qtscriptshell_QFontDialog.cpp | 699 ++ .../qtscriptshell_QFontDialog.h | 66 + .../qtscriptshell_QFormLayout.cpp | 344 + .../qtscriptshell_QFormLayout.h | 44 + .../qtscriptshell_QFrame.cpp | 661 ++ .../qtscriptshell_QFrame.h | 62 + .../qtscriptshell_QGesture.cpp | 92 + .../qtscriptshell_QGesture.h | 24 + .../qtscriptshell_QGraphicsAnchorLayout.cpp | 145 + .../qtscriptshell_QGraphicsAnchorLayout.h | 28 + .../qtscriptshell_QGraphicsBlurEffect.cpp | 140 + .../qtscriptshell_QGraphicsBlurEffect.h | 27 + .../qtscriptshell_QGraphicsColorizeEffect.cpp | 141 + .../qtscriptshell_QGraphicsColorizeEffect.h | 27 + ...tscriptshell_QGraphicsDropShadowEffect.cpp | 141 + .../qtscriptshell_QGraphicsDropShadowEffect.h | 27 + .../qtscriptshell_QGraphicsEffect.cpp | 140 + .../qtscriptshell_QGraphicsEffect.h | 27 + .../qtscriptshell_QGraphicsEllipseItem.cpp | 514 + .../qtscriptshell_QGraphicsEllipseItem.h | 54 + .../qtscriptshell_QGraphicsGridLayout.cpp | 145 + .../qtscriptshell_QGraphicsGridLayout.h | 28 + .../qtscriptshell_QGraphicsItem.cpp | 506 + .../qtscriptshell_QGraphicsItem.h | 52 + .../qtscriptshell_QGraphicsItemAnimation.cpp | 126 + .../qtscriptshell_QGraphicsItemAnimation.h | 26 + .../qtscriptshell_QGraphicsItemGroup.cpp | 506 + .../qtscriptshell_QGraphicsItemGroup.h | 52 + .../qtscriptshell_QGraphicsLayout.cpp | 145 + .../qtscriptshell_QGraphicsLayout.h | 28 + .../qtscriptshell_QGraphicsLayoutItem.cpp | 77 + .../qtscriptshell_QGraphicsLayoutItem.h | 23 + .../qtscriptshell_QGraphicsLineItem.cpp | 514 + .../qtscriptshell_QGraphicsLineItem.h | 54 + .../qtscriptshell_QGraphicsLinearLayout.cpp | 148 + .../qtscriptshell_QGraphicsLinearLayout.h | 29 + .../qtscriptshell_QGraphicsObject.cpp | 582 ++ .../qtscriptshell_QGraphicsObject.h | 57 + .../qtscriptshell_QGraphicsOpacityEffect.cpp | 141 + .../qtscriptshell_QGraphicsOpacityEffect.h | 27 + .../qtscriptshell_QGraphicsPathItem.cpp | 511 + .../qtscriptshell_QGraphicsPathItem.h | 53 + .../qtscriptshell_QGraphicsPixmapItem.cpp | 510 + .../qtscriptshell_QGraphicsPixmapItem.h | 53 + .../qtscriptshell_QGraphicsPolygonItem.cpp | 511 + .../qtscriptshell_QGraphicsPolygonItem.h | 53 + .../qtscriptshell_QGraphicsProxyWidget.cpp | 894 ++ .../qtscriptshell_QGraphicsProxyWidget.h | 78 + .../qtscriptshell_QGraphicsRectItem.cpp | 514 + .../qtscriptshell_QGraphicsRectItem.h | 54 + .../qtscriptshell_QGraphicsRotation.cpp | 108 + .../qtscriptshell_QGraphicsRotation.h | 25 + .../qtscriptshell_QGraphicsScale.cpp | 108 + .../qtscriptshell_QGraphicsScale.h | 25 + .../qtscriptshell_QGraphicsScene.cpp | 419 + .../qtscriptshell_QGraphicsScene.h | 46 + .../qtscriptshell_QGraphicsSimpleTextItem.cpp | 512 + .../qtscriptshell_QGraphicsSimpleTextItem.h | 53 + .../qtscriptshell_QGraphicsTextItem.cpp | 589 ++ .../qtscriptshell_QGraphicsTextItem.h | 58 + .../qtscriptshell_QGraphicsTransform.cpp | 107 + .../qtscriptshell_QGraphicsTransform.h | 25 + .../qtscriptshell_QGraphicsView.cpp | 767 ++ .../qtscriptshell_QGraphicsView.h | 69 + .../qtscriptshell_QGraphicsWidget.cpp | 893 ++ .../qtscriptshell_QGraphicsWidget.h | 78 + .../qtscriptshell_QGridLayout.cpp | 348 + .../qtscriptshell_QGridLayout.h | 45 + .../qtscriptshell_QGroupBox.cpp | 664 ++ .../qtscriptshell_QGroupBox.h | 63 + .../qtscriptshell_QHBoxLayout.cpp | 348 + .../qtscriptshell_QHBoxLayout.h | 45 + .../qtscriptshell_QHeaderView.cpp | 1252 +++ .../qtscriptshell_QHeaderView.h | 104 + .../qtscriptshell_QInputDialog.cpp | 697 ++ .../qtscriptshell_QInputDialog.h | 65 + .../qtscriptshell_QItemDelegate.cpp | 333 + .../qtscriptshell_QItemDelegate.h | 38 + .../qtscriptshell_QItemEditorCreatorBase.cpp | 41 + .../qtscriptshell_QItemEditorCreatorBase.h | 21 + .../qtscriptshell_QItemEditorFactory.cpp | 46 + .../qtscriptshell_QItemEditorFactory.h | 21 + .../qtscriptshell_QItemSelectionModel.cpp | 175 + .../qtscriptshell_QItemSelectionModel.h | 31 + .../qtscriptshell_QKeyEventTransition.cpp | 127 + .../qtscriptshell_QKeyEventTransition.h | 27 + .../qtscriptshell_QLCDNumber.cpp | 664 ++ .../qtscriptshell_QLCDNumber.h | 63 + .../qtscriptshell_QLabel.cpp | 655 ++ .../qtscriptshell_QLabel.h | 62 + .../qtscriptshell_QLayout.cpp | 347 + .../qtscriptshell_QLayout.h | 45 + .../qtscriptshell_QLayoutItem.cpp | 197 + .../qtscriptshell_QLayoutItem.h | 34 + .../qtscriptshell_QLineEdit.cpp | 656 ++ .../qtscriptshell_QLineEdit.h | 62 + .../qtscriptshell_QListView.cpp | 1222 +++ .../qtscriptshell_QListView.h | 102 + .../qtscriptshell_QListWidget.cpp | 1249 +++ .../qtscriptshell_QListWidget.h | 104 + .../qtscriptshell_QListWidgetItem.cpp | 65 + .../qtscriptshell_QListWidgetItem.h | 25 + .../qtscriptshell_QMainWindow.cpp | 688 ++ .../qtscriptshell_QMainWindow.h | 64 + .../qtscriptshell_QMdiArea.cpp | 708 ++ .../qtscriptshell_QMdiArea.h | 65 + .../qtscriptshell_QMdiSubWindow.cpp | 651 ++ .../qtscriptshell_QMdiSubWindow.h | 61 + .../qtscriptshell_QMenu.cpp | 664 ++ .../qtscriptshell_QMenu.h | 63 + .../qtscriptshell_QMenuBar.cpp | 665 ++ .../qtscriptshell_QMenuBar.h | 62 + .../qtscriptshell_QMessageBox.cpp | 703 ++ .../qtscriptshell_QMessageBox.h | 67 + .../qtscriptshell_QMouseEventTransition.cpp | 128 + .../qtscriptshell_QMouseEventTransition.h | 27 + .../qtscriptshell_QPaintDevice.cpp | 97 + .../qtscriptshell_QPaintDevice.h | 25 + .../qtscriptshell_QPanGesture.cpp | 92 + .../qtscriptshell_QPanGesture.h | 24 + .../qtscriptshell_QPictureFormatPlugin.cpp | 140 + .../qtscriptshell_QPictureFormatPlugin.h | 27 + ...qtscriptshell_QPlainTextDocumentLayout.cpp | 20 + .../qtscriptshell_QPlainTextDocumentLayout.h | 19 + .../qtscriptshell_QPlainTextEdit.cpp | 790 ++ .../qtscriptshell_QPlainTextEdit.h | 71 + .../qtscriptshell_QProgressBar.cpp | 661 ++ .../qtscriptshell_QProgressBar.h | 62 + .../qtscriptshell_QProgressDialog.cpp | 702 ++ .../qtscriptshell_QProgressDialog.h | 66 + .../qtscriptshell_QPushButton.cpp | 694 ++ .../qtscriptshell_QPushButton.h | 66 + .../qtscriptshell_QRadioButton.cpp | 690 ++ .../qtscriptshell_QRadioButton.h | 65 + .../qtscriptshell_QRubberBand.cpp | 671 ++ .../qtscriptshell_QRubberBand.h | 63 + .../qtscriptshell_QScrollArea.cpp | 706 ++ .../qtscriptshell_QScrollArea.h | 65 + .../qtscriptshell_QScrollBar.cpp | 664 ++ .../qtscriptshell_QScrollBar.h | 63 + .../qtscriptshell_QShortcut.cpp | 96 + .../qtscriptshell_QShortcut.h | 25 + .../qtscriptshell_QSizeGrip.cpp | 660 ++ .../qtscriptshell_QSizeGrip.h | 62 + .../qtscriptshell_QSlider.cpp | 653 ++ .../qtscriptshell_QSlider.h | 62 + .../qtscriptshell_QSpacerItem.cpp | 198 + .../qtscriptshell_QSpacerItem.h | 34 + .../qtscriptshell_QSpinBox.cpp | 746 ++ .../qtscriptshell_QSpinBox.h | 68 + .../qtscriptshell_QSplashScreen.cpp | 689 ++ .../qtscriptshell_QSplashScreen.h | 65 + .../qtscriptshell_QSplitter.cpp | 666 ++ .../qtscriptshell_QSplitter.h | 63 + .../qtscriptshell_QSplitterHandle.cpp | 660 ++ .../qtscriptshell_QSplitterHandle.h | 62 + .../qtscriptshell_QStackedLayout.cpp | 340 + .../qtscriptshell_QStackedLayout.h | 45 + .../qtscriptshell_QStackedWidget.cpp | 661 ++ .../qtscriptshell_QStackedWidget.h | 62 + .../qtscriptshell_QStandardItem.cpp | 84 + .../qtscriptshell_QStandardItem.h | 27 + .../qtscriptshell_QStandardItemModel.cpp | 634 ++ .../qtscriptshell_QStandardItemModel.h | 59 + .../qtscriptshell_QStatusBar.cpp | 671 ++ .../qtscriptshell_QStatusBar.h | 63 + .../qtscriptshell_QStringListModel.cpp | 590 ++ .../qtscriptshell_QStringListModel.h | 56 + .../qtscriptshell_QStyle.cpp | 473 + .../qtscriptshell_QStyle.h | 46 + .../qtscriptshell_QStyleFactory.cpp | 15 + .../qtscriptshell_QStyleFactory.h | 19 + .../qtscriptshell_QStyleHintReturn.cpp | 13 + .../qtscriptshell_QStyleHintReturn.h | 19 + .../qtscriptshell_QStyleHintReturnMask.cpp | 13 + .../qtscriptshell_QStyleHintReturnMask.h | 19 + .../qtscriptshell_QStyleHintReturnVariant.cpp | 13 + .../qtscriptshell_QStyleHintReturnVariant.h | 19 + .../qtscriptshell_QStyleOption.cpp | 18 + .../qtscriptshell_QStyleOption.h | 20 + .../qtscriptshell_QStyleOptionButton.cpp | 21 + .../qtscriptshell_QStyleOptionButton.h | 21 + .../qtscriptshell_QStyleOptionComboBox.cpp | 21 + .../qtscriptshell_QStyleOptionComboBox.h | 21 + .../qtscriptshell_QStyleOptionComplex.cpp | 18 + .../qtscriptshell_QStyleOptionComplex.h | 20 + .../qtscriptshell_QStyleOptionDockWidget.cpp | 21 + .../qtscriptshell_QStyleOptionDockWidget.h | 21 + .../qtscriptshell_QStyleOptionFocusRect.cpp | 21 + .../qtscriptshell_QStyleOptionFocusRect.h | 21 + .../qtscriptshell_QStyleOptionFrame.cpp | 21 + .../qtscriptshell_QStyleOptionFrame.h | 21 + ...qtscriptshell_QStyleOptionGraphicsItem.cpp | 22 + .../qtscriptshell_QStyleOptionGraphicsItem.h | 21 + .../qtscriptshell_QStyleOptionGroupBox.cpp | 21 + .../qtscriptshell_QStyleOptionGroupBox.h | 21 + .../qtscriptshell_QStyleOptionHeader.cpp | 21 + .../qtscriptshell_QStyleOptionHeader.h | 21 + .../qtscriptshell_QStyleOptionMenuItem.cpp | 21 + .../qtscriptshell_QStyleOptionMenuItem.h | 21 + .../qtscriptshell_QStyleOptionProgressBar.cpp | 21 + .../qtscriptshell_QStyleOptionProgressBar.h | 21 + .../qtscriptshell_QStyleOptionRubberBand.cpp | 21 + .../qtscriptshell_QStyleOptionRubberBand.h | 21 + .../qtscriptshell_QStyleOptionSizeGrip.cpp | 21 + .../qtscriptshell_QStyleOptionSizeGrip.h | 21 + .../qtscriptshell_QStyleOptionSlider.cpp | 21 + .../qtscriptshell_QStyleOptionSlider.h | 21 + .../qtscriptshell_QStyleOptionSpinBox.cpp | 21 + .../qtscriptshell_QStyleOptionSpinBox.h | 21 + .../qtscriptshell_QStyleOptionTab.cpp | 21 + .../qtscriptshell_QStyleOptionTab.h | 21 + .../qtscriptshell_QStyleOptionTabBarBase.cpp | 21 + .../qtscriptshell_QStyleOptionTabBarBase.h | 21 + ...scriptshell_QStyleOptionTabWidgetFrame.cpp | 21 + ...qtscriptshell_QStyleOptionTabWidgetFrame.h | 21 + .../qtscriptshell_QStyleOptionTitleBar.cpp | 21 + .../qtscriptshell_QStyleOptionTitleBar.h | 21 + .../qtscriptshell_QStyleOptionToolBar.cpp | 21 + .../qtscriptshell_QStyleOptionToolBar.h | 21 + .../qtscriptshell_QStyleOptionToolBox.cpp | 21 + .../qtscriptshell_QStyleOptionToolBox.h | 21 + .../qtscriptshell_QStyleOptionToolButton.cpp | 21 + .../qtscriptshell_QStyleOptionToolButton.h | 21 + .../qtscriptshell_QStyleOptionViewItem.cpp | 21 + .../qtscriptshell_QStyleOptionViewItem.h | 21 + .../qtscriptshell_QStylePlugin.cpp | 107 + .../qtscriptshell_QStylePlugin.h | 25 + .../qtscriptshell_QStyledItemDelegate.cpp | 294 + .../qtscriptshell_QStyledItemDelegate.h | 36 + .../qtscriptshell_QSwipeGesture.cpp | 92 + .../qtscriptshell_QSwipeGesture.h | 24 + .../qtscriptshell_QSystemTrayIcon.cpp | 98 + .../qtscriptshell_QSystemTrayIcon.h | 25 + .../qtscriptshell_QTabBar.cpp | 719 ++ .../qtscriptshell_QTabBar.h | 66 + .../qtscriptshell_QTabWidget.cpp | 679 ++ .../qtscriptshell_QTabWidget.h | 63 + .../qtscriptshell_QTableView.cpp | 1223 +++ .../qtscriptshell_QTableView.h | 102 + .../qtscriptshell_QTableWidget.cpp | 1254 +++ .../qtscriptshell_QTableWidget.h | 105 + .../qtscriptshell_QTableWidgetItem.cpp | 65 + .../qtscriptshell_QTableWidgetItem.h | 25 + .../qtscriptshell_QTextBrowser.cpp | 845 ++ .../qtscriptshell_QTextBrowser.h | 75 + .../qtscriptshell_QTextEdit.cpp | 790 ++ .../qtscriptshell_QTextEdit.h | 71 + ...qtscriptshell_QTextEdit_ExtraSelection.cpp | 13 + .../qtscriptshell_QTextEdit_ExtraSelection.h | 19 + .../qtscriptshell_QTimeEdit.cpp | 751 ++ .../qtscriptshell_QTimeEdit.h | 69 + .../qtscriptshell_QToolBar.cpp | 675 ++ .../qtscriptshell_QToolBar.h | 64 + .../qtscriptshell_QToolBox.cpp | 689 ++ .../qtscriptshell_QToolBox.h | 64 + .../qtscriptshell_QToolButton.cpp | 688 ++ .../qtscriptshell_QToolButton.h | 64 + .../qtscriptshell_QTreeView.cpp | 1255 +++ .../qtscriptshell_QTreeView.h | 104 + .../qtscriptshell_QTreeWidget.cpp | 1284 +++ .../qtscriptshell_QTreeWidget.h | 106 + .../qtscriptshell_QTreeWidgetItem.cpp | 84 + .../qtscriptshell_QTreeWidgetItem.h | 30 + .../qtscriptshell_QUndoCommand.cpp | 65 + .../qtscriptshell_QUndoCommand.h | 24 + .../qtscriptshell_QUndoGroup.cpp | 94 + .../qtscriptshell_QUndoGroup.h | 24 + .../qtscriptshell_QUndoStack.cpp | 93 + .../qtscriptshell_QUndoStack.h | 24 + .../qtscriptshell_QUndoView.cpp | 1230 +++ .../qtscriptshell_QUndoView.h | 104 + .../qtscriptshell_QVBoxLayout.cpp | 348 + .../qtscriptshell_QVBoxLayout.h | 45 + .../qtscriptshell_QWidget.cpp | 673 ++ .../qtscriptshell_QWidget.h | 63 + .../qtscriptshell_QWidgetAction.cpp | 128 + .../qtscriptshell_QWidgetAction.h | 26 + .../qtscriptshell_QWidgetItem.cpp | 197 + .../qtscriptshell_QWidgetItem.h | 34 + .../qtscriptshell_QWizard.cpp | 758 ++ .../qtscriptshell_QWizard.h | 70 + .../qtscriptshell_QWizardPage.cpp | 726 ++ .../qtscriptshell_QWizardPage.h | 68 + .../com_trolltech_qt_xml.pri | 58 + .../com_trolltech_qt_xml_init.cpp | 110 + .../qtscript_QDomAttr.cpp | 190 + .../qtscript_QDomCDATASection.cpp | 132 + .../qtscript_QDomCharacterData.cpp | 229 + .../qtscript_QDomComment.cpp | 132 + .../qtscript_QDomDocument.cpp | 665 ++ .../qtscript_QDomDocumentFragment.cpp | 132 + .../qtscript_QDomDocumentType.cpp | 199 + .../qtscript_QDomElement.cpp | 423 + .../qtscript_QDomEntity.cpp | 168 + .../qtscript_QDomEntityReference.cpp | 132 + .../qtscript_QDomImplementation.cpp | 310 + .../qtscript_QDomNamedNodeMap.cpp | 277 + .../qtscript_QDomNode.cpp | 1014 ++ .../qtscript_QDomNodeList.cpp | 209 + .../qtscript_QDomNotation.cpp | 158 + .../qtscript_QDomProcessingInstruction.cpp | 169 + .../qtscript_QDomText.cpp | 149 + .../qtscript_QXmlAttributes.cpp | 274 + .../qtscript_QXmlContentHandler.cpp | 270 + .../qtscript_QXmlDTDHandler.cpp | 168 + .../qtscript_QXmlDeclHandler.cpp | 181 + .../qtscript_QXmlDefaultHandler.cpp | 148 + .../qtscript_QXmlEntityResolver.cpp | 156 + .../qtscript_QXmlErrorHandler.cpp | 176 + .../qtscript_QXmlInputSource.cpp | 197 + .../qtscript_QXmlLexicalHandler.cpp | 217 + .../qtscript_QXmlLocator.cpp | 151 + .../qtscript_QXmlParseException.cpp | 222 + .../qtscript_QXmlReader.cpp | 351 + .../qtscript_QXmlSimpleReader.cpp | 157 + .../qtscriptshell_QXmlAttributes.cpp | 13 + .../qtscriptshell_QXmlAttributes.h | 19 + .../qtscriptshell_QXmlContentHandler.cpp | 182 + .../qtscriptshell_QXmlContentHandler.h | 31 + .../qtscriptshell_QXmlDTDHandler.cpp | 57 + .../qtscriptshell_QXmlDTDHandler.h | 22 + .../qtscriptshell_QXmlDeclHandler.cpp | 73 + .../qtscriptshell_QXmlDeclHandler.h | 23 + .../qtscriptshell_QXmlDefaultHandler.cpp | 415 + .../qtscriptshell_QXmlDefaultHandler.h | 47 + .../qtscriptshell_QXmlEntityResolver.cpp | 42 + .../qtscriptshell_QXmlEntityResolver.h | 21 + .../qtscriptshell_QXmlErrorHandler.cpp | 68 + .../qtscriptshell_QXmlErrorHandler.h | 23 + .../qtscriptshell_QXmlInputSource.cpp | 105 + .../qtscriptshell_QXmlInputSource.h | 27 + .../qtscriptshell_QXmlLexicalHandler.cpp | 115 + .../qtscriptshell_QXmlLexicalHandler.h | 27 + .../qtscriptshell_QXmlLocator.cpp | 35 + .../qtscriptshell_QXmlLocator.h | 21 + .../qtscriptshell_QXmlReader.cpp | 286 + .../qtscriptshell_QXmlReader.h | 39 + .../qtscriptshell_QXmlSimpleReader.cpp | 312 + .../qtscriptshell_QXmlSimpleReader.h | 41 + src/scriptbindings/qtbindings/qtbindings.pro | 13 + .../qtbindings/qtbindingsbase.pri | 19 + .../qtscript_core/include/__package_shared.h | 40 + .../qtbindings/qtscript_core/plugin.cpp | 26 + .../qtbindings/qtscript_core/plugin.h | 17 + .../qtscript_core/qtscript_core.pro | 7 + .../qtscript_core/qtscriptconcurrent.h | 67 + .../include/__package_shared.h | 3 + .../qtbindings/qtscript_custom/plugin.cpp | 25 + .../qtbindings/qtscript_custom/plugin.h | 17 + .../qtscript_custom/qtscript_custom.pro | 8 + .../qtscript_gui/include/__package_shared.h | 84 + .../qtbindings/qtscript_gui/plugin.cpp | 24 + .../qtbindings/qtscript_gui/plugin.h | 16 + .../qtbindings/qtscript_gui/qtscript_gui.pro | 7 + .../include/__package_shared.h | 1 + .../qtbindings/qtscript_multimedia/plugin.cpp | 24 + .../qtbindings/qtscript_multimedia/plugin.h | 16 + .../qtscript_multimedia.pro | 7 + .../include/__package_shared.h | 20 + .../qtbindings/qtscript_network/plugin.cpp | 26 + .../qtbindings/qtscript_network/plugin.h | 17 + .../qtscript_network/qtscript_network.pro | 8 + .../include/__package_shared.h | 5 + .../qtbindings/qtscript_opengl/plugin.cpp | 26 + .../qtbindings/qtscript_opengl/plugin.h | 17 + .../qtscript_opengl/qtscript_opengl.pro | 7 + .../include/__package_shared.h | 4 + .../qtscript_printsupport/plugin.cpp | 24 + .../qtbindings/qtscript_printsupport/plugin.h | 16 + .../qtscript_printsupport.pro | 7 + .../qtscript_sql/include/__package_shared.h | 3 + .../qtbindings/qtscript_sql/plugin.cpp | 26 + .../qtbindings/qtscript_sql/plugin.h | 17 + .../qtbindings/qtscript_sql/qtscript_sql.pro | 8 + .../include/__package_shared.h | 3 + .../qtbindings/qtscript_uitools/plugin.cpp | 26 + .../qtbindings/qtscript_uitools/plugin.h | 17 + .../qtscript_uitools/qtscript_uitools.pro | 7 + .../include/__package_shared.h | 4 + .../qtbindings/qtscript_widgets/plugin.cpp | 24 + .../qtbindings/qtscript_widgets/plugin.h | 16 + .../qtscript_widgets/qtscript_widgets.pro | 7 + .../qtscript_xml/include/__package_shared.h | 3 + .../qtbindings/qtscript_xml/plugin.cpp | 26 + .../qtbindings/qtscript_xml/plugin.h | 17 + .../qtbindings/qtscript_xml/qtscript_xml.pro | 8 + src/scriptbindings/scriptbindings.pro | 2 + 1278 files changed, 325676 insertions(+), 3865 deletions(-) create mode 100644 src/candle/scriptfunctions.cpp create mode 100644 src/candle/scriptfunctions.h delete mode 100644 src/candle/widgets/uiloader.cpp delete mode 100644 src/candle/widgets/uiloader.h delete mode 100644 src/candleplugins/test1/config.ini delete mode 100644 src/candleplugins/test1/images/tool.png delete mode 100644 src/candleplugins/test1/script.js delete mode 100644 src/candleplugins/test1/translation_ru.qm delete mode 100644 src/candleplugins/test1/translation_ru.ts delete mode 100644 src/candleplugins/test1/widget.ui create mode 100644 src/candleplugins/usercommands/config.ini create mode 100644 src/candleplugins/usercommands/images/axis_return.png create mode 100644 src/candleplugins/usercommands/images/axis_zero.png create mode 100644 src/candleplugins/usercommands/images/guard.png create mode 100644 src/candleplugins/usercommands/images/num1.png create mode 100644 src/candleplugins/usercommands/images/num2.png create mode 100644 src/candleplugins/usercommands/images/num3.png create mode 100644 src/candleplugins/usercommands/images/num4.png create mode 100644 src/candleplugins/usercommands/images/origin.png create mode 100644 src/candleplugins/usercommands/images/run.png create mode 100644 src/candleplugins/usercommands/images/safe_z.png create mode 100644 src/candleplugins/usercommands/images/search_for_z.png create mode 100644 src/candleplugins/usercommands/images/zero_z.png create mode 100644 src/candleplugins/usercommands/script.js create mode 100644 src/candleplugins/usercommands/settings.ui create mode 100644 src/candleplugins/usercommands/translation_ru.qm create mode 100644 src/candleplugins/usercommands/translation_ru.ts rename src/candleplugins/{test1/settings.ui => usercommands/widget.ui} (60%) rename src/{candle/widgets => designerplugins/customwidgetsplugin}/colorpicker.cpp (100%) rename src/{candle/widgets => designerplugins/customwidgetsplugin}/colorpicker.h (87%) create mode 100644 src/designerplugins/customwidgetsplugin/colorpickerplugin.cpp create mode 100644 src/designerplugins/customwidgetsplugin/colorpickerplugin.h create mode 100644 src/designerplugins/customwidgetsplugin/customwidgets.h create mode 100644 src/designerplugins/customwidgetsplugin/customwidgetsplugin.cpp create mode 100644 src/designerplugins/customwidgetsplugin/customwidgetsplugin.h create mode 100644 src/designerplugins/customwidgetsplugin/customwidgetsplugin.pro create mode 100644 src/designerplugins/customwidgetsplugin/customwidgetsshared.h rename src/{candle/widgets => designerplugins/customwidgetsplugin}/slider.cpp (96%) rename src/{candle/widgets => designerplugins/customwidgetsplugin}/slider.h (81%) rename src/{candle/widgets => designerplugins/customwidgetsplugin}/sliderbox.cpp (100%) rename src/{candle/widgets => designerplugins/customwidgetsplugin}/sliderbox.h (95%) rename src/{candle/widgets => designerplugins/customwidgetsplugin}/sliderbox.ui (98%) create mode 100644 src/designerplugins/customwidgetsplugin/sliderboxplugin.cpp create mode 100644 src/designerplugins/customwidgetsplugin/sliderboxplugin.h create mode 100644 src/designerplugins/customwidgetsplugin/sliderplugin.cpp create mode 100644 src/designerplugins/customwidgetsplugin/sliderplugin.h rename src/{candle/widgets => designerplugins/customwidgetsplugin}/styledtoolbutton.cpp (100%) rename src/{candle/widgets => designerplugins/customwidgetsplugin}/styledtoolbutton.h (89%) create mode 100644 src/designerplugins/customwidgetsplugin/styledtoolbuttonplugin.cpp create mode 100644 src/designerplugins/customwidgetsplugin/styledtoolbuttonplugin.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core.pri create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core_init.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_Global.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractAnimation.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractItemModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractListModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractState.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractTableModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractTransition.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAnimationGroup.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QBasicMutex.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QBasicTimer.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QBitArray.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QBuffer.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QByteArray.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QByteArrayMatcher.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QChildEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QCoreApplication.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QCryptographicHash.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDate.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDateTime.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDir.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDirIterator.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDynamicPropertyChangeEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QEasingCurve.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QEventLoop.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QEventTransition.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFile.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFileDevice.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFileInfo.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFileSystemWatcher.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFinalState.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFuture.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureIterator.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureSynchronizer.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureSynchronizerVoid.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureVoid.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureWatcher.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureWatcherVoid.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QHistoryState.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QIODevice.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QLibraryInfo.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QLocale.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QMargins.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QMimeData.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QModelIndex.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QMutex.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QObject.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QParallelAnimationGroup.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPauseAnimation.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPersistentModelIndex.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPoint.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPointF.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QProcess.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QProcessEnvironment.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPropertyAnimation.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QReadWriteLock.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QRect.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QRectF.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QRegExp.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QRunnable.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSemaphore.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSequentialAnimationGroup.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSettings.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSignalMapper.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSignalTransition.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSize.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSizeF.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSocketNotifier.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QState.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QStateMachine.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QStateMachine_SignalEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QStateMachine_WrappedEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QStringMatcher.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSystemSemaphore.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTemporaryFile.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextBoundaryFinder.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextCodec.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextDecoder.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextEncoder.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextStream.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QThreadPool.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTime.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTimeLine.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTimer.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTimerEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTranslator.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QUrl.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QUuid.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QVariantAnimation.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QWaitCondition.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamAttribute.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamAttributes.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamEntityDeclaration.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamEntityResolver.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamNamespaceDeclaration.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamNotationDeclaration.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamReader.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamWriter.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_Qt.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractAnimation.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractAnimation.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractItemModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractItemModel.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractListModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractListModel.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractState.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractState.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractTableModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractTableModel.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractTransition.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractTransition.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAnimationGroup.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAnimationGroup.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QBasicMutex.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QBasicMutex.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QBuffer.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QBuffer.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QChildEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QChildEvent.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QCoreApplication.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QCoreApplication.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEvent.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEventLoop.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEventLoop.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEventTransition.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEventTransition.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFile.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFile.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFileDevice.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFileDevice.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFileSystemWatcher.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFileSystemWatcher.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFinalState.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFinalState.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureSynchronizer.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureSynchronizer.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureSynchronizerVoid.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureSynchronizerVoid.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureWatcher.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureWatcher.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureWatcherVoid.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureWatcherVoid.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QHistoryState.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QHistoryState.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QIODevice.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QIODevice.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QMimeData.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QMimeData.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QObject.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QObject.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QParallelAnimationGroup.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QParallelAnimationGroup.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QPauseAnimation.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QPauseAnimation.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QProcess.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QProcess.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QPropertyAnimation.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QPropertyAnimation.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QRunnable.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QRunnable.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSequentialAnimationGroup.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSequentialAnimationGroup.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSettings.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSettings.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSignalMapper.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSignalMapper.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSignalTransition.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSignalTransition.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QState.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QState.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QStateMachine.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QStateMachine.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTemporaryFile.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTemporaryFile.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTextCodec.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTextCodec.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTextStream.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTextStream.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QThreadPool.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QThreadPool.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimeLine.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimeLine.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimer.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimer.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimerEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimerEvent.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTranslator.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTranslator.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QUuid.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QUuid.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QVariantAnimation.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QVariantAnimation.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QXmlStreamEntityResolver.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QXmlStreamEntityResolver.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_custom/com_trolltech_qt_custom.pri create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_custom/com_trolltech_qt_custom_init.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscript_ColorPicker.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscript_Slider.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscript_SliderBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscript_StyledToolButton.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_ColorPicker.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_ColorPicker.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_Slider.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_Slider.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_SliderBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_SliderBox.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_StyledToolButton.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_StyledToolButton.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/com_trolltech_qt_gui.pri create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/com_trolltech_qt_gui_init.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QActionEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QBitmap.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QBrush.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QClipboard.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QCloseEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QColor.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QConicalGradient.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QContextMenuEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QCursor.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDesktopServices.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDoubleValidator.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDrag.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDragEnterEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDragLeaveEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDragMoveEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDropEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFileOpenEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFocusEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFont.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFontInfo.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFontMetrics.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFontMetricsF.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QGradient.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QGuiApplication.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QHelpEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QHideEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QHoverEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QIcon.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QIconDragEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImage.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImageIOHandler.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImageIOPlugin.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImageReader.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImageWriter.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QInputEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QIntValidator.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QKeyEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QKeySequence.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QLine.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QLineF.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QLinearGradient.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMatrix.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMatrix3x3.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMatrix4x4.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMouseEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMoveEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMovie.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPaintEngine.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPaintEngineState.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPaintEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPainter.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPainterPath.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPainterPathStroker.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPalette.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPen.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPicture.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPictureIO.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPixmap.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPixmapCache.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPixmapCache_Key.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPolygon.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPolygonF.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QQuaternion.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QRadialGradient.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QRegExpValidator.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QRegion.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QResizeEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QShortcutEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QShowEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QStatusTipEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QSyntaxHighlighter.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTabletEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextBlock.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextBlockFormat.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextBlockGroup.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextBlockUserData.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextCharFormat.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextCursor.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextDocument.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextDocumentFragment.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextDocumentWriter.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextFormat.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextFragment.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextFrame.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextFrameFormat.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextImageFormat.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextInlineObject.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextLength.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextLine.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextList.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextListFormat.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextObject.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextTable.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextTableCell.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextTableCellFormat.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextTableFormat.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTileRules.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QToolBarChangeEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTouchEvent_TouchPoint.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTransform.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QValidator.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QVector2D.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QVector3D.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QVector4D.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QWhatsThisClickedEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QWheelEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QWindowStateChangeEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QBitmap.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QBitmap.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QContextMenuEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QContextMenuEvent.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDesktopServices.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDesktopServices.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDoubleValidator.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDoubleValidator.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDrag.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDrag.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDragMoveEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDragMoveEvent.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDropEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDropEvent.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QGuiApplication.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QGuiApplication.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QHoverEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QHoverEvent.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImage.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImage.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImageIOHandler.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImageIOHandler.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImageIOPlugin.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImageIOPlugin.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QInputEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QInputEvent.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QIntValidator.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QIntValidator.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QKeyEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QKeyEvent.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMatrix3x3.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMatrix3x3.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMouseEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMouseEvent.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMoveEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMoveEvent.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMovie.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMovie.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEngine.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEngine.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEngineState.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEngineState.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEvent.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPicture.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPicture.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPixmap.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPixmap.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPixmapCache.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPixmapCache.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QRegExpValidator.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QRegExpValidator.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QResizeEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QResizeEvent.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QShortcutEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QShortcutEvent.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QSyntaxHighlighter.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QSyntaxHighlighter.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTabletEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTabletEvent.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockFormat.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockFormat.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockGroup.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockGroup.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockUserData.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockUserData.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextCharFormat.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextCharFormat.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextDocument.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextDocument.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrame.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrame.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrameFormat.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrameFormat.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextImageFormat.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextImageFormat.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextList.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextList.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextListFormat.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextListFormat.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextObject.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextObject.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTable.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTable.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTableCellFormat.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTableCellFormat.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTableFormat.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTableFormat.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTileRules.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTileRules.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QValidator.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QValidator.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QWheelEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QWheelEvent.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/com_trolltech_qt_multimedia.pri create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/com_trolltech_qt_multimedia_init.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscript_QSound.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscript_QSoundEffect.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscriptshell_QSound.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscriptshell_QSound.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscriptshell_QSoundEffect.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscriptshell_QSoundEffect.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/com_trolltech_qt_network.pri create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/com_trolltech_qt_network_init.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QAbstractNetworkCache.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QAbstractSocket.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QAuthenticator.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QHostAddress.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QHostInfo.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QIPv6Address.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QLocalServer.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QLocalSocket.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkAccessManager.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkAddressEntry.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkCacheMetaData.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkCookie.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkCookieJar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkDiskCache.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkInterface.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkProxy.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkProxyFactory.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkProxyQuery.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkReply.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkRequest.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QSsl.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QTcpServer.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QTcpSocket.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QUdpSocket.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QAbstractNetworkCache.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QAbstractNetworkCache.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QAbstractSocket.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QAbstractSocket.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QIPv6Address.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QIPv6Address.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QLocalServer.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QLocalServer.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QLocalSocket.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QLocalSocket.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkAccessManager.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkAccessManager.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkCookieJar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkCookieJar.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkDiskCache.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkDiskCache.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkProxyFactory.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkProxyFactory.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkReply.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkReply.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QTcpServer.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QTcpServer.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QTcpSocket.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QTcpSocket.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QUdpSocket.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QUdpSocket.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/com_trolltech_qt_opengl.pri create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/com_trolltech_qt_opengl_init.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLColormap.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLContext.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLFramebufferObject.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLFramebufferObjectFormat.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLPixelBuffer.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLShader.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLShaderProgram.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLColormap.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLColormap.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLContext.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLContext.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLFramebufferObject.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLFramebufferObject.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLPixelBuffer.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLPixelBuffer.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLShader.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLShader.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLShaderProgram.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLShaderProgram.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLWidget.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/com_trolltech_qt_printsupport.pri create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/com_trolltech_qt_printsupport_init.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QAbstractPrintDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPageSetupDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrintDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrintEngine.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrintPreviewDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrintPreviewWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrinter.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QAbstractPrintDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QAbstractPrintDialog.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPageSetupDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPageSetupDialog.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintDialog.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintEngine.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintEngine.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintPreviewDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintPreviewDialog.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintPreviewWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintPreviewWidget.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrinter.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrinter.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/com_trolltech_qt_sql.pri create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/com_trolltech_qt_sql_init.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSql.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlDatabase.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlDriver.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlDriverCreatorBase.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlError.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlField.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlIndex.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlQuery.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlQueryModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlRecord.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlRelation.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlRelationalTableModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlResult.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlTableModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDatabase.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDatabase.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDriver.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDriver.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDriverCreatorBase.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDriverCreatorBase.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlQueryModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlQueryModel.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlRelationalTableModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlRelationalTableModel.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlResult.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlResult.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlTableModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlTableModel.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/com_trolltech_qt_uitools.pri create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/com_trolltech_qt_uitools_init.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/qtscript_QUiLoader.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/qtscriptshell_QUiLoader.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/qtscriptshell_QUiLoader.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/com_trolltech_qt_widgets.pri create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/com_trolltech_qt_widgets_init.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractButton.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractGraphicsShapeItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractItemDelegate.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractItemView.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractScrollArea.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractSlider.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractSpinBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAction.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QActionGroup.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QApplication.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QBoxLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QButtonGroup.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCalendarWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCheckBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QColorDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QColumnView.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QComboBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCommandLinkButton.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCommonStyle.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCompleter.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDataWidgetMapper.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDateEdit.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDateTimeEdit.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDesktopWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDial.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDialogButtonBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDockWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDoubleSpinBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QErrorMessage.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFileDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFileIconProvider.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFocusFrame.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFontComboBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFontDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFormLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFrame.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGesture.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsAnchor.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsAnchorLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsBlurEffect.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsColorizeEffect.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsDropShadowEffect.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsEffect.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsEllipseItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsGridLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsItemAnimation.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsItemGroup.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsLayoutItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsLineItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsLinearLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsObject.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsOpacityEffect.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsPathItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsPixmapItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsPolygonItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsProxyWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsRectItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsRotation.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsScale.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsScene.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneContextMenuEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneDragDropEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneHelpEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneHoverEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneMouseEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneMoveEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneResizeEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneWheelEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSimpleTextItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsTextItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsTransform.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsView.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGridLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGroupBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QHBoxLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QHeaderView.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QInputDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemDelegate.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemEditorCreatorBase.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemEditorFactory.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemSelection.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemSelectionModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemSelectionRange.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QKeyEventTransition.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLCDNumber.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLabel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLayoutItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLineEdit.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QListView.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QListWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QListWidgetItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMainWindow.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMdiArea.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMdiSubWindow.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMenu.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMenuBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMessageBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMouseEventTransition.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPaintDevice.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPanGesture.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPictureFormatPlugin.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPlainTextDocumentLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPlainTextEdit.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QProgressBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QProgressDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPushButton.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QRadioButton.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QRubberBand.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QScrollArea.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QScrollBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSessionManager.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QShortcut.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSizeGrip.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSizePolicy.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSlider.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSpacerItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSpinBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSplashScreen.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSplitter.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSplitterHandle.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStackedLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStackedWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStandardItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStandardItemModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStatusBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStringListModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyle.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleFactory.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleHintReturn.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleHintReturnMask.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleHintReturnVariant.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOption.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionButton.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionComboBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionComplex.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionDockWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionFocusRect.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionFrame.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionGraphicsItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionGroupBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionHeader.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionMenuItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionProgressBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionRubberBand.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionSizeGrip.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionSlider.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionSpinBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionTab.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionTabBarBase.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionTabWidgetFrame.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionTitleBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionToolBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionToolBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionToolButton.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionViewItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStylePainter.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStylePlugin.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyledItemDelegate.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSwipeGesture.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSystemTrayIcon.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTabBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTabWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTableView.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTableWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTableWidgetItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTableWidgetSelectionRange.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTextBrowser.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTextEdit.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTextEdit_ExtraSelection.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTimeEdit.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QToolBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QToolBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QToolButton.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QToolTip.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTouchEvent.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTreeView.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTreeWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTreeWidgetItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QUndoCommand.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QUndoGroup.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QUndoStack.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QUndoView.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QVBoxLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWhatsThis.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWidgetAction.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWidgetItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWizard.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWizardPage.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractButton.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractButton.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractGraphicsShapeItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractGraphicsShapeItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractItemDelegate.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractItemDelegate.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractItemView.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractItemView.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractScrollArea.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractScrollArea.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractSlider.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractSlider.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractSpinBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractSpinBox.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAction.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAction.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QActionGroup.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QActionGroup.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QApplication.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QApplication.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QBoxLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QBoxLayout.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QButtonGroup.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QButtonGroup.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCalendarWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCalendarWidget.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCheckBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCheckBox.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QColorDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QColorDialog.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QColumnView.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QColumnView.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QComboBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QComboBox.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCommandLinkButton.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCommandLinkButton.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCommonStyle.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCommonStyle.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCompleter.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCompleter.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDataWidgetMapper.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDataWidgetMapper.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDateEdit.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDateEdit.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDateTimeEdit.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDateTimeEdit.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDesktopWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDesktopWidget.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDial.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDial.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDialog.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDialogButtonBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDialogButtonBox.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDockWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDockWidget.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDoubleSpinBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDoubleSpinBox.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QErrorMessage.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QErrorMessage.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFileDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFileDialog.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFileIconProvider.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFileIconProvider.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFocusFrame.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFocusFrame.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFontComboBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFontComboBox.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFontDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFontDialog.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFormLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFormLayout.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFrame.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFrame.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGesture.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGesture.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsAnchorLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsAnchorLayout.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsBlurEffect.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsBlurEffect.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsColorizeEffect.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsColorizeEffect.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsDropShadowEffect.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsDropShadowEffect.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsEffect.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsEffect.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsEllipseItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsEllipseItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsGridLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsGridLayout.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItemAnimation.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItemAnimation.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItemGroup.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItemGroup.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLayout.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLayoutItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLayoutItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLineItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLineItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLinearLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLinearLayout.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsObject.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsObject.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsOpacityEffect.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsOpacityEffect.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPathItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPathItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPixmapItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPixmapItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPolygonItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPolygonItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsProxyWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsProxyWidget.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsRectItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsRectItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsRotation.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsRotation.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsScale.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsScale.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsScene.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsScene.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsSimpleTextItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsSimpleTextItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsTextItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsTextItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsTransform.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsTransform.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsView.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsView.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsWidget.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGridLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGridLayout.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGroupBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGroupBox.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QHBoxLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QHBoxLayout.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QHeaderView.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QHeaderView.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QInputDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QInputDialog.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemDelegate.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemDelegate.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemEditorCreatorBase.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemEditorCreatorBase.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemEditorFactory.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemEditorFactory.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemSelectionModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemSelectionModel.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QKeyEventTransition.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QKeyEventTransition.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLCDNumber.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLCDNumber.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLabel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLabel.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLayout.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLayoutItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLayoutItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLineEdit.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLineEdit.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListView.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListView.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListWidget.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListWidgetItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListWidgetItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMainWindow.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMainWindow.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMdiArea.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMdiArea.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMdiSubWindow.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMdiSubWindow.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMenu.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMenu.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMenuBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMenuBar.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMessageBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMessageBox.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMouseEventTransition.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMouseEventTransition.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPaintDevice.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPaintDevice.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPanGesture.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPanGesture.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPictureFormatPlugin.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPictureFormatPlugin.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPlainTextDocumentLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPlainTextDocumentLayout.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPlainTextEdit.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPlainTextEdit.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QProgressBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QProgressBar.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QProgressDialog.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QProgressDialog.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPushButton.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPushButton.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QRadioButton.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QRadioButton.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QRubberBand.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QRubberBand.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QScrollArea.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QScrollArea.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QScrollBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QScrollBar.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QShortcut.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QShortcut.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSizeGrip.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSizeGrip.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSlider.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSlider.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSpacerItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSpacerItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSpinBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSpinBox.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplashScreen.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplashScreen.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplitter.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplitter.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplitterHandle.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplitterHandle.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStackedLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStackedLayout.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStackedWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStackedWidget.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStandardItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStandardItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStandardItemModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStandardItemModel.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStatusBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStatusBar.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStringListModel.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStringListModel.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyle.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyle.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleFactory.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleFactory.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturn.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturn.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturnMask.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturnMask.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturnVariant.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturnVariant.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOption.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOption.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionButton.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionButton.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionComboBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionComboBox.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionComplex.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionComplex.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionDockWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionDockWidget.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionFocusRect.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionFocusRect.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionFrame.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionFrame.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionGraphicsItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionGraphicsItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionGroupBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionGroupBox.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionHeader.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionHeader.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionMenuItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionMenuItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionProgressBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionProgressBar.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionRubberBand.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionRubberBand.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSizeGrip.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSizeGrip.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSlider.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSlider.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSpinBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSpinBox.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTab.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTab.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTabBarBase.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTabBarBase.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTabWidgetFrame.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTabWidgetFrame.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTitleBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTitleBar.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolBar.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolBox.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolButton.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolButton.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionViewItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionViewItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStylePlugin.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStylePlugin.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyledItemDelegate.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyledItemDelegate.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSwipeGesture.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSwipeGesture.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSystemTrayIcon.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSystemTrayIcon.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTabBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTabBar.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTabWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTabWidget.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableView.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableView.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableWidget.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableWidgetItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableWidgetItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextBrowser.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextBrowser.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextEdit.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextEdit.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextEdit_ExtraSelection.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextEdit_ExtraSelection.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTimeEdit.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTimeEdit.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolBar.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolBar.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolBox.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolBox.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolButton.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolButton.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeView.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeView.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeWidget.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeWidgetItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeWidgetItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoCommand.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoCommand.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoGroup.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoGroup.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoStack.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoStack.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoView.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoView.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QVBoxLayout.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QVBoxLayout.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidget.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidget.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidgetAction.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidgetAction.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidgetItem.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidgetItem.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWizard.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWizard.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWizardPage.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWizardPage.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/com_trolltech_qt_xml.pri create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/com_trolltech_qt_xml_init.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomAttr.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomCDATASection.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomCharacterData.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomComment.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomDocument.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomDocumentFragment.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomDocumentType.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomElement.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomEntity.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomEntityReference.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomImplementation.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomNamedNodeMap.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomNode.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomNodeList.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomNotation.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomProcessingInstruction.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomText.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlAttributes.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlContentHandler.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlDTDHandler.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlDeclHandler.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlDefaultHandler.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlEntityResolver.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlErrorHandler.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlInputSource.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlLexicalHandler.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlLocator.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlParseException.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlReader.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlSimpleReader.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlAttributes.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlAttributes.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlContentHandler.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlContentHandler.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDTDHandler.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDTDHandler.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDeclHandler.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDeclHandler.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDefaultHandler.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDefaultHandler.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlEntityResolver.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlEntityResolver.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlErrorHandler.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlErrorHandler.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlInputSource.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlInputSource.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlLexicalHandler.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlLexicalHandler.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlLocator.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlLocator.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlReader.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlReader.h create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlSimpleReader.cpp create mode 100644 src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlSimpleReader.h create mode 100644 src/scriptbindings/qtbindings/qtbindings.pro create mode 100644 src/scriptbindings/qtbindings/qtbindingsbase.pri create mode 100644 src/scriptbindings/qtbindings/qtscript_core/include/__package_shared.h create mode 100644 src/scriptbindings/qtbindings/qtscript_core/plugin.cpp create mode 100644 src/scriptbindings/qtbindings/qtscript_core/plugin.h create mode 100644 src/scriptbindings/qtbindings/qtscript_core/qtscript_core.pro create mode 100644 src/scriptbindings/qtbindings/qtscript_core/qtscriptconcurrent.h create mode 100644 src/scriptbindings/qtbindings/qtscript_custom/include/__package_shared.h create mode 100644 src/scriptbindings/qtbindings/qtscript_custom/plugin.cpp create mode 100644 src/scriptbindings/qtbindings/qtscript_custom/plugin.h create mode 100644 src/scriptbindings/qtbindings/qtscript_custom/qtscript_custom.pro create mode 100644 src/scriptbindings/qtbindings/qtscript_gui/include/__package_shared.h create mode 100644 src/scriptbindings/qtbindings/qtscript_gui/plugin.cpp create mode 100644 src/scriptbindings/qtbindings/qtscript_gui/plugin.h create mode 100644 src/scriptbindings/qtbindings/qtscript_gui/qtscript_gui.pro create mode 100644 src/scriptbindings/qtbindings/qtscript_multimedia/include/__package_shared.h create mode 100644 src/scriptbindings/qtbindings/qtscript_multimedia/plugin.cpp create mode 100644 src/scriptbindings/qtbindings/qtscript_multimedia/plugin.h create mode 100644 src/scriptbindings/qtbindings/qtscript_multimedia/qtscript_multimedia.pro create mode 100644 src/scriptbindings/qtbindings/qtscript_network/include/__package_shared.h create mode 100644 src/scriptbindings/qtbindings/qtscript_network/plugin.cpp create mode 100644 src/scriptbindings/qtbindings/qtscript_network/plugin.h create mode 100644 src/scriptbindings/qtbindings/qtscript_network/qtscript_network.pro create mode 100644 src/scriptbindings/qtbindings/qtscript_opengl/include/__package_shared.h create mode 100644 src/scriptbindings/qtbindings/qtscript_opengl/plugin.cpp create mode 100644 src/scriptbindings/qtbindings/qtscript_opengl/plugin.h create mode 100644 src/scriptbindings/qtbindings/qtscript_opengl/qtscript_opengl.pro create mode 100644 src/scriptbindings/qtbindings/qtscript_printsupport/include/__package_shared.h create mode 100644 src/scriptbindings/qtbindings/qtscript_printsupport/plugin.cpp create mode 100644 src/scriptbindings/qtbindings/qtscript_printsupport/plugin.h create mode 100644 src/scriptbindings/qtbindings/qtscript_printsupport/qtscript_printsupport.pro create mode 100644 src/scriptbindings/qtbindings/qtscript_sql/include/__package_shared.h create mode 100644 src/scriptbindings/qtbindings/qtscript_sql/plugin.cpp create mode 100644 src/scriptbindings/qtbindings/qtscript_sql/plugin.h create mode 100644 src/scriptbindings/qtbindings/qtscript_sql/qtscript_sql.pro create mode 100644 src/scriptbindings/qtbindings/qtscript_uitools/include/__package_shared.h create mode 100644 src/scriptbindings/qtbindings/qtscript_uitools/plugin.cpp create mode 100644 src/scriptbindings/qtbindings/qtscript_uitools/plugin.h create mode 100644 src/scriptbindings/qtbindings/qtscript_uitools/qtscript_uitools.pro create mode 100644 src/scriptbindings/qtbindings/qtscript_widgets/include/__package_shared.h create mode 100644 src/scriptbindings/qtbindings/qtscript_widgets/plugin.cpp create mode 100644 src/scriptbindings/qtbindings/qtscript_widgets/plugin.h create mode 100644 src/scriptbindings/qtbindings/qtscript_widgets/qtscript_widgets.pro create mode 100644 src/scriptbindings/qtbindings/qtscript_xml/include/__package_shared.h create mode 100644 src/scriptbindings/qtbindings/qtscript_xml/plugin.cpp create mode 100644 src/scriptbindings/qtbindings/qtscript_xml/plugin.h create mode 100644 src/scriptbindings/qtbindings/qtscript_xml/qtscript_xml.pro create mode 100644 src/scriptbindings/scriptbindings.pro diff --git a/.gitignore b/.gitignore index 295c0ff0..a501f30c 100644 --- a/.gitignore +++ b/.gitignore @@ -71,4 +71,10 @@ Makefile* bin #wrappers -*_wrapper.bat \ No newline at end of file +*_wrapper.bat + +#pdb +*.pdb + +#script bindings binaries +src/scriptbindings/plugins/script \ No newline at end of file diff --git a/candle.pro b/candle.pro index 63bde4d3..b71614ed 100644 --- a/candle.pro +++ b/candle.pro @@ -2,7 +2,8 @@ TEMPLATE = subdirs SUBDIRS = src/designerplugins \ src/candle \ - src/candleplugins + src/candleplugins \ + src/scriptbindings # Make plugins translations system(qmake src/candleplugins/candleplugins.pro) @@ -11,7 +12,7 @@ install_main.path = bin install_main.files += src/candle/release/candle.exe install_plugins.path = bin/plugins -install_plugins.files = src/candleplugins/camera src/candleplugins/test1 +install_plugins.files = src/candleplugins/camera src/candleplugins/test1 src/candleplugins/usercommands install_translations.path = bin/translations install_translations.files = src/candle/translations/* @@ -19,4 +20,7 @@ install_translations.files = src/candle/translations/* install_license.path = bin install_license.files = LICENSE -INSTALLS += install_main install_plugins install_translations install_license +install_scriptbindings.path = bin/script +install_scriptbindings.files = src/scriptbindings/plugins/script/*.dll + +INSTALLS += install_main install_plugins install_translations install_license install_scriptbindings diff --git a/src/candle/Candle_resource.rc b/src/candle/Candle_resource.rc index 25cf0ddd..753022c8 100644 --- a/src/candle/Candle_resource.rc +++ b/src/candle/Candle_resource.rc @@ -7,8 +7,8 @@ IDI_ICON1 ICON DISCARDABLE "D:\\prj\\qtcode\\prj\\candle\\src\\candle\\images\\candle.ico" VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,2,9,1b - PRODUCTVERSION 1,2,9,1b + FILEVERSION 0,0,0,0 + PRODUCTVERSION 0,0,0,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS VS_FF_DEBUG @@ -25,11 +25,11 @@ VS_VERSION_INFO VERSIONINFO BEGIN VALUE "CompanyName", "\0" VALUE "FileDescription", "\0" - VALUE "FileVersion", "1.2.9.1b\0" + VALUE "FileVersion", "0.0.0.0\0" VALUE "LegalCopyright", "\0" VALUE "OriginalFilename", "Candle.exe\0" VALUE "ProductName", "Candle\0" - VALUE "ProductVersion", "1.2.9.1b\0" + VALUE "ProductVersion", "0.0.0.0\0" END END BLOCK "VarFileInfo" diff --git a/src/candle/candle.pro b/src/candle/candle.pro index b9527b12..0386fc6f 100644 --- a/src/candle/candle.pro +++ b/src/candle/candle.pro @@ -29,11 +29,9 @@ contains(QT_CONFIG, opengles.) { TARGET = Candle TEMPLATE = app -VERSION = 1.2.9.1b RC_ICONS += images/candle.ico DEFINES += sNan=\"65536\" -DEFINES += APP_VERSION=\\\"$$VERSION\\\" TRANSLATIONS += translations/candle_en.ts translations/candle_ru.ts translations/candle_es.ts translations/candle_fr.ts translations/candle_pt.ts @@ -56,20 +54,16 @@ SOURCES += main.cpp\ parser/pointsegment.cpp \ tables/gcodetablemodel.cpp \ tables/heightmaptablemodel.cpp \ - widgets/colorpicker.cpp \ widgets/combobox.cpp \ + widgets/comboboxkey.cpp \ widgets/groupbox.cpp \ widgets/scrollarea.cpp \ - widgets/styledtoolbutton.cpp \ widgets/widget.cpp \ widgets/glwidget.cpp \ - widgets/slider.cpp \ - widgets/sliderbox.cpp \ drawers/selectiondrawer.cpp \ - widgets/comboboxkey.cpp \ scriptvars.cpp \ - widgets/dropwidget.cpp \ - widgets/uiloader.cpp + scriptfunctions.cpp \ + widgets/dropwidget.cpp HEADERS += frmmain.h \ frmsettings.h \ @@ -91,28 +85,27 @@ HEADERS += frmmain.h \ tables/heightmaptablemodel.h \ utils/interpolation.h \ utils/util.h \ - widgets/colorpicker.h \ widgets/combobox.h \ + widgets/comboboxkey.h \ widgets/groupbox.h \ widgets/scrollarea.h \ - widgets/styledtoolbutton.h \ widgets/widget.h \ widgets/glwidget.h \ - widgets/slider.h \ - widgets/sliderbox.h \ drawers/selectiondrawer.h \ - widgets/comboboxkey.h \ scriptvars.h \ - widgets/dropwidget.h \ - widgets/uiloader.h + scriptfunctions.h \ + widgets/dropwidget.h FORMS += frmmain.ui \ frmsettings.ui \ - frmabout.ui \ - widgets/sliderbox.ui + frmabout.ui DEFINES += _USE_MATH_DEFINES RESOURCES += \ shaders.qrc \ - images.qrc \ No newline at end of file + images.qrc + +INCLUDEPATH += ../designerplugins/customwidgetsplugin + +LIBS += -L../designerplugins/customwidgetsplugin/release -lcustomwidgets \ No newline at end of file diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index 3f1509d1..521c3a85 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -29,11 +29,11 @@ #include #include #include +#include #include "frmmain.h" #include "ui_frmmain.h" #include "ui_frmsettings.h" #include "widgets/widgetmimedata.h" -#include "widgets/uiloader.h" frmMain::frmMain(QWidget *parent) : QMainWindow(parent), @@ -84,14 +84,12 @@ frmMain::frmMain(QWidget *parent) : << "palette(text)" << "white" << "black"; - m_fileChanged = false; m_heightMapChanged = false; m_homing = false; m_updateSpindleSpeed = false; m_updateParserStatus = false; - m_updateFeed = false; m_reseting = false; m_resetCompleted = true; @@ -102,11 +100,7 @@ frmMain::frmMain(QWidget *parent) : m_transferCompleted = false; m_fileEndSent = false; - m_keyPressed = false; - m_jogBlock = false; - m_spindleCW = true; - m_spindleCommandSpeed = false; // Loading settings m_settingsFileName = qApp->applicationDirPath() + "/settings.ini"; @@ -115,7 +109,7 @@ frmMain::frmMain(QWidget *parent) : m_settings = new frmSettings(this); ui->setupUi(this); - // Drop frames + // Drag&drop placeholders ui->fraDropDevice->setVisible(false); ui->fraDropModification->setVisible(false); ui->fraDropUser->setVisible(false); @@ -135,7 +129,6 @@ frmMain::frmMain(QWidget *parent) : m_heightMapMode = false; m_lastDrawnLineIndex = 0; m_fileProcessedCommandIndex = 0; - m_cellChanged = false; m_programLoading = false; m_currentModel = &m_programModel; m_transferCompleted = true; @@ -240,7 +233,6 @@ frmMain::frmMain(QWidget *parent) : ui->glwVisualizer->addDrawable(&m_selectionDrawer); ui->glwVisualizer->fitDrawable(); - connect(ui->glwVisualizer, SIGNAL(rotationChanged()), this, SLOT(onVisualizatorRotationChanged())); connect(ui->glwVisualizer, SIGNAL(resized()), this, SLOT(placeVisualizerButtons())); connect(&m_programModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(onTableCellChanged(QModelIndex,QModelIndex))); connect(&m_programHeightmapModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(onTableCellChanged(QModelIndex,QModelIndex))); @@ -257,6 +249,20 @@ frmMain::frmMain(QWidget *parent) : QMessageBox::Ignore | QMessageBox::Abort, this); m_senderErrorBox->setCheckBox(new QCheckBox(tr("Don't show again"))); + // Prepare script functions + m_scriptFunctions.setFrmMain(this); + connect(this, &frmMain::responseReceived, &m_scriptFunctions, &ScriptFunctions::responseReceived); + connect(this, &frmMain::statusReceived, &m_scriptFunctions, &ScriptFunctions::statusReceived); + connect(this, &frmMain::statusChanged, &m_scriptFunctions, &ScriptFunctions::statusChanged); + connect(this, &frmMain::settingsAboutToLoad, &m_scriptFunctions, &ScriptFunctions::settingsAboutToLoad); + connect(this, &frmMain::settingsLoaded, &m_scriptFunctions, &ScriptFunctions::settingsLoaded); + connect(this, &frmMain::settingsAboutToSave, &m_scriptFunctions, &ScriptFunctions::settingsAboutToSave); + connect(this, &frmMain::settingsSaved, &m_scriptFunctions, &ScriptFunctions::settingsSaved); + connect(this, &frmMain::settingsAboutToShow, &m_scriptFunctions, &ScriptFunctions::settingsAboutToShow); + connect(this, &frmMain::settingsAccepted, &m_scriptFunctions, &ScriptFunctions::settingsAccepted); + connect(this, &frmMain::settingsRejected, &m_scriptFunctions, &ScriptFunctions::settingsRejected); + connect(this, &frmMain::pluginsLoaded, &m_scriptFunctions, &ScriptFunctions::pluginsLoaded); + // Loading settings loadSettings(); ui->tblProgram->hideColumn(4); @@ -287,61 +293,8 @@ frmMain::frmMain(QWidget *parent) : m_serialPort.setBaudRate(m_settings->baud()); } - // Setup actions - addAction(ui->actControlHome); - addAction(ui->actControlTouch); - addAction(ui->actControlZeroXY); - addAction(ui->actControlZeroZ); - addAction(ui->actControlRestoreOrigin); - addAction(ui->actControlSafePosition); - addAction(ui->actControlReset); - addAction(ui->actControlUnlock); - addAction(ui->actUserCommand1); - addAction(ui->actUserCommand2); - addAction(ui->actUserCommand3); - addAction(ui->actUserCommand4); - - addAction(ui->actVisualizerFit); - addAction(ui->actVisualizerIsometric); - addAction(ui->actVisualizerTop); - addAction(ui->actVisualizerFront); - addAction(ui->actVisualizerLeft); - - addAction(ui->actProgramCheck); - addAction(ui->actProgramScroll); - addAction(ui->actProgramReset); - addAction(ui->actProgramSend); - addAction(ui->actProgramPause); - addAction(ui->actProgramAbort); - - addAction(ui->actHeightmapUse); - addAction(ui->actHeightmapCreate); - addAction(ui->actHeightmapOpen); - addAction(ui->actHeightmapEdit); - addAction(ui->actHeightmapShowBorder); - addAction(ui->actHeightmapShowProbeGrid); - addAction(ui->actHeightmapShowInterpolationGrid); - - addAction(ui->actJogStop); - addAction(ui->actJogStepNext); - addAction(ui->actJogStepPrevious); - addAction(ui->actJogFeedNext); - addAction(ui->actJogFeedPrevious); - addAction(ui->actJogKeyboardControl); - addAction(ui->actSpindleSpeedPlus); - addAction(ui->actSpindleSpeedMinus); - addAction(ui->actSpindleOnOff); - addAction(ui->actOverrideFeed); - addAction(ui->actOverrideFeedPlus); - addAction(ui->actOverrideFeedMinus); - addAction(ui->actOverrideRapid); - addAction(ui->actOverrideRapidPlus); - addAction(ui->actOverrideRapidMinus); - addAction(ui->actOverrideSpindle); - addAction(ui->actOverrideSpindlePlus); - addAction(ui->actOverrideSpindleMinus); - - addAction(ui->actConsoleClear); + // Enable form actions + foreach (QAction* a, findChildren()) addAction(a); // Handle file drop if (qApp->arguments().count() > 1 && isGCodeFile(qApp->arguments().last())) { @@ -357,6 +310,7 @@ frmMain::frmMain(QWidget *parent) : connect(&m_serialPort, SIGNAL(error(QSerialPort::SerialPortError)), this, SLOT(onSerialPortError(QSerialPort::SerialPortError))); connect(&m_timerConnection, SIGNAL(timeout()), this, SLOT(onTimerConnection())); connect(&m_timerStateQuery, SIGNAL(timeout()), this, SLOT(onTimerStateQuery())); + connect(&m_scriptEngine, &QScriptEngine::signalHandlerException, this, &frmMain::onScriptException); // Event filter qApp->installEventFilter(this); @@ -372,1855 +326,1865 @@ frmMain::~frmMain() delete ui; } -bool frmMain::isGCodeFile(QString fileName) +void frmMain::showEvent(QShowEvent *se) { - return fileName.endsWith(".txt", Qt::CaseInsensitive) - || fileName.endsWith(".nc", Qt::CaseInsensitive) - || fileName.endsWith(".ncc", Qt::CaseInsensitive) - || fileName.endsWith(".ngc", Qt::CaseInsensitive) - || fileName.endsWith(".tap", Qt::CaseInsensitive); -} + Q_UNUSED(se) -bool frmMain::isHeightmapFile(QString fileName) -{ - return fileName.endsWith(".map", Qt::CaseInsensitive); + placeVisualizerButtons(); + +#ifdef WINDOWS + if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { + if (m_taskBarButton == NULL) { + m_taskBarButton = new QWinTaskbarButton(this); + m_taskBarButton->setWindow(this->windowHandle()); + m_taskBarProgress = m_taskBarButton->progress(); + } + } +#endif } -double frmMain::toolZPosition() +void frmMain::hideEvent(QHideEvent *he) { - return m_toolDrawer.toolPosition().z(); + Q_UNUSED(he) } -void frmMain::preloadSettings() +void frmMain::resizeEvent(QResizeEvent *re) { - QSettings set(m_settingsFileName, QSettings::IniFormat); - set.setIniCodec("UTF-8"); + Q_UNUSED(re) - qApp->setStyleSheet(QString(qApp->styleSheet()).replace(QRegExp("font-size:\\s*\\d+"), "font-size: " + set.value("fontSize", "8").toString())); + placeVisualizerButtons(); + resizeTableHeightMapSections(); +} - // Update v-sync in glformat - QGLFormat fmt = QGLFormat::defaultFormat(); - fmt.setSwapInterval(set.value("vsync", false).toBool() ? 1 : 0); - QGLFormat::setDefaultFormat(fmt); +void frmMain::timerEvent(QTimerEvent *te) +{ + if (te->timerId() == m_timerToolAnimation.timerId()) { + m_toolDrawer.rotate((m_spindleCW ? -40 : 40) * (double)(ui->slbSpindle->currentValue()) + / (ui->slbSpindle->maximum())); + } else { + QMainWindow::timerEvent(te); + } } -void frmMain::loadSettings() +void frmMain::closeEvent(QCloseEvent *ce) { - QSettings set(m_settingsFileName, QSettings::IniFormat); - set.setIniCodec("UTF-8"); + bool mode = m_heightMapMode; + m_heightMapMode = false; - m_settingsLoading = true; + if (!saveChanges(m_heightMapMode)) { + ce->ignore(); + m_heightMapMode = mode; + return; + } - emit settingsAboutToLoad(); + if (m_processingFile && QMessageBox::warning(this, this->windowTitle(), tr("File sending in progress. Terminate and exit?"), + QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) { + ce->ignore(); + m_heightMapMode = mode; + return; + } - m_settings->setFontSize(set.value("fontSize", 8).toInt()); - m_settings->setPort(set.value("port").toString()); - m_settings->setBaud(set.value("baud").toInt()); - m_settings->setIgnoreErrors(set.value("ignoreErrors", false).toBool()); - m_settings->setAutoLine(set.value("autoLine", true).toBool()); - m_settings->setToolDiameter(set.value("toolDiameter", 3).toDouble()); - m_settings->setToolLength(set.value("toolLength", 15).toDouble()); - m_settings->setAntialiasing(set.value("antialiasing", true).toBool()); - m_settings->setMsaa(set.value("msaa", true).toBool()); - m_settings->setVsync(set.value("vsync", false).toBool()); - m_settings->setZBuffer(set.value("zBuffer", false).toBool()); - m_settings->setSimplify(set.value("simplify", false).toBool()); - m_settings->setSimplifyPrecision(set.value("simplifyPrecision", 0).toDouble()); - m_settings->setGrayscaleSegments(set.value("grayscaleSegments", false).toBool()); - m_settings->setGrayscaleSCode(set.value("grayscaleSCode", true).toBool()); - m_settings->setDrawModeVectors(set.value("drawModeVectors", true).toBool()); - m_settings->setLineWidth(set.value("lineWidth", 1).toDouble()); - m_settings->setArcLength(set.value("arcLength", 0).toDouble()); - m_settings->setArcDegree(set.value("arcDegree", 0).toDouble()); - m_settings->setArcDegreeMode(set.value("arcDegreeMode", true).toBool()); - m_settings->setShowProgramCommands(set.value("showProgramCommands", 0).toBool()); - m_settings->setShowUICommands(set.value("showUICommands", 0).toBool()); - m_settings->setSpindleSpeedMin(set.value("spindleSpeedMin", 0).toInt()); - m_settings->setSpindleSpeedMax(set.value("spindleSpeedMax", 100).toInt()); - m_settings->setLaserPowerMin(set.value("laserPowerMin", 0).toInt()); - m_settings->setLaserPowerMax(set.value("laserPowerMax", 100).toInt()); - m_settings->setRapidSpeed(set.value("rapidSpeed", 0).toInt()); - m_settings->setAcceleration(set.value("acceleration", 10).toInt()); - m_settings->setToolAngle(set.value("toolAngle", 0).toDouble()); - m_settings->setToolType(set.value("toolType", 0).toInt()); - m_settings->setFps(set.value("fps", 60).toInt()); - m_settings->setQueryStateTime(set.value("queryStateTime", 250).toInt()); + if (m_serialPort.isOpen()) m_serialPort.close(); + if (m_queue.length() > 0) { + m_commands.clear(); + m_queue.clear(); + } - ui->chkAutoScroll->setChecked(set.value("autoScroll", false).toBool()); + saveSettings(); +} - ui->slbSpindle->setRatio(100); - ui->slbSpindle->setMinimum(m_settings->spindleSpeedMin()); - ui->slbSpindle->setMaximum(m_settings->spindleSpeedMax()); - ui->slbSpindle->setValue(set.value("spindleSpeed", 100).toInt()); +void frmMain::dragEnterEvent(QDragEnterEvent *dee) +{ + if (m_processingFile) return; - ui->slbFeedOverride->setChecked(set.value("feedOverride", false).toBool()); - ui->slbFeedOverride->setValue(set.value("feedOverrideValue", 100).toInt()); + if (dee->mimeData()->hasFormat("application/widget")) return; - ui->slbRapidOverride->setChecked(set.value("rapidOverride", false).toBool()); - ui->slbRapidOverride->setValue(set.value("rapidOverrideValue", 100).toInt()); + if (dee->mimeData()->hasFormat("text/plain") && !m_heightMapMode) dee->acceptProposedAction(); + else if (dee->mimeData()->hasFormat("text/uri-list") && dee->mimeData()->urls().count() == 1) { + QString fileName = dee->mimeData()->urls().at(0).toLocalFile(); - ui->slbSpindleOverride->setChecked(set.value("spindleOverride", false).toBool()); - ui->slbSpindleOverride->setValue(set.value("spindleOverrideValue", 100).toInt()); + if ((!m_heightMapMode && isGCodeFile(fileName)) + || (m_heightMapMode && isHeightmapFile(fileName))) + dee->acceptProposedAction(); + } +} - m_settings->setUnits(set.value("units", 0).toInt()); +void frmMain::dropEvent(QDropEvent *de) +{ + QString fileName = de->mimeData()->urls().at(0).toLocalFile(); - m_recentFiles = set.value("recentFiles", QStringList()).toStringList(); - m_recentHeightmaps = set.value("recentHeightmaps", QStringList()).toStringList(); - m_lastFolder = set.value("lastFolder", QDir::homePath()).toString(); + if (!m_heightMapMode) { + if (!saveChanges(false)) return; - this->restoreGeometry(set.value("formGeometry", QByteArray()).toByteArray()); + // Load dropped g-code file + if (!fileName.isEmpty()) { + addRecentFile(fileName); + updateRecentFilesMenu(); + loadFile(fileName); + // Load dropped text + } else { + m_programFileName.clear(); + m_fileChanged = true; + loadFile(de->mimeData()->text().split("\n")); + } + } else { + if (!saveChanges(true)) return; - ui->cboCommand->setMinimumHeight(ui->cboCommand->height()); - ui->cmdClearConsole->setFixedHeight(ui->cboCommand->height()); - ui->cmdCommandSend->setFixedHeight(ui->cboCommand->height()); + // Load dropped heightmap file + addRecentHeightmap(fileName); + updateRecentFilesMenu(); + loadHeightMap(fileName); + } +} - m_storedKeyboardControl = set.value("keyboardControl", false).toBool(); +QMenu *frmMain::createPopupMenu() +{ + QMenu *menu = QMainWindow::createPopupMenu(); - m_settings->setAutoCompletion(set.value("autoCompletion", true).toBool()); + foreach (QAction *a, menu->actions()) { + if (a->text().contains("_spacer")) { + a->setVisible(false); + } + } - foreach (StyledToolButton* button, this->findChildren(QRegExp("cmdUser\\d"))) { - int i = button->objectName().right(1).toInt(); - m_settings->setUserCommands(i, set.value(QString("userCommands%1").arg(i)).toString()); - } + return menu; +} - QStringList steps = set.value("jogSteps").toStringList(); - if (steps.count() > 0) { - steps.insert(0, ui->cboJogStep->items().first()); - ui->cboJogStep->setItems(steps); - } - ui->cboJogStep->setCurrentIndex(ui->cboJogStep->findText(set.value("jogStep").toString())); - ui->cboJogFeed->setItems(set.value("jogFeeds").toStringList()); - ui->cboJogFeed->setCurrentIndex(ui->cboJogFeed->findText(set.value("jogFeed").toString())); +void frmMain::on_actFileNew_triggered() +{ + if (!saveChanges(m_heightMapMode)) return; - ui->txtHeightMapBorderX->setValue(set.value("heightmapBorderX", 0).toDouble()); - ui->txtHeightMapBorderY->setValue(set.value("heightmapBorderY", 0).toDouble()); - ui->txtHeightMapBorderWidth->setValue(set.value("heightmapBorderWidth", 1).toDouble()); - ui->txtHeightMapBorderHeight->setValue(set.value("heightmapBorderHeight", 1).toDouble()); - ui->chkHeightMapBorderShow->setChecked(set.value("heightmapBorderShow", false).toBool()); + if (!m_heightMapMode) { + // Reset tables + clearTable(); + m_probeModel.clear(); + m_programHeightmapModel.clear(); + m_currentModel = &m_programModel; - ui->txtHeightMapGridX->setValue(set.value("heightmapGridX", 1).toDouble()); - ui->txtHeightMapGridY->setValue(set.value("heightmapGridY", 1).toDouble()); - ui->txtHeightMapGridZTop->setValue(set.value("heightmapGridZTop", 1).toDouble()); - ui->txtHeightMapGridZBottom->setValue(set.value("heightmapGridZBottom", -1).toDouble()); - ui->txtHeightMapProbeFeed->setValue(set.value("heightmapProbeFeed", 10).toDouble()); - ui->chkHeightMapGridShow->setChecked(set.value("heightmapGridShow", false).toBool()); + // Reset parsers + m_viewParser.reset(); + m_probeParser.reset(); - ui->txtHeightMapInterpolationStepX->setValue(set.value("heightmapInterpolationStepX", 1).toDouble()); - ui->txtHeightMapInterpolationStepY->setValue(set.value("heightmapInterpolationStepY", 1).toDouble()); - ui->cboHeightMapInterpolationType->setCurrentIndex(set.value("heightmapInterpolationType", 0).toInt()); - ui->chkHeightMapInterpolationShow->setChecked(set.value("heightmapInterpolationShow", false).toBool()); + // Reset code drawer + m_codeDrawer->update(); + m_currentDrawer = m_codeDrawer; + ui->glwVisualizer->fitDrawable(); + updateProgramEstimatedTime(QList()); - foreach (ColorPicker* pick, m_settings->colors()) { - pick->setColor(QColor(set.value(pick->objectName().mid(3), "black").toString())); - } + m_programFileName = ""; + ui->chkHeightMapUse->setChecked(false); + ui->grpHeightMap->setProperty("overrided", false); + style()->unpolish(ui->grpHeightMap); + ui->grpHeightMap->ensurePolished(); - updateRecentFilesMenu(); + // Reset tableview + QByteArray headerState = ui->tblProgram->horizontalHeader()->saveState(); + ui->tblProgram->setModel(NULL); - ui->tblProgram->horizontalHeader()->restoreState(set.value("header", QByteArray()).toByteArray()); + // Set table model + ui->tblProgram->setModel(&m_programModel); + ui->tblProgram->horizontalHeader()->restoreState(headerState); - // Apply settings - applySettings(); + // Update tableview + connect(ui->tblProgram->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(onTableCurrentChanged(QModelIndex,QModelIndex))); + ui->tblProgram->selectRow(0); - // Restore last commands list - ui->cboCommand->addItems(set.value("recentCommands", QStringList()).toStringList()); - ui->cboCommand->setCurrentIndex(-1); + // Clear selection marker + m_selectionDrawer.setEndPosition(QVector3D(sNan, sNan, sNan)); + m_selectionDrawer.update(); - // Load plugins - loadPlugins(); + resetHeightmap(); + } else { + m_heightMapModel.clear(); + on_cmdFileReset_clicked(); + ui->txtHeightMap->setText(tr("Untitled")); + m_heightMapFileName.clear(); - // Adjust docks width - int w = qMax(ui->dockDevice->widget()->sizeHint().width(), - ui->dockModification->widget()->sizeHint().width()); - ui->dockDevice->setMinimumWidth(w); - ui->dockDevice->setMaximumWidth(w + ui->scrollArea->verticalScrollBar()->width()); - ui->dockModification->setMinimumWidth(w); - ui->dockModification->setMaximumWidth(w + ui->scrollArea->verticalScrollBar()->width()); - ui->dockUser->setMinimumWidth(w); - ui->dockUser->setMaximumWidth(w + ui->scrollArea->verticalScrollBar()->width()); + updateHeightMapBorderDrawer(); + updateHeightMapGrid(); - // Buttons - int b = (w - ui->grpControl->layout()->margin() * 2 - ui->grpControl->layout()->spacing() * 3) / 4 * 0.8; - int c = b * 0.8; - setStyleSheet(styleSheet() + QString("\nStyledToolButton[adjustSize='true'] {\n\ - min-width: %1px;\n\ - min-height: %1px;\n\ - qproperty-iconSize: %2px;\n\ - }").arg(b).arg(c)); - ensurePolished(); + m_heightMapChanged = false; + } - foreach (QDockWidget *w, findChildren()) w->setStyleSheet(""); + updateControlsState(); +} - // Restore docks - // Signals/slots - foreach (QDockWidget *w, findChildren()) - connect(w, &QDockWidget::topLevelChanged, this, &frmMain::onDockTopLevelChanged); +void frmMain::on_actFileOpen_triggered() +{ + on_cmdFileOpen_clicked(); +} - // Panels - ui->scrollContentsDevice->restoreState(this, set.value("panelsDevice").toStringList()); - ui->scrollContentsModification->restoreState(this, set.value("panelsModification").toStringList()); - ui->scrollContentsUser->restoreState(this, set.value("panelsUser").toStringList()); +void frmMain::on_actFileSave_triggered() +{ + if (!m_heightMapMode) { + // G-code saving + if (m_programFileName.isEmpty()) on_actFileSaveAs_triggered(); else { + saveProgramToFile(m_programFileName, &m_programModel); + m_fileChanged = false; + } + } else { + // Height map saving + if (m_heightMapFileName.isEmpty()) on_actFileSaveAs_triggered(); else saveHeightMap(m_heightMapFileName); + } +} - QStringList hiddenPanels = set.value("hiddenPanels").toStringList(); - foreach (QString s, hiddenPanels) { - QGroupBox *b = findChild(s); - if (b) b->setHidden(true); - } +void frmMain::on_actFileSaveAs_triggered() +{ + if (!m_heightMapMode) { + QString fileName = (QFileDialog::getSaveFileName(this, tr("Save file as"), m_lastFolder, tr("G-Code files (*.nc *.ncc *.ngc *.tap *.txt)"))); - QStringList collapsedPanels = set.value("collapsedPanels").toStringList(); - foreach (QString s, collapsedPanels) { - QGroupBox *b = findChild(s); - if (b) b->setChecked(false); - } + if (!fileName.isEmpty()) if (saveProgramToFile(fileName, &m_programModel)) { + m_programFileName = fileName; + m_fileChanged = false; - // Normal window state - restoreState(set.value("formMainState").toByteArray()); + addRecentFile(fileName); + updateRecentFilesMenu(); - // Maximized window state - show(); - qApp->processEvents(); - restoreState(set.value("formMainState").toByteArray()); + updateControlsState(); + } + } else { + QString fileName = (QFileDialog::getSaveFileName(this, tr("Save file as"), m_lastFolder, tr("Heightmap files (*.map)"))); - // Setup coords textboxes - setupCoordsTextboxes(); + if (!fileName.isEmpty()) if (saveHeightMap(fileName)) { + ui->txtHeightMap->setText(fileName.mid(fileName.lastIndexOf("/") + 1)); + m_heightMapFileName = fileName; + m_heightMapChanged = false; - // Settings form geometry - // m_settings->restoreGeometry(set.value("formSettingsGeometry").toByteArray()); - m_settings->ui->splitMain->restoreState(set.value("settingsSplitMain").toByteArray()); + addRecentHeightmap(fileName); + updateRecentFilesMenu(); - // Shortcuts - qRegisterMetaTypeStreamOperators("ShortcutsMap"); - - ShortcutsMap m; - QByteArray ba = set .value("shortcuts").toByteArray(); - QDataStream s(&ba, QIODevice::ReadOnly); - - s >> m; - for (int i = 0; i < m.count(); i++) { - QAction *a = findChild(m.keys().at(i)); - if (a) a->setShortcuts(m.values().at(i)); + updateControlsState(); + } } +} - // Menu - ui->actViewLockWindows->setChecked(set.value("lockWindows").toBool()); - ui->actViewLockPanels->setChecked(set.value("lockPanels").toBool()); - - m_settings->restoreGeometry(set.value("formSettingsGeometry", m_settings->saveGeometry()).toByteArray()); +void frmMain::on_actFileSaveTransformedAs_triggered() +{ + QString fileName = (QFileDialog::getSaveFileName(this, tr("Save file as"), m_lastFolder, tr("G-Code files (*.nc *.ncc *.ngc *.tap *.txt)"))); - emit settingsLoaded(); - m_settingsLoading = false; + if (!fileName.isEmpty()) { + saveProgramToFile(fileName, &m_programHeightmapModel); + } } -void frmMain::saveSettings() +void frmMain::on_actRecentClear_triggered() { - QSettings set(m_settingsFileName, QSettings::IniFormat); - set.setIniCodec("UTF-8"); + if (!m_heightMapMode) m_recentFiles.clear(); else m_recentHeightmaps.clear(); + updateRecentFilesMenu(); +} - emit settingsAboutToSave(); +void frmMain::on_actFileExit_triggered() +{ + close(); +} - set.setValue("port", m_settings->port()); - set.setValue("baud", m_settings->baud()); - set.setValue("ignoreErrors", m_settings->ignoreErrors()); - set.setValue("autoLine", m_settings->autoLine()); - set.setValue("toolDiameter", m_settings->toolDiameter()); - set.setValue("toolLength", m_settings->toolLength()); - set.setValue("antialiasing", m_settings->antialiasing()); - set.setValue("msaa", m_settings->msaa()); - set.setValue("vsync", m_settings->vsync()); - set.setValue("zBuffer", m_settings->zBuffer()); - set.setValue("simplify", m_settings->simplify()); - set.setValue("simplifyPrecision", m_settings->simplifyPrecision()); - set.setValue("grayscaleSegments", m_settings->grayscaleSegments()); - set.setValue("grayscaleSCode", m_settings->grayscaleSCode()); - set.setValue("drawModeVectors", m_settings->drawModeVectors()); +void frmMain::on_actServiceSettings_triggered() +{ + QList acts = findChildren(QRegExp("act.*")); + QTableWidget *table = m_settings->ui->tblShortcuts; - set.setValue("spindleSpeed", ui->slbSpindle->value()); - set.setValue("lineWidth", m_settings->lineWidth()); - set.setValue("arcLength", m_settings->arcLength()); - set.setValue("arcDegree", m_settings->arcDegree()); - set.setValue("arcDegreeMode", m_settings->arcDegreeMode()); - set.setValue("showProgramCommands", m_settings->showProgramCommands()); - set.setValue("showUICommands", m_settings->showUICommands()); - set.setValue("spindleSpeedMin", m_settings->spindleSpeedMin()); - set.setValue("spindleSpeedMax", m_settings->spindleSpeedMax()); - set.setValue("laserPowerMin", m_settings->laserPowerMin()); - set.setValue("laserPowerMax", m_settings->laserPowerMax()); - set.setValue("rapidSpeed", m_settings->rapidSpeed()); - set.setValue("acceleration", m_settings->acceleration()); - set.setValue("toolAngle", m_settings->toolAngle()); - set.setValue("toolType", m_settings->toolType()); - set.setValue("fps", m_settings->fps()); - set.setValue("queryStateTime", m_settings->queryStateTime()); - set.setValue("autoScroll", ui->chkAutoScroll->isChecked()); - set.setValue("header", ui->tblProgram->horizontalHeader()->saveState()); - set.setValue("settingsSplitMain", m_settings->ui->splitMain->saveState()); - set.setValue("formGeometry", this->saveGeometry()); - set.setValue("formSettingsGeometry", m_settings->saveGeometry()); + table->clear(); + table->setColumnCount(3); + table->setRowCount(acts.count()); + table->setHorizontalHeaderLabels(QStringList() << tr("Command") << tr("Text") << tr("Shortcuts")); - set.setValue("autoCompletion", m_settings->autoCompletion()); - set.setValue("units", m_settings->units()); - set.setValue("recentFiles", m_recentFiles); - set.setValue("recentHeightmaps", m_recentHeightmaps); - set.setValue("lastFolder", m_lastFolder); - set.setValue("fontSize", m_settings->fontSize()); + table->verticalHeader()->setDefaultAlignment(Qt::AlignCenter); + table->verticalHeader()->setFixedWidth(table->verticalHeader()->sizeHint().width() + 11); - set.setValue("feedOverride", ui->slbFeedOverride->isChecked()); - set.setValue("feedOverrideValue", ui->slbFeedOverride->value()); - set.setValue("rapidOverride", ui->slbRapidOverride->isChecked()); - set.setValue("rapidOverrideValue", ui->slbRapidOverride->value()); - set.setValue("spindleOverride", ui->slbSpindleOverride->isChecked()); - set.setValue("spindleOverrideValue", ui->slbSpindleOverride->value()); + qSort(acts.begin(), acts.end(), frmMain::actionLessThan); + for (int i = 0; i < acts.count(); i++) { + table->setItem(i, 0, new QTableWidgetItem(acts.at(i)->objectName())); + table->setItem(i, 1, new QTableWidgetItem(acts.at(i)->text().remove("&"))); + table->setItem(i, 2, new QTableWidgetItem(acts.at(i)->shortcut().toString())); - foreach (StyledToolButton* button, this->findChildren(QRegExp("cmdUser\\d"))) { - int i = button->objectName().right(1).toInt(); - set.setValue(QString("userCommands%1").arg(i), m_settings->userCommands(i)); + table->item(i, 0)->setFlags(Qt::ItemIsEnabled); + table->item(i, 1)->setFlags(Qt::ItemIsEnabled); + table->item(i, 2)->setFlags(Qt::ItemIsEnabled | Qt::ItemIsEditable); } - set.setValue("jogSteps", (QStringList)ui->cboJogStep->items().mid(1, ui->cboJogStep->items().count() - 1)); - set.setValue("jogStep", ui->cboJogStep->currentText()); - set.setValue("jogFeeds", ui->cboJogFeed->items()); - set.setValue("jogFeed", ui->cboJogFeed->currentText()); - - set.setValue("heightmapBorderX", ui->txtHeightMapBorderX->value()); - set.setValue("heightmapBorderY", ui->txtHeightMapBorderY->value()); - set.setValue("heightmapBorderWidth", ui->txtHeightMapBorderWidth->value()); - set.setValue("heightmapBorderHeight", ui->txtHeightMapBorderHeight->value()); - set.setValue("heightmapBorderShow", ui->chkHeightMapBorderShow->isChecked()); + table->resizeColumnsToContents(); + table->setMinimumHeight(table->rowHeight(0) * 10 + + table->horizontalHeader()->height() + table->frameWidth() * 2); + table->horizontalHeader()->setMinimumSectionSize(table->horizontalHeader()->sectionSize(2)); + table->horizontalHeader()->setStretchLastSection(true); - set.setValue("heightmapGridX", ui->txtHeightMapGridX->value()); - set.setValue("heightmapGridY", ui->txtHeightMapGridY->value()); - set.setValue("heightmapGridZTop", ui->txtHeightMapGridZTop->value()); - set.setValue("heightmapGridZBottom", ui->txtHeightMapGridZBottom->value()); - set.setValue("heightmapProbeFeed", ui->txtHeightMapProbeFeed->value()); - set.setValue("heightmapGridShow", ui->chkHeightMapGridShow->isChecked()); + emit settingsAboutToShow(); - set.setValue("heightmapInterpolationStepX", ui->txtHeightMapInterpolationStepX->value()); - set.setValue("heightmapInterpolationStepY", ui->txtHeightMapInterpolationStepY->value()); - set.setValue("heightmapInterpolationType", ui->cboHeightMapInterpolationType->currentIndex()); - set.setValue("heightmapInterpolationShow", ui->chkHeightMapInterpolationShow->isChecked()); + if (m_settings->exec()) { + if (m_settings->port() != "" && (m_settings->port() != m_serialPort.portName() || + m_settings->baud() != m_serialPort.baudRate())) { + if (m_serialPort.isOpen()) m_serialPort.close(); + m_serialPort.setPortName(m_settings->port()); + m_serialPort.setBaudRate(m_settings->baud()); + openPort(); + } - foreach (ColorPicker* pick, m_settings->colors()) { - set.setValue(pick->objectName().mid(3), pick->color().name()); - } + updateControlsState(); + applySettings(); - QStringList list; + // Update shortcuts + for (int i = 0; i < acts.count(); i++) { + acts[i]->setShortcut(QKeySequence(table->item(i, 2)->data(Qt::DisplayRole).toString())); + } - for (int i = 0; i < ui->cboCommand->count(); i++) list.append(ui->cboCommand->itemText(i)); - set.setValue("recentCommands", list); + emit settingsAccepted(); - // Docks - set.setValue("formMainState", saveState()); + } else { + m_settings->undo(); - // Shortcuts - ShortcutsMap m; - QByteArray ba; - QDataStream s(&ba, QIODevice::WriteOnly); - QList acts = findChildren(QRegExp("act.*")); + emit settingsRejected(); + } +} - foreach (QAction *a, acts) m[a->objectName()] = a->shortcuts(); - s << m; - set.setValue("shortcuts", ba); +void frmMain::on_actAbout_triggered() +{ + m_frmAbout.exec(); +} - // Panels - set.setValue("panelsDevice", QVariant::fromValue(ui->scrollContentsDevice->saveState())); - set.setValue("panelsModification", QVariant::fromValue(ui->scrollContentsModification->saveState())); - set.setValue("panelsUser", QVariant::fromValue(ui->scrollContentsUser->saveState())); +void frmMain::on_actJogStepNext_triggered() +{ + ui->cboJogStep->setCurrentNext(); +} - QStringList panels; - QStringList hiddenPanels; - QStringList collapsedPanels; - if (ui->scrollContentsDevice->isVisible()) panels << ui->scrollContentsDevice->saveState(); - if (ui->scrollContentsModification->isVisible()) panels << ui->scrollContentsModification->saveState(); - if (ui->scrollContentsUser->isVisible()) panels << ui->scrollContentsUser->saveState(); - foreach (QString s, panels) { - QGroupBox *b = findChild(s); - if (b && b->isHidden()) hiddenPanels << s; - if (b && b->isCheckable() && !b->isChecked()) collapsedPanels << s; - } - set.setValue("hiddenPanels", hiddenPanels); - set.setValue("collapsedPanels", collapsedPanels); +void frmMain::on_actJogStepPrevious_triggered() +{ + ui->cboJogStep->setCurrentPrevious(); +} - // Menu - set.setValue("lockWindows", ui->actViewLockWindows->isChecked()); - set.setValue("lockPanels", ui->actViewLockPanels->isChecked()); +void frmMain::on_actJogFeedNext_triggered() +{ + ui->cboJogFeed->setCurrentNext(); +} - emit settingsSaved(); +void frmMain::on_actJogFeedPrevious_triggered() +{ + ui->cboJogFeed->setCurrentPrevious(); } -bool frmMain::saveChanges(bool heightMapMode) +void frmMain::on_actSpindleSpeedPlus_triggered() { - if ((!heightMapMode && m_fileChanged)) { - int res = QMessageBox::warning(this, this->windowTitle(), tr("G-code program file was changed. Save?"), - QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); - if (res == QMessageBox::Cancel) return false; - else if (res == QMessageBox::Yes) on_actFileSave_triggered(); - m_fileChanged = false; - } + ui->slbSpindle->setSliderPosition(ui->slbSpindle->sliderPosition() + 1); +} - if (m_heightMapChanged) { - int res = QMessageBox::warning(this, this->windowTitle(), tr("Heightmap file was changed. Save?"), - QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); - if (res == QMessageBox::Cancel) return false; - else if (res == QMessageBox::Yes) { - m_heightMapMode = true; - on_actFileSave_triggered(); - m_heightMapMode = heightMapMode; - updateRecentFilesMenu(); // Restore g-code files recent menu - } +void frmMain::on_actSpindleSpeedMinus_triggered() +{ + ui->slbSpindle->setSliderPosition(ui->slbSpindle->sliderPosition() - 1); +} - m_fileChanged = false; - } +void frmMain::on_actOverrideFeedPlus_triggered() +{ + ui->slbFeedOverride->setSliderPosition(ui->slbFeedOverride->sliderPosition() + 1); +} - return true; +void frmMain::on_actOverrideFeedMinus_triggered() +{ + ui->slbFeedOverride->setSliderPosition(ui->slbFeedOverride->sliderPosition() - 1); } -void frmMain::updateControlsState() { - bool portOpened = m_serialPort.isOpen(); +void frmMain::on_actOverrideRapidPlus_triggered() +{ + ui->slbRapidOverride->setSliderPosition(ui->slbRapidOverride->sliderPosition() + 1); +} - ui->grpState->setEnabled(portOpened); - ui->grpControl->setEnabled(portOpened); - ui->widgetUserCommands->setEnabled(portOpened && !m_processingFile); - ui->widgetSpindle->setEnabled(portOpened); - ui->widgetJog->setEnabled(portOpened && !m_processingFile); - ui->cboCommand->setEnabled(portOpened && (!ui->chkKeyboardControl->isChecked())); - ui->cmdCommandSend->setEnabled(portOpened); +void frmMain::on_actOverrideRapidMinus_triggered() +{ + ui->slbRapidOverride->setSliderPosition(ui->slbRapidOverride->sliderPosition() - 1); +} - ui->cmdCheck->setEnabled(portOpened && !m_processingFile); - ui->cmdHome->setEnabled(!m_processingFile); - ui->cmdCheck->setEnabled(!m_processingFile); - ui->cmdUnlock->setEnabled(!m_processingFile); - ui->cmdSpindle->setEnabled(!m_processingFile); +void frmMain::on_actOverrideSpindlePlus_triggered() +{ + ui->slbSpindleOverride->setSliderPosition(ui->slbSpindleOverride->sliderPosition() + 1); +} - ui->actFileNew->setEnabled(!m_processingFile); - ui->actFileOpen->setEnabled(!m_processingFile); - ui->cmdFileOpen->setEnabled(!m_processingFile); - ui->cmdFileReset->setEnabled(!m_processingFile && m_programModel.rowCount() > 1); - ui->cmdFileSend->setEnabled(portOpened && !m_processingFile && m_programModel.rowCount() > 1); - ui->cmdFilePause->setEnabled(m_processingFile && !ui->cmdCheck->isChecked()); - ui->cmdFileAbort->setEnabled(m_processingFile); - ui->actFileOpen->setEnabled(!m_processingFile); - ui->mnuRecent->setEnabled(!m_processingFile && ((m_recentFiles.count() > 0 && !m_heightMapMode) - || (m_recentHeightmaps.count() > 0 && m_heightMapMode))); - ui->actFileSave->setEnabled(m_programModel.rowCount() > 1); - ui->actFileSaveAs->setEnabled(m_programModel.rowCount() > 1); +void frmMain::on_actOverrideSpindleMinus_triggered() +{ + ui->slbSpindleOverride->setSliderPosition(ui->slbSpindleOverride->sliderPosition() - 1); +} - ui->tblProgram->setEditTriggers(m_processingFile ? QAbstractItemView::NoEditTriggers : - QAbstractItemView::DoubleClicked | QAbstractItemView::SelectedClicked - | QAbstractItemView::EditKeyPressed | QAbstractItemView::AnyKeyPressed); +void frmMain::on_actViewLockWindows_toggled(bool checked) +{ + QList dl = findChildren(); - if (!portOpened) { - ui->txtStatus->setText(tr("Not connected")); - ui->txtStatus->setStyleSheet(QString("background-color: palette(button); color: palette(text);")); + foreach (QDockWidget *d, dl) { + d->setFeatures(checked ? QDockWidget::NoDockWidgetFeatures : QDockWidget::AllDockWidgetFeatures); } +} - this->setWindowTitle(m_programFileName.isEmpty() ? qApp->applicationDisplayName() - : m_programFileName.mid(m_programFileName.lastIndexOf("/") + 1) + " - " + qApp->applicationDisplayName()); +void frmMain::on_cmdFileOpen_clicked() +{ + if (!m_heightMapMode) { + if (!saveChanges(false)) return; - if (!m_processingFile) ui->chkKeyboardControl->setChecked(m_storedKeyboardControl); + QString fileName = QFileDialog::getOpenFileName(this, tr("Open"), m_lastFolder, + tr("G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*)")); -#ifdef WINDOWS - if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { - if (!m_processingFile && m_taskBarProgress) m_taskBarProgress->hide(); - } -#endif + if (!fileName.isEmpty()) m_lastFolder = fileName.left(fileName.lastIndexOf(QRegExp("[/\\\\]+"))); - style()->unpolish(ui->cmdFileOpen); - style()->unpolish(ui->cmdFileReset); - style()->unpolish(ui->cmdFileSend); - style()->unpolish(ui->cmdFilePause); - style()->unpolish(ui->cmdFileAbort); - ui->cmdFileOpen->ensurePolished(); - ui->cmdFileReset->ensurePolished(); - ui->cmdFileSend->ensurePolished(); - ui->cmdFilePause->ensurePolished(); - ui->cmdFileAbort->ensurePolished(); + if (fileName != "") { + addRecentFile(fileName); + updateRecentFilesMenu(); - // Heightmap - m_heightMapBorderDrawer.setVisible(ui->chkHeightMapBorderShow->isChecked() && m_heightMapMode); - m_heightMapGridDrawer.setVisible(ui->chkHeightMapGridShow->isChecked() && m_heightMapMode); - m_heightMapInterpolationDrawer.setVisible(ui->chkHeightMapInterpolationShow->isChecked() && m_heightMapMode); + loadFile(fileName); + } + } else { + if (!saveChanges(true)) return; - ui->grpProgram->setText(m_heightMapMode ? tr("Heightmap") : tr("G-code program")); - ui->grpProgram->setProperty("overrided", m_heightMapMode); - style()->unpolish(ui->grpProgram); - ui->grpProgram->ensurePolished(); + QString fileName = QFileDialog::getOpenFileName(this, tr("Open"), m_lastFolder, tr("Heightmap files (*.map)")); - ui->cboJogStep->setEditable(!ui->chkKeyboardControl->isChecked()); - ui->cboJogFeed->setEditable(!ui->chkKeyboardControl->isChecked()); - ui->cboJogStep->setStyleSheet(QString("font-size: %1").arg(m_settings->fontSize())); - ui->cboJogFeed->setStyleSheet(ui->cboJogStep->styleSheet()); + if (fileName != "") { + addRecentHeightmap(fileName); + updateRecentFilesMenu(); + loadHeightMap(fileName); + } + } +} - ui->tblHeightMap->setVisible(m_heightMapMode); - ui->tblProgram->setVisible(!m_heightMapMode); +void frmMain::on_cmdFileSend_clicked() +{ + if (m_currentModel->rowCount() == 1) return; - ui->widgetHeightMap->setEnabled(!m_processingFile && m_programModel.rowCount() > 1); - ui->cmdHeightMapMode->setEnabled(!ui->txtHeightMap->text().isEmpty()); + on_cmdFileReset_clicked(); - ui->cmdFileSend->setText(m_heightMapMode ? tr("Probe") : tr("Send")); + m_startTime.start(); - ui->chkHeightMapUse->setEnabled(!m_heightMapMode && !ui->txtHeightMap->text().isEmpty()); + m_transferCompleted = false; + m_processingFile = true; + m_fileEndSent = false; + m_storedKeyboardControl = ui->chkKeyboardControl->isChecked(); + ui->chkKeyboardControl->setChecked(false); - ui->actFileSaveTransformedAs->setVisible(ui->chkHeightMapUse->isChecked()); + storeParserState(); - ui->cmdFileSend->menu()->actions().first()->setEnabled(!ui->cmdHeightMapMode->isChecked()); +#ifdef WINDOWS + if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { + if (m_taskBarProgress) { + m_taskBarProgress->setMaximum(m_currentModel->rowCount() - 2); + m_taskBarProgress->setValue(0); + m_taskBarProgress->show(); + } + } +#endif - m_selectionDrawer.setVisible(!ui->cmdHeightMapMode->isChecked()); + updateControlsState(); + ui->cmdFilePause->setFocus(); + + sendNextFileCommands(); } -void frmMain::openPort() +void frmMain::on_cmdFilePause_clicked(bool checked) { - if (m_serialPort.open(QIODevice::ReadWrite)) { - ui->txtStatus->setText(tr("Port opened")); - ui->txtStatus->setStyleSheet(QString("background-color: palette(button); color: palette(text);")); + m_serialPort.write(checked ? "!" : "~"); +} + +void frmMain::on_cmdFileAbort_clicked() +{ + m_aborting = true; + if (!ui->cmdCheck->isChecked()) { + m_serialPort.write("!"); + } else { grblReset(); } } -int frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, bool queue) +void frmMain::on_cmdFileReset_clicked() { - // tableIndex: - // 0...n - commands from g-code program - // -1 - ui commands - // -2 - utility commands - // -3 - utility commands - - if (!m_serialPort.isOpen() || !m_resetCompleted) return 0; + m_fileCommandIndex = 0; + m_fileProcessedCommandIndex = 0; + m_lastDrawnLineIndex = 0; + m_probeIndex = -1; - // Commands queue - if (queue || (bufferLength() + command.length() + 1) > BUFFERLENGTH) { - CommandQueue cq; + if (!m_heightMapMode) { + QList list = m_viewParser.getLineSegmentList(); - cq.command = command; - cq.tableIndex = tableIndex; - cq.showInConsole = showInConsole; - cq.queue = queue; + QList indexes; + for (int i = 0; i < list.count(); i++) { + list[i]->setDrawn(false); + indexes.append(i); + } + m_codeDrawer->update(indexes); - m_queue.append(cq); - return 0; - } + ui->tblProgram->setUpdatesEnabled(false); - // Evaluate scripts in command - if (tableIndex < 0) command = evaluateCommand(command); - - if (command.isEmpty()) return 1; + for (int i = 0; i < m_currentModel->data().count() - 1; i++) { + m_currentModel->data()[i].state = GCodeItem::InQueue; + m_currentModel->data()[i].response = QString(); + } + ui->tblProgram->setUpdatesEnabled(true); - command = command.toUpper(); + ui->tblProgram->scrollTo(m_currentModel->index(0, 0)); + ui->tblProgram->clearSelection(); + ui->tblProgram->selectRow(0); - CommandAttributes ca; - if (showInConsole) { - ui->txtConsole->appendPlainText(command); - ca.consoleIndex = ui->txtConsole->blockCount() - 1; + ui->glwVisualizer->setSpendTime(QTime(0, 0, 0)); } else { - ca.consoleIndex = -1; - } + ui->txtHeightMapGridX->setEnabled(true); + ui->txtHeightMapGridY->setEnabled(true); + ui->txtHeightMapGridZBottom->setEnabled(true); + ui->txtHeightMapGridZTop->setEnabled(true); - ca.command = command; - ca.length = command.length() + 1; - ca.tableIndex = tableIndex; + delete m_heightMapInterpolationDrawer.data(); + m_heightMapInterpolationDrawer.setData(NULL); - m_commands.append(ca); + m_heightMapModel.clear(); + updateHeightMapGrid(); + } +} - QString uncomment = GcodePreprocessorUtils::removeComment(command); +void frmMain::on_cmdCommandSend_clicked() +{ + QString command = ui->cboCommand->currentText(); + if (command.isEmpty()) return; - // Processing spindle speed only from g-code program - QRegExp s("[Ss]0*(\\d+)"); - if (s.indexIn(uncomment) != -1 && ca.tableIndex > -2) { - int speed = s.cap(1).toInt(); - if (ui->slbSpindle->value() != speed) { - ui->slbSpindle->setValue(speed); - } - } + ui->cboCommand->storeText(); + ui->cboCommand->setCurrentText(""); + sendCommand(command, -1); +} - // Set M2 & M30 commands sent flag - static QRegExp M230("M0*2|M30"); - if (uncomment.contains(M230)) { - m_fileEndSent = true; - } +void frmMain::on_cmdClearConsole_clicked() +{ + ui->txtConsole->clear(); +} - // Queue offsets request on G92 command - // TODO: G54-59 - if (ca.tableIndex == -1 && uncomment.contains("G92")) { - sendCommand("$#", -3, showInConsole, true); - } +void frmMain::on_cmdHome_clicked() +{ + m_homing = true; + m_updateSpindleSpeed = true; + sendCommand("$H", -1, m_settings->showUICommands()); +} - m_serialPort.write((command + "\r").toLatin1()); +void frmMain::on_cmdCheck_clicked(bool checked) +{ + if (checked) { + storeParserState(); + sendCommand("$C", -1, m_settings->showUICommands()); + } else { + m_aborting = true; + grblReset(); + }; +} - return 0; +void frmMain::on_cmdReset_clicked() +{ + grblReset(); } -void frmMain::sendCommands(QString commands, int tableIndex) +void frmMain::on_cmdUnlock_clicked() { - QStringList list = commands.split("\n"); + m_updateSpindleSpeed = true; + sendCommand("$X", -1, m_settings->showUICommands()); +} - bool q = false; - foreach (QString cmd, list) { - if (!cmd.isEmpty()) if (sendCommand(cmd.trimmed(), tableIndex, m_settings->showUICommands(), q) == 0) q = true; +void frmMain::on_cmdSpindle_toggled(bool checked) +{ + ui->grpSpindle->setProperty("overrided", checked); + style()->unpolish(ui->grpSpindle); + ui->grpSpindle->ensurePolished(); + + if (checked) { + if (!ui->grpSpindle->isChecked()) ui->grpSpindle->setTitle(tr("Spindle") + QString(tr(" (%1)")).arg(ui->slbSpindle->value())); + } else { + ui->grpSpindle->setTitle(tr("Spindle")); } } -void frmMain::grblReset() +void frmMain::on_cmdSpindle_clicked(bool checked) { - m_serialPort.write(QByteArray(1, (char)24)); - - m_processingFile = false; - m_transferCompleted = true; - m_fileCommandIndex = 0; + if (ui->cmdFilePause->isChecked()) { + m_serialPort.write(QByteArray(1, char(0x9e))); + } else { + sendCommand(checked ? QString("M3 S%1").arg(ui->slbSpindle->value()) : "M5", -1, m_settings->showUICommands()); + } +} - m_reseting = true; - m_homing = false; - m_resetCompleted = false; - m_updateSpindleSpeed = true; - m_lastGrblStatus = -1; - m_statusReceived = true; +void frmMain::on_cmdTop_clicked() +{ + ui->glwVisualizer->setTopView(); +} - // Drop all remaining commands in buffer - m_commands.clear(); - m_queue.clear(); +void frmMain::on_cmdFront_clicked() +{ + ui->glwVisualizer->setFrontView(); +} - // Prepare reset response catch - CommandAttributes ca; - ca.command = "[CTRL+X]"; - if (m_settings->showUICommands()) ui->txtConsole->appendPlainText(ca.command); - ca.consoleIndex = m_settings->showUICommands() ? ui->txtConsole->blockCount() - 1 : -1; - ca.tableIndex = -1; - ca.length = ca.command.length() + 1; - m_commands.append(ca); +void frmMain::on_cmdLeft_clicked() +{ + ui->glwVisualizer->setLeftView(); +} - updateControlsState(); +void frmMain::on_cmdIsometric_clicked() +{ + ui->glwVisualizer->setIsometricView(); } -int frmMain::bufferLength() +void frmMain::on_cmdFit_clicked() { - int length = 0; + ui->glwVisualizer->fitDrawable(m_currentDrawer); +} - foreach (CommandAttributes ca, m_commands) { - length += ca.length; +void frmMain::on_grpOverriding_toggled(bool checked) +{ + if (checked) { + ui->grpOverriding->setTitle(tr("Overriding")); + } else if (ui->slbFeedOverride->isChecked() | ui->slbRapidOverride->isChecked() | ui->slbSpindleOverride->isChecked()) { + ui->grpOverriding->setTitle(tr("Overriding") + QString(tr(" (%1/%2/%3)")) + .arg(ui->slbFeedOverride->isChecked() ? QString::number(ui->slbFeedOverride->value()) : "-") + .arg(ui->slbRapidOverride->isChecked() ? QString::number(ui->slbRapidOverride->value()) : "-") + .arg(ui->slbSpindleOverride->isChecked() ? QString::number(ui->slbSpindleOverride->value()) : "-")); } + updateLayouts(); - return length; + ui->widgetFeed->setVisible(checked); } -void frmMain::onSerialPortReadyRead() +void frmMain::on_grpSpindle_toggled(bool checked) { - while (m_serialPort.canReadLine()) { - QString data = m_serialPort.readLine().trimmed(); + if (checked) { + ui->grpSpindle->setTitle(tr("Spindle")); + } else if (ui->cmdSpindle->isChecked()) { +// ui->grpSpindle->setTitle(tr("Spindle") + QString(tr(" (%1)")).arg(ui->txtSpindleSpeed->text())); + ui->grpSpindle->setTitle(tr("Spindle") + QString(tr(" (%1)")).arg(ui->slbSpindle->value())); + } + updateLayouts(); - // Filter prereset responses - if (m_reseting) { - if (!dataIsReset(data)) continue; - else { - m_reseting = false; - m_timerStateQuery.setInterval(m_settings->queryStateTime()); - } - } + ui->widgetSpindle->setVisible(checked); +} - // Status response - if (data[0] == '<') { - int status = -1; +void frmMain::on_grpJog_toggled(bool checked) +{ + updateJogTitle(); + updateLayouts(); - m_statusReceived = true; + ui->widgetJog->setVisible(checked); +} - // Update machine coordinates - static QRegExp mpx("MPos:([^,]*),([^,]*),([^,^>^|]*)"); - if (mpx.indexIn(data) != -1) { - ui->txtMPosX->setValue(mpx.cap(1).toDouble()); - ui->txtMPosY->setValue(mpx.cap(2).toDouble()); - ui->txtMPosZ->setValue(mpx.cap(3).toDouble()); +void frmMain::on_grpHeightMap_toggled(bool arg1) +{ + ui->widgetHeightMap->setVisible(arg1); +} - // Update stored vars - m_storedVars.setCoords("M", QVector3D( - ui->txtMPosX->value(), - ui->txtMPosY->value(), - ui->txtMPosZ->value())); - } +void frmMain::on_chkKeyboardControl_toggled(bool checked) +{ + ui->grpJog->setProperty("overrided", checked); + style()->unpolish(ui->grpJog); + ui->grpJog->ensurePolished(); - // Status - static QRegExp stx("<([^,^>^|]*)"); - if (stx.indexIn(data) != -1) { - status = m_status.indexOf(stx.cap(1)); + // Store/restore coordinate system + if (checked) { + sendCommand("$G", -2, m_settings->showUICommands()); + } else { + if (m_absoluteCoordinates) sendCommand("G90", -1, m_settings->showUICommands()); + } - // Undetermined status - if (status == -1) status = 0; + if (!m_processingFile) m_storedKeyboardControl = checked; - // Update status - if (status != m_lastGrblStatus) { - ui->txtStatus->setText(m_statusCaptions[status]); - ui->txtStatus->setStyleSheet(QString("background-color: %1; color: %2;") - .arg(m_statusBackColors[status]).arg(m_statusForeColors[status])); - } + updateJogTitle(); + updateControlsState(); +} - // Update controls - ui->cmdCheck->setEnabled(status != RUN && !m_processingFile); - ui->cmdCheck->setChecked(status == CHECK); - ui->cmdFilePause->setChecked(status == HOLD0 || status == HOLD1 || status == QUEUE); - ui->cmdSpindle->setEnabled(!m_processingFile || status == HOLD0); -#ifdef WINDOWS - if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { - if (m_taskBarProgress) m_taskBarProgress->setPaused(status == HOLD0 || status == HOLD1 || status == QUEUE); - } -#endif +void frmMain::on_chkHeightMapBorderShow_toggled(bool checked) +{ + Q_UNUSED(checked) - // Update "elapsed time" timer - if (m_processingFile) { - QTime time(0, 0, 0); - int elapsed = m_startTime.elapsed(); - ui->glwVisualizer->setSpendTime(time.addMSecs(elapsed)); - } - - // Test for job complete - if (m_processingFile && m_transferCompleted && - ((status == IDLE && m_lastGrblStatus == RUN) || status == CHECK)) { - - // Shadow last segment - GcodeViewParse *parser = m_currentDrawer->viewParser(); - QList list = parser->getLineSegmentList(); - if (m_lastDrawnLineIndex < list.count()) { - list[m_lastDrawnLineIndex]->setDrawn(true); - m_currentDrawer->update(QList() << m_lastDrawnLineIndex); - } - - // Update state - m_processingFile = false; - m_fileProcessedCommandIndex = 0; - m_lastDrawnLineIndex = 0; - m_storedParserStatus.clear(); - - updateControlsState(); - - qApp->beep(); - - m_timerStateQuery.stop(); - m_timerConnection.stop(); - - QMessageBox::information(this, qApp->applicationDisplayName(), tr("Job done.\nTime elapsed: %1") - .arg(ui->glwVisualizer->spendTime().toString("hh:mm:ss"))); + updateControlsState(); +} - m_timerStateQuery.setInterval(m_settings->queryStateTime()); - m_timerConnection.start(); - m_timerStateQuery.start(); - } +void frmMain::on_chkHeightMapInterpolationShow_toggled(bool checked) +{ + Q_UNUSED(checked) - // Store status - if (status != m_lastGrblStatus) m_lastGrblStatus = status; + updateControlsState(); +} - // Abort - static double x = sNan; - static double y = sNan; - static double z = sNan; +void frmMain::on_chkHeightMapUse_clicked(bool checked) +{ +// static bool fileChanged; - if (m_aborting) { - switch (status) { - case IDLE: // Idle - if (!m_processingFile && m_resetCompleted) { - m_aborting = false; - restoreParserState(); - restoreOffsets(); - return; - } - break; - case HOLD0: // Hold - case HOLD1: - case QUEUE: - if (!m_reseting && compareCoordinates(x, y, z)) { - x = sNan; - y = sNan; - z = sNan; - grblReset(); - } else { - x = ui->txtMPosX->value(); - y = ui->txtMPosY->value(); - z = ui->txtMPosZ->value(); - } - break; - } - } - } + // Reset table view + QByteArray headerState = ui->tblProgram->horizontalHeader()->saveState(); + ui->tblProgram->setModel(NULL); - // Store work offset - static QVector3D workOffset; - static QRegExp wpx("WCO:([^,]*),([^,]*),([^,^>^|]*)"); + CancelException cancel; - if (wpx.indexIn(data) != -1) - { - workOffset = QVector3D(wpx.cap(1).toDouble(), wpx.cap(2).toDouble(), wpx.cap(3).toDouble()); - } + if (checked) try { - // Update work coordinates - ui->txtWPosX->setValue(ui->txtMPosX->value() - workOffset.x()); - ui->txtWPosY->setValue(ui->txtMPosY->value() - workOffset.y()); - ui->txtWPosZ->setValue(ui->txtMPosZ->value() - workOffset.z()); - - // Update stored vars - m_storedVars.setCoords("W", QVector3D( - ui->txtWPosX->value(), - ui->txtWPosY->value(), - ui->txtWPosZ->value())); + // Prepare progress dialog + QProgressDialog progress(tr("Applying heightmap..."), tr("Abort"), 0, 0, this); + progress.setWindowModality(Qt::WindowModal); + progress.setFixedHeight(progress.sizeHint().height()); + progress.show(); + progress.setStyleSheet("QProgressBar {text-align: center; qproperty-format: \"\"}"); - // Update tool position - QVector3D toolPosition; - if (!(status == CHECK && m_fileProcessedCommandIndex < m_currentModel->rowCount() - 1)) { - toolPosition = QVector3D(toMetric(ui->txtWPosX->value()), - toMetric(ui->txtWPosY->value()), - toMetric(ui->txtWPosZ->value())); - m_toolDrawer.setToolPosition(m_codeDrawer->getIgnoreZ() ? QVector3D(toolPosition.x(), toolPosition.y(), 0) : toolPosition); - } + // Set current model to prevent reseting heightmap cache + m_currentModel = &m_programHeightmapModel; + // Update heightmap-modificated program if not cached + if (m_programHeightmapModel.rowCount() == 0) { - // Toolpath shadowing - if (m_processingFile && status != CHECK) { - GcodeViewParse *parser = m_currentDrawer->viewParser(); + // Modifying linesegments + QList *list = m_viewParser.getLines(); + QRectF borderRect = borderRectFromTextboxes(); + double x, y, z; + QVector3D point; - bool toolOntoolpath = false; + progress.setLabelText(tr("Subdividing segments...")); + progress.setMaximum(list->count() - 1); - QList drawnLines; - QList list = parser->getLineSegmentList(); + for (int i = 0; i < list->count(); i++) { + if (!list->at(i)->isZMovement()) { + QList subSegments = subdivideSegment(list->at(i)); - for (int i = m_lastDrawnLineIndex; i < list.count() - && list.at(i)->getLineNumber() - <= (m_currentModel->data(m_currentModel->index(m_fileProcessedCommandIndex, 4)).toInt() + 1); i++) { - if (list.at(i)->contains(toolPosition)) { - toolOntoolpath = true; - m_lastDrawnLineIndex = i; - break; + if (subSegments.count() > 0) { + delete list->at(i); + list->removeAt(i); + foreach (LineSegment* subSegment, subSegments) list->insert(i++, subSegment); + i--; } - drawnLines << i; } - if (toolOntoolpath) { - foreach (int i, drawnLines) { - list.at(i)->setDrawn(true); - } - if (!drawnLines.isEmpty()) m_currentDrawer->update(drawnLines); + if (progress.isVisible() && (i % PROGRESSSTEP == 0)) { + progress.setMaximum(list->count() - 1); + progress.setValue(i); + qApp->processEvents(); + if (progress.wasCanceled()) throw cancel; } } - // Get overridings - static QRegExp ov("Ov:([^,]*),([^,]*),([^,^>^|]*)"); - if (ov.indexIn(data) != -1) - { - updateOverride(ui->slbFeedOverride, ov.cap(1).toInt(), '\x91'); - updateOverride(ui->slbSpindleOverride, ov.cap(3).toInt(), '\x9a'); - - int rapid = ov.cap(2).toInt(); - ui->slbRapidOverride->setCurrentValue(rapid); - - int target = ui->slbRapidOverride->isChecked() ? ui->slbRapidOverride->value() : 100; - - if (rapid != target) switch (target) { - case 25: - m_serialPort.write(QByteArray(1, char(0x97))); - break; - case 50: - m_serialPort.write(QByteArray(1, char(0x96))); - break; - case 100: - m_serialPort.write(QByteArray(1, char(0x95))); - break; - } + progress.setLabelText(tr("Updating Z-coordinates...")); + progress.setMaximum(list->count() - 1); - // Update pins state - QString pinState; - static QRegExp pn("Pn:([^|^>]*)"); - if (pn.indexIn(data) != -1) { - pinState.append(QString(tr("PS: %1")).arg(pn.cap(1))); - } + for (int i = 0; i < list->count(); i++) { + if (i == 0) { + x = list->at(i)->getStart().x(); + y = list->at(i)->getStart().y(); + z = list->at(i)->getStart().z() + Interpolation::bicubicInterpolate(borderRect, &m_heightMapModel, x, y); + list->at(i)->setStart(QVector3D(x, y, z)); + } else list->at(i)->setStart(list->at(i - 1)->getEnd()); - // Process spindle state - static QRegExp as("A:([^,^>^|]+)"); - if (as.indexIn(data) != -1) { - QString state = as.cap(1); - m_spindleCW = state.contains("S"); - if (state.contains("S") || state.contains("C")) { - m_timerToolAnimation.start(25, this); - ui->cmdSpindle->setChecked(true); - } else { - m_timerToolAnimation.stop(); - ui->cmdSpindle->setChecked(false); - } + x = list->at(i)->getEnd().x(); + y = list->at(i)->getEnd().y(); + z = list->at(i)->getEnd().z() + Interpolation::bicubicInterpolate(borderRect, &m_heightMapModel, x, y); + list->at(i)->setEnd(QVector3D(x, y, z)); - if (!pinState.isEmpty()) pinState.append(" / "); - pinState.append(QString(tr("AS: %1")).arg(as.cap(1))); - } else { - m_timerToolAnimation.stop(); - ui->cmdSpindle->setChecked(false); + if (progress.isVisible() && (i % PROGRESSSTEP == 0)) { + progress.setValue(i); + qApp->processEvents(); + if (progress.wasCanceled()) throw cancel; } - ui->glwVisualizer->setPinState(pinState); } - // Get feed/spindle values - static QRegExp fs("FS:([^,]*),([^,^|^>]*)"); - if (fs.indexIn(data) != -1) { - ui->glwVisualizer->setSpeedState((QString(tr("F/S: %1 / %2")).arg(fs.cap(1)).arg(fs.cap(2)))); - } + progress.setLabelText(tr("Modifying G-code program...")); + progress.setMaximum(m_programModel.rowCount() - 2); - // Emit status signal - emit statusReceived(data); + // Modifying g-code program + QString command; + QStringList args; + int line; + QString newCommand; + GCodeItem item; + int lastSegmentIndex = 0; + int lastCommandIndex = -1; - // Command response - } else if (data.length() > 0) { + // Search strings + QString coords("XxYyZzIiJjKkRr"); + QString g("Gg"); + QString m("Mm"); - if (m_commands.length() > 0 && !dataIsFloating(data) - && !(m_commands[0].command != "[CTRL+X]" && dataIsReset(data))) { + char codeChar; // Single code char G1 -> G + float codeNum; // Code number G1 -> 1 - static QString response; // Full response string + QString lastCode; + bool isLinearMove; + bool hasCommand; - if ((m_commands[0].command != "[CTRL+X]" && dataIsEnd(data)) - || (m_commands[0].command == "[CTRL+X]" && dataIsReset(data))) { + m_programLoading = true; + for (int i = 0; i < m_programModel.rowCount() - 1; i++) { + command = m_programModel.data().at(i).command; + line = m_programModel.data().at(i).line; + isLinearMove = false; + hasCommand = false; - response.append(data); + if (line < 0 || line == lastCommandIndex || lastSegmentIndex == list->count() - 1) { + item.command = command; + m_programHeightmapModel.data().append(item); + } else { + // Get commands args + args = m_programModel.data().at(i).args; + newCommand.clear(); - // Take command from buffer - CommandAttributes ca = m_commands.takeFirst(); - QTextBlock tb = ui->txtConsole->document()->findBlockByNumber(ca.consoleIndex); - QTextCursor tc(tb); + // Parse command args + foreach (QString arg, args) { // arg examples: G1, G2, M3, X100... + codeChar = arg.at(0).toLatin1(); // codeChar: G, M, X... + if (!coords.contains(codeChar)) { // Not parameter + codeNum = arg.mid(1).toDouble(); + if (g.contains(codeChar)) { // 'G'-command + // Store 'G0' & 'G1' + if (codeNum == 0.0f || codeNum == 1.0f) { + lastCode = arg; + isLinearMove = true; // Store linear move + } - QString uncomment = GcodePreprocessorUtils::removeComment(ca.command).toUpper(); + // Replace 'G2' & 'G3' with 'G1' + if (codeNum == 2.0f || codeNum == 3.0f) { + newCommand.append("G1"); + isLinearMove = true; + // Drop plane command for arcs + } else if (codeNum != 17.0f && codeNum != 18.0f && codeNum != 19.0f) { + newCommand.append(arg); + } - // Store current coordinate system - if (uncomment == "$G") { - static QRegExp g("G5[4-9]"); - if (g.indexIn(response) != -1) { - m_storedVars.setCS(g.cap(0)); + hasCommand = true; // Command has 'G' + } else { + if (m.contains(codeChar)) + hasCommand = true; // Command has 'M' + newCommand.append(arg); // Other commands + } } } - // Restore absolute/relative coordinate system after jog - if (uncomment == "$G" && ca.tableIndex == -2) { - if (ui->chkKeyboardControl->isChecked()) m_absoluteCoordinates = response.contains("G90"); - else if (response.contains("G90")) sendCommand("G90", -1, m_settings->showUICommands()); - } + // Find first linesegment by command index + for (int j = lastSegmentIndex; j < list->count(); j++) { + if (list->at(j)->getLineNumber() == line) { + if (!qIsNaN(list->at(j)->getEnd().length()) && (isLinearMove || (!hasCommand && !lastCode.isEmpty()))) { + // Create new commands for each linesegment with given command index + while ((j < list->count()) && (list->at(j)->getLineNumber() == line)) { - // Jog - if (uncomment.contains("$J=") && ca.tableIndex == -2) { - jogStep(); - } + point = list->at(j)->getEnd(); + if (!list->at(j)->isAbsolute()) point -= list->at(j)->getStart(); + if (!list->at(j)->isMetric()) point /= 25.4f; - // Process parser status - if (uncomment == "$G" && ca.tableIndex == -3) { - // Update status in visualizer window - ui->glwVisualizer->setParserStatus(response.left(response.indexOf("; "))); + item.command = newCommand + QString("X%1Y%2Z%3") + .arg(point.x(), 0, 'f', 3).arg(point.y(), 0, 'f', 3).arg(point.z(), 0, 'f', 3); + m_programHeightmapModel.data().append(item); - // Store parser status - if (m_processingFile) storeParserState(); + if (!newCommand.isEmpty()) newCommand.clear(); + j++; + } + // Copy original command if not G0 or G1 + } else { + item.command = command; + m_programHeightmapModel.data().append(item); + } - // Spindle speed - QRegExp rx(".*S([\\d\\.]+)"); - if (rx.indexIn(response) != -1) { - double speed = toMetric(rx.cap(1).toDouble()); //RPM in imperial? - ui->slbSpindle->setCurrentValue(speed); + lastSegmentIndex = j; + break; } - - m_updateParserStatus = true; } + } + lastCommandIndex = line; - // Offsets - if (uncomment == "$#") storeOffsetsVars(response); - - // Settings response - if (uncomment == "$$" && ca.tableIndex == -2) { - static QRegExp gs("\\$(\\d+)\\=([^;]+)\\; "); - QMap set; - int p = 0; - while ((p = gs.indexIn(response, p)) != -1) { - set[gs.cap(1).toInt()] = gs.cap(2).toDouble(); - p += gs.matchedLength(); - } - if (set.keys().contains(13)) m_settings->setUnits(set[13]); - if (set.keys().contains(110)) m_settings->setRapidSpeed(set[110]); - if (set.keys().contains(120)) m_settings->setAcceleration(set[120]); + if (progress.isVisible() && (i % PROGRESSSTEP == 0)) { + progress.setValue(i); + qApp->processEvents(); + if (progress.wasCanceled()) throw cancel; + } + } + m_programHeightmapModel.insertRow(m_programHeightmapModel.rowCount()); + } + progress.close(); - setupCoordsTextboxes(); - } + ui->tblProgram->setModel(&m_programHeightmapModel); + ui->tblProgram->horizontalHeader()->restoreState(headerState); - // Homing response - if ((uncomment == "$H" || uncomment == "$T") && m_homing) m_homing = false; + connect(ui->tblProgram->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(onTableCurrentChanged(QModelIndex,QModelIndex))); - // Reset complete response - if (uncomment == "[CTRL+X]") { - m_resetCompleted = true; - m_updateParserStatus = true; + m_programLoading = false; - // Query grbl settings - sendCommand("$$", -2, false); - } + // Update parser + m_currentDrawer = m_codeDrawer; + updateParser(); - // Clear command buffer on "M2" & "M30" command (old firmwares) - static QRegExp M230("M0*2|M30"); - if (uncomment.contains(M230) && response.contains("ok") && !response.contains("Pgm End")) { - m_commands.clear(); - m_queue.clear(); - } + // Select first row + ui->tblProgram->selectRow(0); + } + catch (CancelException) { // Cancel modification + m_programHeightmapModel.clear(); + m_currentModel = &m_programModel; - // Update probe coords on user commands - if (uncomment.contains("G38.2") && ca.tableIndex < 0) { - static QRegExp PRB(".*PRB:([^,]*),([^,]*),([^]^:]*)"); - if (PRB.indexIn(response) != -1) { - m_storedVars.setCoords("PRB", QVector3D( - PRB.cap(1).toDouble(), - PRB.cap(2).toDouble(), - PRB.cap(3).toDouble() - )); - } - } + ui->tblProgram->setModel(&m_programModel); + ui->tblProgram->horizontalHeader()->restoreState(headerState); - // Process probing on heightmap mode only from table commands - if (uncomment.contains("G38.2") && m_heightMapMode && ca.tableIndex > -1) { - // Get probe Z coordinate - // "[PRB:0.000,0.000,0.000:0];ok" - QRegExp rx(".*PRB:([^,]*),([^,]*),([^]^:]*)"); - double z = qQNaN(); - if (rx.indexIn(response) != -1) { - z = toMetric(rx.cap(3).toDouble()); - } + connect(ui->tblProgram->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(onTableCurrentChanged(QModelIndex,QModelIndex))); + ui->tblProgram->selectRow(0); - static double firstZ; - if (m_probeIndex == -1) { - firstZ = z; - z = 0; - } else { - // Calculate delta Z - z -= firstZ; + ui->chkHeightMapUse->setChecked(false); - // Calculate table indexes - int row = (m_probeIndex / m_heightMapModel.columnCount()); - int column = m_probeIndex - row * m_heightMapModel.columnCount(); - if (row % 2) column = m_heightMapModel.columnCount() - 1 - column; + return; + } else { // Restore original program + m_currentModel = &m_programModel; - // Store Z in table - m_heightMapModel.setData(m_heightMapModel.index(row, column), z, Qt::UserRole); - ui->tblHeightMap->update(m_heightMapModel.index(m_heightMapModel.rowCount() - 1 - row, column)); - updateHeightMapInterpolationDrawer(); - } + ui->tblProgram->setModel(&m_programModel); + ui->tblProgram->horizontalHeader()->restoreState(headerState); - m_probeIndex++; - } + connect(ui->tblProgram->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(onTableCurrentChanged(QModelIndex,QModelIndex))); - // Change state query time on check mode on - if (uncomment.contains(QRegExp("$[cC]"))) { - m_timerStateQuery.setInterval(response.contains("Enable") ? 1000 : m_settings->queryStateTime()); - } + // Store changes flag + bool fileChanged = m_fileChanged; - // Add response to console - if (tb.isValid() && tb.text() == ca.command) { + // Update parser + updateParser(); - bool scrolledDown = ui->txtConsole->verticalScrollBar()->value() - == ui->txtConsole->verticalScrollBar()->maximum(); + // Select first row + ui->tblProgram->selectRow(0); - // Update text block numbers - int blocksAdded = response.count("; "); + // Restore changes flag + m_fileChanged = fileChanged; + } - if (blocksAdded > 0) for (int i = 0; i < m_commands.count(); i++) { - if (m_commands[i].consoleIndex != -1) m_commands[i].consoleIndex += blocksAdded; - } + // Update groupbox title + ui->grpHeightMap->setProperty("overrided", checked); + style()->unpolish(ui->grpHeightMap); + ui->grpHeightMap->ensurePolished(); - tc.beginEditBlock(); - tc.movePosition(QTextCursor::EndOfBlock); + // Update menu + ui->actFileSaveTransformedAs->setVisible(checked); +} - tc.insertText(" < " + QString(response).replace("; ", "\r\n")); - tc.endEditBlock(); +void frmMain::on_chkHeightMapGridShow_toggled(bool checked) +{ + Q_UNUSED(checked) - if (scrolledDown) ui->txtConsole->verticalScrollBar()->setValue( - ui->txtConsole->verticalScrollBar()->maximum()); - } + updateControlsState(); +} - // Check queue - if (m_queue.length() > 0) { - CommandQueue cq = m_queue.takeFirst(); - - while ((bufferLength() + cq.command.length() + 1) <= BUFFERLENGTH) { - int r = 0; - if (!cq.command.isEmpty()) r = sendCommand(cq.command, cq.tableIndex, cq.showInConsole); - if (!r && !cq.command.isEmpty() && (m_queue.isEmpty() || cq.queue)) break; - else cq = m_queue.takeFirst(); - } - } +void frmMain::on_txtHeightMapBorderX_valueChanged(double arg1) +{ + updateHeightMapBorderDrawer(); + updateHeightMapGrid(arg1); +} - // Add response to table, send next program commands - if (m_processingFile) { +void frmMain::on_txtHeightMapBorderWidth_valueChanged(double arg1) +{ + updateHeightMapBorderDrawer(); + updateHeightMapGrid(arg1); +} - // Only if command from table - if (ca.tableIndex > -1) { - m_currentModel->setData(m_currentModel->index(ca.tableIndex, 2), GCodeItem::Processed); - m_currentModel->setData(m_currentModel->index(ca.tableIndex, 3), response); +void frmMain::on_txtHeightMapBorderY_valueChanged(double arg1) +{ + updateHeightMapBorderDrawer(); + updateHeightMapGrid(arg1); +} - m_fileProcessedCommandIndex = ca.tableIndex; +void frmMain::on_txtHeightMapBorderHeight_valueChanged(double arg1) +{ + updateHeightMapBorderDrawer(); + updateHeightMapGrid(arg1); +} - if (ui->chkAutoScroll->isChecked() && ca.tableIndex != -1) { - ui->tblProgram->scrollTo(m_currentModel->index(ca.tableIndex + 1, 0)); // TODO: Update by timer - ui->tblProgram->setCurrentIndex(m_currentModel->index(ca.tableIndex, 1)); - } - } +void frmMain::on_txtHeightMapGridX_valueChanged(double arg1) +{ + updateHeightMapGrid(arg1); +} - // Update taskbar progress -#ifdef WINDOWS - if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { - if (m_taskBarProgress) m_taskBarProgress->setValue(m_fileProcessedCommandIndex); - } -#endif - // Process error messages - static bool holding = false; - static QString errors; +void frmMain::on_txtHeightMapGridY_valueChanged(double arg1) +{ + updateHeightMapGrid(arg1); +} - if (ca.tableIndex > -1 && response.toUpper().contains("ERROR") && !m_settings->ignoreErrors()) { - errors.append(QString::number(ca.tableIndex + 1) + ": " + ca.command - + " < " + response + "\n"); +void frmMain::on_txtHeightMapGridZBottom_valueChanged(double arg1) +{ + updateHeightMapGrid(arg1); +} - m_senderErrorBox->setText(tr("Error message(s) received:\n") + errors); +void frmMain::on_txtHeightMapGridZTop_valueChanged(double arg1) +{ + updateHeightMapGrid(arg1); +} - if (!holding) { - holding = true; // Hold transmit while messagebox is visible - response.clear(); +void frmMain::on_txtHeightMapInterpolationStepX_valueChanged(double arg1) +{ + Q_UNUSED(arg1) - m_serialPort.write("!"); - m_senderErrorBox->checkBox()->setChecked(false); - qApp->beep(); - int result = m_senderErrorBox->exec(); + updateHeightMapInterpolationDrawer(); +} - holding = false; - errors.clear(); - if (m_senderErrorBox->checkBox()->isChecked()) m_settings->setIgnoreErrors(true); - if (result == QMessageBox::Ignore) m_serialPort.write("~"); else on_cmdFileAbort_clicked(); - } - } +void frmMain::on_txtHeightMapInterpolationStepY_valueChanged(double arg1) +{ + Q_UNUSED(arg1) - // Check transfer complete (last row always blank, last command row = rowcount - 2) - if (m_fileProcessedCommandIndex == m_currentModel->rowCount() - 2 - || uncomment.contains(QRegExp("M0*2|M30"))) - m_transferCompleted = true; - // Send next program commands - else if (!m_fileEndSent && (m_fileCommandIndex < m_currentModel->rowCount()) && !holding) sendNextFileCommands(); - } + updateHeightMapInterpolationDrawer(); +} - // Scroll to first line on "M30" command - if (uncomment.contains("M30")) ui->tblProgram->setCurrentIndex(m_currentModel->index(0, 1)); +void frmMain::on_cmdHeightMapMode_toggled(bool checked) +{ + // Update flag + m_heightMapMode = checked; - // Toolpath shadowing on check mode - if (m_statusCaptions.indexOf(ui->txtStatus->text()) == CHECK) { - GcodeViewParse *parser = m_currentDrawer->viewParser(); - QList list = parser->getLineSegmentList(); + // Reset file progress + m_fileCommandIndex = 0; + m_fileProcessedCommandIndex = 0; + m_lastDrawnLineIndex = 0; - if (!m_transferCompleted && m_fileProcessedCommandIndex < m_currentModel->rowCount() - 1) { - int i; - QList drawnLines; + // Reset/restore g-code program modification on edit mode enter/exit + if (ui->chkHeightMapUse->isChecked()) { + on_chkHeightMapUse_clicked(!checked); // Update gcode program parser + } - for (i = m_lastDrawnLineIndex; i < list.count() - && list.at(i)->getLineNumber() - <= (m_currentModel->data(m_currentModel->index(m_fileProcessedCommandIndex, 4)).toInt()); i++) { - drawnLines << i; - } + if (checked) { + ui->tblProgram->setModel(&m_probeModel); + resizeTableHeightMapSections(); + m_currentModel = &m_probeModel; + m_currentDrawer = m_probeDrawer; + updateParser(); // Update probe program parser + } else { + m_probeParser.reset(); + if (!ui->chkHeightMapUse->isChecked()) { + ui->tblProgram->setModel(&m_programModel); + connect(ui->tblProgram->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(onTableCurrentChanged(QModelIndex,QModelIndex))); + ui->tblProgram->selectRow(0); - if (!drawnLines.isEmpty() && (i < list.count())) { - m_lastDrawnLineIndex = i; - QVector3D vec = list.at(i)->getEnd(); - m_toolDrawer.setToolPosition(vec); - } + resizeTableHeightMapSections(); + m_currentModel = &m_programModel; + m_currentDrawer = m_codeDrawer; - foreach (int i, drawnLines) { - list.at(i)->setDrawn(true); - } - if (!drawnLines.isEmpty()) m_currentDrawer->update(drawnLines); - } else { - foreach (LineSegment* s, list) { - if (!qIsNaN(s->getEnd().length())) { - m_toolDrawer.setToolPosition(s->getEnd()); - break; - } - } - } - } + if (!ui->chkHeightMapUse->isChecked()) { + ui->glwVisualizer->updateExtremes(m_codeDrawer); + updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); + } + } + } - // Emit response signal - emit responseReceived(ca.command, ca.tableIndex, response); + // Shadow toolpath + QList list = m_viewParser.getLineSegmentList(); + QList indexes; + for (int i = m_lastDrawnLineIndex; i < list.count(); i++) { + list[i]->setDrawn(checked); + list[i]->setIsHightlight(false); + indexes.append(i); + } + // Update only vertex color. + // If chkHeightMapUse was checked codeDrawer updated via updateParser + if (!ui->chkHeightMapUse->isChecked()) m_codeDrawer->update(indexes); - response.clear(); - } else { - response.append(data + "; "); - } + updateRecentFilesMenu(); + updateControlsState(); +} - } else { - // Unprocessed responses - // Handle hardware reset - if (dataIsReset(data)) { - m_processingFile = false; - m_transferCompleted = true; - m_fileCommandIndex = 0; +void frmMain::on_cmdHeightMapCreate_clicked() +{ + ui->cmdHeightMapMode->setChecked(true); + on_actFileNew_triggered(); +} - m_reseting = false; - m_homing = false; - m_lastGrblStatus = -1; +void frmMain::on_cmdHeightMapLoad_clicked() +{ + if (!saveChanges(true)) { + return; + } - m_updateParserStatus = true; - m_statusReceived = true; + QString fileName = QFileDialog::getOpenFileName(this, tr("Open"), m_lastFolder, tr("Heightmap files (*.map)")); - m_commands.clear(); - m_queue.clear(); + if (fileName != "") { + addRecentHeightmap(fileName); + loadHeightMap(fileName); - updateControlsState(); - } - ui->txtConsole->appendPlainText(data); - } - } else { - // Blank response + // If using heightmap + if (ui->chkHeightMapUse->isChecked() && !m_heightMapMode) { + // Restore original file + on_chkHeightMapUse_clicked(false); + // Apply heightmap + on_chkHeightMapUse_clicked(true); } + + updateRecentFilesMenu(); + updateControlsState(); // Enable 'cmdHeightMapMode' button } } -void frmMain::onSerialPortError(QSerialPort::SerialPortError error) +void frmMain::on_cmdHeightMapBorderAuto_clicked() { - static QSerialPort::SerialPortError previousError; + QRectF rect = borderRectFromExtremes(); - if (error != QSerialPort::NoError && error != previousError) { - previousError = error; - ui->txtConsole->appendPlainText(tr("Serial port error ") + QString::number(error) + ": " + m_serialPort.errorString()); - if (m_serialPort.isOpen()) { - m_serialPort.close(); - updateControlsState(); - } + if (!qIsNaN(rect.width()) && !qIsNaN(rect.height())) { + ui->txtHeightMapBorderX->setValue(rect.x()); + ui->txtHeightMapBorderY->setValue(rect.y()); + ui->txtHeightMapBorderWidth->setValue(rect.width()); + ui->txtHeightMapBorderHeight->setValue(rect.height()); } } -void frmMain::onTimerConnection() +void frmMain::on_cmdYPlus_pressed() { - if (!m_serialPort.isOpen()) { - openPort(); - } else if (!m_homing/* && !m_reseting*/ && !ui->cmdFilePause->isChecked() && m_queue.length() == 0) { - if (m_updateSpindleSpeed) { - m_updateSpindleSpeed = false; - sendCommand(QString("S%1").arg(ui->slbSpindle->value()), -2, m_settings->showUICommands()); - } - if (m_updateParserStatus) { - m_updateParserStatus = false; - sendCommand("$G", -3, false); - } - } + m_jogVector += QVector3D(0, 1, 0); + jogStep(); } -void frmMain::onTimerStateQuery() +void frmMain::on_cmdYPlus_released() { - if (m_serialPort.isOpen() && m_resetCompleted && m_statusReceived) { - m_serialPort.write(QByteArray(1, '?')); - m_statusReceived = false; - } - - ui->glwVisualizer->setBufferState(QString(tr("Buffer: %1 / %2 / %3")).arg(bufferLength()).arg(m_commands.length()).arg(m_queue.length())); + m_jogVector -= QVector3D(0, 1, 0); + jogStep(); } -void frmMain::onVisualizatorRotationChanged() +void frmMain::on_cmdYMinus_pressed() { - ui->cmdIsometric->setChecked(false); + m_jogVector += QVector3D(0, -1, 0); + jogStep(); } -void frmMain::onScroolBarAction(int action) +void frmMain::on_cmdYMinus_released() { - Q_UNUSED(action) - - if (m_processingFile) ui->chkAutoScroll->setChecked(false); + m_jogVector -= QVector3D(0, -1, 0); + jogStep(); } -void frmMain::onJogTimer() +void frmMain::on_cmdXPlus_pressed() { - m_jogBlock = false; + m_jogVector += QVector3D(1, 0, 0); + jogStep(); } -void frmMain::placeVisualizerButtons() +void frmMain::on_cmdXPlus_released() { - ui->cmdIsometric->move(ui->glwVisualizer->width() - ui->cmdIsometric->width() - 8, 8); - ui->cmdTop->move(ui->cmdIsometric->geometry().left() - ui->cmdTop->width() - 8, 8); - ui->cmdLeft->move(ui->glwVisualizer->width() - ui->cmdLeft->width() - 8, ui->cmdIsometric->geometry().bottom() + 8); - ui->cmdFront->move(ui->cmdLeft->geometry().left() - ui->cmdFront->width() - 8, ui->cmdIsometric->geometry().bottom() + 8); - ui->cmdFit->move(ui->glwVisualizer->width() - ui->cmdFit->width() - 8, ui->cmdLeft->geometry().bottom() + 8); + m_jogVector -= QVector3D(1, 0, 0); + jogStep(); } -void frmMain::showEvent(QShowEvent *se) +void frmMain::on_cmdXMinus_pressed() { - Q_UNUSED(se) + m_jogVector += QVector3D(-1, 0, 0); + jogStep(); +} - placeVisualizerButtons(); +void frmMain::on_cmdXMinus_released() +{ + m_jogVector -= QVector3D(-1, 0, 0); + jogStep(); +} -#ifdef WINDOWS - if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { - if (m_taskBarButton == NULL) { - m_taskBarButton = new QWinTaskbarButton(this); - m_taskBarButton->setWindow(this->windowHandle()); - m_taskBarProgress = m_taskBarButton->progress(); - } - } -#endif +void frmMain::on_cmdZPlus_pressed() +{ + m_jogVector += QVector3D(0, 0, 1); + jogStep(); } -void frmMain::hideEvent(QHideEvent *he) +void frmMain::on_cmdZPlus_released() { - Q_UNUSED(he) + m_jogVector -= QVector3D(0, 0, 1); + jogStep(); } -void frmMain::resizeEvent(QResizeEvent *re) +void frmMain::on_cmdZMinus_pressed() { - Q_UNUSED(re) + m_jogVector += QVector3D(0, 0, -1); + jogStep(); +} - placeVisualizerButtons(); - resizeTableHeightMapSections(); +void frmMain::on_cmdZMinus_released() +{ + m_jogVector -= QVector3D(0, 0, -1); + jogStep(); } -void frmMain::resizeTableHeightMapSections() +void frmMain::on_cmdStop_clicked() { - if (ui->tblHeightMap->horizontalHeader()->defaultSectionSize() - * ui->tblHeightMap->horizontalHeader()->count() < ui->glwVisualizer->width()) - ui->tblHeightMap->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); else { - ui->tblHeightMap->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive); - } + m_queue.clear(); + m_serialPort.write(QByteArray(1, char(0x85))); } -void frmMain::timerEvent(QTimerEvent *te) +void frmMain::on_tblProgram_customContextMenuRequested(const QPoint &pos) { - if (te->timerId() == m_timerToolAnimation.timerId()) { - m_toolDrawer.rotate((m_spindleCW ? -40 : 40) * (double)(ui->slbSpindle->currentValue()) - / (ui->slbSpindle->maximum())); + if (m_processingFile) return; + + if (ui->tblProgram->selectionModel()->selectedRows().count() > 0) { + m_tableMenu->actions().at(0)->setEnabled(true); + m_tableMenu->actions().at(1)->setEnabled(ui->tblProgram->selectionModel()->selectedRows()[0].row() != m_currentModel->rowCount() - 1); } else { - QMainWindow::timerEvent(te); + m_tableMenu->actions().at(0)->setEnabled(false); + m_tableMenu->actions().at(1)->setEnabled(false); } + m_tableMenu->popup(ui->tblProgram->viewport()->mapToGlobal(pos)); } -void frmMain::closeEvent(QCloseEvent *ce) +void frmMain::on_mnuViewWindows_aboutToShow() { - bool mode = m_heightMapMode; - m_heightMapMode = false; - - if (!saveChanges(m_heightMapMode)) { - ce->ignore(); - m_heightMapMode = mode; - return; - } + QAction *a; + QList al; - if (m_processingFile && QMessageBox::warning(this, this->windowTitle(), tr("File sending in progress. Terminate and exit?"), - QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) { - ce->ignore(); - m_heightMapMode = mode; - return; + foreach (QDockWidget *d, findChildren()) { + a = new QAction(d->windowTitle(), ui->mnuViewWindows); + a->setCheckable(true); + a->setChecked(d->isVisible()); + connect(a, &QAction::triggered, d, &QDockWidget::setVisible); + al.append(a); } - if (m_serialPort.isOpen()) m_serialPort.close(); - if (m_queue.length() > 0) { - m_commands.clear(); - m_queue.clear(); - } + qSort(al.begin(), al.end(), frmMain::actionTextLessThan); - saveSettings(); + ui->mnuViewWindows->clear(); + ui->mnuViewWindows->addActions(al); } -void frmMain::dragEnterEvent(QDragEnterEvent *dee) +void frmMain::on_mnuViewPanels_aboutToShow() { - if (m_processingFile) return; + QAction *a; - if (dee->mimeData()->hasFormat("application/widget")) return; + ui->mnuViewPanels->clear(); - if (dee->mimeData()->hasFormat("text/plain") && !m_heightMapMode) dee->acceptProposedAction(); - else if (dee->mimeData()->hasFormat("text/uri-list") && dee->mimeData()->urls().count() == 1) { - QString fileName = dee->mimeData()->urls().at(0).toLocalFile(); + QStringList panels; + if (ui->scrollContentsDevice->isVisible()) panels << ui->scrollContentsDevice->saveState(); + if (ui->scrollContentsModification->isVisible()) panels << "\n" << ui->scrollContentsModification->saveState(); + if (ui->scrollContentsUser->isVisible()) panels << "\n" << ui->scrollContentsUser->saveState(); - if ((!m_heightMapMode && isGCodeFile(fileName)) - || (m_heightMapMode && isHeightmapFile(fileName))) - dee->acceptProposedAction(); + foreach (QString s, panels) { + if (s == "\n") { + ui->mnuViewPanels->addSeparator(); + } else { + QGroupBox *b = findChild(s); + if (b) { + a = ui->mnuViewPanels->addAction(b->title()); + a->setCheckable(true); + a->setChecked(b->isVisible()); + connect(a, &QAction::triggered, b, &QWidget::setVisible); + } + } } } -void frmMain::dropEvent(QDropEvent *de) -{ - QString fileName = de->mimeData()->urls().at(0).toLocalFile(); +void frmMain::on_dockVisualizer_visibilityChanged(bool visible) +{ + ui->glwVisualizer->setUpdatesEnabled(visible); +} - if (!m_heightMapMode) { - if (!saveChanges(false)) return; +void frmMain::onSerialPortReadyRead() +{ + while (m_serialPort.canReadLine()) { + QString data = m_serialPort.readLine().trimmed(); - // Load dropped g-code file - if (!fileName.isEmpty()) { - addRecentFile(fileName); - updateRecentFilesMenu(); - loadFile(fileName); - // Load dropped text - } else { - m_programFileName.clear(); - m_fileChanged = true; - loadFile(de->mimeData()->text().split("\n")); + // Filter prereset responses + if (m_reseting) { + if (!dataIsReset(data)) continue; + else { + m_reseting = false; + m_timerStateQuery.setInterval(m_settings->queryStateTime()); + } } - } else { - if (!saveChanges(true)) return; - // Load dropped heightmap file - addRecentHeightmap(fileName); - updateRecentFilesMenu(); - loadHeightMap(fileName); - } -} + // Status response + if (data[0] == '<') { + int status = -1; -QMenu *frmMain::createPopupMenu() -{ - QMenu *menu = QMainWindow::createPopupMenu(); + m_statusReceived = true; - foreach (QAction *a, menu->actions()) { - if (a->text().contains("_spacer")) { - a->setVisible(false); - } - } + // Update machine coordinates + static QRegExp mpx("MPos:([^,]*),([^,]*),([^,^>^|]*)"); + if (mpx.indexIn(data) != -1) { + ui->txtMPosX->setValue(mpx.cap(1).toDouble()); + ui->txtMPosY->setValue(mpx.cap(2).toDouble()); + ui->txtMPosZ->setValue(mpx.cap(3).toDouble()); - return menu; -} + // Update stored vars + m_storedVars.setCoords("M", QVector3D( + ui->txtMPosX->value(), + ui->txtMPosY->value(), + ui->txtMPosZ->value())); + } -void frmMain::on_actFileExit_triggered() -{ - close(); -} + // Status + static QRegExp stx("<([^,^>^|]*)"); + if (stx.indexIn(data) != -1) { + status = m_status.indexOf(stx.cap(1)); -void frmMain::on_cmdFileOpen_clicked() -{ - if (!m_heightMapMode) { - if (!saveChanges(false)) return; + // Undetermined status + if (status == -1) status = 0; - QString fileName = QFileDialog::getOpenFileName(this, tr("Open"), m_lastFolder, - tr("G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*)")); + // Update status + if (status != m_lastGrblStatus) { + ui->txtStatus->setText(m_statusCaptions[status]); + ui->txtStatus->setStyleSheet(QString("background-color: %1; color: %2;") + .arg(m_statusBackColors[status]).arg(m_statusForeColors[status])); + emit statusChanged(status); + } - if (!fileName.isEmpty()) m_lastFolder = fileName.left(fileName.lastIndexOf(QRegExp("[/\\\\]+"))); + // Update controls + ui->cmdCheck->setEnabled(status != RUN && !m_processingFile); + ui->cmdCheck->setChecked(status == CHECK); + ui->cmdFilePause->setChecked(status == HOLD0 || status == HOLD1 || status == QUEUE); + ui->cmdSpindle->setEnabled(!m_processingFile || status == HOLD0); +#ifdef WINDOWS + if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { + if (m_taskBarProgress) m_taskBarProgress->setPaused(status == HOLD0 || status == HOLD1 || status == QUEUE); + } +#endif - if (fileName != "") { - addRecentFile(fileName); - updateRecentFilesMenu(); + // Update "elapsed time" timer + if (m_processingFile) { + QTime time(0, 0, 0); + int elapsed = m_startTime.elapsed(); + ui->glwVisualizer->setSpendTime(time.addMSecs(elapsed)); + } - loadFile(fileName); - } - } else { - if (!saveChanges(true)) return; + // Test for job complete + if (m_processingFile && m_transferCompleted && + ((status == IDLE && m_lastGrblStatus == RUN) || status == CHECK)) { - QString fileName = QFileDialog::getOpenFileName(this, tr("Open"), m_lastFolder, tr("Heightmap files (*.map)")); + // Shadow last segment + GcodeViewParse *parser = m_currentDrawer->viewParser(); + QList list = parser->getLineSegmentList(); + if (m_lastDrawnLineIndex < list.count()) { + list[m_lastDrawnLineIndex]->setDrawn(true); + m_currentDrawer->update(QList() << m_lastDrawnLineIndex); + } - if (fileName != "") { - addRecentHeightmap(fileName); - updateRecentFilesMenu(); - loadHeightMap(fileName); - } - } -} + // Update state + m_processingFile = false; + m_fileProcessedCommandIndex = 0; + m_lastDrawnLineIndex = 0; + m_storedParserStatus.clear(); -void frmMain::resetHeightmap() -{ - delete m_heightMapInterpolationDrawer.data(); - m_heightMapInterpolationDrawer.setData(NULL); + updateControlsState(); - ui->tblHeightMap->setModel(NULL); - m_heightMapModel.resize(1, 1); + qApp->beep(); - ui->txtHeightMap->clear(); - m_heightMapFileName.clear(); - m_heightMapChanged = false; -} + m_timerStateQuery.stop(); + m_timerConnection.stop(); + + QMessageBox::information(this, qApp->applicationDisplayName(), tr("Job done.\nTime elapsed: %1") + .arg(ui->glwVisualizer->spendTime().toString("hh:mm:ss"))); + + m_timerStateQuery.setInterval(m_settings->queryStateTime()); + m_timerConnection.start(); + m_timerStateQuery.start(); + } + + // Store status + if (status != m_lastGrblStatus) m_lastGrblStatus = status; + + // Abort + static double x = sNan; + static double y = sNan; + static double z = sNan; + + if (m_aborting) { + switch (status) { + case IDLE: // Idle + if (!m_processingFile && m_resetCompleted) { + m_aborting = false; + restoreParserState(); + restoreOffsets(); + return; + } + break; + case HOLD0: // Hold + case HOLD1: + case QUEUE: + if (!m_reseting && compareCoordinates(x, y, z)) { + x = sNan; + y = sNan; + z = sNan; + grblReset(); + } else { + x = ui->txtMPosX->value(); + y = ui->txtMPosY->value(); + z = ui->txtMPosZ->value(); + } + break; + } + } + } + + // Store work offset + static QVector3D workOffset; + static QRegExp wpx("WCO:([^,]*),([^,]*),([^,^>^|]*)"); + + if (wpx.indexIn(data) != -1) + { + workOffset = QVector3D(wpx.cap(1).toDouble(), wpx.cap(2).toDouble(), wpx.cap(3).toDouble()); + } + + // Update work coordinates + ui->txtWPosX->setValue(ui->txtMPosX->value() - workOffset.x()); + ui->txtWPosY->setValue(ui->txtMPosY->value() - workOffset.y()); + ui->txtWPosZ->setValue(ui->txtMPosZ->value() - workOffset.z()); + + // Update stored vars + m_storedVars.setCoords("W", QVector3D( + ui->txtWPosX->value(), + ui->txtWPosY->value(), + ui->txtWPosZ->value())); + + // Update tool position + QVector3D toolPosition; + if (!(status == CHECK && m_fileProcessedCommandIndex < m_currentModel->rowCount() - 1)) { + toolPosition = QVector3D(toMetric(ui->txtWPosX->value()), + toMetric(ui->txtWPosY->value()), + toMetric(ui->txtWPosZ->value())); + m_toolDrawer.setToolPosition(m_codeDrawer->getIgnoreZ() ? QVector3D(toolPosition.x(), toolPosition.y(), 0) : toolPosition); + } + + + // Toolpath shadowing + if (m_processingFile && status != CHECK) { + GcodeViewParse *parser = m_currentDrawer->viewParser(); + + bool toolOntoolpath = false; + + QList drawnLines; + QList list = parser->getLineSegmentList(); + + for (int i = m_lastDrawnLineIndex; i < list.count() + && list.at(i)->getLineNumber() + <= (m_currentModel->data(m_currentModel->index(m_fileProcessedCommandIndex, 4)).toInt() + 1); i++) { + if (list.at(i)->contains(toolPosition)) { + toolOntoolpath = true; + m_lastDrawnLineIndex = i; + break; + } + drawnLines << i; + } + + if (toolOntoolpath) { + foreach (int i, drawnLines) { + list.at(i)->setDrawn(true); + } + if (!drawnLines.isEmpty()) m_currentDrawer->update(drawnLines); + } + } + + // Get overridings + static QRegExp ov("Ov:([^,]*),([^,]*),([^,^>^|]*)"); + if (ov.indexIn(data) != -1) + { + updateOverride(ui->slbFeedOverride, ov.cap(1).toInt(), '\x91'); + updateOverride(ui->slbSpindleOverride, ov.cap(3).toInt(), '\x9a'); -void frmMain::loadFile(QList data) -{ - // Reset tables - clearTable(); - m_probeModel.clear(); - m_programHeightmapModel.clear(); - m_currentModel = &m_programModel; + int rapid = ov.cap(2).toInt(); + ui->slbRapidOverride->setCurrentValue(rapid); - // Reset parsers - m_viewParser.reset(); - m_probeParser.reset(); + int target = ui->slbRapidOverride->isChecked() ? ui->slbRapidOverride->value() : 100; - // Reset code drawer - m_currentDrawer = m_codeDrawer; - m_codeDrawer->update(); - ui->glwVisualizer->fitDrawable(m_codeDrawer); - updateProgramEstimatedTime(QList()); + if (rapid != target) switch (target) { + case 25: + m_serialPort.write(QByteArray(1, char(0x97))); + break; + case 50: + m_serialPort.write(QByteArray(1, char(0x96))); + break; + case 100: + m_serialPort.write(QByteArray(1, char(0x95))); + break; + } - // Update interface - ui->chkHeightMapUse->setChecked(false); - ui->grpHeightMap->setProperty("overrided", false); - style()->unpolish(ui->grpHeightMap); - ui->grpHeightMap->ensurePolished(); + // Update pins state + QString pinState; + static QRegExp pn("Pn:([^|^>]*)"); + if (pn.indexIn(data) != -1) { + pinState.append(QString(tr("PS: %1")).arg(pn.cap(1))); + } - // Reset tableview - QByteArray headerState = ui->tblProgram->horizontalHeader()->saveState(); - ui->tblProgram->setModel(NULL); + // Process spindle state + static QRegExp as("A:([^,^>^|]+)"); + if (as.indexIn(data) != -1) { + QString state = as.cap(1); + m_spindleCW = state.contains("S"); + if (state.contains("S") || state.contains("C")) { + m_timerToolAnimation.start(25, this); + ui->cmdSpindle->setChecked(true); + } else { + m_timerToolAnimation.stop(); + ui->cmdSpindle->setChecked(false); + } - // Prepare parser - GcodeParser gp; - gp.setTraverseSpeed(m_settings->rapidSpeed()); - if (m_codeDrawer->getIgnoreZ()) gp.reset(QVector3D(qQNaN(), qQNaN(), 0)); + if (!pinState.isEmpty()) pinState.append(" / "); + pinState.append(QString(tr("AS: %1")).arg(as.cap(1))); + } else { + m_timerToolAnimation.stop(); + ui->cmdSpindle->setChecked(false); + } + ui->glwVisualizer->setPinState(pinState); + } - // Block parser updates on table changes - m_programLoading = true; + // Get feed/spindle values + static QRegExp fs("FS:([^,]*),([^,^|^>]*)"); + if (fs.indexIn(data) != -1) { + ui->glwVisualizer->setSpeedState((QString(tr("F/S: %1 / %2")).arg(fs.cap(1)).arg(fs.cap(2)))); + } - QString command; - QString stripped; - QString trimmed; - QList args; - GCodeItem item; + // Emit status signal + emit statusReceived(data); - // Prepare model - m_programModel.data().clear(); - m_programModel.data().reserve(data.count()); + // Command response + } else if (data.length() > 0) { - QProgressDialog progress(tr("Opening file..."), tr("Abort"), 0, data.count(), this); - progress.setWindowModality(Qt::WindowModal); - progress.setFixedSize(progress.sizeHint()); - if (data.count() > PROGRESSMINLINES) { - progress.show(); - progress.setStyleSheet("QProgressBar {text-align: center; qproperty-format: \"\"}"); - } + if (m_commands.length() > 0 && !dataIsFloating(data) + && !(m_commands[0].command != "[CTRL+X]" && dataIsReset(data))) { - while (!data.isEmpty()) - { - command = data.takeFirst(); + static QString response; // Full response string - // Trim command - trimmed = command.trimmed(); + if ((m_commands[0].command != "[CTRL+X]" && dataIsEnd(data)) + || (m_commands[0].command == "[CTRL+X]" && dataIsReset(data))) { - if (!trimmed.isEmpty()) { - // Split command - stripped = GcodePreprocessorUtils::removeComment(command); - args = GcodePreprocessorUtils::splitCommand(stripped); + response.append(data); - gp.addCommand(args); + // Take command from buffer + CommandAttributes ca = m_commands.takeFirst(); + QTextBlock tb = ui->txtConsole->document()->findBlockByNumber(ca.consoleIndex); + QTextCursor tc(tb); - item.command = trimmed; - item.state = GCodeItem::InQueue; - item.line = gp.getCommandNumber(); - item.args = args; + QString uncomment = GcodePreprocessorUtils::removeComment(ca.command).toUpper(); - m_programModel.data().append(item); - } + // Store current coordinate system + if (uncomment == "$G") { + static QRegExp g("G5[4-9]"); + if (g.indexIn(response) != -1) { + m_storedVars.setCS(g.cap(0)); + } + } - if (progress.isVisible() && (data.count() % PROGRESSSTEP == 0)) { - progress.setValue(progress.maximum() - data.count()); - qApp->processEvents(); - if (progress.wasCanceled()) break; - } - } - progress.close(); + // Restore absolute/relative coordinate system after jog + if (uncomment == "$G" && ca.tableIndex == -2) { + if (ui->chkKeyboardControl->isChecked()) m_absoluteCoordinates = response.contains("G90"); + else if (response.contains("G90")) sendCommand("G90", -1, m_settings->showUICommands()); + } - m_programModel.insertRow(m_programModel.rowCount()); + // Jog + if (uncomment.contains("$J=") && ca.tableIndex == -2) { + jogStep(); + } - updateProgramEstimatedTime(m_viewParser.getLinesFromParser(&gp, m_settings->arcPrecision(), m_settings->arcDegreeMode())); + // Process parser status + if (uncomment == "$G" && ca.tableIndex == -3) { + // Update status in visualizer window + ui->glwVisualizer->setParserStatus(response.left(response.indexOf("; "))); - m_programLoading = false; + // Store parser status + if (m_processingFile) storeParserState(); - // Set table model - ui->tblProgram->setModel(&m_programModel); - ui->tblProgram->horizontalHeader()->restoreState(headerState); + // Spindle speed + QRegExp rx(".*S([\\d\\.]+)"); + if (rx.indexIn(response) != -1) { + double speed = toMetric(rx.cap(1).toDouble()); //RPM in imperial? + ui->slbSpindle->setCurrentValue(speed); + } - // Update tableview - connect(ui->tblProgram->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(onTableCurrentChanged(QModelIndex,QModelIndex))); - ui->tblProgram->selectRow(0); + m_updateParserStatus = true; + } - // Update code drawer - m_codeDrawer->update(); - ui->glwVisualizer->fitDrawable(m_codeDrawer); + // Offsets + if (uncomment == "$#") storeOffsetsVars(response); - resetHeightmap(); - updateControlsState(); -} + // Settings response + if (uncomment == "$$" && ca.tableIndex == -2) { + static QRegExp gs("\\$(\\d+)\\=([^;]+)\\; "); + QMap set; + int p = 0; + while ((p = gs.indexIn(response, p)) != -1) { + set[gs.cap(1).toInt()] = gs.cap(2).toDouble(); + p += gs.matchedLength(); + } + if (set.keys().contains(13)) m_settings->setUnits(set[13]); + if (set.keys().contains(110)) m_settings->setRapidSpeed(set[110]); + if (set.keys().contains(120)) m_settings->setAcceleration(set[120]); -void frmMain::loadFile(QString fileName) -{ - QFile file(fileName); + setupCoordsTextboxes(); + } - if (!file.open(QIODevice::ReadOnly)) { - QMessageBox::critical(this, this->windowTitle(), tr("Can't open file:\n") + fileName); - return; - } + // Homing response + if ((uncomment == "$H" || uncomment == "$T") && m_homing) m_homing = false; - // Set filename - m_programFileName = fileName; + // Reset complete response + if (uncomment == "[CTRL+X]") { + m_resetCompleted = true; + m_updateParserStatus = true; - // Prepare text stream - QTextStream textStream(&file); + // Query grbl settings + sendCommand("$$", -2, false); + } - // Read lines - QList data; - while (!textStream.atEnd()) data.append(textStream.readLine()); + // Clear command buffer on "M2" & "M30" command (old firmwares) + static QRegExp M230("M0*2|M30"); + if (uncomment.contains(M230) && response.contains("ok") && !response.contains("Pgm End")) { + m_commands.clear(); + m_queue.clear(); + } - // Load lines - loadFile(data); -} + // Update probe coords on user commands + if (uncomment.contains("G38.2") && ca.tableIndex < 0) { + static QRegExp PRB(".*PRB:([^,]*),([^,]*),([^]^:]*)"); + if (PRB.indexIn(response) != -1) { + m_storedVars.setCoords("PRB", QVector3D( + PRB.cap(1).toDouble(), + PRB.cap(2).toDouble(), + PRB.cap(3).toDouble() + )); + } + } -QTime frmMain::updateProgramEstimatedTime(QList lines) -{ - double time = 0; + // Process probing on heightmap mode only from table commands + if (uncomment.contains("G38.2") && m_heightMapMode && ca.tableIndex > -1) { + // Get probe Z coordinate + // "[PRB:0.000,0.000,0.000:0];ok" + QRegExp rx(".*PRB:([^,]*),([^,]*),([^]^:]*)"); + double z = qQNaN(); + if (rx.indexIn(response) != -1) { + z = toMetric(rx.cap(3).toDouble()); + } - for (int i = 0; i < lines.count(); i++) { - LineSegment *ls = lines[i]; - double length = (ls->getEnd() - ls->getStart()).length(); + static double firstZ; + if (m_probeIndex == -1) { + firstZ = z; + z = 0; + } else { + // Calculate delta Z + z -= firstZ; - // TODO: Update for rapid override - if (!qIsNaN(length) && !qIsNaN(ls->getSpeed()) && ls->getSpeed() != 0) time += - length / ((ui->slbFeedOverride->isChecked() && !ls->isFastTraverse()) - ? (ls->getSpeed() * ui->slbFeedOverride->value() / 100) : - (ui->slbRapidOverride->isChecked() && ls->isFastTraverse()) - ? (ls->getSpeed() * ui->slbRapidOverride->value() / 100) : ls->getSpeed()); - } + // Calculate table indexes + int row = (m_probeIndex / m_heightMapModel.columnCount()); + int column = m_probeIndex - row * m_heightMapModel.columnCount(); + if (row % 2) column = m_heightMapModel.columnCount() - 1 - column; - time *= 60; + // Store Z in table + m_heightMapModel.setData(m_heightMapModel.index(row, column), z, Qt::UserRole); + ui->tblHeightMap->update(m_heightMapModel.index(m_heightMapModel.rowCount() - 1 - row, column)); + updateHeightMapInterpolationDrawer(); + } - QTime t; + m_probeIndex++; + } - t.setHMS(0, 0, 0); - t = t.addSecs(time); + // Change state query time on check mode on + if (uncomment.contains(QRegExp("$[cC]"))) { + m_timerStateQuery.setInterval(response.contains("Enable") ? 1000 : m_settings->queryStateTime()); + } - ui->glwVisualizer->setSpendTime(QTime(0, 0, 0)); - ui->glwVisualizer->setEstimatedTime(t); + // Add response to console + if (tb.isValid() && tb.text() == ca.command) { - return t; -} + bool scrolledDown = ui->txtConsole->verticalScrollBar()->value() + == ui->txtConsole->verticalScrollBar()->maximum(); -void frmMain::clearTable() -{ - m_programModel.clear(); - m_programModel.insertRow(0); -} + // Update text block numbers + int blocksAdded = response.count("; "); -void frmMain::on_cmdFit_clicked() -{ - ui->glwVisualizer->fitDrawable(m_currentDrawer); -} + if (blocksAdded > 0) for (int i = 0; i < m_commands.count(); i++) { + if (m_commands[i].consoleIndex != -1) m_commands[i].consoleIndex += blocksAdded; + } -void frmMain::on_cmdFileSend_clicked() -{ - if (m_currentModel->rowCount() == 1) return; + tc.beginEditBlock(); + tc.movePosition(QTextCursor::EndOfBlock); - on_cmdFileReset_clicked(); + tc.insertText(" < " + QString(response).replace("; ", "\r\n")); + tc.endEditBlock(); - m_startTime.start(); + if (scrolledDown) ui->txtConsole->verticalScrollBar()->setValue( + ui->txtConsole->verticalScrollBar()->maximum()); + } - m_transferCompleted = false; - m_processingFile = true; - m_fileEndSent = false; - m_storedKeyboardControl = ui->chkKeyboardControl->isChecked(); - ui->chkKeyboardControl->setChecked(false); + // Check queue + if (m_queue.length() > 0) { + CommandQueue cq = m_queue.takeFirst(); + + while ((bufferLength() + cq.command.length() + 1) <= BUFFERLENGTH) { + int r = 0; + if (!cq.command.isEmpty()) r = sendCommand(cq.command, cq.tableIndex, cq.showInConsole); + if ((!r && !cq.command.isEmpty() && (m_queue.isEmpty() || cq.queue)) || m_queue.isEmpty()) break; + else cq = m_queue.takeFirst(); + } + } - if (!ui->cmdCheck->isChecked()) storeOffsets(); // Allready stored on check - storeParserState(); + // Add response to table, send next program commands + if (m_processingFile) { -#ifdef WINDOWS - if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { - if (m_taskBarProgress) { - m_taskBarProgress->setMaximum(m_currentModel->rowCount() - 2); - m_taskBarProgress->setValue(0); - m_taskBarProgress->show(); - } - } -#endif + // Only if command from table + if (ca.tableIndex > -1) { + m_currentModel->setData(m_currentModel->index(ca.tableIndex, 2), GCodeItem::Processed); + m_currentModel->setData(m_currentModel->index(ca.tableIndex, 3), response); - updateControlsState(); - ui->cmdFilePause->setFocus(); + m_fileProcessedCommandIndex = ca.tableIndex; - sendNextFileCommands(); -} + if (ui->chkAutoScroll->isChecked() && ca.tableIndex != -1) { + ui->tblProgram->scrollTo(m_currentModel->index(ca.tableIndex + 1, 0)); // TODO: Update by timer + ui->tblProgram->setCurrentIndex(m_currentModel->index(ca.tableIndex, 1)); + } + } -void frmMain::onActSendFromLineTriggered() -{ - if (m_currentModel->rowCount() == 1) return; + // Update taskbar progress +#ifdef WINDOWS + if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { + if (m_taskBarProgress) m_taskBarProgress->setValue(m_fileProcessedCommandIndex); + } +#endif + // Process error messages + static bool holding = false; + static QString errors; - //Line to start from - int commandIndex = ui->tblProgram->currentIndex().row(); + if (ca.tableIndex > -1 && response.toUpper().contains("ERROR") && !m_settings->ignoreErrors()) { + errors.append(QString::number(ca.tableIndex + 1) + ": " + ca.command + + " < " + response + "\n"); - // Set parser state - if (m_settings->autoLine()) { - GcodeViewParse *parser = m_currentDrawer->viewParser(); - QList list = parser->getLineSegmentList(); - QVector> lineIndexes = parser->getLinesIndexes(); + m_senderErrorBox->setText(tr("Error message(s) received:\n") + errors); - int lineNumber = m_currentModel->data(m_currentModel->index(commandIndex, 4)).toInt(); - LineSegment* firstSegment = list.at(lineIndexes.at(lineNumber).first()); - LineSegment* lastSegment = list.at(lineIndexes.at(lineNumber).last()); - LineSegment* feedSegment = lastSegment; - int segmentIndex = list.indexOf(feedSegment); - while (feedSegment->isFastTraverse() && segmentIndex > 0) feedSegment = list.at(--segmentIndex); + if (!holding) { + holding = true; // Hold transmit while messagebox is visible + response.clear(); - QStringList commands; + m_serialPort.write("!"); + m_senderErrorBox->checkBox()->setChecked(false); + qApp->beep(); + int result = m_senderErrorBox->exec(); - commands.append(QString("M3 S%1").arg(qMax(lastSegment->getSpindleSpeed(), ui->slbSpindle->value()))); + holding = false; + errors.clear(); + if (m_senderErrorBox->checkBox()->isChecked()) m_settings->setIgnoreErrors(true); + if (result == QMessageBox::Ignore) m_serialPort.write("~"); else on_cmdFileAbort_clicked(); + } + } - commands.append(QString("G21 G90 G0 X%1 Y%2") - .arg(firstSegment->getStart().x()) - .arg(firstSegment->getStart().y())); - commands.append(QString("G1 Z%1 F%2") - .arg(firstSegment->getStart().z()) - .arg(feedSegment->getSpeed())); + // Check transfer complete (last row always blank, last command row = rowcount - 2) + if (m_fileProcessedCommandIndex == m_currentModel->rowCount() - 2 + || uncomment.contains(QRegExp("M0*2|M30"))) + m_transferCompleted = true; + // Send next program commands + else if (!m_fileEndSent && (m_fileCommandIndex < m_currentModel->rowCount()) && !holding) sendNextFileCommands(); + } - commands.append(QString("%1 %2 %3 F%4") - .arg(lastSegment->isMetric() ? "G21" : "G20") - .arg(lastSegment->isAbsolute() ? "G90" : "G91") - .arg(lastSegment->isFastTraverse() ? "G0" : "G1") - .arg(lastSegment->isMetric() ? feedSegment->getSpeed() : feedSegment->getSpeed() / 25.4)); + // Scroll to first line on "M30" command + if (uncomment.contains("M30")) ui->tblProgram->setCurrentIndex(m_currentModel->index(0, 1)); - if (lastSegment->isArc()) { - commands.append(lastSegment->plane() == PointSegment::XY ? "G17" - : lastSegment->plane() == PointSegment::ZX ? "G18" : "G19"); - } + // Toolpath shadowing on check mode + if (m_statusCaptions.indexOf(ui->txtStatus->text()) == CHECK) { + GcodeViewParse *parser = m_currentDrawer->viewParser(); + QList list = parser->getLineSegmentList(); - QMessageBox box(this); - box.setIcon(QMessageBox::Information); - box.setText(tr("Following commands will be sent before selected line:\n") + commands.join('\n')); - box.setWindowTitle(qApp->applicationDisplayName()); - box.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); - box.addButton(tr("Skip"), QMessageBox::DestructiveRole); + if (!m_transferCompleted && m_fileProcessedCommandIndex < m_currentModel->rowCount() - 1) { + int i; + QList drawnLines; - int res = box.exec(); - if (res == QMessageBox::Cancel) return; - else if (res == QMessageBox::Ok) { - foreach (QString command, commands) { - sendCommand(command, -1, m_settings->showUICommands()); - } - } - } + for (i = m_lastDrawnLineIndex; i < list.count() + && list.at(i)->getLineNumber() + <= (m_currentModel->data(m_currentModel->index(m_fileProcessedCommandIndex, 4)).toInt()); i++) { + drawnLines << i; + } - m_fileCommandIndex = commandIndex; - m_fileProcessedCommandIndex = commandIndex; - m_lastDrawnLineIndex = 0; - m_probeIndex = -1; + if (!drawnLines.isEmpty() && (i < list.count())) { + m_lastDrawnLineIndex = i; + QVector3D vec = list.at(i)->getEnd(); + m_toolDrawer.setToolPosition(vec); + } - QList list = m_viewParser.getLineSegmentList(); + foreach (int i, drawnLines) { + list.at(i)->setDrawn(true); + } + if (!drawnLines.isEmpty()) m_currentDrawer->update(drawnLines); + } else { + foreach (LineSegment* s, list) { + if (!qIsNaN(s->getEnd().length())) { + m_toolDrawer.setToolPosition(s->getEnd()); + break; + } + } + } + } - QList indexes; - for (int i = 0; i < list.count(); i++) { - list[i]->setDrawn(list.at(i)->getLineNumber() < m_currentModel->data().at(commandIndex).line); - indexes.append(i); - } - m_codeDrawer->update(indexes); + // Emit response signal + if (ca.tableIndex <= -100) { + emit responseReceived(ca.command, -(100 + ca.tableIndex), response); + } - ui->tblProgram->setUpdatesEnabled(false); + response.clear(); + } else { + response.append(data + "; "); + } - for (int i = 0; i < m_currentModel->data().count() - 1; i++) { - m_currentModel->data()[i].state = i < commandIndex ? GCodeItem::Skipped : GCodeItem::InQueue; - m_currentModel->data()[i].response = QString(); - } - ui->tblProgram->setUpdatesEnabled(true); - ui->glwVisualizer->setSpendTime(QTime(0, 0, 0)); + } else { + // Unprocessed responses + // Handle hardware reset + if (dataIsReset(data)) { + m_processingFile = false; + m_transferCompleted = true; + m_fileCommandIndex = 0; - m_startTime.start(); + m_reseting = false; + m_homing = false; + m_lastGrblStatus = -1; - m_transferCompleted = false; - m_processingFile = true; - m_fileEndSent = false; - m_storedKeyboardControl = ui->chkKeyboardControl->isChecked(); - ui->chkKeyboardControl->setChecked(false); + m_updateParserStatus = true; + m_statusReceived = true; - if (!ui->cmdCheck->isChecked()) storeOffsets(); // Allready stored on check - storeParserState(); + m_commands.clear(); + m_queue.clear(); -#ifdef WINDOWS - if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { - if (m_taskBarProgress) { - m_taskBarProgress->setMaximum(m_currentModel->rowCount() - 2); - m_taskBarProgress->setValue(commandIndex); - m_taskBarProgress->show(); + updateControlsState(); + } + ui->txtConsole->appendPlainText(data); + } + } else { + // Blank response } } -#endif - - updateControlsState(); - ui->cmdFilePause->setFocus(); - - m_fileCommandIndex = commandIndex; - m_fileProcessedCommandIndex = commandIndex; - sendNextFileCommands(); } -void frmMain::onSlbSpindleValueUserChanged() +void frmMain::onSerialPortError(QSerialPort::SerialPortError error) { - m_updateSpindleSpeed = true; -} + static QSerialPort::SerialPortError previousError; -void frmMain::onSlbSpindleValueChanged() -{ - if (!ui->grpSpindle->isChecked() && ui->cmdSpindle->isChecked()) - ui->grpSpindle->setTitle(tr("Spindle") + QString(tr(" (%1)")).arg(ui->slbSpindle->value())); + if (error != QSerialPort::NoError && error != previousError) { + previousError = error; + ui->txtConsole->appendPlainText(tr("Serial port error ") + QString::number(error) + ": " + m_serialPort.errorString()); + if (m_serialPort.isOpen()) { + m_serialPort.close(); + updateControlsState(); + } + } } -void frmMain::onDockTopLevelChanged(bool topLevel) +void frmMain::onTimerConnection() { - Q_UNUSED(topLevel) - static_cast(sender())->setStyleSheet(""); + if (!m_serialPort.isOpen()) { + openPort(); + } else if (!m_homing/* && !m_reseting*/ && !ui->cmdFilePause->isChecked() && m_queue.length() == 0) { + if (m_updateSpindleSpeed) { + m_updateSpindleSpeed = false; + sendCommand(QString("S%1").arg(ui->slbSpindle->value()), -2, m_settings->showUICommands()); + } + if (m_updateParserStatus) { + m_updateParserStatus = false; + sendCommand("$G", -3, false); + } + } } -void frmMain::on_cmdFileAbort_clicked() +void frmMain::onTimerStateQuery() { - m_aborting = true; - if (!ui->cmdCheck->isChecked()) { - m_serialPort.write("!"); - } else { - grblReset(); + if (m_serialPort.isOpen() && m_resetCompleted && m_statusReceived) { + m_serialPort.write(QByteArray(1, '?')); + m_statusReceived = false; } -} -void frmMain::storeParserState() -{ - m_storedParserStatus = ui->glwVisualizer->parserStatus().remove( - QRegExp("GC:|\\[|\\]|G[01234]\\s|M[0345]+\\s|\\sF[\\d\\.]+|\\sS[\\d\\.]+")); + ui->glwVisualizer->setBufferState(QString(tr("Buffer: %1 / %2 / %3")).arg(bufferLength()).arg(m_commands.length()).arg(m_queue.length())); } -void frmMain::restoreParserState() +void frmMain::onTableInsertLine() { - if (!m_storedParserStatus.isEmpty()) sendCommand(m_storedParserStatus, -1, m_settings->showUICommands()); -} + if (ui->tblProgram->selectionModel()->selectedRows().count() == 0 || m_processingFile) return; -void frmMain::storeOffsets() -{ -// sendCommand("$#", -2, m_settings->showUICommands()); -} + int row = ui->tblProgram->selectionModel()->selectedRows()[0].row(); -void frmMain::restoreOffsets() -{ - // Still have pre-reset working position - sendCommand(QString("%4G53G90X%1Y%2Z%3").arg(ui->txtMPosX->value()) - .arg(ui->txtMPosY->value()) - .arg(ui->txtMPosZ->value()) - .arg(m_settings->units() ? "G20" : "G21"), - -2, m_settings->showUICommands()); + m_currentModel->insertRow(row); + m_currentModel->setData(m_currentModel->index(row, 2), GCodeItem::InQueue); - sendCommand(QString("%4G92X%1Y%2Z%3").arg(ui->txtWPosX->value()) - .arg(ui->txtWPosY->value()) - .arg(ui->txtWPosZ->value()) - .arg(m_settings->units() ? "G20" : "G21"), - -2, m_settings->showUICommands()); + updateParser(); + + ui->tblProgram->selectRow(row); } -void frmMain::storeOffsetsVars(QString response) +void frmMain::onTableDeleteLines() { - static QRegExp gx("\\[(G5[4-9]|G28|G30|G92|PRB):([\\d\\.\\-]+),([\\d\\.\\-]+),([\\d\\.\\-]+)"); - static QRegExp tx("\\[(TLO):([\\d\\.\\-]+)"); + if (ui->tblProgram->selectionModel()->selectedRows().count() == 0 || m_processingFile || + QMessageBox::warning(this, this->windowTitle(), tr("Delete lines?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) return; - int p = 0; - while ((p = gx.indexIn(response, p)) != -1) { - m_storedVars.setCoords(gx.cap(1), QVector3D( - gx.cap(2).toDouble(), - gx.cap(3).toDouble(), - gx.cap(4).toDouble() - )); - - p += gx.matchedLength(); - } + QModelIndex firstRow = ui->tblProgram->selectionModel()->selectedRows()[0]; + int rowsCount = ui->tblProgram->selectionModel()->selectedRows().count(); + if (ui->tblProgram->selectionModel()->selectedRows().last().row() == m_currentModel->rowCount() - 1) rowsCount--; - if (tx.indexIn(response) != -1) { - m_storedVars.setCoords(tx.cap(1), QVector3D( - 0, - 0, - tx.cap(2).toDouble() - )); - } -} + if (firstRow.row() != m_currentModel->rowCount() - 1) { + m_currentModel->removeRows(firstRow.row(), rowsCount); + } else return; -void frmMain::sendNextFileCommands() { - if (m_queue.length() > 0) return; + // Drop heightmap cache + if (m_currentModel == &m_programModel) m_programHeightmapModel.clear(); - QString command = m_currentModel->data(m_currentModel->index(m_fileCommandIndex, 1)).toString(); - static QRegExp M230("M0*2|M30"); + updateParser(); - while ((bufferLength() + command.length() + 1) <= BUFFERLENGTH - && m_fileCommandIndex < m_currentModel->rowCount() - 1 - && !(!m_commands.isEmpty() - && GcodePreprocessorUtils::removeComment(m_commands.last().command).contains(M230))) { - m_currentModel->setData(m_currentModel->index(m_fileCommandIndex, 2), GCodeItem::Sent); - sendCommand(command, m_fileCommandIndex, m_settings->showProgramCommands()); - m_fileCommandIndex++; - command = m_currentModel->data(m_currentModel->index(m_fileCommandIndex, 1)).toString(); - } + ui->tblProgram->selectRow(firstRow.row()); } void frmMain::onTableCellChanged(QModelIndex i1, QModelIndex i2) @@ -2281,1140 +2245,1141 @@ void frmMain::onTableCurrentChanged(QModelIndex idx1, QModelIndex idx2) QList indexes; for (int i = lineFirst + 1; i <= lineLast; i++) { foreach (int l, lineIndexes.at(i)) { - list.at(l)->setIsHightlight(idx1.row() > idx2.row()); - indexes.append(l); - } - } - - m_selectionDrawer.setEndPosition(indexes.isEmpty() ? QVector3D(sNan, sNan, sNan) : - (m_codeDrawer->getIgnoreZ() ? QVector3D(list.at(indexes.last())->getEnd().x(), list.at(indexes.last())->getEnd().y(), 0) - : list.at(indexes.last())->getEnd())); - m_selectionDrawer.update(); - - if (!indexes.isEmpty()) m_currentDrawer->update(indexes); - } - - // Update selection marker - int line = m_currentModel->data(m_currentModel->index(idx1.row(), 4)).toInt(); - if (line > 0 && line < lineIndexes.count() && !lineIndexes.at(line).isEmpty()) { - QVector3D pos = list.at(lineIndexes.at(line).last())->getEnd(); - m_selectionDrawer.setEndPosition(m_codeDrawer->getIgnoreZ() ? QVector3D(pos.x(), pos.y(), 0) : pos); - } else { - m_selectionDrawer.setEndPosition(QVector3D(sNan, sNan, sNan)); - } - m_selectionDrawer.update(); -} - -void frmMain::onTableInsertLine() -{ - if (ui->tblProgram->selectionModel()->selectedRows().count() == 0 || m_processingFile) return; - - int row = ui->tblProgram->selectionModel()->selectedRows()[0].row(); - - m_currentModel->insertRow(row); - m_currentModel->setData(m_currentModel->index(row, 2), GCodeItem::InQueue); - - updateParser(); - m_cellChanged = true; - ui->tblProgram->selectRow(row); -} - -void frmMain::onTableDeleteLines() -{ - if (ui->tblProgram->selectionModel()->selectedRows().count() == 0 || m_processingFile || - QMessageBox::warning(this, this->windowTitle(), tr("Delete lines?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) return; - - QModelIndex firstRow = ui->tblProgram->selectionModel()->selectedRows()[0]; - int rowsCount = ui->tblProgram->selectionModel()->selectedRows().count(); - if (ui->tblProgram->selectionModel()->selectedRows().last().row() == m_currentModel->rowCount() - 1) rowsCount--; - - if (firstRow.row() != m_currentModel->rowCount() - 1) { - m_currentModel->removeRows(firstRow.row(), rowsCount); - } else return; - - // Drop heightmap cache - if (m_currentModel == &m_programModel) m_programHeightmapModel.clear(); - - updateParser(); - m_cellChanged = true; - ui->tblProgram->selectRow(firstRow.row()); -} - -bool frmMain::actionLessThan(const QAction *a1, const QAction *a2) -{ - return a1->objectName() < a2->objectName(); -} - -bool frmMain::actionTextLessThan(const QAction *a1, const QAction *a2) -{ - return a1->text() < a2->text(); -} - -void frmMain::on_actServiceSettings_triggered() -{ - QList acts = findChildren(QRegExp("act.*")); - QTableWidget *table = m_settings->ui->tblShortcuts; - - table->clear(); - table->setColumnCount(3); - table->setRowCount(acts.count()); - table->setHorizontalHeaderLabels(QStringList() << tr("Command") << tr("Text") << tr("Shortcuts")); - - table->verticalHeader()->setDefaultAlignment(Qt::AlignCenter); - table->verticalHeader()->setFixedWidth(table->verticalHeader()->sizeHint().width() + 11); - - qSort(acts.begin(), acts.end(), frmMain::actionLessThan); - for (int i = 0; i < acts.count(); i++) { - table->setItem(i, 0, new QTableWidgetItem(acts.at(i)->objectName())); - table->setItem(i, 1, new QTableWidgetItem(acts.at(i)->text().remove("&"))); - table->setItem(i, 2, new QTableWidgetItem(acts.at(i)->shortcut().toString())); - - table->item(i, 0)->setFlags(Qt::ItemIsEnabled); - table->item(i, 1)->setFlags(Qt::ItemIsEnabled); - table->item(i, 2)->setFlags(Qt::ItemIsEnabled | Qt::ItemIsEditable); - } - - table->resizeColumnsToContents(); - table->setMinimumHeight(table->rowHeight(0) * 10 - + table->horizontalHeader()->height() + table->frameWidth() * 2); - table->horizontalHeader()->setMinimumSectionSize(table->horizontalHeader()->sectionSize(2)); - table->horizontalHeader()->setStretchLastSection(true); - - if (m_settings->exec()) { - if (m_settings->port() != "" && (m_settings->port() != m_serialPort.portName() || - m_settings->baud() != m_serialPort.baudRate())) { - if (m_serialPort.isOpen()) m_serialPort.close(); - m_serialPort.setPortName(m_settings->port()); - m_serialPort.setBaudRate(m_settings->baud()); - openPort(); - } - - updateControlsState(); - applySettings(); - - // Update shortcuts - for (int i = 0; i < acts.count(); i++) { - acts[i]->setShortcut(QKeySequence(table->item(i, 2)->data(Qt::DisplayRole).toString())); + list.at(l)->setIsHightlight(idx1.row() > idx2.row()); + indexes.append(l); + } } - emit settingsChanged(); + m_selectionDrawer.setEndPosition(indexes.isEmpty() ? QVector3D(sNan, sNan, sNan) : + (m_codeDrawer->getIgnoreZ() ? QVector3D(list.at(indexes.last())->getEnd().x(), list.at(indexes.last())->getEnd().y(), 0) + : list.at(indexes.last())->getEnd())); + m_selectionDrawer.update(); + + if (!indexes.isEmpty()) m_currentDrawer->update(indexes); + } + // Update selection marker + int line = m_currentModel->data(m_currentModel->index(idx1.row(), 4)).toInt(); + if (line > 0 && line < lineIndexes.count() && !lineIndexes.at(line).isEmpty()) { + QVector3D pos = list.at(lineIndexes.at(line).last())->getEnd(); + m_selectionDrawer.setEndPosition(m_codeDrawer->getIgnoreZ() ? QVector3D(pos.x(), pos.y(), 0) : pos); } else { - m_settings->undo(); + m_selectionDrawer.setEndPosition(QVector3D(sNan, sNan, sNan)); } + m_selectionDrawer.update(); } -bool buttonLessThan(StyledToolButton *b1, StyledToolButton *b2) +void frmMain::onOverridingToggled(bool checked) { - return b1->objectName().right(1).toDouble() < b2->objectName().right(1).toDouble(); -} + Q_UNUSED(checked) -void frmMain::applySettings() { - m_originDrawer->setLineWidth(m_settings->lineWidth()); - m_toolDrawer.setToolDiameter(m_settings->toolDiameter()); - m_toolDrawer.setToolLength(m_settings->toolLength()); - m_toolDrawer.setLineWidth(m_settings->lineWidth()); - m_codeDrawer->setLineWidth(m_settings->lineWidth()); - m_heightMapBorderDrawer.setLineWidth(m_settings->lineWidth()); - m_heightMapGridDrawer.setLineWidth(0.1); - m_heightMapInterpolationDrawer.setLineWidth(m_settings->lineWidth()); - ui->glwVisualizer->setLineWidth(m_settings->lineWidth()); - m_timerStateQuery.setInterval(m_settings->queryStateTime()); + ui->grpOverriding->setProperty("overrided", ui->slbFeedOverride->isChecked() + || ui->slbRapidOverride->isChecked() || ui->slbSpindleOverride->isChecked()); + style()->unpolish(ui->grpOverriding); + ui->grpOverriding->ensurePolished(); +} - m_toolDrawer.setToolAngle(m_settings->toolType() == 0 ? 180 : m_settings->toolAngle()); - m_toolDrawer.setColor(m_settings->colors("Tool")); - m_toolDrawer.update(); +void frmMain::onOverrideChanged() +{ + updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); +} - ui->glwVisualizer->setAntialiasing(m_settings->antialiasing()); - ui->glwVisualizer->setMsaa(m_settings->msaa()); - ui->glwVisualizer->setZBuffer(m_settings->zBuffer()); - ui->glwVisualizer->setVsync(m_settings->vsync()); - ui->glwVisualizer->setFps(m_settings->fps()); - ui->glwVisualizer->setColorBackground(m_settings->colors("VisualizerBackground")); - ui->glwVisualizer->setColorText(m_settings->colors("VisualizerText")); +void frmMain::onActRecentFileTriggered() +{ + QAction *action = static_cast(sender()); + QString fileName = action->text(); - ui->slbSpindle->setMinimum(m_settings->spindleSpeedMin()); - ui->slbSpindle->setMaximum(m_settings->spindleSpeedMax()); + if (action != NULL) { + if (!saveChanges(m_heightMapMode)) return; + if (!m_heightMapMode) loadFile(fileName); else loadHeightMap(fileName); + } +} - ui->cboCommand->setAutoCompletion(m_settings->autoCompletion()); +void frmMain::onActSendFromLineTriggered() +{ + if (m_currentModel->rowCount() == 1) return; - m_codeDrawer->setSimplify(m_settings->simplify()); - m_codeDrawer->setSimplifyPrecision(m_settings->simplifyPrecision()); - m_codeDrawer->setColorNormal(m_settings->colors("ToolpathNormal")); - m_codeDrawer->setColorDrawn(m_settings->colors("ToolpathDrawn")); - m_codeDrawer->setColorHighlight(m_settings->colors("ToolpathHighlight")); - m_codeDrawer->setColorZMovement(m_settings->colors("ToolpathZMovement")); - m_codeDrawer->setColorStart(m_settings->colors("ToolpathStart")); - m_codeDrawer->setColorEnd(m_settings->colors("ToolpathEnd")); - m_codeDrawer->setIgnoreZ(m_settings->grayscaleSegments() || !m_settings->drawModeVectors()); - m_codeDrawer->setGrayscaleSegments(m_settings->grayscaleSegments()); - m_codeDrawer->setGrayscaleCode(m_settings->grayscaleSCode() ? GcodeDrawer::S : GcodeDrawer::Z); - m_codeDrawer->setDrawMode(m_settings->drawModeVectors() ? GcodeDrawer::Vectors : GcodeDrawer::Raster); - m_codeDrawer->setGrayscaleMin(m_settings->laserPowerMin()); - m_codeDrawer->setGrayscaleMax(m_settings->laserPowerMax()); - m_codeDrawer->update(); + //Line to start from + int commandIndex = ui->tblProgram->currentIndex().row(); - m_selectionDrawer.setColor(m_settings->colors("ToolpathHighlight")); + // Set parser state + if (m_settings->autoLine()) { + GcodeViewParse *parser = m_currentDrawer->viewParser(); + QList list = parser->getLineSegmentList(); + QVector> lineIndexes = parser->getLinesIndexes(); - // Adapt visualizer buttons colors - const int LIGHTBOUND = 127; - const int NORMALSHIFT = 40; - const int HIGHLIGHTSHIFT = 80; + int lineNumber = m_currentModel->data(m_currentModel->index(commandIndex, 4)).toInt(); + LineSegment* firstSegment = list.at(lineIndexes.at(lineNumber).first()); + LineSegment* lastSegment = list.at(lineIndexes.at(lineNumber).last()); + LineSegment* feedSegment = lastSegment; + int segmentIndex = list.indexOf(feedSegment); + while (feedSegment->isFastTraverse() && segmentIndex > 0) feedSegment = list.at(--segmentIndex); - QColor base = m_settings->colors("VisualizerBackground"); - bool light = base.value() > LIGHTBOUND; - QColor normal, highlight; + QStringList commands; - normal.setHsv(base.hue(), base.saturation(), base.value() + (light ? -NORMALSHIFT : NORMALSHIFT)); - highlight.setHsv(base.hue(), base.saturation(), base.value() + (light ? -HIGHLIGHTSHIFT : HIGHLIGHTSHIFT)); + commands.append(QString("M3 S%1").arg(qMax(lastSegment->getSpindleSpeed(), ui->slbSpindle->value()))); - ui->glwVisualizer->setStyleSheet(QString("QToolButton {border: 1px solid %1; \ - background-color: %3} QToolButton:hover {border: 1px solid %2;}") - .arg(normal.name()).arg(highlight.name()) - .arg(base.name())); + commands.append(QString("G21 G90 G0 X%1 Y%2") + .arg(firstSegment->getStart().x()) + .arg(firstSegment->getStart().y())); + commands.append(QString("G1 Z%1 F%2") + .arg(firstSegment->getStart().z()) + .arg(feedSegment->getSpeed())); - ui->cmdFit->setIcon(QIcon(":/images/fit_1.png")); - ui->cmdIsometric->setIcon(QIcon(":/images/cube.png")); - ui->cmdFront->setIcon(QIcon(":/images/cubeFront.png")); - ui->cmdLeft->setIcon(QIcon(":/images/cubeLeft.png")); - ui->cmdTop->setIcon(QIcon(":/images/cubeTop.png")); + commands.append(QString("%1 %2 %3 F%4") + .arg(lastSegment->isMetric() ? "G21" : "G20") + .arg(lastSegment->isAbsolute() ? "G90" : "G91") + .arg(lastSegment->isFastTraverse() ? "G0" : "G1") + .arg(lastSegment->isMetric() ? feedSegment->getSpeed() : feedSegment->getSpeed() / 25.4)); - if (!light) { - Util::invertButtonIconColors(ui->cmdFit); - Util::invertButtonIconColors(ui->cmdIsometric); - Util::invertButtonIconColors(ui->cmdFront); - Util::invertButtonIconColors(ui->cmdLeft); - Util::invertButtonIconColors(ui->cmdTop); - } + if (lastSegment->isArc()) { + commands.append(lastSegment->plane() == PointSegment::XY ? "G17" + : lastSegment->plane() == PointSegment::ZX ? "G18" : "G19"); + } - int h = ui->cmdFileOpen->sizeHint().height(); - QSize s(h, h); - ui->cboCommand->setMinimumHeight(h); - ui->cmdClearConsole->setFixedSize(s); - ui->cmdCommandSend->setFixedSize(s); + QMessageBox box(this); + box.setIcon(QMessageBox::Information); + box.setText(tr("Following commands will be sent before selected line:\n") + commands.join('\n')); + box.setWindowTitle(qApp->applicationDisplayName()); + box.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); + box.addButton(tr("Skip"), QMessageBox::DestructiveRole); - foreach (StyledToolButton* button, this->findChildren(QRegExp("cmdUser\\d"))) { - button->setToolTip(m_settings->userCommands(button->objectName().right(1).toInt())); - button->setEnabled(!button->toolTip().isEmpty()); + int res = box.exec(); + if (res == QMessageBox::Cancel) return; + else if (res == QMessageBox::Ok) { + foreach (QString command, commands) { + sendCommand(command, -1, m_settings->showUICommands()); + } + } } -} - -void frmMain::updateParser() -{ - GcodeViewParse *parser = m_currentDrawer->viewParser(); - - GcodeParser gp; - gp.setTraverseSpeed(m_settings->rapidSpeed()); - if (m_codeDrawer->getIgnoreZ()) gp.reset(QVector3D(qQNaN(), qQNaN(), 0)); - - ui->tblProgram->setUpdatesEnabled(false); - QString stripped; - QList args; + m_fileCommandIndex = commandIndex; + m_fileProcessedCommandIndex = commandIndex; + m_lastDrawnLineIndex = 0; + m_probeIndex = -1; - QProgressDialog progress(tr("Updating..."), tr("Abort"), 0, m_currentModel->rowCount() - 2, this); - progress.setWindowModality(Qt::WindowModal); - progress.setFixedSize(progress.sizeHint()); + QList list = m_viewParser.getLineSegmentList(); - if (m_currentModel->rowCount() > PROGRESSMINLINES) { - progress.show(); - progress.setStyleSheet("QProgressBar {text-align: center; qproperty-format: \"\"}"); + QList indexes; + for (int i = 0; i < list.count(); i++) { + list[i]->setDrawn(list.at(i)->getLineNumber() < m_currentModel->data().at(commandIndex).line); + indexes.append(i); } + m_codeDrawer->update(indexes); - for (int i = 0; i < m_currentModel->rowCount() - 1; i++) { - // Get stored args - args = m_currentModel->data().at(i).args; - - // Store args if none - if (args.isEmpty()) { - stripped = GcodePreprocessorUtils::removeComment(m_currentModel->data().at(i).command); - args = GcodePreprocessorUtils::splitCommand(stripped); - m_currentModel->data()[i].args = args; - } - - // Add command to parser - gp.addCommand(args); + ui->tblProgram->setUpdatesEnabled(false); - // Update table model - m_currentModel->data()[i].state = GCodeItem::InQueue; + for (int i = 0; i < m_currentModel->data().count() - 1; i++) { + m_currentModel->data()[i].state = i < commandIndex ? GCodeItem::Skipped : GCodeItem::InQueue; m_currentModel->data()[i].response = QString(); - m_currentModel->data()[i].line = gp.getCommandNumber(); - - if (progress.isVisible() && (i % PROGRESSSTEP == 0)) { - progress.setValue(i); - qApp->processEvents(); - if (progress.wasCanceled()) break; - } } - progress.close(); - ui->tblProgram->setUpdatesEnabled(true); + ui->glwVisualizer->setSpendTime(QTime(0, 0, 0)); - parser->reset(); + m_startTime.start(); - updateProgramEstimatedTime(parser->getLinesFromParser(&gp, m_settings->arcPrecision(), m_settings->arcDegreeMode())); - m_currentDrawer->update(); - ui->glwVisualizer->updateExtremes(m_currentDrawer); - updateControlsState(); + m_transferCompleted = false; + m_processingFile = true; + m_fileEndSent = false; + m_storedKeyboardControl = ui->chkKeyboardControl->isChecked(); + ui->chkKeyboardControl->setChecked(false); - if (m_currentModel == &m_programModel) m_fileChanged = true; -} + storeParserState(); -void frmMain::on_cmdCommandSend_clicked() -{ - QString command = ui->cboCommand->currentText(); - if (command.isEmpty()) return; +#ifdef WINDOWS + if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { + if (m_taskBarProgress) { + m_taskBarProgress->setMaximum(m_currentModel->rowCount() - 2); + m_taskBarProgress->setValue(commandIndex); + m_taskBarProgress->show(); + } + } +#endif - ui->cboCommand->storeText(); - ui->cboCommand->setCurrentText(""); - sendCommand(command, -1); -} + updateControlsState(); + ui->cmdFilePause->setFocus(); -void frmMain::on_actFileOpen_triggered() -{ - on_cmdFileOpen_clicked(); + m_fileCommandIndex = commandIndex; + m_fileProcessedCommandIndex = commandIndex; + sendNextFileCommands(); } -void frmMain::on_cmdHome_clicked() +void frmMain::onSlbSpindleValueUserChanged() { - m_homing = true; m_updateSpindleSpeed = true; - sendCommand("$H", -1, m_settings->showUICommands()); } -void frmMain::on_cmdCheck_clicked(bool checked) +void frmMain::onSlbSpindleValueChanged() { - if (checked) { - storeOffsets(); - storeParserState(); - sendCommand("$C", -1, m_settings->showUICommands()); - } else { - m_aborting = true; - grblReset(); - }; + if (!ui->grpSpindle->isChecked() && ui->cmdSpindle->isChecked()) + ui->grpSpindle->setTitle(tr("Spindle") + QString(tr(" (%1)")).arg(ui->slbSpindle->value())); } -void frmMain::on_cmdReset_clicked() +void frmMain::onCboCommandReturnPressed() { - grblReset(); + QString command = ui->cboCommand->currentText(); + if (command.isEmpty()) return; + + ui->cboCommand->setCurrentText(""); + sendCommand(command, -1); } -void frmMain::on_cmdUnlock_clicked() +void frmMain::onDockTopLevelChanged(bool topLevel) { - m_updateSpindleSpeed = true; - sendCommand("$X", -1, m_settings->showUICommands()); + Q_UNUSED(topLevel) + static_cast(sender())->setStyleSheet(""); } -void frmMain::on_cmdSpindle_toggled(bool checked) +void frmMain::onScroolBarAction(int action) { - ui->grpSpindle->setProperty("overrided", checked); - style()->unpolish(ui->grpSpindle); - ui->grpSpindle->ensurePolished(); + Q_UNUSED(action) - if (checked) { - if (!ui->grpSpindle->isChecked()) ui->grpSpindle->setTitle(tr("Spindle") + QString(tr(" (%1)")).arg(ui->slbSpindle->value())); - } else { - ui->grpSpindle->setTitle(tr("Spindle")); - } + if (m_processingFile) ui->chkAutoScroll->setChecked(false); } -void frmMain::on_cmdSpindle_clicked(bool checked) +void frmMain::onScriptException(const QScriptValue &exception) { - if (ui->cmdFilePause->isChecked()) { - m_serialPort.write(QByteArray(1, char(0x9e))); - } else { - sendCommand(checked ? QString("M3 S%1").arg(ui->slbSpindle->value()) : "M5", -1, m_settings->showUICommands()); - } + qDebug() << "Script exception:" << exception.toString(); } -void frmMain::on_cmdFilePause_clicked(bool checked) +void frmMain::updateHeightMapInterpolationDrawer(bool reset) { - m_serialPort.write(checked ? "!" : "~"); -} + if (m_settingsLoading) return; -void frmMain::on_cmdFileReset_clicked() -{ - m_fileCommandIndex = 0; - m_fileProcessedCommandIndex = 0; - m_lastDrawnLineIndex = 0; - m_probeIndex = -1; + QRectF borderRect = borderRectFromTextboxes(); + m_heightMapInterpolationDrawer.setBorderRect(borderRect); - if (!m_heightMapMode) { - QList list = m_viewParser.getLineSegmentList(); + QVector> *interpolationData = new QVector>; - QList indexes; - for (int i = 0; i < list.count(); i++) { - list[i]->setDrawn(false); - indexes.append(i); - } - m_codeDrawer->update(indexes); + int interpolationPointsX = ui->txtHeightMapInterpolationStepX->value();// * (ui->txtHeightMapGridX->value() - 1) + 1; + int interpolationPointsY = ui->txtHeightMapInterpolationStepY->value();// * (ui->txtHeightMapGridY->value() - 1) + 1; - ui->tblProgram->setUpdatesEnabled(false); + double interpolationStepX = interpolationPointsX > 1 ? borderRect.width() / (interpolationPointsX - 1) : 0; + double interpolationStepY = interpolationPointsY > 1 ? borderRect.height() / (interpolationPointsY - 1) : 0; - for (int i = 0; i < m_currentModel->data().count() - 1; i++) { - m_currentModel->data()[i].state = GCodeItem::InQueue; - m_currentModel->data()[i].response = QString(); - } - ui->tblProgram->setUpdatesEnabled(true); + for (int i = 0; i < interpolationPointsY; i++) { + QVector row; + for (int j = 0; j < interpolationPointsX; j++) { - ui->tblProgram->scrollTo(m_currentModel->index(0, 0)); - ui->tblProgram->clearSelection(); - ui->tblProgram->selectRow(0); + double x = interpolationStepX * j + borderRect.x(); + double y = interpolationStepY * i + borderRect.y(); - ui->glwVisualizer->setSpendTime(QTime(0, 0, 0)); - } else { - ui->txtHeightMapGridX->setEnabled(true); - ui->txtHeightMapGridY->setEnabled(true); - ui->txtHeightMapGridZBottom->setEnabled(true); - ui->txtHeightMapGridZTop->setEnabled(true); + row.append(reset ? qQNaN() : Interpolation::bicubicInterpolate(borderRect, &m_heightMapModel, x, y)); + } + interpolationData->append(row); + } + if (m_heightMapInterpolationDrawer.data() != NULL) { delete m_heightMapInterpolationDrawer.data(); - m_heightMapInterpolationDrawer.setData(NULL); - - m_heightMapModel.clear(); - updateHeightMapGrid(); } + m_heightMapInterpolationDrawer.setData(interpolationData); + + // Update grid drawer + m_heightMapGridDrawer.update(); + + // Heightmap changed by table user input + if (sender() == &m_heightMapModel) m_heightMapChanged = true; + + // Reset heightmapped program model + m_programHeightmapModel.clear(); } -void frmMain::on_actFileNew_triggered() +void frmMain::placeVisualizerButtons() { - if (!saveChanges(m_heightMapMode)) return; + ui->cmdIsometric->move(ui->glwVisualizer->width() - ui->cmdIsometric->width() - 8, 8); + ui->cmdTop->move(ui->cmdIsometric->geometry().left() - ui->cmdTop->width() - 8, 8); + ui->cmdLeft->move(ui->glwVisualizer->width() - ui->cmdLeft->width() - 8, ui->cmdIsometric->geometry().bottom() + 8); + ui->cmdFront->move(ui->cmdLeft->geometry().left() - ui->cmdFront->width() - 8, ui->cmdIsometric->geometry().bottom() + 8); + ui->cmdFit->move(ui->glwVisualizer->width() - ui->cmdFit->width() - 8, ui->cmdLeft->geometry().bottom() + 8); +} - if (!m_heightMapMode) { - // Reset tables - clearTable(); - m_probeModel.clear(); - m_programHeightmapModel.clear(); - m_currentModel = &m_programModel; +void frmMain::preloadSettings() +{ + QSettings set(m_settingsFileName, QSettings::IniFormat); + set.setIniCodec("UTF-8"); - // Reset parsers - m_viewParser.reset(); - m_probeParser.reset(); + qApp->setStyleSheet(QString(qApp->styleSheet()).replace(QRegExp("font-size:\\s*\\d+"), "font-size: " + set.value("fontSize", "8").toString())); - // Reset code drawer - m_codeDrawer->update(); - m_currentDrawer = m_codeDrawer; - ui->glwVisualizer->fitDrawable(); - updateProgramEstimatedTime(QList()); + // Update v-sync in glformat + QGLFormat fmt = QGLFormat::defaultFormat(); + fmt.setSwapInterval(set.value("vsync", false).toBool() ? 1 : 0); + QGLFormat::setDefaultFormat(fmt); +} - m_programFileName = ""; - ui->chkHeightMapUse->setChecked(false); - ui->grpHeightMap->setProperty("overrided", false); - style()->unpolish(ui->grpHeightMap); - ui->grpHeightMap->ensurePolished(); +void frmMain::loadSettings() +{ + QSettings set(m_settingsFileName, QSettings::IniFormat); + set.setIniCodec("UTF-8"); - // Reset tableview - QByteArray headerState = ui->tblProgram->horizontalHeader()->saveState(); - ui->tblProgram->setModel(NULL); + m_settingsLoading = true; - // Set table model - ui->tblProgram->setModel(&m_programModel); - ui->tblProgram->horizontalHeader()->restoreState(headerState); + emit settingsAboutToLoad(); - // Update tableview - connect(ui->tblProgram->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(onTableCurrentChanged(QModelIndex,QModelIndex))); - ui->tblProgram->selectRow(0); + m_settings->setFontSize(set.value("fontSize", 8).toInt()); + m_settings->setPort(set.value("port").toString()); + m_settings->setBaud(set.value("baud").toInt()); + m_settings->setIgnoreErrors(set.value("ignoreErrors", false).toBool()); + m_settings->setAutoLine(set.value("autoLine", true).toBool()); + m_settings->setToolDiameter(set.value("toolDiameter", 3).toDouble()); + m_settings->setToolLength(set.value("toolLength", 15).toDouble()); + m_settings->setAntialiasing(set.value("antialiasing", true).toBool()); + m_settings->setMsaa(set.value("msaa", true).toBool()); + m_settings->setVsync(set.value("vsync", false).toBool()); + m_settings->setZBuffer(set.value("zBuffer", false).toBool()); + m_settings->setSimplify(set.value("simplify", false).toBool()); + m_settings->setSimplifyPrecision(set.value("simplifyPrecision", 0).toDouble()); + m_settings->setGrayscaleSegments(set.value("grayscaleSegments", false).toBool()); + m_settings->setGrayscaleSCode(set.value("grayscaleSCode", true).toBool()); + m_settings->setDrawModeVectors(set.value("drawModeVectors", true).toBool()); + m_settings->setLineWidth(set.value("lineWidth", 1).toDouble()); + m_settings->setArcLength(set.value("arcLength", 0).toDouble()); + m_settings->setArcDegree(set.value("arcDegree", 0).toDouble()); + m_settings->setArcDegreeMode(set.value("arcDegreeMode", true).toBool()); + m_settings->setShowProgramCommands(set.value("showProgramCommands", 0).toBool()); + m_settings->setShowUICommands(set.value("showUICommands", 0).toBool()); + m_settings->setSpindleSpeedMin(set.value("spindleSpeedMin", 0).toInt()); + m_settings->setSpindleSpeedMax(set.value("spindleSpeedMax", 100).toInt()); + m_settings->setLaserPowerMin(set.value("laserPowerMin", 0).toInt()); + m_settings->setLaserPowerMax(set.value("laserPowerMax", 100).toInt()); + m_settings->setRapidSpeed(set.value("rapidSpeed", 0).toInt()); + m_settings->setAcceleration(set.value("acceleration", 10).toInt()); + m_settings->setToolAngle(set.value("toolAngle", 0).toDouble()); + m_settings->setToolType(set.value("toolType", 0).toInt()); + m_settings->setFps(set.value("fps", 60).toInt()); + m_settings->setQueryStateTime(set.value("queryStateTime", 250).toInt()); - // Clear selection marker - m_selectionDrawer.setEndPosition(QVector3D(sNan, sNan, sNan)); - m_selectionDrawer.update(); + ui->chkAutoScroll->setChecked(set.value("autoScroll", false).toBool()); - resetHeightmap(); - } else { - m_heightMapModel.clear(); - on_cmdFileReset_clicked(); - ui->txtHeightMap->setText(tr("Untitled")); - m_heightMapFileName.clear(); + ui->slbSpindle->setRatio(100); + ui->slbSpindle->setMinimum(m_settings->spindleSpeedMin()); + ui->slbSpindle->setMaximum(m_settings->spindleSpeedMax()); + ui->slbSpindle->setValue(set.value("spindleSpeed", 100).toInt()); - updateHeightMapBorderDrawer(); - updateHeightMapGrid(); + ui->slbFeedOverride->setChecked(set.value("feedOverride", false).toBool()); + ui->slbFeedOverride->setValue(set.value("feedOverrideValue", 100).toInt()); - m_heightMapChanged = false; - } + ui->slbRapidOverride->setChecked(set.value("rapidOverride", false).toBool()); + ui->slbRapidOverride->setValue(set.value("rapidOverrideValue", 100).toInt()); - updateControlsState(); -} + ui->slbSpindleOverride->setChecked(set.value("spindleOverride", false).toBool()); + ui->slbSpindleOverride->setValue(set.value("spindleOverrideValue", 100).toInt()); -void frmMain::on_cmdClearConsole_clicked() -{ - ui->txtConsole->clear(); -} + m_settings->setUnits(set.value("units", 0).toInt()); -bool frmMain::saveProgramToFile(QString fileName, GCodeTableModel *model) -{ - QFile file(fileName); - QDir dir; + m_recentFiles = set.value("recentFiles", QStringList()).toStringList(); + m_recentHeightmaps = set.value("recentHeightmaps", QStringList()).toStringList(); + m_lastFolder = set.value("lastFolder", QDir::homePath()).toString(); + + this->restoreGeometry(set.value("formGeometry", QByteArray()).toByteArray()); + + ui->cboCommand->setMinimumHeight(ui->cboCommand->height()); + ui->cmdClearConsole->setFixedHeight(ui->cboCommand->height()); + ui->cmdCommandSend->setFixedHeight(ui->cboCommand->height()); + + m_storedKeyboardControl = set.value("keyboardControl", false).toBool(); + + m_settings->setAutoCompletion(set.value("autoCompletion", true).toBool()); + + QStringList steps = set.value("jogSteps").toStringList(); + if (steps.count() > 0) { + steps.insert(0, ui->cboJogStep->items().first()); + ui->cboJogStep->setItems(steps); + } + ui->cboJogStep->setCurrentIndex(ui->cboJogStep->findText(set.value("jogStep").toString())); + ui->cboJogFeed->setItems(set.value("jogFeeds").toStringList()); + ui->cboJogFeed->setCurrentIndex(ui->cboJogFeed->findText(set.value("jogFeed").toString())); + + ui->txtHeightMapBorderX->setValue(set.value("heightmapBorderX", 0).toDouble()); + ui->txtHeightMapBorderY->setValue(set.value("heightmapBorderY", 0).toDouble()); + ui->txtHeightMapBorderWidth->setValue(set.value("heightmapBorderWidth", 1).toDouble()); + ui->txtHeightMapBorderHeight->setValue(set.value("heightmapBorderHeight", 1).toDouble()); + ui->chkHeightMapBorderShow->setChecked(set.value("heightmapBorderShow", false).toBool()); - if (file.exists()) dir.remove(file.fileName()); - if (!file.open(QIODevice::WriteOnly)) return false; + ui->txtHeightMapGridX->setValue(set.value("heightmapGridX", 1).toDouble()); + ui->txtHeightMapGridY->setValue(set.value("heightmapGridY", 1).toDouble()); + ui->txtHeightMapGridZTop->setValue(set.value("heightmapGridZTop", 1).toDouble()); + ui->txtHeightMapGridZBottom->setValue(set.value("heightmapGridZBottom", -1).toDouble()); + ui->txtHeightMapProbeFeed->setValue(set.value("heightmapProbeFeed", 10).toDouble()); + ui->chkHeightMapGridShow->setChecked(set.value("heightmapGridShow", false).toBool()); - QTextStream textStream(&file); + ui->txtHeightMapInterpolationStepX->setValue(set.value("heightmapInterpolationStepX", 1).toDouble()); + ui->txtHeightMapInterpolationStepY->setValue(set.value("heightmapInterpolationStepY", 1).toDouble()); + ui->cboHeightMapInterpolationType->setCurrentIndex(set.value("heightmapInterpolationType", 0).toInt()); + ui->chkHeightMapInterpolationShow->setChecked(set.value("heightmapInterpolationShow", false).toBool()); - for (int i = 0; i < model->rowCount() - 1; i++) { - textStream << model->data(model->index(i, 1)).toString() << "\r\n"; + foreach (ColorPicker* pick, m_settings->colors()) { + pick->setColor(QColor(set.value(pick->objectName().mid(3), "black").toString())); } - file.close(); + updateRecentFilesMenu(); - return true; -} + ui->tblProgram->horizontalHeader()->restoreState(set.value("header", QByteArray()).toByteArray()); -void frmMain::on_actFileSaveTransformedAs_triggered() -{ - QString fileName = (QFileDialog::getSaveFileName(this, tr("Save file as"), m_lastFolder, tr("G-Code files (*.nc *.ncc *.ngc *.tap *.txt)"))); + // Apply settings + applySettings(); - if (!fileName.isEmpty()) { - saveProgramToFile(fileName, &m_programHeightmapModel); - } -} + // Restore last commands list + ui->cboCommand->addItems(set.value("recentCommands", QStringList()).toStringList()); + ui->cboCommand->setCurrentIndex(-1); -void frmMain::on_actFileSaveAs_triggered() -{ - if (!m_heightMapMode) { - QString fileName = (QFileDialog::getSaveFileName(this, tr("Save file as"), m_lastFolder, tr("G-Code files (*.nc *.ncc *.ngc *.tap *.txt)"))); + // Load plugins + loadPlugins(); + emit pluginsLoaded(); - if (!fileName.isEmpty()) if (saveProgramToFile(fileName, &m_programModel)) { - m_programFileName = fileName; - m_fileChanged = false; + // Adjust docks width + int w = qMax(ui->dockDevice->widget()->sizeHint().width(), + ui->dockModification->widget()->sizeHint().width()); + ui->dockDevice->setMinimumWidth(w); + ui->dockDevice->setMaximumWidth(w + ui->scrollArea->verticalScrollBar()->width()); + ui->dockModification->setMinimumWidth(w); + ui->dockModification->setMaximumWidth(w + ui->scrollArea->verticalScrollBar()->width()); + ui->dockUser->setMinimumWidth(w); + ui->dockUser->setMaximumWidth(w + ui->scrollArea->verticalScrollBar()->width()); - addRecentFile(fileName); - updateRecentFilesMenu(); + // Buttons + int b = (w - ui->grpControl->layout()->margin() * 2 - ui->grpControl->layout()->spacing() * 3) / 4 * 0.8; + int c = b * 0.8; + setStyleSheet(styleSheet() + QString("\nStyledToolButton[adjustSize='true'] {\n\ + min-width: %1px;\n\ + min-height: %1px;\n\ + qproperty-iconSize: %2px;\n\ + }").arg(b).arg(c)); + ensurePolished(); - updateControlsState(); - } - } else { - QString fileName = (QFileDialog::getSaveFileName(this, tr("Save file as"), m_lastFolder, tr("Heightmap files (*.map)"))); + foreach (QDockWidget *w, findChildren()) w->setStyleSheet(""); - if (!fileName.isEmpty()) if (saveHeightMap(fileName)) { - ui->txtHeightMap->setText(fileName.mid(fileName.lastIndexOf("/") + 1)); - m_heightMapFileName = fileName; - m_heightMapChanged = false; + // Restore docks + // Signals/slots + foreach (QDockWidget *w, findChildren()) + connect(w, &QDockWidget::topLevelChanged, this, &frmMain::onDockTopLevelChanged); - addRecentHeightmap(fileName); - updateRecentFilesMenu(); + // Panels + ui->scrollContentsDevice->restoreState(this, set.value("panelsDevice").toStringList()); + ui->scrollContentsModification->restoreState(this, set.value("panelsModification").toStringList()); + ui->scrollContentsUser->restoreState(this, set.value("panelsUser").toStringList()); - updateControlsState(); - } - } -} + QStringList hiddenPanels = set.value("hiddenPanels").toStringList(); + foreach (QString s, hiddenPanels) { + QGroupBox *b = findChild(s); + if (b) b->setHidden(true); + } -void frmMain::on_actFileSave_triggered() -{ - if (!m_heightMapMode) { - // G-code saving - if (m_programFileName.isEmpty()) on_actFileSaveAs_triggered(); else { - saveProgramToFile(m_programFileName, &m_programModel); - m_fileChanged = false; - } - } else { - // Height map saving - if (m_heightMapFileName.isEmpty()) on_actFileSaveAs_triggered(); else saveHeightMap(m_heightMapFileName); + QStringList collapsedPanels = set.value("collapsedPanels").toStringList(); + foreach (QString s, collapsedPanels) { + QGroupBox *b = findChild(s); + if (b) b->setChecked(false); } -} - -void frmMain::on_cmdTop_clicked() -{ - ui->glwVisualizer->setTopView(); -} -void frmMain::on_cmdFront_clicked() -{ - ui->glwVisualizer->setFrontView(); -} - -void frmMain::on_cmdLeft_clicked() -{ - ui->glwVisualizer->setLeftView(); -} + // Normal window state + restoreState(set.value("formMainState").toByteArray()); -void frmMain::on_cmdIsometric_clicked() -{ - ui->glwVisualizer->setIsometricView(); -} + // Maximized window state + show(); + qApp->processEvents(); + restoreState(set.value("formMainState").toByteArray()); -void frmMain::on_actAbout_triggered() -{ - m_frmAbout.exec(); -} + // Setup coords textboxes + setupCoordsTextboxes(); -bool frmMain::dataIsEnd(QString data) { - QStringList ends; + // Settings form geometry + // m_settings->restoreGeometry(set.value("formSettingsGeometry").toByteArray()); + m_settings->ui->splitMain->restoreState(set.value("settingsSplitMain").toByteArray()); - ends << "ok"; - ends << "error"; + emit settingsLoaded(); - foreach (QString str, ends) { - if (data.contains(str)) return true; + // Shortcuts + qRegisterMetaTypeStreamOperators("ShortcutsMap"); + + ShortcutsMap m; + QByteArray ba = set.value("shortcuts").toByteArray(); + QDataStream s(&ba, QIODevice::ReadOnly); + + s >> m; + for (int i = 0; i < m.count(); i++) { + QAction *a = findChild(m.keys().at(i)); + if (a) a->setShortcuts(m.values().at(i)); } - return false; -} + // Menu + ui->actViewLockWindows->setChecked(set.value("lockWindows").toBool()); + ui->actViewLockPanels->setChecked(set.value("lockPanels").toBool()); -bool frmMain::dataIsFloating(QString data) { - QStringList ends; + m_settings->restoreGeometry(set.value("formSettingsGeometry", m_settings->saveGeometry()).toByteArray()); - ends << "Reset to continue"; - ends << "'$H'|'$X' to unlock"; - ends << "ALARM: Soft limit"; - ends << "ALARM: Hard limit"; - ends << "Check Door"; - foreach (QString str, ends) { - if (data.contains(str)) return true; + // Loading stored script variables + QScriptValue g = m_scriptEngine.globalObject(); + set.beginGroup("script"); + QStringList l = set.childKeys(); + foreach (const QString &k, l) { + g.setProperty(k, m_scriptEngine.newVariant(set.value(k))); } + set.endGroup(); - return false; -} - -bool frmMain::dataIsReset(QString data) { - return QRegExp("^GRBL|GCARVIN\\s\\d\\.\\d.").indexIn(data.toUpper()) != -1; + m_settingsLoading = false; } -void frmMain::on_grpOverriding_toggled(bool checked) +void frmMain::saveSettings() { - if (checked) { - ui->grpOverriding->setTitle(tr("Overriding")); - } else if (ui->slbFeedOverride->isChecked() | ui->slbRapidOverride->isChecked() | ui->slbSpindleOverride->isChecked()) { - ui->grpOverriding->setTitle(tr("Overriding") + QString(tr(" (%1/%2/%3)")) - .arg(ui->slbFeedOverride->isChecked() ? QString::number(ui->slbFeedOverride->value()) : "-") - .arg(ui->slbRapidOverride->isChecked() ? QString::number(ui->slbRapidOverride->value()) : "-") - .arg(ui->slbSpindleOverride->isChecked() ? QString::number(ui->slbSpindleOverride->value()) : "-")); - } - updateLayouts(); + QSettings set(m_settingsFileName, QSettings::IniFormat); + set.setIniCodec("UTF-8"); - ui->widgetFeed->setVisible(checked); -} + emit settingsAboutToSave(); -void frmMain::on_grpSpindle_toggled(bool checked) -{ - if (checked) { - ui->grpSpindle->setTitle(tr("Spindle")); - } else if (ui->cmdSpindle->isChecked()) { -// ui->grpSpindle->setTitle(tr("Spindle") + QString(tr(" (%1)")).arg(ui->txtSpindleSpeed->text())); - ui->grpSpindle->setTitle(tr("Spindle") + QString(tr(" (%1)")).arg(ui->slbSpindle->value())); - } - updateLayouts(); + set.setValue("port", m_settings->port()); + set.setValue("baud", m_settings->baud()); + set.setValue("ignoreErrors", m_settings->ignoreErrors()); + set.setValue("autoLine", m_settings->autoLine()); + set.setValue("toolDiameter", m_settings->toolDiameter()); + set.setValue("toolLength", m_settings->toolLength()); + set.setValue("antialiasing", m_settings->antialiasing()); + set.setValue("msaa", m_settings->msaa()); + set.setValue("vsync", m_settings->vsync()); + set.setValue("zBuffer", m_settings->zBuffer()); + set.setValue("simplify", m_settings->simplify()); + set.setValue("simplifyPrecision", m_settings->simplifyPrecision()); + set.setValue("grayscaleSegments", m_settings->grayscaleSegments()); + set.setValue("grayscaleSCode", m_settings->grayscaleSCode()); + set.setValue("drawModeVectors", m_settings->drawModeVectors()); - ui->widgetSpindle->setVisible(checked); -} + set.setValue("spindleSpeed", ui->slbSpindle->value()); + set.setValue("lineWidth", m_settings->lineWidth()); + set.setValue("arcLength", m_settings->arcLength()); + set.setValue("arcDegree", m_settings->arcDegree()); + set.setValue("arcDegreeMode", m_settings->arcDegreeMode()); + set.setValue("showProgramCommands", m_settings->showProgramCommands()); + set.setValue("showUICommands", m_settings->showUICommands()); + set.setValue("spindleSpeedMin", m_settings->spindleSpeedMin()); + set.setValue("spindleSpeedMax", m_settings->spindleSpeedMax()); + set.setValue("laserPowerMin", m_settings->laserPowerMin()); + set.setValue("laserPowerMax", m_settings->laserPowerMax()); + set.setValue("rapidSpeed", m_settings->rapidSpeed()); + set.setValue("acceleration", m_settings->acceleration()); + set.setValue("toolAngle", m_settings->toolAngle()); + set.setValue("toolType", m_settings->toolType()); + set.setValue("fps", m_settings->fps()); + set.setValue("queryStateTime", m_settings->queryStateTime()); + set.setValue("autoScroll", ui->chkAutoScroll->isChecked()); + set.setValue("header", ui->tblProgram->horizontalHeader()->saveState()); + set.setValue("settingsSplitMain", m_settings->ui->splitMain->saveState()); + set.setValue("formGeometry", this->saveGeometry()); + set.setValue("formSettingsGeometry", m_settings->saveGeometry()); -void frmMain::on_grpUserCommands_toggled(bool checked) -{ - ui->widgetUserCommands->setVisible(checked); -} + set.setValue("autoCompletion", m_settings->autoCompletion()); + set.setValue("units", m_settings->units()); + set.setValue("recentFiles", m_recentFiles); + set.setValue("recentHeightmaps", m_recentHeightmaps); + set.setValue("lastFolder", m_lastFolder); + set.setValue("fontSize", m_settings->fontSize()); + + set.setValue("feedOverride", ui->slbFeedOverride->isChecked()); + set.setValue("feedOverrideValue", ui->slbFeedOverride->value()); + set.setValue("rapidOverride", ui->slbRapidOverride->isChecked()); + set.setValue("rapidOverrideValue", ui->slbRapidOverride->value()); + set.setValue("spindleOverride", ui->slbSpindleOverride->isChecked()); + set.setValue("spindleOverrideValue", ui->slbSpindleOverride->value()); -bool frmMain::eventFilter(QObject *obj, QEvent *event) -{ - if (obj->inherits("QWidgetWindow")) { + set.setValue("jogSteps", (QStringList)ui->cboJogStep->items().mid(1, ui->cboJogStep->items().count() - 1)); + set.setValue("jogStep", ui->cboJogStep->currentText()); + set.setValue("jogFeeds", ui->cboJogFeed->items()); + set.setValue("jogFeed", ui->cboJogFeed->currentText()); - QKeySequence ks; + set.setValue("heightmapBorderX", ui->txtHeightMapBorderX->value()); + set.setValue("heightmapBorderY", ui->txtHeightMapBorderY->value()); + set.setValue("heightmapBorderWidth", ui->txtHeightMapBorderWidth->value()); + set.setValue("heightmapBorderHeight", ui->txtHeightMapBorderHeight->value()); + set.setValue("heightmapBorderShow", ui->chkHeightMapBorderShow->isChecked()); - if ((event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease)) { - QKeyEvent *ev = static_cast(event); - ks = QKeySequence(ev->key() | ev->modifiers()); - } + set.setValue("heightmapGridX", ui->txtHeightMapGridX->value()); + set.setValue("heightmapGridY", ui->txtHeightMapGridY->value()); + set.setValue("heightmapGridZTop", ui->txtHeightMapGridZTop->value()); + set.setValue("heightmapGridZBottom", ui->txtHeightMapGridZBottom->value()); + set.setValue("heightmapProbeFeed", ui->txtHeightMapProbeFeed->value()); + set.setValue("heightmapGridShow", ui->chkHeightMapGridShow->isChecked()); - // Jog on keyboard control - if (!m_processingFile && ui->chkKeyboardControl->isChecked() && - (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) - && !static_cast(event)->isAutoRepeat()) { + set.setValue("heightmapInterpolationStepX", ui->txtHeightMapInterpolationStepX->value()); + set.setValue("heightmapInterpolationStepY", ui->txtHeightMapInterpolationStepY->value()); + set.setValue("heightmapInterpolationType", ui->cboHeightMapInterpolationType->currentIndex()); + set.setValue("heightmapInterpolationShow", ui->chkHeightMapInterpolationShow->isChecked()); - if (ui->actJogXMinus->shortcuts().contains(ks)) { - if (event->type() == QEvent::KeyPress) emit ui->cmdXMinus->pressed(); else emit ui->cmdXMinus->released(); - } else if (ui->actJogXPlus->shortcuts().contains(ks)) { - if (event->type() == QEvent::KeyPress) emit ui->cmdXPlus->pressed(); else emit ui->cmdXPlus->released(); - } else if (ui->actJogYPlus->shortcuts().contains(ks)) { - if (event->type() == QEvent::KeyPress) emit ui->cmdYPlus->pressed(); else emit ui->cmdYPlus->released(); - } else if (ui->actJogYMinus->shortcuts().contains(ks)) { - if (event->type() == QEvent::KeyPress) emit ui->cmdYMinus->pressed(); else emit ui->cmdYMinus->released(); - } else if (ui->actJogZPlus->shortcuts().contains(ks)) { - if (event->type() == QEvent::KeyPress) emit ui->cmdZPlus->pressed(); else emit ui->cmdZPlus->released(); - } else if (ui->actJogZMinus->shortcuts().contains(ks)) { - if (event->type() == QEvent::KeyPress) emit ui->cmdZMinus->pressed(); else emit ui->cmdZMinus->released(); - } - } - } else if (obj == ui->tblProgram && m_processingFile) { - QKeyEvent *keyEvent = static_cast(event); - if (keyEvent->key() == Qt::Key_PageDown || keyEvent->key() == Qt::Key_PageUp - || keyEvent->key() == Qt::Key_Down || keyEvent->key() == Qt::Key_Up) { - ui->chkAutoScroll->setChecked(false); - } + foreach (ColorPicker* pick, m_settings->colors()) { + set.setValue(pick->objectName().mid(3), pick->color().name()); } - if (obj == this && event->type() == QEvent::WindowStateChange) { - ui->glwVisualizer->setUpdatesEnabled(!isMinimized() && ui->dockVisualizer->isVisible()); - } + QStringList list; - if (!ui->actViewLockPanels->isChecked() && obj->inherits("QGroupBox") - && (obj->parent()->objectName() == "scrollContentsDevice" - || obj->parent()->objectName() == "scrollContentsModification" - || obj->parent()->objectName() == "scrollContentsUser") - && obj->objectName().startsWith("grp")) { + for (int i = 0; i < ui->cboCommand->count(); i++) list.append(ui->cboCommand->itemText(i)); + set.setValue("recentCommands", list); - if (event->type() == QEvent::MouseButtonPress) { - - QMouseEvent *e = static_cast(event); - m_mousePressPos = e->pos(); - qDebug() << m_mousePressPos; + // Docks + set.setValue("formMainState", saveState()); - } else if (event->type() == QEvent::MouseMove) { + // Shortcuts + ShortcutsMap m; + QByteArray ba; + QDataStream s(&ba, QIODevice::WriteOnly); + QList acts = findChildren(QRegExp("act.*")); - QMouseEvent *e = static_cast(event); - int d = (e->pos() - m_mousePressPos).manhattanLength(); + foreach (QAction *a, acts) m[a->objectName()] = a->shortcuts(); + s << m; + set.setValue("shortcuts", ba); - if (e->buttons() & Qt::LeftButton && d > QApplication::startDragDistance()) { - QDrag *drag = new QDrag(this); - WidgetMimeData *mimeData = new WidgetMimeData(); + // Panels + set.setValue("panelsDevice", QVariant::fromValue(ui->scrollContentsDevice->saveState())); + set.setValue("panelsModification", QVariant::fromValue(ui->scrollContentsModification->saveState())); + set.setValue("panelsUser", QVariant::fromValue(ui->scrollContentsUser->saveState())); - mimeData->setWidget(static_cast(obj)); + QStringList panels; + QStringList hiddenPanels; + QStringList collapsedPanels; + if (ui->scrollContentsDevice->isVisible()) panels << ui->scrollContentsDevice->saveState(); + if (ui->scrollContentsModification->isVisible()) panels << ui->scrollContentsModification->saveState(); + if (ui->scrollContentsUser->isVisible()) panels << ui->scrollContentsUser->saveState(); + foreach (QString s, panels) { + QGroupBox *b = findChild(s); + if (b && b->isHidden()) hiddenPanels << s; + if (b && b->isCheckable() && !b->isChecked()) collapsedPanels << s; + } + set.setValue("hiddenPanels", hiddenPanels); + set.setValue("collapsedPanels", collapsedPanels); - QPixmap *pix = new QPixmap(static_cast(obj)->size()); - static_cast(obj)->render(pix); - - drag->setMimeData(mimeData); - drag->setPixmap(*pix); - drag->exec(); + // Menu + set.setValue("lockWindows", ui->actViewLockWindows->isChecked()); + set.setValue("lockPanels", ui->actViewLockPanels->isChecked()); + + // Save script variables + QScriptEngine e; + QScriptValue d = e.globalObject(); + QScriptValueIterator i(d); + QStringList l; + while (i.hasNext()) { + i.next(); + l << i.name(); + } + + QScriptValue v = m_scriptEngine.globalObject(); + QScriptValueIterator it(v); + while (it.hasNext()) { + it.next(); + if (!l.contains(it.name())) { + if (it.value().isNumber() || it.value().isString()) { + set.setValue("script/" + it.name(), it.value().toVariant()); } } } - return false; -} - -bool frmMain::keyIsMovement(int key) -{ - return key == Qt::Key_4 || key == Qt::Key_6 || key == Qt::Key_8 || key == Qt::Key_2 || key == Qt::Key_9 || key == Qt::Key_3; + emit settingsSaved(); } +void frmMain::applySettings() { + m_originDrawer->setLineWidth(m_settings->lineWidth()); + m_toolDrawer.setToolDiameter(m_settings->toolDiameter()); + m_toolDrawer.setToolLength(m_settings->toolLength()); + m_toolDrawer.setLineWidth(m_settings->lineWidth()); + m_codeDrawer->setLineWidth(m_settings->lineWidth()); + m_heightMapBorderDrawer.setLineWidth(m_settings->lineWidth()); + m_heightMapGridDrawer.setLineWidth(0.1); + m_heightMapInterpolationDrawer.setLineWidth(m_settings->lineWidth()); + ui->glwVisualizer->setLineWidth(m_settings->lineWidth()); + m_timerStateQuery.setInterval(m_settings->queryStateTime()); -void frmMain::on_grpJog_toggled(bool checked) -{ - updateJogTitle(); - updateLayouts(); - - ui->widgetJog->setVisible(checked); -} - -void frmMain::on_chkKeyboardControl_toggled(bool checked) -{ - ui->grpJog->setProperty("overrided", checked); - style()->unpolish(ui->grpJog); - ui->grpJog->ensurePolished(); + m_toolDrawer.setToolAngle(m_settings->toolType() == 0 ? 180 : m_settings->toolAngle()); + m_toolDrawer.setColor(m_settings->colors("Tool")); + m_toolDrawer.update(); - // Store/restore coordinate system - if (checked) { - sendCommand("$G", -2, m_settings->showUICommands()); - } else { - if (m_absoluteCoordinates) sendCommand("G90", -1, m_settings->showUICommands()); - } + ui->glwVisualizer->setAntialiasing(m_settings->antialiasing()); + ui->glwVisualizer->setMsaa(m_settings->msaa()); + ui->glwVisualizer->setZBuffer(m_settings->zBuffer()); + ui->glwVisualizer->setVsync(m_settings->vsync()); + ui->glwVisualizer->setFps(m_settings->fps()); + ui->glwVisualizer->setColorBackground(m_settings->colors("VisualizerBackground")); + ui->glwVisualizer->setColorText(m_settings->colors("VisualizerText")); - if (!m_processingFile) m_storedKeyboardControl = checked; + ui->slbSpindle->setMinimum(m_settings->spindleSpeedMin()); + ui->slbSpindle->setMaximum(m_settings->spindleSpeedMax()); - updateJogTitle(); - updateControlsState(); -} + ui->cboCommand->setAutoCompletion(m_settings->autoCompletion()); -void frmMain::updateJogTitle() -{ - if (ui->grpJog->isChecked() || !ui->chkKeyboardControl->isChecked()) { - ui->grpJog->setTitle(tr("Jog")); - } else if (ui->chkKeyboardControl->isChecked()) { - ui->grpJog->setTitle(tr("Jog") + QString(tr(" (%1/%2)")) - .arg(ui->cboJogStep->currentText().toDouble() > 0 ? ui->cboJogStep->currentText() : tr("C")) - .arg(ui->cboJogFeed->currentText())); - } -} + m_codeDrawer->setSimplify(m_settings->simplify()); + m_codeDrawer->setSimplifyPrecision(m_settings->simplifyPrecision()); + m_codeDrawer->setColorNormal(m_settings->colors("ToolpathNormal")); + m_codeDrawer->setColorDrawn(m_settings->colors("ToolpathDrawn")); + m_codeDrawer->setColorHighlight(m_settings->colors("ToolpathHighlight")); + m_codeDrawer->setColorZMovement(m_settings->colors("ToolpathZMovement")); + m_codeDrawer->setColorStart(m_settings->colors("ToolpathStart")); + m_codeDrawer->setColorEnd(m_settings->colors("ToolpathEnd")); + m_codeDrawer->setIgnoreZ(m_settings->grayscaleSegments() || !m_settings->drawModeVectors()); + m_codeDrawer->setGrayscaleSegments(m_settings->grayscaleSegments()); + m_codeDrawer->setGrayscaleCode(m_settings->grayscaleSCode() ? GcodeDrawer::S : GcodeDrawer::Z); + m_codeDrawer->setDrawMode(m_settings->drawModeVectors() ? GcodeDrawer::Vectors : GcodeDrawer::Raster); + m_codeDrawer->setGrayscaleMin(m_settings->laserPowerMin()); + m_codeDrawer->setGrayscaleMax(m_settings->laserPowerMax()); + m_codeDrawer->update(); -void frmMain::on_tblProgram_customContextMenuRequested(const QPoint &pos) -{ - if (m_processingFile) return; + m_selectionDrawer.setColor(m_settings->colors("ToolpathHighlight")); - if (ui->tblProgram->selectionModel()->selectedRows().count() > 0) { - m_tableMenu->actions().at(0)->setEnabled(true); - m_tableMenu->actions().at(1)->setEnabled(ui->tblProgram->selectionModel()->selectedRows()[0].row() != m_currentModel->rowCount() - 1); - } else { - m_tableMenu->actions().at(0)->setEnabled(false); - m_tableMenu->actions().at(1)->setEnabled(false); - } - m_tableMenu->popup(ui->tblProgram->viewport()->mapToGlobal(pos)); -} + // Adapt visualizer buttons colors + const int LIGHTBOUND = 127; + const int NORMALSHIFT = 40; + const int HIGHLIGHTSHIFT = 80; -void frmMain::updateLayouts() -{ - this->update(); - qApp->processEvents(QEventLoop::ExcludeUserInputEvents); -} + QColor base = m_settings->colors("VisualizerBackground"); + bool light = base.value() > LIGHTBOUND; + QColor normal, highlight; -void frmMain::addRecentFile(QString fileName) -{ - m_recentFiles.removeAll(fileName); - m_recentFiles.append(fileName); - if (m_recentFiles.count() > 5) m_recentFiles.takeFirst(); -} + normal.setHsv(base.hue(), base.saturation(), base.value() + (light ? -NORMALSHIFT : NORMALSHIFT)); + highlight.setHsv(base.hue(), base.saturation(), base.value() + (light ? -HIGHLIGHTSHIFT : HIGHLIGHTSHIFT)); -void frmMain::addRecentHeightmap(QString fileName) -{ - m_recentHeightmaps.removeAll(fileName); - m_recentHeightmaps.append(fileName); - if (m_recentHeightmaps.count() > 5) m_recentHeightmaps.takeFirst(); -} + ui->glwVisualizer->setStyleSheet(QString("QToolButton {border: 1px solid %1; \ + background-color: %3} QToolButton:hover {border: 1px solid %2;}") + .arg(normal.name()).arg(highlight.name()) + .arg(base.name())); -void frmMain::onActRecentFileTriggered() -{ - QAction *action = static_cast(sender()); - QString fileName = action->text(); + ui->cmdFit->setIcon(QIcon(":/images/fit_1.png")); + ui->cmdIsometric->setIcon(QIcon(":/images/cube.png")); + ui->cmdFront->setIcon(QIcon(":/images/cubeFront.png")); + ui->cmdLeft->setIcon(QIcon(":/images/cubeLeft.png")); + ui->cmdTop->setIcon(QIcon(":/images/cubeTop.png")); - if (action != NULL) { - if (!saveChanges(m_heightMapMode)) return; - if (!m_heightMapMode) loadFile(fileName); else loadHeightMap(fileName); + if (!light) { + Util::invertButtonIconColors(ui->cmdFit); + Util::invertButtonIconColors(ui->cmdIsometric); + Util::invertButtonIconColors(ui->cmdFront); + Util::invertButtonIconColors(ui->cmdLeft); + Util::invertButtonIconColors(ui->cmdTop); } + + int h = ui->cmdFileOpen->sizeHint().height(); + QSize s(h, h); + ui->cboCommand->setMinimumHeight(h); + ui->cmdClearConsole->setFixedSize(s); + ui->cmdCommandSend->setFixedSize(s); } -void frmMain::onCboCommandReturnPressed() +void frmMain::loadPlugins() { - QString command = ui->cboCommand->currentText(); - if (command.isEmpty()) return; + QString pluginsDir = qApp->applicationDirPath() + "/plugins/"; - ui->cboCommand->setCurrentText(""); - sendCommand(command, -1); -} + // Get plugins list + QStringList pl = QDir(pluginsDir).entryList(QDir::Dirs | QDir::NoDotAndDotDot); -void frmMain::updateRecentFilesMenu() -{ - foreach (QAction * action, ui->mnuRecent->actions()) { - if (action->text() == "") break; else { - ui->mnuRecent->removeAction(action); - delete action; - } - } + qDebug() << "Loading plugins:" << pl; - foreach (QString file, !m_heightMapMode ? m_recentFiles : m_recentHeightmaps) { - QAction *action = new QAction(file, this); - connect(action, SIGNAL(triggered()), this, SLOT(onActRecentFileTriggered())); - ui->mnuRecent->insertAction(ui->mnuRecent->actions()[0], action); - } + foreach (QString p, pl) { + // Config + QSettings set(pluginsDir + p + "/config.ini", QSettings::IniFormat); + QString title = set.value("title").toString(); + QString name = set.value("name").toString(); + qDebug() << "Loading plugin:" << p << title << name; - updateControlsState(); -} + // Translation + // TODO: Use locale from settings + QString loc = QLocale().name().left(2); + QString translationFileName = pluginsDir + p + "/translation_" + loc + ".qm"; + if(QFile::exists(translationFileName)) { + QTranslator *translator = new QTranslator(); + if (translator->load(translationFileName)) qApp->installTranslator(translator); + else delete translator; + } -void frmMain::on_actRecentClear_triggered() -{ - if (!m_heightMapMode) m_recentFiles.clear(); else m_recentHeightmaps.clear(); - updateRecentFilesMenu(); -} + // Script + QFile f; + f.setFileName(pluginsDir + p + "/script.js"); + if (f.open(QFile::ReadOnly)) { + QScriptEngine *se = new QScriptEngine(); + + QScriptValue sv = se->newObject(); + sv.setProperty("importExtension", se->newFunction(frmMain::importExtension)); + se->globalObject().setProperty("script", sv); + connect(se, &QScriptEngine::signalHandlerException, this, &frmMain::onScriptException); -double frmMain::toMetric(double value) -{ - return m_settings->units() == 0 ? value : value * 25.4; -} + // Delegate objects + // Main form + QScriptValue app = se->newQObject(&m_scriptFunctions); + se->globalObject().setProperty("app", app); -void frmMain::on_grpHeightMap_toggled(bool arg1) -{ - ui->widgetHeightMap->setVisible(arg1); -} + // // Settings + // QScriptValue settings = se->newQObject(m_settings); + // se->globalObject().setProperty("mainSettings", settings); -QRectF frmMain::borderRectFromTextboxes() -{ - QRectF rect; + // Stored vars + QScriptValue vars = se->newQObject(&m_storedVars); + se->globalObject().setProperty("vars", vars); - rect.setX(ui->txtHeightMapBorderX->value()); - rect.setY(ui->txtHeightMapBorderY->value()); - rect.setWidth(ui->txtHeightMapBorderWidth->value()); - rect.setHeight(ui->txtHeightMapBorderHeight->value()); + // Translator + se->installTranslatorFunctions(); - return rect; -} + // Run script + QString script = f.readAll(); -QRectF frmMain::borderRectFromExtremes() -{ - QRectF rect; + qDebug() << "Starting plugin:" << p; + sv = se->evaluate(script); + if (sv.isError()) { + qDebug() << sv.toString(); + qDebug() << se->uncaughtExceptionBacktrace(); + } - rect.setX(m_codeDrawer->getMinimumExtremes().x()); - rect.setY(m_codeDrawer->getMinimumExtremes().y()); - rect.setWidth(m_codeDrawer->getSizes().x()); - rect.setHeight(m_codeDrawer->getSizes().y()); + // Init + sv = se->evaluate("init()"); + if (sv.isError()) { + qDebug() << sv.toString(); + qDebug() << se->uncaughtExceptionBacktrace(); + } - return rect; -} + // Panel widget + sv = se->evaluate("createPanelWidget()"); + if (sv.isError()) { + qDebug() << sv.toString(); + qDebug() << se->uncaughtExceptionBacktrace(); + } else { + QWidget *w = qobject_cast(sv.toQObject()); + if (w) { + // Create panel + GroupBox *box = new GroupBox(this); + QVBoxLayout *layout1 = new QVBoxLayout(box); + QWidget *bw = new QWidget(box); + QVBoxLayout *layout2 = new QVBoxLayout(bw); + box->setObjectName("grp" + name); + box->setTitle(tr(title.toLatin1())); + box->setLayout(layout1); + box->setCheckable(true); + box->setProperty("overrided", false); + layout1->addWidget(bw); + bw->setLayout(layout2); + layout2->addWidget(w); + layout2->setMargin(0); + connect(box, &QGroupBox::toggled, bw, &QWidget::setVisible); -void frmMain::updateHeightMapBorderDrawer() -{ - if (m_settingsLoading) return; + // Add panel to user window + static_cast(ui->scrollContentsUser->layout())->insertWidget(0, box); + } + } - m_heightMapBorderDrawer.setBorderRect(borderRectFromTextboxes()); -} + // Window widget + sv = se->evaluate("createWindowWidget()"); + if (sv.isError()) { + qDebug() << sv.toString(); + qDebug() << se->uncaughtExceptionBacktrace(); + } else { + QWidget *w = qobject_cast(sv.toQObject()); + if (w) { + // Create dock widget + QDockWidget *dock = new QDockWidget(this); + QWidget *contents = new QWidget(dock); + QFrame *frame = new QFrame(contents); + QVBoxLayout *layout1 = new QVBoxLayout(contents); + QVBoxLayout *layout2 = new QVBoxLayout(frame); + dock->setObjectName("dock" + name); + dock->setWindowTitle(tr(title.toLatin1())); + dock->setWidget(contents); + contents->setLayout(layout1); + layout1->addWidget(frame); + QMargins m = layout1->contentsMargins(); + m.setLeft(0); + m.setRight(0); + layout1->setContentsMargins(m); + frame->setLayout(layout2); + layout2->addWidget(w); + layout2->setMargin(0); -void frmMain::updateHeightMapGrid(double arg1) -{ - if (sender()->property("previousValue").toDouble() != arg1 && !updateHeightMapGrid()) - static_cast(sender())->setValue(sender()->property("previousValue").toDouble()); - else sender()->setProperty("previousValue", arg1); -} + // Add to main form + this->addDockWidget(Qt::RightDockWidgetArea, dock); + } + } -bool frmMain::updateHeightMapGrid() -{ - if (m_settingsLoading) return true; + // Settings widget + sv = se->evaluate("createSettingsWidget()"); + if (sv.isError()) { + qDebug() << sv.toString(); + qDebug() << se->uncaughtExceptionBacktrace(); + } else { + QWidget *w = qobject_cast(sv.toQObject()); + if (w) { + // Create groupbox + GroupBox *box = new GroupBox(m_settings); + QVBoxLayout *layout1 = new QVBoxLayout(box); + box->setObjectName("grpSettings" + name); + box->setTitle(tr(title.toLatin1())); + box->setLayout(layout1); + layout1->addWidget(w); - // Grid map changing warning - bool nan = true; - for (int i = 0; i < m_heightMapModel.rowCount(); i++) - for (int j = 0; j < m_heightMapModel.columnCount(); j++) - if (!qIsNaN(m_heightMapModel.data(m_heightMapModel.index(i, j), Qt::UserRole).toDouble())) { - nan = false; - break; + // Add to settings form + m_settings->addCustomSettings(box); + } } - if (!nan && QMessageBox::warning(this, this->windowTitle(), tr("Changing grid settings will reset probe data. Continue?"), - QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) return false; - // Update grid drawer - QRectF borderRect = borderRectFromTextboxes(); - m_heightMapGridDrawer.setBorderRect(borderRect); - m_heightMapGridDrawer.setGridSize(QPointF(ui->txtHeightMapGridX->value(), ui->txtHeightMapGridY->value())); - m_heightMapGridDrawer.setZBottom(ui->txtHeightMapGridZBottom->value()); - m_heightMapGridDrawer.setZTop(ui->txtHeightMapGridZTop->value()); + f.close(); + } + } +} - // Reset model - int gridPointsX = ui->txtHeightMapGridX->value(); - int gridPointsY = ui->txtHeightMapGridY->value(); +void frmMain::openPort() +{ + if (m_serialPort.open(QIODevice::ReadWrite)) { + ui->txtStatus->setText(tr("Port opened")); + ui->txtStatus->setStyleSheet(QString("background-color: palette(button); color: palette(text);")); + grblReset(); + } +} - m_heightMapModel.resize(gridPointsX, gridPointsY); - ui->tblHeightMap->setModel(NULL); - ui->tblHeightMap->setModel(&m_heightMapModel); - resizeTableHeightMapSections(); +void frmMain::grblReset() +{ + m_serialPort.write(QByteArray(1, (char)24)); - // Update interpolation - updateHeightMapInterpolationDrawer(true); + m_processingFile = false; + m_transferCompleted = true; + m_fileCommandIndex = 0; - // Generate probe program - double gridStepX = gridPointsX > 1 ? borderRect.width() / (gridPointsX - 1) : 0; - double gridStepY = gridPointsY > 1 ? borderRect.height() / (gridPointsY - 1) : 0; + m_reseting = true; + m_homing = false; + m_resetCompleted = false; + m_updateSpindleSpeed = true; + m_lastGrblStatus = -1; + m_statusReceived = true; - m_programLoading = true; - m_probeModel.clear(); - m_probeModel.insertRow(0); + // Drop all remaining commands in buffer + m_commands.clear(); + m_queue.clear(); - m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G21G90F%1G0Z%2"). - arg(ui->txtHeightMapProbeFeed->value()).arg(ui->txtHeightMapGridZTop->value())); - m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G0X0Y0")); - m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G38.2Z%1") - .arg(ui->txtHeightMapGridZBottom->value())); - m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G0Z%1") - .arg(ui->txtHeightMapGridZTop->value())); + // Prepare reset response catch + CommandAttributes ca; + ca.command = "[CTRL+X]"; + if (m_settings->showUICommands()) ui->txtConsole->appendPlainText(ca.command); + ca.consoleIndex = m_settings->showUICommands() ? ui->txtConsole->blockCount() - 1 : -1; + ca.tableIndex = -1; + ca.length = ca.command.length() + 1; + m_commands.append(ca); - double x, y; + updateControlsState(); +} - for (int i = 0; i < gridPointsY; i++) { - y = borderRect.top() + gridStepY * i; - for (int j = 0; j < gridPointsX; j++) { - x = borderRect.left() + gridStepX * (i % 2 ? gridPointsX - 1 - j : j); - m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G0X%1Y%2") - .arg(x, 0, 'f', 3).arg(y, 0, 'f', 3)); - m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G38.2Z%1") - .arg(ui->txtHeightMapGridZBottom->value())); - m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G0Z%1") - .arg(ui->txtHeightMapGridZTop->value())); - } - } +int frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, bool queue) +{ + // tableIndex: + // 0...n - commands from g-code program + // -1 - ui commands + // -2 - utility commands + // -3 - utility commands - m_programLoading = false; + if (!m_serialPort.isOpen() || !m_resetCompleted) return 0; - if (m_currentDrawer == m_probeDrawer) updateParser(); + // Commands queue + if (queue || (bufferLength() + command.length() + 1) > BUFFERLENGTH) { + CommandQueue cq; - m_heightMapChanged = true; - return true; -} + cq.command = command; + cq.tableIndex = tableIndex; + cq.showInConsole = showInConsole; + cq.queue = queue; + + m_queue.append(cq); + return 0; + } -void frmMain::updateHeightMapInterpolationDrawer(bool reset) -{ - if (m_settingsLoading) return; + // Evaluate scripts in command + if (tableIndex < 0) command = evaluateCommand(command); - QRectF borderRect = borderRectFromTextboxes(); - m_heightMapInterpolationDrawer.setBorderRect(borderRect); + if (command.isEmpty()) return 1; - QVector> *interpolationData = new QVector>; + command = command.toUpper(); - int interpolationPointsX = ui->txtHeightMapInterpolationStepX->value();// * (ui->txtHeightMapGridX->value() - 1) + 1; - int interpolationPointsY = ui->txtHeightMapInterpolationStepY->value();// * (ui->txtHeightMapGridY->value() - 1) + 1; + CommandAttributes ca; + if (showInConsole) { + ui->txtConsole->appendPlainText(command); + ca.consoleIndex = ui->txtConsole->blockCount() - 1; + } else { + ca.consoleIndex = -1; + } - double interpolationStepX = interpolationPointsX > 1 ? borderRect.width() / (interpolationPointsX - 1) : 0; - double interpolationStepY = interpolationPointsY > 1 ? borderRect.height() / (interpolationPointsY - 1) : 0; + ca.command = command; + ca.length = command.length() + 1; + ca.tableIndex = tableIndex; - for (int i = 0; i < interpolationPointsY; i++) { - QVector row; - for (int j = 0; j < interpolationPointsX; j++) { + m_commands.append(ca); - double x = interpolationStepX * j + borderRect.x(); - double y = interpolationStepY * i + borderRect.y(); + QString uncomment = GcodePreprocessorUtils::removeComment(command); - row.append(reset ? qQNaN() : Interpolation::bicubicInterpolate(borderRect, &m_heightMapModel, x, y)); + // Processing spindle speed only from g-code program + QRegExp s("[Ss]0*(\\d+)"); + if (s.indexIn(uncomment) != -1 && ca.tableIndex > -2) { + int speed = s.cap(1).toInt(); + if (ui->slbSpindle->value() != speed) { + ui->slbSpindle->setValue(speed); } - interpolationData->append(row); } - if (m_heightMapInterpolationDrawer.data() != NULL) { - delete m_heightMapInterpolationDrawer.data(); + // Set M2 & M30 commands sent flag + static QRegExp M230("M0*2|M30"); + if (uncomment.contains(M230)) { + m_fileEndSent = true; } - m_heightMapInterpolationDrawer.setData(interpolationData); - // Update grid drawer - m_heightMapGridDrawer.update(); + // Queue offsets request on G92 command + // TODO: Queue offsets for G54-59 commands + if (ca.tableIndex == -1 && uncomment.contains("G92")) { + sendCommand("$#", -3, showInConsole, true); + } - // Heightmap changed by table user input - if (sender() == &m_heightMapModel) m_heightMapChanged = true; + m_serialPort.write((command + "\r").toLatin1()); - // Reset heightmapped program model - m_programHeightmapModel.clear(); + return 0; } -void frmMain::on_chkHeightMapBorderShow_toggled(bool checked) +void frmMain::sendCommands(QString commands, int tableIndex) { - Q_UNUSED(checked) + QStringList list = commands.split("\n"); - updateControlsState(); + bool q = false; + foreach (QString cmd, list) { + if (!cmd.isEmpty()) if (sendCommand(cmd.trimmed(), tableIndex, m_settings->showUICommands(), q) == 0) q = true; + } } -void frmMain::on_txtHeightMapBorderX_valueChanged(double arg1) -{ - updateHeightMapBorderDrawer(); - updateHeightMapGrid(arg1); -} +void frmMain::sendNextFileCommands() { + if (m_queue.length() > 0) return; -void frmMain::on_txtHeightMapBorderWidth_valueChanged(double arg1) -{ - updateHeightMapBorderDrawer(); - updateHeightMapGrid(arg1); -} + QString command = m_currentModel->data(m_currentModel->index(m_fileCommandIndex, 1)).toString(); + static QRegExp M230("M0*2|M30"); -void frmMain::on_txtHeightMapBorderY_valueChanged(double arg1) -{ - updateHeightMapBorderDrawer(); - updateHeightMapGrid(arg1); + while ((bufferLength() + command.length() + 1) <= BUFFERLENGTH + && m_fileCommandIndex < m_currentModel->rowCount() - 1 + && !(!m_commands.isEmpty() + && GcodePreprocessorUtils::removeComment(m_commands.last().command).contains(M230))) { + m_currentModel->setData(m_currentModel->index(m_fileCommandIndex, 2), GCodeItem::Sent); + sendCommand(command, m_fileCommandIndex, m_settings->showProgramCommands()); + m_fileCommandIndex++; + command = m_currentModel->data(m_currentModel->index(m_fileCommandIndex, 1)).toString(); + } } -void frmMain::on_txtHeightMapBorderHeight_valueChanged(double arg1) +QString frmMain::evaluateCommand(QString command) { - updateHeightMapBorderDrawer(); - updateHeightMapGrid(arg1); + // Evaluate script + static QRegExp sx("\\{([^\\}]+)\\}"); + QScriptValue v; + QString vs; + while (sx.indexIn(command) != -1) { + v = m_scriptEngine.evaluate(sx.cap(1)); + vs = v.isUndefined() ? "" : v.isNumber() ? QString::number(v.toNumber(), 'f', 4) : v.toString(); + command.replace(sx.cap(0), vs); + } + return command; } -void frmMain::on_chkHeightMapGridShow_toggled(bool checked) +void frmMain::updateParser() { - Q_UNUSED(checked) - - updateControlsState(); -} + GcodeViewParse *parser = m_currentDrawer->viewParser(); -void frmMain::on_txtHeightMapGridX_valueChanged(double arg1) -{ - updateHeightMapGrid(arg1); -} + GcodeParser gp; + gp.setTraverseSpeed(m_settings->rapidSpeed()); + if (m_codeDrawer->getIgnoreZ()) gp.reset(QVector3D(qQNaN(), qQNaN(), 0)); -void frmMain::on_txtHeightMapGridY_valueChanged(double arg1) -{ - updateHeightMapGrid(arg1); -} + ui->tblProgram->setUpdatesEnabled(false); -void frmMain::on_txtHeightMapGridZBottom_valueChanged(double arg1) -{ - updateHeightMapGrid(arg1); -} + QString stripped; + QList args; -void frmMain::on_txtHeightMapGridZTop_valueChanged(double arg1) -{ - updateHeightMapGrid(arg1); -} + QProgressDialog progress(tr("Updating..."), tr("Abort"), 0, m_currentModel->rowCount() - 2, this); + progress.setWindowModality(Qt::WindowModal); + progress.setFixedSize(progress.sizeHint()); -void frmMain::on_cmdHeightMapMode_toggled(bool checked) -{ - // Update flag - m_heightMapMode = checked; + if (m_currentModel->rowCount() > PROGRESSMINLINES) { + progress.show(); + progress.setStyleSheet("QProgressBar {text-align: center; qproperty-format: \"\"}"); + } - // Reset file progress - m_fileCommandIndex = 0; - m_fileProcessedCommandIndex = 0; - m_lastDrawnLineIndex = 0; + for (int i = 0; i < m_currentModel->rowCount() - 1; i++) { + // Get stored args + args = m_currentModel->data().at(i).args; - // Reset/restore g-code program modification on edit mode enter/exit - if (ui->chkHeightMapUse->isChecked()) { - on_chkHeightMapUse_clicked(!checked); // Update gcode program parser - } + // Store args if none + if (args.isEmpty()) { + stripped = GcodePreprocessorUtils::removeComment(m_currentModel->data().at(i).command); + args = GcodePreprocessorUtils::splitCommand(stripped); + m_currentModel->data()[i].args = args; + } - if (checked) { - ui->tblProgram->setModel(&m_probeModel); - resizeTableHeightMapSections(); - m_currentModel = &m_probeModel; - m_currentDrawer = m_probeDrawer; - updateParser(); // Update probe program parser - } else { - m_probeParser.reset(); - if (!ui->chkHeightMapUse->isChecked()) { - ui->tblProgram->setModel(&m_programModel); - connect(ui->tblProgram->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(onTableCurrentChanged(QModelIndex,QModelIndex))); - ui->tblProgram->selectRow(0); + // Add command to parser + gp.addCommand(args); - resizeTableHeightMapSections(); - m_currentModel = &m_programModel; - m_currentDrawer = m_codeDrawer; + // Update table model + m_currentModel->data()[i].state = GCodeItem::InQueue; + m_currentModel->data()[i].response = QString(); + m_currentModel->data()[i].line = gp.getCommandNumber(); - if (!ui->chkHeightMapUse->isChecked()) { - ui->glwVisualizer->updateExtremes(m_codeDrawer); - updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); - } + if (progress.isVisible() && (i % PROGRESSSTEP == 0)) { + progress.setValue(i); + qApp->processEvents(); + if (progress.wasCanceled()) break; } } + progress.close(); - // Shadow toolpath - QList list = m_viewParser.getLineSegmentList(); - QList indexes; - for (int i = m_lastDrawnLineIndex; i < list.count(); i++) { - list[i]->setDrawn(checked); - list[i]->setIsHightlight(false); - indexes.append(i); - } - // Update only vertex color. - // If chkHeightMapUse was checked codeDrawer updated via updateParser - if (!ui->chkHeightMapUse->isChecked()) m_codeDrawer->update(indexes); + ui->tblProgram->setUpdatesEnabled(true); - updateRecentFilesMenu(); + parser->reset(); + + updateProgramEstimatedTime(parser->getLinesFromParser(&gp, m_settings->arcPrecision(), m_settings->arcDegreeMode())); + m_currentDrawer->update(); + ui->glwVisualizer->updateExtremes(m_currentDrawer); updateControlsState(); -} -bool frmMain::saveHeightMap(QString fileName) -{ - QFile file(fileName); - QDir dir; + if (m_currentModel == &m_programModel) m_fileChanged = true; +} - if (file.exists()) dir.remove(file.fileName()); - if (!file.open(QIODevice::WriteOnly)) return false; +void frmMain::storeParserState() +{ + m_storedParserStatus = ui->glwVisualizer->parserStatus().remove( + QRegExp("GC:|\\[|\\]|G[01234]\\s|M[0345]+\\s|\\sF[\\d\\.]+|\\sS[\\d\\.]+")); +} - QTextStream textStream(&file); - textStream << ui->txtHeightMapBorderX->text() << ";" - << ui->txtHeightMapBorderY->text() << ";" - << ui->txtHeightMapBorderWidth->text() << ";" - << ui->txtHeightMapBorderHeight->text() << "\r\n"; - textStream << ui->txtHeightMapGridX->text() << ";" - << ui->txtHeightMapGridY->text() << ";" - << ui->txtHeightMapGridZBottom->text() << ";" - << ui->txtHeightMapGridZTop->text() << "\r\n"; - textStream << ui->cboHeightMapInterpolationType->currentIndex() << ";" - << ui->txtHeightMapInterpolationStepX->text() << ";" - << ui->txtHeightMapInterpolationStepY->text() << "\r\n"; +void frmMain::restoreParserState() +{ + if (!m_storedParserStatus.isEmpty()) sendCommand(m_storedParserStatus, -1, m_settings->showUICommands()); +} - for (int i = 0; i < m_heightMapModel.rowCount(); i++) { - for (int j = 0; j < m_heightMapModel.columnCount(); j++) { - textStream << m_heightMapModel.data(m_heightMapModel.index(i, j), Qt::UserRole).toString() << ((j == m_heightMapModel.columnCount() - 1) ? "" : ";"); - } - textStream << "\r\n"; - } +void frmMain::restoreOffsets() +{ + // Still have pre-reset working position + sendCommand(QString("%4G53G90X%1Y%2Z%3").arg(ui->txtMPosX->value()) + .arg(ui->txtMPosY->value()) + .arg(ui->txtMPosZ->value()) + .arg(m_settings->units() ? "G20" : "G21"), + -2, m_settings->showUICommands()); - file.close(); + sendCommand(QString("%4G92X%1Y%2Z%3").arg(ui->txtWPosX->value()) + .arg(ui->txtWPosY->value()) + .arg(ui->txtWPosZ->value()) + .arg(m_settings->units() ? "G20" : "G21"), + -2, m_settings->showUICommands()); +} - m_heightMapChanged = false; +void frmMain::storeOffsetsVars(QString response) +{ + static QRegExp gx("\\[(G5[4-9]|G28|G30|G92|PRB):([\\d\\.\\-]+),([\\d\\.\\-]+),([\\d\\.\\-]+)"); + static QRegExp tx("\\[(TLO):([\\d\\.\\-]+)"); - return true; + int p = 0; + while ((p = gx.indexIn(response, p)) != -1) { + m_storedVars.setCoords(gx.cap(1), QVector3D( + gx.cap(2).toDouble(), + gx.cap(3).toDouble(), + gx.cap(4).toDouble() + )); + + p += gx.matchedLength(); + } + + if (tx.indexIn(response) != -1) { + m_storedVars.setCoords(tx.cap(1), QVector3D( + 0, + 0, + tx.cap(2).toDouble() + )); + } } -void frmMain::loadHeightMap(QString fileName) +void frmMain::loadFile(QString fileName) { QFile file(fileName); @@ -3422,901 +3387,864 @@ void frmMain::loadHeightMap(QString fileName) QMessageBox::critical(this, this->windowTitle(), tr("Can't open file:\n") + fileName); return; } + + // Set filename + m_programFileName = fileName; + + // Prepare text stream QTextStream textStream(&file); - m_settingsLoading = true; + // Read lines + QList data; + while (!textStream.atEnd()) data.append(textStream.readLine()); - // Storing previous values - ui->txtHeightMapBorderX->setValue(qQNaN()); - ui->txtHeightMapBorderY->setValue(qQNaN()); - ui->txtHeightMapBorderWidth->setValue(qQNaN()); - ui->txtHeightMapBorderHeight->setValue(qQNaN()); + // Load lines + loadFile(data); +} - ui->txtHeightMapGridX->setValue(qQNaN()); - ui->txtHeightMapGridY->setValue(qQNaN()); - ui->txtHeightMapGridZBottom->setValue(qQNaN()); - ui->txtHeightMapGridZTop->setValue(qQNaN()); +void frmMain::loadFile(QList data) +{ + // Reset tables + clearTable(); + m_probeModel.clear(); + m_programHeightmapModel.clear(); + m_currentModel = &m_programModel; - QList list = textStream.readLine().split(";"); - ui->txtHeightMapBorderX->setValue(list[0].toDouble()); - ui->txtHeightMapBorderY->setValue(list[1].toDouble()); - ui->txtHeightMapBorderWidth->setValue(list[2].toDouble()); - ui->txtHeightMapBorderHeight->setValue(list[3].toDouble()); + // Reset parsers + m_viewParser.reset(); + m_probeParser.reset(); - list = textStream.readLine().split(";"); - ui->txtHeightMapGridX->setValue(list[0].toDouble()); - ui->txtHeightMapGridY->setValue(list[1].toDouble()); - ui->txtHeightMapGridZBottom->setValue(list[2].toDouble()); - ui->txtHeightMapGridZTop->setValue(list[3].toDouble()); + // Reset code drawer + m_currentDrawer = m_codeDrawer; + m_codeDrawer->update(); + ui->glwVisualizer->fitDrawable(m_codeDrawer); + updateProgramEstimatedTime(QList()); - m_settingsLoading = false; + // Update interface + ui->chkHeightMapUse->setChecked(false); + ui->grpHeightMap->setProperty("overrided", false); + style()->unpolish(ui->grpHeightMap); + ui->grpHeightMap->ensurePolished(); - updateHeightMapBorderDrawer(); + // Reset tableview + QByteArray headerState = ui->tblProgram->horizontalHeader()->saveState(); + ui->tblProgram->setModel(NULL); - m_heightMapModel.clear(); // To avoid probe data wipe message - updateHeightMapGrid(); + // Prepare parser + GcodeParser gp; + gp.setTraverseSpeed(m_settings->rapidSpeed()); + if (m_codeDrawer->getIgnoreZ()) gp.reset(QVector3D(qQNaN(), qQNaN(), 0)); - list = textStream.readLine().split(";"); + // Block parser updates on table changes + m_programLoading = true; - for (int i = 0; i < m_heightMapModel.rowCount(); i++) { - QList row = textStream.readLine().split(";"); - for (int j = 0; j < m_heightMapModel.columnCount(); j++) { - m_heightMapModel.setData(m_heightMapModel.index(i, j), row[j].toDouble(), Qt::UserRole); - } + QString command; + QString stripped; + QString trimmed; + QList args; + GCodeItem item; + + // Prepare model + m_programModel.data().clear(); + m_programModel.data().reserve(data.count()); + + QProgressDialog progress(tr("Opening file..."), tr("Abort"), 0, data.count(), this); + progress.setWindowModality(Qt::WindowModal); + progress.setFixedSize(progress.sizeHint()); + if (data.count() > PROGRESSMINLINES) { + progress.show(); + progress.setStyleSheet("QProgressBar {text-align: center; qproperty-format: \"\"}"); } - file.close(); + while (!data.isEmpty()) + { + command = data.takeFirst(); - ui->txtHeightMap->setText(fileName.mid(fileName.lastIndexOf("/") + 1)); - m_heightMapFileName = fileName; - m_heightMapChanged = false; + // Trim command + trimmed = command.trimmed(); - ui->cboHeightMapInterpolationType->setCurrentIndex(list[0].toInt()); - ui->txtHeightMapInterpolationStepX->setValue(list[1].toDouble()); - ui->txtHeightMapInterpolationStepY->setValue(list[2].toDouble()); + if (!trimmed.isEmpty()) { + // Split command + stripped = GcodePreprocessorUtils::removeComment(command); + args = GcodePreprocessorUtils::splitCommand(stripped); - updateHeightMapInterpolationDrawer(); -} + gp.addCommand(args); -void frmMain::on_chkHeightMapInterpolationShow_toggled(bool checked) -{ - Q_UNUSED(checked) + item.command = trimmed; + item.state = GCodeItem::InQueue; + item.line = gp.getCommandNumber(); + item.args = args; - updateControlsState(); -} + m_programModel.data().append(item); + } -void frmMain::on_cmdHeightMapLoad_clicked() -{ - if (!saveChanges(true)) { - return; + if (progress.isVisible() && (data.count() % PROGRESSSTEP == 0)) { + progress.setValue(progress.maximum() - data.count()); + qApp->processEvents(); + if (progress.wasCanceled()) break; + } } + progress.close(); - QString fileName = QFileDialog::getOpenFileName(this, tr("Open"), m_lastFolder, tr("Heightmap files (*.map)")); + m_programModel.insertRow(m_programModel.rowCount()); - if (fileName != "") { - addRecentHeightmap(fileName); - loadHeightMap(fileName); + updateProgramEstimatedTime(m_viewParser.getLinesFromParser(&gp, m_settings->arcPrecision(), m_settings->arcDegreeMode())); - // If using heightmap - if (ui->chkHeightMapUse->isChecked() && !m_heightMapMode) { - // Restore original file - on_chkHeightMapUse_clicked(false); - // Apply heightmap - on_chkHeightMapUse_clicked(true); - } + m_programLoading = false; - updateRecentFilesMenu(); - updateControlsState(); // Enable 'cmdHeightMapMode' button - } -} + // Set table model + ui->tblProgram->setModel(&m_programModel); + ui->tblProgram->horizontalHeader()->restoreState(headerState); -void frmMain::on_txtHeightMapInterpolationStepX_valueChanged(double arg1) -{ - Q_UNUSED(arg1) + // Update tableview + connect(ui->tblProgram->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(onTableCurrentChanged(QModelIndex,QModelIndex))); + ui->tblProgram->selectRow(0); - updateHeightMapInterpolationDrawer(); + // Update code drawer + m_codeDrawer->update(); + ui->glwVisualizer->fitDrawable(m_codeDrawer); + + resetHeightmap(); + updateControlsState(); } -void frmMain::on_txtHeightMapInterpolationStepY_valueChanged(double arg1) +bool frmMain::saveChanges(bool heightMapMode) { - Q_UNUSED(arg1) + if ((!heightMapMode && m_fileChanged)) { + int res = QMessageBox::warning(this, this->windowTitle(), tr("G-code program file was changed. Save?"), + QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); + if (res == QMessageBox::Cancel) return false; + else if (res == QMessageBox::Yes) on_actFileSave_triggered(); + m_fileChanged = false; + } - updateHeightMapInterpolationDrawer(); -} + if (m_heightMapChanged) { + int res = QMessageBox::warning(this, this->windowTitle(), tr("Heightmap file was changed. Save?"), + QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel); + if (res == QMessageBox::Cancel) return false; + else if (res == QMessageBox::Yes) { + m_heightMapMode = true; + on_actFileSave_triggered(); + m_heightMapMode = heightMapMode; + updateRecentFilesMenu(); // Restore g-code files recent menu + } -void frmMain::on_chkHeightMapUse_clicked(bool checked) -{ -// static bool fileChanged; + m_fileChanged = false; + } - // Reset table view - QByteArray headerState = ui->tblProgram->horizontalHeader()->saveState(); - ui->tblProgram->setModel(NULL); + return true; +} - CancelException cancel; +bool frmMain::saveProgramToFile(QString fileName, GCodeTableModel *model) +{ + QFile file(fileName); + QDir dir; - if (checked) try { + if (file.exists()) dir.remove(file.fileName()); + if (!file.open(QIODevice::WriteOnly)) return false; - // Prepare progress dialog - QProgressDialog progress(tr("Applying heightmap..."), tr("Abort"), 0, 0, this); - progress.setWindowModality(Qt::WindowModal); - progress.setFixedHeight(progress.sizeHint().height()); - progress.show(); - progress.setStyleSheet("QProgressBar {text-align: center; qproperty-format: \"\"}"); + QTextStream textStream(&file); - // Set current model to prevent reseting heightmap cache - m_currentModel = &m_programHeightmapModel; + for (int i = 0; i < model->rowCount() - 1; i++) { + textStream << model->data(model->index(i, 1)).toString() << "\r\n"; + } - // Update heightmap-modificated program if not cached - if (m_programHeightmapModel.rowCount() == 0) { + file.close(); - // Modifying linesegments - QList *list = m_viewParser.getLines(); - QRectF borderRect = borderRectFromTextboxes(); - double x, y, z; - QVector3D point; + return true; +} - progress.setLabelText(tr("Subdividing segments...")); - progress.setMaximum(list->count() - 1); +void frmMain::loadHeightMap(QString fileName) +{ + QFile file(fileName); - for (int i = 0; i < list->count(); i++) { - if (!list->at(i)->isZMovement()) { - QList subSegments = subdivideSegment(list->at(i)); + if (!file.open(QIODevice::ReadOnly)) { + QMessageBox::critical(this, this->windowTitle(), tr("Can't open file:\n") + fileName); + return; + } + QTextStream textStream(&file); - if (subSegments.count() > 0) { - delete list->at(i); - list->removeAt(i); - foreach (LineSegment* subSegment, subSegments) list->insert(i++, subSegment); - i--; - } - } + m_settingsLoading = true; - if (progress.isVisible() && (i % PROGRESSSTEP == 0)) { - progress.setMaximum(list->count() - 1); - progress.setValue(i); - qApp->processEvents(); - if (progress.wasCanceled()) throw cancel; - } - } + // Storing previous values + ui->txtHeightMapBorderX->setValue(qQNaN()); + ui->txtHeightMapBorderY->setValue(qQNaN()); + ui->txtHeightMapBorderWidth->setValue(qQNaN()); + ui->txtHeightMapBorderHeight->setValue(qQNaN()); - progress.setLabelText(tr("Updating Z-coordinates...")); - progress.setMaximum(list->count() - 1); + ui->txtHeightMapGridX->setValue(qQNaN()); + ui->txtHeightMapGridY->setValue(qQNaN()); + ui->txtHeightMapGridZBottom->setValue(qQNaN()); + ui->txtHeightMapGridZTop->setValue(qQNaN()); - for (int i = 0; i < list->count(); i++) { - if (i == 0) { - x = list->at(i)->getStart().x(); - y = list->at(i)->getStart().y(); - z = list->at(i)->getStart().z() + Interpolation::bicubicInterpolate(borderRect, &m_heightMapModel, x, y); - list->at(i)->setStart(QVector3D(x, y, z)); - } else list->at(i)->setStart(list->at(i - 1)->getEnd()); + QList list = textStream.readLine().split(";"); + ui->txtHeightMapBorderX->setValue(list[0].toDouble()); + ui->txtHeightMapBorderY->setValue(list[1].toDouble()); + ui->txtHeightMapBorderWidth->setValue(list[2].toDouble()); + ui->txtHeightMapBorderHeight->setValue(list[3].toDouble()); - x = list->at(i)->getEnd().x(); - y = list->at(i)->getEnd().y(); - z = list->at(i)->getEnd().z() + Interpolation::bicubicInterpolate(borderRect, &m_heightMapModel, x, y); - list->at(i)->setEnd(QVector3D(x, y, z)); + list = textStream.readLine().split(";"); + ui->txtHeightMapGridX->setValue(list[0].toDouble()); + ui->txtHeightMapGridY->setValue(list[1].toDouble()); + ui->txtHeightMapGridZBottom->setValue(list[2].toDouble()); + ui->txtHeightMapGridZTop->setValue(list[3].toDouble()); - if (progress.isVisible() && (i % PROGRESSSTEP == 0)) { - progress.setValue(i); - qApp->processEvents(); - if (progress.wasCanceled()) throw cancel; - } - } + m_settingsLoading = false; - progress.setLabelText(tr("Modifying G-code program...")); - progress.setMaximum(m_programModel.rowCount() - 2); + updateHeightMapBorderDrawer(); - // Modifying g-code program - QString command; - QStringList args; - int line; - QString newCommand; - GCodeItem item; - int lastSegmentIndex = 0; - int lastCommandIndex = -1; + m_heightMapModel.clear(); // To avoid probe data wipe message + updateHeightMapGrid(); - // Search strings - QString coords("XxYyZzIiJjKkRr"); - QString g("Gg"); - QString m("Mm"); + list = textStream.readLine().split(";"); - char codeChar; // Single code char G1 -> G - float codeNum; // Code number G1 -> 1 + for (int i = 0; i < m_heightMapModel.rowCount(); i++) { + QList row = textStream.readLine().split(";"); + for (int j = 0; j < m_heightMapModel.columnCount(); j++) { + m_heightMapModel.setData(m_heightMapModel.index(i, j), row[j].toDouble(), Qt::UserRole); + } + } - QString lastCode; - bool isLinearMove; - bool hasCommand; + file.close(); - m_programLoading = true; - for (int i = 0; i < m_programModel.rowCount() - 1; i++) { - command = m_programModel.data().at(i).command; - line = m_programModel.data().at(i).line; - isLinearMove = false; - hasCommand = false; + ui->txtHeightMap->setText(fileName.mid(fileName.lastIndexOf("/") + 1)); + m_heightMapFileName = fileName; + m_heightMapChanged = false; - if (line < 0 || line == lastCommandIndex || lastSegmentIndex == list->count() - 1) { - item.command = command; - m_programHeightmapModel.data().append(item); - } else { - // Get commands args - args = m_programModel.data().at(i).args; - newCommand.clear(); + ui->cboHeightMapInterpolationType->setCurrentIndex(list[0].toInt()); + ui->txtHeightMapInterpolationStepX->setValue(list[1].toDouble()); + ui->txtHeightMapInterpolationStepY->setValue(list[2].toDouble()); - // Parse command args - foreach (QString arg, args) { // arg examples: G1, G2, M3, X100... - codeChar = arg.at(0).toLatin1(); // codeChar: G, M, X... - if (!coords.contains(codeChar)) { // Not parameter - codeNum = arg.mid(1).toDouble(); - if (g.contains(codeChar)) { // 'G'-command - // Store 'G0' & 'G1' - if (codeNum == 0.0f || codeNum == 1.0f) { - lastCode = arg; - isLinearMove = true; // Store linear move - } + updateHeightMapInterpolationDrawer(); +} - // Replace 'G2' & 'G3' with 'G1' - if (codeNum == 2.0f || codeNum == 3.0f) { - newCommand.append("G1"); - isLinearMove = true; - // Drop plane command for arcs - } else if (codeNum != 17.0f && codeNum != 18.0f && codeNum != 19.0f) { - newCommand.append(arg); - } +bool frmMain::saveHeightMap(QString fileName) +{ + QFile file(fileName); + QDir dir; - hasCommand = true; // Command has 'G' - } else { - if (m.contains(codeChar)) - hasCommand = true; // Command has 'M' - newCommand.append(arg); // Other commands - } - } - } + if (file.exists()) dir.remove(file.fileName()); + if (!file.open(QIODevice::WriteOnly)) return false; - // Find first linesegment by command index - for (int j = lastSegmentIndex; j < list->count(); j++) { - if (list->at(j)->getLineNumber() == line) { - if (!qIsNaN(list->at(j)->getEnd().length()) && (isLinearMove || (!hasCommand && !lastCode.isEmpty()))) { - // Create new commands for each linesegment with given command index - while ((j < list->count()) && (list->at(j)->getLineNumber() == line)) { + QTextStream textStream(&file); + textStream << ui->txtHeightMapBorderX->text() << ";" + << ui->txtHeightMapBorderY->text() << ";" + << ui->txtHeightMapBorderWidth->text() << ";" + << ui->txtHeightMapBorderHeight->text() << "\r\n"; + textStream << ui->txtHeightMapGridX->text() << ";" + << ui->txtHeightMapGridY->text() << ";" + << ui->txtHeightMapGridZBottom->text() << ";" + << ui->txtHeightMapGridZTop->text() << "\r\n"; + textStream << ui->cboHeightMapInterpolationType->currentIndex() << ";" + << ui->txtHeightMapInterpolationStepX->text() << ";" + << ui->txtHeightMapInterpolationStepY->text() << "\r\n"; - point = list->at(j)->getEnd(); - if (!list->at(j)->isAbsolute()) point -= list->at(j)->getStart(); - if (!list->at(j)->isMetric()) point /= 25.4f; + for (int i = 0; i < m_heightMapModel.rowCount(); i++) { + for (int j = 0; j < m_heightMapModel.columnCount(); j++) { + textStream << m_heightMapModel.data(m_heightMapModel.index(i, j), Qt::UserRole).toString() << ((j == m_heightMapModel.columnCount() - 1) ? "" : ";"); + } + textStream << "\r\n"; + } - item.command = newCommand + QString("X%1Y%2Z%3") - .arg(point.x(), 0, 'f', 3).arg(point.y(), 0, 'f', 3).arg(point.z(), 0, 'f', 3); - m_programHeightmapModel.data().append(item); + file.close(); - if (!newCommand.isEmpty()) newCommand.clear(); - j++; - } - // Copy original command if not G0 or G1 - } else { - item.command = command; - m_programHeightmapModel.data().append(item); - } + m_heightMapChanged = false; - lastSegmentIndex = j; - break; - } - } - } - lastCommandIndex = line; + return true; +} - if (progress.isVisible() && (i % PROGRESSSTEP == 0)) { - progress.setValue(i); - qApp->processEvents(); - if (progress.wasCanceled()) throw cancel; - } - } - m_programHeightmapModel.insertRow(m_programHeightmapModel.rowCount()); - } - progress.close(); +void frmMain::clearTable() +{ + m_programModel.clear(); + m_programModel.insertRow(0); +} - ui->tblProgram->setModel(&m_programHeightmapModel); - ui->tblProgram->horizontalHeader()->restoreState(headerState); +void frmMain::resetHeightmap() +{ + delete m_heightMapInterpolationDrawer.data(); + m_heightMapInterpolationDrawer.setData(NULL); - connect(ui->tblProgram->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(onTableCurrentChanged(QModelIndex,QModelIndex))); + ui->tblHeightMap->setModel(NULL); + m_heightMapModel.resize(1, 1); - m_programLoading = false; + ui->txtHeightMap->clear(); + m_heightMapFileName.clear(); + m_heightMapChanged = false; +} - // Update parser - m_currentDrawer = m_codeDrawer; - updateParser(); +void frmMain::setupCoordsTextboxes() +{ + int prec = m_settings->units() == 0 ? 3 : 4; + int bound = m_settings->units() == 0 ? 9999 : 999; - // Select first row - ui->tblProgram->selectRow(0); - } - catch (CancelException) { // Cancel modification - m_programHeightmapModel.clear(); - m_currentModel = &m_programModel; + ui->txtMPosX->setDecimals(prec); + ui->txtMPosX->setMinimum(-bound); + ui->txtMPosX->setMaximum(bound); + ui->txtMPosY->setDecimals(prec); + ui->txtMPosY->setMinimum(-bound); + ui->txtMPosY->setMaximum(bound); + ui->txtMPosZ->setDecimals(prec); + ui->txtMPosZ->setMinimum(-bound); + ui->txtMPosZ->setMaximum(bound); - ui->tblProgram->setModel(&m_programModel); - ui->tblProgram->horizontalHeader()->restoreState(headerState); + ui->txtWPosX->setDecimals(prec); + ui->txtWPosX->setMinimum(-bound); + ui->txtWPosX->setMaximum(bound); + ui->txtWPosY->setDecimals(prec); + ui->txtWPosY->setMinimum(-bound); + ui->txtWPosY->setMaximum(bound); + ui->txtWPosZ->setDecimals(prec); + ui->txtWPosZ->setMinimum(-bound); + ui->txtWPosZ->setMaximum(bound); +} - connect(ui->tblProgram->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(onTableCurrentChanged(QModelIndex,QModelIndex))); - ui->tblProgram->selectRow(0); +void frmMain::updateControlsState() { + bool portOpened = m_serialPort.isOpen(); - ui->chkHeightMapUse->setChecked(false); + ui->grpState->setEnabled(portOpened); + ui->grpControl->setEnabled(portOpened); + ui->widgetSpindle->setEnabled(portOpened); + ui->widgetJog->setEnabled(portOpened && !m_processingFile); + ui->cboCommand->setEnabled(portOpened && (!ui->chkKeyboardControl->isChecked())); + ui->cmdCommandSend->setEnabled(portOpened); - return; - } else { // Restore original program - m_currentModel = &m_programModel; + ui->cmdCheck->setEnabled(portOpened && !m_processingFile); + ui->cmdHome->setEnabled(!m_processingFile); + ui->cmdCheck->setEnabled(!m_processingFile); + ui->cmdUnlock->setEnabled(!m_processingFile); + ui->cmdSpindle->setEnabled(!m_processingFile); - ui->tblProgram->setModel(&m_programModel); - ui->tblProgram->horizontalHeader()->restoreState(headerState); + ui->actFileNew->setEnabled(!m_processingFile); + ui->actFileOpen->setEnabled(!m_processingFile); + ui->cmdFileOpen->setEnabled(!m_processingFile); + ui->cmdFileReset->setEnabled(!m_processingFile && m_programModel.rowCount() > 1); + ui->cmdFileSend->setEnabled(portOpened && !m_processingFile && m_programModel.rowCount() > 1); + ui->cmdFilePause->setEnabled(m_processingFile && !ui->cmdCheck->isChecked()); + ui->cmdFileAbort->setEnabled(m_processingFile); + ui->actFileOpen->setEnabled(!m_processingFile); + ui->mnuRecent->setEnabled(!m_processingFile && ((m_recentFiles.count() > 0 && !m_heightMapMode) + || (m_recentHeightmaps.count() > 0 && m_heightMapMode))); + ui->actFileSave->setEnabled(m_programModel.rowCount() > 1); + ui->actFileSaveAs->setEnabled(m_programModel.rowCount() > 1); - connect(ui->tblProgram->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(onTableCurrentChanged(QModelIndex,QModelIndex))); + ui->tblProgram->setEditTriggers(m_processingFile ? QAbstractItemView::NoEditTriggers : + QAbstractItemView::DoubleClicked | QAbstractItemView::SelectedClicked + | QAbstractItemView::EditKeyPressed | QAbstractItemView::AnyKeyPressed); - // Store changes flag - bool fileChanged = m_fileChanged; + if (!portOpened) { + ui->txtStatus->setText(tr("Not connected")); + ui->txtStatus->setStyleSheet(QString("background-color: palette(button); color: palette(text);")); + emit statusChanged(-1); + } - // Update parser - updateParser(); + this->setWindowTitle(m_programFileName.isEmpty() ? qApp->applicationDisplayName() + : m_programFileName.mid(m_programFileName.lastIndexOf("/") + 1) + " - " + qApp->applicationDisplayName()); - // Select first row - ui->tblProgram->selectRow(0); + if (!m_processingFile) ui->chkKeyboardControl->setChecked(m_storedKeyboardControl); - // Restore changes flag - m_fileChanged = fileChanged; +#ifdef WINDOWS + if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { + if (!m_processingFile && m_taskBarProgress) m_taskBarProgress->hide(); } +#endif - // Update groupbox title - ui->grpHeightMap->setProperty("overrided", checked); - style()->unpolish(ui->grpHeightMap); - ui->grpHeightMap->ensurePolished(); - - // Update menu - ui->actFileSaveTransformedAs->setVisible(checked); -} + style()->unpolish(ui->cmdFileOpen); + style()->unpolish(ui->cmdFileReset); + style()->unpolish(ui->cmdFileSend); + style()->unpolish(ui->cmdFilePause); + style()->unpolish(ui->cmdFileAbort); + ui->cmdFileOpen->ensurePolished(); + ui->cmdFileReset->ensurePolished(); + ui->cmdFileSend->ensurePolished(); + ui->cmdFilePause->ensurePolished(); + ui->cmdFileAbort->ensurePolished(); -QList frmMain::subdivideSegment(LineSegment* segment) -{ - QList list; + // Heightmap + m_heightMapBorderDrawer.setVisible(ui->chkHeightMapBorderShow->isChecked() && m_heightMapMode); + m_heightMapGridDrawer.setVisible(ui->chkHeightMapGridShow->isChecked() && m_heightMapMode); + m_heightMapInterpolationDrawer.setVisible(ui->chkHeightMapInterpolationShow->isChecked() && m_heightMapMode); - QRectF borderRect = borderRectFromTextboxes(); + ui->grpProgram->setText(m_heightMapMode ? tr("Heightmap") : tr("G-code program")); + ui->grpProgram->setProperty("overrided", m_heightMapMode); + style()->unpolish(ui->grpProgram); + ui->grpProgram->ensurePolished(); - double interpolationStepX = borderRect.width() / (ui->txtHeightMapInterpolationStepX->value() - 1); - double interpolationStepY = borderRect.height() / (ui->txtHeightMapInterpolationStepY->value() - 1); + ui->cboJogStep->setEditable(!ui->chkKeyboardControl->isChecked()); + ui->cboJogFeed->setEditable(!ui->chkKeyboardControl->isChecked()); + ui->cboJogStep->setStyleSheet(QString("font-size: %1").arg(m_settings->fontSize())); + ui->cboJogFeed->setStyleSheet(ui->cboJogStep->styleSheet()); - double length; + ui->tblHeightMap->setVisible(m_heightMapMode); + ui->tblProgram->setVisible(!m_heightMapMode); - QVector3D vec = segment->getEnd() - segment->getStart(); + ui->widgetHeightMap->setEnabled(!m_processingFile && m_programModel.rowCount() > 1); + ui->cmdHeightMapMode->setEnabled(!ui->txtHeightMap->text().isEmpty()); - if (qIsNaN(vec.length())) return QList(); + ui->cmdFileSend->setText(m_heightMapMode ? tr("Probe") : tr("Send")); - if (fabs(vec.x()) / fabs(vec.y()) < interpolationStepX / interpolationStepY) length = interpolationStepY / (vec.y() / vec.length()); - else length = interpolationStepX / (vec.x() / vec.length()); + ui->chkHeightMapUse->setEnabled(!m_heightMapMode && !ui->txtHeightMap->text().isEmpty()); - length = fabs(length); + ui->actFileSaveTransformedAs->setVisible(ui->chkHeightMapUse->isChecked()); - if (qIsNaN(length)) { - return QList(); - } + ui->cmdFileSend->menu()->actions().first()->setEnabled(!ui->cmdHeightMapMode->isChecked()); - QVector3D seg = vec.normalized() * length; - // int count = trunc(vec.length() / length); - int count = (vec.length() / length); + m_selectionDrawer.setVisible(!ui->cmdHeightMapMode->isChecked()); +} - if (count == 0) return QList(); +void frmMain::updateLayouts() +{ + this->update(); + qApp->processEvents(QEventLoop::ExcludeUserInputEvents); +} - for (int i = 0; i < count; i++) { - LineSegment* line = new LineSegment(segment); - line->setStart(i == 0 ? segment->getStart() : list[i - 1]->getEnd()); - line->setEnd(line->getStart() + seg); - list.append(line); +void frmMain::updateRecentFilesMenu() +{ + foreach (QAction * action, ui->mnuRecent->actions()) { + if (action->text() == "") break; else { + ui->mnuRecent->removeAction(action); + delete action; + } } - if (list.count() > 0 && list.last()->getEnd() != segment->getEnd()) { - LineSegment* line = new LineSegment(segment); - line->setStart(list.last()->getEnd()); - line->setEnd(segment->getEnd()); - list.append(line); + foreach (QString file, !m_heightMapMode ? m_recentFiles : m_recentHeightmaps) { + QAction *action = new QAction(file, this); + connect(action, SIGNAL(triggered()), this, SLOT(onActRecentFileTriggered())); + ui->mnuRecent->insertAction(ui->mnuRecent->actions()[0], action); } - return list; + updateControlsState(); } -void frmMain::on_cmdHeightMapCreate_clicked() +void frmMain::updateOverride(SliderBox *slider, int value, char command) { - ui->cmdHeightMapMode->setChecked(true); - on_actFileNew_triggered(); + slider->setCurrentValue(value); + + int target = slider->isChecked() ? slider->value() : 100; + bool smallStep = abs(target - slider->currentValue()) < 10 || m_settings->queryStateTime() < 100; + + if (slider->currentValue() < target) { + m_serialPort.write(QByteArray(1, char(smallStep ? command + 2 : command))); + } else if (slider->currentValue() > target) { + m_serialPort.write(QByteArray(1, char(smallStep ? command + 3 : command + 1))); + } } -void frmMain::on_cmdHeightMapBorderAuto_clicked() +void frmMain::updateJogTitle() { - QRectF rect = borderRectFromExtremes(); - - if (!qIsNaN(rect.width()) && !qIsNaN(rect.height())) { - ui->txtHeightMapBorderX->setValue(rect.x()); - ui->txtHeightMapBorderY->setValue(rect.y()); - ui->txtHeightMapBorderWidth->setValue(rect.width()); - ui->txtHeightMapBorderHeight->setValue(rect.height()); + if (ui->grpJog->isChecked() || !ui->chkKeyboardControl->isChecked()) { + ui->grpJog->setTitle(tr("Jog")); + } else if (ui->chkKeyboardControl->isChecked()) { + ui->grpJog->setTitle(tr("Jog") + QString(tr(" (%1/%2)")) + .arg(ui->cboJogStep->currentText().toDouble() > 0 ? ui->cboJogStep->currentText() : tr("C")) + .arg(ui->cboJogFeed->currentText())); } } -bool frmMain::compareCoordinates(double x, double y, double z) +void frmMain::addRecentFile(QString fileName) { - return ui->txtMPosX->value() == x && ui->txtMPosY->value() == y && ui->txtMPosZ->value() == z; + m_recentFiles.removeAll(fileName); + m_recentFiles.append(fileName); + if (m_recentFiles.count() > 5) m_recentFiles.takeFirst(); } -void frmMain::onCmdUserClicked(bool checked) +void frmMain::addRecentHeightmap(QString fileName) { - Q_UNUSED(checked) + m_recentHeightmaps.removeAll(fileName); + m_recentHeightmaps.append(fileName); + if (m_recentHeightmaps.count() > 5) m_recentHeightmaps.takeFirst(); +} + +QRectF frmMain::borderRectFromTextboxes() +{ + QRectF rect; - int i = sender()->objectName().right(1).toInt(); + rect.setX(ui->txtHeightMapBorderX->value()); + rect.setY(ui->txtHeightMapBorderY->value()); + rect.setWidth(ui->txtHeightMapBorderWidth->value()); + rect.setHeight(ui->txtHeightMapBorderHeight->value()); - sendCommands(m_settings->userCommands(i)); + return rect; } -void frmMain::onOverridingToggled(bool checked) +QRectF frmMain::borderRectFromExtremes() { - Q_UNUSED(checked) + QRectF rect; - ui->grpOverriding->setProperty("overrided", ui->slbFeedOverride->isChecked() - || ui->slbRapidOverride->isChecked() || ui->slbSpindleOverride->isChecked()); - style()->unpolish(ui->grpOverriding); - ui->grpOverriding->ensurePolished(); + rect.setX(m_codeDrawer->getMinimumExtremes().x()); + rect.setY(m_codeDrawer->getMinimumExtremes().y()); + rect.setWidth(m_codeDrawer->getSizes().x()); + rect.setHeight(m_codeDrawer->getSizes().y()); + + return rect; } -void frmMain::onOverrideChanged() +void frmMain::updateHeightMapBorderDrawer() { - updateProgramEstimatedTime(m_currentDrawer->viewParser()->getLineSegmentList()); + if (m_settingsLoading) return; + + m_heightMapBorderDrawer.setBorderRect(borderRectFromTextboxes()); } -void frmMain::updateOverride(SliderBox *slider, int value, char command) +bool frmMain::updateHeightMapGrid() { - slider->setCurrentValue(value); + if (m_settingsLoading) return true; + + // Grid map changing warning + bool nan = true; + for (int i = 0; i < m_heightMapModel.rowCount(); i++) + for (int j = 0; j < m_heightMapModel.columnCount(); j++) + if (!qIsNaN(m_heightMapModel.data(m_heightMapModel.index(i, j), Qt::UserRole).toDouble())) { + nan = false; + break; + } + if (!nan && QMessageBox::warning(this, this->windowTitle(), tr("Changing grid settings will reset probe data. Continue?"), + QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) return false; + + // Update grid drawer + QRectF borderRect = borderRectFromTextboxes(); + m_heightMapGridDrawer.setBorderRect(borderRect); + m_heightMapGridDrawer.setGridSize(QPointF(ui->txtHeightMapGridX->value(), ui->txtHeightMapGridY->value())); + m_heightMapGridDrawer.setZBottom(ui->txtHeightMapGridZBottom->value()); + m_heightMapGridDrawer.setZTop(ui->txtHeightMapGridZTop->value()); + + // Reset model + int gridPointsX = ui->txtHeightMapGridX->value(); + int gridPointsY = ui->txtHeightMapGridY->value(); + + m_heightMapModel.resize(gridPointsX, gridPointsY); + ui->tblHeightMap->setModel(NULL); + ui->tblHeightMap->setModel(&m_heightMapModel); + resizeTableHeightMapSections(); + + // Update interpolation + updateHeightMapInterpolationDrawer(true); + + // Generate probe program + double gridStepX = gridPointsX > 1 ? borderRect.width() / (gridPointsX - 1) : 0; + double gridStepY = gridPointsY > 1 ? borderRect.height() / (gridPointsY - 1) : 0; - int target = slider->isChecked() ? slider->value() : 100; - bool smallStep = abs(target - slider->currentValue()) < 10 || m_settings->queryStateTime() < 100; + m_programLoading = true; + m_probeModel.clear(); + m_probeModel.insertRow(0); - if (slider->currentValue() < target) { - m_serialPort.write(QByteArray(1, char(smallStep ? command + 2 : command))); - } else if (slider->currentValue() > target) { - m_serialPort.write(QByteArray(1, char(smallStep ? command + 3 : command + 1))); - } -} + m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G21G90F%1G0Z%2"). + arg(ui->txtHeightMapProbeFeed->value()).arg(ui->txtHeightMapGridZTop->value())); + m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G0X0Y0")); + m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G38.2Z%1") + .arg(ui->txtHeightMapGridZBottom->value())); + m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G0Z%1") + .arg(ui->txtHeightMapGridZTop->value())); -void frmMain::jogStep() -{ - if (m_jogVector.length() == 0) return; + double x, y; - if (ui->cboJogStep->currentText().toDouble() == 0) { - const double acc = m_settings->acceleration(); // Acceleration mm/sec^2 - int speed = ui->cboJogFeed->currentText().toInt(); // Speed mm/min - double v = (double)speed / 60; // Rapid speed mm/sec - int N = 15; // Planner blocks - double tt = 0.002; // Transfer time - double dt = qMax(0.01, sqrt(v) / (2 * acc * (N - 1))) + tt; // Single jog command time - double s = v * dt; // Jog distance + for (int i = 0; i < gridPointsY; i++) { + y = borderRect.top() + gridStepY * i; + for (int j = 0; j < gridPointsX; j++) { + x = borderRect.left() + gridStepX * (i % 2 ? gridPointsX - 1 - j : j); + m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G0X%1Y%2") + .arg(x, 0, 'f', 3).arg(y, 0, 'f', 3)); + m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G38.2Z%1") + .arg(ui->txtHeightMapGridZBottom->value())); + m_probeModel.setData(m_probeModel.index(m_probeModel.rowCount() - 1, 1), QString("G0Z%1") + .arg(ui->txtHeightMapGridZTop->value())); + } + } - QVector3D vec = m_jogVector.normalized() * s; + m_programLoading = false; - sendCommand(QString("$J=G21G91X%1Y%2Z%3F%4") - .arg(vec.x(), 0, 'g', 4) - .arg(vec.y(), 0, 'g', 4) - .arg(vec.z(), 0, 'g', 4) - .arg(speed), -2, m_settings->showUICommands()); - } else { - int speed = ui->cboJogFeed->currentText().toInt(); // Speed mm/min - QVector3D vec = m_jogVector * ui->cboJogStep->currentText().toDouble(); + if (m_currentDrawer == m_probeDrawer) updateParser(); - sendCommand(QString("$J=G21G91X%1Y%2Z%3F%4") - .arg(vec.x(), 0, 'g', 4) - .arg(vec.y(), 0, 'g', 4) - .arg(vec.z(), 0, 'g', 4) - .arg(speed), -3, m_settings->showUICommands()); - } + m_heightMapChanged = true; + return true; } -QString frmMain::evaluateCommand(QString command) +void frmMain::updateHeightMapGrid(double arg1) { - // Evaluate script - // TODO: Change brackets - static QRegExp sx("\\{([^\\}]+)\\}"); - QScriptValue v; - QString vs; - while (sx.indexIn(command) != -1) { - v = m_scriptEngine.evaluate(sx.cap(1)); - vs = v.isUndefined() ? "" : v.isNumber() ? QString::number(v.toNumber(), 'f', 4) : v.toString(); - command.replace(sx.cap(0), vs); - } - return command; + if (sender()->property("previousValue").toDouble() != arg1 && !updateHeightMapGrid()) + static_cast(sender())->setValue(sender()->property("previousValue").toDouble()); + else sender()->setProperty("previousValue", arg1); } -void frmMain::setupCoordsTextboxes() +void frmMain::resizeTableHeightMapSections() { - int prec = m_settings->units() == 0 ? 3 : 4; - int bound = m_settings->units() == 0 ? 9999 : 999; - - ui->txtMPosX->setDecimals(prec); - ui->txtMPosX->setMinimum(-bound); - ui->txtMPosX->setMaximum(bound); - ui->txtMPosY->setDecimals(prec); - ui->txtMPosY->setMinimum(-bound); - ui->txtMPosY->setMaximum(bound); - ui->txtMPosZ->setDecimals(prec); - ui->txtMPosZ->setMinimum(-bound); - ui->txtMPosZ->setMaximum(bound); - - ui->txtWPosX->setDecimals(prec); - ui->txtWPosX->setMinimum(-bound); - ui->txtWPosX->setMaximum(bound); - ui->txtWPosY->setDecimals(prec); - ui->txtWPosY->setMinimum(-bound); - ui->txtWPosY->setMaximum(bound); - ui->txtWPosZ->setDecimals(prec); - ui->txtWPosZ->setMinimum(-bound); - ui->txtWPosZ->setMaximum(bound); + if (ui->tblHeightMap->horizontalHeader()->defaultSectionSize() + * ui->tblHeightMap->horizontalHeader()->count() < ui->glwVisualizer->width()) + ui->tblHeightMap->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); else { + ui->tblHeightMap->horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive); + } } -void frmMain::loadPlugins() +bool frmMain::eventFilter(QObject *obj, QEvent *event) { - QString pluginsDir = qApp->applicationDirPath() + "/plugins/"; + if (obj->inherits("QWidgetWindow")) { - UiLoader uiLoader; + QKeySequence ks; - // Get plugins list - QStringList pl = QDir(pluginsDir).entryList(QDir::Dirs | QDir::NoDotAndDotDot); + if ((event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease)) { + QKeyEvent *ev = static_cast(event); + ks = QKeySequence(ev->key() | ev->modifiers()); + } - qDebug() << "Loading plugins:" << pl; + // Jog on keyboard control + if (!m_processingFile && ui->chkKeyboardControl->isChecked() && + (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) + && !static_cast(event)->isAutoRepeat()) { - foreach (QString p, pl) { - // Config - QSettings set(pluginsDir + p + "/config.ini", QSettings::IniFormat); - QString title = set.value("title").toString(); - QString name = set.value("name").toString(); - QString type = set.value("type").toString(); - qDebug() << "Loading plugin:" << p << title << name << type; + if (ui->actJogXMinus->shortcuts().contains(ks)) { + if (event->type() == QEvent::KeyPress) emit ui->cmdXMinus->pressed(); else emit ui->cmdXMinus->released(); + } else if (ui->actJogXPlus->shortcuts().contains(ks)) { + if (event->type() == QEvent::KeyPress) emit ui->cmdXPlus->pressed(); else emit ui->cmdXPlus->released(); + } else if (ui->actJogYPlus->shortcuts().contains(ks)) { + if (event->type() == QEvent::KeyPress) emit ui->cmdYPlus->pressed(); else emit ui->cmdYPlus->released(); + } else if (ui->actJogYMinus->shortcuts().contains(ks)) { + if (event->type() == QEvent::KeyPress) emit ui->cmdYMinus->pressed(); else emit ui->cmdYMinus->released(); + } else if (ui->actJogZPlus->shortcuts().contains(ks)) { + if (event->type() == QEvent::KeyPress) emit ui->cmdZPlus->pressed(); else emit ui->cmdZPlus->released(); + } else if (ui->actJogZMinus->shortcuts().contains(ks)) { + if (event->type() == QEvent::KeyPress) emit ui->cmdZMinus->pressed(); else emit ui->cmdZMinus->released(); + } + } + } else if (obj == ui->tblProgram && m_processingFile) { + QKeyEvent *keyEvent = static_cast(event); + if (keyEvent->key() == Qt::Key_PageDown || keyEvent->key() == Qt::Key_PageUp + || keyEvent->key() == Qt::Key_Down || keyEvent->key() == Qt::Key_Up) { + ui->chkAutoScroll->setChecked(false); + } + } - // Translation - QString loc = QLocale().name().left(2); - QString translationFileName = pluginsDir + p + "/translation_" + loc + ".qm"; - if(QFile::exists(translationFileName)) { - QTranslator *translator = new QTranslator(); - if (translator->load(translationFileName)) qApp->installTranslator(translator); - else delete translator; - } + if (obj == this && event->type() == QEvent::WindowStateChange) { + ui->glwVisualizer->setUpdatesEnabled(!isMinimized() && ui->dockVisualizer->isVisible()); + } - // Ui - uiLoader.setWorkingDirectory(pluginsDir + p); - uiLoader.addPluginPath(pluginsDir + p + "/plugins"); + if (!ui->actViewLockPanels->isChecked() && obj->inherits("QGroupBox") + && (obj->parent()->objectName() == "scrollContentsDevice" + || obj->parent()->objectName() == "scrollContentsModification" + || obj->parent()->objectName() == "scrollContentsUser") + && obj->objectName().startsWith("grp")) { - // Main - QWidget *widget = 0; - QFile f(pluginsDir + p + "/widget.ui"); - if (f.open(QFile::ReadOnly)) { - // Load widget - widget = uiLoader.load(&f, this); - f.close(); + if (event->type() == QEvent::MouseButtonPress) { + + QMouseEvent *e = static_cast(event); + m_mousePressPos = e->pos(); - if (widget) { - if (type.toUpper() == "PANEL") { - // Create panel - GroupBox *box = new GroupBox(this); - QVBoxLayout *layout1 = new QVBoxLayout(box); - QWidget *bw = new QWidget(box); - QVBoxLayout *layout2 = new QVBoxLayout(bw); - box->setObjectName("grp" + name); - box->setTitle(tr(title.toLatin1())); - box->setLayout(layout1); - box->setCheckable(true); - box->setProperty("overrided", false); - layout1->addWidget(bw); - bw->setLayout(layout2); - layout2->addWidget(widget); - layout2->setMargin(0); - connect(box, &QGroupBox::toggled, bw, &QWidget::setVisible); + } else if (event->type() == QEvent::MouseMove) { - // Add panel to user window - static_cast(ui->scrollContentsUser->layout())->insertWidget(0, box); + QMouseEvent *e = static_cast(event); + int d = (e->pos() - m_mousePressPos).manhattanLength(); - } else if (type.toUpper() == "WINDOW") { - // Create dock widget - QDockWidget *dock = new QDockWidget(this); - QWidget *contents = new QWidget(dock); - QFrame *frame = new QFrame(contents); - QVBoxLayout *layout1 = new QVBoxLayout(contents); - QVBoxLayout *layout2 = new QVBoxLayout(frame); - dock->setObjectName("dock" + name); - dock->setWindowTitle(tr(title.toLatin1())); - dock->setWidget(contents); - contents->setLayout(layout1); - layout1->addWidget(frame); - QMargins m = layout1->contentsMargins(); - m.setLeft(0); - m.setRight(0); - layout1->setContentsMargins(m); - frame->setLayout(layout2); - layout2->addWidget(widget); - layout2->setMargin(0); + if (e->buttons() & Qt::LeftButton && d > QApplication::startDragDistance()) { + QDrag *drag = new QDrag(this); + WidgetMimeData *mimeData = new WidgetMimeData(); - // Add to main form - this->addDockWidget(Qt::RightDockWidgetArea, dock); + mimeData->setWidget(static_cast(obj)); - } else { - qDebug() << "Unknown plugin type" << type; - } + QPixmap *pix = new QPixmap(static_cast(obj)->size()); + static_cast(obj)->render(pix); + + drag->setMimeData(mimeData); + drag->setPixmap(*pix); + drag->exec(); } } + } - // Settings - QWidget *settingsWidget = 0; - f.setFileName(pluginsDir + p + "/settings.ui"); - if (f.open(QFile::ReadOnly)) { - // Load settings widget - uiLoader.setWorkingDirectory(pluginsDir + p); - settingsWidget = uiLoader.load(&f, this); - f.close(); - - if (settingsWidget) { - // Create groupbox - GroupBox *box = new GroupBox(m_settings); - QVBoxLayout *layout1 = new QVBoxLayout(box); - box->setObjectName("grpSettings" + name); - box->setTitle(tr(title.toLatin1())); - box->setLayout(layout1); - layout1->addWidget(settingsWidget); - - // Add to settings form - m_settings->addCustomSettings(box); - } - } + return false; +} - // Delegate actions to main form - QList acts = widget->findChildren(); - foreach (QAction *a, acts) addAction(a); +int frmMain::bufferLength() +{ + int length = 0; - // Script - f.setFileName(pluginsDir + p + "/script.js"); - if (f.open(QFile::ReadOnly)) { - QScriptEngine *se = new QScriptEngine(); + foreach (CommandAttributes ca, m_commands) { + length += ca.length; + } - // Delegate Ui - if (widget) { - QScriptValue sw = se->newQObject(widget); - se->globalObject().setProperty("ui", sw); - } + return length; +} - // Settings ui - if (settingsWidget) { - QScriptValue setw = se->newQObject(settingsWidget); - se->globalObject().setProperty("settings", setw); - } +bool frmMain::dataIsFloating(QString data) { + QStringList ends; - // Main form - QScriptValue main = se->newQObject(this); - se->globalObject().setProperty("main", main); + ends << "Reset to continue"; + ends << "'$H'|'$X' to unlock"; + ends << "ALARM: Soft limit"; + ends << "ALARM: Hard limit"; + ends << "Check Door"; - // Settings - QScriptValue settings = se->newQObject(m_settings); - se->globalObject().setProperty("mainSettings", settings); + foreach (QString str, ends) { + if (data.contains(str)) return true; + } - // Stored vars - QScriptValue vars = se->newQObject(&m_storedVars); - se->globalObject().setProperty("vars", vars); + return false; +} - // Translator - se->installTranslatorFunctions(); +bool frmMain::dataIsEnd(QString data) { + QStringList ends; - // Run script - QString script = f.readAll(); - qDebug() << "Running plugin:" << p << se->evaluate(script).toString(); - qDebug() << se->uncaughtExceptionBacktrace(); + ends << "ok"; + ends << "error"; - f.close(); - } + foreach (QString str, ends) { + if (data.contains(str)) return true; } -} -void frmMain::on_cmdYPlus_pressed() -{ - m_jogVector += QVector3D(0, 1, 0); - jogStep(); + return false; } -void frmMain::on_cmdYPlus_released() -{ - m_jogVector -= QVector3D(0, 1, 0); - jogStep(); +bool frmMain::dataIsReset(QString data) { + return QRegExp("^GRBL|GCARVIN\\s\\d\\.\\d.").indexIn(data.toUpper()) != -1; } -void frmMain::on_cmdYMinus_pressed() +QTime frmMain::updateProgramEstimatedTime(QList lines) { - m_jogVector += QVector3D(0, -1, 0); - jogStep(); -} + double time = 0; -void frmMain::on_cmdYMinus_released() -{ - m_jogVector -= QVector3D(0, -1, 0); - jogStep(); -} + for (int i = 0; i < lines.count(); i++) { + LineSegment *ls = lines[i]; + double length = (ls->getEnd() - ls->getStart()).length(); -void frmMain::on_cmdXPlus_pressed() -{ - m_jogVector += QVector3D(1, 0, 0); - jogStep(); -} + // TODO: Update for rapid override + if (!qIsNaN(length) && !qIsNaN(ls->getSpeed()) && ls->getSpeed() != 0) time += + length / ((ui->slbFeedOverride->isChecked() && !ls->isFastTraverse()) + ? (ls->getSpeed() * ui->slbFeedOverride->value() / 100) : + (ui->slbRapidOverride->isChecked() && ls->isFastTraverse()) + ? (ls->getSpeed() * ui->slbRapidOverride->value() / 100) : ls->getSpeed()); + } -void frmMain::on_cmdXPlus_released() -{ - m_jogVector -= QVector3D(1, 0, 0); - jogStep(); -} + time *= 60; -void frmMain::on_cmdXMinus_pressed() -{ - m_jogVector += QVector3D(-1, 0, 0); - jogStep(); -} + QTime t; -void frmMain::on_cmdXMinus_released() -{ - m_jogVector -= QVector3D(-1, 0, 0); - jogStep(); -} + t.setHMS(0, 0, 0); + t = t.addSecs(time); -void frmMain::on_cmdZPlus_pressed() -{ - m_jogVector += QVector3D(0, 0, 1); - jogStep(); -} + ui->glwVisualizer->setSpendTime(QTime(0, 0, 0)); + ui->glwVisualizer->setEstimatedTime(t); -void frmMain::on_cmdZPlus_released() -{ - m_jogVector -= QVector3D(0, 0, 1); - jogStep(); + return t; } -void frmMain::on_cmdZMinus_pressed() +QList frmMain::subdivideSegment(LineSegment* segment) { - m_jogVector += QVector3D(0, 0, -1); - jogStep(); -} + QList list; -void frmMain::on_cmdZMinus_released() -{ - m_jogVector -= QVector3D(0, 0, -1); - jogStep(); -} + QRectF borderRect = borderRectFromTextboxes(); -void frmMain::on_cmdStop_clicked() -{ - m_queue.clear(); - m_serialPort.write(QByteArray(1, char(0x85))); -} + double interpolationStepX = borderRect.width() / (ui->txtHeightMapInterpolationStepX->value() - 1); + double interpolationStepY = borderRect.height() / (ui->txtHeightMapInterpolationStepY->value() - 1); -void frmMain::on_mnuViewWindows_aboutToShow() -{ - QAction *a; - QList al; + double length; - foreach (QDockWidget *d, findChildren()) { - a = new QAction(d->windowTitle(), ui->mnuViewWindows); - a->setCheckable(true); - a->setChecked(d->isVisible()); - connect(a, &QAction::triggered, d, &QDockWidget::setVisible); - al.append(a); - } + QVector3D vec = segment->getEnd() - segment->getStart(); - qSort(al.begin(), al.end(), frmMain::actionTextLessThan); + if (qIsNaN(vec.length())) return QList(); - ui->mnuViewWindows->clear(); - ui->mnuViewWindows->addActions(al); -} + if (fabs(vec.x()) / fabs(vec.y()) < interpolationStepX / interpolationStepY) length = interpolationStepY / (vec.y() / vec.length()); + else length = interpolationStepX / (vec.x() / vec.length()); -void frmMain::on_mnuViewPanels_aboutToShow() -{ - QAction *a; + length = fabs(length); - ui->mnuViewPanels->clear(); + if (qIsNaN(length)) { + return QList(); + } - QStringList panels; - if (ui->scrollContentsDevice->isVisible()) panels << ui->scrollContentsDevice->saveState(); - if (ui->scrollContentsModification->isVisible()) panels << "\n" << ui->scrollContentsModification->saveState(); - if (ui->scrollContentsUser->isVisible()) panels << "\n" << ui->scrollContentsUser->saveState(); + QVector3D seg = vec.normalized() * length; + // int count = trunc(vec.length() / length); + int count = (vec.length() / length); - foreach (QString s, panels) { - if (s == "\n") { - ui->mnuViewPanels->addSeparator(); - } else { - QGroupBox *b = findChild(s); - if (b) { - a = ui->mnuViewPanels->addAction(b->title()); - a->setCheckable(true); - a->setChecked(b->isVisible()); - connect(a, &QAction::triggered, b, &QWidget::setVisible); - } - } + if (count == 0) return QList(); + + for (int i = 0; i < count; i++) { + LineSegment* line = new LineSegment(segment); + line->setStart(i == 0 ? segment->getStart() : list[i - 1]->getEnd()); + line->setEnd(line->getStart() + seg); + list.append(line); } -} -void frmMain::on_actJogStepNext_triggered() -{ - ui->cboJogStep->setCurrentNext(); -} + if (list.count() > 0 && list.last()->getEnd() != segment->getEnd()) { + LineSegment* line = new LineSegment(segment); + line->setStart(list.last()->getEnd()); + line->setEnd(segment->getEnd()); + list.append(line); + } -void frmMain::on_actJogStepPrevious_triggered() -{ - ui->cboJogStep->setCurrentPrevious(); + return list; } -void frmMain::on_actJogFeedNext_triggered() +void frmMain::jogStep() { - ui->cboJogFeed->setCurrentNext(); -} + // TODO: Replace G21 with G21/G20 according the mm/inch setting -void frmMain::on_actJogFeedPrevious_triggered() -{ - ui->cboJogFeed->setCurrentPrevious(); -} + if (m_jogVector.length() == 0) return; -void frmMain::on_actSpindleSpeedPlus_triggered() -{ - ui->slbSpindle->setSliderPosition(ui->slbSpindle->sliderPosition() + 1); -} + if (ui->cboJogStep->currentText().toDouble() == 0) { + const double acc = m_settings->acceleration(); // Acceleration mm/sec^2 + int speed = ui->cboJogFeed->currentText().toInt(); // Speed mm/min + double v = (double)speed / 60; // Rapid speed mm/sec + int N = 15; // Planner blocks + double tt = 0.002; // Transfer time + double dt = qMax(0.01, sqrt(v) / (2 * acc * (N - 1))) + tt; // Single jog command time + double s = v * dt; // Jog distance -void frmMain::on_actSpindleSpeedMinus_triggered() -{ - ui->slbSpindle->setSliderPosition(ui->slbSpindle->sliderPosition() - 1); -} + QVector3D vec = m_jogVector.normalized() * s; -void frmMain::on_actOverrideFeedPlus_triggered() -{ - ui->slbFeedOverride->setSliderPosition(ui->slbFeedOverride->sliderPosition() + 1); -} + sendCommand(QString("$J=G21G91X%1Y%2Z%3F%4") + .arg(vec.x(), 0, 'g', 4) + .arg(vec.y(), 0, 'g', 4) + .arg(vec.z(), 0, 'g', 4) + .arg(speed), -2, m_settings->showUICommands()); + } else { + int speed = ui->cboJogFeed->currentText().toInt(); // Speed mm/min + QVector3D vec = m_jogVector * ui->cboJogStep->currentText().toDouble(); -void frmMain::on_actOverrideFeedMinus_triggered() -{ - ui->slbFeedOverride->setSliderPosition(ui->slbFeedOverride->sliderPosition() - 1); + sendCommand(QString("$J=G21G91X%1Y%2Z%3F%4") + .arg(vec.x(), 0, 'g', 4) + .arg(vec.y(), 0, 'g', 4) + .arg(vec.z(), 0, 'g', 4) + .arg(speed), -3, m_settings->showUICommands()); + } } -void frmMain::on_actOverrideRapidPlus_triggered() +double frmMain::toMetric(double value) { - ui->slbRapidOverride->setSliderPosition(ui->slbRapidOverride->sliderPosition() + 1); + return m_settings->units() == 0 ? value : value * 25.4; } -void frmMain::on_actOverrideRapidMinus_triggered() +bool frmMain::compareCoordinates(double x, double y, double z) { - ui->slbRapidOverride->setSliderPosition(ui->slbRapidOverride->sliderPosition() - 1); + return ui->txtMPosX->value() == x && ui->txtMPosY->value() == y && ui->txtMPosZ->value() == z; } -void frmMain::on_actOverrideSpindlePlus_triggered() +bool frmMain::isGCodeFile(QString fileName) { - ui->slbSpindleOverride->setSliderPosition(ui->slbSpindleOverride->sliderPosition() + 1); + return fileName.endsWith(".txt", Qt::CaseInsensitive) + || fileName.endsWith(".nc", Qt::CaseInsensitive) + || fileName.endsWith(".ncc", Qt::CaseInsensitive) + || fileName.endsWith(".ngc", Qt::CaseInsensitive) + || fileName.endsWith(".tap", Qt::CaseInsensitive); } -void frmMain::on_actOverrideSpindleMinus_triggered() +bool frmMain::isHeightmapFile(QString fileName) { - ui->slbSpindleOverride->setSliderPosition(ui->slbSpindleOverride->sliderPosition() - 1); + return fileName.endsWith(".map", Qt::CaseInsensitive); } -void frmMain::on_dockVisualizer_visibilityChanged(bool visible) +int frmMain::buttonSize() { - ui->glwVisualizer->setUpdatesEnabled(visible); + return ui->cmdHome->minimumWidth(); } -void frmMain::on_actViewLockWindows_toggled(bool checked) +bool frmMain::actionLessThan(const QAction *a1, const QAction *a2) { - QList dl = findChildren(); - - foreach (QDockWidget *d, dl) { - d->setFeatures(checked ? QDockWidget::NoDockWidgetFeatures : QDockWidget::AllDockWidgetFeatures); - } + return a1->objectName() < a2->objectName(); } -void frmMain::saveValue(QString key, QVariant value) +bool frmMain::actionTextLessThan(const QAction *a1, const QAction *a2) { - QSettings set(m_settingsFileName, QSettings::IniFormat); - set.setIniCodec("UTF-8"); - - set.setValue("Plugins/" + key, value); + return a1->text() < a2->text(); } -QVariant frmMain::loadValue(QString key) +QScriptValue frmMain::importExtension(QScriptContext *context, QScriptEngine *engine) { - QSettings set(m_settingsFileName, QSettings::IniFormat); - set.setIniCodec("UTF-8"); - - return set.value("Plugins/" + key); + return engine->importExtension(context->argument(0).toString()); } \ No newline at end of file diff --git a/src/candle/frmmain.h b/src/candle/frmmain.h index 037907a9..7342313c 100644 --- a/src/candle/frmmain.h +++ b/src/candle/frmmain.h @@ -36,13 +36,14 @@ #include "utils/interpolation.h" -#include "widgets/styledtoolbutton.h" -#include "widgets/sliderbox.h" +#include "styledtoolbutton.h" +#include "sliderbox.h" #include "frmsettings.h" #include "frmabout.h" #include "scriptvars.h" +#include "scriptfunctions.h" #ifdef WINDOWS #include @@ -85,108 +86,89 @@ class frmMain : public QMainWindow { Q_OBJECT + friend class ScriptFunctions; + public: explicit frmMain(QWidget *parent = 0); ~frmMain(); - Q_INVOKABLE int sendCommand(QString command, int tableIndex = -1, bool showInConsole = true, bool queue = false); - Q_INVOKABLE void sendCommands(QString commands, int tableIndex = -1); - Q_INVOKABLE void applySettings(); - Q_INVOKABLE void saveValue(QString key, QVariant value); - Q_INVOKABLE QVariant loadValue(QString key); - - double toolZPosition(); - signals: - void responseReceived(QString command, int tableIndex, QString response); void statusReceived(QString status); + void statusChanged(int status); void settingsAboutToLoad(); void settingsLoaded(); void settingsAboutToSave(); void settingsSaved(); - void settingsChanged(); + void settingsAboutToShow(); + void settingsAccepted(); + void settingsRejected(); + void pluginsLoaded(); private slots: - void updateHeightMapInterpolationDrawer(bool reset = false); - void placeVisualizerButtons(); - - void onSerialPortReadyRead(); - void onSerialPortError(QSerialPort::SerialPortError); - void onTimerConnection(); - void onTimerStateQuery(); - void onVisualizatorRotationChanged(); - void onScroolBarAction(int action); - void onJogTimer(); - void onTableInsertLine(); - void onTableDeleteLines(); - void onActRecentFileTriggered(); - void onCboCommandReturnPressed(); - void onTableCurrentChanged(QModelIndex idx1, QModelIndex idx2); - void onCmdUserClicked(bool checked); - void onOverridingToggled(bool checked); - void onOverrideChanged(); - void onActSendFromLineTriggered(); - void onSlbSpindleValueUserChanged(); - void onSlbSpindleValueChanged(); - void onDockTopLevelChanged(bool topLevel); - + void on_actFileNew_triggered(); + void on_actFileOpen_triggered(); + void on_actFileSave_triggered(); + void on_actFileSaveAs_triggered(); + void on_actFileSaveTransformedAs_triggered(); + void on_actRecentClear_triggered(); void on_actFileExit_triggered(); + void on_actServiceSettings_triggered(); + void on_actAbout_triggered(); + void on_actJogStepNext_triggered(); + void on_actJogStepPrevious_triggered(); + void on_actJogFeedNext_triggered(); + void on_actJogFeedPrevious_triggered(); + void on_actSpindleSpeedPlus_triggered(); + void on_actSpindleSpeedMinus_triggered(); + void on_actOverrideFeedPlus_triggered(); + void on_actOverrideFeedMinus_triggered(); + void on_actOverrideRapidPlus_triggered(); + void on_actOverrideRapidMinus_triggered(); + void on_actOverrideSpindlePlus_triggered(); + void on_actOverrideSpindleMinus_triggered(); + void on_actViewLockWindows_toggled(bool checked); void on_cmdFileOpen_clicked(); - void on_cmdFit_clicked(); void on_cmdFileSend_clicked(); - void onTableCellChanged(QModelIndex i1, QModelIndex i2); - void on_actServiceSettings_triggered(); - void on_actFileOpen_triggered(); + void on_cmdFilePause_clicked(bool checked); + void on_cmdFileAbort_clicked(); + void on_cmdFileReset_clicked(); void on_cmdCommandSend_clicked(); + void on_cmdClearConsole_clicked(); void on_cmdHome_clicked(); void on_cmdCheck_clicked(bool checked); void on_cmdReset_clicked(); void on_cmdUnlock_clicked(); void on_cmdSpindle_toggled(bool checked); - void on_cmdFilePause_clicked(bool checked); - void on_cmdFileReset_clicked(); - void on_actFileNew_triggered(); - void on_cmdClearConsole_clicked(); - void on_actFileSaveAs_triggered(); - void on_actFileSave_triggered(); - void on_actFileSaveTransformedAs_triggered(); + void on_cmdSpindle_clicked(bool checked); void on_cmdTop_clicked(); void on_cmdFront_clicked(); void on_cmdLeft_clicked(); void on_cmdIsometric_clicked(); - void on_actAbout_triggered(); + void on_cmdFit_clicked(); void on_grpOverriding_toggled(bool checked); void on_grpSpindle_toggled(bool checked); void on_grpJog_toggled(bool checked); - void on_grpUserCommands_toggled(bool checked); - void on_chkKeyboardControl_toggled(bool checked); - void on_tblProgram_customContextMenuRequested(const QPoint &pos); - void on_actRecentClear_triggered(); void on_grpHeightMap_toggled(bool arg1); + void on_chkKeyboardControl_toggled(bool checked); void on_chkHeightMapBorderShow_toggled(bool checked); + void on_chkHeightMapInterpolationShow_toggled(bool checked); + void on_chkHeightMapUse_clicked(bool checked); + void on_chkHeightMapGridShow_toggled(bool checked); void on_txtHeightMapBorderX_valueChanged(double arg1); void on_txtHeightMapBorderWidth_valueChanged(double arg1); void on_txtHeightMapBorderY_valueChanged(double arg1); void on_txtHeightMapBorderHeight_valueChanged(double arg1); - void on_chkHeightMapGridShow_toggled(bool checked); void on_txtHeightMapGridX_valueChanged(double arg1); void on_txtHeightMapGridY_valueChanged(double arg1); void on_txtHeightMapGridZBottom_valueChanged(double arg1); void on_txtHeightMapGridZTop_valueChanged(double arg1); - void on_cmdHeightMapMode_toggled(bool checked); - void on_chkHeightMapInterpolationShow_toggled(bool checked); - void on_cmdHeightMapLoad_clicked(); void on_txtHeightMapInterpolationStepX_valueChanged(double arg1); void on_txtHeightMapInterpolationStepY_valueChanged(double arg1); - void on_chkHeightMapUse_clicked(bool checked); + void on_cmdHeightMapMode_toggled(bool checked); void on_cmdHeightMapCreate_clicked(); + void on_cmdHeightMapLoad_clicked(); void on_cmdHeightMapBorderAuto_clicked(); - void on_cmdFileAbort_clicked(); - void on_cmdSpindle_clicked(bool checked); - void on_mnuViewWindows_aboutToShow(); - void on_mnuViewPanels_aboutToShow(); - void on_cmdYPlus_pressed(); void on_cmdYPlus_released(); void on_cmdYMinus_pressed(); @@ -200,23 +182,32 @@ private slots: void on_cmdZMinus_pressed(); void on_cmdZMinus_released(); void on_cmdStop_clicked(); - - void on_actJogStepNext_triggered(); - void on_actJogStepPrevious_triggered(); - void on_actJogFeedNext_triggered(); - void on_actJogFeedPrevious_triggered(); - void on_actSpindleSpeedPlus_triggered(); - void on_actSpindleSpeedMinus_triggered(); - void on_actOverrideFeedPlus_triggered(); - void on_actOverrideFeedMinus_triggered(); - void on_actOverrideRapidPlus_triggered(); - void on_actOverrideRapidMinus_triggered(); - void on_actOverrideSpindlePlus_triggered(); - void on_actOverrideSpindleMinus_triggered(); - + void on_tblProgram_customContextMenuRequested(const QPoint &pos); + void on_mnuViewWindows_aboutToShow(); + void on_mnuViewPanels_aboutToShow(); void on_dockVisualizer_visibilityChanged(bool visible); - void on_actViewLockWindows_toggled(bool checked); + void onSerialPortReadyRead(); + void onSerialPortError(QSerialPort::SerialPortError); + void onTimerConnection(); + void onTimerStateQuery(); + void onTableInsertLine(); + void onTableDeleteLines(); + void onTableCellChanged(QModelIndex i1, QModelIndex i2); + void onTableCurrentChanged(QModelIndex idx1, QModelIndex idx2); + void onOverridingToggled(bool checked); + void onOverrideChanged(); + void onActRecentFileTriggered(); + void onActSendFromLineTriggered(); + void onSlbSpindleValueUserChanged(); + void onSlbSpindleValueChanged(); + void onCboCommandReturnPressed(); + void onDockTopLevelChanged(bool topLevel); + void onScroolBarAction(int action); + void onScriptException(const QScriptValue &exception); + + void updateHeightMapInterpolationDrawer(bool reset = false); + void placeVisualizerButtons(); protected: void showEvent(QShowEvent *se); @@ -231,84 +222,78 @@ private slots: private: static const int BUFFERLENGTH = 127; + // Ui Ui::frmMain *ui; + QStringList m_status; + QStringList m_statusCaptions; + QStringList m_statusBackColors; + QStringList m_statusForeColors; + QMenu *m_tableMenu; + QMessageBox* m_senderErrorBox; +#ifdef WINDOWS + QWinTaskbarButton *m_taskBarButton; + QWinTaskbarProgress *m_taskBarProgress; +#endif + // Parsers GcodeViewParse m_viewParser; GcodeViewParse m_probeParser; + // Visualizer drawers OriginDrawer *m_originDrawer; - GcodeDrawer *m_codeDrawer; GcodeDrawer *m_probeDrawer; GcodeDrawer *m_currentDrawer; - ToolDrawer m_toolDrawer; HeightMapBorderDrawer m_heightMapBorderDrawer; HeightMapGridDrawer m_heightMapGridDrawer; HeightMapInterpolationDrawer m_heightMapInterpolationDrawer; - SelectionDrawer m_selectionDrawer; + // Table models GCodeTableModel m_programModel; GCodeTableModel m_probeModel; GCodeTableModel m_programHeightmapModel; - + GCodeTableModel *m_currentModel; HeightMapTableModel m_heightMapModel; - bool m_programLoading; - bool m_settingsLoading; - + // Serial port QSerialPort m_serialPort; + // Queues + QList m_commands; + QList m_queue; + + // Forms frmSettings *m_settings; frmAbout m_frmAbout; + // Filenames QString m_settingsFileName; QString m_programFileName; QString m_heightMapFileName; QString m_lastFolder; + QStringList m_recentFiles; + QStringList m_recentHeightmaps; - bool m_fileChanged; - bool m_heightMapChanged; - + // Timers QTimer m_timerConnection; QTimer m_timerStateQuery; QBasicTimer m_timerToolAnimation; - - QStringList m_status; - QStringList m_statusCaptions; - QStringList m_statusBackColors; - QStringList m_statusForeColors; - -#ifdef WINDOWS - QWinTaskbarButton *m_taskBarButton; - QWinTaskbarProgress *m_taskBarProgress; -#endif - - QMenu *m_tableMenu; - QList m_commands; - QList m_queue; QTime m_startTime; - QMessageBox* m_senderErrorBox; - - // Stored origin - double m_storedX; - double m_storedY; - double m_storedZ; - QString m_storedCS; + // Stored parser params QString m_storedParserStatus; - // Console window - int m_storedConsoleMinimumHeight; - int m_storedConsoleHeight; - int m_consolePureHeight; - // Flags + bool m_programLoading; + bool m_settingsLoading; + bool m_fileChanged; + bool m_heightMapChanged; + bool m_homing; bool m_updateSpindleSpeed; bool m_updateParserStatus; - bool m_updateFeed; bool m_reseting; bool m_resetCompleted; @@ -320,7 +305,6 @@ private slots: bool m_fileEndSent; bool m_heightMapMode; - bool m_cellChanged; // Indices int m_fileCommandIndex; @@ -330,90 +314,93 @@ private slots: // Current values int m_lastDrawnLineIndex; int m_lastGrblStatus; - double m_originalFeed; // Keyboard - bool m_keyPressed; - bool m_jogBlock; bool m_absoluteCoordinates; bool m_storedKeyboardControl; // Spindle bool m_spindleCW; - bool m_spindleCommandSpeed; // Jog QVector3D m_jogVector; - // Recent files - QStringList m_recentFiles; - QStringList m_recentHeightmaps; - // Script QScriptEngine m_scriptEngine; ScriptVars m_storedVars; + ScriptFunctions m_scriptFunctions; // Drag & drop QPoint m_mousePressPos; - - void loadFile(QString fileName); - void loadFile(QList data); - void clearTable(); + + // Settings void preloadSettings(); void loadSettings(); void saveSettings(); - bool saveChanges(bool heightMapMode); - void updateControlsState(); + void applySettings(); + + // Plugins + void loadPlugins(); + + // Communication void openPort(); - QString evaluateCommand(QString command); void grblReset(); - int bufferLength(); + int sendCommand(QString command, int tableIndex = -1, bool showInConsole = true, bool queue = false); + void sendCommands(QString commands, int tableIndex = -1); void sendNextFileCommands(); + QString evaluateCommand(QString command); + + // Parser void updateParser(); - bool dataIsFloating(QString data); - bool dataIsEnd(QString data); - bool dataIsReset(QString data); + void storeParserState(); + void restoreParserState(); + void restoreOffsets(); + void storeOffsetsVars(QString response); - QTime updateProgramEstimatedTime(QList lines); + // Files/models + void loadFile(QString fileName); + void loadFile(QList data); + bool saveChanges(bool heightMapMode); bool saveProgramToFile(QString fileName, GCodeTableModel *model); + void loadHeightMap(QString fileName); + bool saveHeightMap(QString fileName); + void clearTable(); + void resetHeightmap(); - bool eventFilter(QObject *obj, QEvent *event); - bool keyIsMovement(int key); + // Ui + void setupCoordsTextboxes(); + void updateControlsState(); void updateLayouts(); void updateRecentFilesMenu(); + void updateOverride(SliderBox *slider, int value, char command); + void updateJogTitle(); void addRecentFile(QString fileName); void addRecentHeightmap(QString fileName); - double toMetric(double value); - QRectF borderRectFromTextboxes(); QRectF borderRectFromExtremes(); void updateHeightMapBorderDrawer(); bool updateHeightMapGrid(); - void loadHeightMap(QString fileName); - bool saveHeightMap(QString fileName); + void updateHeightMapGrid(double arg1); + void resizeTableHeightMapSections(); + bool eventFilter(QObject *obj, QEvent *event); - GCodeTableModel *m_currentModel; + // Utility + int bufferLength(); + bool dataIsFloating(QString data); + bool dataIsEnd(QString data); + bool dataIsReset(QString data); + QTime updateProgramEstimatedTime(QList lines); QList subdivideSegment(LineSegment *segment); - void resizeTableHeightMapSections(); - void updateHeightMapGrid(double arg1); - void resetHeightmap(); - void storeParserState(); - void restoreParserState(); - void storeOffsets(); - void restoreOffsets(); - void storeOffsetsVars(QString response); + void jogStep(); + double toMetric(double value); + bool compareCoordinates(double x, double y, double z); bool isGCodeFile(QString fileName); bool isHeightmapFile(QString fileName); - bool compareCoordinates(double x, double y, double z); - void updateOverride(SliderBox *slider, int value, char command); - void jogStep(); - void updateJogTitle(); - void setupCoordsTextboxes(); - - void loadPlugins(); + int buttonSize(); static bool actionLessThan(const QAction *a1, const QAction *a2); static bool actionTextLessThan(const QAction *a1, const QAction *a2); + static QScriptValue importExtension(QScriptContext *context, QScriptEngine *engine); }; typedef QMap> ShortcutsMap; diff --git a/src/candle/frmmain.ui b/src/candle/frmmain.ui index d6f8ba3c..7e8e961e 100644 --- a/src/candle/frmmain.ui +++ b/src/candle/frmmain.ui @@ -459,7 +459,7 @@ QLabel[overrided="false"] { 0 - -239 + 0 275 804 @@ -467,7 +467,7 @@ QLabel[overrided="false"] { true - + 0 @@ -1284,16 +1284,16 @@ QLabel[overrided="false"] { - -26 - -506 + 0 + 0 347 - 850 + 754 true - + 0 @@ -1753,162 +1753,6 @@ QLabel[overrided="false"] { - - - - true - - - User commands - - - true - - - false - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - true - - - - 0 - 0 - - - - Spindle on/off - - - - :/images/num2.png:/images/num2.png - - - - 32 - 32 - - - - true - - - - - - - true - - - - 0 - 0 - - - - Spindle on/off - - - - :/images/num3.png:/images/num3.png - - - - 32 - 32 - - - - true - - - - - - - true - - - - 0 - 0 - - - - Spindle on/off - - - - :/images/num4.png:/images/num4.png - - - - 32 - 32 - - - - true - - - - - - - true - - - - 0 - 0 - - - - Spindle on/off - - - - :/images/num1.png:/images/num1.png - - - - 32 - 32 - - - - true - - - - - - - - - - - @@ -2794,7 +2638,7 @@ padding-right: 8; true - + 0 @@ -2901,29 +2745,12 @@ padding-right: 8; Home - - - Z-probe - - - - - Zero XY - - - + - Zero Z - - - - - Restore origin + Check - - - - Safe position + + Check @@ -2936,26 +2763,6 @@ padding-right: 8; Unlock - - - User command 1 - - - - - User command 2 - - - - - User command 3 - - - - - User command 4 - - Spindle speed + @@ -3190,26 +2997,26 @@ padding-right: 8; + + GroupBox + QGroupBox +
widgets/groupbox.h
+ 1 +
StyledToolButton QToolButton -
widgets/styledtoolbutton.h
+
styledtoolbutton.h
SliderBox QWidget -
widgets/sliderbox.h
+
sliderbox.h
1 click()
- - GroupBox - QGroupBox -
widgets/groupbox.h
- 1 -
GLWidget QWidget @@ -3441,7 +3248,7 @@ padding-right: 8; - actControlTouch + actControlCheck triggered() cmdCheck click() @@ -3488,70 +3295,6 @@ padding-right: 8; - - actUserCommand1 - triggered() - cmdUser0 - click() - - - -1 - -1 - - - 92 - 803 - - - - - actUserCommand2 - triggered() - cmdUser1 - click() - - - -1 - -1 - - - 169 - 803 - - - - - actUserCommand3 - triggered() - cmdUser2 - click() - - - -1 - -1 - - - 243 - 803 - - - - - actUserCommand4 - triggered() - cmdUser3 - click() - - - -1 - -1 - - - 318 - 803 - - - actProgramScroll triggered() diff --git a/src/candle/frmsettings.cpp b/src/candle/frmsettings.cpp index edfca6af..3ca71451 100644 --- a/src/candle/frmsettings.cpp +++ b/src/candle/frmsettings.cpp @@ -12,6 +12,7 @@ #include #include #include +#include class CustomKeySequenceEdit : public QKeySequenceEdit { @@ -518,16 +519,6 @@ void frmSettings::setDrawModeVectors(bool value) ui->radDrawModeRaster->setChecked(!value); } -QString frmSettings::userCommands(int index) -{ - return this->findChild(QString("txtUserCommand%1").arg(index))->toPlainText(); -} - -void frmSettings::setUserCommands(int index, QString commands) -{ - this->findChild(QString("txtUserCommand%1").arg(index))->setPlainText(commands); -} - bool frmSettings::ignoreErrors() { return ui->chkIgnoreErrors->isChecked(); diff --git a/src/candle/frmsettings.h b/src/candle/frmsettings.h index 1248f468..5254fb8f 100644 --- a/src/candle/frmsettings.h +++ b/src/candle/frmsettings.h @@ -8,7 +8,7 @@ #include #include #include -#include "widgets/colorpicker.h" +#include "colorpicker.h" namespace Ui { class frmSettings; @@ -132,8 +132,6 @@ class frmSettings : public QDialog void setGrayscaleSCode(bool value); bool drawModeVectors(); void setDrawModeVectors(bool value); - QString userCommands(int index); - void setUserCommands(int index, QString commands); bool ignoreErrors(); void setIgnoreErrors(bool value); bool autoLine(); diff --git a/src/candle/frmsettings.ui b/src/candle/frmsettings.ui index c0da1c32..fa092539 100644 --- a/src/candle/frmsettings.ui +++ b/src/candle/frmsettings.ui @@ -84,9 +84,9 @@ QSplitter::handle:horizontal { 0 - -1960 + 0 620 - 2487 + 1517 @@ -492,95 +492,6 @@ QSplitter::handle:horizontal { - - - - User commands - - - - - - padding-top: 3; - - - Button 1: - - - 0 - - - - - - - - - - - - - - padding-top: 3; - - - Button 2: - - - 0 - - - - - - - - - - - - - - padding-top: 3; - - - Button 3: - - - 0 - - - - - - - - - - - - - - padding-top: 3; - - - Button 4: - - - 0 - - - - - - - - - - - - - @@ -1315,7 +1226,7 @@ QSplitter::handle:horizontal { ColorPicker QWidget -
widgets/colorpicker.h
+
colorpicker.h
1
diff --git a/src/candle/main.cpp b/src/candle/main.cpp index 5dbf8867..aa5a5890 100644 --- a/src/candle/main.cpp +++ b/src/candle/main.cpp @@ -28,6 +28,8 @@ int main(int argc, char *argv[]) #endif QApplication a(argc, argv); + a.setApplicationDisplayName("Candle"); + a.setApplicationVersion("1.2.10b"); #ifdef GLES QFontDatabase::addApplicationFont(":/fonts/Ubuntu-R.ttf"); @@ -38,6 +40,7 @@ int main(int argc, char *argv[]) glf.setSamples(8); QGLFormat::setDefaultFormat(glf); + // TODO: Use locale from settings QString loc = QLocale().name().left(2); QString translationsFolder = qApp->applicationDirPath() + "/translations/"; QString translationFileName = translationsFolder + qApp->applicationDisplayName() + "_" + loc + ".qm"; @@ -56,7 +59,6 @@ int main(int argc, char *argv[]) if (baseTranslator->load(baseTranslationFileName)) a.installTranslator(baseTranslator); else delete baseTranslator; } - a.setApplicationVersion(APP_VERSION); #ifdef UNIX if (!styleOverrided) foreach (QString str, QStyleFactory::keys()) { diff --git a/src/candle/scriptfunctions.cpp b/src/candle/scriptfunctions.cpp new file mode 100644 index 00000000..9aa715eb --- /dev/null +++ b/src/candle/scriptfunctions.cpp @@ -0,0 +1,41 @@ +#include "scriptfunctions.h" +#include "frmMain.h" + +ScriptFunctions::ScriptFunctions(QObject *parent): QObject(parent), m_frmMain(0) +{ +} + +void ScriptFunctions::setFrmMain(frmMain *f) +{ + m_frmMain = f; +} + +frmMain* ScriptFunctions::getFrmMain() +{ + return m_frmMain; +} + +void ScriptFunctions::sendCommands(QString commands, int id) +{ + m_frmMain->sendCommands(commands, -(100 + id)); +} + +void ScriptFunctions::sendCommand(QString command, int id) +{ + m_frmMain->sendCommand(command, -(100 + id)); +} + +int ScriptFunctions::buttonSize() +{ + return m_frmMain->buttonSize(); +} + +void ScriptFunctions::addAction(QAction *action) +{ + m_frmMain->addAction(action); +} + +void ScriptFunctions::removeAction(QAction *action) +{ + m_frmMain->removeAction(action); +} \ No newline at end of file diff --git a/src/candle/scriptfunctions.h b/src/candle/scriptfunctions.h new file mode 100644 index 00000000..96b24175 --- /dev/null +++ b/src/candle/scriptfunctions.h @@ -0,0 +1,44 @@ +#ifndef SCRIPTFUNCTIONS_H +#define SCRIPTFUNCTIONS_H + +#include +#include +#include +#include + +class frmMain; + +class ScriptFunctions: public QObject +{ + Q_OBJECT +public: + ScriptFunctions(QObject *parent = 0); + + void setFrmMain(frmMain *f); + frmMain *getFrmMain(); + +public slots: + void sendCommands(QString commands, int id = 0); + void sendCommand(QString command, int id = 0); + int buttonSize(); + void addAction(QAction *action); + void removeAction(QAction *action); + +signals: + void responseReceived(QString command, int tableIndex, QString response); + void statusReceived(QString status); + void statusChanged(int state); + void settingsAboutToLoad(); + void settingsLoaded(); + void settingsAboutToSave(); + void settingsSaved(); + void settingsAboutToShow(); + void settingsAccepted(); + void settingsRejected(); + void pluginsLoaded(); + +private: + frmMain *m_frmMain; +}; + +#endif \ No newline at end of file diff --git a/src/candle/widgets/uiloader.cpp b/src/candle/widgets/uiloader.cpp deleted file mode 100644 index 18a76f68..00000000 --- a/src/candle/widgets/uiloader.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "uiloader.h" -#include "styledtoolbutton.h" -#include "sliderbox.h" -#include "colorpicker.h" -#include "combobox.h" - -UiLoader::UiLoader(QObject *parent): QUiLoader(parent) -{ -} - -QWidget *UiLoader::createWidget(const QString &className, QWidget *parent, const QString &name) -{ - // Custom widgets - if (className == "StyledToolButton") { - StyledToolButton *w = new StyledToolButton(parent); - w->setObjectName(name); - return w; - } else if (className == "SliderBox") { - SliderBox *w = new SliderBox(parent); - w->setObjectName(name); - return w; - } else if (className == "ComboBox") { - ComboBox *w = new ComboBox(parent); - w->setObjectName(name); - return w; - } else if (className == "ColorPicker") { - ColorPicker *w = new ColorPicker(parent); - w->setObjectName(name); - return w; - } - - return QUiLoader::createWidget(className, parent, name); -} \ No newline at end of file diff --git a/src/candle/widgets/uiloader.h b/src/candle/widgets/uiloader.h deleted file mode 100644 index 1a270ef7..00000000 --- a/src/candle/widgets/uiloader.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef UILOADER_H -#define UILOADER_H - -#include - -class UiLoader: public QUiLoader -{ - Q_OBJECT -public: - UiLoader(QObject *parent = 0); - - QWidget *createWidget(const QString &className, QWidget *parent = 0, const QString &name = QString()) override; -}; - -#endif \ No newline at end of file diff --git a/src/candleplugins/camera/script.js b/src/candleplugins/camera/script.js index 53b2b56c..1f3a2afe 100644 --- a/src/candleplugins/camera/script.js +++ b/src/candleplugins/camera/script.js @@ -1,3 +1,6 @@ +// TODO: Adapt to new plugin api +script.importExtension("qt.widgets"); + function on_settings_saved() { main.saveValue("camera/name", settings.cboCameraName.currentText); @@ -13,7 +16,7 @@ function on_settings_saved() function on_settings_loaded() { // Load settings - settings.cboCameraName.setItems(ui.camMain.availableCameras); + settings.cboCameraName.addItems(ui.camMain.availableCameras); settings.cboCameraName.currentText = main.loadValue("camera/name"); settings.cboCameraResolution.currentText = main.loadValue("camera/resolution"); settings.txtCameraZoom.text = main.loadValue("camera/zoom"); @@ -28,7 +31,7 @@ function on_settings_loaded() // Update resolutions list var r = settings.cboCameraResolution.currentText; - settings.cboCameraResolution.setItems(ui.camMain.availableResolutions); + settings.cboCameraResolution.addItems(ui.camMain.availableResolutions); settings.cboCameraResolution.currentText = r; // Connect signals/slots @@ -88,7 +91,8 @@ function on_cameraName_changed(name) // Update resolutions list var r = settings.cboCameraResolution.currentText; - settings.cboCameraResolution.setItems(ui.camMain.availableResolutions); + settings.cboCameraResolution.clear(); + settings.cboCameraResolution.addItems(ui.camMain.availableResolutions); settings.cboCameraResolution.currentText = r; } diff --git a/src/candleplugins/camera/settings.ui b/src/candleplugins/camera/settings.ui index 683f9bce..2bc25c25 100644 --- a/src/candleplugins/camera/settings.ui +++ b/src/candleplugins/camera/settings.ui @@ -128,14 +128,14 @@ - + true - + true diff --git a/src/candleplugins/candleplugins.pro b/src/candleplugins/candleplugins.pro index 5789e4cb..79f3383e 100644 --- a/src/candleplugins/candleplugins.pro +++ b/src/candleplugins/candleplugins.pro @@ -1,7 +1,8 @@ TEMPLATE = subdirs TRANSLATIONS = camera/translation_ru.ts \ - test1/translation_ru.ts + test1/translation_ru.ts \ + usercommands/translation_ru.ts qtPrepareTool(LRELEASE, lrelease) for(tsfile, TRANSLATIONS) { diff --git a/src/candleplugins/test1/config.ini b/src/candleplugins/test1/config.ini deleted file mode 100644 index 8af961f2..00000000 --- a/src/candleplugins/test1/config.ini +++ /dev/null @@ -1,4 +0,0 @@ -[General] -title="Test plugin 1" -name="TestPlugin1" -type="panel" \ No newline at end of file diff --git a/src/candleplugins/test1/images/tool.png b/src/candleplugins/test1/images/tool.png deleted file mode 100644 index 506158a3e91c905a7ee03b3862f284463fe6a8b5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 543 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=EX7WqAsj$Z!;#Vf4nJ za0`PlBg3pY5)2HC2R&UJLn`LHogM4NY$(!d-~C!(>Foxm=WW>=jcyt1CVCS-+u>EFPtoVtp#iN9>k z=10pnZ0=!fKXZSXz`D@g`$}sW!sfc_^c5ez5fhaZQJI64AMgMqUI-G{0W>oUZrv=^xvYPx8<@-w z7<{{AP?mdTqsJj`Ui~Rw?{igfKg&~oe8`)3>&)2yhCxpjCfo~7xmU~GsC;JKex|r) zrT8b&iM)SUisyBzr+;K)h+(|%xG+Tf$fEz8Fm39TfWe zimCd_`K?W+zkFG~t(c$1n*C)qXHKmBHLi{6I={{W#pJU=Vq9+mfnw8MEN9tPw`yWm z>!la`f1;TmjGGAOXv1FdraVjGYlEDlJ< zaD(hoC`c?y%mo|73$`~nwWK67FTEISzY - - - - frmMain - - Test plugin 1 - Тестовый плагин 1 - - - - Test1 - - Command: - Команда: - - - Response: - Ответ: - - Test1Settings - - Test param: - Тестовый параметр: - - - \ No newline at end of file diff --git a/src/candleplugins/test1/widget.ui b/src/candleplugins/test1/widget.ui deleted file mode 100644 index 32a1ad85..00000000 --- a/src/candleplugins/test1/widget.ui +++ /dev/null @@ -1,108 +0,0 @@ - - - Test1 - - - - 0 - 0 - 400 - 300 - - - - Form - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - Command: - - - - - - - - - - - - ... - - - - images/tool.pngimages/tool.png - - - true - - - - - - - - - Response: - - - - - - - true - - - - - - - &Send - - - - - - StyledToolButton - QToolButton -
styledtoolbutton.h
-
-
- - - - actPluginTest1Send - triggered() - cmdTest - click() - - - -1 - -1 - - - 383 - 27 - - - - -
diff --git a/src/candleplugins/usercommands/config.ini b/src/candleplugins/usercommands/config.ini new file mode 100644 index 00000000..b29e49dc --- /dev/null +++ b/src/candleplugins/usercommands/config.ini @@ -0,0 +1,3 @@ +[General] +title="User commands" +name="UserCommandsPlugin" \ No newline at end of file diff --git a/src/candleplugins/usercommands/images/axis_return.png b/src/candleplugins/usercommands/images/axis_return.png new file mode 100644 index 0000000000000000000000000000000000000000..c523d6dc0fae8204723f85db9c3c5165466b0199 GIT binary patch literal 741 zcmV(^b8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10%A!-K~!jg?U}u66j2n#e9C}ZZ!%?&D?ri=@CA76pH2ywS*8Im00Xvwqj~e| zwmkB4z#t}I#VeVhBJKbWfPJG7uo@D#n4R!Qekqn`-9JyNMQslv(fIS7~mL?C)-+@Zxp;-YN z!1XHRq1h6e1r{Z#N}{GqXaVR|N#skw&jNFQS4rgSAbUt~`tAb013$vwe0Rgj+xoFZU1KMfiCcedTT!3i;e1k6_`uo8FkHuLQ)qvP;%vp;wnLj3(^b8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H11LR3WK~!jg?U`MORaF$nfBzX{{3=irqfushY62e`B`7lLAr(pt z6#955D>4uf{OBbL^EILuA@wN~1r-d0K+pjh0+~QjvI4WRt4ts0_@IMe%{0r0y$_uZ zd!KXfnRBmq&_67=d)>9pTK}`Z*4{^E##Bbf-A-V#xHkw$S}3Wr*~yeaApuD}z^}m0 z=BHBvW|k|!e!zfn;PE2+R!dRx{lG+uz|lzsgGYd8fYrc@Krhf4uKG+i#IL zpO%`$z;s|3__yE za0vtagzX$SD0Z;k>lnOV)ZZwCD5mXvvVoiIRXE%yns~`xE|0g0FbmA*yVKwylZ9y8QY$K|43fIX^m!BfS&@o zC6Z{kpey3@FmNW|lUqtRVYpy$&OJL|dl6V)PrS+r0G|V|=KR0VOAM!hSIlg* zo?w*@AxWEnEx!2=?(n`9S1uRfCT^2^-puN;2deLZLEK@e8+gaez6OxA8`mp~fycbe z0((?E&Bkzft~&oH@{kE67?o=F@kv$@m`t z`eS*@CmV#MKHO)aR^V;i5ShS@j30n)W_BXit5ro;kpLg#-uN)?`$X{U+)xj+5|X-s t<-j2`yIr?myAUXgsjv#=;y!`9jXQq+-nEE06<`1W002ovPDHLkV1f@g{>A_R literal 0 HcmV?d00001 diff --git a/src/candleplugins/usercommands/images/guard.png b/src/candleplugins/usercommands/images/guard.png new file mode 100644 index 0000000000000000000000000000000000000000..537110db40af5d4b97b8bf77a837806cafed2a3d GIT binary patch literal 1024 zcmV+b1poVqP)7$F)=1i=tJB!Wv&4h?p9Jzs(Wx zP{(+A4@AW8_yb?yOZ=2-Y?O%Dh+UY*J-8d2+f2^lXx8s>Jf(D@kI$R%IQHQ_oJ=X* z*$==e+}buY(*lC|tP9wJTe9AaZI(yLIULV`e#C5^KY^Xti`z?cj-`}#Uo?_Zx=3*n zX_e~Ha=uk7Hd}KAMQDfZVu0FI=To~*E| zD^EqlK^$w>l+s~};}%z8sZAGBO7ju%SrY(d3T+r5d5UUn!J}D0M4Z7dic@X||KM6| z#ny;;4wEHcjViFQY35nF@%_fE-DE-y09DRcq5@51Rzm=nssjCFPA5ag4!~Gbs4;-m zP=SS%(vl$o7)1qIEEo!fMp1!Q4r9BC2dY3Bz+^-Wa`hZJg&1rfjJyJ@0RV&SgG;`N zt0*)o0ObmF+{jifh4MXNqBK5M6e_PiV|EHP2C!NxP<7cFD*&s8LeXH(--b+~D;gxx zD@HGQ7cZ$^w8j7qM#TNgOr%$gDw)Inl+poA;gbrR4gej!(cB-c>Pyb!g(~}Air2gN zYw3BsgYDV=LHyOlcDloVm!Qw%LKi28@yId&yxGOiX}p5#vfVCxtmw*B*&o9CS^%=c zY5dt^<$lI~Z0ZBxt+qMm@HY13-zM<{zU~oc7SD9`-zWH#;$=iH3e4eCJdLX>e7uT} z@K|dF75&gdJ*d*sv)J7;#~KvafcF$V%YOa)7MOkIa$`GQR&=ZDybJiMMX!MXv?Z_u zALJzKBrtgf5rI6Ib|&vGZU0hz?ZnO-vu zl3vU-c~+l;U_}6wz^uc)cpv}vN&Ey}#0^7Eiw$2vIJNPC|uh!pMm3Cfa6jj0q|pcYk0d@BKbqWL*TKt zTvZi#JM54$cSv(;O>8zO@l^-hkNBU>>1PakoUoir0AMCiR`Vq$f5q^hO91sZAK*Nb zM}S*~qZLXT;Q@bWiAEo>A_8=q2b^<@zymdvwl1mM zZX1`ZT)y9ADLGAC#a#+aY}D^>{1{D!W_r0RKx1?RzNZJNfQyFhrHHHtl}vzhZrnNd z6hFnC>6!ERN`rEIXXdB%e`OT)Udv9#|DH0UU_fHbvxXK~i6V zJHT-fxh5iO1^oq~TsI@;4nDV-F^Z#xtti;bd&Bm7Axiba;%em-6ySwn3r{JB z4;EJ|r=S4O4BI*9oHa%mDk#Tu#w9B!TLAILQdXnBfeVG$)q@Mfr`oF$IBJtL5VEF} z*PU~<#ye;6r9Q@3Gl?Qoy2cf4=b+XIYwdS;*qkvROzxfzOyQ2NsOG!;%Re% z8~F9LeoO#2Q|@a5H;GSockwxdkwMudD%u(Y4&rBM{q0~5Kha2YJSf>muDwTPBc$7TSUMs?dymUUg!t(`m}vbc wGy5M+RV_d)VB0>M8+Pn(jy6r8X|!H|Z$DFr&pnb+YybcN07*qoM6N<$f~V6VH2?qr literal 0 HcmV?d00001 diff --git a/src/candleplugins/usercommands/images/num2.png b/src/candleplugins/usercommands/images/num2.png new file mode 100644 index 0000000000000000000000000000000000000000..462769493b1e7166bcf91ca58c1999efac135d90 GIT binary patch literal 1447 zcmV;Y1z7rtP)Q1sMil8Y;s%BA*Z7Nhm5^2plF6PEg z=bbxm=FYtLDw6}VxpVLN|IdH!ocl3%L{+J>?P@oHcH52s?IzG}>u5EghzPI;=yeys zWnc}ssx3}R(ri2t83djNMt}jJ2fy(D5Q(u0oCVIP>V>BAYlZ+KG7LNi90Tqv=xzm= z15T^zH$}PCnW~m{0Ykt%piR2wfuT}4mlSwEFavBgG5GCk%VG8376JfMz-G=Mt^td{ zSMFMLWqEvT0#j`h0O$f{GZ3u-3r?s(pfkm1r>isN+SD@mp9Q*FDge+2oNqvE2^a@@ z3W(g}d@MDHgz#1 zB16D;)bAU-t*Wnj8>X0u>;@hI4!CO%@H4OsEUM~CpxEeHqWm)5grH-+L|_>3K3x0a5Nqe{1YyqS|actfe(N;fX{#%hA7|W6`W}8 zkmS9bO8}x3ne|k1FKmF14PWm9yA$;u0)97Mks~?rdOW>rFpmHy4F?N(gLl4uO+5XJ z$>3vkUodbd0x%a0KPRoazHRXlqioJo*J~nj5ZDLEb`fw+Rj+%Rd~K8s=f%b5YQ^Lg zV8AGw4)+??T?4oD5y^4&Wg0IMAC??{x$B znE<>_!_N)eE_iAV0QMSf4FvkL_89kO$pQO}vNf~&lw=}uC(#VB zlbiVhU`|z61KnDj>teG6=rPKE3nbCd+}hxC;Ne(tjpzx!RKT^xxh}T0ejF8%yMQl& zClj}J0WYiSm1c9WzR_Ja%6g5mLM9^j0$%_R8n>ra_0xh77U%ld+K~i-Bfyme#&+_1 zt0as}Nw6iuV8Z`XL<^mo5&UZt{2v(_?~ zth&A=Xbn9_J#{mgh)fVIf`psNSBb{{qpCVn#DBspuI6y+6X2{-b}W>Qh&&IxLlkg) zoWBY@rm7ZR5wp137&*F7=yLb~@E7&V+=~Rx@*3dfS`M2>RaEtYh^%ny=?(!#f%h{$ zg>8F}Xf5!cd!l##BVZ&tGL&koIeW+`xAroC74;ppNl~)!mKgA;;Un)gmjf^NmRQv6ozo%gZS3icq*hxffc4pY ziw1|P8Xl7qks07cK>Cz^n_|2l#G$9?ortU>1rO9PKZ$53P)oVJzWo2p9@(aw(bF`6rm-YI(*&BvMKd*&v=-P1YyfTt zE>A^jmiPxa27C`3wLLPUvusaUfR(_0zzeMG2Ubq&-!#r|1x|E;GqWuxfUUC<0N4Ud zbbu3cEfc_&3lacW0gQG4`S~iNz>1i!?IyuDfi;o(zkv6Fqrh)%&TR^Pgh_fQa7C$Y z4Z)`;D`!RS{&HZPs)~nz-svWlrVG%UaV_&72bP!ZV{yO+s`0@YV2ACo3%e=xBjdP( zz`2MXf^U_|GWsKR2WGskb^tQ22O>=s-(mvX5~({hS5gfi#<}8KOn}(L_{W^-)Q=eF zif>(?3oHrHG=Zkk^#aT|9iA^px)j(9tOIV&IE(^c+y1t0KD7!UX*=!1Y$S~U&)NR0 zE>5)#0ZAVK9|G4+Vb%wHD(S6SNKumjl3oTL$^T}*E|}!UIiF`FJzod6#0~n;$ zVSpbA!(lHlTxv70N7Aa){OafdJG1MkQ1=dSr|p+)zW}TUJ}I;dxD0qKHMyh$ND}Zc zlXu_1Dd1V#6S%fV(o{0Ews2f_9^fpHJO+Ty5Fkf!1y~JyCF%au zM4B1`5LSa>LU&(Bh!-x&+IoOxzm&^VL%_8J0eXO|f!)9x zskn5^0}OGrJ_P(K={tgx8wsgzF)S9a z*LKqPlF3&A+e5(XR72h?344$Rn9Tc&HphThQuC`T4%h>{&E%dV2+rmuNB)%PW5VX9 zbE%2dB7p4)+q(%%;8c^^N#H@-+ijn!gIlekuNnn2Tt32;7AcU5X42@vC4@hv96@krgKIn${hG0qj=VgekF)D2|c z3oHm^Tn8deRo}XOt866>uzg0-K44d=sUP@B(n8!U4X`izaJ7w!U9(+&s;<<%A50WP z=-y9e3L-4(kEWD4IV~3JXLBY literal 0 HcmV?d00001 diff --git a/src/candleplugins/usercommands/images/num4.png b/src/candleplugins/usercommands/images/num4.png new file mode 100644 index 0000000000000000000000000000000000000000..9ad975039bb835e699aef790eeaaa3b58714b0a1 GIT binary patch literal 951 zcmV;o14#UdP)tRFxuAvKC-X(*SD$*0fZ6posJU`+;6yAFwf$s2Z6AUI8zG2~~Yp z)mf^#WC1#XQ9xH&83j5k=2s#40bsfTlBu;!0|PY~0Q3Xp21ugbQU>~$WdP6tOf`V` zl`2y}hcDN~2EnU9w)dnEd zI_9a$<>oVBwoW61|Lyo0TF2>S*U0wnexiO3~(|=`%4k)3b+jH z<^OzN0)|!fbENhcCAa}1atJu@gm0_rqtI z@M+HF<}=`}CuX*KTL(VPx!imPyzs;Z)BOUgf>i6Erz)RY(La^V-3O@ZtcZ*Nr<|%j z;Ejl^#*d`|MpV`Pe75r zSlC7^{eU1TY;3LkAR>xbXeV}JqlKWLX;e~)3fd$&6)iMIy=Sp|xy{_{-R))9yCwO< zgEwzy-^cEonYS}5Gb7LFXte_?#kzVOBn<*v{(~<*81UZA=Hh#pRT0n$TmXupl2+4O zVASiY$N3&$x(%H6(e*|GxY`De)}qna0Dx^ksSTX0nNCrk-9bD8$dTOy?gM{Fh5_J8 z$bSWnC%hk^0Gt8#M`VMNddmab4WQqn2a>j?Z7cNvBn<(t2nxd`F>n-k zEopn2_EHT%QU`Dg=#J^K5xAYE%|>RSN0Lg8Y{tw^0Z8ft?uGIKFkDC9h@|JhLfD=( zv!|i1(*$oSicPhYH4?x9kF3k#4>q7DioFqjbA;cKR9Eh2p+?@o3E;OQD@OQvU@YVd zz%^if4Sfs1IItMDUqr6m0G>Gghk%J#ZO%9G1l8Z5UB2y%I0DXkbVO-9p}xZ&9sA1H zvq+&!z(wG%BmV`QH?yhgTbf7ewUC*WfJsR&snkN>fnhUym$tnu2l0mp|1%5cVU^56 z&0>biHjO(TQbU%Xl#47+qfD@tLU9PI&O2fAvzZ;q!cLZBpqom~Gn+^5j02q4Qe zYXmjzyBFs@ea0l+CHeV4v?7(HuGpUOC;-Pi@`|5M<+qF0pTN|kV$^3hh2BtIkGC5x zFKc<~?*W3{ZK$7p#hftgZ16F29kY(4bFU00000NkvXXu0mjf=ox=( literal 0 HcmV?d00001 diff --git a/src/candleplugins/usercommands/images/run.png b/src/candleplugins/usercommands/images/run.png new file mode 100644 index 0000000000000000000000000000000000000000..b94ec65192582a30e9de3cd40ec2338d09208cd9 GIT binary patch literal 928 zcmV;R17G}!P)aObU8I#0JMnlmKWW|gpFsG=F&8!JH2y6vLfk%?=CN?A~cL6$pw}3)& z2WU=Ys{rR)fR7I6r{r1^dqw2HaiF!z^TTGgIj*rH2y}ST0sez3R0M%OPdWft)|J@I z+JHvD2m%uI`(4tAnY92zMCZYEN!_s>$XHSK0Fy*lluG#xoGcUaRz_2gfSD}>27q-5 zo8AMC0>6Mmzz*OC@IX>;Vn;GW{{rzM?~*UTJ}>J^hLv<80|60Cy^FxSTnP{)>`=&= zVPH8hKO~(oh&;pjuRfE-%ahg zeygl|AcpRgZ1bMP4(FSJ&ovww1=`B`n`1iv0Vw4$g-!u0Yv`PjGy))LpnPmxL$IZ& z6jl6xA!(wTQC|cW$Iv-uX7?pM2aq%f3})@v*NN;;44th&znPseGjGMi7lHAZdUJtu zK%bdy^3icUN8mQWp~Z!5z!Nh&ZDy9G<9d$36<`B!Gono+aGqe>of`EVfs&+QNnOBx zf-|rSneriaV>4?9mX+I-Lci^fCjWvXsn^Ul0uO-gA-z&UpQoWF0W&KBy};gtwx^A* zq%kx5>d?zXAkGxpL~`fB?U*ZJ>rP;WN85!EcuMfzCMjG=>zzQ&9FX+Q%yt4@1p9QW z5F)MzfQJrq`4a$;^pc=v*8`c#Xx?w93&{bWm?aQK-ULP+_u_2DBat_OOTbvg^$khR z1ASa%{z8+uL$g)DZs0w^H-X7a_VOm+8?#?2i^gC6;C!Ad?i4Hl0000(^b8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H10hUQbK~!jg?U}Jk!%!54zavE)#6fU#5sHIrpP?WMPC9fI(Xq2{ z&`lR7hc1GHpbph{aC3BZ>>#3bC{=PC+MuZ9UUP4}iQFH4NXWUI{|m{TifDK>|m@hohSTDeZsva3DRW;MVI-r5PYRYHx2(4Mv6s0XwfepZ! zhah=%Z7L9(51EMU0-L~`hfp?p1df4ARZX%AtpLib|360aN}q z2%mZcG)n;hG=RY`!lxbpji3NP9q8u>pSlm!Ljqhmgin3rlEHN=vFNxSVA^G|>sDeL z*av1O=gYv7Va+{oH#vR)4xAGBm;|35sjQD!>O-GBE593!0HGBDLMsAC5^4iZgz+WrA b#G&;LDmWy#2oX^j00000NkvXXu0mjfOz+ay literal 0 HcmV?d00001 diff --git a/src/candleplugins/usercommands/images/search_for_z.png b/src/candleplugins/usercommands/images/search_for_z.png new file mode 100644 index 0000000000000000000000000000000000000000..eeaf93d9cb952c441a98651f449c29f001f49bbe GIT binary patch literal 1250 zcmV<81ReW{P)(^b8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H11Yb!+K~!jg)tOI-S5*|pKgapyI3+kEh&BqTixxFRh*}LeBg!Cd z1{Wb^3kO9PgHRB*a5XKfT`k%)kbxECriC<$M1iS`nngrJiDO_tvXL-It?}oa7We$d z`@8e*y!+noRWk=JbKkq?e81;=|INMcC#uR)wq^f!0`1z87f`DLL_|7(=YS`GUMs7C z-+{W7?}1CIdcO+JIaAeA1rT5uI0@VYG@;xy|6xGNa<}ABGWj83GBN2`nFNN~6(B`+ zArV;*j01Zzn(qOZf$P8x-1J!utOYgz&jJr+#GM5WtLiVwiTGBa*SF*5a@dpSfP+9! zPJEB~oy)+e1Ka<#DFo~X?gpfnfx(hfaM0p?yt}~u$^`%ez>G(94>(rI0)%6R*TkLy z1}YN(Yy_q~f?HIu@B)q@!)0AF}zA}=9ehvEA>)UtL3 z917;>NJ4LpWh_ty#u8#jf|x_41pr;R?XU@UI&nIb7GUwGy_oAjS6)o)EHnzNw|WCO z5%H_qP8c7?KbjX16L7$*kE`mBZ6=mv#xowtBh%&y5RnbQ7Vp)2?Wb1Ae7-G~Pt>wT zVA!i)Q`N64Nh{He?^-0Ed6p$$n^*s|f}F~j&$}(^MYe!muYRSHbc&nL+Z**FU%-t@ z(kX5}Z(#xJy!vmIq*L5{-gQwgvIX4s>JO)|iO4e|G6w97xa<^>F%juc!3%hAN4?0t z6W4*qtiCpp@Cb0&>Wu)mfjd4A0*?Y06YzZA`a+IbBj5)tIDDSHf=f)9-zhbFe-U^! z5zpr>EMUs352UcE>Yuo4<|SOREzS0RkNKsT&pQ?MGV<_1wVT!pMt6a;{Yu~~VAkSi z?RjMZjBZ*lP`elMpLeMjks9t&(QU6rRP|&iTtvEor!)Gb3wRUg1HJ=Z!(A6cn^M)E zGjICcoEkVhemCMMNsuBeZ@o zXqL}`{(_13TU^R6^;zD!D?%*5>$GmK&2klZ3)lrb4y>}6Rrb8g+OKBBX5l4|M46%Q z4|a@Lxu4*3!SK$M717Qd-beW#IVOR99@Yv=vapCMc9KoN%edXCjywPR#0`6Y-uyO2 za8gAquT(%rA|1GUY@hw@C=i<>qUD=u(^b8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H11P4h(K~!jg?U_$#9aR*@e<#r>k=9s?DWzx@3R-oc)rAWFTg0@L z5^50y3k41F-=bA4n1YM8T8(MJ+Shz8 z?w!8teKT+7<)t$Q`oV=c-#v5Yd~fc(bI*MyiMfo9suO4zrvy}uIWOR}W}Rj>A9w<| z9;+JoPiM68I!?T^1T;2v`)^)3_lNV-y(l*9U+BNe6+wkzbFQEli9u1T2i~ zUnLz22{Rj_K2MGSDB&VI0uDv? zdC7&DtpHvR`tFgmGxEP6CFY5xw~Pk|si;tnKulxS@1Q z#BTy_GqX=|Tk1u?mB2N?8IkX9U}GG(L4cWEMtyvqUm&?9W_F{$J_3B>hfRo=Qj$;5 z2dv9^#vb5SNrxMHqH=FD#Y(+qZA%n$ebDz0@Hp^Q!C1$Ew}GC_5;c0*#4HHd8^s*< z{4{V^zz+cL;g;FS;QnK{nt2#lnp58E^g0yd-+^6P;|bBg^1zFA9$1Sx?=+DLw+ z)gzX6Th^J)_8BC<9q6cBfEUpP>}nzTT|iga$!7}iBIe=N?!4s3fq7LV-&BAX(Tl5y zGFKd+x2ohNHQ!1|+7I;OO1u~cfPU{&8FKeRa;4pJU@D-efaR)}ebu4xSc98z`;`gc z<|>Cx*vuza2>u+uQ;mC_%8)C-pVzDb?!$d4%fJ-yj--)X&jLed742^?X4+P?wF-G; zZG+3e>O6-c0=CUUA~VH~JcmM)*v#(6&4c-~kW>-;0lWcxtegZ}T7~|PnDhS=pAt|t c=DdJ^0cz`i=9HfCrvLx|07*qoM6N<$f{gAH 0) { + t.insertRow(r - 1); + for (var i = 0; i < 3; i++) { + t.setItem(r - 1, i, t.takeItem(r + 1, i)); + } + t.removeRow(r + 1); + t.setCurrentCell(r - 1, c); + } + t.setFocus(); +} + +function onCmdDownClicked() +{ + var t = uiSettings.tblButtons; + var r = t.currentRow(); + var c = t.currentColumn(); + + if (r < t.rowCount - 1) { + t.insertRow(r + 2); + for (var i = 0; i < 3; i++) { + t.setItem(r + 2, i, t.takeItem(r, i)); + } + t.removeRow(r); + t.setCurrentCell(r + 1, c); + } + t.setFocus(); +} + +function onAppSettingsLoaded() +{ + buttonSize = app.buttonSize(); + + var b = settings.value("buttons"); + + restoreButtonsTable(b); + updateButtons(); + updateActions(); +} + +function onAppSettingsSaved() +{ + settings.setValue("buttons", storeButtonsTable()); +} + +function onAppSettingsAboutToShow() +{ + storedButtons = storeButtonsTable(); +} + +function onAppSettingsAccepted() +{ + updateButtons(); + updateActions(); +} + +function onAppSettingsRejected() +{ + restoreButtonsTable(storedButtons); +} + +function onAppStatusChanged(status) +{ + var t = uiSettings.tblButtons; + var lay = uiPanel.verticalLayout.layButtons; + + for (var i = 0; i < t.rowCount; i++) { + lay.itemAt(i).widget().setEnabled(status != -1); + } + + for (var i = 0; i < storedActions.length; i++) { + storedActions[i].setEnabled(status != -1); + } + + appStatus = status; +} + +function onButtonClicked(button) +{ + app.sendCommands(uiSettings.tblButtons.item(button, 2).data(Qt.DisplayRole)); +} + +function storeButtonsTable() +{ + var t = uiSettings.tblButtons; + var b = new Array(); + + for (var i = 0; i < t.rowCount; i++) { + var q = new Array(); + for (var j = 0; j < 3; j++) { + q.push(t.item(i, j).data(Qt.DisplayRole)); + } + b.push(q); + } + + return b; +} + +function restoreButtonsTable(b) +{ + var t = uiSettings.tblButtons; + t.rowCount = 0; + + if (b) { + for (var i = 0; i < b.length; i++) { + t.insertRow(t.rowCount); + for (var j = 0; j < b[i].length; j++) { + var q = new QTableWidgetItem(); + q.setText(b[i][j]); + if (j == 1) { + c = new QIcon(pluginPath + "/images/" + b[i][j]); + q.setData(Qt.DecorationRole, c); + } + t.setItem(t.rowCount - 1, j, q); + } + } + t.verticalHeader().setFixedWidth(t.verticalHeader().sizeHint.width() + 11); + } +} + +function updateButtons() +{ + var t = uiSettings.tblButtons; + var lay = uiPanel.verticalLayout.layButtons; + var k = lay.count(); + var c = t.rowCount; + + // Delete buttons + for (var i = 0; i < k; i++) { + var w = lay.takeAt(0).widget(); + w.deleteLater(); + } + + lay.update(); + + // Create new buttons + function onClicked(i) + { + return function() {onButtonClicked(i)}; + } + + for (var i = 0; i < c; i++) { + var w = new StyledToolButton(); + w.minimumWidth = buttonSize; + w.minimumHeight = buttonSize; + w.sizePolicy = new QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed); + w.iconSize = new QSize(buttonSize * 0.8, buttonSize * 0.8); + + w.icon = t.item(i, 1).data(Qt.DecorationRole); + w.toolTip = t.item(i, 0).data(Qt.DisplayRole); + w.clicked.connect(onClicked(i)); + + w.enabled = (appStatus != -1); + + lay.addWidget(w, i / 4, i % 4); + } + + if (c < 4) { + for (var i = c; i < 4; i++) { + var w = new StyledToolButton(); + w.minimumWidth = buttonSize; + w.minimumHeight = buttonSize; + w.sizePolicy = new QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed); + w.enabled = false; + lay.addWidget(w, i / 4, i % 4); + } + } + + lay.update(); +} + +function updateActions() +{ + var t = uiSettings.tblButtons; + + function onTriggered(i) + { + return function() {onButtonClicked(i)}; + } + + var l = storedActions.length; + var n = t.rowCount; + + for (var i = n; i < l; i++) { + var a = storedActions.pop(); + app.removeAction(a); + a.deleteLater(); + } + + for (var i = l; i < n; i++) { + var a = new QAction(qsTr("User button") + " " + (i + 1), uiPanel); + a.objectName = "actUserCommandsButton" + (i + 1); + a.triggered.connect(onTriggered(i)); + storedActions.push(a); + app.addAction(a); + } + + for (var i = 0; i < storedActions.length; i++) { + storedActions[i].setEnabled(appStatus != -1); + } +} + +// Icon cell delegate +function IconDelegate(parent) +{ + QStyledItemDelegate.call(this, parent); +} + +IconDelegate.prototype = new QStyledItemDelegate(); + +IconDelegate.prototype.createEditor = function(parent, option, index) +{ + var d = new QDir(pluginPath + "/images"); + var l = d.entryList(QDir.Filters(QDir.Files)); + var b = new QComboBox(parent); + + for (var i = 0; i < l.length; i++) { + q = new QIcon(pluginPath + "/images/" + l[i]); + b.addItem(q, l[i]); + } + + return b; +} + +IconDelegate.prototype.setEditorData = function(editor, index) +{ + editor.currentText = index.data(); +} + +IconDelegate.prototype.setModelData = function(editor, model, index) +{ + model.setData(index, editor.currentText); + model.setData(index, editor.itemIcon(editor.currentIndex), Qt.DecorationRole); +} + +IconDelegate.prototype.updateEditorGeometry = function(editor, option, index) +{ + editor.geometry = option.rect(); +} + +IconDelegate.prototype.paint = function(painter, option, index) +{ + var q = index.data(Qt.DecorationRole); + + if (q) { + q.paint(painter, option.rect()); + } + + if (option.state() & QStyle.State_HasFocus) { + var p = new QPen(); + p.setStyle(Qt.DotLine); + painter.setPen(p); + painter.drawRect(option.rect().adjusted(1, 0, -2, -1)); + } +} + +// Code cell delegate +function CodeDelegate(parent) +{ + QStyledItemDelegate.call(this, parent); + + this.alignment = Qt.AlignCenter; + this.adjustHeight = false; +} + +CodeDelegate.prototype = new QStyledItemDelegate(); + +CodeDelegate.prototype.createEditor = function(parent, option, index) +{ + var b = new QTextEdit(parent); + + return b; +} + +CodeDelegate.prototype.setEditorData = function(editor, index) +{ + editor.plainText = index.data(); +} + +CodeDelegate.prototype.setModelData = function(editor, model, index) +{ + model.setData(index, editor.plainText); +} + +CodeDelegate.prototype.updateEditorGeometry = function(editor, option, index) +{ + var r = option.rect(); + + if (this.adjustHeight) { + var t = this.parent(); + r.setTop(0); + r.setHeight(t.height - t.horizontalHeader().height - t.frameWidth * 2); + } + + editor.geometry = r; +} + +CodeDelegate.prototype.paint = function(painter, option, index) +{ + var q = index.data(); + + if (q) { + var m = new QFontMetrics(option.font()); + var r = option.rect().adjusted(4, 4, -4, -4); + var l = q.split("\n"); + var n = l.length; + var k = Math.min(parseInt(r.height() / m.lineSpacing()), n); + var s = ""; + + for (var i = 0; i < k; i++) { + if ((i == (k - 1)) && (k < n)) s += "..."; else s += l[i]; + if (i < (k - 1)) s += "\n"; + } + + painter.drawText(r, this.alignment | 0, s, r); + } + + if (option.state() & QStyle.State_HasFocus) { + var p = new QPen(); + p.setStyle(Qt.DotLine); + painter.setPen(p); + painter.drawRect(option.rect().adjusted(1, 0, -2, -1)); + } +} \ No newline at end of file diff --git a/src/candleplugins/usercommands/settings.ui b/src/candleplugins/usercommands/settings.ui new file mode 100644 index 00000000..cd7d9afd --- /dev/null +++ b/src/candleplugins/usercommands/settings.ui @@ -0,0 +1,133 @@ + + + UserCommandsSettings + + + + 0 + 0 + 755 + 445 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 400 + + + + Qt::ScrollBarAlwaysOff + + + QAbstractScrollArea::AdjustToContents + + + QAbstractItemView::NoSelection + + + 1 + + + true + + + 100 + + + + 0 + + + + + Hint + + + + + Icon + + + + + G-code + + + + + + + + + + Up + + + + + + + Down + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Add + + + + + + + Remove + + + + + + + Remove all + + + + + + + + + + diff --git a/src/candleplugins/usercommands/translation_ru.qm b/src/candleplugins/usercommands/translation_ru.qm new file mode 100644 index 0000000000000000000000000000000000000000..7a47b9b3bee97fbead23e84ed0f9bed095af409c GIT binary patch literal 766 zcmcE7ks@*G{hX<16=n7(EZlq7iGhJ3fPsPa00RT#7X}9RB|yF(1IxC1K)Q>8hLn16R-Nn34igCj!#voS&PUn3qxn z1hmJ3#T>4O#U;NSY&dRBTnz3Exr%)=rM)MUWo4z$+_q0uuL5*E0f%g3V3Vgl4?jTSm=L8-aAD zF-Ab=BOJ~JF+?FTCkMatxqu;U1dL?|7FW3AnL-QjYcjx_P=EmlPAGOPHsAm?Vey6= o%?nN{$ + + + + + User button + Пользовательская кнопка + + frmMain + + User commands + Пользовательские команды + + + + UserCommandsSettings + + Hint + Описание + + + Icon + Значок + + + G-code + G-код + + + Up + Вверх + + + Down + Вниз + + + Add + Добавить + + + Remove + Удалить + + + Remove all + Удалить все + + + \ No newline at end of file diff --git a/src/candleplugins/test1/settings.ui b/src/candleplugins/usercommands/widget.ui similarity index 60% rename from src/candleplugins/test1/settings.ui rename to src/candleplugins/usercommands/widget.ui index 468f97e7..2a1ae65c 100644 --- a/src/candleplugins/test1/settings.ui +++ b/src/candleplugins/usercommands/widget.ui @@ -1,19 +1,19 @@ - Test1Settings - + UserCommands + 0 0 - 400 - 300 + 380 + 146 Form - + 0 @@ -27,14 +27,7 @@ 0
- - - Test param: - - - - - + diff --git a/src/candle/widgets/colorpicker.cpp b/src/designerplugins/customwidgetsplugin/colorpicker.cpp similarity index 100% rename from src/candle/widgets/colorpicker.cpp rename to src/designerplugins/customwidgetsplugin/colorpicker.cpp diff --git a/src/candle/widgets/colorpicker.h b/src/designerplugins/customwidgetsplugin/colorpicker.h similarity index 87% rename from src/candle/widgets/colorpicker.h rename to src/designerplugins/customwidgetsplugin/colorpicker.h index 0e9b533e..ff723aca 100644 --- a/src/candle/widgets/colorpicker.h +++ b/src/designerplugins/customwidgetsplugin/colorpicker.h @@ -6,8 +6,9 @@ #include #include #include +#include "customwidgetsshared.h" -class ColorPicker : public QWidget +class CUSTOMWIDGETS_DLLSPEC ColorPicker : public QWidget { Q_OBJECT Q_PROPERTY(int colorInt READ colorInt WRITE setColorInt); diff --git a/src/designerplugins/customwidgetsplugin/colorpickerplugin.cpp b/src/designerplugins/customwidgetsplugin/colorpickerplugin.cpp new file mode 100644 index 00000000..9f2a9cf0 --- /dev/null +++ b/src/designerplugins/customwidgetsplugin/colorpickerplugin.cpp @@ -0,0 +1,75 @@ +#include "colorpickerplugin.h" +#include "colorpicker.h" + +ColorPickerPlugin::ColorPickerPlugin(QObject *parent): QObject(parent), m_initialized(false) +{ + +} + +void ColorPickerPlugin::initialize(QDesignerFormEditorInterface *core) +{ + if (m_initialized) return; + + m_initialized = true; +} + +bool ColorPickerPlugin::isInitialized() const +{ + return m_initialized; +} + +QWidget *ColorPickerPlugin::createWidget(QWidget *parent) +{ + return new ColorPicker(parent); +} + +QString ColorPickerPlugin::includeFile() const +{ + return QStringLiteral("colorpicker.h"); +} + +QString ColorPickerPlugin::name() const +{ + return QStringLiteral("ColorPicker"); +} + +QString ColorPickerPlugin::group() const +{ + return QStringLiteral("Custom widgets"); +} + +QIcon ColorPickerPlugin::icon() const +{ + return QIcon(); +} + +QString ColorPickerPlugin::toolTip() const +{ + return QString(); +} + +QString ColorPickerPlugin::whatsThis() const +{ + return QString(); +} + +bool ColorPickerPlugin::isContainer() const +{ + return false; +} + +QString ColorPickerPlugin::domXml() const +{ + return "\n" + " \n" + " \n" + " \n" + " 0\n" + " 0\n" + " 100\n" + " 100\n" + " \n" + " \n" + " \n" + "\n"; +} \ No newline at end of file diff --git a/src/designerplugins/customwidgetsplugin/colorpickerplugin.h b/src/designerplugins/customwidgetsplugin/colorpickerplugin.h new file mode 100644 index 00000000..fa57ac25 --- /dev/null +++ b/src/designerplugins/customwidgetsplugin/colorpickerplugin.h @@ -0,0 +1,25 @@ +#include + +class ColorPickerPlugin: public QObject, public QDesignerCustomWidgetInterface +{ + Q_OBJECT + Q_INTERFACES(QDesignerCustomWidgetInterface) + +public: + explicit ColorPickerPlugin(QObject *parent = 0); + + bool isContainer() const override; + bool isInitialized() const override; + QIcon icon() const override; + QString domXml() const override; + QString group() const override; + QString includeFile() const override; + QString name() const override; + QString toolTip() const override; + QString whatsThis() const override; + QWidget *createWidget(QWidget *parent) override; + void initialize(QDesignerFormEditorInterface *core) override; + +private: + bool m_initialized; +}; \ No newline at end of file diff --git a/src/designerplugins/customwidgetsplugin/customwidgets.h b/src/designerplugins/customwidgetsplugin/customwidgets.h new file mode 100644 index 00000000..1e92a19c --- /dev/null +++ b/src/designerplugins/customwidgetsplugin/customwidgets.h @@ -0,0 +1,4 @@ +#include "colorpicker.h" +#include "slider.h" +#include "sliderbox.h" +#include "styledtoolbutton.h" \ No newline at end of file diff --git a/src/designerplugins/customwidgetsplugin/customwidgetsplugin.cpp b/src/designerplugins/customwidgetsplugin/customwidgetsplugin.cpp new file mode 100644 index 00000000..a7170577 --- /dev/null +++ b/src/designerplugins/customwidgetsplugin/customwidgetsplugin.cpp @@ -0,0 +1,18 @@ +#include "customwidgetsplugin.h" +#include "colorpickerplugin.h" +#include "sliderplugin.h" +#include "sliderboxplugin.h" +#include "styledtoolbuttonplugin.h" + +CustomWidgetsPlugin::CustomWidgetsPlugin(QObject *parent): QObject(parent) +{ + widgets.append(new ColorPickerPlugin(this)); + widgets.append(new SliderPlugin(this)); + widgets.append(new SliderBoxPlugin(this)); + widgets.append(new StyledToolButtonPlugin(this)); +} + +QList CustomWidgetsPlugin::customWidgets() const +{ + return widgets; +} \ No newline at end of file diff --git a/src/designerplugins/customwidgetsplugin/customwidgetsplugin.h b/src/designerplugins/customwidgetsplugin/customwidgetsplugin.h new file mode 100644 index 00000000..8589a29d --- /dev/null +++ b/src/designerplugins/customwidgetsplugin/customwidgetsplugin.h @@ -0,0 +1,16 @@ +#include + +class CustomWidgetsPlugin: public QObject, public QDesignerCustomWidgetCollectionInterface +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface") + Q_INTERFACES(QDesignerCustomWidgetCollectionInterface) + +public: + CustomWidgetsPlugin(QObject *parent = 0); + + QList customWidgets() const override; + +private: + QList widgets; +}; \ No newline at end of file diff --git a/src/designerplugins/customwidgetsplugin/customwidgetsplugin.pro b/src/designerplugins/customwidgetsplugin/customwidgetsplugin.pro new file mode 100644 index 00000000..1b878659 --- /dev/null +++ b/src/designerplugins/customwidgetsplugin/customwidgetsplugin.pro @@ -0,0 +1,29 @@ +CONFIG += plugin +TEMPLATE = lib +QT += widgets uiplugin multimedia multimediawidgets + +TARGET = customwidgets + +DEFINES += CUSTOMWIDGETS_EXPORT + +HEADERS += colorpicker.h \ + slider.h \ + colorpickerplugin.h \ + sliderplugin.h \ + sliderbox.h \ + sliderboxplugin.h \ + styledtoolbutton.h \ + styledtoolbuttonplugin.h \ + customwidgetsplugin.h + +SOURCES += colorpicker.cpp \ + slider.cpp \ + colorpickerplugin.cpp \ + sliderplugin.cpp \ + sliderbox.cpp \ + sliderboxplugin.cpp \ + styledtoolbutton.cpp \ + styledtoolbuttonplugin.cpp \ + customwidgetsplugin.cpp + +FORMS += sliderbox.ui \ No newline at end of file diff --git a/src/designerplugins/customwidgetsplugin/customwidgetsshared.h b/src/designerplugins/customwidgetsplugin/customwidgetsshared.h new file mode 100644 index 00000000..7263417c --- /dev/null +++ b/src/designerplugins/customwidgetsplugin/customwidgetsshared.h @@ -0,0 +1,5 @@ +#ifdef CUSTOMWIDGETS_EXPORT +#define CUSTOMWIDGETS_DLLSPEC Q_DECL_EXPORT +#else +#define CUSTOMWIDGETS_DLLSPEC Q_DECL_IMPORT +#endif \ No newline at end of file diff --git a/src/candle/widgets/slider.cpp b/src/designerplugins/customwidgetsplugin/slider.cpp similarity index 96% rename from src/candle/widgets/slider.cpp rename to src/designerplugins/customwidgetsplugin/slider.cpp index 5620c9a2..479aa1b3 100644 --- a/src/candle/widgets/slider.cpp +++ b/src/designerplugins/customwidgetsplugin/slider.cpp @@ -1,4 +1,4 @@ -#include "widgets/slider.h" +#include "slider.h" Slider::Slider(QWidget *parent) : QSlider(parent) { diff --git a/src/candle/widgets/slider.h b/src/designerplugins/customwidgetsplugin/slider.h similarity index 81% rename from src/candle/widgets/slider.h rename to src/designerplugins/customwidgetsplugin/slider.h index fd54daeb..192fa187 100644 --- a/src/candle/widgets/slider.h +++ b/src/designerplugins/customwidgetsplugin/slider.h @@ -6,8 +6,9 @@ #include #include #include +#include "customwidgetsshared.h" -class Slider : public QSlider +class CUSTOMWIDGETS_DLLSPEC Slider : public QSlider { Q_OBJECT public: diff --git a/src/candle/widgets/sliderbox.cpp b/src/designerplugins/customwidgetsplugin/sliderbox.cpp similarity index 100% rename from src/candle/widgets/sliderbox.cpp rename to src/designerplugins/customwidgetsplugin/sliderbox.cpp diff --git a/src/candle/widgets/sliderbox.h b/src/designerplugins/customwidgetsplugin/sliderbox.h similarity index 95% rename from src/candle/widgets/sliderbox.h rename to src/designerplugins/customwidgetsplugin/sliderbox.h index 8b2380f0..68c27d34 100644 --- a/src/candle/widgets/sliderbox.h +++ b/src/designerplugins/customwidgetsplugin/sliderbox.h @@ -3,12 +3,13 @@ #include #include +#include "customwidgetsshared.h" namespace Ui { class SliderBox; } -class SliderBox : public QWidget +class CUSTOMWIDGETS_DLLSPEC SliderBox : public QWidget { Q_OBJECT Q_PROPERTY(int value READ value WRITE setValue) diff --git a/src/candle/widgets/sliderbox.ui b/src/designerplugins/customwidgetsplugin/sliderbox.ui similarity index 98% rename from src/candle/widgets/sliderbox.ui rename to src/designerplugins/customwidgetsplugin/sliderbox.ui index 5877a0df..520800f0 100644 --- a/src/candle/widgets/sliderbox.ui +++ b/src/designerplugins/customwidgetsplugin/sliderbox.ui @@ -85,7 +85,7 @@ Slider QSlider -
widgets/slider.h
+
slider.h
diff --git a/src/designerplugins/customwidgetsplugin/sliderboxplugin.cpp b/src/designerplugins/customwidgetsplugin/sliderboxplugin.cpp new file mode 100644 index 00000000..75d19c01 --- /dev/null +++ b/src/designerplugins/customwidgetsplugin/sliderboxplugin.cpp @@ -0,0 +1,75 @@ +#include "sliderboxplugin.h" +#include "sliderbox.h" + +SliderBoxPlugin::SliderBoxPlugin(QObject *parent): QObject(parent), m_initialized(false) +{ + +} + +void SliderBoxPlugin::initialize(QDesignerFormEditorInterface *core) +{ + if (m_initialized) return; + + m_initialized = true; +} + +bool SliderBoxPlugin::isInitialized() const +{ + return m_initialized; +} + +QWidget *SliderBoxPlugin::createWidget(QWidget *parent) +{ + return new SliderBox(parent); +} + +QString SliderBoxPlugin::includeFile() const +{ + return QStringLiteral("sliderbox.h"); +} + +QString SliderBoxPlugin::name() const +{ + return QStringLiteral("SliderBox"); +} + +QString SliderBoxPlugin::group() const +{ + return QStringLiteral("Custom widgets"); +} + +QIcon SliderBoxPlugin::icon() const +{ + return QIcon(); +} + +QString SliderBoxPlugin::toolTip() const +{ + return QString(); +} + +QString SliderBoxPlugin::whatsThis() const +{ + return QString(); +} + +bool SliderBoxPlugin::isContainer() const +{ + return false; +} + +QString SliderBoxPlugin::domXml() const +{ + return "\n" + " \n" + " \n" + " \n" + " 0\n" + " 0\n" + " 100\n" + " 100\n" + " \n" + " \n" + " \n" + "\n"; +} \ No newline at end of file diff --git a/src/designerplugins/customwidgetsplugin/sliderboxplugin.h b/src/designerplugins/customwidgetsplugin/sliderboxplugin.h new file mode 100644 index 00000000..70a40693 --- /dev/null +++ b/src/designerplugins/customwidgetsplugin/sliderboxplugin.h @@ -0,0 +1,25 @@ +#include + +class SliderBoxPlugin: public QObject, public QDesignerCustomWidgetInterface +{ + Q_OBJECT + Q_INTERFACES(QDesignerCustomWidgetInterface) + +public: + explicit SliderBoxPlugin(QObject *parent = 0); + + bool isContainer() const override; + bool isInitialized() const override; + QIcon icon() const override; + QString domXml() const override; + QString group() const override; + QString includeFile() const override; + QString name() const override; + QString toolTip() const override; + QString whatsThis() const override; + QWidget *createWidget(QWidget *parent) override; + void initialize(QDesignerFormEditorInterface *core) override; + +private: + bool m_initialized; +}; \ No newline at end of file diff --git a/src/designerplugins/customwidgetsplugin/sliderplugin.cpp b/src/designerplugins/customwidgetsplugin/sliderplugin.cpp new file mode 100644 index 00000000..704feacf --- /dev/null +++ b/src/designerplugins/customwidgetsplugin/sliderplugin.cpp @@ -0,0 +1,75 @@ +#include "sliderplugin.h" +#include "slider.h" + +SliderPlugin::SliderPlugin(QObject *parent): QObject(parent), m_initialized(false) +{ + +} + +void SliderPlugin::initialize(QDesignerFormEditorInterface *core) +{ + if (m_initialized) return; + + m_initialized = true; +} + +bool SliderPlugin::isInitialized() const +{ + return m_initialized; +} + +QWidget *SliderPlugin::createWidget(QWidget *parent) +{ + return new Slider(parent); +} + +QString SliderPlugin::includeFile() const +{ + return QStringLiteral("slider.h"); +} + +QString SliderPlugin::name() const +{ + return QStringLiteral("Slider"); +} + +QString SliderPlugin::group() const +{ + return QStringLiteral("Custom widgets"); +} + +QIcon SliderPlugin::icon() const +{ + return QIcon(); +} + +QString SliderPlugin::toolTip() const +{ + return QString(); +} + +QString SliderPlugin::whatsThis() const +{ + return QString(); +} + +bool SliderPlugin::isContainer() const +{ + return false; +} + +QString SliderPlugin::domXml() const +{ + return "\n" + " \n" + " \n" + " \n" + " 0\n" + " 0\n" + " 100\n" + " 100\n" + " \n" + " \n" + " \n" + "\n"; +} \ No newline at end of file diff --git a/src/designerplugins/customwidgetsplugin/sliderplugin.h b/src/designerplugins/customwidgetsplugin/sliderplugin.h new file mode 100644 index 00000000..891bb199 --- /dev/null +++ b/src/designerplugins/customwidgetsplugin/sliderplugin.h @@ -0,0 +1,25 @@ +#include + +class SliderPlugin: public QObject, public QDesignerCustomWidgetInterface +{ + Q_OBJECT + Q_INTERFACES(QDesignerCustomWidgetInterface) + +public: + explicit SliderPlugin(QObject *parent = 0); + + bool isContainer() const override; + bool isInitialized() const override; + QIcon icon() const override; + QString domXml() const override; + QString group() const override; + QString includeFile() const override; + QString name() const override; + QString toolTip() const override; + QString whatsThis() const override; + QWidget *createWidget(QWidget *parent) override; + void initialize(QDesignerFormEditorInterface *core) override; + +private: + bool m_initialized; +}; \ No newline at end of file diff --git a/src/candle/widgets/styledtoolbutton.cpp b/src/designerplugins/customwidgetsplugin/styledtoolbutton.cpp similarity index 100% rename from src/candle/widgets/styledtoolbutton.cpp rename to src/designerplugins/customwidgetsplugin/styledtoolbutton.cpp diff --git a/src/candle/widgets/styledtoolbutton.h b/src/designerplugins/customwidgetsplugin/styledtoolbutton.h similarity index 89% rename from src/candle/widgets/styledtoolbutton.h rename to src/designerplugins/customwidgetsplugin/styledtoolbutton.h index ffcb8597..5b34e4af 100644 --- a/src/candle/widgets/styledtoolbutton.h +++ b/src/designerplugins/customwidgetsplugin/styledtoolbutton.h @@ -10,8 +10,9 @@ #include #include #include +#include "customwidgetsshared.h" -class StyledToolButton : public QToolButton +class CUSTOMWIDGETS_DLLSPEC StyledToolButton : public QToolButton { Q_OBJECT Q_PROPERTY(QColor backgroundColor READ backColor WRITE setBackColor) @@ -37,6 +38,8 @@ class StyledToolButton : public QToolButton void leaveEvent(QEvent *); private: + Q_DISABLE_COPY(StyledToolButton) + void paintEvent(QPaintEvent *e); bool m_hovered; diff --git a/src/designerplugins/customwidgetsplugin/styledtoolbuttonplugin.cpp b/src/designerplugins/customwidgetsplugin/styledtoolbuttonplugin.cpp new file mode 100644 index 00000000..a683d7e5 --- /dev/null +++ b/src/designerplugins/customwidgetsplugin/styledtoolbuttonplugin.cpp @@ -0,0 +1,75 @@ +#include "styledtoolbuttonplugin.h" +#include "styledtoolbutton.h" + +StyledToolButtonPlugin::StyledToolButtonPlugin(QObject *parent): QObject(parent), m_initialized(false) +{ + +} + +void StyledToolButtonPlugin::initialize(QDesignerFormEditorInterface *core) +{ + if (m_initialized) return; + + m_initialized = true; +} + +bool StyledToolButtonPlugin::isInitialized() const +{ + return m_initialized; +} + +QWidget *StyledToolButtonPlugin::createWidget(QWidget *parent) +{ + return new StyledToolButton(parent); +} + +QString StyledToolButtonPlugin::includeFile() const +{ + return QStringLiteral("styledtoolbutton.h"); +} + +QString StyledToolButtonPlugin::name() const +{ + return QStringLiteral("StyledToolButton"); +} + +QString StyledToolButtonPlugin::group() const +{ + return QStringLiteral("Custom widgets"); +} + +QIcon StyledToolButtonPlugin::icon() const +{ + return QIcon(); +} + +QString StyledToolButtonPlugin::toolTip() const +{ + return QString(); +} + +QString StyledToolButtonPlugin::whatsThis() const +{ + return QString(); +} + +bool StyledToolButtonPlugin::isContainer() const +{ + return false; +} + +QString StyledToolButtonPlugin::domXml() const +{ + return "\n" + " \n" + " \n" + " \n" + " 0\n" + " 0\n" + " 100\n" + " 100\n" + " \n" + " \n" + " \n" + "\n"; +} \ No newline at end of file diff --git a/src/designerplugins/customwidgetsplugin/styledtoolbuttonplugin.h b/src/designerplugins/customwidgetsplugin/styledtoolbuttonplugin.h new file mode 100644 index 00000000..d2b5eb94 --- /dev/null +++ b/src/designerplugins/customwidgetsplugin/styledtoolbuttonplugin.h @@ -0,0 +1,25 @@ +#include + +class StyledToolButtonPlugin: public QObject, public QDesignerCustomWidgetInterface +{ + Q_OBJECT + Q_INTERFACES(QDesignerCustomWidgetInterface) + +public: + explicit StyledToolButtonPlugin(QObject *parent = 0); + + bool isContainer() const override; + bool isInitialized() const override; + QIcon icon() const override; + QString domXml() const override; + QString group() const override; + QString includeFile() const override; + QString name() const override; + QString toolTip() const override; + QString whatsThis() const override; + QWidget *createWidget(QWidget *parent) override; + void initialize(QDesignerFormEditorInterface *core) override; + +private: + bool m_initialized; +}; \ No newline at end of file diff --git a/src/designerplugins/designerplugins.pro b/src/designerplugins/designerplugins.pro index caba9adb..97ae3672 100644 --- a/src/designerplugins/designerplugins.pro +++ b/src/designerplugins/designerplugins.pro @@ -5,4 +5,7 @@ SUBDIRS = cameraplugin install_cameraplugin.path = ../../bin/plugins/camera/plugins install_cameraplugin.files = cameraplugin/release/cameraplugin.dll -INSTALLS += install_cameraplugin \ No newline at end of file +install_customwidgetsplugin.path = ../../bin +install_customwidgetsplugin.files = customwidgetsplugin/release/customwidgets.dll + +INSTALLS += install_cameraplugin install_customwidgetsplugin \ No newline at end of file diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core.pri b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core.pri new file mode 100644 index 00000000..a154159f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core.pri @@ -0,0 +1,199 @@ +HEADERS += \ + $$PWD/qtscriptshell_QAbstractAnimation.h \ + $$PWD/qtscriptshell_QAbstractItemModel.h \ + $$PWD/qtscriptshell_QAbstractListModel.h \ + $$PWD/qtscriptshell_QAbstractState.h \ + $$PWD/qtscriptshell_QAbstractTableModel.h \ + $$PWD/qtscriptshell_QAbstractTransition.h \ + $$PWD/qtscriptshell_QAnimationGroup.h \ + $$PWD/qtscriptshell_QBasicMutex.h \ + $$PWD/qtscriptshell_QBuffer.h \ + $$PWD/qtscriptshell_QChildEvent.h \ + $$PWD/qtscriptshell_QCoreApplication.h \ + $$PWD/qtscriptshell_QEvent.h \ + $$PWD/qtscriptshell_QEventLoop.h \ + $$PWD/qtscriptshell_QEventTransition.h \ + $$PWD/qtscriptshell_QFile.h \ + $$PWD/qtscriptshell_QFileDevice.h \ + $$PWD/qtscriptshell_QFileSystemWatcher.h \ + $$PWD/qtscriptshell_QFinalState.h \ + $$PWD/qtscriptshell_QFutureSynchronizer.h \ + $$PWD/qtscriptshell_QFutureSynchronizerVoid.h \ + $$PWD/qtscriptshell_QFutureWatcher.h \ + $$PWD/qtscriptshell_QFutureWatcherVoid.h \ + $$PWD/qtscriptshell_QHistoryState.h \ + $$PWD/qtscriptshell_QIODevice.h \ + $$PWD/qtscriptshell_QMimeData.h \ + $$PWD/qtscriptshell_QObject.h \ + $$PWD/qtscriptshell_QParallelAnimationGroup.h \ + $$PWD/qtscriptshell_QPauseAnimation.h \ + $$PWD/qtscriptshell_QProcess.h \ + $$PWD/qtscriptshell_QPropertyAnimation.h \ + $$PWD/qtscriptshell_QRunnable.h \ + $$PWD/qtscriptshell_QSequentialAnimationGroup.h \ + $$PWD/qtscriptshell_QSettings.h \ + $$PWD/qtscriptshell_QSignalMapper.h \ + $$PWD/qtscriptshell_QSignalTransition.h \ + $$PWD/qtscriptshell_QState.h \ + $$PWD/qtscriptshell_QStateMachine.h \ + $$PWD/qtscriptshell_QTemporaryFile.h \ + $$PWD/qtscriptshell_QTextCodec.h \ + $$PWD/qtscriptshell_QTextStream.h \ + $$PWD/qtscriptshell_QThreadPool.h \ + $$PWD/qtscriptshell_QTimeLine.h \ + $$PWD/qtscriptshell_QTimer.h \ + $$PWD/qtscriptshell_QTimerEvent.h \ + $$PWD/qtscriptshell_QTranslator.h \ + $$PWD/qtscriptshell_QUuid.h \ + $$PWD/qtscriptshell_QVariantAnimation.h \ + $$PWD/qtscriptshell_QXmlStreamEntityResolver.h \ + +SOURCES += \ + $$PWD/qtscript_Global.cpp \ + $$PWD/qtscript_QAbstractAnimation.cpp \ + $$PWD/qtscript_QAbstractItemModel.cpp \ + $$PWD/qtscript_QAbstractListModel.cpp \ + $$PWD/qtscript_QAbstractState.cpp \ + $$PWD/qtscript_QAbstractTableModel.cpp \ + $$PWD/qtscript_QAbstractTransition.cpp \ + $$PWD/qtscript_QAnimationGroup.cpp \ + $$PWD/qtscript_QBasicMutex.cpp \ + $$PWD/qtscript_QBasicTimer.cpp \ + $$PWD/qtscript_QBitArray.cpp \ + $$PWD/qtscript_QBuffer.cpp \ + $$PWD/qtscript_QByteArray.cpp \ + $$PWD/qtscript_QByteArrayMatcher.cpp \ + $$PWD/qtscript_QChildEvent.cpp \ + $$PWD/qtscript_QCoreApplication.cpp \ + $$PWD/qtscript_QCryptographicHash.cpp \ + $$PWD/qtscript_QDate.cpp \ + $$PWD/qtscript_QDateTime.cpp \ + $$PWD/qtscript_QDir.cpp \ + $$PWD/qtscript_QDirIterator.cpp \ + $$PWD/qtscript_QDynamicPropertyChangeEvent.cpp \ + $$PWD/qtscript_QEasingCurve.cpp \ + $$PWD/qtscript_QEvent.cpp \ + $$PWD/qtscript_QEventLoop.cpp \ + $$PWD/qtscript_QEventTransition.cpp \ + $$PWD/qtscript_QFile.cpp \ + $$PWD/qtscript_QFileDevice.cpp \ + $$PWD/qtscript_QFileInfo.cpp \ + $$PWD/qtscript_QFileSystemWatcher.cpp \ + $$PWD/qtscript_QFinalState.cpp \ + $$PWD/qtscript_QFuture.cpp \ + $$PWD/qtscript_QFutureIterator.cpp \ + $$PWD/qtscript_QFutureSynchronizer.cpp \ + $$PWD/qtscript_QFutureSynchronizerVoid.cpp \ + $$PWD/qtscript_QFutureVoid.cpp \ + $$PWD/qtscript_QFutureWatcher.cpp \ + $$PWD/qtscript_QFutureWatcherVoid.cpp \ + $$PWD/qtscript_QHistoryState.cpp \ + $$PWD/qtscript_QIODevice.cpp \ + $$PWD/qtscript_QLibraryInfo.cpp \ + $$PWD/qtscript_QLocale.cpp \ + $$PWD/qtscript_QMargins.cpp \ + $$PWD/qtscript_QMimeData.cpp \ + $$PWD/qtscript_QModelIndex.cpp \ + $$PWD/qtscript_QMutex.cpp \ + $$PWD/qtscript_QObject.cpp \ + $$PWD/qtscript_QParallelAnimationGroup.cpp \ + $$PWD/qtscript_QPauseAnimation.cpp \ + $$PWD/qtscript_QPersistentModelIndex.cpp \ + $$PWD/qtscript_QPoint.cpp \ + $$PWD/qtscript_QPointF.cpp \ + $$PWD/qtscript_QProcess.cpp \ + $$PWD/qtscript_QProcessEnvironment.cpp \ + $$PWD/qtscript_QPropertyAnimation.cpp \ + $$PWD/qtscript_QReadWriteLock.cpp \ + $$PWD/qtscript_QRect.cpp \ + $$PWD/qtscript_QRectF.cpp \ + $$PWD/qtscript_QRegExp.cpp \ + $$PWD/qtscript_QRunnable.cpp \ + $$PWD/qtscript_QSemaphore.cpp \ + $$PWD/qtscript_QSequentialAnimationGroup.cpp \ + $$PWD/qtscript_QSettings.cpp \ + $$PWD/qtscript_QSignalMapper.cpp \ + $$PWD/qtscript_QSignalTransition.cpp \ + $$PWD/qtscript_QSize.cpp \ + $$PWD/qtscript_QSizeF.cpp \ + $$PWD/qtscript_QSocketNotifier.cpp \ + $$PWD/qtscript_QState.cpp \ + $$PWD/qtscript_QStateMachine.cpp \ + $$PWD/qtscript_QStateMachine_SignalEvent.cpp \ + $$PWD/qtscript_QStateMachine_WrappedEvent.cpp \ + $$PWD/qtscript_QStringMatcher.cpp \ + $$PWD/qtscript_QSystemSemaphore.cpp \ + $$PWD/qtscript_QTemporaryFile.cpp \ + $$PWD/qtscript_QTextBoundaryFinder.cpp \ + $$PWD/qtscript_QTextCodec.cpp \ + $$PWD/qtscript_QTextDecoder.cpp \ + $$PWD/qtscript_QTextEncoder.cpp \ + $$PWD/qtscript_QTextStream.cpp \ + $$PWD/qtscript_QThreadPool.cpp \ + $$PWD/qtscript_QTime.cpp \ + $$PWD/qtscript_QTimeLine.cpp \ + $$PWD/qtscript_QTimer.cpp \ + $$PWD/qtscript_QTimerEvent.cpp \ + $$PWD/qtscript_QTranslator.cpp \ + $$PWD/qtscript_QUrl.cpp \ + $$PWD/qtscript_QUuid.cpp \ + $$PWD/qtscript_QVariantAnimation.cpp \ + $$PWD/qtscript_QWaitCondition.cpp \ + $$PWD/qtscript_QXmlStreamAttribute.cpp \ + $$PWD/qtscript_QXmlStreamAttributes.cpp \ + $$PWD/qtscript_QXmlStreamEntityDeclaration.cpp \ + $$PWD/qtscript_QXmlStreamEntityResolver.cpp \ + $$PWD/qtscript_QXmlStreamNamespaceDeclaration.cpp \ + $$PWD/qtscript_QXmlStreamNotationDeclaration.cpp \ + $$PWD/qtscript_QXmlStreamReader.cpp \ + $$PWD/qtscript_QXmlStreamWriter.cpp \ + $$PWD/qtscript_Qt.cpp \ + $$PWD/qtscriptshell_QAbstractAnimation.cpp \ + $$PWD/qtscriptshell_QAbstractItemModel.cpp \ + $$PWD/qtscriptshell_QAbstractListModel.cpp \ + $$PWD/qtscriptshell_QAbstractState.cpp \ + $$PWD/qtscriptshell_QAbstractTableModel.cpp \ + $$PWD/qtscriptshell_QAbstractTransition.cpp \ + $$PWD/qtscriptshell_QAnimationGroup.cpp \ + $$PWD/qtscriptshell_QBasicMutex.cpp \ + $$PWD/qtscriptshell_QBuffer.cpp \ + $$PWD/qtscriptshell_QChildEvent.cpp \ + $$PWD/qtscriptshell_QCoreApplication.cpp \ + $$PWD/qtscriptshell_QEvent.cpp \ + $$PWD/qtscriptshell_QEventLoop.cpp \ + $$PWD/qtscriptshell_QEventTransition.cpp \ + $$PWD/qtscriptshell_QFile.cpp \ + $$PWD/qtscriptshell_QFileDevice.cpp \ + $$PWD/qtscriptshell_QFileSystemWatcher.cpp \ + $$PWD/qtscriptshell_QFinalState.cpp \ + $$PWD/qtscriptshell_QFutureSynchronizer.cpp \ + $$PWD/qtscriptshell_QFutureSynchronizerVoid.cpp \ + $$PWD/qtscriptshell_QFutureWatcher.cpp \ + $$PWD/qtscriptshell_QFutureWatcherVoid.cpp \ + $$PWD/qtscriptshell_QHistoryState.cpp \ + $$PWD/qtscriptshell_QIODevice.cpp \ + $$PWD/qtscriptshell_QMimeData.cpp \ + $$PWD/qtscriptshell_QObject.cpp \ + $$PWD/qtscriptshell_QParallelAnimationGroup.cpp \ + $$PWD/qtscriptshell_QPauseAnimation.cpp \ + $$PWD/qtscriptshell_QProcess.cpp \ + $$PWD/qtscriptshell_QPropertyAnimation.cpp \ + $$PWD/qtscriptshell_QRunnable.cpp \ + $$PWD/qtscriptshell_QSequentialAnimationGroup.cpp \ + $$PWD/qtscriptshell_QSettings.cpp \ + $$PWD/qtscriptshell_QSignalMapper.cpp \ + $$PWD/qtscriptshell_QSignalTransition.cpp \ + $$PWD/qtscriptshell_QState.cpp \ + $$PWD/qtscriptshell_QStateMachine.cpp \ + $$PWD/qtscriptshell_QTemporaryFile.cpp \ + $$PWD/qtscriptshell_QTextCodec.cpp \ + $$PWD/qtscriptshell_QTextStream.cpp \ + $$PWD/qtscriptshell_QThreadPool.cpp \ + $$PWD/qtscriptshell_QTimeLine.cpp \ + $$PWD/qtscriptshell_QTimer.cpp \ + $$PWD/qtscriptshell_QTimerEvent.cpp \ + $$PWD/qtscriptshell_QTranslator.cpp \ + $$PWD/qtscriptshell_QUuid.cpp \ + $$PWD/qtscriptshell_QVariantAnimation.cpp \ + $$PWD/qtscriptshell_QXmlStreamEntityResolver.cpp \ + $$PWD/com_trolltech_qt_core_init.cpp diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core_init.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core_init.cpp new file mode 100644 index 00000000..7d46e6bc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/com_trolltech_qt_core_init.cpp @@ -0,0 +1,317 @@ +#include +#include + +QScriptValue qtscript_create_QByteArray_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPoint_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFutureWatcherVoid_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextCodec_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTime_class(QScriptEngine *engine); +QScriptValue qtscript_create_QEasingCurve_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStringMatcher_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFileInfo_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFutureVoid_class(QScriptEngine *engine); +QScriptValue qtscript_create_QModelIndex_class(QScriptEngine *engine); +QScriptValue qtscript_create_QWaitCondition_class(QScriptEngine *engine); +QScriptValue qtscript_create_Qt_class(QScriptEngine *engine); +QScriptValue qtscript_create_QBitArray_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextDecoder_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSystemSemaphore_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlStreamAttributes_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextEncoder_class(QScriptEngine *engine); +QScriptValue qtscript_create_QUuid_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPersistentModelIndex_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlStreamNotationDeclaration_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlStreamAttribute_class(QScriptEngine *engine); +QScriptValue qtscript_create_QProcessEnvironment_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSize_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFutureIterator_class(QScriptEngine *engine); +QScriptValue qtscript_create_QBasicTimer_class(QScriptEngine *engine); +QScriptValue qtscript_create_QRegExp_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFutureSynchronizer_class(QScriptEngine *engine); +QScriptValue qtscript_create_QObject_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFutureSynchronizerVoid_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDateTime_class(QScriptEngine *engine); +QScriptValue qtscript_create_QBasicMutex_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDirIterator_class(QScriptEngine *engine); +QScriptValue qtscript_create_QUrl_class(QScriptEngine *engine); +QScriptValue qtscript_create_QLibraryInfo_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlStreamNamespaceDeclaration_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDate_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDir_class(QScriptEngine *engine); +QScriptValue qtscript_create_QLocale_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlStreamWriter_class(QScriptEngine *engine); +QScriptValue qtscript_create_QRectF_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSizeF_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextStream_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlStreamReader_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextBoundaryFinder_class(QScriptEngine *engine); +QScriptValue qtscript_create_QCryptographicHash_class(QScriptEngine *engine); +QScriptValue qtscript_create_QRunnable_class(QScriptEngine *engine); +QScriptValue qtscript_create_QRect_class(QScriptEngine *engine); +QScriptValue qtscript_create_QEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPointF_class(QScriptEngine *engine); +QScriptValue qtscript_create_QMargins_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlStreamEntityResolver_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFutureWatcher_class(QScriptEngine *engine); +QScriptValue qtscript_create_QReadWriteLock_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFuture_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlStreamEntityDeclaration_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSemaphore_class(QScriptEngine *engine); +QScriptValue qtscript_create_QByteArrayMatcher_class(QScriptEngine *engine); +QScriptValue qtscript_create_Global_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStateMachine_SignalEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QIODevice_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSignalMapper_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDynamicPropertyChangeEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSocketNotifier_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFileSystemWatcher_class(QScriptEngine *engine); +QScriptValue qtscript_create_QMutex_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAbstractTransition_class(QScriptEngine *engine); +QScriptValue qtscript_create_QChildEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSettings_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAbstractAnimation_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTimeLine_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStateMachine_WrappedEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAbstractItemModel_class(QScriptEngine *engine); +QScriptValue qtscript_create_QThreadPool_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTranslator_class(QScriptEngine *engine); +QScriptValue qtscript_create_QMimeData_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAbstractState_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTimer_class(QScriptEngine *engine); +QScriptValue qtscript_create_QCoreApplication_class(QScriptEngine *engine); +QScriptValue qtscript_create_QEventLoop_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTimerEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QProcess_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAnimationGroup_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPauseAnimation_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSignalTransition_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFinalState_class(QScriptEngine *engine); +QScriptValue qtscript_create_QHistoryState_class(QScriptEngine *engine); +QScriptValue qtscript_create_QState_class(QScriptEngine *engine); +QScriptValue qtscript_create_QBuffer_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAbstractListModel_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAbstractTableModel_class(QScriptEngine *engine); +QScriptValue qtscript_create_QEventTransition_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFileDevice_class(QScriptEngine *engine); +QScriptValue qtscript_create_QVariantAnimation_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStateMachine_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSequentialAnimationGroup_class(QScriptEngine *engine); +QScriptValue qtscript_create_QParallelAnimationGroup_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFile_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPropertyAnimation_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTemporaryFile_class(QScriptEngine *engine); + +static const char * const qtscript_com_trolltech_qt_core_class_names[] = { + "QByteArray" + , "QPoint" + , "QFutureWatcherVoid" + , "QTextCodec" + , "QTime" + , "QEasingCurve" + , "QStringMatcher" + , "QFileInfo" + , "QFutureVoid" + , "QModelIndex" + , "QWaitCondition" + , "Qt" + , "QBitArray" + , "QTextDecoder" + , "QSystemSemaphore" + , "QXmlStreamAttributes" + , "QTextEncoder" + , "QUuid" + , "QPersistentModelIndex" + , "QXmlStreamNotationDeclaration" + , "QXmlStreamAttribute" + , "QProcessEnvironment" + , "QSize" + , "QFutureIterator" + , "QBasicTimer" + , "QRegExp" + , "QFutureSynchronizer" + , "QObject" + , "QFutureSynchronizerVoid" + , "QDateTime" + , "QBasicMutex" + , "QDirIterator" + , "QUrl" + , "QLibraryInfo" + , "QXmlStreamNamespaceDeclaration" + , "QDate" + , "QDir" + , "QLocale" + , "QXmlStreamWriter" + , "QRectF" + , "QSizeF" + , "QTextStream" + , "QXmlStreamReader" + , "QTextBoundaryFinder" + , "QCryptographicHash" + , "QRunnable" + , "QRect" + , "QEvent" + , "QPointF" + , "QMargins" + , "QXmlStreamEntityResolver" + , "QFutureWatcher" + , "QReadWriteLock" + , "QFuture" + , "QXmlStreamEntityDeclaration" + , "QSemaphore" + , "QByteArrayMatcher" + , "Global" + , "QStateMachine_SignalEvent" + , "QIODevice" + , "QSignalMapper" + , "QDynamicPropertyChangeEvent" + , "QSocketNotifier" + , "QFileSystemWatcher" + , "QMutex" + , "QAbstractTransition" + , "QChildEvent" + , "QSettings" + , "QAbstractAnimation" + , "QTimeLine" + , "QStateMachine_WrappedEvent" + , "QAbstractItemModel" + , "QThreadPool" + , "QTranslator" + , "QMimeData" + , "QAbstractState" + , "QTimer" + , "QCoreApplication" + , "QEventLoop" + , "QTimerEvent" + , "QProcess" + , "QAnimationGroup" + , "QPauseAnimation" + , "QSignalTransition" + , "QFinalState" + , "QHistoryState" + , "QState" + , "QBuffer" + , "QAbstractListModel" + , "QAbstractTableModel" + , "QEventTransition" + , "QFileDevice" + , "QVariantAnimation" + , "QStateMachine" + , "QSequentialAnimationGroup" + , "QParallelAnimationGroup" + , "QFile" + , "QPropertyAnimation" + , "QTemporaryFile" +}; + +typedef QScriptValue (*QtBindingCreator)(QScriptEngine *engine); +static const QtBindingCreator qtscript_com_trolltech_qt_core_class_functions[] = { + qtscript_create_QByteArray_class + , qtscript_create_QPoint_class + , qtscript_create_QFutureWatcherVoid_class + , qtscript_create_QTextCodec_class + , qtscript_create_QTime_class + , qtscript_create_QEasingCurve_class + , qtscript_create_QStringMatcher_class + , qtscript_create_QFileInfo_class + , qtscript_create_QFutureVoid_class + , qtscript_create_QModelIndex_class + , qtscript_create_QWaitCondition_class + , qtscript_create_Qt_class + , qtscript_create_QBitArray_class + , qtscript_create_QTextDecoder_class + , qtscript_create_QSystemSemaphore_class + , qtscript_create_QXmlStreamAttributes_class + , qtscript_create_QTextEncoder_class + , qtscript_create_QUuid_class + , qtscript_create_QPersistentModelIndex_class + , qtscript_create_QXmlStreamNotationDeclaration_class + , qtscript_create_QXmlStreamAttribute_class + , qtscript_create_QProcessEnvironment_class + , qtscript_create_QSize_class + , qtscript_create_QFutureIterator_class + , qtscript_create_QBasicTimer_class + , qtscript_create_QRegExp_class + , qtscript_create_QFutureSynchronizer_class + , qtscript_create_QObject_class + , qtscript_create_QFutureSynchronizerVoid_class + , qtscript_create_QDateTime_class + , qtscript_create_QBasicMutex_class + , qtscript_create_QDirIterator_class + , qtscript_create_QUrl_class + , qtscript_create_QLibraryInfo_class + , qtscript_create_QXmlStreamNamespaceDeclaration_class + , qtscript_create_QDate_class + , qtscript_create_QDir_class + , qtscript_create_QLocale_class + , qtscript_create_QXmlStreamWriter_class + , qtscript_create_QRectF_class + , qtscript_create_QSizeF_class + , qtscript_create_QTextStream_class + , qtscript_create_QXmlStreamReader_class + , qtscript_create_QTextBoundaryFinder_class + , qtscript_create_QCryptographicHash_class + , qtscript_create_QRunnable_class + , qtscript_create_QRect_class + , qtscript_create_QEvent_class + , qtscript_create_QPointF_class + , qtscript_create_QMargins_class + , qtscript_create_QXmlStreamEntityResolver_class + , qtscript_create_QFutureWatcher_class + , qtscript_create_QReadWriteLock_class + , qtscript_create_QFuture_class + , qtscript_create_QXmlStreamEntityDeclaration_class + , qtscript_create_QSemaphore_class + , qtscript_create_QByteArrayMatcher_class + , qtscript_create_Global_class + , qtscript_create_QStateMachine_SignalEvent_class + , qtscript_create_QIODevice_class + , qtscript_create_QSignalMapper_class + , qtscript_create_QDynamicPropertyChangeEvent_class + , qtscript_create_QSocketNotifier_class + , qtscript_create_QFileSystemWatcher_class + , qtscript_create_QMutex_class + , qtscript_create_QAbstractTransition_class + , qtscript_create_QChildEvent_class + , qtscript_create_QSettings_class + , qtscript_create_QAbstractAnimation_class + , qtscript_create_QTimeLine_class + , qtscript_create_QStateMachine_WrappedEvent_class + , qtscript_create_QAbstractItemModel_class + , qtscript_create_QThreadPool_class + , qtscript_create_QTranslator_class + , qtscript_create_QMimeData_class + , qtscript_create_QAbstractState_class + , qtscript_create_QTimer_class + , qtscript_create_QCoreApplication_class + , qtscript_create_QEventLoop_class + , qtscript_create_QTimerEvent_class + , qtscript_create_QProcess_class + , qtscript_create_QAnimationGroup_class + , qtscript_create_QPauseAnimation_class + , qtscript_create_QSignalTransition_class + , qtscript_create_QFinalState_class + , qtscript_create_QHistoryState_class + , qtscript_create_QState_class + , qtscript_create_QBuffer_class + , qtscript_create_QAbstractListModel_class + , qtscript_create_QAbstractTableModel_class + , qtscript_create_QEventTransition_class + , qtscript_create_QFileDevice_class + , qtscript_create_QVariantAnimation_class + , qtscript_create_QStateMachine_class + , qtscript_create_QSequentialAnimationGroup_class + , qtscript_create_QParallelAnimationGroup_class + , qtscript_create_QFile_class + , qtscript_create_QPropertyAnimation_class + , qtscript_create_QTemporaryFile_class +}; + +void qtscript_initialize_com_trolltech_qt_core_bindings(QScriptValue &extensionObject) +{ + QScriptEngine *engine = extensionObject.engine(); + for (int i = 0; i < 99; ++i) { + extensionObject.setProperty(qtscript_com_trolltech_qt_core_class_names[i], + qtscript_com_trolltech_qt_core_class_functions[i](engine), + QScriptValue::SkipInEnumeration); + } +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_Global.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_Global.cpp new file mode 100644 index 00000000..b7a69a33 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_Global.cpp @@ -0,0 +1,208 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include + +#include + +class Global {}; + +static const char * const qtscript_Global_function_names[] = { + "Global" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_Global_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_Global_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_Global_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("Global::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(Global*) +Q_DECLARE_METATYPE(QtMsgType) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QtMsgType +// + +static const QtMsgType qtscript_Global_QtMsgType_values[] = { + QtDebugMsg + , QtWarningMsg + , QtCriticalMsg + , QtFatalMsg + , QtInfoMsg +}; + +static const char * const qtscript_Global_QtMsgType_keys[] = { + "QtDebugMsg" + , "QtWarningMsg" + , "QtCriticalMsg" + , "QtFatalMsg" + , "QtInfoMsg" +}; + +static QString qtscript_Global_QtMsgType_toStringHelper(QtMsgType value) +{ + if ((value >= QtDebugMsg) && (value <= QtInfoMsg)) + return qtscript_Global_QtMsgType_keys[static_cast(value)-static_cast(QtDebugMsg)]; + return QString(); +} + +static QScriptValue qtscript_Global_QtMsgType_toScriptValue(QScriptEngine *engine, const QtMsgType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Global")); + return clazz.property(qtscript_Global_QtMsgType_toStringHelper(value)); +} + +static void qtscript_Global_QtMsgType_fromScriptValue(const QScriptValue &value, QtMsgType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Global_QtMsgType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QtDebugMsg) && (arg <= QtInfoMsg)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("QtMsgType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Global_QtMsgType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QtMsgType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Global_QtMsgType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QtMsgType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Global_QtMsgType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Global_QtMsgType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Global_QtMsgType, + qtscript_Global_QtMsgType_valueOf, qtscript_Global_QtMsgType_toString); + qScriptRegisterMetaType(engine, qtscript_Global_QtMsgType_toScriptValue, + qtscript_Global_QtMsgType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Global_QtMsgType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Global_QtMsgType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Global +// + +static QScriptValue qtscript_Global_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + Global* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("Global.%0(): this object is not a Global") + .arg(qtscript_Global_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("Global"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_Global_throw_ambiguity_error_helper(context, + qtscript_Global_function_names[_id+1], + qtscript_Global_function_signatures[_id+1]); +} + +static QScriptValue qtscript_Global_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("Global cannot be constructed")); + break; + + default: + Q_ASSERT(false); + } + return qtscript_Global_throw_ambiguity_error_helper(context, + qtscript_Global_function_names[_id], + qtscript_Global_function_signatures[_id]); +} + +QScriptValue qtscript_create_Global_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((Global*)0)); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_Global_static_call, proto, qtscript_Global_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("QtMsgType"), + qtscript_create_Global_QtMsgType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractAnimation.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractAnimation.cpp new file mode 100644 index 00000000..3fb13fab --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractAnimation.cpp @@ -0,0 +1,270 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAbstractAnimation.h" + +static const char * const qtscript_QAbstractAnimation_function_names[] = { + "QAbstractAnimation" + // static + // prototype + , "currentLoopTime" + , "group" + , "totalDuration" + , "toString" +}; + +static const char * const qtscript_QAbstractAnimation_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" + , "" + , "" +"" +}; + +static const int qtscript_QAbstractAnimation_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QAbstractAnimation_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAbstractAnimation::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAbstractAnimation*) +Q_DECLARE_METATYPE(QtScriptShell_QAbstractAnimation*) +Q_DECLARE_METATYPE(QAbstractAnimation::Direction) +Q_DECLARE_METATYPE(QAnimationGroup*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QAbstractAnimation::Direction +// + +static const QAbstractAnimation::Direction qtscript_QAbstractAnimation_Direction_values[] = { + QAbstractAnimation::Forward + , QAbstractAnimation::Backward +}; + +static const char * const qtscript_QAbstractAnimation_Direction_keys[] = { + "Forward" + , "Backward" +}; + +static QString qtscript_QAbstractAnimation_Direction_toStringHelper(QAbstractAnimation::Direction value) +{ + if ((value >= QAbstractAnimation::Forward) && (value <= QAbstractAnimation::Backward)) + return qtscript_QAbstractAnimation_Direction_keys[static_cast(value)-static_cast(QAbstractAnimation::Forward)]; + return QString(); +} + +static QScriptValue qtscript_QAbstractAnimation_Direction_toScriptValue(QScriptEngine *engine, const QAbstractAnimation::Direction &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QAbstractAnimation")); + return clazz.property(qtscript_QAbstractAnimation_Direction_toStringHelper(value)); +} + +static void qtscript_QAbstractAnimation_Direction_fromScriptValue(const QScriptValue &value, QAbstractAnimation::Direction &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QAbstractAnimation_Direction(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QAbstractAnimation::Forward) && (arg <= QAbstractAnimation::Backward)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Direction(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QAbstractAnimation_Direction_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractAnimation::Direction value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAbstractAnimation_Direction_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractAnimation::Direction value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QAbstractAnimation_Direction_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QAbstractAnimation_Direction_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QAbstractAnimation_Direction, + qtscript_QAbstractAnimation_Direction_valueOf, qtscript_QAbstractAnimation_Direction_toString); + qScriptRegisterMetaType(engine, qtscript_QAbstractAnimation_Direction_toScriptValue, + qtscript_QAbstractAnimation_Direction_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QAbstractAnimation_Direction_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QAbstractAnimation_Direction_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QAbstractAnimation +// + +static QScriptValue qtscript_QAbstractAnimation_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAbstractAnimation* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractAnimation.%0(): this object is not a QAbstractAnimation") + .arg(qtscript_QAbstractAnimation_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->currentLoopTime(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QAnimationGroup* _q_result = _q_self->group(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->totalDuration(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: { + QString result = QString::fromLatin1("QAbstractAnimation"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractAnimation_throw_ambiguity_error_helper(context, + qtscript_QAbstractAnimation_function_names[_id+1], + qtscript_QAbstractAnimation_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAbstractAnimation_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAbstractAnimation(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QAbstractAnimation* _q_cpp_result = new QtScriptShell_QAbstractAnimation(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractAnimation*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QAbstractAnimation* _q_cpp_result = new QtScriptShell_QAbstractAnimation(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractAnimation*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractAnimation_throw_ambiguity_error_helper(context, + qtscript_QAbstractAnimation_function_names[_id], + qtscript_QAbstractAnimation_function_signatures[_id]); +} + +static QScriptValue qtscript_QAbstractAnimation_toScriptValue(QScriptEngine *engine, QAbstractAnimation* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAbstractAnimation_fromScriptValue(const QScriptValue &value, QAbstractAnimation* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAbstractAnimation_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAbstractAnimation*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAbstractAnimation_prototype_call, qtscript_QAbstractAnimation_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAbstractAnimation_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QAbstractAnimation_toScriptValue, + qtscript_QAbstractAnimation_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAbstractAnimation_static_call, proto, qtscript_QAbstractAnimation_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Direction"), + qtscript_create_QAbstractAnimation_Direction_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractItemModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractItemModel.cpp new file mode 100644 index 00000000..b0238c22 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractItemModel.cpp @@ -0,0 +1,555 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAbstractItemModel.h" + +static const char * const qtscript_QAbstractItemModel_function_names[] = { + "QAbstractItemModel" + // static + // prototype + , "buddy" + , "canDropMimeData" + , "dropMimeData" + , "insertColumn" + , "insertColumns" + , "insertRow" + , "insertRows" + , "itemData" + , "mimeData" + , "mimeTypes" + , "moveColumn" + , "moveColumns" + , "moveRow" + , "moveRows" + , "removeColumn" + , "removeColumns" + , "removeRow" + , "removeRows" + , "roleNames" + , "setHeaderData" + , "setItemData" + , "sort" + , "span" + , "supportedDragActions" + , "supportedDropActions" + , "toString" +}; + +static const char * const qtscript_QAbstractItemModel_function_signatures[] = { + "QObject parent" + // static + // prototype + , "QModelIndex index" + , "QMimeData data, DropAction action, int row, int column, QModelIndex parent" + , "QMimeData data, DropAction action, int row, int column, QModelIndex parent" + , "int column, QModelIndex parent" + , "int column, int count, QModelIndex parent" + , "int row, QModelIndex parent" + , "int row, int count, QModelIndex parent" + , "QModelIndex index" + , "List indexes" + , "" + , "QModelIndex sourceParent, int sourceColumn, QModelIndex destinationParent, int destinationChild" + , "QModelIndex sourceParent, int sourceColumn, int count, QModelIndex destinationParent, int destinationChild" + , "QModelIndex sourceParent, int sourceRow, QModelIndex destinationParent, int destinationChild" + , "QModelIndex sourceParent, int sourceRow, int count, QModelIndex destinationParent, int destinationChild" + , "int column, QModelIndex parent" + , "int column, int count, QModelIndex parent" + , "int row, QModelIndex parent" + , "int row, int count, QModelIndex parent" + , "" + , "int section, Orientation orientation, Object value, int role" + , "QModelIndex index, SortedMap roles" + , "int column, SortOrder order" + , "QModelIndex index" + , "" + , "" +"" +}; + +static const int qtscript_QAbstractItemModel_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 5 + , 5 + , 2 + , 3 + , 2 + , 3 + , 1 + , 1 + , 0 + , 4 + , 5 + , 4 + , 5 + , 2 + , 3 + , 2 + , 3 + , 0 + , 4 + , 2 + , 2 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QAbstractItemModel_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAbstractItemModel::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAbstractItemModel*) +Q_DECLARE_METATYPE(QtScriptShell_QAbstractItemModel*) +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(Qt::DropAction) +template <> \ +struct QMetaTypeId< QMap > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QMap >("QMap")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(QMimeData*) +template <> \ +struct QMetaTypeId< QHash > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QHash >("QHash")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QFlags) + +// +// QAbstractItemModel +// + +static QScriptValue qtscript_QAbstractItemModel_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 25; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAbstractItemModel* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractItemModel.%0(): this object is not a QAbstractItemModel") + .arg(qtscript_QAbstractItemModel_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QModelIndex _q_result = _q_self->buddy(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 5) { + const QMimeData* _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::DropAction _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QModelIndex _q_arg4 = qscriptvalue_cast(context->argument(4)); + bool _q_result = _q_self->canDropMimeData(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 5) { + const QMimeData* _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::DropAction _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QModelIndex _q_arg4 = qscriptvalue_cast(context->argument(4)); + bool _q_result = _q_self->dropMimeData(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->insertColumn(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QModelIndex _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->insertColumn(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + bool _q_result = _q_self->insertColumns(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QModelIndex _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = _q_self->insertColumns(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->insertRow(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QModelIndex _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->insertRow(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + bool _q_result = _q_self->insertRows(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QModelIndex _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = _q_self->insertRows(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMap _q_result = _q_self->itemData(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QMimeData* _q_result = _q_self->mimeData(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->mimeTypes(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 4) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QModelIndex _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + bool _q_result = _q_self->moveColumn(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 5) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QModelIndex _q_arg3 = qscriptvalue_cast(context->argument(3)); + int _q_arg4 = context->argument(4).toInt32(); + bool _q_result = _q_self->moveColumns(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 4) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QModelIndex _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + bool _q_result = _q_self->moveRow(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 5) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QModelIndex _q_arg3 = qscriptvalue_cast(context->argument(3)); + int _q_arg4 = context->argument(4).toInt32(); + bool _q_result = _q_self->moveRows(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->removeColumn(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QModelIndex _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->removeColumn(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + bool _q_result = _q_self->removeColumns(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QModelIndex _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = _q_self->removeColumns(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->removeRow(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QModelIndex _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->removeRow(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + bool _q_result = _q_self->removeRows(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QModelIndex _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = _q_self->removeRows(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QHash _q_result = _q_self->roleNames(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::Orientation _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVariant _q_arg2 = context->argument(2).toVariant(); + bool _q_result = _q_self->setHeaderData(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::Orientation _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVariant _q_arg2 = context->argument(2).toVariant(); + int _q_arg3 = context->argument(3).toInt32(); + bool _q_result = _q_self->setHeaderData(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 2) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMap _q_arg1 = qscriptvalue_cast >(context->argument(1)); + bool _q_result = _q_self->setItemData(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->sort(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::SortOrder _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->sort(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSize _q_result = _q_self->span(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->supportedDragActions(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->supportedDropActions(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: { + QString result = QString::fromLatin1("QAbstractItemModel"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractItemModel_throw_ambiguity_error_helper(context, + qtscript_QAbstractItemModel_function_names[_id+1], + qtscript_QAbstractItemModel_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAbstractItemModel_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAbstractItemModel(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QAbstractItemModel* _q_cpp_result = new QtScriptShell_QAbstractItemModel(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractItemModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QAbstractItemModel* _q_cpp_result = new QtScriptShell_QAbstractItemModel(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractItemModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractItemModel_throw_ambiguity_error_helper(context, + qtscript_QAbstractItemModel_function_names[_id], + qtscript_QAbstractItemModel_function_signatures[_id]); +} + +static QScriptValue qtscript_QAbstractItemModel_toScriptValue(QScriptEngine *engine, QAbstractItemModel* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAbstractItemModel_fromScriptValue(const QScriptValue &value, QAbstractItemModel* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAbstractItemModel_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAbstractItemModel*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 26; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAbstractItemModel_prototype_call, qtscript_QAbstractItemModel_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAbstractItemModel_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QAbstractItemModel_toScriptValue, + qtscript_QAbstractItemModel_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAbstractItemModel_static_call, proto, qtscript_QAbstractItemModel_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractListModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractListModel.cpp new file mode 100644 index 00000000..13bbb070 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractListModel.cpp @@ -0,0 +1,155 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAbstractListModel.h" + +static const char * const qtscript_QAbstractListModel_function_names[] = { + "QAbstractListModel" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QAbstractListModel_function_signatures[] = { + "QObject parent" + // static + // prototype +"" +}; + +static const int qtscript_QAbstractListModel_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QAbstractListModel_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAbstractListModel::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAbstractListModel*) +Q_DECLARE_METATYPE(QtScriptShell_QAbstractListModel*) +Q_DECLARE_METATYPE(QAbstractItemModel*) + +// +// QAbstractListModel +// + +static QScriptValue qtscript_QAbstractListModel_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAbstractListModel* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractListModel.%0(): this object is not a QAbstractListModel") + .arg(qtscript_QAbstractListModel_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QAbstractListModel"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractListModel_throw_ambiguity_error_helper(context, + qtscript_QAbstractListModel_function_names[_id+1], + qtscript_QAbstractListModel_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAbstractListModel_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAbstractListModel(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QAbstractListModel* _q_cpp_result = new QtScriptShell_QAbstractListModel(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractListModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QAbstractListModel* _q_cpp_result = new QtScriptShell_QAbstractListModel(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractListModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractListModel_throw_ambiguity_error_helper(context, + qtscript_QAbstractListModel_function_names[_id], + qtscript_QAbstractListModel_function_signatures[_id]); +} + +static QScriptValue qtscript_QAbstractListModel_toScriptValue(QScriptEngine *engine, QAbstractListModel* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAbstractListModel_fromScriptValue(const QScriptValue &value, QAbstractListModel* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAbstractListModel_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAbstractListModel*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QAbstractListModel_toScriptValue, + qtscript_QAbstractListModel_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAbstractListModel_static_call, proto, qtscript_QAbstractListModel_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractState.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractState.cpp new file mode 100644 index 00000000..54559754 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractState.cpp @@ -0,0 +1,165 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAbstractState.h" + +static const char * const qtscript_QAbstractState_function_names[] = { + "QAbstractState" + // static + // prototype + , "machine" + , "parentState" + , "toString" +}; + +static const char * const qtscript_QAbstractState_function_signatures[] = { + "" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QAbstractState_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QAbstractState_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAbstractState::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAbstractState*) +Q_DECLARE_METATYPE(QtScriptShell_QAbstractState*) +Q_DECLARE_METATYPE(QStateMachine*) +Q_DECLARE_METATYPE(QState*) + +// +// QAbstractState +// + +static QScriptValue qtscript_QAbstractState_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAbstractState* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractState.%0(): this object is not a QAbstractState") + .arg(qtscript_QAbstractState_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QStateMachine* _q_result = _q_self->machine(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QState* _q_result = _q_self->parentState(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QAbstractState"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractState_throw_ambiguity_error_helper(context, + qtscript_QAbstractState_function_names[_id+1], + qtscript_QAbstractState_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAbstractState_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractState cannot be constructed")); + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractState_throw_ambiguity_error_helper(context, + qtscript_QAbstractState_function_names[_id], + qtscript_QAbstractState_function_signatures[_id]); +} + +static QScriptValue qtscript_QAbstractState_toScriptValue(QScriptEngine *engine, QAbstractState* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAbstractState_fromScriptValue(const QScriptValue &value, QAbstractState* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAbstractState_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAbstractState*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAbstractState_prototype_call, qtscript_QAbstractState_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAbstractState_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QAbstractState_toScriptValue, + qtscript_QAbstractState_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAbstractState_static_call, proto, qtscript_QAbstractState_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractTableModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractTableModel.cpp new file mode 100644 index 00000000..0b362a41 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractTableModel.cpp @@ -0,0 +1,155 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAbstractTableModel.h" + +static const char * const qtscript_QAbstractTableModel_function_names[] = { + "QAbstractTableModel" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QAbstractTableModel_function_signatures[] = { + "QObject parent" + // static + // prototype +"" +}; + +static const int qtscript_QAbstractTableModel_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QAbstractTableModel_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAbstractTableModel::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAbstractTableModel*) +Q_DECLARE_METATYPE(QtScriptShell_QAbstractTableModel*) +Q_DECLARE_METATYPE(QAbstractItemModel*) + +// +// QAbstractTableModel +// + +static QScriptValue qtscript_QAbstractTableModel_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAbstractTableModel* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractTableModel.%0(): this object is not a QAbstractTableModel") + .arg(qtscript_QAbstractTableModel_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QAbstractTableModel"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractTableModel_throw_ambiguity_error_helper(context, + qtscript_QAbstractTableModel_function_names[_id+1], + qtscript_QAbstractTableModel_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAbstractTableModel_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAbstractTableModel(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QAbstractTableModel* _q_cpp_result = new QtScriptShell_QAbstractTableModel(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractTableModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QAbstractTableModel* _q_cpp_result = new QtScriptShell_QAbstractTableModel(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractTableModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractTableModel_throw_ambiguity_error_helper(context, + qtscript_QAbstractTableModel_function_names[_id], + qtscript_QAbstractTableModel_function_signatures[_id]); +} + +static QScriptValue qtscript_QAbstractTableModel_toScriptValue(QScriptEngine *engine, QAbstractTableModel* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAbstractTableModel_fromScriptValue(const QScriptValue &value, QAbstractTableModel* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAbstractTableModel_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAbstractTableModel*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QAbstractTableModel_toScriptValue, + qtscript_QAbstractTableModel_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAbstractTableModel_static_call, proto, qtscript_QAbstractTableModel_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractTransition.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractTransition.cpp new file mode 100644 index 00000000..2b073a2b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAbstractTransition.cpp @@ -0,0 +1,204 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAbstractTransition.h" + +static const char * const qtscript_QAbstractTransition_function_names[] = { + "QAbstractTransition" + // static + // prototype + , "addAnimation" + , "animations" + , "machine" + , "removeAnimation" + , "toString" +}; + +static const char * const qtscript_QAbstractTransition_function_signatures[] = { + "QState sourceState" + // static + // prototype + , "QAbstractAnimation animation" + , "" + , "" + , "QAbstractAnimation animation" +"" +}; + +static const int qtscript_QAbstractTransition_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QAbstractTransition_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAbstractTransition::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAbstractTransition*) +Q_DECLARE_METATYPE(QtScriptShell_QAbstractTransition*) +Q_DECLARE_METATYPE(QAbstractAnimation*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QStateMachine*) +Q_DECLARE_METATYPE(QState*) + +// +// QAbstractTransition +// + +static QScriptValue qtscript_QAbstractTransition_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAbstractTransition* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractTransition.%0(): this object is not a QAbstractTransition") + .arg(qtscript_QAbstractTransition_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QAbstractAnimation* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addAnimation(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->animations(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QStateMachine* _q_result = _q_self->machine(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QAbstractAnimation* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeAnimation(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: { + QString result = QString::fromLatin1("QAbstractTransition"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractTransition_throw_ambiguity_error_helper(context, + qtscript_QAbstractTransition_function_names[_id+1], + qtscript_QAbstractTransition_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAbstractTransition_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAbstractTransition(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QAbstractTransition* _q_cpp_result = new QtScriptShell_QAbstractTransition(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QState* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QAbstractTransition* _q_cpp_result = new QtScriptShell_QAbstractTransition(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractTransition_throw_ambiguity_error_helper(context, + qtscript_QAbstractTransition_function_names[_id], + qtscript_QAbstractTransition_function_signatures[_id]); +} + +static QScriptValue qtscript_QAbstractTransition_toScriptValue(QScriptEngine *engine, QAbstractTransition* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAbstractTransition_fromScriptValue(const QScriptValue &value, QAbstractTransition* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAbstractTransition_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAbstractTransition*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAbstractTransition_prototype_call, qtscript_QAbstractTransition_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAbstractTransition_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QAbstractTransition_toScriptValue, + qtscript_QAbstractTransition_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAbstractTransition_static_call, proto, qtscript_QAbstractTransition_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAnimationGroup.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAnimationGroup.cpp new file mode 100644 index 00000000..b428735f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QAnimationGroup.cpp @@ -0,0 +1,243 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAnimationGroup.h" + +static const char * const qtscript_QAnimationGroup_function_names[] = { + "QAnimationGroup" + // static + // prototype + , "addAnimation" + , "animationAt" + , "animationCount" + , "clear" + , "indexOfAnimation" + , "insertAnimation" + , "removeAnimation" + , "takeAnimation" + , "toString" +}; + +static const char * const qtscript_QAnimationGroup_function_signatures[] = { + "QObject parent" + // static + // prototype + , "QAbstractAnimation animation" + , "int index" + , "" + , "" + , "QAbstractAnimation animation" + , "int index, QAbstractAnimation animation" + , "QAbstractAnimation animation" + , "int index" +"" +}; + +static const int qtscript_QAnimationGroup_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 1 + , 0 + , 0 + , 1 + , 2 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QAnimationGroup_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAnimationGroup::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAnimationGroup*) +Q_DECLARE_METATYPE(QtScriptShell_QAnimationGroup*) +Q_DECLARE_METATYPE(QAbstractAnimation*) + +// +// QAnimationGroup +// + +static QScriptValue qtscript_QAnimationGroup_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAnimationGroup* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAnimationGroup.%0(): this object is not a QAnimationGroup") + .arg(qtscript_QAnimationGroup_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QAbstractAnimation* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addAnimation(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QAbstractAnimation* _q_result = _q_self->animationAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->animationCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QAbstractAnimation* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->indexOfAnimation(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QAbstractAnimation* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertAnimation(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QAbstractAnimation* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeAnimation(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QAbstractAnimation* _q_result = _q_self->takeAnimation(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: { + QString result = QString::fromLatin1("QAnimationGroup"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAnimationGroup_throw_ambiguity_error_helper(context, + qtscript_QAnimationGroup_function_names[_id+1], + qtscript_QAnimationGroup_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAnimationGroup_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAnimationGroup(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QAnimationGroup* _q_cpp_result = new QtScriptShell_QAnimationGroup(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAnimationGroup*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QAnimationGroup* _q_cpp_result = new QtScriptShell_QAnimationGroup(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAnimationGroup*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAnimationGroup_throw_ambiguity_error_helper(context, + qtscript_QAnimationGroup_function_names[_id], + qtscript_QAnimationGroup_function_signatures[_id]); +} + +static QScriptValue qtscript_QAnimationGroup_toScriptValue(QScriptEngine *engine, QAnimationGroup* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAnimationGroup_fromScriptValue(const QScriptValue &value, QAnimationGroup* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAnimationGroup_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAnimationGroup*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAnimationGroup_prototype_call, qtscript_QAnimationGroup_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAnimationGroup_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QAnimationGroup_toScriptValue, + qtscript_QAnimationGroup_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAnimationGroup_static_call, proto, qtscript_QAnimationGroup_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QBasicMutex.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QBasicMutex.cpp new file mode 100644 index 00000000..dd7a8542 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QBasicMutex.cpp @@ -0,0 +1,171 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QBasicMutex.h" + +static const char * const qtscript_QBasicMutex_function_names[] = { + "QBasicMutex" + // static + // prototype + , "isRecursive" + , "lock" + , "tryLock" + , "unlock" + , "toString" +}; + +static const char * const qtscript_QBasicMutex_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QBasicMutex_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QBasicMutex_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QBasicMutex::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QBasicMutex*) +Q_DECLARE_METATYPE(QtScriptShell_QBasicMutex*) + +// +// QBasicMutex +// + +static QScriptValue qtscript_QBasicMutex_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QBasicMutex* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QBasicMutex.%0(): this object is not a QBasicMutex") + .arg(qtscript_QBasicMutex_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isRecursive(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->lock(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->tryLock(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->unlock(); + return context->engine()->undefinedValue(); + } + break; + + case 4: { + QString result = QString::fromLatin1("QBasicMutex"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QBasicMutex_throw_ambiguity_error_helper(context, + qtscript_QBasicMutex_function_names[_id+1], + qtscript_QBasicMutex_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QBasicMutex_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QBasicMutex(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QBasicMutex* _q_cpp_result = new QtScriptShell_QBasicMutex(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QBasicMutex*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QBasicMutex_throw_ambiguity_error_helper(context, + qtscript_QBasicMutex_function_names[_id], + qtscript_QBasicMutex_function_signatures[_id]); +} + +QScriptValue qtscript_create_QBasicMutex_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QBasicMutex*)0)); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QBasicMutex_prototype_call, qtscript_QBasicMutex_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QBasicMutex_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QBasicMutex_static_call, proto, qtscript_QBasicMutex_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QBasicTimer.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QBasicTimer.cpp new file mode 100644 index 00000000..5ec8af5e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QBasicTimer.cpp @@ -0,0 +1,180 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QBasicTimer_function_names[] = { + "QBasicTimer" + // static + // prototype + , "isActive" + , "start" + , "stop" + , "timerId" + , "toString" +}; + +static const char * const qtscript_QBasicTimer_function_signatures[] = { + "" + // static + // prototype + , "" + , "int msec, QObject obj\nint msec, TimerType timerType, QObject obj" + , "" + , "" +"" +}; + +static const int qtscript_QBasicTimer_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 3 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QBasicTimer_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QBasicTimer::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QBasicTimer) +Q_DECLARE_METATYPE(QBasicTimer*) +Q_DECLARE_METATYPE(Qt::TimerType) + +// +// QBasicTimer +// + +static QScriptValue qtscript_QBasicTimer_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QBasicTimer* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QBasicTimer.%0(): this object is not a QBasicTimer") + .arg(qtscript_QBasicTimer_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isActive(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QObject* _q_arg1 = context->argument(1).toQObject(); + _q_self->start(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::TimerType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QObject* _q_arg2 = context->argument(2).toQObject(); + _q_self->start(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->stop(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->timerId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QBasicTimer"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QBasicTimer_throw_ambiguity_error_helper(context, + qtscript_QBasicTimer_function_names[_id+1], + qtscript_QBasicTimer_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QBasicTimer_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QBasicTimer(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QBasicTimer _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QBasicTimer_throw_ambiguity_error_helper(context, + qtscript_QBasicTimer_function_names[_id], + qtscript_QBasicTimer_function_signatures[_id]); +} + +QScriptValue qtscript_create_QBasicTimer_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QBasicTimer*)0)); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QBasicTimer_prototype_call, qtscript_QBasicTimer_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QBasicTimer_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QBasicTimer_static_call, proto, qtscript_QBasicTimer_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QBitArray.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QBitArray.cpp new file mode 100644 index 00000000..0f951ccf --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QBitArray.cpp @@ -0,0 +1,429 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QBitArray_function_names[] = { + "QBitArray" + // static + // prototype + , "at" + , "clear" + , "clearBit" + , "count" + , "fill" + , "isEmpty" + , "isNull" + , "operator_and_assign" + , "operator_assign" + , "equals" + , "operator_negate" + , "operator_or_assign" + , "operator_xor_assign" + , "resize" + , "setBit" + , "size" + , "swap" + , "testBit" + , "toggleBit" + , "truncate" + , "toString" +}; + +static const char * const qtscript_QBitArray_function_signatures[] = { + "\nQBitArray other\nint size, bool val" + // static + // prototype + , "int i" + , "" + , "int i" + , "\nbool on" + , "bool val, int first, int last\nbool val, int size" + , "" + , "" + , "QBitArray arg__1" + , "QBitArray other" + , "QBitArray other" + , "" + , "QBitArray arg__1" + , "QBitArray arg__1" + , "int size" + , "int i\nint i, bool val" + , "" + , "QBitArray other" + , "int i" + , "int i" + , "int pos" +"" +}; + +static const int qtscript_QBitArray_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 0 + , 1 + , 1 + , 3 + , 0 + , 0 + , 1 + , 1 + , 1 + , 0 + , 1 + , 1 + , 1 + , 2 + , 0 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QBitArray_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QBitArray::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QBitArray*) + +// +// QBitArray +// + +static QScriptValue qtscript_QBitArray_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 20; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QBitArray* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QBitArray.%0(): this object is not a QBitArray") + .arg(qtscript_QBitArray_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + + // TEMPLATE - core.convert_int_arg_and_check_range - START + int _q_arg0 = context->argument(0).toInt32(); + if ((_q_arg0 < 0) || (_q_self->size() < _q_arg0)) { + return context->throwError(QScriptContext::RangeError, + QString::fromLatin1("QBitArray::at(): index out of range")); + } + // TEMPLATE - core.convert_int_arg_and_check_range - END + bool _q_result = _q_self->at(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + + // TEMPLATE - core.convert_int_arg_and_check_range - START + int _q_arg0 = context->argument(0).toInt32(); + if ((_q_arg0 < 0) || (_q_self->size() < _q_arg0)) { + return context->throwError(QScriptContext::RangeError, + QString::fromLatin1("QBitArray::clearBit(): index out of range")); + } + // TEMPLATE - core.convert_int_arg_and_check_range - END + _q_self->clearBit(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + int _q_result = _q_self->count(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + bool _q_result = _q_self->fill(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + bool _q_arg0 = context->argument(0).toBoolean(); + int _q_arg1 = context->argument(1).toInt32(); + bool _q_result = _q_self->fill(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + bool _q_arg0 = context->argument(0).toBoolean(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->fill(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QBitArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->operator&=(_q_arg0); + return context->thisObject(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QBitArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->operator=(_q_arg0); + return context->thisObject(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QBitArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QBitArray _q_result = _q_self->operator~(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QBitArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->operator|=(_q_arg0); + return context->thisObject(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QBitArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->operator^=(_q_arg0); + return context->thisObject(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->resize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + + // TEMPLATE - core.convert_int_arg_and_check_range - START + int _q_arg0 = context->argument(0).toInt32(); + if ((_q_arg0 < 0) || (_q_self->size() < _q_arg0)) { + return context->throwError(QScriptContext::RangeError, + QString::fromLatin1("QBitArray::setBit(): index out of range")); + } + // TEMPLATE - core.convert_int_arg_and_check_range - END + _q_self->setBit(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + + // TEMPLATE - core.convert_int_arg_and_check_range - START + int _q_arg0 = context->argument(0).toInt32(); + if ((_q_arg0 < 0) || (_q_self->size() < _q_arg0)) { + return context->throwError(QScriptContext::RangeError, + QString::fromLatin1("QBitArray::setBit(): index out of range")); + } + // TEMPLATE - core.convert_int_arg_and_check_range - END + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setBit(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 0) { + int _q_result = _q_self->size(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QBitArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + + // TEMPLATE - core.convert_int_arg_and_check_range - START + int _q_arg0 = context->argument(0).toInt32(); + if ((_q_arg0 < 0) || (_q_self->size() < _q_arg0)) { + return context->throwError(QScriptContext::RangeError, + QString::fromLatin1("QBitArray::testBit(): index out of range")); + } + // TEMPLATE - core.convert_int_arg_and_check_range - END + bool _q_result = _q_self->testBit(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + + // TEMPLATE - core.convert_int_arg_and_check_range - START + int _q_arg0 = context->argument(0).toInt32(); + if ((_q_arg0 < 0) || (_q_self->size() < _q_arg0)) { + return context->throwError(QScriptContext::RangeError, + QString::fromLatin1("QBitArray::toggleBit(): index out of range")); + } + // TEMPLATE - core.convert_int_arg_and_check_range - END + bool _q_result = _q_self->toggleBit(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->truncate(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QBitArray_throw_ambiguity_error_helper(context, + qtscript_QBitArray_function_names[_id+1], + qtscript_QBitArray_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QBitArray_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QBitArray(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QBitArray _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QBitArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBitArray _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QBitArray _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + QBitArray _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QBitArray_throw_ambiguity_error_helper(context, + qtscript_QBitArray_function_names[_id], + qtscript_QBitArray_function_signatures[_id]); +} + +QScriptValue qtscript_create_QBitArray_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QBitArray*)0)); + for (int i = 0; i < 21; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QBitArray_prototype_call, qtscript_QBitArray_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QBitArray_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QBitArray_static_call, proto, qtscript_QBitArray_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QBuffer.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QBuffer.cpp new file mode 100644 index 00000000..a882897a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QBuffer.cpp @@ -0,0 +1,193 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QBuffer.h" + +static const char * const qtscript_QBuffer_function_names[] = { + "QBuffer" + // static + // prototype + , "setBuffer" + , "setData" + , "toString" +}; + +static const char * const qtscript_QBuffer_function_signatures[] = { + "QByteArray buf, QObject parent\nQObject parent" + // static + // prototype + , "QByteArray a" + , "QByteArray data" +"" +}; + +static const int qtscript_QBuffer_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QBuffer_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QBuffer::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QBuffer*) +Q_DECLARE_METATYPE(QtScriptShell_QBuffer*) +Q_DECLARE_METATYPE(QByteArray*) +Q_DECLARE_METATYPE(QIODevice*) + +// +// QBuffer +// + +static QScriptValue qtscript_QBuffer_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QBuffer* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QBuffer.%0(): this object is not a QBuffer") + .arg(qtscript_QBuffer_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QByteArray* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBuffer(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setData(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: { + QString result = QString::fromLatin1("QBuffer"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QBuffer_throw_ambiguity_error_helper(context, + qtscript_QBuffer_function_names[_id+1], + qtscript_QBuffer_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QBuffer_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QBuffer(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QBuffer* _q_cpp_result = new QtScriptShell_QBuffer(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QBuffer*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QByteArray* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QBuffer* _q_cpp_result = new QtScriptShell_QBuffer(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QBuffer*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isQObject()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QBuffer* _q_cpp_result = new QtScriptShell_QBuffer(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QBuffer*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QByteArray* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QBuffer* _q_cpp_result = new QtScriptShell_QBuffer(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QBuffer*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QBuffer_throw_ambiguity_error_helper(context, + qtscript_QBuffer_function_names[_id], + qtscript_QBuffer_function_signatures[_id]); +} + +static QScriptValue qtscript_QBuffer_toScriptValue(QScriptEngine *engine, QBuffer* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QBuffer_fromScriptValue(const QScriptValue &value, QBuffer* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QBuffer_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QBuffer*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QBuffer_prototype_call, qtscript_QBuffer_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QBuffer_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QBuffer_toScriptValue, + qtscript_QBuffer_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QBuffer_static_call, proto, qtscript_QBuffer_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QByteArray.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QByteArray.cpp new file mode 100644 index 00000000..faba9e6e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QByteArray.cpp @@ -0,0 +1,1233 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QByteArray_function_names[] = { + "QByteArray" + // static + , "fromBase64" + , "fromHex" + , "fromInt" + , "fromLongLong" + , "fromPercentEncoding" + , "number" + // prototype + , "append" + , "appendByte" + , "at" + , "capacity" + , "chop" + , "clear" + , "count" + , "endsWith" + , "fill" + , "indexOf" + , "indexOfByte" + , "insert" + , "insertByte" + , "isEmpty" + , "isNull" + , "isSharedWith" + , "lastIndexOf" + , "lastIndexOfByte" + , "left" + , "leftJustified" + , "length" + , "mid" + , "operator_assign" + , "equals" + , "operator_less" + , "prepend" + , "prependByte" + , "remove" + , "repeated" + , "replace" + , "reserve" + , "resize" + , "right" + , "rightJustified" + , "setDouble" + , "setFloat" + , "setInt" + , "setLongLong" + , "setRawData" + , "setShort" + , "simplified" + , "size" + , "split" + , "squeeze" + , "startsWith" + , "swap" + , "toBase64" + , "toDouble" + , "toFloat" + , "toHex" + , "toInt" + , "toLower" + , "toPercentEncoding" + , "toUShort" + , "toUpper" + , "trimmed" + , "truncate" + , "toString" +}; + +static const char * const qtscript_QByteArray_function_signatures[] = { + "\nQByteArray arg__1\nint size, char c" + // static + , "QByteArray base64" + , "QByteArray hexEncoded" + , "int arg__1, int base" + , "qlonglong arg__1, int base" + , "QByteArray pctEncoded, char percent" + , "double arg__1, char f, int prec" + // prototype + , "QByteArray a\nString s\nchar s, int len" + , "char c" + , "int i" + , "" + , "int n" + , "" + , "char c\nQByteArray a" + , "char c\nQByteArray a" + , "char c, int size" + , "QByteArray a, int from\nString s, int from" + , "char c, int from" + , "int i, QByteArray a\nint i, String s\nint i, char s, int len" + , "int i, char c" + , "" + , "" + , "QByteArray other" + , "QByteArray a, int from\nString s, int from" + , "char c, int from" + , "int len" + , "int width, char fill, bool truncate" + , "" + , "int index, int len" + , "QByteArray arg__1" + , "QByteArray a2\nString s2" + , "QByteArray a2\nString s2" + , "QByteArray a\nchar s, int len" + , "char c" + , "int index, int len" + , "int times" + , "char before, char after\nchar before, QByteArray after\nchar c, String after\nQByteArray before, QByteArray after\nString before, QByteArray after\nchar before, int bsize, char after, int asize\nint index, int len, QByteArray s\nint index, int len, char s, int alen" + , "int size" + , "int size" + , "int len" + , "int width, char fill, bool truncate" + , "double arg__1, char f, int prec" + , "float arg__1, char f, int prec" + , "int arg__1, int base" + , "qlonglong arg__1, int base" + , "char a, uint n" + , "short arg__1, int base" + , "" + , "" + , "char sep" + , "" + , "char c\nQByteArray a" + , "QByteArray other" + , "" + , "" + , "" + , "" + , "int base" + , "" + , "QByteArray exclude, QByteArray include, char percent" + , "int base" + , "" + , "" + , "int pos" +"" +}; + +static const int qtscript_QByteArray_function_lengths[] = { + 2 + // static + , 1 + , 1 + , 2 + , 2 + , 2 + , 3 + // prototype + , 2 + , 1 + , 1 + , 0 + , 1 + , 0 + , 1 + , 1 + , 2 + , 2 + , 2 + , 3 + , 2 + , 0 + , 0 + , 1 + , 2 + , 2 + , 1 + , 3 + , 0 + , 2 + , 1 + , 1 + , 1 + , 2 + , 1 + , 2 + , 1 + , 4 + , 1 + , 1 + , 1 + , 3 + , 3 + , 3 + , 2 + , 2 + , 2 + , 2 + , 0 + , 0 + , 1 + , 0 + , 1 + , 1 + , 0 + , 1 + , 1 + , 0 + , 2 + , 0 + , 3 + , 2 + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QByteArray_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QByteArray::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QByteArray*) +Q_DECLARE_METATYPE(const char*) + + + Q_DECLARE_METATYPE(QScriptValue) + +// +// QByteArray +// + +static QScriptValue qtscript_QByteArray_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 57; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QByteArray* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QByteArray.%0(): this object is not a QByteArray") + .arg(qtscript_QByteArray_function_names[_id+7])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->append(_q_arg0); + return context->thisObject(); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->append(_q_arg0); + return context->thisObject(); + } + } + if (context->argumentCount() == 2) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QByteArray& _q_result = _q_self->append(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->append(_q_arg0); + return context->thisObject(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + + // TEMPLATE - core.convert_int_arg_and_check_range - START + int _q_arg0 = context->argument(0).toInt32(); + if ((_q_arg0 < 0) || (_q_self->size() < _q_arg0)) { + return context->throwError(QScriptContext::RangeError, + QString::fromLatin1("QByteArray::at(): index out of range")); + } + // TEMPLATE - core.convert_int_arg_and_check_range - END + char _q_result = _q_self->at(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->capacity(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->chop(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->count(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->count(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 7: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->endsWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->endsWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 8: + if (context->argumentCount() == 1) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->fill(_q_arg0); + return context->thisObject(); + } + if (context->argumentCount() == 2) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->fill(_q_arg0, _q_arg1); + return context->thisObject(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->indexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + int _q_result = _q_self->indexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->indexOf(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->indexOf(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 10: + if (context->argumentCount() == 1) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->indexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->indexOf(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 2) { + if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insert(_q_arg0, _q_arg1); + return context->thisObject(); + } else if (context->argument(0).isNumber() + && context->argument(1).isString()) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->insert(_q_arg0, _q_arg1); + return context->thisObject(); + } + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QByteArray& _q_result = _q_self->insert(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insert(_q_arg0, _q_arg1); + return context->thisObject(); + } + break; + + case 13: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isSharedWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->lastIndexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + int _q_result = _q_self->lastIndexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->lastIndexOf(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->lastIndexOf(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 17: + if (context->argumentCount() == 1) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->lastIndexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->lastIndexOf(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QByteArray _q_result = _q_self->left(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QByteArray _q_result = _q_self->leftJustified(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + QByteArray _q_result = _q_self->leftJustified(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_arg2 = context->argument(2).toBoolean(); + QByteArray _q_result = _q_self->leftJustified(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + int _q_result = _q_self->length(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QByteArray _q_result = _q_self->mid(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QByteArray _q_result = _q_self->mid(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray& _q_result = _q_self->operator=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 24: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator<(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->operator<(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 25: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->prepend(_q_arg0); + return context->thisObject(); + } + if (context->argumentCount() == 2) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QByteArray& _q_result = _q_self->prepend(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 1) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->prepend(_q_arg0); + return context->thisObject(); + } + break; + + case 27: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->remove(_q_arg0, _q_arg1); + return context->thisObject(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QByteArray _q_result = _q_self->repeated(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->replace(_q_arg0, _q_arg1); + return context->thisObject(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->replace(_q_arg0, _q_arg1); + return context->thisObject(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + _q_self->replace(_q_arg0, _q_arg1); + return context->thisObject(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->replace(_q_arg0, _q_arg1); + return context->thisObject(); + } else if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->replace(_q_arg0, _q_arg1); + return context->thisObject(); + } + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QByteArray _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->replace(_q_arg0, _q_arg1, _q_arg2); + return context->thisObject(); + } + if (context->argumentCount() == 4) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber() + && qscriptvalue_cast(context->argument(2)) + && context->argument(3).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + const char* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + QByteArray& _q_result = _q_self->replace(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && qscriptvalue_cast(context->argument(2)) + && context->argument(3).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + const char* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + QByteArray& _q_result = _q_self->replace(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 30: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->reserve(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->resize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QByteArray _q_result = _q_self->right(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QByteArray _q_result = _q_self->rightJustified(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + QByteArray _q_result = _q_self->rightJustified(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_arg2 = context->argument(2).toBoolean(); + QByteArray _q_result = _q_self->rightJustified(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 34: + if (context->argumentCount() == 1) { + double _q_arg0 = context->argument(0).toNumber(); + _q_self->setNum(_q_arg0); + return context->thisObject(); + } + if (context->argumentCount() == 2) { + double _q_arg0 = context->argument(0).toNumber(); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setNum(_q_arg0, _q_arg1); + return context->thisObject(); + } + if (context->argumentCount() == 3) { + double _q_arg0 = context->argument(0).toNumber(); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setNum(_q_arg0, _q_arg1, _q_arg2); + return context->thisObject(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setNum(_q_arg0); + return context->thisObject(); + } + if (context->argumentCount() == 2) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setNum(_q_arg0, _q_arg1); + return context->thisObject(); + } + if (context->argumentCount() == 3) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setNum(_q_arg0, _q_arg1, _q_arg2); + return context->thisObject(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setNum(_q_arg0); + return context->thisObject(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setNum(_q_arg0, _q_arg1); + return context->thisObject(); + } + break; + + case 37: + if (context->argumentCount() == 1) { + qlonglong _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setNum(_q_arg0); + return context->thisObject(); + } + if (context->argumentCount() == 2) { + qlonglong _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setNum(_q_arg0, _q_arg1); + return context->thisObject(); + } + break; + + case 38: + if (context->argumentCount() == 2) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + QByteArray& _q_result = _q_self->setRawData(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 1) { + short _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setNum(_q_arg0); + return context->thisObject(); + } + if (context->argumentCount() == 2) { + short _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setNum(_q_arg0, _q_arg1); + return context->thisObject(); + } + break; + + case 40: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->simplified(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 41: + if (context->argumentCount() == 0) { + int _q_result = _q_self->size(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 42: + if (context->argumentCount() == 1) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->split(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 43: + if (context->argumentCount() == 0) { + _q_self->squeeze(); + return context->engine()->undefinedValue(); + } + break; + + case 44: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->startsWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->startsWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 45: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 46: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->toBase64(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 47: + if (context->argumentCount() == 0) { + + // TEMPLATE - core.prepare_removed_bool*_argument - START + bool __ok; + bool *_q_arg0 = &__ok; + // TEMPLATE - core.prepare_removed_bool*_argument - END + double _q_result = _q_self->toDouble(_q_arg0); + + // TEMPLATE - core.convert_to_null_or_primitive - START + QScriptValue _q_convertedResult; + if (!__ok) + _q_convertedResult = context->engine()->nullValue(); + else + _q_convertedResult = QScriptValue(context->engine(), _q_result); + // TEMPLATE - core.convert_to_null_or_primitive - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 48: + if (context->argumentCount() == 0) { + + // TEMPLATE - core.prepare_removed_bool*_argument - START + bool __ok; + bool *_q_arg0 = &__ok; + // TEMPLATE - core.prepare_removed_bool*_argument - END + float _q_result = _q_self->toFloat(_q_arg0); + + // TEMPLATE - core.convert_to_null_or_primitive - START + QScriptValue _q_convertedResult; + if (!__ok) + _q_convertedResult = context->engine()->nullValue(); + else + _q_convertedResult = QScriptValue(context->engine(), _q_result); + // TEMPLATE - core.convert_to_null_or_primitive - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 49: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->toHex(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 50: + if (context->argumentCount() == 0) { + + // TEMPLATE - core.prepare_removed_bool*_argument - START + bool __ok; + bool *_q_arg0 = &__ok; + // TEMPLATE - core.prepare_removed_bool*_argument - END + int _q_result = _q_self->toInt(_q_arg0); + + // TEMPLATE - core.convert_to_null_or_primitive - START + QScriptValue _q_convertedResult; + if (!__ok) + _q_convertedResult = context->engine()->nullValue(); + else + _q_convertedResult = QScriptValue(context->engine(), _q_result); + // TEMPLATE - core.convert_to_null_or_primitive - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + if (context->argumentCount() == 1) { + + // TEMPLATE - core.prepare_removed_bool*_argument - START + bool __ok; + bool *_q_arg0 = &__ok; + // TEMPLATE - core.prepare_removed_bool*_argument - END + int _q_arg1 = context->argument(0).toInt32(); + int _q_result = _q_self->toInt(_q_arg0, _q_arg1); + + // TEMPLATE - core.convert_to_null_or_primitive - START + QScriptValue _q_convertedResult; + if (!__ok) + _q_convertedResult = context->engine()->nullValue(); + else + _q_convertedResult = QScriptValue(context->engine(), _q_result); + // TEMPLATE - core.convert_to_null_or_primitive - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 51: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->toLower(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 52: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->toPercentEncoding(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_result = _q_self->toPercentEncoding(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QByteArray _q_result = _q_self->toPercentEncoding(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + char _q_arg2 = qscriptvalue_cast(context->argument(2)); + QByteArray _q_result = _q_self->toPercentEncoding(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 53: + if (context->argumentCount() == 0) { + + // TEMPLATE - core.prepare_removed_bool*_argument - START + bool __ok; + bool *_q_arg0 = &__ok; + // TEMPLATE - core.prepare_removed_bool*_argument - END + ushort _q_result = _q_self->toUShort(_q_arg0); + + // TEMPLATE - core.convert_to_null_or_primitive - START + QScriptValue _q_convertedResult; + if (!__ok) + _q_convertedResult = context->engine()->nullValue(); + else + _q_convertedResult = QScriptValue(context->engine(), _q_result); + // TEMPLATE - core.convert_to_null_or_primitive - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + if (context->argumentCount() == 1) { + + // TEMPLATE - core.prepare_removed_bool*_argument - START + bool __ok; + bool *_q_arg0 = &__ok; + // TEMPLATE - core.prepare_removed_bool*_argument - END + int _q_arg1 = context->argument(0).toInt32(); + ushort _q_result = _q_self->toUShort(_q_arg0, _q_arg1); + + // TEMPLATE - core.convert_to_null_or_primitive - START + QScriptValue _q_convertedResult; + if (!__ok) + _q_convertedResult = context->engine()->nullValue(); + else + _q_convertedResult = QScriptValue(context->engine(), _q_result); + // TEMPLATE - core.convert_to_null_or_primitive - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 54: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->toUpper(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 55: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->trimmed(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 56: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->truncate(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 57: { + QString result = QString::fromLatin1("QByteArray"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QByteArray_throw_ambiguity_error_helper(context, + qtscript_QByteArray_function_names[_id+7], + qtscript_QByteArray_function_signatures[_id+7]); +} + +static QScriptValue qtscript_QByteArray_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QByteArray(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QByteArray _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + QByteArray _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_result = QByteArray::fromBase64(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_result = QByteArray::fromHex(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QByteArray _q_result = QByteArray::number(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QByteArray _q_result = QByteArray::number(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + qlonglong _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_result = QByteArray::number(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + qlonglong _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QByteArray _q_result = QByteArray::number(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_result = QByteArray::fromPercentEncoding(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + QByteArray _q_result = QByteArray::fromPercentEncoding(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + double _q_arg0 = context->argument(0).toNumber(); + QByteArray _q_result = QByteArray::number(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + double _q_arg0 = context->argument(0).toNumber(); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + QByteArray _q_result = QByteArray::number(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + double _q_arg0 = context->argument(0).toNumber(); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QByteArray _q_result = QByteArray::number(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QByteArray_throw_ambiguity_error_helper(context, + qtscript_QByteArray_function_names[_id], + qtscript_QByteArray_function_signatures[_id]); +} + +QScriptValue qtscript_create_QByteArray_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QByteArray*)0)); + for (int i = 0; i < 58; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QByteArray_prototype_call, qtscript_QByteArray_function_lengths[i+7]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QByteArray_function_names[i+7]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QByteArray_static_call, proto, qtscript_QByteArray_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QByteArray_static_call, + qtscript_QByteArray_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QByteArray_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QByteArrayMatcher.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QByteArrayMatcher.cpp new file mode 100644 index 00000000..c51c3d47 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QByteArrayMatcher.cpp @@ -0,0 +1,204 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QByteArrayMatcher_function_names[] = { + "QByteArrayMatcher" + // static + // prototype + , "indexIn" + , "pattern" + , "setPattern" + , "toString" +}; + +static const char * const qtscript_QByteArrayMatcher_function_signatures[] = { + "\nQByteArray pattern\nQByteArrayMatcher other\nchar pattern, int length" + // static + // prototype + , "QByteArray ba, int from\nchar str, int len, int from" + , "" + , "QByteArray pattern" +"" +}; + +static const int qtscript_QByteArrayMatcher_function_lengths[] = { + 2 + // static + // prototype + , 3 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QByteArrayMatcher_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QByteArrayMatcher::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QByteArrayMatcher) +Q_DECLARE_METATYPE(QByteArrayMatcher*) +Q_DECLARE_METATYPE(const char*) + +// +// QByteArrayMatcher +// + +static QScriptValue qtscript_QByteArrayMatcher_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QByteArrayMatcher* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QByteArrayMatcher.%0(): this object is not a QByteArrayMatcher") + .arg(qtscript_QByteArrayMatcher_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->indexIn(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->indexIn(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->indexIn(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_result = _q_self->indexIn(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->pattern(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPattern(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: { + QString result = QString::fromLatin1("QByteArrayMatcher"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QByteArrayMatcher_throw_ambiguity_error_helper(context, + qtscript_QByteArrayMatcher_function_names[_id+1], + qtscript_QByteArrayMatcher_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QByteArrayMatcher_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QByteArrayMatcher(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QByteArrayMatcher _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArrayMatcher _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArrayMatcher _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArrayMatcher _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QByteArrayMatcher _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QByteArrayMatcher_throw_ambiguity_error_helper(context, + qtscript_QByteArrayMatcher_function_names[_id], + qtscript_QByteArrayMatcher_function_signatures[_id]); +} + +QScriptValue qtscript_create_QByteArrayMatcher_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QByteArrayMatcher*)0)); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QByteArrayMatcher_prototype_call, qtscript_QByteArrayMatcher_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QByteArrayMatcher_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QByteArrayMatcher_static_call, proto, qtscript_QByteArrayMatcher_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QChildEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QChildEvent.cpp new file mode 100644 index 00000000..347688c4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QChildEvent.cpp @@ -0,0 +1,178 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QChildEvent.h" + +static const char * const qtscript_QChildEvent_function_names[] = { + "QChildEvent" + // static + // prototype + , "added" + , "child" + , "polished" + , "removed" + , "toString" +}; + +static const char * const qtscript_QChildEvent_function_signatures[] = { + "Type type, QObject child" + // static + // prototype + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QChildEvent_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QChildEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QChildEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QtScriptShell_QChildEvent*) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QEvent*) + +// +// QChildEvent +// + +static QScriptValue qtscript_QChildEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QChildEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QChildEvent.%0(): this object is not a QChildEvent") + .arg(qtscript_QChildEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->added(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QObject* _q_result = _q_self->child(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->polished(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->removed(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QChildEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QChildEvent_throw_ambiguity_error_helper(context, + qtscript_QChildEvent_function_names[_id+1], + qtscript_QChildEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QChildEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QChildEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 2) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QChildEvent* _q_cpp_result = new QtScriptShell_QChildEvent(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QChildEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QChildEvent_throw_ambiguity_error_helper(context, + qtscript_QChildEvent_function_names[_id], + qtscript_QChildEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QChildEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QChildEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QChildEvent_prototype_call, qtscript_QChildEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QChildEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QChildEvent_static_call, proto, qtscript_QChildEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QCoreApplication.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QCoreApplication.cpp new file mode 100644 index 00000000..6d368550 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QCoreApplication.cpp @@ -0,0 +1,523 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QCoreApplication.h" + +static const char * const qtscript_QCoreApplication_function_names[] = { + "QCoreApplication" + // static + , "addLibraryPath" + , "applicationDirPath" + , "applicationFilePath" + , "applicationPid" + , "closingDown" + , "exec" + , "exit" + , "flush" + , "hasPendingEvents" + , "installTranslator" + , "instance" + , "isSetuidAllowed" + , "libraryPaths" + , "postEvent" + , "processEvents" + , "removeLibraryPath" + , "removePostedEvents" + , "removeTranslator" + , "sendEvent" + , "sendPostedEvents" + , "setAttribute" + , "setLibraryPaths" + , "setSetuidAllowed" + , "startingUp" + , "testAttribute" + , "translate" + // prototype + , "notify" + , "toString" +}; + +static const char * const qtscript_QCoreApplication_function_signatures[] = { + "int argc, char argv, int arg__3" + // static + , "String arg__1" + , "" + , "" + , "" + , "" + , "" + , "int retcode" + , "" + , "" + , "QTranslator messageFile" + , "" + , "" + , "" + , "QObject receiver, QEvent event, int priority" + , "ProcessEventsFlags flags\nProcessEventsFlags flags, int maxtime" + , "String arg__1" + , "QObject receiver, int eventType" + , "QTranslator messageFile" + , "QObject receiver, QEvent event" + , "QObject receiver, int event_type" + , "ApplicationAttribute attribute, bool on" + , "List arg__1" + , "bool allow" + , "" + , "ApplicationAttribute attribute" + , "char context, char key, char disambiguation, int n" + // prototype + , "QObject arg__1, QEvent arg__2" +"" +}; + +static const int qtscript_QCoreApplication_function_lengths[] = { + 3 + // static + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 3 + , 2 + , 1 + , 2 + , 1 + , 2 + , 2 + , 2 + , 1 + , 1 + , 0 + , 1 + , 4 + // prototype + , 2 + , 0 +}; + +static QScriptValue qtscript_QCoreApplication_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QCoreApplication::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QCoreApplication*) +Q_DECLARE_METATYPE(QtScriptShell_QCoreApplication*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTranslator*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::ApplicationAttribute) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(char**) + +// +// QCoreApplication +// + +static QScriptValue qtscript_QCoreApplication_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QCoreApplication* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QCoreApplication.%0(): this object is not a QCoreApplication") + .arg(qtscript_QCoreApplication_function_names[_id+27])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QEvent* _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->notify(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("QCoreApplication"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QCoreApplication_throw_ambiguity_error_helper(context, + qtscript_QCoreApplication_function_names[_id+27], + qtscript_QCoreApplication_function_signatures[_id+27]); +} + +static QScriptValue qtscript_QCoreApplication_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QCoreApplication(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + char** _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QCoreApplication* _q_cpp_result = new QtScriptShell_QCoreApplication(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCoreApplication*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + char** _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QtScriptShell_QCoreApplication* _q_cpp_result = new QtScriptShell_QCoreApplication(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCoreApplication*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QCoreApplication::addLibraryPath(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = QCoreApplication::applicationDirPath(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = QCoreApplication::applicationFilePath(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + qint64 _q_result = QCoreApplication::applicationPid(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = QCoreApplication::closingDown(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = QCoreApplication::exec(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QCoreApplication::exit(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QCoreApplication::exit(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QCoreApplication::flush(); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = QCoreApplication::hasPendingEvents(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QTranslator* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = QCoreApplication::installTranslator(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QCoreApplication* _q_result = QCoreApplication::instance(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + bool _q_result = QCoreApplication::isSetuidAllowed(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QStringList _q_result = QCoreApplication::libraryPaths(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QEvent* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QCoreApplication::postEvent(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QEvent* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QCoreApplication::postEvent(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QCoreApplication::processEvents(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QCoreApplication::processEvents(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QCoreApplication::processEvents(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QCoreApplication::removeLibraryPath(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QCoreApplication::removePostedEvents(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + int _q_arg1 = context->argument(1).toInt32(); + QCoreApplication::removePostedEvents(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QTranslator* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = QCoreApplication::removeTranslator(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QEvent* _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = QCoreApplication::sendEvent(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QCoreApplication::sendPostedEvents(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QCoreApplication::sendPostedEvents(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + int _q_arg1 = context->argument(1).toInt32(); + QCoreApplication::sendPostedEvents(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + Qt::ApplicationAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + QCoreApplication::setAttribute(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + Qt::ApplicationAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + QCoreApplication::setAttribute(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QCoreApplication::setLibraryPaths(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + QCoreApplication::setSetuidAllowed(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 0) { + bool _q_result = QCoreApplication::startingUp(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 1) { + Qt::ApplicationAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = QCoreApplication::testAttribute(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 2) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = QCoreApplication::translate(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + const char* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QString _q_result = QCoreApplication::translate(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + const char* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + QString _q_result = QCoreApplication::translate(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QCoreApplication_throw_ambiguity_error_helper(context, + qtscript_QCoreApplication_function_names[_id], + qtscript_QCoreApplication_function_signatures[_id]); +} + +static QScriptValue qtscript_QCoreApplication_toScriptValue(QScriptEngine *engine, QCoreApplication* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QCoreApplication_fromScriptValue(const QScriptValue &value, QCoreApplication* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QCoreApplication_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QCoreApplication*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QCoreApplication_prototype_call, qtscript_QCoreApplication_function_lengths[i+27]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QCoreApplication_function_names[i+27]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QCoreApplication_toScriptValue, + qtscript_QCoreApplication_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QCoreApplication_static_call, proto, qtscript_QCoreApplication_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 26; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QCoreApplication_static_call, + qtscript_QCoreApplication_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QCoreApplication_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QCryptographicHash.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QCryptographicHash.cpp new file mode 100644 index 00000000..a2db7735 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QCryptographicHash.cpp @@ -0,0 +1,290 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QCryptographicHash_function_names[] = { + "QCryptographicHash" + // static + , "hash" + // prototype + , "addData" + , "reset" + , "result" + , "toString" +}; + +static const char * const qtscript_QCryptographicHash_function_signatures[] = { + "Algorithm method" + // static + , "QByteArray data, Algorithm method" + // prototype + , "QIODevice device\nQByteArray data" + , "" + , "" +"" +}; + +static const int qtscript_QCryptographicHash_function_lengths[] = { + 1 + // static + , 2 + // prototype + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QCryptographicHash_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QCryptographicHash::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QCryptographicHash*) +Q_DECLARE_METATYPE(QCryptographicHash::Algorithm) +Q_DECLARE_METATYPE(QIODevice*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QCryptographicHash::Algorithm +// + +static const QCryptographicHash::Algorithm qtscript_QCryptographicHash_Algorithm_values[] = { + QCryptographicHash::Md4 + , QCryptographicHash::Md5 + , QCryptographicHash::Sha1 + , QCryptographicHash::Sha224 + , QCryptographicHash::Sha256 + , QCryptographicHash::Sha384 + , QCryptographicHash::Sha512 + , QCryptographicHash::Sha3_224 + , QCryptographicHash::Sha3_256 + , QCryptographicHash::Sha3_384 + , QCryptographicHash::Sha3_512 +}; + +static const char * const qtscript_QCryptographicHash_Algorithm_keys[] = { + "Md4" + , "Md5" + , "Sha1" + , "Sha224" + , "Sha256" + , "Sha384" + , "Sha512" + , "Sha3_224" + , "Sha3_256" + , "Sha3_384" + , "Sha3_512" +}; + +static QString qtscript_QCryptographicHash_Algorithm_toStringHelper(QCryptographicHash::Algorithm value) +{ + if ((value >= QCryptographicHash::Md4) && (value <= QCryptographicHash::Sha3_512)) + return qtscript_QCryptographicHash_Algorithm_keys[static_cast(value)-static_cast(QCryptographicHash::Md4)]; + return QString(); +} + +static QScriptValue qtscript_QCryptographicHash_Algorithm_toScriptValue(QScriptEngine *engine, const QCryptographicHash::Algorithm &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QCryptographicHash")); + return clazz.property(qtscript_QCryptographicHash_Algorithm_toStringHelper(value)); +} + +static void qtscript_QCryptographicHash_Algorithm_fromScriptValue(const QScriptValue &value, QCryptographicHash::Algorithm &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QCryptographicHash_Algorithm(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QCryptographicHash::Md4) && (arg <= QCryptographicHash::Sha3_512)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Algorithm(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QCryptographicHash_Algorithm_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QCryptographicHash::Algorithm value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QCryptographicHash_Algorithm_toString(QScriptContext *context, QScriptEngine *engine) +{ + QCryptographicHash::Algorithm value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QCryptographicHash_Algorithm_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QCryptographicHash_Algorithm_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QCryptographicHash_Algorithm, + qtscript_QCryptographicHash_Algorithm_valueOf, qtscript_QCryptographicHash_Algorithm_toString); + qScriptRegisterMetaType(engine, qtscript_QCryptographicHash_Algorithm_toScriptValue, + qtscript_QCryptographicHash_Algorithm_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 11; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QCryptographicHash_Algorithm_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QCryptographicHash_Algorithm_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QCryptographicHash +// + +static QScriptValue qtscript_QCryptographicHash_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QCryptographicHash* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QCryptographicHash.%0(): this object is not a QCryptographicHash") + .arg(qtscript_QCryptographicHash_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->addData(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addData(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->reset(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->result(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: { + QString result = QString::fromLatin1("QCryptographicHash"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QCryptographicHash_throw_ambiguity_error_helper(context, + qtscript_QCryptographicHash_function_names[_id+2], + qtscript_QCryptographicHash_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QCryptographicHash_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QCryptographicHash(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QCryptographicHash::Algorithm _q_arg0 = qscriptvalue_cast(context->argument(0)); + QCryptographicHash* _q_cpp_result = new QCryptographicHash(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QCryptographicHash::Algorithm _q_arg1 = qscriptvalue_cast(context->argument(1)); + QByteArray _q_result = QCryptographicHash::hash(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QCryptographicHash_throw_ambiguity_error_helper(context, + qtscript_QCryptographicHash_function_names[_id], + qtscript_QCryptographicHash_function_signatures[_id]); +} + +QScriptValue qtscript_create_QCryptographicHash_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QCryptographicHash*)0)); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QCryptographicHash_prototype_call, qtscript_QCryptographicHash_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QCryptographicHash_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QCryptographicHash_static_call, proto, qtscript_QCryptographicHash_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QCryptographicHash_static_call, + qtscript_QCryptographicHash_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QCryptographicHash_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("Algorithm"), + qtscript_create_QCryptographicHash_Algorithm_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDate.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDate.cpp new file mode 100644 index 00000000..897e63dc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDate.cpp @@ -0,0 +1,588 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QDate_function_names[] = { + "QDate" + // static + , "currentDate" + , "fromJulianDay" + , "fromString" + , "isLeapYear" + , "isValid" + , "longDayName" + , "longMonthName" + , "shortDayName" + , "shortMonthName" + // prototype + , "addDays" + , "addMonths" + , "addYears" + , "day" + , "dayOfWeek" + , "dayOfYear" + , "daysInMonth" + , "daysInYear" + , "daysTo" + , "getDate" + , "isNull" + , "isValid" + , "month" + , "equals" + , "operator_less" + , "setDate" + , "toJulianDay" + , "toString" + , "weekNumber" + , "year" +}; + +static const char * const qtscript_QDate_function_signatures[] = { + "\nint y, int m, int d" + // static + , "" + , "qint64 jd_" + , "String s, DateFormat f\nString s, String format" + , "int year" + , "int y, int m, int d" + , "int weekday, MonthNameType type" + , "int month, MonthNameType type" + , "int weekday, MonthNameType type" + , "int month, MonthNameType type" + // prototype + , "qint64 days" + , "int months" + , "int years" + , "" + , "" + , "" + , "" + , "" + , "QDate arg__1" + , "int year, int month, int day" + , "" + , "" + , "" + , "QDate other" + , "QDate other" + , "int year, int month, int day" + , "" + , "DateFormat f\nString format" + , "int yearNum" + , "" +}; + +static const int qtscript_QDate_function_lengths[] = { + 3 + // static + , 0 + , 1 + , 2 + , 1 + , 3 + , 2 + , 2 + , 2 + , 2 + // prototype + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 3 + , 0 + , 0 + , 0 + , 1 + , 1 + , 3 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QDate_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDate::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDate*) +Q_DECLARE_METATYPE(QDate::MonthNameType) +Q_DECLARE_METATYPE(int*) +Q_DECLARE_METATYPE(Qt::DateFormat) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QDate::MonthNameType +// + +static const QDate::MonthNameType qtscript_QDate_MonthNameType_values[] = { + QDate::DateFormat + , QDate::StandaloneFormat +}; + +static const char * const qtscript_QDate_MonthNameType_keys[] = { + "DateFormat" + , "StandaloneFormat" +}; + +static QString qtscript_QDate_MonthNameType_toStringHelper(QDate::MonthNameType value) +{ + if ((value >= QDate::DateFormat) && (value <= QDate::StandaloneFormat)) + return qtscript_QDate_MonthNameType_keys[static_cast(value)-static_cast(QDate::DateFormat)]; + return QString(); +} + +static QScriptValue qtscript_QDate_MonthNameType_toScriptValue(QScriptEngine *engine, const QDate::MonthNameType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QDate")); + return clazz.property(qtscript_QDate_MonthNameType_toStringHelper(value)); +} + +static void qtscript_QDate_MonthNameType_fromScriptValue(const QScriptValue &value, QDate::MonthNameType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QDate_MonthNameType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QDate::DateFormat) && (arg <= QDate::StandaloneFormat)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("MonthNameType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QDate_MonthNameType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDate::MonthNameType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDate_MonthNameType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDate::MonthNameType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QDate_MonthNameType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QDate_MonthNameType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QDate_MonthNameType, + qtscript_QDate_MonthNameType_valueOf, qtscript_QDate_MonthNameType_toString); + qScriptRegisterMetaType(engine, qtscript_QDate_MonthNameType_toScriptValue, + qtscript_QDate_MonthNameType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QDate_MonthNameType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QDate_MonthNameType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QDate +// + +static QScriptValue qtscript_QDate_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 20; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDate* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDate.%0(): this object is not a QDate") + .arg(qtscript_QDate_function_names[_id+10])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDate _q_result = _q_self->addDays(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QDate _q_result = _q_self->addMonths(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QDate _q_result = _q_self->addYears(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->day(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->dayOfWeek(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->dayOfYear(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = _q_self->daysInMonth(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->daysInYear(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + qint64 _q_result = _q_self->daysTo(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 3) { + int* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->getDate(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + int _q_result = _q_self->month(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator<(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + bool _q_result = _q_self->setDate(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->toJulianDay(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toString(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::DateFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = _q_self->toString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 18: + if (context->argumentCount() == 0) { + int _q_result = _q_self->weekNumber(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->weekNumber(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + int _q_result = _q_self->year(); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDate_throw_ambiguity_error_helper(context, + qtscript_QDate_function_names[_id+10], + qtscript_QDate_function_signatures[_id+10]); +} + +static QScriptValue qtscript_QDate_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDate(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDate _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QDate _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QDate _q_result = QDate::currentDate(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDate _q_result = QDate::fromJulianDay(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDate _q_result = QDate::fromString(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + Qt::DateFormat _q_arg1 = qscriptvalue_cast(context->argument(1)); + QDate _q_result = QDate::fromString(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QDate _q_result = QDate::fromString(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = QDate::isLeapYear(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + bool _q_result = QDate::isValid(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = QDate::longDayName(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QDate::MonthNameType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = QDate::longDayName(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = QDate::longMonthName(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QDate::MonthNameType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = QDate::longMonthName(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = QDate::shortDayName(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QDate::MonthNameType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = QDate::shortDayName(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = QDate::shortMonthName(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QDate::MonthNameType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = QDate::shortMonthName(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDate_throw_ambiguity_error_helper(context, + qtscript_QDate_function_names[_id], + qtscript_QDate_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDate_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDate*)0)); + for (int i = 0; i < 20; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDate_prototype_call, qtscript_QDate_function_lengths[i+10]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDate_function_names[i+10]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDate_static_call, proto, qtscript_QDate_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDate_static_call, + qtscript_QDate_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QDate_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("MonthNameType"), + qtscript_create_QDate_MonthNameType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDateTime.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDateTime.cpp new file mode 100644 index 00000000..46f0edf5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDateTime.cpp @@ -0,0 +1,638 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QDateTime_function_names[] = { + "QDateTime" + // static + , "currentDateTime" + , "currentDateTimeUtc" + , "currentMSecsSinceEpoch" + , "fromMSecsSinceEpoch" + , "fromString" + , "fromTime_t" + // prototype + , "addDays" + , "addMSecs" + , "addMonths" + , "addSecs" + , "addYears" + , "date" + , "daysTo" + , "isDaylightTime" + , "isNull" + , "isValid" + , "msecsTo" + , "offsetFromUtc" + , "equals" + , "operator_less" + , "secsTo" + , "setDate" + , "setMSecsSinceEpoch" + , "setOffsetFromUtc" + , "setTime" + , "setTimeSpec" + , "setTime_t" + , "setUtcOffset" + , "swap" + , "time" + , "timeSpec" + , "timeZoneAbbreviation" + , "toLocalTime" + , "toMSecsSinceEpoch" + , "toOffsetFromUtc" + , "toString" + , "toTimeSpec" + , "toTime_t" + , "toUTC" + , "utcOffset" +}; + +static const char * const qtscript_QDateTime_function_signatures[] = { + "\nQDate arg__1\nQDate arg__1, QTime arg__2, TimeSpec spec\nQDate date, QTime time, TimeSpec spec, int offsetSeconds\nQDateTime other" + // static + , "" + , "" + , "" + , "qint64 msecs\nqint64 msecs, TimeSpec spec, int offsetFromUtc" + , "String s, DateFormat f\nString s, String format" + , "uint secsSince1Jan1970UTC\nuint secsSince1Jan1970UTC, TimeSpec spec, int offsetFromUtc" + // prototype + , "qint64 days" + , "qint64 msecs" + , "int months" + , "qint64 secs" + , "int years" + , "" + , "QDateTime arg__1" + , "" + , "" + , "" + , "QDateTime arg__1" + , "" + , "QDateTime other" + , "QDateTime other" + , "QDateTime arg__1" + , "QDate date" + , "qint64 msecs" + , "int offsetSeconds" + , "QTime time" + , "TimeSpec spec" + , "uint secsSince1Jan1970UTC" + , "int seconds" + , "QDateTime other" + , "" + , "" + , "" + , "" + , "" + , "int offsetSeconds" + , "DateFormat f\nString format" + , "TimeSpec spec" + , "" + , "" + , "" +}; + +static const int qtscript_QDateTime_function_lengths[] = { + 4 + // static + , 0 + , 0 + , 0 + , 3 + , 2 + , 3 + // prototype + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 1 + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QDateTime_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDateTime::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDateTime*) +Q_DECLARE_METATYPE(Qt::TimeSpec) +Q_DECLARE_METATYPE(Qt::DateFormat) + +// +// QDateTime +// + +static QScriptValue qtscript_QDateTime_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 34; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDateTime* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDateTime.%0(): this object is not a QDateTime") + .arg(qtscript_QDateTime_function_names[_id+7])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDateTime _q_result = _q_self->addDays(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDateTime _q_result = _q_self->addMSecs(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QDateTime _q_result = _q_self->addMonths(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDateTime _q_result = _q_self->addSecs(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QDateTime _q_result = _q_self->addYears(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QDate _q_result = _q_self->date(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QDateTime _q_arg0 = context->argument(0).toDateTime(); + qint64 _q_result = _q_self->daysTo(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isDaylightTime(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QDateTime _q_arg0 = context->argument(0).toDateTime(); + qint64 _q_result = _q_self->msecsTo(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + int _q_result = _q_self->offsetFromUtc(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QDateTime _q_arg0 = context->argument(0).toDateTime(); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QDateTime _q_arg0 = context->argument(0).toDateTime(); + bool _q_result = _q_self->operator<(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QDateTime _q_arg0 = context->argument(0).toDateTime(); + qint64 _q_result = _q_self->secsTo(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDate(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMSecsSinceEpoch(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setOffsetFromUtc(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QTime _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTime(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + Qt::TimeSpec _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTimeSpec(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + _q_self->setTime_t(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setUtcOffset(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QDateTime _q_arg0 = context->argument(0).toDateTime(); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 0) { + QTime _q_result = _q_self->time(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + Qt::TimeSpec _q_result = _q_self->timeSpec(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->timeZoneAbbreviation(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + QDateTime _q_result = _q_self->toLocalTime(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->toMSecsSinceEpoch(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QDateTime _q_result = _q_self->toOffsetFromUtc(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toString(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::DateFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = _q_self->toString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 30: + if (context->argumentCount() == 1) { + Qt::TimeSpec _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDateTime _q_result = _q_self->toTimeSpec(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 0) { + uint _q_result = _q_self->toTime_t(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 0) { + QDateTime _q_result = _q_self->toUTC(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 0) { + int _q_result = _q_self->utcOffset(); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDateTime_throw_ambiguity_error_helper(context, + qtscript_QDateTime_function_names[_id+7], + qtscript_QDateTime_function_signatures[_id+7]); +} + +static QScriptValue qtscript_QDateTime_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDateTime(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDateTime _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDateTime _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QDateTime _q_arg0 = context->argument(0).toDateTime(); + QDateTime _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTime _q_arg1 = qscriptvalue_cast(context->argument(1)); + QDateTime _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTime _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::TimeSpec _q_arg2 = qscriptvalue_cast(context->argument(2)); + QDateTime _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTime _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::TimeSpec _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + QDateTime _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QDateTime _q_result = QDateTime::currentDateTime(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QDateTime _q_result = QDateTime::currentDateTimeUtc(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + qint64 _q_result = QDateTime::currentMSecsSinceEpoch(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDateTime _q_result = QDateTime::fromMSecsSinceEpoch(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::TimeSpec _q_arg1 = qscriptvalue_cast(context->argument(1)); + QDateTime _q_result = QDateTime::fromMSecsSinceEpoch(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::TimeSpec _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QDateTime _q_result = QDateTime::fromMSecsSinceEpoch(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDateTime _q_result = QDateTime::fromString(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + Qt::DateFormat _q_arg1 = qscriptvalue_cast(context->argument(1)); + QDateTime _q_result = QDateTime::fromString(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QDateTime _q_result = QDateTime::fromString(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 6: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + QDateTime _q_result = QDateTime::fromTime_t(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + uint _q_arg0 = context->argument(0).toUInt32(); + Qt::TimeSpec _q_arg1 = qscriptvalue_cast(context->argument(1)); + QDateTime _q_result = QDateTime::fromTime_t(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + uint _q_arg0 = context->argument(0).toUInt32(); + Qt::TimeSpec _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QDateTime _q_result = QDateTime::fromTime_t(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDateTime_throw_ambiguity_error_helper(context, + qtscript_QDateTime_function_names[_id], + qtscript_QDateTime_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDateTime_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDateTime*)0)); + for (int i = 0; i < 34; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDateTime_prototype_call, qtscript_QDateTime_function_lengths[i+7]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDateTime_function_names[i+7]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDateTime_static_call, proto, qtscript_QDateTime_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDateTime_static_call, + qtscript_QDateTime_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QDateTime_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDir.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDir.cpp new file mode 100644 index 00000000..a8aa253a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDir.cpp @@ -0,0 +1,1268 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QDir_function_names[] = { + "QDir" + // static + , "addSearchPath" + , "cleanPath" + , "current" + , "currentPath" + , "drives" + , "fromNativeSeparators" + , "home" + , "homePath" + , "isAbsolutePath" + , "isRelativePath" + , "listSeparator" + , "match" + , "nameFiltersFromString" + , "root" + , "rootPath" + , "searchPaths" + , "separator" + , "setCurrent" + , "setSearchPaths" + , "temp" + , "tempPath" + , "toNativeSeparators" + // prototype + , "absoluteFilePath" + , "absolutePath" + , "canonicalPath" + , "cd" + , "cdUp" + , "count" + , "dirName" + , "entryInfoList" + , "entryList" + , "exists" + , "filePath" + , "filter" + , "isAbsolute" + , "isReadable" + , "isRelative" + , "isRoot" + , "makeAbsolute" + , "mkdir" + , "mkpath" + , "nameFilters" + , "equals" + , "operator_subscript" + , "path" + , "refresh" + , "relativeFilePath" + , "remove" + , "removeRecursively" + , "rename" + , "rmdir" + , "rmpath" + , "setFilter" + , "setNameFilters" + , "setPath" + , "setSorting" + , "sorting" + , "swap" + , "toString" +}; + +static const char * const qtscript_QDir_function_signatures[] = { + "QDir arg__1\nString path\nString path, String nameFilter, SortFlags sort, Filters filter" + // static + , "String prefix, String path" + , "String path" + , "" + , "" + , "" + , "String pathName" + , "" + , "" + , "String path" + , "String path" + , "" + , "String filter, String fileName\nList filters, String fileName" + , "String nameFilter" + , "" + , "" + , "String prefix" + , "" + , "String path" + , "String prefix, List searchPaths" + , "" + , "" + , "String pathName" + // prototype + , "String fileName" + , "" + , "" + , "String dirName" + , "" + , "" + , "" + , "Filters filters, SortFlags sort\nList nameFilters, Filters filters, SortFlags sort" + , "Filters filters, SortFlags sort\nList nameFilters, Filters filters, SortFlags sort" + , "\nString name" + , "String fileName" + , "" + , "" + , "" + , "" + , "" + , "" + , "String dirName" + , "String dirPath" + , "" + , "QDir dir" + , "int arg__1" + , "" + , "" + , "String fileName" + , "String fileName" + , "" + , "String oldName, String newName" + , "String dirName" + , "String dirPath" + , "Filters filter" + , "List nameFilters" + , "String path" + , "SortFlags sort" + , "" + , "QDir other" +"" +}; + +static const int qtscript_QDir_function_lengths[] = { + 4 + // static + , 2 + , 1 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 1 + , 0 + , 2 + , 1 + , 0 + , 0 + , 1 + , 0 + , 1 + , 2 + , 0 + , 0 + , 1 + // prototype + , 1 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 3 + , 3 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 1 + , 1 + , 0 + , 0 + , 1 + , 1 + , 0 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QDir_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDir::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDir) +Q_DECLARE_METATYPE(QDir*) +Q_DECLARE_METATYPE(QDir::SortFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QDir::Filter) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QList) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QDir::SortFlag +// + +static const QDir::SortFlag qtscript_QDir_SortFlag_values[] = { + QDir::NoSort + , QDir::Name + , QDir::Time + , QDir::Size + , QDir::Unsorted + , QDir::DirsFirst + , QDir::Reversed + , QDir::IgnoreCase + , QDir::DirsLast + , QDir::LocaleAware + , QDir::Type +}; + +static const char * const qtscript_QDir_SortFlag_keys[] = { + "NoSort" + , "Name" + , "Time" + , "Size" + , "Unsorted" + , "DirsFirst" + , "Reversed" + , "IgnoreCase" + , "DirsLast" + , "LocaleAware" + , "Type" +}; + +static QString qtscript_QDir_SortFlag_toStringHelper(QDir::SortFlag value) +{ + for (int i = 0; i < 11; ++i) { + if (qtscript_QDir_SortFlag_values[i] == value) + return QString::fromLatin1(qtscript_QDir_SortFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QDir_SortFlag_toScriptValue(QScriptEngine *engine, const QDir::SortFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QDir")); + return clazz.property(qtscript_QDir_SortFlag_toStringHelper(value)); +} + +static void qtscript_QDir_SortFlag_fromScriptValue(const QScriptValue &value, QDir::SortFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QDir_SortFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 11; ++i) { + if (qtscript_QDir_SortFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("SortFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QDir_SortFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDir::SortFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDir_SortFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDir::SortFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QDir_SortFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QDir_SortFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QDir_SortFlag, + qtscript_QDir_SortFlag_valueOf, qtscript_QDir_SortFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QDir_SortFlag_toScriptValue, + qtscript_QDir_SortFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 11; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QDir_SortFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QDir_SortFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QDir::SortFlags +// + +static QScriptValue qtscript_QDir_SortFlags_toScriptValue(QScriptEngine *engine, const QDir::SortFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QDir_SortFlags_fromScriptValue(const QScriptValue &value, QDir::SortFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QDir_SortFlags(QScriptContext *context, QScriptEngine *engine) +{ + QDir::SortFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("SortFlags(): argument %0 is not of type SortFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QDir_SortFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDir::SortFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDir_SortFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDir::SortFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 11; ++i) { + if ((value & qtscript_QDir_SortFlag_values[i]) == qtscript_QDir_SortFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QDir_SortFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QDir_SortFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QDir_SortFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QDir_SortFlags, qtscript_QDir_SortFlags_valueOf, + qtscript_QDir_SortFlags_toString, qtscript_QDir_SortFlags_equals); + qScriptRegisterMetaType(engine, qtscript_QDir_SortFlags_toScriptValue, + qtscript_QDir_SortFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QDir::Filter +// + +static const QDir::Filter qtscript_QDir_Filter_values[] = { + QDir::NoFilter + , QDir::Dirs + , QDir::Files + , QDir::Drives + , QDir::AllEntries + , QDir::NoSymLinks + , QDir::TypeMask + , QDir::Readable + , QDir::Writable + , QDir::Executable + , QDir::PermissionMask + , QDir::Modified + , QDir::Hidden + , QDir::System + , QDir::AccessMask + , QDir::AllDirs + , QDir::CaseSensitive + , QDir::NoDot + , QDir::NoDotDot + , QDir::NoDotAndDotDot +}; + +static const char * const qtscript_QDir_Filter_keys[] = { + "NoFilter" + , "Dirs" + , "Files" + , "Drives" + , "AllEntries" + , "NoSymLinks" + , "TypeMask" + , "Readable" + , "Writable" + , "Executable" + , "PermissionMask" + , "Modified" + , "Hidden" + , "System" + , "AccessMask" + , "AllDirs" + , "CaseSensitive" + , "NoDot" + , "NoDotDot" + , "NoDotAndDotDot" +}; + +static QString qtscript_QDir_Filter_toStringHelper(QDir::Filter value) +{ + for (int i = 0; i < 20; ++i) { + if (qtscript_QDir_Filter_values[i] == value) + return QString::fromLatin1(qtscript_QDir_Filter_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QDir_Filter_toScriptValue(QScriptEngine *engine, const QDir::Filter &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QDir")); + return clazz.property(qtscript_QDir_Filter_toStringHelper(value)); +} + +static void qtscript_QDir_Filter_fromScriptValue(const QScriptValue &value, QDir::Filter &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QDir_Filter(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 20; ++i) { + if (qtscript_QDir_Filter_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Filter(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QDir_Filter_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDir::Filter value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDir_Filter_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDir::Filter value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QDir_Filter_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QDir_Filter_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QDir_Filter, + qtscript_QDir_Filter_valueOf, qtscript_QDir_Filter_toString); + qScriptRegisterMetaType(engine, qtscript_QDir_Filter_toScriptValue, + qtscript_QDir_Filter_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 20; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QDir_Filter_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QDir_Filter_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QDir::Filters +// + +static QScriptValue qtscript_QDir_Filters_toScriptValue(QScriptEngine *engine, const QDir::Filters &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QDir_Filters_fromScriptValue(const QScriptValue &value, QDir::Filters &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QDir_Filters(QScriptContext *context, QScriptEngine *engine) +{ + QDir::Filters result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("Filters(): argument %0 is not of type Filter").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QDir_Filters_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDir::Filters value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDir_Filters_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDir::Filters value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 20; ++i) { + if ((value & qtscript_QDir_Filter_values[i]) == qtscript_QDir_Filter_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QDir_Filter_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QDir_Filters_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QDir_Filters_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QDir_Filters, qtscript_QDir_Filters_valueOf, + qtscript_QDir_Filters_toString, qtscript_QDir_Filters_equals); + qScriptRegisterMetaType(engine, qtscript_QDir_Filters_toScriptValue, + qtscript_QDir_Filters_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QDir +// + +static QScriptValue qtscript_QDir_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 36; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDir* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDir.%0(): this object is not a QDir") + .arg(qtscript_QDir_function_names[_id+23])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = _q_self->absoluteFilePath(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->absolutePath(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->canonicalPath(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->cd(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->cdUp(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + uint _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->dirName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->entryInfoList(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QList _q_result = _q_self->entryInfoList(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if (context->argument(0).isArray()) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QList _q_result = _q_self->entryInfoList(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId >() == context->argument(0).toVariant().userType()) + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QList _q_result = _q_self->entryInfoList(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if (context->argument(0).isArray() + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QList _q_result = _q_self->entryInfoList(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QList _q_result = _q_self->entryInfoList(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->entryList(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QStringList _q_result = _q_self->entryList(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if (context->argument(0).isArray()) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QStringList _q_result = _q_self->entryList(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId >() == context->argument(0).toVariant().userType()) + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QStringList _q_result = _q_self->entryList(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if (context->argument(0).isArray() + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QStringList _q_result = _q_self->entryList(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QStringList _q_result = _q_self->entryList(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->exists(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->exists(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = _q_self->filePath(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->filter(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isAbsolute(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isReadable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isRelative(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isRoot(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->makeAbsolute(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->mkdir(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->mkpath(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->nameFilters(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QDir _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->operator[](_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->path(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + _q_self->refresh(); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = _q_self->relativeFilePath(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->remove(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->removeRecursively(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = _q_self->rename(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->rmdir(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->rmpath(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setFilter(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setNameFilters(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPath(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setSorting(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->sorting(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 35: + if (context->argumentCount() == 1) { + QDir _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 36: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDir_throw_ambiguity_error_helper(context, + qtscript_QDir_function_names[_id+23], + qtscript_QDir_function_signatures[_id+23]); +} + +static QScriptValue qtscript_QDir_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDir(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDir _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QDir _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDir _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QDir _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QDir _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QDir _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QDir _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QDir::addSearchPath(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = QDir::cleanPath(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QDir _q_result = QDir::current(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = QDir::currentPath(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QList _q_result = QDir::drives(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = QDir::fromNativeSeparators(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QDir _q_result = QDir::home(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QString _q_result = QDir::homePath(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = QDir::isAbsolutePath(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = QDir::isRelativePath(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QChar _q_result = QDir::listSeparator(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = QDir::match(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isArray() + && context->argument(1).isString()) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = QDir::match(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 13: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_result = QDir::nameFiltersFromString(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QDir _q_result = QDir::root(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QString _q_result = QDir::rootPath(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_result = QDir::searchPaths(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QChar _q_result = QDir::separator(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = QDir::setCurrent(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + QDir::setSearchPaths(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QDir _q_result = QDir::temp(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + QString _q_result = QDir::tempPath(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = QDir::toNativeSeparators(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDir_throw_ambiguity_error_helper(context, + qtscript_QDir_function_names[_id], + qtscript_QDir_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDir_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDir*)0)); + for (int i = 0; i < 37; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDir_prototype_call, qtscript_QDir_function_lengths[i+23]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDir_function_names[i+23]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDir_static_call, proto, qtscript_QDir_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 22; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDir_static_call, + qtscript_QDir_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QDir_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("SortFlag"), + qtscript_create_QDir_SortFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("SortFlags"), + qtscript_create_QDir_SortFlags_class(engine)); + ctor.setProperty(QString::fromLatin1("Filter"), + qtscript_create_QDir_Filter_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Filters"), + qtscript_create_QDir_Filters_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDirIterator.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDirIterator.cpp new file mode 100644 index 00000000..34a489ff --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDirIterator.cpp @@ -0,0 +1,444 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QDirIterator_function_names[] = { + "QDirIterator" + // static + // prototype + , "fileInfo" + , "fileName" + , "filePath" + , "hasNext" + , "next" + , "path" + , "toString" +}; + +static const char * const qtscript_QDirIterator_function_signatures[] = { + "QDir dir, IteratorFlags flags\nString path, Filters filter, IteratorFlags flags\nString path, IteratorFlags flags\nString path, List nameFilters, Filters filters, IteratorFlags flags" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QDirIterator_function_lengths[] = { + 4 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QDirIterator_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDirIterator::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDirIterator*) +Q_DECLARE_METATYPE(QDirIterator::IteratorFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QDir) +Q_DECLARE_METATYPE(QFlags) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QDirIterator::IteratorFlag +// + +static const QDirIterator::IteratorFlag qtscript_QDirIterator_IteratorFlag_values[] = { + QDirIterator::NoIteratorFlags + , QDirIterator::FollowSymlinks + , QDirIterator::Subdirectories +}; + +static const char * const qtscript_QDirIterator_IteratorFlag_keys[] = { + "NoIteratorFlags" + , "FollowSymlinks" + , "Subdirectories" +}; + +static QString qtscript_QDirIterator_IteratorFlag_toStringHelper(QDirIterator::IteratorFlag value) +{ + if ((value >= QDirIterator::NoIteratorFlags) && (value <= QDirIterator::Subdirectories)) + return qtscript_QDirIterator_IteratorFlag_keys[static_cast(value)-static_cast(QDirIterator::NoIteratorFlags)]; + return QString(); +} + +static QScriptValue qtscript_QDirIterator_IteratorFlag_toScriptValue(QScriptEngine *engine, const QDirIterator::IteratorFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QDirIterator")); + return clazz.property(qtscript_QDirIterator_IteratorFlag_toStringHelper(value)); +} + +static void qtscript_QDirIterator_IteratorFlag_fromScriptValue(const QScriptValue &value, QDirIterator::IteratorFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QDirIterator_IteratorFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QDirIterator::NoIteratorFlags) && (arg <= QDirIterator::Subdirectories)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("IteratorFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QDirIterator_IteratorFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDirIterator::IteratorFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDirIterator_IteratorFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDirIterator::IteratorFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QDirIterator_IteratorFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QDirIterator_IteratorFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QDirIterator_IteratorFlag, + qtscript_QDirIterator_IteratorFlag_valueOf, qtscript_QDirIterator_IteratorFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QDirIterator_IteratorFlag_toScriptValue, + qtscript_QDirIterator_IteratorFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QDirIterator_IteratorFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QDirIterator_IteratorFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QDirIterator::IteratorFlags +// + +static QScriptValue qtscript_QDirIterator_IteratorFlags_toScriptValue(QScriptEngine *engine, const QDirIterator::IteratorFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QDirIterator_IteratorFlags_fromScriptValue(const QScriptValue &value, QDirIterator::IteratorFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QDirIterator_IteratorFlags(QScriptContext *context, QScriptEngine *engine) +{ + QDirIterator::IteratorFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("IteratorFlags(): argument %0 is not of type IteratorFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QDirIterator_IteratorFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDirIterator::IteratorFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDirIterator_IteratorFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDirIterator::IteratorFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 3; ++i) { + if ((value & qtscript_QDirIterator_IteratorFlag_values[i]) == qtscript_QDirIterator_IteratorFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QDirIterator_IteratorFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QDirIterator_IteratorFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QDirIterator_IteratorFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QDirIterator_IteratorFlags, qtscript_QDirIterator_IteratorFlags_valueOf, + qtscript_QDirIterator_IteratorFlags_toString, qtscript_QDirIterator_IteratorFlags_equals); + qScriptRegisterMetaType(engine, qtscript_QDirIterator_IteratorFlags_toScriptValue, + qtscript_QDirIterator_IteratorFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QDirIterator +// + +static QScriptValue qtscript_QDirIterator_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDirIterator* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDirIterator.%0(): this object is not a QDirIterator") + .arg(qtscript_QDirIterator_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QFileInfo _q_result = _q_self->fileInfo(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->fileName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->filePath(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasNext(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->next(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->path(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: { + QString result = QString::fromLatin1("QDirIterator"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDirIterator_throw_ambiguity_error_helper(context, + qtscript_QDirIterator_function_names[_id+1], + qtscript_QDirIterator_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDirIterator_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDirIterator(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QDir _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDirIterator* _q_cpp_result = new QDirIterator(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QDirIterator* _q_cpp_result = new QDirIterator(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QDir _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QDirIterator* _q_cpp_result = new QDirIterator(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString() + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QDirIterator* _q_cpp_result = new QDirIterator(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString() + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QDirIterator* _q_cpp_result = new QDirIterator(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString() + && context->argument(1).isArray()) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + QDirIterator* _q_cpp_result = new QDirIterator(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 3) { + if (context->argument(0).isString() + && (qMetaTypeId >() == context->argument(1).toVariant().userType()) + && (qMetaTypeId >() == context->argument(2).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QDirIterator* _q_cpp_result = new QDirIterator(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString() + && context->argument(1).isArray() + && (qMetaTypeId >() == context->argument(2).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QDirIterator* _q_cpp_result = new QDirIterator(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 4) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QDirIterator* _q_cpp_result = new QDirIterator(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDirIterator_throw_ambiguity_error_helper(context, + qtscript_QDirIterator_function_names[_id], + qtscript_QDirIterator_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDirIterator_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDirIterator*)0)); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDirIterator_prototype_call, qtscript_QDirIterator_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDirIterator_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDirIterator_static_call, proto, qtscript_QDirIterator_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("IteratorFlag"), + qtscript_create_QDirIterator_IteratorFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("IteratorFlags"), + qtscript_create_QDirIterator_IteratorFlags_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDynamicPropertyChangeEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDynamicPropertyChangeEvent.cpp new file mode 100644 index 00000000..695463fd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QDynamicPropertyChangeEvent.cpp @@ -0,0 +1,142 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QDynamicPropertyChangeEvent_function_names[] = { + "QDynamicPropertyChangeEvent" + // static + // prototype + , "propertyName" + , "toString" +}; + +static const char * const qtscript_QDynamicPropertyChangeEvent_function_signatures[] = { + "QByteArray name" + // static + // prototype + , "" +"" +}; + +static const int qtscript_QDynamicPropertyChangeEvent_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 +}; + +static QScriptValue qtscript_QDynamicPropertyChangeEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDynamicPropertyChangeEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDynamicPropertyChangeEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QDynamicPropertyChangeEvent +// + +static QScriptValue qtscript_QDynamicPropertyChangeEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDynamicPropertyChangeEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDynamicPropertyChangeEvent.%0(): this object is not a QDynamicPropertyChangeEvent") + .arg(qtscript_QDynamicPropertyChangeEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->propertyName(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("QDynamicPropertyChangeEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDynamicPropertyChangeEvent_throw_ambiguity_error_helper(context, + qtscript_QDynamicPropertyChangeEvent_function_names[_id+1], + qtscript_QDynamicPropertyChangeEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDynamicPropertyChangeEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDynamicPropertyChangeEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDynamicPropertyChangeEvent* _q_cpp_result = new QDynamicPropertyChangeEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDynamicPropertyChangeEvent_throw_ambiguity_error_helper(context, + qtscript_QDynamicPropertyChangeEvent_function_names[_id], + qtscript_QDynamicPropertyChangeEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDynamicPropertyChangeEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDynamicPropertyChangeEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDynamicPropertyChangeEvent_prototype_call, qtscript_QDynamicPropertyChangeEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDynamicPropertyChangeEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDynamicPropertyChangeEvent_static_call, proto, qtscript_QDynamicPropertyChangeEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QEasingCurve.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QEasingCurve.cpp new file mode 100644 index 00000000..2d1a542f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QEasingCurve.cpp @@ -0,0 +1,460 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QEasingCurve_function_names[] = { + "QEasingCurve" + // static + // prototype + , "addCubicBezierSegment" + , "addTCBSegment" + , "amplitude" + , "overshoot" + , "period" + , "setAmplitude" + , "setOvershoot" + , "setPeriod" + , "setType" + , "swap" + , "toCubicSpline" + , "type" + , "valueForProgress" + , "toString" +}; + +static const char * const qtscript_QEasingCurve_function_signatures[] = { + "Type type" + // static + // prototype + , "QPointF c1, QPointF c2, QPointF endPoint" + , "QPointF nextPoint, qreal t, qreal c, qreal b" + , "" + , "" + , "" + , "qreal amplitude" + , "qreal overshoot" + , "qreal period" + , "Type type" + , "QEasingCurve other" + , "" + , "" + , "qreal progress" +"" +}; + +static const int qtscript_QEasingCurve_function_lengths[] = { + 1 + // static + // prototype + , 3 + , 4 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QEasingCurve_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QEasingCurve::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QEasingCurve*) +Q_DECLARE_METATYPE(QEasingCurve::Type) +Q_DECLARE_METATYPE(QVector) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QEasingCurve::Type +// + +static const QEasingCurve::Type qtscript_QEasingCurve_Type_values[] = { + QEasingCurve::Linear + , QEasingCurve::InQuad + , QEasingCurve::OutQuad + , QEasingCurve::InOutQuad + , QEasingCurve::OutInQuad + , QEasingCurve::InCubic + , QEasingCurve::OutCubic + , QEasingCurve::InOutCubic + , QEasingCurve::OutInCubic + , QEasingCurve::InQuart + , QEasingCurve::OutQuart + , QEasingCurve::InOutQuart + , QEasingCurve::OutInQuart + , QEasingCurve::InQuint + , QEasingCurve::OutQuint + , QEasingCurve::InOutQuint + , QEasingCurve::OutInQuint + , QEasingCurve::InSine + , QEasingCurve::OutSine + , QEasingCurve::InOutSine + , QEasingCurve::OutInSine + , QEasingCurve::InExpo + , QEasingCurve::OutExpo + , QEasingCurve::InOutExpo + , QEasingCurve::OutInExpo + , QEasingCurve::InCirc + , QEasingCurve::OutCirc + , QEasingCurve::InOutCirc + , QEasingCurve::OutInCirc + , QEasingCurve::InElastic + , QEasingCurve::OutElastic + , QEasingCurve::InOutElastic + , QEasingCurve::OutInElastic + , QEasingCurve::InBack + , QEasingCurve::OutBack + , QEasingCurve::InOutBack + , QEasingCurve::OutInBack + , QEasingCurve::InBounce + , QEasingCurve::OutBounce + , QEasingCurve::InOutBounce + , QEasingCurve::OutInBounce + , QEasingCurve::InCurve + , QEasingCurve::OutCurve + , QEasingCurve::SineCurve + , QEasingCurve::CosineCurve + , QEasingCurve::BezierSpline + , QEasingCurve::TCBSpline + , QEasingCurve::Custom + , QEasingCurve::NCurveTypes +}; + +static const char * const qtscript_QEasingCurve_Type_keys[] = { + "Linear" + , "InQuad" + , "OutQuad" + , "InOutQuad" + , "OutInQuad" + , "InCubic" + , "OutCubic" + , "InOutCubic" + , "OutInCubic" + , "InQuart" + , "OutQuart" + , "InOutQuart" + , "OutInQuart" + , "InQuint" + , "OutQuint" + , "InOutQuint" + , "OutInQuint" + , "InSine" + , "OutSine" + , "InOutSine" + , "OutInSine" + , "InExpo" + , "OutExpo" + , "InOutExpo" + , "OutInExpo" + , "InCirc" + , "OutCirc" + , "InOutCirc" + , "OutInCirc" + , "InElastic" + , "OutElastic" + , "InOutElastic" + , "OutInElastic" + , "InBack" + , "OutBack" + , "InOutBack" + , "OutInBack" + , "InBounce" + , "OutBounce" + , "InOutBounce" + , "OutInBounce" + , "InCurve" + , "OutCurve" + , "SineCurve" + , "CosineCurve" + , "BezierSpline" + , "TCBSpline" + , "Custom" + , "NCurveTypes" +}; + +static QString qtscript_QEasingCurve_Type_toStringHelper(QEasingCurve::Type value) +{ + if ((value >= QEasingCurve::Linear) && (value <= QEasingCurve::NCurveTypes)) + return qtscript_QEasingCurve_Type_keys[static_cast(value)-static_cast(QEasingCurve::Linear)]; + return QString(); +} + +static QScriptValue qtscript_QEasingCurve_Type_toScriptValue(QScriptEngine *engine, const QEasingCurve::Type &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QEasingCurve")); + return clazz.property(qtscript_QEasingCurve_Type_toStringHelper(value)); +} + +static void qtscript_QEasingCurve_Type_fromScriptValue(const QScriptValue &value, QEasingCurve::Type &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QEasingCurve_Type(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QEasingCurve::Linear) && (arg <= QEasingCurve::NCurveTypes)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Type(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QEasingCurve_Type_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QEasingCurve::Type value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QEasingCurve_Type_toString(QScriptContext *context, QScriptEngine *engine) +{ + QEasingCurve::Type value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QEasingCurve_Type_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QEasingCurve_Type_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QEasingCurve_Type, + qtscript_QEasingCurve_Type_valueOf, qtscript_QEasingCurve_Type_toString); + qScriptRegisterMetaType(engine, qtscript_QEasingCurve_Type_toScriptValue, + qtscript_QEasingCurve_Type_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 49; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QEasingCurve_Type_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QEasingCurve_Type_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QEasingCurve +// + +static QScriptValue qtscript_QEasingCurve_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 13; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QEasingCurve* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QEasingCurve.%0(): this object is not a QEasingCurve") + .arg(qtscript_QEasingCurve_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 3) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->addCubicBezierSegment(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 4) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->addTCBSegment(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->amplitude(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->overshoot(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->period(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setAmplitude(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOvershoot(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPeriod(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QEasingCurve::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setType(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QEasingCurve _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QVector _q_result = _q_self->toCubicSpline(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QEasingCurve::Type _q_result = _q_self->type(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->valueForProgress(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QEasingCurve_throw_ambiguity_error_helper(context, + qtscript_QEasingCurve_function_names[_id+1], + qtscript_QEasingCurve_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QEasingCurve_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QEasingCurve(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QEasingCurve _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QEasingCurve::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QEasingCurve _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QEasingCurve_throw_ambiguity_error_helper(context, + qtscript_QEasingCurve_function_names[_id], + qtscript_QEasingCurve_function_signatures[_id]); +} + +QScriptValue qtscript_create_QEasingCurve_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QEasingCurve*)0)); + for (int i = 0; i < 14; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QEasingCurve_prototype_call, qtscript_QEasingCurve_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QEasingCurve_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QEasingCurve_static_call, proto, qtscript_QEasingCurve_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Type"), + qtscript_create_QEasingCurve_Type_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QEvent.cpp new file mode 100644 index 00000000..93282ce6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QEvent.cpp @@ -0,0 +1,657 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +#include "qtscriptshell_QEvent.h" + +static const char * const qtscript_QEvent_function_names[] = { + "QEvent" + // static + , "registerEventType" + // prototype + , "accept" + , "ignore" + , "isAccepted" + , "operator_assign" + , "setAccepted" + , "spontaneous" + , "type" + , "toString" +}; + +static const char * const qtscript_QEvent_function_signatures[] = { + "Type type\nQEvent other" + // static + , "int hint" + // prototype + , "" + , "" + , "" + , "QEvent other" + , "bool accepted" + , "" + , "" +"" +}; + +static const int qtscript_QEvent_function_lengths[] = { + 1 + // static + , 1 + // prototype + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QtScriptShell_QEvent*) +Q_DECLARE_METATYPE(QEvent::Type) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QEvent::Type +// + +static const QEvent::Type qtscript_QEvent_Type_values[] = { + QEvent::None + , QEvent::Timer + , QEvent::MouseButtonPress + , QEvent::MouseButtonRelease + , QEvent::MouseButtonDblClick + , QEvent::MouseMove + , QEvent::KeyPress + , QEvent::KeyRelease + , QEvent::FocusIn + , QEvent::FocusOut + , QEvent::Enter + , QEvent::Leave + , QEvent::Paint + , QEvent::Move + , QEvent::Resize + , QEvent::Create + , QEvent::Destroy + , QEvent::Show + , QEvent::Hide + , QEvent::Close + , QEvent::Quit + , QEvent::ParentChange + , QEvent::ThreadChange + , QEvent::FocusAboutToChange + , QEvent::WindowActivate + , QEvent::WindowDeactivate + , QEvent::ShowToParent + , QEvent::HideToParent + , QEvent::Wheel + , QEvent::WindowTitleChange + , QEvent::WindowIconChange + , QEvent::ApplicationWindowIconChange + , QEvent::ApplicationFontChange + , QEvent::ApplicationLayoutDirectionChange + , QEvent::ApplicationPaletteChange + , QEvent::PaletteChange + , QEvent::Clipboard + , QEvent::Speech + , QEvent::MetaCall + , QEvent::SockAct + , QEvent::ShortcutOverride + , QEvent::DeferredDelete + , QEvent::DragEnter + , QEvent::DragMove + , QEvent::DragLeave + , QEvent::Drop + , QEvent::DragResponse + , QEvent::ChildAdded + , QEvent::ChildPolished + , QEvent::ChildRemoved + , QEvent::ShowWindowRequest + , QEvent::PolishRequest + , QEvent::Polish + , QEvent::LayoutRequest + , QEvent::UpdateRequest + , QEvent::UpdateLater + , QEvent::EmbeddingControl + , QEvent::ActivateControl + , QEvent::DeactivateControl + , QEvent::ContextMenu + , QEvent::InputMethod + , QEvent::TabletMove + , QEvent::LocaleChange + , QEvent::LanguageChange + , QEvent::LayoutDirectionChange + , QEvent::Style + , QEvent::TabletPress + , QEvent::TabletRelease + , QEvent::OkRequest + , QEvent::HelpRequest + , QEvent::IconDrag + , QEvent::FontChange + , QEvent::EnabledChange + , QEvent::ActivationChange + , QEvent::StyleChange + , QEvent::IconTextChange + , QEvent::ModifiedChange + , QEvent::WindowBlocked + , QEvent::WindowUnblocked + , QEvent::WindowStateChange + , QEvent::ReadOnlyChange + , QEvent::MouseTrackingChange + , QEvent::ToolTip + , QEvent::WhatsThis + , QEvent::StatusTip + , QEvent::ActionChanged + , QEvent::ActionAdded + , QEvent::ActionRemoved + , QEvent::FileOpen + , QEvent::Shortcut + , QEvent::WhatsThisClicked + , QEvent::ToolBarChange + , QEvent::ApplicationActivate + , QEvent::ApplicationDeactivate + , QEvent::QueryWhatsThis + , QEvent::EnterWhatsThisMode + , QEvent::LeaveWhatsThisMode + , QEvent::ZOrderChange + , QEvent::HoverEnter + , QEvent::HoverLeave + , QEvent::HoverMove + , QEvent::ParentAboutToChange + , QEvent::WinEventAct + , QEvent::AcceptDropsChange + , QEvent::ZeroTimerEvent + , QEvent::GraphicsSceneMouseMove + , QEvent::GraphicsSceneMousePress + , QEvent::GraphicsSceneMouseRelease + , QEvent::GraphicsSceneMouseDoubleClick + , QEvent::GraphicsSceneContextMenu + , QEvent::GraphicsSceneHoverEnter + , QEvent::GraphicsSceneHoverMove + , QEvent::GraphicsSceneHoverLeave + , QEvent::GraphicsSceneHelp + , QEvent::GraphicsSceneDragEnter + , QEvent::GraphicsSceneDragMove + , QEvent::GraphicsSceneDragLeave + , QEvent::GraphicsSceneDrop + , QEvent::GraphicsSceneWheel + , QEvent::KeyboardLayoutChange + , QEvent::DynamicPropertyChange + , QEvent::TabletEnterProximity + , QEvent::TabletLeaveProximity + , QEvent::NonClientAreaMouseMove + , QEvent::NonClientAreaMouseButtonPress + , QEvent::NonClientAreaMouseButtonRelease + , QEvent::NonClientAreaMouseButtonDblClick + , QEvent::MacSizeChange + , QEvent::ContentsRectChange + , QEvent::MacGLWindowChange + , QEvent::FutureCallOut + , QEvent::GraphicsSceneResize + , QEvent::GraphicsSceneMove + , QEvent::CursorChange + , QEvent::ToolTipChange + , QEvent::NetworkReplyUpdated + , QEvent::GrabMouse + , QEvent::UngrabMouse + , QEvent::GrabKeyboard + , QEvent::UngrabKeyboard + , QEvent::MacGLClearDrawable + , QEvent::StateMachineSignal + , QEvent::StateMachineWrapped + , QEvent::TouchBegin + , QEvent::TouchUpdate + , QEvent::TouchEnd + , QEvent::NativeGesture + , QEvent::Gesture + , QEvent::RequestSoftwareInputPanel + , QEvent::CloseSoftwareInputPanel + , QEvent::GestureOverride + , QEvent::WinIdChange + , QEvent::ScrollPrepare + , QEvent::Scroll + , QEvent::Expose + , QEvent::InputMethodQuery + , QEvent::OrientationChange + , QEvent::TouchCancel + , QEvent::ThemeChange + , QEvent::SockClose + , QEvent::PlatformPanel + , QEvent::StyleAnimationUpdate + , QEvent::ApplicationStateChange + , QEvent::WindowChangeInternal + , QEvent::ScreenChangeInternal + , QEvent::PlatformSurface + , QEvent::User + , QEvent::MaxUser +}; + +static const char * const qtscript_QEvent_Type_keys[] = { + "None" + , "Timer" + , "MouseButtonPress" + , "MouseButtonRelease" + , "MouseButtonDblClick" + , "MouseMove" + , "KeyPress" + , "KeyRelease" + , "FocusIn" + , "FocusOut" + , "Enter" + , "Leave" + , "Paint" + , "Move" + , "Resize" + , "Create" + , "Destroy" + , "Show" + , "Hide" + , "Close" + , "Quit" + , "ParentChange" + , "ThreadChange" + , "FocusAboutToChange" + , "WindowActivate" + , "WindowDeactivate" + , "ShowToParent" + , "HideToParent" + , "Wheel" + , "WindowTitleChange" + , "WindowIconChange" + , "ApplicationWindowIconChange" + , "ApplicationFontChange" + , "ApplicationLayoutDirectionChange" + , "ApplicationPaletteChange" + , "PaletteChange" + , "Clipboard" + , "Speech" + , "MetaCall" + , "SockAct" + , "ShortcutOverride" + , "DeferredDelete" + , "DragEnter" + , "DragMove" + , "DragLeave" + , "Drop" + , "DragResponse" + , "ChildAdded" + , "ChildPolished" + , "ChildRemoved" + , "ShowWindowRequest" + , "PolishRequest" + , "Polish" + , "LayoutRequest" + , "UpdateRequest" + , "UpdateLater" + , "EmbeddingControl" + , "ActivateControl" + , "DeactivateControl" + , "ContextMenu" + , "InputMethod" + , "TabletMove" + , "LocaleChange" + , "LanguageChange" + , "LayoutDirectionChange" + , "Style" + , "TabletPress" + , "TabletRelease" + , "OkRequest" + , "HelpRequest" + , "IconDrag" + , "FontChange" + , "EnabledChange" + , "ActivationChange" + , "StyleChange" + , "IconTextChange" + , "ModifiedChange" + , "WindowBlocked" + , "WindowUnblocked" + , "WindowStateChange" + , "ReadOnlyChange" + , "MouseTrackingChange" + , "ToolTip" + , "WhatsThis" + , "StatusTip" + , "ActionChanged" + , "ActionAdded" + , "ActionRemoved" + , "FileOpen" + , "Shortcut" + , "WhatsThisClicked" + , "ToolBarChange" + , "ApplicationActivate" + , "ApplicationDeactivate" + , "QueryWhatsThis" + , "EnterWhatsThisMode" + , "LeaveWhatsThisMode" + , "ZOrderChange" + , "HoverEnter" + , "HoverLeave" + , "HoverMove" + , "ParentAboutToChange" + , "WinEventAct" + , "AcceptDropsChange" + , "ZeroTimerEvent" + , "GraphicsSceneMouseMove" + , "GraphicsSceneMousePress" + , "GraphicsSceneMouseRelease" + , "GraphicsSceneMouseDoubleClick" + , "GraphicsSceneContextMenu" + , "GraphicsSceneHoverEnter" + , "GraphicsSceneHoverMove" + , "GraphicsSceneHoverLeave" + , "GraphicsSceneHelp" + , "GraphicsSceneDragEnter" + , "GraphicsSceneDragMove" + , "GraphicsSceneDragLeave" + , "GraphicsSceneDrop" + , "GraphicsSceneWheel" + , "KeyboardLayoutChange" + , "DynamicPropertyChange" + , "TabletEnterProximity" + , "TabletLeaveProximity" + , "NonClientAreaMouseMove" + , "NonClientAreaMouseButtonPress" + , "NonClientAreaMouseButtonRelease" + , "NonClientAreaMouseButtonDblClick" + , "MacSizeChange" + , "ContentsRectChange" + , "MacGLWindowChange" + , "FutureCallOut" + , "GraphicsSceneResize" + , "GraphicsSceneMove" + , "CursorChange" + , "ToolTipChange" + , "NetworkReplyUpdated" + , "GrabMouse" + , "UngrabMouse" + , "GrabKeyboard" + , "UngrabKeyboard" + , "MacGLClearDrawable" + , "StateMachineSignal" + , "StateMachineWrapped" + , "TouchBegin" + , "TouchUpdate" + , "TouchEnd" + , "NativeGesture" + , "Gesture" + , "RequestSoftwareInputPanel" + , "CloseSoftwareInputPanel" + , "GestureOverride" + , "WinIdChange" + , "ScrollPrepare" + , "Scroll" + , "Expose" + , "InputMethodQuery" + , "OrientationChange" + , "TouchCancel" + , "ThemeChange" + , "SockClose" + , "PlatformPanel" + , "StyleAnimationUpdate" + , "ApplicationStateChange" + , "WindowChangeInternal" + , "ScreenChangeInternal" + , "PlatformSurface" + , "User" + , "MaxUser" +}; + +static QString qtscript_QEvent_Type_toStringHelper(QEvent::Type value) +{ + for (int i = 0; i < 168; ++i) { + if (qtscript_QEvent_Type_values[i] == value) + return QString::fromLatin1(qtscript_QEvent_Type_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QEvent_Type_toScriptValue(QScriptEngine *engine, const QEvent::Type &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QEvent")); + return clazz.property(qtscript_QEvent_Type_toStringHelper(value)); +} + +static void qtscript_QEvent_Type_fromScriptValue(const QScriptValue &value, QEvent::Type &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QEvent_Type(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 168; ++i) { + if (qtscript_QEvent_Type_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Type(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QEvent_Type_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QEvent::Type value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QEvent_Type_toString(QScriptContext *context, QScriptEngine *engine) +{ + QEvent::Type value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QEvent_Type_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QEvent_Type_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QEvent_Type, + qtscript_QEvent_Type_valueOf, qtscript_QEvent_Type_toString); + qScriptRegisterMetaType(engine, qtscript_QEvent_Type_toScriptValue, + qtscript_QEvent_Type_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 168; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QEvent_Type_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QEvent_Type_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QEvent +// + +static QScriptValue qtscript_QEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 7; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QEvent.%0(): this object is not a QEvent") + .arg(qtscript_QEvent_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->accept(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->ignore(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isAccepted(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QEvent _q_arg0 = qscriptvalue_cast(context->argument(0)); + QEvent& _q_result = _q_self->operator=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setAccepted(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->spontaneous(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QEvent::Type _q_result = _q_self->type(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: { + QString result; + QDebug d(&result); + d << _q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QEvent_throw_ambiguity_error_helper(context, + qtscript_QEvent_function_names[_id+2], + qtscript_QEvent_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QEvent* _q_cpp_result = new QtScriptShell_QEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QEvent _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QEvent* _q_cpp_result = new QtScriptShell_QEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = QEvent::registerEventType(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = QEvent::registerEventType(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QEvent_throw_ambiguity_error_helper(context, + qtscript_QEvent_function_names[_id], + qtscript_QEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QEvent*)0)); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QEvent_prototype_call, qtscript_QEvent_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QEvent_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QEvent_static_call, proto, qtscript_QEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QEvent_static_call, + qtscript_QEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("Type"), + qtscript_create_QEvent_Type_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QEventLoop.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QEventLoop.cpp new file mode 100644 index 00000000..efc381ae --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QEventLoop.cpp @@ -0,0 +1,418 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QEventLoop.h" + +static const char * const qtscript_QEventLoop_function_names[] = { + "QEventLoop" + // static + // prototype + , "exec" + , "exit" + , "isRunning" + , "processEvents" + , "wakeUp" + , "toString" +}; + +static const char * const qtscript_QEventLoop_function_signatures[] = { + "QObject parent" + // static + // prototype + , "ProcessEventsFlags flags" + , "int returnCode" + , "" + , "ProcessEventsFlags flags\nProcessEventsFlags flags, int maximumTime" + , "" +"" +}; + +static const int qtscript_QEventLoop_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 1 + , 0 + , 2 + , 0 + , 0 +}; + +static QScriptValue qtscript_QEventLoop_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QEventLoop::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QEventLoop*) +Q_DECLARE_METATYPE(QtScriptShell_QEventLoop*) +Q_DECLARE_METATYPE(QEventLoop::ProcessEventsFlag) +Q_DECLARE_METATYPE(QFlags) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QEventLoop::ProcessEventsFlag +// + +static const QEventLoop::ProcessEventsFlag qtscript_QEventLoop_ProcessEventsFlag_values[] = { + QEventLoop::AllEvents + , QEventLoop::ExcludeUserInputEvents + , QEventLoop::ExcludeSocketNotifiers + , QEventLoop::WaitForMoreEvents + , QEventLoop::X11ExcludeTimers + , QEventLoop::EventLoopExec + , QEventLoop::DialogExec +}; + +static const char * const qtscript_QEventLoop_ProcessEventsFlag_keys[] = { + "AllEvents" + , "ExcludeUserInputEvents" + , "ExcludeSocketNotifiers" + , "WaitForMoreEvents" + , "X11ExcludeTimers" + , "EventLoopExec" + , "DialogExec" +}; + +static QString qtscript_QEventLoop_ProcessEventsFlag_toStringHelper(QEventLoop::ProcessEventsFlag value) +{ + for (int i = 0; i < 7; ++i) { + if (qtscript_QEventLoop_ProcessEventsFlag_values[i] == value) + return QString::fromLatin1(qtscript_QEventLoop_ProcessEventsFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QEventLoop_ProcessEventsFlag_toScriptValue(QScriptEngine *engine, const QEventLoop::ProcessEventsFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QEventLoop")); + return clazz.property(qtscript_QEventLoop_ProcessEventsFlag_toStringHelper(value)); +} + +static void qtscript_QEventLoop_ProcessEventsFlag_fromScriptValue(const QScriptValue &value, QEventLoop::ProcessEventsFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QEventLoop_ProcessEventsFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 7; ++i) { + if (qtscript_QEventLoop_ProcessEventsFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ProcessEventsFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QEventLoop_ProcessEventsFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QEventLoop::ProcessEventsFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QEventLoop_ProcessEventsFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QEventLoop::ProcessEventsFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QEventLoop_ProcessEventsFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QEventLoop_ProcessEventsFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QEventLoop_ProcessEventsFlag, + qtscript_QEventLoop_ProcessEventsFlag_valueOf, qtscript_QEventLoop_ProcessEventsFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QEventLoop_ProcessEventsFlag_toScriptValue, + qtscript_QEventLoop_ProcessEventsFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 7; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QEventLoop_ProcessEventsFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QEventLoop_ProcessEventsFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QEventLoop::ProcessEventsFlags +// + +static QScriptValue qtscript_QEventLoop_ProcessEventsFlags_toScriptValue(QScriptEngine *engine, const QEventLoop::ProcessEventsFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QEventLoop_ProcessEventsFlags_fromScriptValue(const QScriptValue &value, QEventLoop::ProcessEventsFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QEventLoop_ProcessEventsFlags(QScriptContext *context, QScriptEngine *engine) +{ + QEventLoop::ProcessEventsFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("ProcessEventsFlags(): argument %0 is not of type ProcessEventsFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QEventLoop_ProcessEventsFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QEventLoop::ProcessEventsFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QEventLoop_ProcessEventsFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + QEventLoop::ProcessEventsFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 7; ++i) { + if ((value & qtscript_QEventLoop_ProcessEventsFlag_values[i]) == qtscript_QEventLoop_ProcessEventsFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QEventLoop_ProcessEventsFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QEventLoop_ProcessEventsFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QEventLoop_ProcessEventsFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QEventLoop_ProcessEventsFlags, qtscript_QEventLoop_ProcessEventsFlags_valueOf, + qtscript_QEventLoop_ProcessEventsFlags_toString, qtscript_QEventLoop_ProcessEventsFlags_equals); + qScriptRegisterMetaType(engine, qtscript_QEventLoop_ProcessEventsFlags_toScriptValue, + qtscript_QEventLoop_ProcessEventsFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QEventLoop +// + +static QScriptValue qtscript_QEventLoop_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QEventLoop* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QEventLoop.%0(): this object is not a QEventLoop") + .arg(qtscript_QEventLoop_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->exec(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + int _q_result = _q_self->exec(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->exit(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->exit(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isRunning(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->processEvents(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + bool _q_result = _q_self->processEvents(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->processEvents(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + _q_self->wakeUp(); + return context->engine()->undefinedValue(); + } + break; + + case 5: { + QString result = QString::fromLatin1("QEventLoop"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QEventLoop_throw_ambiguity_error_helper(context, + qtscript_QEventLoop_function_names[_id+1], + qtscript_QEventLoop_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QEventLoop_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QEventLoop(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QEventLoop* _q_cpp_result = new QtScriptShell_QEventLoop(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QEventLoop*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QEventLoop* _q_cpp_result = new QtScriptShell_QEventLoop(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QEventLoop*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QEventLoop_throw_ambiguity_error_helper(context, + qtscript_QEventLoop_function_names[_id], + qtscript_QEventLoop_function_signatures[_id]); +} + +static QScriptValue qtscript_QEventLoop_toScriptValue(QScriptEngine *engine, QEventLoop* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QEventLoop_fromScriptValue(const QScriptValue &value, QEventLoop* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QEventLoop_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QEventLoop*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QEventLoop_prototype_call, qtscript_QEventLoop_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QEventLoop_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QEventLoop_toScriptValue, + qtscript_QEventLoop_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QEventLoop_static_call, proto, qtscript_QEventLoop_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ProcessEventsFlag"), + qtscript_create_QEventLoop_ProcessEventsFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ProcessEventsFlags"), + qtscript_create_QEventLoop_ProcessEventsFlags_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QEventTransition.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QEventTransition.cpp new file mode 100644 index 00000000..e9861ff7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QEventTransition.cpp @@ -0,0 +1,170 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QEventTransition.h" + +static const char * const qtscript_QEventTransition_function_names[] = { + "QEventTransition" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QEventTransition_function_signatures[] = { + "QObject object, Type type, QState sourceState\nQState sourceState" + // static + // prototype +"" +}; + +static const int qtscript_QEventTransition_function_lengths[] = { + 3 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QEventTransition_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QEventTransition::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QEventTransition*) +Q_DECLARE_METATYPE(QtScriptShell_QEventTransition*) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QState*) +Q_DECLARE_METATYPE(QAbstractTransition*) + +// +// QEventTransition +// + +static QScriptValue qtscript_QEventTransition_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QEventTransition* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QEventTransition.%0(): this object is not a QEventTransition") + .arg(qtscript_QEventTransition_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QEventTransition"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QEventTransition_throw_ambiguity_error_helper(context, + qtscript_QEventTransition_function_names[_id+1], + qtscript_QEventTransition_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QEventTransition_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QEventTransition(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QEventTransition* _q_cpp_result = new QtScriptShell_QEventTransition(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QEventTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QState* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QEventTransition* _q_cpp_result = new QtScriptShell_QEventTransition(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QEventTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QEvent::Type _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QEventTransition* _q_cpp_result = new QtScriptShell_QEventTransition(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QEventTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 3) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QEvent::Type _q_arg1 = qscriptvalue_cast(context->argument(1)); + QState* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QEventTransition* _q_cpp_result = new QtScriptShell_QEventTransition(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QEventTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QEventTransition_throw_ambiguity_error_helper(context, + qtscript_QEventTransition_function_names[_id], + qtscript_QEventTransition_function_signatures[_id]); +} + +static QScriptValue qtscript_QEventTransition_toScriptValue(QScriptEngine *engine, QEventTransition* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QEventTransition_fromScriptValue(const QScriptValue &value, QEventTransition* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QEventTransition_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QEventTransition*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QEventTransition_toScriptValue, + qtscript_QEventTransition_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QEventTransition_static_call, proto, qtscript_QEventTransition_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFile.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFile.cpp new file mode 100644 index 00000000..3b70775e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFile.cpp @@ -0,0 +1,418 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QFile.h" + +static const char * const qtscript_QFile_function_names[] = { + "QFile" + // static + , "copy" + , "decodeName" + , "encodeName" + , "exists" + , "link" + , "permissions" + , "readLink" + , "remove" + , "rename" + , "resize" + , "setPermissions" + , "symLinkTarget" + // prototype + , "copy" + , "exists" + , "link" + , "open" + , "readLink" + , "remove" + , "rename" + , "setFileName" + , "symLinkTarget" + , "toString" +}; + +static const char * const qtscript_QFile_function_signatures[] = { + "\nQObject parent\nString name\nString name, QObject parent" + // static + , "String fileName, String newName" + , "QByteArray localFileName" + , "String fileName" + , "String fileName" + , "String oldname, String newName" + , "String filename" + , "String fileName" + , "String fileName" + , "String oldName, String newName" + , "String filename, qint64 sz" + , "String filename, Permissions permissionSpec" + , "String fileName" + // prototype + , "String newName" + , "" + , "String newName" + , "OpenMode ioFlags" + , "" + , "" + , "String newName" + , "String name" + , "" +"" +}; + +static const int qtscript_QFile_function_lengths[] = { + 2 + // static + , 2 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 2 + , 2 + , 2 + , 1 + // prototype + , 1 + , 0 + , 1 + , 1 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QFile_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFile::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFile*) +Q_DECLARE_METATYPE(QtScriptShell_QFile*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFileDevice*) + +// +// QFile +// + +static QScriptValue qtscript_QFile_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 9; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFile* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFile.%0(): this object is not a QFile") + .arg(qtscript_QFile_function_names[_id+13])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->copy(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->exists(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->link(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + bool _q_result = _q_self->open(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + bool _q_result = _q_self->open(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->readLink(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->remove(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->rename(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setFileName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->symLinkTarget(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: { + QString result = QString::fromLatin1("QFile"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFile_throw_ambiguity_error_helper(context, + qtscript_QFile_function_names[_id+13], + qtscript_QFile_function_signatures[_id+13]); +} + +static QScriptValue qtscript_QFile_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFile(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QFile* _q_cpp_result = new QtScriptShell_QFile(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFile*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isQObject()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QFile* _q_cpp_result = new QtScriptShell_QFile(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFile*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QFile* _q_cpp_result = new QtScriptShell_QFile(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFile*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QFile* _q_cpp_result = new QtScriptShell_QFile(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFile*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = QFile::copy(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = QFile::decodeName(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_result = QFile::encodeName(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = QFile::exists(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = QFile::link(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_result = QFile::permissions(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = QFile::readLink(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = QFile::remove(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = QFile::rename(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + qint64 _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = QFile::resize(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + bool _q_result = QFile::setPermissions(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = QFile::symLinkTarget(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFile_throw_ambiguity_error_helper(context, + qtscript_QFile_function_names[_id], + qtscript_QFile_function_signatures[_id]); +} + +static QScriptValue qtscript_QFile_toScriptValue(QScriptEngine *engine, QFile* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QFile_fromScriptValue(const QScriptValue &value, QFile* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QFile_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFile*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 10; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFile_prototype_call, qtscript_QFile_function_lengths[i+13]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFile_function_names[i+13]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QFile_toScriptValue, + qtscript_QFile_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFile_static_call, proto, qtscript_QFile_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 12; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFile_static_call, + qtscript_QFile_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QFile_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFileDevice.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFileDevice.cpp new file mode 100644 index 00000000..5036e303 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFileDevice.cpp @@ -0,0 +1,763 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QFileDevice.h" + +static const char * const qtscript_QFileDevice_function_names[] = { + "QFileDevice" + // static + // prototype + , "error" + , "fileName" + , "flush" + , "handle" + , "map" + , "permissions" + , "resize" + , "setPermissions" + , "unsetError" + , "toString" +}; + +static const char * const qtscript_QFileDevice_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "" + , "" + , "qint64 offset, qint64 size, MemoryMapFlags flags" + , "" + , "qint64 sz" + , "Permissions permissionSpec" + , "" +"" +}; + +static const int qtscript_QFileDevice_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 3 + , 0 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QFileDevice_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFileDevice::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFileDevice*) +Q_DECLARE_METATYPE(QtScriptShell_QFileDevice*) +Q_DECLARE_METATYPE(QFileDevice::MemoryMapFlags) +Q_DECLARE_METATYPE(QFileDevice::Permission) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFileDevice::FileHandleFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFileDevice::FileError) +Q_DECLARE_METATYPE(uchar*) +Q_DECLARE_METATYPE(QIODevice*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QFileDevice::MemoryMapFlags +// + +static const QFileDevice::MemoryMapFlags qtscript_QFileDevice_MemoryMapFlags_values[] = { + QFileDevice::NoOptions + , QFileDevice::MapPrivateOption +}; + +static const char * const qtscript_QFileDevice_MemoryMapFlags_keys[] = { + "NoOptions" + , "MapPrivateOption" +}; + +static QString qtscript_QFileDevice_MemoryMapFlags_toStringHelper(QFileDevice::MemoryMapFlags value) +{ + if ((value >= QFileDevice::NoOptions) && (value <= QFileDevice::MapPrivateOption)) + return qtscript_QFileDevice_MemoryMapFlags_keys[static_cast(value)-static_cast(QFileDevice::NoOptions)]; + return QString(); +} + +static QScriptValue qtscript_QFileDevice_MemoryMapFlags_toScriptValue(QScriptEngine *engine, const QFileDevice::MemoryMapFlags &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFileDevice")); + return clazz.property(qtscript_QFileDevice_MemoryMapFlags_toStringHelper(value)); +} + +static void qtscript_QFileDevice_MemoryMapFlags_fromScriptValue(const QScriptValue &value, QFileDevice::MemoryMapFlags &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFileDevice_MemoryMapFlags(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QFileDevice::NoOptions) && (arg <= QFileDevice::MapPrivateOption)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("MemoryMapFlags(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFileDevice_MemoryMapFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFileDevice::MemoryMapFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFileDevice_MemoryMapFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFileDevice::MemoryMapFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFileDevice_MemoryMapFlags_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFileDevice_MemoryMapFlags_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFileDevice_MemoryMapFlags, + qtscript_QFileDevice_MemoryMapFlags_valueOf, qtscript_QFileDevice_MemoryMapFlags_toString); + qScriptRegisterMetaType(engine, qtscript_QFileDevice_MemoryMapFlags_toScriptValue, + qtscript_QFileDevice_MemoryMapFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFileDevice_MemoryMapFlags_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFileDevice_MemoryMapFlags_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFileDevice::Permission +// + +static const QFileDevice::Permission qtscript_QFileDevice_Permission_values[] = { + QFileDevice::ExeOther + , QFileDevice::WriteOther + , QFileDevice::ReadOther + , QFileDevice::ExeGroup + , QFileDevice::WriteGroup + , QFileDevice::ReadGroup + , QFileDevice::ExeUser + , QFileDevice::WriteUser + , QFileDevice::ReadUser + , QFileDevice::ExeOwner + , QFileDevice::WriteOwner + , QFileDevice::ReadOwner +}; + +static const char * const qtscript_QFileDevice_Permission_keys[] = { + "ExeOther" + , "WriteOther" + , "ReadOther" + , "ExeGroup" + , "WriteGroup" + , "ReadGroup" + , "ExeUser" + , "WriteUser" + , "ReadUser" + , "ExeOwner" + , "WriteOwner" + , "ReadOwner" +}; + +static QString qtscript_QFileDevice_Permission_toStringHelper(QFileDevice::Permission value) +{ + for (int i = 0; i < 12; ++i) { + if (qtscript_QFileDevice_Permission_values[i] == value) + return QString::fromLatin1(qtscript_QFileDevice_Permission_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QFileDevice_Permission_toScriptValue(QScriptEngine *engine, const QFileDevice::Permission &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFileDevice")); + return clazz.property(qtscript_QFileDevice_Permission_toStringHelper(value)); +} + +static void qtscript_QFileDevice_Permission_fromScriptValue(const QScriptValue &value, QFileDevice::Permission &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFileDevice_Permission(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 12; ++i) { + if (qtscript_QFileDevice_Permission_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Permission(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFileDevice_Permission_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFileDevice::Permission value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFileDevice_Permission_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFileDevice::Permission value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFileDevice_Permission_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFileDevice_Permission_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFileDevice_Permission, + qtscript_QFileDevice_Permission_valueOf, qtscript_QFileDevice_Permission_toString); + qScriptRegisterMetaType(engine, qtscript_QFileDevice_Permission_toScriptValue, + qtscript_QFileDevice_Permission_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 12; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFileDevice_Permission_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFileDevice_Permission_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFileDevice::Permissions +// + +static QScriptValue qtscript_QFileDevice_Permissions_toScriptValue(QScriptEngine *engine, const QFileDevice::Permissions &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QFileDevice_Permissions_fromScriptValue(const QScriptValue &value, QFileDevice::Permissions &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QFileDevice_Permissions(QScriptContext *context, QScriptEngine *engine) +{ + QFileDevice::Permissions result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("Permissions(): argument %0 is not of type Permission").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QFileDevice_Permissions_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFileDevice::Permissions value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFileDevice_Permissions_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFileDevice::Permissions value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 12; ++i) { + if ((value & qtscript_QFileDevice_Permission_values[i]) == qtscript_QFileDevice_Permission_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QFileDevice_Permission_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QFileDevice_Permissions_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QFileDevice_Permissions_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QFileDevice_Permissions, qtscript_QFileDevice_Permissions_valueOf, + qtscript_QFileDevice_Permissions_toString, qtscript_QFileDevice_Permissions_equals); + qScriptRegisterMetaType(engine, qtscript_QFileDevice_Permissions_toScriptValue, + qtscript_QFileDevice_Permissions_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QFileDevice::FileHandleFlag +// + +static const QFileDevice::FileHandleFlag qtscript_QFileDevice_FileHandleFlag_values[] = { + QFileDevice::DontCloseHandle + , QFileDevice::AutoCloseHandle +}; + +static const char * const qtscript_QFileDevice_FileHandleFlag_keys[] = { + "DontCloseHandle" + , "AutoCloseHandle" +}; + +static QString qtscript_QFileDevice_FileHandleFlag_toStringHelper(QFileDevice::FileHandleFlag value) +{ + if ((value >= QFileDevice::DontCloseHandle) && (value <= QFileDevice::AutoCloseHandle)) + return qtscript_QFileDevice_FileHandleFlag_keys[static_cast(value)-static_cast(QFileDevice::DontCloseHandle)]; + return QString(); +} + +static QScriptValue qtscript_QFileDevice_FileHandleFlag_toScriptValue(QScriptEngine *engine, const QFileDevice::FileHandleFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFileDevice")); + return clazz.property(qtscript_QFileDevice_FileHandleFlag_toStringHelper(value)); +} + +static void qtscript_QFileDevice_FileHandleFlag_fromScriptValue(const QScriptValue &value, QFileDevice::FileHandleFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFileDevice_FileHandleFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QFileDevice::DontCloseHandle) && (arg <= QFileDevice::AutoCloseHandle)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("FileHandleFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFileDevice_FileHandleFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFileDevice::FileHandleFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFileDevice_FileHandleFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFileDevice::FileHandleFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFileDevice_FileHandleFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFileDevice_FileHandleFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFileDevice_FileHandleFlag, + qtscript_QFileDevice_FileHandleFlag_valueOf, qtscript_QFileDevice_FileHandleFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QFileDevice_FileHandleFlag_toScriptValue, + qtscript_QFileDevice_FileHandleFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFileDevice_FileHandleFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFileDevice_FileHandleFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFileDevice::FileHandleFlags +// + +static QScriptValue qtscript_QFileDevice_FileHandleFlags_toScriptValue(QScriptEngine *engine, const QFileDevice::FileHandleFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QFileDevice_FileHandleFlags_fromScriptValue(const QScriptValue &value, QFileDevice::FileHandleFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QFileDevice_FileHandleFlags(QScriptContext *context, QScriptEngine *engine) +{ + QFileDevice::FileHandleFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("FileHandleFlags(): argument %0 is not of type FileHandleFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QFileDevice_FileHandleFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFileDevice::FileHandleFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFileDevice_FileHandleFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFileDevice::FileHandleFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 2; ++i) { + if ((value & qtscript_QFileDevice_FileHandleFlag_values[i]) == qtscript_QFileDevice_FileHandleFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QFileDevice_FileHandleFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QFileDevice_FileHandleFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QFileDevice_FileHandleFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QFileDevice_FileHandleFlags, qtscript_QFileDevice_FileHandleFlags_valueOf, + qtscript_QFileDevice_FileHandleFlags_toString, qtscript_QFileDevice_FileHandleFlags_equals); + qScriptRegisterMetaType(engine, qtscript_QFileDevice_FileHandleFlags_toScriptValue, + qtscript_QFileDevice_FileHandleFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QFileDevice::FileError +// + +static const QFileDevice::FileError qtscript_QFileDevice_FileError_values[] = { + QFileDevice::NoError + , QFileDevice::ReadError + , QFileDevice::WriteError + , QFileDevice::FatalError + , QFileDevice::ResourceError + , QFileDevice::OpenError + , QFileDevice::AbortError + , QFileDevice::TimeOutError + , QFileDevice::UnspecifiedError + , QFileDevice::RemoveError + , QFileDevice::RenameError + , QFileDevice::PositionError + , QFileDevice::ResizeError + , QFileDevice::PermissionsError + , QFileDevice::CopyError +}; + +static const char * const qtscript_QFileDevice_FileError_keys[] = { + "NoError" + , "ReadError" + , "WriteError" + , "FatalError" + , "ResourceError" + , "OpenError" + , "AbortError" + , "TimeOutError" + , "UnspecifiedError" + , "RemoveError" + , "RenameError" + , "PositionError" + , "ResizeError" + , "PermissionsError" + , "CopyError" +}; + +static QString qtscript_QFileDevice_FileError_toStringHelper(QFileDevice::FileError value) +{ + if ((value >= QFileDevice::NoError) && (value <= QFileDevice::CopyError)) + return qtscript_QFileDevice_FileError_keys[static_cast(value)-static_cast(QFileDevice::NoError)]; + return QString(); +} + +static QScriptValue qtscript_QFileDevice_FileError_toScriptValue(QScriptEngine *engine, const QFileDevice::FileError &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFileDevice")); + return clazz.property(qtscript_QFileDevice_FileError_toStringHelper(value)); +} + +static void qtscript_QFileDevice_FileError_fromScriptValue(const QScriptValue &value, QFileDevice::FileError &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFileDevice_FileError(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QFileDevice::NoError) && (arg <= QFileDevice::CopyError)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("FileError(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFileDevice_FileError_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFileDevice::FileError value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFileDevice_FileError_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFileDevice::FileError value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFileDevice_FileError_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFileDevice_FileError_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFileDevice_FileError, + qtscript_QFileDevice_FileError_valueOf, qtscript_QFileDevice_FileError_toString); + qScriptRegisterMetaType(engine, qtscript_QFileDevice_FileError_toScriptValue, + qtscript_QFileDevice_FileError_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 15; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFileDevice_FileError_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFileDevice_FileError_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFileDevice +// + +static QScriptValue qtscript_QFileDevice_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 9; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFileDevice* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFileDevice.%0(): this object is not a QFileDevice") + .arg(qtscript_QFileDevice_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QFileDevice::FileError _q_result = _q_self->error(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->fileName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->flush(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->handle(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 2) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + qint64 _q_arg1 = qscriptvalue_cast(context->argument(1)); + uchar* _q_result = _q_self->map(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + qint64 _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFileDevice::MemoryMapFlags _q_arg2 = qscriptvalue_cast(context->argument(2)); + uchar* _q_result = _q_self->map(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->permissions(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->resize(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + bool _q_result = _q_self->setPermissions(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + _q_self->unsetError(); + return context->engine()->undefinedValue(); + } + break; + + case 9: { + QString result = QString::fromLatin1("QFileDevice"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFileDevice_throw_ambiguity_error_helper(context, + qtscript_QFileDevice_function_names[_id+1], + qtscript_QFileDevice_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFileDevice_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFileDevice cannot be constructed")); + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFileDevice_throw_ambiguity_error_helper(context, + qtscript_QFileDevice_function_names[_id], + qtscript_QFileDevice_function_signatures[_id]); +} + +static QScriptValue qtscript_QFileDevice_toScriptValue(QScriptEngine *engine, QFileDevice* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QFileDevice_fromScriptValue(const QScriptValue &value, QFileDevice* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QFileDevice_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFileDevice*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 10; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFileDevice_prototype_call, qtscript_QFileDevice_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFileDevice_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QFileDevice_toScriptValue, + qtscript_QFileDevice_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFileDevice_static_call, proto, qtscript_QFileDevice_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("MemoryMapFlags"), + qtscript_create_QFileDevice_MemoryMapFlags_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Permission"), + qtscript_create_QFileDevice_Permission_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Permissions"), + qtscript_create_QFileDevice_Permissions_class(engine)); + ctor.setProperty(QString::fromLatin1("FileHandleFlag"), + qtscript_create_QFileDevice_FileHandleFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("FileHandleFlags"), + qtscript_create_QFileDevice_FileHandleFlags_class(engine)); + ctor.setProperty(QString::fromLatin1("FileError"), + qtscript_create_QFileDevice_FileError_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFileInfo.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFileInfo.cpp new file mode 100644 index 00000000..06453f89 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFileInfo.cpp @@ -0,0 +1,614 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QFileInfo_function_names[] = { + "QFileInfo" + // static + , "exists" + // prototype + , "absoluteDir" + , "absoluteFilePath" + , "absolutePath" + , "baseName" + , "bundleName" + , "caching" + , "canonicalFilePath" + , "canonicalPath" + , "completeBaseName" + , "completeSuffix" + , "created" + , "dir" + , "exists" + , "fileName" + , "filePath" + , "group" + , "groupId" + , "isAbsolute" + , "isBundle" + , "isDir" + , "isExecutable" + , "isFile" + , "isHidden" + , "isNativePath" + , "isReadable" + , "isRelative" + , "isRoot" + , "isSymLink" + , "isWritable" + , "lastModified" + , "lastRead" + , "makeAbsolute" + , "owner" + , "ownerId" + , "path" + , "refresh" + , "setCaching" + , "setFile" + , "size" + , "suffix" + , "swap" + , "symLinkTarget" + , "toString" +}; + +static const char * const qtscript_QFileInfo_function_signatures[] = { + "\nQDir dir, String file\nQFile file\nQFileInfo fileinfo\nString file" + // static + , "String file" + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "bool on" + , "QDir dir, String file\nQFile file\nString file" + , "" + , "" + , "QFileInfo other" + , "" +"" +}; + +static const int qtscript_QFileInfo_function_lengths[] = { + 2 + // static + , 1 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 2 + , 0 + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QFileInfo_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFileInfo::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFileInfo*) +Q_DECLARE_METATYPE(QDir) +Q_DECLARE_METATYPE(QFile*) + +// +// QFileInfo +// + +static QScriptValue qtscript_QFileInfo_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 42; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFileInfo* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFileInfo.%0(): this object is not a QFileInfo") + .arg(qtscript_QFileInfo_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QDir _q_result = _q_self->absoluteDir(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->absoluteFilePath(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->absolutePath(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->baseName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->bundleName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->caching(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->canonicalFilePath(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->canonicalPath(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->completeBaseName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->completeSuffix(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QDateTime _q_result = _q_self->created(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QDir _q_result = _q_self->dir(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->exists(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->fileName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->filePath(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->group(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + uint _q_result = _q_self->groupId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isAbsolute(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isBundle(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isDir(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isExecutable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isFile(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isHidden(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNativePath(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isReadable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isRelative(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isRoot(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isSymLink(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isWritable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 0) { + QDateTime _q_result = _q_self->lastModified(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 0) { + QDateTime _q_result = _q_self->lastRead(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->makeAbsolute(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->owner(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 0) { + uint _q_result = _q_self->ownerId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 34: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->path(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 35: + if (context->argumentCount() == 0) { + _q_self->refresh(); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setCaching(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + + QFile & _q_arg0 = *qscriptvalue_cast(context->argument(0)); + _q_self->setFile(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setFile(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + QDir _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setFile(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->size(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->suffix(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 40: + if (context->argumentCount() == 1) { + QFileInfo _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->symLinkTarget(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 42: { + QString result = QString::fromLatin1("QFileInfo"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFileInfo_throw_ambiguity_error_helper(context, + qtscript_QFileInfo_function_names[_id+2], + qtscript_QFileInfo_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QFileInfo_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFileInfo(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QFileInfo _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + + QFile & _q_arg0 = *qscriptvalue_cast(context->argument(0)); + QFileInfo _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QFileInfo _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFileInfo _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QFileInfo _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QDir _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QFileInfo _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = QFileInfo::exists(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFileInfo_throw_ambiguity_error_helper(context, + qtscript_QFileInfo_function_names[_id], + qtscript_QFileInfo_function_signatures[_id]); +} + +QScriptValue qtscript_create_QFileInfo_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFileInfo*)0)); + for (int i = 0; i < 43; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFileInfo_prototype_call, qtscript_QFileInfo_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFileInfo_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFileInfo_static_call, proto, qtscript_QFileInfo_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFileInfo_static_call, + qtscript_QFileInfo_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QFileInfo_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFileSystemWatcher.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFileSystemWatcher.cpp new file mode 100644 index 00000000..eb1f46ca --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFileSystemWatcher.cpp @@ -0,0 +1,238 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QFileSystemWatcher.h" + +static const char * const qtscript_QFileSystemWatcher_function_names[] = { + "QFileSystemWatcher" + // static + // prototype + , "addPath" + , "addPaths" + , "directories" + , "files" + , "removePath" + , "removePaths" + , "toString" +}; + +static const char * const qtscript_QFileSystemWatcher_function_signatures[] = { + "QObject parent\nList paths, QObject parent" + // static + // prototype + , "String file" + , "List files" + , "" + , "" + , "String file" + , "List files" +"" +}; + +static const int qtscript_QFileSystemWatcher_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 1 + , 0 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QFileSystemWatcher_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFileSystemWatcher::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFileSystemWatcher*) +Q_DECLARE_METATYPE(QtScriptShell_QFileSystemWatcher*) + +// +// QFileSystemWatcher +// + +static QScriptValue qtscript_QFileSystemWatcher_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFileSystemWatcher* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFileSystemWatcher.%0(): this object is not a QFileSystemWatcher") + .arg(qtscript_QFileSystemWatcher_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->addPath(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QStringList _q_result = _q_self->addPaths(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->directories(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->files(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->removePath(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QStringList _q_result = _q_self->removePaths(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 6: { + QString result = QString::fromLatin1("QFileSystemWatcher"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFileSystemWatcher_throw_ambiguity_error_helper(context, + qtscript_QFileSystemWatcher_function_names[_id+1], + qtscript_QFileSystemWatcher_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFileSystemWatcher_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFileSystemWatcher(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QFileSystemWatcher* _q_cpp_result = new QtScriptShell_QFileSystemWatcher(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFileSystemWatcher*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isQObject()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QFileSystemWatcher* _q_cpp_result = new QtScriptShell_QFileSystemWatcher(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFileSystemWatcher*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isArray()) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QtScriptShell_QFileSystemWatcher* _q_cpp_result = new QtScriptShell_QFileSystemWatcher(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFileSystemWatcher*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QFileSystemWatcher* _q_cpp_result = new QtScriptShell_QFileSystemWatcher(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFileSystemWatcher*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFileSystemWatcher_throw_ambiguity_error_helper(context, + qtscript_QFileSystemWatcher_function_names[_id], + qtscript_QFileSystemWatcher_function_signatures[_id]); +} + +static QScriptValue qtscript_QFileSystemWatcher_toScriptValue(QScriptEngine *engine, QFileSystemWatcher* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QFileSystemWatcher_fromScriptValue(const QScriptValue &value, QFileSystemWatcher* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QFileSystemWatcher_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFileSystemWatcher*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFileSystemWatcher_prototype_call, qtscript_QFileSystemWatcher_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFileSystemWatcher_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QFileSystemWatcher_toScriptValue, + qtscript_QFileSystemWatcher_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFileSystemWatcher_static_call, proto, qtscript_QFileSystemWatcher_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFinalState.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFinalState.cpp new file mode 100644 index 00000000..7a5e5b70 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFinalState.cpp @@ -0,0 +1,152 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QFinalState.h" + +static const char * const qtscript_QFinalState_function_names[] = { + "QFinalState" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QFinalState_function_signatures[] = { + "QState parent" + // static + // prototype +"" +}; + +static const int qtscript_QFinalState_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QFinalState_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFinalState::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFinalState*) +Q_DECLARE_METATYPE(QtScriptShell_QFinalState*) +Q_DECLARE_METATYPE(QState*) +Q_DECLARE_METATYPE(QAbstractState*) + +// +// QFinalState +// + +static QScriptValue qtscript_QFinalState_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFinalState* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFinalState.%0(): this object is not a QFinalState") + .arg(qtscript_QFinalState_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QFinalState"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFinalState_throw_ambiguity_error_helper(context, + qtscript_QFinalState_function_names[_id+1], + qtscript_QFinalState_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFinalState_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFinalState(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QFinalState* _q_cpp_result = new QtScriptShell_QFinalState(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFinalState*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QState* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QFinalState* _q_cpp_result = new QtScriptShell_QFinalState(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFinalState*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFinalState_throw_ambiguity_error_helper(context, + qtscript_QFinalState_function_names[_id], + qtscript_QFinalState_function_signatures[_id]); +} + +static QScriptValue qtscript_QFinalState_toScriptValue(QScriptEngine *engine, QFinalState* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QFinalState_fromScriptValue(const QScriptValue &value, QFinalState* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QFinalState_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFinalState*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QFinalState_toScriptValue, + qtscript_QFinalState_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFinalState_static_call, proto, qtscript_QFinalState_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFuture.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFuture.cpp new file mode 100644 index 00000000..3bd874cc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFuture.cpp @@ -0,0 +1,322 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QFuture_function_names[] = { + "QFuture" + // static + // prototype + , "cancel" + , "isCanceled" + , "isFinished" + , "isPaused" + , "isResultReadyAt" + , "isRunning" + , "isStarted" + , "equals" + , "pause" + , "progressMaximum" + , "progressMinimum" + , "progressText" + , "progressValue" + , "resultCount" + , "resume" + , "setPaused" + , "togglePaused" + , "waitForFinished" + , "toString" +}; + +static const char * const qtscript_QFuture_function_signatures[] = { + "\nQFuture other" + // static + // prototype + , "" + , "" + , "" + , "" + , "int resultIndex" + , "" + , "" + , "QFuture other" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "bool paused" + , "" + , "" +"" +}; + +static const int qtscript_QFuture_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QFuture_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFuture::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QtScriptFuture) +Q_DECLARE_METATYPE(QtScriptFuture*) + + + +// +// QFuture +// + +static QScriptValue qtscript_QFuture_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 18; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QtScriptFuture* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFuture.%0(): this object is not a QFuture") + .arg(qtscript_QFuture_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->cancel(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isCanceled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isFinished(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isPaused(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->isResultReadyAt(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isRunning(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isStarted(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + + const QtScriptFuture & _q_arg0 = *qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + _q_self->pause(); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->progressMaximum(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + int _q_result = _q_self->progressMinimum(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->progressText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + int _q_result = _q_self->progressValue(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + int _q_result = _q_self->resultCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + _q_self->resume(); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setPaused(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 0) { + _q_self->togglePaused(); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 0) { + _q_self->waitForFinished(); + return context->engine()->undefinedValue(); + } + break; + + case 18: { + QString result = QString::fromLatin1("QFuture"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFuture_throw_ambiguity_error_helper(context, + qtscript_QFuture_function_names[_id+1], + qtscript_QFuture_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFuture_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFuture(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptFuture _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + + const QtScriptFuture & _q_arg0 = *qscriptvalue_cast(context->argument(0)); + QtScriptFuture _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFuture_throw_ambiguity_error_helper(context, + qtscript_QFuture_function_names[_id], + qtscript_QFuture_function_signatures[_id]); +} + +QScriptValue qtscript_create_QFuture_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QtScriptFuture*)0)); + for (int i = 0; i < 19; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFuture_prototype_call, qtscript_QFuture_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFuture_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFuture_static_call, proto, qtscript_QFuture_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureIterator.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureIterator.cpp new file mode 100644 index 00000000..1fe6307d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureIterator.cpp @@ -0,0 +1,171 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QFutureIterator_function_names[] = { + "QFutureIterator" + // static + // prototype + , "hasNext" + , "hasPrevious" + , "toBack" + , "toFront" + , "toString" +}; + +static const char * const qtscript_QFutureIterator_function_signatures[] = { + "QFuture container" + // static + // prototype + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QFutureIterator_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QFutureIterator_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFutureIterator::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QtScriptFutureIterator*) +Q_DECLARE_METATYPE(QtScriptFuture*) + +// +// QFutureIterator +// + +static QScriptValue qtscript_QFutureIterator_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QtScriptFutureIterator* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFutureIterator.%0(): this object is not a QFutureIterator") + .arg(qtscript_QFutureIterator_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasNext(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasPrevious(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->toBack(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->toFront(); + return context->engine()->undefinedValue(); + } + break; + + case 4: { + QString result = QString::fromLatin1("QFutureIterator"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFutureIterator_throw_ambiguity_error_helper(context, + qtscript_QFutureIterator_function_names[_id+1], + qtscript_QFutureIterator_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFutureIterator_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFutureIterator(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + + const QtScriptFuture & _q_arg0 = *qscriptvalue_cast(context->argument(0)); + QtScriptFutureIterator* _q_cpp_result = new QtScriptFutureIterator(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFutureIterator_throw_ambiguity_error_helper(context, + qtscript_QFutureIterator_function_names[_id], + qtscript_QFutureIterator_function_signatures[_id]); +} + +QScriptValue qtscript_create_QFutureIterator_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QtScriptFutureIterator*)0)); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFutureIterator_prototype_call, qtscript_QFutureIterator_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFutureIterator_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFutureIterator_static_call, proto, qtscript_QFutureIterator_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureSynchronizer.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureSynchronizer.cpp new file mode 100644 index 00000000..88a704bd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureSynchronizer.cpp @@ -0,0 +1,125 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QFutureSynchronizer.h" + +static const char * const qtscript_QFutureSynchronizer_function_names[] = { + "QFutureSynchronizer" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QFutureSynchronizer_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QFutureSynchronizer_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QFutureSynchronizer_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFutureSynchronizer::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QtScriptFutureSynchronizer*) +Q_DECLARE_METATYPE(QtScriptShell_QFutureSynchronizer*) + +// +// QFutureSynchronizer +// + +static QScriptValue qtscript_QFutureSynchronizer_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QtScriptFutureSynchronizer* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFutureSynchronizer.%0(): this object is not a QFutureSynchronizer") + .arg(qtscript_QFutureSynchronizer_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QFutureSynchronizer"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFutureSynchronizer_throw_ambiguity_error_helper(context, + qtscript_QFutureSynchronizer_function_names[_id+1], + qtscript_QFutureSynchronizer_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFutureSynchronizer_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFutureSynchronizer(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QFutureSynchronizer* _q_cpp_result = new QtScriptShell_QFutureSynchronizer(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QtScriptFutureSynchronizer*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFutureSynchronizer_throw_ambiguity_error_helper(context, + qtscript_QFutureSynchronizer_function_names[_id], + qtscript_QFutureSynchronizer_function_signatures[_id]); +} + +QScriptValue qtscript_create_QFutureSynchronizer_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QtScriptFutureSynchronizer*)0)); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFutureSynchronizer_static_call, proto, qtscript_QFutureSynchronizer_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureSynchronizerVoid.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureSynchronizerVoid.cpp new file mode 100644 index 00000000..51340d4d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureSynchronizerVoid.cpp @@ -0,0 +1,125 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QFutureSynchronizerVoid.h" + +static const char * const qtscript_QFutureSynchronizerVoid_function_names[] = { + "QFutureSynchronizerVoid" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QFutureSynchronizerVoid_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QFutureSynchronizerVoid_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QFutureSynchronizerVoid_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFutureSynchronizerVoid::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QtScriptVoidFutureSynchronizer*) +Q_DECLARE_METATYPE(QtScriptShell_QFutureSynchronizerVoid*) + +// +// QFutureSynchronizerVoid +// + +static QScriptValue qtscript_QFutureSynchronizerVoid_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QtScriptVoidFutureSynchronizer* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFutureSynchronizerVoid.%0(): this object is not a QFutureSynchronizerVoid") + .arg(qtscript_QFutureSynchronizerVoid_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QFutureSynchronizerVoid"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFutureSynchronizerVoid_throw_ambiguity_error_helper(context, + qtscript_QFutureSynchronizerVoid_function_names[_id+1], + qtscript_QFutureSynchronizerVoid_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFutureSynchronizerVoid_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFutureSynchronizerVoid(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QFutureSynchronizerVoid* _q_cpp_result = new QtScriptShell_QFutureSynchronizerVoid(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QtScriptVoidFutureSynchronizer*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFutureSynchronizerVoid_throw_ambiguity_error_helper(context, + qtscript_QFutureSynchronizerVoid_function_names[_id], + qtscript_QFutureSynchronizerVoid_function_signatures[_id]); +} + +QScriptValue qtscript_create_QFutureSynchronizerVoid_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QtScriptVoidFutureSynchronizer*)0)); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFutureSynchronizerVoid_static_call, proto, qtscript_QFutureSynchronizerVoid_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureVoid.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureVoid.cpp new file mode 100644 index 00000000..befece83 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureVoid.cpp @@ -0,0 +1,299 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QFutureVoid_function_names[] = { + "QFutureVoid" + // static + // prototype + , "cancel" + , "isCanceled" + , "isFinished" + , "isPaused" + , "isRunning" + , "isStarted" + , "equals" + , "pause" + , "progressMaximum" + , "progressMinimum" + , "progressText" + , "progressValue" + , "resume" + , "setPaused" + , "togglePaused" + , "waitForFinished" + , "toString" +}; + +static const char * const qtscript_QFutureVoid_function_signatures[] = { + "\nQFuture other" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "QFuture other" + , "" + , "" + , "" + , "" + , "" + , "" + , "bool paused" + , "" + , "" +"" +}; + +static const int qtscript_QFutureVoid_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QFutureVoid_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFutureVoid::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QtScriptVoidFuture) +Q_DECLARE_METATYPE(QtScriptVoidFuture*) + +// +// QFutureVoid +// + +static QScriptValue qtscript_QFutureVoid_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 16; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QtScriptVoidFuture* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFutureVoid.%0(): this object is not a QFutureVoid") + .arg(qtscript_QFutureVoid_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->cancel(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isCanceled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isFinished(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isPaused(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isRunning(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isStarted(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + + const QtScriptVoidFuture & _q_arg0 = *qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + _q_self->pause(); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + int _q_result = _q_self->progressMaximum(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->progressMinimum(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->progressText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + int _q_result = _q_self->progressValue(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + _q_self->resume(); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setPaused(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 0) { + _q_self->togglePaused(); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 0) { + _q_self->waitForFinished(); + return context->engine()->undefinedValue(); + } + break; + + case 16: { + QString result = QString::fromLatin1("QFutureVoid"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFutureVoid_throw_ambiguity_error_helper(context, + qtscript_QFutureVoid_function_names[_id+1], + qtscript_QFutureVoid_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFutureVoid_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFutureVoid(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptVoidFuture _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + + const QtScriptVoidFuture & _q_arg0 = *qscriptvalue_cast(context->argument(0)); + QtScriptVoidFuture _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFutureVoid_throw_ambiguity_error_helper(context, + qtscript_QFutureVoid_function_names[_id], + qtscript_QFutureVoid_function_signatures[_id]); +} + +QScriptValue qtscript_create_QFutureVoid_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QtScriptVoidFuture*)0)); + for (int i = 0; i < 17; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFutureVoid_prototype_call, qtscript_QFutureVoid_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFutureVoid_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFutureVoid_static_call, proto, qtscript_QFutureVoid_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureWatcher.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureWatcher.cpp new file mode 100644 index 00000000..870f4768 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureWatcher.cpp @@ -0,0 +1,145 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +#include "qtscriptshell_QFutureWatcher.h" + +static const char * const qtscript_QFutureWatcher_function_names[] = { + "QFutureWatcher" + // static + // prototype + , "setFuture" + , "toString" +}; + +static const char * const qtscript_QFutureWatcher_function_signatures[] = { + "" + // static + // prototype + , "QFuture future" +"" +}; + +static const int qtscript_QFutureWatcher_function_lengths[] = { + 0 + // static + // prototype + , 1 + , 0 +}; + +static QScriptValue qtscript_QFutureWatcher_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFutureWatcher::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QtScriptFutureWatcher*) +Q_DECLARE_METATYPE(QtScriptShell_QFutureWatcher*) +Q_DECLARE_METATYPE(QtScriptFuture*) + +// +// QFutureWatcher +// + +static QScriptValue qtscript_QFutureWatcher_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QtScriptFutureWatcher* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFutureWatcher.%0(): this object is not a QFutureWatcher") + .arg(qtscript_QFutureWatcher_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + + const QtScriptFuture & _q_arg0 = *qscriptvalue_cast(context->argument(0)); + _q_self->setFuture(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: { + QString result = QString::fromLatin1("QFutureWatcher"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFutureWatcher_throw_ambiguity_error_helper(context, + qtscript_QFutureWatcher_function_names[_id+1], + qtscript_QFutureWatcher_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFutureWatcher_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFutureWatcher(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QFutureWatcher* _q_cpp_result = new QtScriptShell_QFutureWatcher(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QtScriptFutureWatcher*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFutureWatcher_throw_ambiguity_error_helper(context, + qtscript_QFutureWatcher_function_names[_id], + qtscript_QFutureWatcher_function_signatures[_id]); +} + +QScriptValue qtscript_create_QFutureWatcher_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QtScriptFutureWatcher*)0)); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFutureWatcher_prototype_call, qtscript_QFutureWatcher_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFutureWatcher_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFutureWatcher_static_call, proto, qtscript_QFutureWatcher_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureWatcherVoid.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureWatcherVoid.cpp new file mode 100644 index 00000000..ae16f619 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QFutureWatcherVoid.cpp @@ -0,0 +1,145 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +#include "qtscriptshell_QFutureWatcherVoid.h" + +static const char * const qtscript_QFutureWatcherVoid_function_names[] = { + "QFutureWatcherVoid" + // static + // prototype + , "setFuture" + , "toString" +}; + +static const char * const qtscript_QFutureWatcherVoid_function_signatures[] = { + "" + // static + // prototype + , "QFuture future" +"" +}; + +static const int qtscript_QFutureWatcherVoid_function_lengths[] = { + 0 + // static + // prototype + , 1 + , 0 +}; + +static QScriptValue qtscript_QFutureWatcherVoid_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFutureWatcherVoid::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QtScriptVoidFutureWatcher*) +Q_DECLARE_METATYPE(QtScriptShell_QFutureWatcherVoid*) +Q_DECLARE_METATYPE(QtScriptVoidFuture*) + +// +// QFutureWatcherVoid +// + +static QScriptValue qtscript_QFutureWatcherVoid_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QtScriptVoidFutureWatcher* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFutureWatcherVoid.%0(): this object is not a QFutureWatcherVoid") + .arg(qtscript_QFutureWatcherVoid_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + + const QtScriptVoidFuture & _q_arg0 = *qscriptvalue_cast(context->argument(0)); + _q_self->setFuture(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: { + QString result = QString::fromLatin1("QFutureWatcherVoid"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFutureWatcherVoid_throw_ambiguity_error_helper(context, + qtscript_QFutureWatcherVoid_function_names[_id+1], + qtscript_QFutureWatcherVoid_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFutureWatcherVoid_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFutureWatcherVoid(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QFutureWatcherVoid* _q_cpp_result = new QtScriptShell_QFutureWatcherVoid(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QtScriptVoidFutureWatcher*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFutureWatcherVoid_throw_ambiguity_error_helper(context, + qtscript_QFutureWatcherVoid_function_names[_id], + qtscript_QFutureWatcherVoid_function_signatures[_id]); +} + +QScriptValue qtscript_create_QFutureWatcherVoid_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QtScriptVoidFutureWatcher*)0)); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFutureWatcherVoid_prototype_call, qtscript_QFutureWatcherVoid_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFutureWatcherVoid_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFutureWatcherVoid_static_call, proto, qtscript_QFutureWatcherVoid_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QHistoryState.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QHistoryState.cpp new file mode 100644 index 00000000..d5aa0a35 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QHistoryState.cpp @@ -0,0 +1,253 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QHistoryState.h" + +static const char * const qtscript_QHistoryState_function_names[] = { + "QHistoryState" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QHistoryState_function_signatures[] = { + "HistoryType type, QState parent\nQState parent" + // static + // prototype +"" +}; + +static const int qtscript_QHistoryState_function_lengths[] = { + 2 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QHistoryState_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QHistoryState::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QHistoryState*) +Q_DECLARE_METATYPE(QtScriptShell_QHistoryState*) +Q_DECLARE_METATYPE(QHistoryState::HistoryType) +Q_DECLARE_METATYPE(QState*) +Q_DECLARE_METATYPE(QAbstractState*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QHistoryState::HistoryType +// + +static const QHistoryState::HistoryType qtscript_QHistoryState_HistoryType_values[] = { + QHistoryState::ShallowHistory + , QHistoryState::DeepHistory +}; + +static const char * const qtscript_QHistoryState_HistoryType_keys[] = { + "ShallowHistory" + , "DeepHistory" +}; + +static QString qtscript_QHistoryState_HistoryType_toStringHelper(QHistoryState::HistoryType value) +{ + if ((value >= QHistoryState::ShallowHistory) && (value <= QHistoryState::DeepHistory)) + return qtscript_QHistoryState_HistoryType_keys[static_cast(value)-static_cast(QHistoryState::ShallowHistory)]; + return QString(); +} + +static QScriptValue qtscript_QHistoryState_HistoryType_toScriptValue(QScriptEngine *engine, const QHistoryState::HistoryType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QHistoryState")); + return clazz.property(qtscript_QHistoryState_HistoryType_toStringHelper(value)); +} + +static void qtscript_QHistoryState_HistoryType_fromScriptValue(const QScriptValue &value, QHistoryState::HistoryType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QHistoryState_HistoryType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QHistoryState::ShallowHistory) && (arg <= QHistoryState::DeepHistory)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("HistoryType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QHistoryState_HistoryType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QHistoryState::HistoryType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QHistoryState_HistoryType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QHistoryState::HistoryType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QHistoryState_HistoryType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QHistoryState_HistoryType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QHistoryState_HistoryType, + qtscript_QHistoryState_HistoryType_valueOf, qtscript_QHistoryState_HistoryType_toString); + qScriptRegisterMetaType(engine, qtscript_QHistoryState_HistoryType_toScriptValue, + qtscript_QHistoryState_HistoryType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QHistoryState_HistoryType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QHistoryState_HistoryType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QHistoryState +// + +static QScriptValue qtscript_QHistoryState_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QHistoryState* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QHistoryState.%0(): this object is not a QHistoryState") + .arg(qtscript_QHistoryState_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QHistoryState"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QHistoryState_throw_ambiguity_error_helper(context, + qtscript_QHistoryState_function_names[_id+1], + qtscript_QHistoryState_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QHistoryState_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QHistoryState(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QHistoryState* _q_cpp_result = new QtScriptShell_QHistoryState(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QHistoryState*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QHistoryState::HistoryType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QHistoryState* _q_cpp_result = new QtScriptShell_QHistoryState(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QHistoryState*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + QState* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QHistoryState* _q_cpp_result = new QtScriptShell_QHistoryState(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QHistoryState*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QHistoryState::HistoryType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QState* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QHistoryState* _q_cpp_result = new QtScriptShell_QHistoryState(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QHistoryState*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QHistoryState_throw_ambiguity_error_helper(context, + qtscript_QHistoryState_function_names[_id], + qtscript_QHistoryState_function_signatures[_id]); +} + +static QScriptValue qtscript_QHistoryState_toScriptValue(QScriptEngine *engine, QHistoryState* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QHistoryState_fromScriptValue(const QScriptValue &value, QHistoryState* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QHistoryState_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QHistoryState*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QHistoryState_toScriptValue, + qtscript_QHistoryState_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QHistoryState_static_call, proto, qtscript_QHistoryState_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("HistoryType"), + qtscript_create_QHistoryState_HistoryType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QIODevice.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QIODevice.cpp new file mode 100644 index 00000000..7edacce0 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QIODevice.cpp @@ -0,0 +1,654 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QIODevice.h" + +static const char * const qtscript_QIODevice_function_names[] = { + "QIODevice" + // static + // prototype + , "atEnd" + , "bytesAvailable" + , "bytesToWrite" + , "canReadLine" + , "close" + , "errorString" + , "getChar" + , "isOpen" + , "isReadable" + , "isSequential" + , "isTextModeEnabled" + , "isWritable" + , "open" + , "openMode" + , "peek" + , "pos" + , "putChar" + , "read" + , "readAll" + , "readLine" + , "reset" + , "seek" + , "setTextModeEnabled" + , "size" + , "ungetChar" + , "waitForBytesWritten" + , "waitForReadyRead" + , "write" + , "toString" +}; + +static const char * const qtscript_QIODevice_function_signatures[] = { + "\nQObject parent" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "char c" + , "" + , "" + , "" + , "" + , "" + , "OpenMode mode" + , "" + , "qint64 maxlen" + , "" + , "char c" + , "qint64 maxlen" + , "" + , "qint64 maxlen" + , "" + , "qint64 pos" + , "bool enabled" + , "" + , "char c" + , "int msecs" + , "int msecs" + , "QByteArray data\nchar data" +"" +}; + +static const int qtscript_QIODevice_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 0 + , 1 + , 1 + , 0 + , 1 + , 0 + , 1 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QIODevice_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QIODevice::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QtScriptShell_QIODevice*) +Q_DECLARE_METATYPE(QIODevice::OpenModeFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(char*) +Q_DECLARE_METATYPE(const char*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QIODevice::OpenModeFlag +// + +static const QIODevice::OpenModeFlag qtscript_QIODevice_OpenModeFlag_values[] = { + QIODevice::NotOpen + , QIODevice::ReadOnly + , QIODevice::WriteOnly + , QIODevice::ReadWrite + , QIODevice::Append + , QIODevice::Truncate + , QIODevice::Text + , QIODevice::Unbuffered +}; + +static const char * const qtscript_QIODevice_OpenModeFlag_keys[] = { + "NotOpen" + , "ReadOnly" + , "WriteOnly" + , "ReadWrite" + , "Append" + , "Truncate" + , "Text" + , "Unbuffered" +}; + +static QString qtscript_QIODevice_OpenModeFlag_toStringHelper(QIODevice::OpenModeFlag value) +{ + for (int i = 0; i < 8; ++i) { + if (qtscript_QIODevice_OpenModeFlag_values[i] == value) + return QString::fromLatin1(qtscript_QIODevice_OpenModeFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QIODevice_OpenModeFlag_toScriptValue(QScriptEngine *engine, const QIODevice::OpenModeFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QIODevice")); + return clazz.property(qtscript_QIODevice_OpenModeFlag_toStringHelper(value)); +} + +static void qtscript_QIODevice_OpenModeFlag_fromScriptValue(const QScriptValue &value, QIODevice::OpenModeFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QIODevice_OpenModeFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 8; ++i) { + if (qtscript_QIODevice_OpenModeFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("OpenModeFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QIODevice_OpenModeFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QIODevice::OpenModeFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QIODevice_OpenModeFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QIODevice::OpenModeFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QIODevice_OpenModeFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QIODevice_OpenModeFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QIODevice_OpenModeFlag, + qtscript_QIODevice_OpenModeFlag_valueOf, qtscript_QIODevice_OpenModeFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QIODevice_OpenModeFlag_toScriptValue, + qtscript_QIODevice_OpenModeFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 8; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QIODevice_OpenModeFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QIODevice_OpenModeFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QIODevice::OpenMode +// + +static QScriptValue qtscript_QIODevice_OpenMode_toScriptValue(QScriptEngine *engine, const QIODevice::OpenMode &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QIODevice_OpenMode_fromScriptValue(const QScriptValue &value, QIODevice::OpenMode &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QIODevice_OpenMode(QScriptContext *context, QScriptEngine *engine) +{ + QIODevice::OpenMode result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("OpenMode(): argument %0 is not of type OpenModeFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QIODevice_OpenMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QIODevice::OpenMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QIODevice_OpenMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QIODevice::OpenMode value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 8; ++i) { + if ((value & qtscript_QIODevice_OpenModeFlag_values[i]) == qtscript_QIODevice_OpenModeFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QIODevice_OpenModeFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QIODevice_OpenMode_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QIODevice_OpenMode_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QIODevice_OpenMode, qtscript_QIODevice_OpenMode_valueOf, + qtscript_QIODevice_OpenMode_toString, qtscript_QIODevice_OpenMode_equals); + qScriptRegisterMetaType(engine, qtscript_QIODevice_OpenMode_toScriptValue, + qtscript_QIODevice_OpenMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QIODevice +// + +static QScriptValue qtscript_QIODevice_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 28; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QIODevice* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QIODevice.%0(): this object is not a QIODevice") + .arg(qtscript_QIODevice_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->atEnd(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->bytesAvailable(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->bytesToWrite(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->canReadLine(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + _q_self->close(); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->getChar(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isOpen(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isReadable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isSequential(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isTextModeEnabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isWritable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + bool _q_result = _q_self->open(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->openMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_result = _q_self->peek(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->putChar(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_result = _q_self->read(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->readAll(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->readLine(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_result = _q_self->readLine(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->reset(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->seek(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setTextModeEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->size(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 1) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->ungetChar(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->waitForBytesWritten(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->waitForReadyRead(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + qint64 _q_result = _q_self->write(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0))) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + qint64 _q_result = _q_self->write(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 28: { + QString result = QString::fromLatin1("QIODevice"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QIODevice_throw_ambiguity_error_helper(context, + qtscript_QIODevice_function_names[_id+1], + qtscript_QIODevice_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QIODevice_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QIODevice(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QIODevice* _q_cpp_result = new QtScriptShell_QIODevice(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QIODevice*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QIODevice* _q_cpp_result = new QtScriptShell_QIODevice(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QIODevice*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QIODevice_throw_ambiguity_error_helper(context, + qtscript_QIODevice_function_names[_id], + qtscript_QIODevice_function_signatures[_id]); +} + +static QScriptValue qtscript_QIODevice_toScriptValue(QScriptEngine *engine, QIODevice* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QIODevice_fromScriptValue(const QScriptValue &value, QIODevice* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QIODevice_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QIODevice*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 29; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QIODevice_prototype_call, qtscript_QIODevice_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QIODevice_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QIODevice_toScriptValue, + qtscript_QIODevice_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QIODevice_static_call, proto, qtscript_QIODevice_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("OpenModeFlag"), + qtscript_create_QIODevice_OpenModeFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("OpenMode"), + qtscript_create_QIODevice_OpenMode_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QLibraryInfo.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QLibraryInfo.cpp new file mode 100644 index 00000000..02590e45 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QLibraryInfo.cpp @@ -0,0 +1,311 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QLibraryInfo_function_names[] = { + "QLibraryInfo" + // static + , "build" + , "buildDate" + , "isDebugBuild" + , "licensedProducts" + , "licensee" + , "location" + , "platformPluginArguments" + // prototype + , "toString" +}; + +static const char * const qtscript_QLibraryInfo_function_signatures[] = { + "" + // static + , "" + , "" + , "" + , "" + , "" + , "LibraryLocation arg__1" + , "String platformName" + // prototype +"" +}; + +static const int qtscript_QLibraryInfo_function_lengths[] = { + 0 + // static + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + // prototype + , 0 +}; + +static QScriptValue qtscript_QLibraryInfo_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QLibraryInfo::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QLibraryInfo*) +Q_DECLARE_METATYPE(QLibraryInfo::LibraryLocation) +Q_DECLARE_METATYPE(const char*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QLibraryInfo::LibraryLocation +// + +static const QLibraryInfo::LibraryLocation qtscript_QLibraryInfo_LibraryLocation_values[] = { + QLibraryInfo::PrefixPath + , QLibraryInfo::DocumentationPath + , QLibraryInfo::HeadersPath + , QLibraryInfo::LibrariesPath + , QLibraryInfo::LibraryExecutablesPath + , QLibraryInfo::BinariesPath + , QLibraryInfo::PluginsPath + , QLibraryInfo::ImportsPath + , QLibraryInfo::Qml2ImportsPath + , QLibraryInfo::ArchDataPath + , QLibraryInfo::DataPath + , QLibraryInfo::TranslationsPath + , QLibraryInfo::ExamplesPath + , QLibraryInfo::TestsPath + , QLibraryInfo::SettingsPath +}; + +static const char * const qtscript_QLibraryInfo_LibraryLocation_keys[] = { + "PrefixPath" + , "DocumentationPath" + , "HeadersPath" + , "LibrariesPath" + , "LibraryExecutablesPath" + , "BinariesPath" + , "PluginsPath" + , "ImportsPath" + , "Qml2ImportsPath" + , "ArchDataPath" + , "DataPath" + , "TranslationsPath" + , "ExamplesPath" + , "TestsPath" + , "SettingsPath" +}; + +static QString qtscript_QLibraryInfo_LibraryLocation_toStringHelper(QLibraryInfo::LibraryLocation value) +{ + for (int i = 0; i < 15; ++i) { + if (qtscript_QLibraryInfo_LibraryLocation_values[i] == value) + return QString::fromLatin1(qtscript_QLibraryInfo_LibraryLocation_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QLibraryInfo_LibraryLocation_toScriptValue(QScriptEngine *engine, const QLibraryInfo::LibraryLocation &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QLibraryInfo")); + return clazz.property(qtscript_QLibraryInfo_LibraryLocation_toStringHelper(value)); +} + +static void qtscript_QLibraryInfo_LibraryLocation_fromScriptValue(const QScriptValue &value, QLibraryInfo::LibraryLocation &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QLibraryInfo_LibraryLocation(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 15; ++i) { + if (qtscript_QLibraryInfo_LibraryLocation_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("LibraryLocation(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QLibraryInfo_LibraryLocation_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QLibraryInfo::LibraryLocation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QLibraryInfo_LibraryLocation_toString(QScriptContext *context, QScriptEngine *engine) +{ + QLibraryInfo::LibraryLocation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QLibraryInfo_LibraryLocation_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QLibraryInfo_LibraryLocation_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QLibraryInfo_LibraryLocation, + qtscript_QLibraryInfo_LibraryLocation_valueOf, qtscript_QLibraryInfo_LibraryLocation_toString); + qScriptRegisterMetaType(engine, qtscript_QLibraryInfo_LibraryLocation_toScriptValue, + qtscript_QLibraryInfo_LibraryLocation_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 15; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QLibraryInfo_LibraryLocation_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QLibraryInfo_LibraryLocation_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QLibraryInfo +// + +static QScriptValue qtscript_QLibraryInfo_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QLibraryInfo* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QLibraryInfo.%0(): this object is not a QLibraryInfo") + .arg(qtscript_QLibraryInfo_function_names[_id+8])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QLibraryInfo"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QLibraryInfo_throw_ambiguity_error_helper(context, + qtscript_QLibraryInfo_function_names[_id+8], + qtscript_QLibraryInfo_function_signatures[_id+8]); +} + +static QScriptValue qtscript_QLibraryInfo_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QLibraryInfo cannot be constructed")); + break; + + case 1: + if (context->argumentCount() == 0) { + const char* _q_result = const_cast(QLibraryInfo::build()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QDate _q_result = QLibraryInfo::buildDate(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = QLibraryInfo::isDebugBuild(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = QLibraryInfo::licensedProducts(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QString _q_result = QLibraryInfo::licensee(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QLibraryInfo::LibraryLocation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = QLibraryInfo::location(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_result = QLibraryInfo::platformPluginArguments(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QLibraryInfo_throw_ambiguity_error_helper(context, + qtscript_QLibraryInfo_function_names[_id], + qtscript_QLibraryInfo_function_signatures[_id]); +} + +QScriptValue qtscript_create_QLibraryInfo_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QLibraryInfo*)0)); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QLibraryInfo_static_call, proto, qtscript_QLibraryInfo_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QLibraryInfo_static_call, + qtscript_QLibraryInfo_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QLibraryInfo_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("LibraryLocation"), + qtscript_create_QLibraryInfo_LibraryLocation_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QLocale.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QLocale.cpp new file mode 100644 index 00000000..9e5c139c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QLocale.cpp @@ -0,0 +1,3215 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QLocale_function_names[] = { + "QLocale" + // static + , "c" + , "countriesForLanguage" + , "countryToString" + , "languageToString" + , "matchingLocales" + , "scriptToString" + , "setDefault" + , "system" + // prototype + , "amText" + , "bcp47Name" + , "country" + , "createSeparatedList" + , "currencySymbol" + , "dateFormat" + , "dateTimeFormat" + , "dayName" + , "decimalPoint" + , "exponential" + , "firstDayOfWeek" + , "groupSeparator" + , "language" + , "measurementSystem" + , "monthName" + , "name" + , "nativeCountryName" + , "nativeLanguageName" + , "negativeSign" + , "numberOptions" + , "equals" + , "percent" + , "pmText" + , "positiveSign" + , "quoteString" + , "script" + , "setNumberOptions" + , "standaloneDayName" + , "standaloneMonthName" + , "textDirection" + , "timeFormat" + , "toCurrencyString" + , "toDate" + , "toDateTime" + , "toDouble" + , "toFloat" + , "toInt" + , "toLongLong" + , "toLower" + , "toShort" + , "toString" + , "toTime" + , "toUInt" + , "toULongLong" + , "toUShort" + , "toUpper" + , "uiLanguages" + , "weekdays" + , "zeroDigit" +}; + +static const char * const qtscript_QLocale_function_signatures[] = { + "\nLanguage language, Country country\nLanguage language, Script script, Country country\nQLocale other\nString name" + // static + , "" + , "Language lang" + , "Country country" + , "Language language" + , "Language language, Script script, Country country" + , "Script script" + , "QLocale locale" + , "" + // prototype + , "" + , "" + , "" + , "List strl" + , "CurrencySymbolFormat arg__1" + , "FormatType format" + , "FormatType format" + , "int arg__1, FormatType format" + , "" + , "" + , "" + , "" + , "" + , "" + , "int arg__1, FormatType format" + , "" + , "" + , "" + , "" + , "" + , "QLocale other" + , "" + , "" + , "" + , "String str, QuotationStyle style\nString str, QuotationStyle style" + , "" + , "NumberOptions options" + , "int arg__1, FormatType format" + , "int arg__1, FormatType format" + , "" + , "FormatType format" + , "double arg__1, String symbol\nfloat arg__1, String symbol\nint arg__1, String symbol\nqlonglong arg__1, String symbol\nqulonglong arg__1, String symbol\nshort arg__1, String symbol\nuint arg__1, String symbol\nushort arg__1, String symbol" + , "String string, FormatType arg__2\nString string, String format" + , "String string, FormatType format\nString string, String format" + , "String s\nString s, bool ok" + , "String s\nString s, bool ok" + , "String s, bool ok\nString s, bool ok" + , "String s, bool ok\nString s, bool ok" + , "String str" + , "String s, bool ok\nString s, bool ok" + , "QDate date, FormatType format\nQDate date, String formatStr\nQDateTime dateTime, FormatType format\nQDateTime dateTime, String format\nQTime time, FormatType format\nQTime time, String formatStr\ndouble i, char f, int prec\nfloat i, char f, int prec\nint i\nqulonglong i\nshort i" + , "String string, FormatType arg__2\nString string, String format" + , "String s, bool ok\nString s, bool ok" + , "String s, bool ok\nString s, bool ok" + , "String s, bool ok\nString s, bool ok" + , "String str" + , "" + , "" + , "" +}; + +static const int qtscript_QLocale_function_lengths[] = { + 3 + // static + , 0 + , 1 + , 1 + , 1 + , 3 + , 1 + , 1 + , 0 + // prototype + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 2 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 2 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 2 + , 0 + , 1 + , 2 + , 2 + , 0 + , 1 + , 2 + , 2 + , 2 + , 2 + , 2 + , 2 + , 2 + , 1 + , 2 + , 3 + , 2 + , 2 + , 2 + , 2 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QLocale_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QLocale::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QLocale*) +Q_DECLARE_METATYPE(QLocale::Language) +Q_DECLARE_METATYPE(QLocale::NumberOption) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QLocale::Country) +Q_DECLARE_METATYPE(QLocale::CurrencySymbolFormat) +Q_DECLARE_METATYPE(QLocale::Script) +Q_DECLARE_METATYPE(QLocale::QuotationStyle) +Q_DECLARE_METATYPE(QLocale::FormatType) +Q_DECLARE_METATYPE(Qt::DayOfWeek) +Q_DECLARE_METATYPE(QLocale::MeasurementSystem) +Q_DECLARE_METATYPE(QStringRef) +Q_DECLARE_METATYPE(Qt::LayoutDirection) +Q_DECLARE_METATYPE(bool*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QList) + + + Q_DECLARE_METATYPE(QScriptValue) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QLocale::Language +// + +static const QLocale::Language qtscript_QLocale_Language_values[] = { + QLocale::AnyLanguage + , QLocale::C + , QLocale::Abkhazian + , QLocale::Oromo + , QLocale::Afar + , QLocale::Afrikaans + , QLocale::Albanian + , QLocale::Amharic + , QLocale::Arabic + , QLocale::Armenian + , QLocale::Assamese + , QLocale::Aymara + , QLocale::Azerbaijani + , QLocale::Bashkir + , QLocale::Basque + , QLocale::Bengali + , QLocale::Dzongkha + , QLocale::Bihari + , QLocale::Bislama + , QLocale::Breton + , QLocale::Bulgarian + , QLocale::Burmese + , QLocale::Belarusian + , QLocale::Khmer + , QLocale::Catalan + , QLocale::Chinese + , QLocale::Corsican + , QLocale::Croatian + , QLocale::Czech + , QLocale::Danish + , QLocale::Dutch + , QLocale::English + , QLocale::Esperanto + , QLocale::Estonian + , QLocale::Faroese + , QLocale::Fijian + , QLocale::Finnish + , QLocale::French + , QLocale::WesternFrisian + , QLocale::Gaelic + , QLocale::Galician + , QLocale::Georgian + , QLocale::German + , QLocale::Greek + , QLocale::Greenlandic + , QLocale::Guarani + , QLocale::Gujarati + , QLocale::Hausa + , QLocale::Hebrew + , QLocale::Hindi + , QLocale::Hungarian + , QLocale::Icelandic + , QLocale::Indonesian + , QLocale::Interlingua + , QLocale::Interlingue + , QLocale::Inuktitut + , QLocale::Inupiak + , QLocale::Irish + , QLocale::Italian + , QLocale::Japanese + , QLocale::Javanese + , QLocale::Kannada + , QLocale::Kashmiri + , QLocale::Kazakh + , QLocale::Kinyarwanda + , QLocale::Kirghiz + , QLocale::Korean + , QLocale::Kurdish + , QLocale::Rundi + , QLocale::Lao + , QLocale::Latin + , QLocale::Latvian + , QLocale::Lingala + , QLocale::Lithuanian + , QLocale::Macedonian + , QLocale::Malagasy + , QLocale::Malay + , QLocale::Malayalam + , QLocale::Maltese + , QLocale::Maori + , QLocale::Marathi + , QLocale::Marshallese + , QLocale::Mongolian + , QLocale::NauruLanguage + , QLocale::Nepali + , QLocale::NorwegianBokmal + , QLocale::Occitan + , QLocale::Oriya + , QLocale::Pashto + , QLocale::Persian + , QLocale::Polish + , QLocale::Portuguese + , QLocale::Punjabi + , QLocale::Quechua + , QLocale::Romansh + , QLocale::Romanian + , QLocale::Russian + , QLocale::Samoan + , QLocale::Sango + , QLocale::Sanskrit + , QLocale::Serbian + , QLocale::Ossetic + , QLocale::SouthernSotho + , QLocale::Tswana + , QLocale::Shona + , QLocale::Sindhi + , QLocale::Sinhala + , QLocale::Swati + , QLocale::Slovak + , QLocale::Slovenian + , QLocale::Somali + , QLocale::Spanish + , QLocale::Sundanese + , QLocale::Swahili + , QLocale::Swedish + , QLocale::Sardinian + , QLocale::Tajik + , QLocale::Tamil + , QLocale::Tatar + , QLocale::Telugu + , QLocale::Thai + , QLocale::Tibetan + , QLocale::Tigrinya + , QLocale::Tongan + , QLocale::Tsonga + , QLocale::Turkish + , QLocale::Turkmen + , QLocale::Tahitian + , QLocale::Uighur + , QLocale::Ukrainian + , QLocale::Urdu + , QLocale::Uzbek + , QLocale::Vietnamese + , QLocale::Volapuk + , QLocale::Welsh + , QLocale::Wolof + , QLocale::Xhosa + , QLocale::Yiddish + , QLocale::Yoruba + , QLocale::Zhuang + , QLocale::Zulu + , QLocale::NorwegianNynorsk + , QLocale::Bosnian + , QLocale::Divehi + , QLocale::Manx + , QLocale::Cornish + , QLocale::Akan + , QLocale::Konkani + , QLocale::Ga + , QLocale::Igbo + , QLocale::Kamba + , QLocale::Syriac + , QLocale::Blin + , QLocale::Geez + , QLocale::Koro + , QLocale::Sidamo + , QLocale::Atsam + , QLocale::Tigre + , QLocale::Jju + , QLocale::Friulian + , QLocale::Venda + , QLocale::Ewe + , QLocale::Walamo + , QLocale::Hawaiian + , QLocale::Tyap + , QLocale::Nyanja + , QLocale::Filipino + , QLocale::SwissGerman + , QLocale::SichuanYi + , QLocale::Kpelle + , QLocale::LowGerman + , QLocale::SouthNdebele + , QLocale::NorthernSotho + , QLocale::NorthernSami + , QLocale::Taroko + , QLocale::Gusii + , QLocale::Taita + , QLocale::Fulah + , QLocale::Kikuyu + , QLocale::Samburu + , QLocale::Sena + , QLocale::NorthNdebele + , QLocale::Rombo + , QLocale::Tachelhit + , QLocale::Kabyle + , QLocale::Nyankole + , QLocale::Bena + , QLocale::Vunjo + , QLocale::Bambara + , QLocale::Embu + , QLocale::Cherokee + , QLocale::Morisyen + , QLocale::Makonde + , QLocale::Langi + , QLocale::Ganda + , QLocale::Bemba + , QLocale::Kabuverdianu + , QLocale::Meru + , QLocale::Kalenjin + , QLocale::Nama + , QLocale::Machame + , QLocale::Colognian + , QLocale::Masai + , QLocale::Soga + , QLocale::Luyia + , QLocale::Asu + , QLocale::Teso + , QLocale::Saho + , QLocale::KoyraChiini + , QLocale::Rwa + , QLocale::Luo + , QLocale::Chiga + , QLocale::CentralMoroccoTamazight + , QLocale::KoyraboroSenni + , QLocale::Shambala + , QLocale::Bodo + , QLocale::Avaric + , QLocale::Chamorro + , QLocale::Chechen + , QLocale::Church + , QLocale::Chuvash + , QLocale::Cree + , QLocale::Haitian + , QLocale::Herero + , QLocale::HiriMotu + , QLocale::Kanuri + , QLocale::Komi + , QLocale::Kongo + , QLocale::Kwanyama + , QLocale::Limburgish + , QLocale::LubaKatanga + , QLocale::Luxembourgish + , QLocale::Navaho + , QLocale::Ndonga + , QLocale::Ojibwa + , QLocale::Pali + , QLocale::Walloon + , QLocale::Aghem + , QLocale::Basaa + , QLocale::Zarma + , QLocale::Duala + , QLocale::JolaFonyi + , QLocale::Ewondo + , QLocale::Bafia + , QLocale::MakhuwaMeetto + , QLocale::Mundang + , QLocale::Kwasio + , QLocale::Nuer + , QLocale::Sakha + , QLocale::Sangu + , QLocale::CongoSwahili + , QLocale::Tasawaq + , QLocale::Vai + , QLocale::Walser + , QLocale::Yangben + , QLocale::Avestan + , QLocale::Asturian + , QLocale::Ngomba + , QLocale::Kako + , QLocale::Meta + , QLocale::Ngiemboon + , QLocale::Aragonese + , QLocale::Akkadian + , QLocale::AncientEgyptian + , QLocale::AncientGreek + , QLocale::Aramaic + , QLocale::Balinese + , QLocale::Bamun + , QLocale::BatakToba + , QLocale::Buginese + , QLocale::Buhid + , QLocale::Carian + , QLocale::Chakma + , QLocale::ClassicalMandaic + , QLocale::Coptic + , QLocale::Dogri + , QLocale::EasternCham + , QLocale::EasternKayah + , QLocale::Etruscan + , QLocale::Gothic + , QLocale::Hanunoo + , QLocale::Ingush + , QLocale::LargeFloweryMiao + , QLocale::Lepcha + , QLocale::Limbu + , QLocale::Lisu + , QLocale::Lu + , QLocale::Lycian + , QLocale::Lydian + , QLocale::Mandingo + , QLocale::Manipuri + , QLocale::Meroitic + , QLocale::NorthernThai + , QLocale::OldIrish + , QLocale::OldNorse + , QLocale::OldPersian + , QLocale::OldTurkish + , QLocale::Pahlavi + , QLocale::Parthian + , QLocale::Phoenician + , QLocale::PrakritLanguage + , QLocale::Rejang + , QLocale::Sabaean + , QLocale::Samaritan + , QLocale::Santali + , QLocale::Saurashtra + , QLocale::Sora + , QLocale::Sylheti + , QLocale::Tagbanwa + , QLocale::TaiDam + , QLocale::TaiNua + , QLocale::Ugaritic + , QLocale::Akoose + , QLocale::Lakota + , QLocale::StandardMoroccanTamazight + , QLocale::Mapuche + , QLocale::CentralKurdish + , QLocale::LowerSorbian + , QLocale::UpperSorbian + , QLocale::Kenyang + , QLocale::Mohawk + , QLocale::Nko + , QLocale::Prussian + , QLocale::Kiche + , QLocale::SouthernSami + , QLocale::LuleSami + , QLocale::InariSami + , QLocale::SkoltSami + , QLocale::Warlpiri + , QLocale::ManichaeanMiddlePersian + , QLocale::Mende + , QLocale::AncientNorthArabian + , QLocale::LinearA + , QLocale::HmongNjua + , QLocale::Ho + , QLocale::Lezghian + , QLocale::Bassa + , QLocale::Mono + , QLocale::TedimChin + , QLocale::Maithili +}; + +static const char * const qtscript_QLocale_Language_keys[] = { + "AnyLanguage" + , "C" + , "Abkhazian" + , "Oromo" + , "Afar" + , "Afrikaans" + , "Albanian" + , "Amharic" + , "Arabic" + , "Armenian" + , "Assamese" + , "Aymara" + , "Azerbaijani" + , "Bashkir" + , "Basque" + , "Bengali" + , "Dzongkha" + , "Bihari" + , "Bislama" + , "Breton" + , "Bulgarian" + , "Burmese" + , "Belarusian" + , "Khmer" + , "Catalan" + , "Chinese" + , "Corsican" + , "Croatian" + , "Czech" + , "Danish" + , "Dutch" + , "English" + , "Esperanto" + , "Estonian" + , "Faroese" + , "Fijian" + , "Finnish" + , "French" + , "WesternFrisian" + , "Gaelic" + , "Galician" + , "Georgian" + , "German" + , "Greek" + , "Greenlandic" + , "Guarani" + , "Gujarati" + , "Hausa" + , "Hebrew" + , "Hindi" + , "Hungarian" + , "Icelandic" + , "Indonesian" + , "Interlingua" + , "Interlingue" + , "Inuktitut" + , "Inupiak" + , "Irish" + , "Italian" + , "Japanese" + , "Javanese" + , "Kannada" + , "Kashmiri" + , "Kazakh" + , "Kinyarwanda" + , "Kirghiz" + , "Korean" + , "Kurdish" + , "Rundi" + , "Lao" + , "Latin" + , "Latvian" + , "Lingala" + , "Lithuanian" + , "Macedonian" + , "Malagasy" + , "Malay" + , "Malayalam" + , "Maltese" + , "Maori" + , "Marathi" + , "Marshallese" + , "Mongolian" + , "NauruLanguage" + , "Nepali" + , "NorwegianBokmal" + , "Occitan" + , "Oriya" + , "Pashto" + , "Persian" + , "Polish" + , "Portuguese" + , "Punjabi" + , "Quechua" + , "Romansh" + , "Romanian" + , "Russian" + , "Samoan" + , "Sango" + , "Sanskrit" + , "Serbian" + , "Ossetic" + , "SouthernSotho" + , "Tswana" + , "Shona" + , "Sindhi" + , "Sinhala" + , "Swati" + , "Slovak" + , "Slovenian" + , "Somali" + , "Spanish" + , "Sundanese" + , "Swahili" + , "Swedish" + , "Sardinian" + , "Tajik" + , "Tamil" + , "Tatar" + , "Telugu" + , "Thai" + , "Tibetan" + , "Tigrinya" + , "Tongan" + , "Tsonga" + , "Turkish" + , "Turkmen" + , "Tahitian" + , "Uighur" + , "Ukrainian" + , "Urdu" + , "Uzbek" + , "Vietnamese" + , "Volapuk" + , "Welsh" + , "Wolof" + , "Xhosa" + , "Yiddish" + , "Yoruba" + , "Zhuang" + , "Zulu" + , "NorwegianNynorsk" + , "Bosnian" + , "Divehi" + , "Manx" + , "Cornish" + , "Akan" + , "Konkani" + , "Ga" + , "Igbo" + , "Kamba" + , "Syriac" + , "Blin" + , "Geez" + , "Koro" + , "Sidamo" + , "Atsam" + , "Tigre" + , "Jju" + , "Friulian" + , "Venda" + , "Ewe" + , "Walamo" + , "Hawaiian" + , "Tyap" + , "Nyanja" + , "Filipino" + , "SwissGerman" + , "SichuanYi" + , "Kpelle" + , "LowGerman" + , "SouthNdebele" + , "NorthernSotho" + , "NorthernSami" + , "Taroko" + , "Gusii" + , "Taita" + , "Fulah" + , "Kikuyu" + , "Samburu" + , "Sena" + , "NorthNdebele" + , "Rombo" + , "Tachelhit" + , "Kabyle" + , "Nyankole" + , "Bena" + , "Vunjo" + , "Bambara" + , "Embu" + , "Cherokee" + , "Morisyen" + , "Makonde" + , "Langi" + , "Ganda" + , "Bemba" + , "Kabuverdianu" + , "Meru" + , "Kalenjin" + , "Nama" + , "Machame" + , "Colognian" + , "Masai" + , "Soga" + , "Luyia" + , "Asu" + , "Teso" + , "Saho" + , "KoyraChiini" + , "Rwa" + , "Luo" + , "Chiga" + , "CentralMoroccoTamazight" + , "KoyraboroSenni" + , "Shambala" + , "Bodo" + , "Avaric" + , "Chamorro" + , "Chechen" + , "Church" + , "Chuvash" + , "Cree" + , "Haitian" + , "Herero" + , "HiriMotu" + , "Kanuri" + , "Komi" + , "Kongo" + , "Kwanyama" + , "Limburgish" + , "LubaKatanga" + , "Luxembourgish" + , "Navaho" + , "Ndonga" + , "Ojibwa" + , "Pali" + , "Walloon" + , "Aghem" + , "Basaa" + , "Zarma" + , "Duala" + , "JolaFonyi" + , "Ewondo" + , "Bafia" + , "MakhuwaMeetto" + , "Mundang" + , "Kwasio" + , "Nuer" + , "Sakha" + , "Sangu" + , "CongoSwahili" + , "Tasawaq" + , "Vai" + , "Walser" + , "Yangben" + , "Avestan" + , "Asturian" + , "Ngomba" + , "Kako" + , "Meta" + , "Ngiemboon" + , "Aragonese" + , "Akkadian" + , "AncientEgyptian" + , "AncientGreek" + , "Aramaic" + , "Balinese" + , "Bamun" + , "BatakToba" + , "Buginese" + , "Buhid" + , "Carian" + , "Chakma" + , "ClassicalMandaic" + , "Coptic" + , "Dogri" + , "EasternCham" + , "EasternKayah" + , "Etruscan" + , "Gothic" + , "Hanunoo" + , "Ingush" + , "LargeFloweryMiao" + , "Lepcha" + , "Limbu" + , "Lisu" + , "Lu" + , "Lycian" + , "Lydian" + , "Mandingo" + , "Manipuri" + , "Meroitic" + , "NorthernThai" + , "OldIrish" + , "OldNorse" + , "OldPersian" + , "OldTurkish" + , "Pahlavi" + , "Parthian" + , "Phoenician" + , "PrakritLanguage" + , "Rejang" + , "Sabaean" + , "Samaritan" + , "Santali" + , "Saurashtra" + , "Sora" + , "Sylheti" + , "Tagbanwa" + , "TaiDam" + , "TaiNua" + , "Ugaritic" + , "Akoose" + , "Lakota" + , "StandardMoroccanTamazight" + , "Mapuche" + , "CentralKurdish" + , "LowerSorbian" + , "UpperSorbian" + , "Kenyang" + , "Mohawk" + , "Nko" + , "Prussian" + , "Kiche" + , "SouthernSami" + , "LuleSami" + , "InariSami" + , "SkoltSami" + , "Warlpiri" + , "ManichaeanMiddlePersian" + , "Mende" + , "AncientNorthArabian" + , "LinearA" + , "HmongNjua" + , "Ho" + , "Lezghian" + , "Bassa" + , "Mono" + , "TedimChin" + , "Maithili" +}; + +static QString qtscript_QLocale_Language_toStringHelper(QLocale::Language value) +{ + if ((value >= QLocale::AnyLanguage) && (value <= QLocale::Maithili)) + return qtscript_QLocale_Language_keys[static_cast(value)-static_cast(QLocale::AnyLanguage)]; + return QString(); +} + +static QScriptValue qtscript_QLocale_Language_toScriptValue(QScriptEngine *engine, const QLocale::Language &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QLocale")); + return clazz.property(qtscript_QLocale_Language_toStringHelper(value)); +} + +static void qtscript_QLocale_Language_fromScriptValue(const QScriptValue &value, QLocale::Language &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QLocale_Language(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QLocale::AnyLanguage) && (arg <= QLocale::Maithili)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Language(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QLocale_Language_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QLocale::Language value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QLocale_Language_toString(QScriptContext *context, QScriptEngine *engine) +{ + QLocale::Language value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QLocale_Language_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QLocale_Language_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QLocale_Language, + qtscript_QLocale_Language_valueOf, qtscript_QLocale_Language_toString); + qScriptRegisterMetaType(engine, qtscript_QLocale_Language_toScriptValue, + qtscript_QLocale_Language_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 340; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QLocale_Language_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QLocale_Language_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QLocale::NumberOption +// + +static const QLocale::NumberOption qtscript_QLocale_NumberOption_values[] = { + QLocale::OmitGroupSeparator + , QLocale::RejectGroupSeparator +}; + +static const char * const qtscript_QLocale_NumberOption_keys[] = { + "OmitGroupSeparator" + , "RejectGroupSeparator" +}; + +static QString qtscript_QLocale_NumberOption_toStringHelper(QLocale::NumberOption value) +{ + if ((value >= QLocale::OmitGroupSeparator) && (value <= QLocale::RejectGroupSeparator)) + return qtscript_QLocale_NumberOption_keys[static_cast(value)-static_cast(QLocale::OmitGroupSeparator)]; + return QString(); +} + +static QScriptValue qtscript_QLocale_NumberOption_toScriptValue(QScriptEngine *engine, const QLocale::NumberOption &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QLocale")); + return clazz.property(qtscript_QLocale_NumberOption_toStringHelper(value)); +} + +static void qtscript_QLocale_NumberOption_fromScriptValue(const QScriptValue &value, QLocale::NumberOption &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QLocale_NumberOption(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QLocale::OmitGroupSeparator) && (arg <= QLocale::RejectGroupSeparator)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("NumberOption(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QLocale_NumberOption_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QLocale::NumberOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QLocale_NumberOption_toString(QScriptContext *context, QScriptEngine *engine) +{ + QLocale::NumberOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QLocale_NumberOption_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QLocale_NumberOption_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QLocale_NumberOption, + qtscript_QLocale_NumberOption_valueOf, qtscript_QLocale_NumberOption_toString); + qScriptRegisterMetaType(engine, qtscript_QLocale_NumberOption_toScriptValue, + qtscript_QLocale_NumberOption_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QLocale_NumberOption_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QLocale_NumberOption_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QLocale::NumberOptions +// + +static QScriptValue qtscript_QLocale_NumberOptions_toScriptValue(QScriptEngine *engine, const QLocale::NumberOptions &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QLocale_NumberOptions_fromScriptValue(const QScriptValue &value, QLocale::NumberOptions &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QLocale_NumberOptions(QScriptContext *context, QScriptEngine *engine) +{ + QLocale::NumberOptions result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("NumberOptions(): argument %0 is not of type NumberOption").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QLocale_NumberOptions_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QLocale::NumberOptions value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QLocale_NumberOptions_toString(QScriptContext *context, QScriptEngine *engine) +{ + QLocale::NumberOptions value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 2; ++i) { + if ((value & qtscript_QLocale_NumberOption_values[i]) == qtscript_QLocale_NumberOption_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QLocale_NumberOption_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QLocale_NumberOptions_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QLocale_NumberOptions_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QLocale_NumberOptions, qtscript_QLocale_NumberOptions_valueOf, + qtscript_QLocale_NumberOptions_toString, qtscript_QLocale_NumberOptions_equals); + qScriptRegisterMetaType(engine, qtscript_QLocale_NumberOptions_toScriptValue, + qtscript_QLocale_NumberOptions_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QLocale::Country +// + +static const QLocale::Country qtscript_QLocale_Country_values[] = { + QLocale::AnyCountry + , QLocale::Afghanistan + , QLocale::Albania + , QLocale::Algeria + , QLocale::AmericanSamoa + , QLocale::Andorra + , QLocale::Angola + , QLocale::Anguilla + , QLocale::Antarctica + , QLocale::AntiguaAndBarbuda + , QLocale::Argentina + , QLocale::Armenia + , QLocale::Aruba + , QLocale::Australia + , QLocale::Austria + , QLocale::Azerbaijan + , QLocale::Bahamas + , QLocale::Bahrain + , QLocale::Bangladesh + , QLocale::Barbados + , QLocale::Belarus + , QLocale::Belgium + , QLocale::Belize + , QLocale::Benin + , QLocale::Bermuda + , QLocale::Bhutan + , QLocale::Bolivia + , QLocale::BosniaAndHerzegowina + , QLocale::Botswana + , QLocale::BouvetIsland + , QLocale::Brazil + , QLocale::BritishIndianOceanTerritory + , QLocale::Brunei + , QLocale::Bulgaria + , QLocale::BurkinaFaso + , QLocale::Burundi + , QLocale::Cambodia + , QLocale::Cameroon + , QLocale::Canada + , QLocale::CapeVerde + , QLocale::CaymanIslands + , QLocale::CentralAfricanRepublic + , QLocale::Chad + , QLocale::Chile + , QLocale::China + , QLocale::ChristmasIsland + , QLocale::CocosIslands + , QLocale::Colombia + , QLocale::Comoros + , QLocale::CongoKinshasa + , QLocale::CongoBrazzaville + , QLocale::CookIslands + , QLocale::CostaRica + , QLocale::IvoryCoast + , QLocale::Croatia + , QLocale::Cuba + , QLocale::Cyprus + , QLocale::CzechRepublic + , QLocale::Denmark + , QLocale::Djibouti + , QLocale::Dominica + , QLocale::DominicanRepublic + , QLocale::EastTimor + , QLocale::Ecuador + , QLocale::Egypt + , QLocale::ElSalvador + , QLocale::EquatorialGuinea + , QLocale::Eritrea + , QLocale::Estonia + , QLocale::Ethiopia + , QLocale::FalklandIslands + , QLocale::FaroeIslands + , QLocale::Fiji + , QLocale::Finland + , QLocale::France + , QLocale::Guernsey + , QLocale::FrenchGuiana + , QLocale::FrenchPolynesia + , QLocale::FrenchSouthernTerritories + , QLocale::Gabon + , QLocale::Gambia + , QLocale::Georgia + , QLocale::Germany + , QLocale::Ghana + , QLocale::Gibraltar + , QLocale::Greece + , QLocale::Greenland + , QLocale::Grenada + , QLocale::Guadeloupe + , QLocale::Guam + , QLocale::Guatemala + , QLocale::Guinea + , QLocale::GuineaBissau + , QLocale::Guyana + , QLocale::Haiti + , QLocale::HeardAndMcDonaldIslands + , QLocale::Honduras + , QLocale::HongKong + , QLocale::Hungary + , QLocale::Iceland + , QLocale::India + , QLocale::Indonesia + , QLocale::Iran + , QLocale::Iraq + , QLocale::Ireland + , QLocale::Israel + , QLocale::Italy + , QLocale::Jamaica + , QLocale::Japan + , QLocale::Jordan + , QLocale::Kazakhstan + , QLocale::Kenya + , QLocale::Kiribati + , QLocale::NorthKorea + , QLocale::SouthKorea + , QLocale::Kuwait + , QLocale::Kyrgyzstan + , QLocale::Laos + , QLocale::Latvia + , QLocale::Lebanon + , QLocale::Lesotho + , QLocale::Liberia + , QLocale::Libya + , QLocale::Liechtenstein + , QLocale::Lithuania + , QLocale::Luxembourg + , QLocale::Macau + , QLocale::Macedonia + , QLocale::Madagascar + , QLocale::Malawi + , QLocale::Malaysia + , QLocale::Maldives + , QLocale::Mali + , QLocale::Malta + , QLocale::MarshallIslands + , QLocale::Martinique + , QLocale::Mauritania + , QLocale::Mauritius + , QLocale::Mayotte + , QLocale::Mexico + , QLocale::Micronesia + , QLocale::Moldova + , QLocale::Monaco + , QLocale::Mongolia + , QLocale::Montserrat + , QLocale::Morocco + , QLocale::Mozambique + , QLocale::Myanmar + , QLocale::Namibia + , QLocale::NauruCountry + , QLocale::Nepal + , QLocale::Netherlands + , QLocale::CuraSao + , QLocale::NewCaledonia + , QLocale::NewZealand + , QLocale::Nicaragua + , QLocale::Niger + , QLocale::Nigeria + , QLocale::Niue + , QLocale::NorfolkIsland + , QLocale::NorthernMarianaIslands + , QLocale::Norway + , QLocale::Oman + , QLocale::Pakistan + , QLocale::Palau + , QLocale::PalestinianTerritories + , QLocale::Panama + , QLocale::PapuaNewGuinea + , QLocale::Paraguay + , QLocale::Peru + , QLocale::Philippines + , QLocale::Pitcairn + , QLocale::Poland + , QLocale::Portugal + , QLocale::PuertoRico + , QLocale::Qatar + , QLocale::Reunion + , QLocale::Romania + , QLocale::Russia + , QLocale::Rwanda + , QLocale::SaintKittsAndNevis + , QLocale::SaintLucia + , QLocale::SaintVincentAndTheGrenadines + , QLocale::Samoa + , QLocale::SanMarino + , QLocale::SaoTomeAndPrincipe + , QLocale::SaudiArabia + , QLocale::Senegal + , QLocale::Seychelles + , QLocale::SierraLeone + , QLocale::Singapore + , QLocale::Slovakia + , QLocale::Slovenia + , QLocale::SolomonIslands + , QLocale::Somalia + , QLocale::SouthAfrica + , QLocale::SouthGeorgiaAndTheSouthSandwichIslands + , QLocale::Spain + , QLocale::SriLanka + , QLocale::SaintHelena + , QLocale::SaintPierreAndMiquelon + , QLocale::Sudan + , QLocale::Suriname + , QLocale::SvalbardAndJanMayenIslands + , QLocale::Swaziland + , QLocale::Sweden + , QLocale::Switzerland + , QLocale::Syria + , QLocale::Taiwan + , QLocale::Tajikistan + , QLocale::Tanzania + , QLocale::Thailand + , QLocale::Togo + , QLocale::Tokelau + , QLocale::Tonga + , QLocale::TrinidadAndTobago + , QLocale::Tunisia + , QLocale::Turkey + , QLocale::Turkmenistan + , QLocale::TurksAndCaicosIslands + , QLocale::Tuvalu + , QLocale::Uganda + , QLocale::Ukraine + , QLocale::UnitedArabEmirates + , QLocale::UnitedKingdom + , QLocale::UnitedStates + , QLocale::UnitedStatesMinorOutlyingIslands + , QLocale::Uruguay + , QLocale::Uzbekistan + , QLocale::Vanuatu + , QLocale::VaticanCityState + , QLocale::Venezuela + , QLocale::Vietnam + , QLocale::BritishVirginIslands + , QLocale::UnitedStatesVirginIslands + , QLocale::WallisAndFutunaIslands + , QLocale::WesternSahara + , QLocale::Yemen + , QLocale::CanaryIslands + , QLocale::Zambia + , QLocale::Zimbabwe + , QLocale::ClippertonIsland + , QLocale::Montenegro + , QLocale::Serbia + , QLocale::SaintBarthelemy + , QLocale::SaintMartin + , QLocale::LatinAmericaAndTheCaribbean + , QLocale::AscensionIsland + , QLocale::AlandIslands + , QLocale::DiegoGarcia + , QLocale::CeutaAndMelilla + , QLocale::IsleOfMan + , QLocale::Jersey + , QLocale::TristanDaCunha + , QLocale::SouthSudan + , QLocale::Bonaire + , QLocale::SintMaarten + , QLocale::Kosovo +}; + +static const char * const qtscript_QLocale_Country_keys[] = { + "AnyCountry" + , "Afghanistan" + , "Albania" + , "Algeria" + , "AmericanSamoa" + , "Andorra" + , "Angola" + , "Anguilla" + , "Antarctica" + , "AntiguaAndBarbuda" + , "Argentina" + , "Armenia" + , "Aruba" + , "Australia" + , "Austria" + , "Azerbaijan" + , "Bahamas" + , "Bahrain" + , "Bangladesh" + , "Barbados" + , "Belarus" + , "Belgium" + , "Belize" + , "Benin" + , "Bermuda" + , "Bhutan" + , "Bolivia" + , "BosniaAndHerzegowina" + , "Botswana" + , "BouvetIsland" + , "Brazil" + , "BritishIndianOceanTerritory" + , "Brunei" + , "Bulgaria" + , "BurkinaFaso" + , "Burundi" + , "Cambodia" + , "Cameroon" + , "Canada" + , "CapeVerde" + , "CaymanIslands" + , "CentralAfricanRepublic" + , "Chad" + , "Chile" + , "China" + , "ChristmasIsland" + , "CocosIslands" + , "Colombia" + , "Comoros" + , "CongoKinshasa" + , "CongoBrazzaville" + , "CookIslands" + , "CostaRica" + , "IvoryCoast" + , "Croatia" + , "Cuba" + , "Cyprus" + , "CzechRepublic" + , "Denmark" + , "Djibouti" + , "Dominica" + , "DominicanRepublic" + , "EastTimor" + , "Ecuador" + , "Egypt" + , "ElSalvador" + , "EquatorialGuinea" + , "Eritrea" + , "Estonia" + , "Ethiopia" + , "FalklandIslands" + , "FaroeIslands" + , "Fiji" + , "Finland" + , "France" + , "Guernsey" + , "FrenchGuiana" + , "FrenchPolynesia" + , "FrenchSouthernTerritories" + , "Gabon" + , "Gambia" + , "Georgia" + , "Germany" + , "Ghana" + , "Gibraltar" + , "Greece" + , "Greenland" + , "Grenada" + , "Guadeloupe" + , "Guam" + , "Guatemala" + , "Guinea" + , "GuineaBissau" + , "Guyana" + , "Haiti" + , "HeardAndMcDonaldIslands" + , "Honduras" + , "HongKong" + , "Hungary" + , "Iceland" + , "India" + , "Indonesia" + , "Iran" + , "Iraq" + , "Ireland" + , "Israel" + , "Italy" + , "Jamaica" + , "Japan" + , "Jordan" + , "Kazakhstan" + , "Kenya" + , "Kiribati" + , "NorthKorea" + , "SouthKorea" + , "Kuwait" + , "Kyrgyzstan" + , "Laos" + , "Latvia" + , "Lebanon" + , "Lesotho" + , "Liberia" + , "Libya" + , "Liechtenstein" + , "Lithuania" + , "Luxembourg" + , "Macau" + , "Macedonia" + , "Madagascar" + , "Malawi" + , "Malaysia" + , "Maldives" + , "Mali" + , "Malta" + , "MarshallIslands" + , "Martinique" + , "Mauritania" + , "Mauritius" + , "Mayotte" + , "Mexico" + , "Micronesia" + , "Moldova" + , "Monaco" + , "Mongolia" + , "Montserrat" + , "Morocco" + , "Mozambique" + , "Myanmar" + , "Namibia" + , "NauruCountry" + , "Nepal" + , "Netherlands" + , "CuraSao" + , "NewCaledonia" + , "NewZealand" + , "Nicaragua" + , "Niger" + , "Nigeria" + , "Niue" + , "NorfolkIsland" + , "NorthernMarianaIslands" + , "Norway" + , "Oman" + , "Pakistan" + , "Palau" + , "PalestinianTerritories" + , "Panama" + , "PapuaNewGuinea" + , "Paraguay" + , "Peru" + , "Philippines" + , "Pitcairn" + , "Poland" + , "Portugal" + , "PuertoRico" + , "Qatar" + , "Reunion" + , "Romania" + , "Russia" + , "Rwanda" + , "SaintKittsAndNevis" + , "SaintLucia" + , "SaintVincentAndTheGrenadines" + , "Samoa" + , "SanMarino" + , "SaoTomeAndPrincipe" + , "SaudiArabia" + , "Senegal" + , "Seychelles" + , "SierraLeone" + , "Singapore" + , "Slovakia" + , "Slovenia" + , "SolomonIslands" + , "Somalia" + , "SouthAfrica" + , "SouthGeorgiaAndTheSouthSandwichIslands" + , "Spain" + , "SriLanka" + , "SaintHelena" + , "SaintPierreAndMiquelon" + , "Sudan" + , "Suriname" + , "SvalbardAndJanMayenIslands" + , "Swaziland" + , "Sweden" + , "Switzerland" + , "Syria" + , "Taiwan" + , "Tajikistan" + , "Tanzania" + , "Thailand" + , "Togo" + , "Tokelau" + , "Tonga" + , "TrinidadAndTobago" + , "Tunisia" + , "Turkey" + , "Turkmenistan" + , "TurksAndCaicosIslands" + , "Tuvalu" + , "Uganda" + , "Ukraine" + , "UnitedArabEmirates" + , "UnitedKingdom" + , "UnitedStates" + , "UnitedStatesMinorOutlyingIslands" + , "Uruguay" + , "Uzbekistan" + , "Vanuatu" + , "VaticanCityState" + , "Venezuela" + , "Vietnam" + , "BritishVirginIslands" + , "UnitedStatesVirginIslands" + , "WallisAndFutunaIslands" + , "WesternSahara" + , "Yemen" + , "CanaryIslands" + , "Zambia" + , "Zimbabwe" + , "ClippertonIsland" + , "Montenegro" + , "Serbia" + , "SaintBarthelemy" + , "SaintMartin" + , "LatinAmericaAndTheCaribbean" + , "AscensionIsland" + , "AlandIslands" + , "DiegoGarcia" + , "CeutaAndMelilla" + , "IsleOfMan" + , "Jersey" + , "TristanDaCunha" + , "SouthSudan" + , "Bonaire" + , "SintMaarten" + , "Kosovo" +}; + +static QString qtscript_QLocale_Country_toStringHelper(QLocale::Country value) +{ + if ((value >= QLocale::AnyCountry) && (value <= QLocale::Kosovo)) + return qtscript_QLocale_Country_keys[static_cast(value)-static_cast(QLocale::AnyCountry)]; + return QString(); +} + +static QScriptValue qtscript_QLocale_Country_toScriptValue(QScriptEngine *engine, const QLocale::Country &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QLocale")); + return clazz.property(qtscript_QLocale_Country_toStringHelper(value)); +} + +static void qtscript_QLocale_Country_fromScriptValue(const QScriptValue &value, QLocale::Country &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QLocale_Country(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QLocale::AnyCountry) && (arg <= QLocale::Kosovo)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Country(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QLocale_Country_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QLocale::Country value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QLocale_Country_toString(QScriptContext *context, QScriptEngine *engine) +{ + QLocale::Country value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QLocale_Country_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QLocale_Country_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QLocale_Country, + qtscript_QLocale_Country_valueOf, qtscript_QLocale_Country_toString); + qScriptRegisterMetaType(engine, qtscript_QLocale_Country_toScriptValue, + qtscript_QLocale_Country_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 258; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QLocale_Country_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QLocale_Country_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QLocale::CurrencySymbolFormat +// + +static const QLocale::CurrencySymbolFormat qtscript_QLocale_CurrencySymbolFormat_values[] = { + QLocale::CurrencyIsoCode + , QLocale::CurrencySymbol + , QLocale::CurrencyDisplayName +}; + +static const char * const qtscript_QLocale_CurrencySymbolFormat_keys[] = { + "CurrencyIsoCode" + , "CurrencySymbol" + , "CurrencyDisplayName" +}; + +static QString qtscript_QLocale_CurrencySymbolFormat_toStringHelper(QLocale::CurrencySymbolFormat value) +{ + if ((value >= QLocale::CurrencyIsoCode) && (value <= QLocale::CurrencyDisplayName)) + return qtscript_QLocale_CurrencySymbolFormat_keys[static_cast(value)-static_cast(QLocale::CurrencyIsoCode)]; + return QString(); +} + +static QScriptValue qtscript_QLocale_CurrencySymbolFormat_toScriptValue(QScriptEngine *engine, const QLocale::CurrencySymbolFormat &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QLocale")); + return clazz.property(qtscript_QLocale_CurrencySymbolFormat_toStringHelper(value)); +} + +static void qtscript_QLocale_CurrencySymbolFormat_fromScriptValue(const QScriptValue &value, QLocale::CurrencySymbolFormat &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QLocale_CurrencySymbolFormat(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QLocale::CurrencyIsoCode) && (arg <= QLocale::CurrencyDisplayName)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("CurrencySymbolFormat(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QLocale_CurrencySymbolFormat_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QLocale::CurrencySymbolFormat value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QLocale_CurrencySymbolFormat_toString(QScriptContext *context, QScriptEngine *engine) +{ + QLocale::CurrencySymbolFormat value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QLocale_CurrencySymbolFormat_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QLocale_CurrencySymbolFormat_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QLocale_CurrencySymbolFormat, + qtscript_QLocale_CurrencySymbolFormat_valueOf, qtscript_QLocale_CurrencySymbolFormat_toString); + qScriptRegisterMetaType(engine, qtscript_QLocale_CurrencySymbolFormat_toScriptValue, + qtscript_QLocale_CurrencySymbolFormat_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QLocale_CurrencySymbolFormat_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QLocale_CurrencySymbolFormat_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QLocale::Script +// + +static const QLocale::Script qtscript_QLocale_Script_values[] = { + QLocale::AnyScript + , QLocale::ArabicScript + , QLocale::CyrillicScript + , QLocale::DeseretScript + , QLocale::GurmukhiScript + , QLocale::SimplifiedHanScript + , QLocale::TraditionalHanScript + , QLocale::LatinScript + , QLocale::MongolianScript + , QLocale::TifinaghScript + , QLocale::ArmenianScript + , QLocale::BengaliScript + , QLocale::CherokeeScript + , QLocale::DevanagariScript + , QLocale::EthiopicScript + , QLocale::GeorgianScript + , QLocale::GreekScript + , QLocale::GujaratiScript + , QLocale::HebrewScript + , QLocale::JapaneseScript + , QLocale::KhmerScript + , QLocale::KannadaScript + , QLocale::KoreanScript + , QLocale::LaoScript + , QLocale::MalayalamScript + , QLocale::MyanmarScript + , QLocale::OriyaScript + , QLocale::TamilScript + , QLocale::TeluguScript + , QLocale::ThaanaScript + , QLocale::ThaiScript + , QLocale::TibetanScript + , QLocale::SinhalaScript + , QLocale::SyriacScript + , QLocale::YiScript + , QLocale::VaiScript + , QLocale::AvestanScript + , QLocale::BalineseScript + , QLocale::BamumScript + , QLocale::BatakScript + , QLocale::BopomofoScript + , QLocale::BrahmiScript + , QLocale::BugineseScript + , QLocale::BuhidScript + , QLocale::CanadianAboriginalScript + , QLocale::CarianScript + , QLocale::ChakmaScript + , QLocale::ChamScript + , QLocale::CopticScript + , QLocale::CypriotScript + , QLocale::EgyptianHieroglyphsScript + , QLocale::FraserScript + , QLocale::GlagoliticScript + , QLocale::GothicScript + , QLocale::HanScript + , QLocale::HangulScript + , QLocale::HanunooScript + , QLocale::ImperialAramaicScript + , QLocale::InscriptionalPahlaviScript + , QLocale::InscriptionalParthianScript + , QLocale::JavaneseScript + , QLocale::KaithiScript + , QLocale::KatakanaScript + , QLocale::KayahLiScript + , QLocale::KharoshthiScript + , QLocale::LannaScript + , QLocale::LepchaScript + , QLocale::LimbuScript + , QLocale::LinearBScript + , QLocale::LycianScript + , QLocale::LydianScript + , QLocale::MandaeanScript + , QLocale::MeiteiMayekScript + , QLocale::MeroiticScript + , QLocale::MeroiticCursiveScript + , QLocale::NkoScript + , QLocale::NewTaiLueScript + , QLocale::OghamScript + , QLocale::OlChikiScript + , QLocale::OldItalicScript + , QLocale::OldPersianScript + , QLocale::OldSouthArabianScript + , QLocale::OrkhonScript + , QLocale::OsmanyaScript + , QLocale::PhagsPaScript + , QLocale::PhoenicianScript + , QLocale::PollardPhoneticScript + , QLocale::RejangScript + , QLocale::RunicScript + , QLocale::SamaritanScript + , QLocale::SaurashtraScript + , QLocale::SharadaScript + , QLocale::ShavianScript + , QLocale::SoraSompengScript + , QLocale::CuneiformScript + , QLocale::SundaneseScript + , QLocale::SylotiNagriScript + , QLocale::TagalogScript + , QLocale::TagbanwaScript + , QLocale::TaiLeScript + , QLocale::TaiVietScript + , QLocale::TakriScript + , QLocale::UgariticScript + , QLocale::BrailleScript + , QLocale::HiraganaScript + , QLocale::CaucasianAlbanianScript + , QLocale::BassaVahScript + , QLocale::DuployanScript + , QLocale::ElbasanScript + , QLocale::GranthaScript + , QLocale::PahawhHmongScript + , QLocale::KhojkiScript + , QLocale::LinearAScript + , QLocale::MahajaniScript + , QLocale::ManichaeanScript + , QLocale::MendeKikakuiScript + , QLocale::ModiScript + , QLocale::MroScript + , QLocale::OldNorthArabianScript + , QLocale::NabataeanScript + , QLocale::PalmyreneScript + , QLocale::PauCinHauScript + , QLocale::OldPermicScript + , QLocale::PsalterPahlaviScript + , QLocale::SiddhamScript + , QLocale::KhudawadiScript + , QLocale::TirhutaScript + , QLocale::VarangKshitiScript +}; + +static const char * const qtscript_QLocale_Script_keys[] = { + "AnyScript" + , "ArabicScript" + , "CyrillicScript" + , "DeseretScript" + , "GurmukhiScript" + , "SimplifiedHanScript" + , "TraditionalHanScript" + , "LatinScript" + , "MongolianScript" + , "TifinaghScript" + , "ArmenianScript" + , "BengaliScript" + , "CherokeeScript" + , "DevanagariScript" + , "EthiopicScript" + , "GeorgianScript" + , "GreekScript" + , "GujaratiScript" + , "HebrewScript" + , "JapaneseScript" + , "KhmerScript" + , "KannadaScript" + , "KoreanScript" + , "LaoScript" + , "MalayalamScript" + , "MyanmarScript" + , "OriyaScript" + , "TamilScript" + , "TeluguScript" + , "ThaanaScript" + , "ThaiScript" + , "TibetanScript" + , "SinhalaScript" + , "SyriacScript" + , "YiScript" + , "VaiScript" + , "AvestanScript" + , "BalineseScript" + , "BamumScript" + , "BatakScript" + , "BopomofoScript" + , "BrahmiScript" + , "BugineseScript" + , "BuhidScript" + , "CanadianAboriginalScript" + , "CarianScript" + , "ChakmaScript" + , "ChamScript" + , "CopticScript" + , "CypriotScript" + , "EgyptianHieroglyphsScript" + , "FraserScript" + , "GlagoliticScript" + , "GothicScript" + , "HanScript" + , "HangulScript" + , "HanunooScript" + , "ImperialAramaicScript" + , "InscriptionalPahlaviScript" + , "InscriptionalParthianScript" + , "JavaneseScript" + , "KaithiScript" + , "KatakanaScript" + , "KayahLiScript" + , "KharoshthiScript" + , "LannaScript" + , "LepchaScript" + , "LimbuScript" + , "LinearBScript" + , "LycianScript" + , "LydianScript" + , "MandaeanScript" + , "MeiteiMayekScript" + , "MeroiticScript" + , "MeroiticCursiveScript" + , "NkoScript" + , "NewTaiLueScript" + , "OghamScript" + , "OlChikiScript" + , "OldItalicScript" + , "OldPersianScript" + , "OldSouthArabianScript" + , "OrkhonScript" + , "OsmanyaScript" + , "PhagsPaScript" + , "PhoenicianScript" + , "PollardPhoneticScript" + , "RejangScript" + , "RunicScript" + , "SamaritanScript" + , "SaurashtraScript" + , "SharadaScript" + , "ShavianScript" + , "SoraSompengScript" + , "CuneiformScript" + , "SundaneseScript" + , "SylotiNagriScript" + , "TagalogScript" + , "TagbanwaScript" + , "TaiLeScript" + , "TaiVietScript" + , "TakriScript" + , "UgariticScript" + , "BrailleScript" + , "HiraganaScript" + , "CaucasianAlbanianScript" + , "BassaVahScript" + , "DuployanScript" + , "ElbasanScript" + , "GranthaScript" + , "PahawhHmongScript" + , "KhojkiScript" + , "LinearAScript" + , "MahajaniScript" + , "ManichaeanScript" + , "MendeKikakuiScript" + , "ModiScript" + , "MroScript" + , "OldNorthArabianScript" + , "NabataeanScript" + , "PalmyreneScript" + , "PauCinHauScript" + , "OldPermicScript" + , "PsalterPahlaviScript" + , "SiddhamScript" + , "KhudawadiScript" + , "TirhutaScript" + , "VarangKshitiScript" +}; + +static QString qtscript_QLocale_Script_toStringHelper(QLocale::Script value) +{ + if ((value >= QLocale::AnyScript) && (value <= QLocale::VarangKshitiScript)) + return qtscript_QLocale_Script_keys[static_cast(value)-static_cast(QLocale::AnyScript)]; + return QString(); +} + +static QScriptValue qtscript_QLocale_Script_toScriptValue(QScriptEngine *engine, const QLocale::Script &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QLocale")); + return clazz.property(qtscript_QLocale_Script_toStringHelper(value)); +} + +static void qtscript_QLocale_Script_fromScriptValue(const QScriptValue &value, QLocale::Script &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QLocale_Script(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QLocale::AnyScript) && (arg <= QLocale::VarangKshitiScript)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Script(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QLocale_Script_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QLocale::Script value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QLocale_Script_toString(QScriptContext *context, QScriptEngine *engine) +{ + QLocale::Script value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QLocale_Script_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QLocale_Script_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QLocale_Script, + qtscript_QLocale_Script_valueOf, qtscript_QLocale_Script_toString); + qScriptRegisterMetaType(engine, qtscript_QLocale_Script_toScriptValue, + qtscript_QLocale_Script_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 128; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QLocale_Script_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QLocale_Script_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QLocale::QuotationStyle +// + +static const QLocale::QuotationStyle qtscript_QLocale_QuotationStyle_values[] = { + QLocale::StandardQuotation + , QLocale::AlternateQuotation +}; + +static const char * const qtscript_QLocale_QuotationStyle_keys[] = { + "StandardQuotation" + , "AlternateQuotation" +}; + +static QString qtscript_QLocale_QuotationStyle_toStringHelper(QLocale::QuotationStyle value) +{ + if ((value >= QLocale::StandardQuotation) && (value <= QLocale::AlternateQuotation)) + return qtscript_QLocale_QuotationStyle_keys[static_cast(value)-static_cast(QLocale::StandardQuotation)]; + return QString(); +} + +static QScriptValue qtscript_QLocale_QuotationStyle_toScriptValue(QScriptEngine *engine, const QLocale::QuotationStyle &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QLocale")); + return clazz.property(qtscript_QLocale_QuotationStyle_toStringHelper(value)); +} + +static void qtscript_QLocale_QuotationStyle_fromScriptValue(const QScriptValue &value, QLocale::QuotationStyle &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QLocale_QuotationStyle(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QLocale::StandardQuotation) && (arg <= QLocale::AlternateQuotation)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("QuotationStyle(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QLocale_QuotationStyle_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QLocale::QuotationStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QLocale_QuotationStyle_toString(QScriptContext *context, QScriptEngine *engine) +{ + QLocale::QuotationStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QLocale_QuotationStyle_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QLocale_QuotationStyle_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QLocale_QuotationStyle, + qtscript_QLocale_QuotationStyle_valueOf, qtscript_QLocale_QuotationStyle_toString); + qScriptRegisterMetaType(engine, qtscript_QLocale_QuotationStyle_toScriptValue, + qtscript_QLocale_QuotationStyle_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QLocale_QuotationStyle_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QLocale_QuotationStyle_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QLocale +// + +static QScriptValue qtscript_QLocale_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 49; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QLocale* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QLocale.%0(): this object is not a QLocale") + .arg(qtscript_QLocale_function_names[_id+9])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->amText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->bcp47Name(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QLocale::Country _q_result = _q_self->country(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QString _q_result = _q_self->createSeparatedList(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->currencySymbol(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QLocale::CurrencySymbolFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->currencySymbol(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->dateFormat(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QLocale::FormatType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->dateFormat(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->dateTimeFormat(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QLocale::FormatType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->dateTimeFormat(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->dayName(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QLocale::FormatType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = _q_self->dayName(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QChar _q_result = _q_self->decimalPoint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QChar _q_result = _q_self->exponential(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + Qt::DayOfWeek _q_result = _q_self->firstDayOfWeek(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QChar _q_result = _q_self->groupSeparator(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QLocale::Language _q_result = _q_self->language(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QLocale::MeasurementSystem _q_result = _q_self->measurementSystem(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->monthName(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QLocale::FormatType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = _q_self->monthName(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->name(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->nativeCountryName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->nativeLanguageName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QChar _q_result = _q_self->negativeSign(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->numberOptions(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QLocale _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + QChar _q_result = _q_self->percent(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->pmText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + QChar _q_result = _q_self->positiveSign(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = _q_self->quoteString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->quoteString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QLocale::QuotationStyle _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = _q_self->quoteString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLocale::QuotationStyle _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = _q_self->quoteString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 25: + if (context->argumentCount() == 0) { + QLocale::Script _q_result = _q_self->script(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setNumberOptions(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->standaloneDayName(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QLocale::FormatType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = _q_self->standaloneDayName(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->standaloneMonthName(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QLocale::FormatType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = _q_self->standaloneMonthName(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 0) { + Qt::LayoutDirection _q_result = _q_self->textDirection(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->timeFormat(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QLocale::FormatType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->timeFormat(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 1) { + if (context->argument(0).isNumber()) { + double _q_arg0 = context->argument(0).toNumber(); + QString _q_result = _q_self->toCurrencyString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toCurrencyString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->toCurrencyString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + qlonglong _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toCurrencyString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + qulonglong _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toCurrencyString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + short _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toCurrencyString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + uint _q_arg0 = context->argument(0).toUInt32(); + QString _q_result = _q_self->toCurrencyString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + ushort _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toCurrencyString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (context->argument(0).isNumber() + && context->argument(1).isString()) { + double _q_arg0 = context->argument(0).toNumber(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->toCurrencyString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && context->argument(1).isString()) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->toCurrencyString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && context->argument(1).isString()) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->toCurrencyString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + qlonglong _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->toCurrencyString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + qulonglong _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->toCurrencyString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && context->argument(1).isString()) { + short _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->toCurrencyString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && context->argument(1).isString()) { + uint _q_arg0 = context->argument(0).toUInt32(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->toCurrencyString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + ushort _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->toCurrencyString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 32: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDate _q_result = _q_self->toDate(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QLocale::FormatType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QDate _q_result = _q_self->toDate(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QDate _q_result = _q_self->toDate(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 33: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDateTime _q_result = _q_self->toDateTime(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QLocale::FormatType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QDateTime _q_result = _q_self->toDateTime(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QDateTime _q_result = _q_self->toDateTime(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 34: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + + // TEMPLATE - core.prepare_removed_bool*_argument - START + bool __ok; + bool *_q_arg1 = &__ok; + // TEMPLATE - core.prepare_removed_bool*_argument - END + double _q_result = _q_self->toDouble(_q_arg0, _q_arg1); + + // TEMPLATE - core.convert_to_null_or_primitive - START + QScriptValue _q_convertedResult; + if (!__ok) + _q_convertedResult = context->engine()->nullValue(); + else + _q_convertedResult = QScriptValue(context->engine(), _q_result); + // TEMPLATE - core.convert_to_null_or_primitive - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + double _q_result = _q_self->toDouble(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool* _q_arg1 = qscriptvalue_cast(context->argument(1)); + double _q_result = _q_self->toDouble(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 35: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + + // TEMPLATE - core.prepare_removed_bool*_argument - START + bool __ok; + bool *_q_arg1 = &__ok; + // TEMPLATE - core.prepare_removed_bool*_argument - END + float _q_result = _q_self->toFloat(_q_arg0, _q_arg1); + + // TEMPLATE - core.convert_to_null_or_primitive - START + QScriptValue _q_convertedResult; + if (!__ok) + _q_convertedResult = context->engine()->nullValue(); + else + _q_convertedResult = QScriptValue(context->engine(), _q_result); + // TEMPLATE - core.convert_to_null_or_primitive - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_result = _q_self->toFloat(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool* _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_result = _q_self->toFloat(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 36: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + int _q_result = _q_self->toInt(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->toInt(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1))) { + QString _q_arg0 = context->argument(0).toString(); + bool* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_result = _q_self->toInt(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_result = _q_self->toInt(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 37: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + qlonglong _q_result = _q_self->toLongLong(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + qlonglong _q_result = _q_self->toLongLong(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1))) { + QString _q_arg0 = context->argument(0).toString(); + bool* _q_arg1 = qscriptvalue_cast(context->argument(1)); + qlonglong _q_result = _q_self->toLongLong(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool* _q_arg1 = qscriptvalue_cast(context->argument(1)); + qlonglong _q_result = _q_self->toLongLong(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 38: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = _q_self->toLower(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + short _q_result = _q_self->toShort(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + short _q_result = _q_self->toShort(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1))) { + QString _q_arg0 = context->argument(0).toString(); + bool* _q_arg1 = qscriptvalue_cast(context->argument(1)); + short _q_result = _q_self->toShort(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool* _q_arg1 = qscriptvalue_cast(context->argument(1)); + short _q_result = _q_self->toShort(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 40: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QDateTime _q_arg0 = context->argument(0).toDateTime(); + QString _q_result = _q_self->toString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTime _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + double _q_arg0 = context->argument(0).toNumber(); + QString _q_result = _q_self->toString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->toString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + qulonglong _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + short _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLocale::FormatType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = _q_self->toString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->toString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QDateTime _q_arg0 = context->argument(0).toDateTime(); + QLocale::FormatType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = _q_self->toString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QDateTime _q_arg0 = context->argument(0).toDateTime(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->toString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QTime _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLocale::FormatType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = _q_self->toString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QTime _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->toString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + double _q_arg0 = context->argument(0).toNumber(); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = _q_self->toString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = _q_self->toString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && context->argument(2).isNumber()) { + double _q_arg0 = context->argument(0).toNumber(); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QString _q_result = _q_self->toString(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && context->argument(2).isNumber()) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + char _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QString _q_result = _q_self->toString(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 41: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QTime _q_result = _q_self->toTime(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QLocale::FormatType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTime _q_result = _q_self->toTime(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QTime _q_result = _q_self->toTime(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 42: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + uint _q_result = _q_self->toUInt(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_result = _q_self->toUInt(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1))) { + QString _q_arg0 = context->argument(0).toString(); + bool* _q_arg1 = qscriptvalue_cast(context->argument(1)); + uint _q_result = _q_self->toUInt(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool* _q_arg1 = qscriptvalue_cast(context->argument(1)); + uint _q_result = _q_self->toUInt(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 43: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + qulonglong _q_result = _q_self->toULongLong(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + qulonglong _q_result = _q_self->toULongLong(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1))) { + QString _q_arg0 = context->argument(0).toString(); + bool* _q_arg1 = qscriptvalue_cast(context->argument(1)); + qulonglong _q_result = _q_self->toULongLong(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool* _q_arg1 = qscriptvalue_cast(context->argument(1)); + qulonglong _q_result = _q_self->toULongLong(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 44: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + ushort _q_result = _q_self->toUShort(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + ushort _q_result = _q_self->toUShort(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1))) { + QString _q_arg0 = context->argument(0).toString(); + bool* _q_arg1 = qscriptvalue_cast(context->argument(1)); + ushort _q_result = _q_self->toUShort(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool* _q_arg1 = qscriptvalue_cast(context->argument(1)); + ushort _q_result = _q_self->toUShort(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 45: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = _q_self->toUpper(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 46: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->uiLanguages(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 47: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->weekdays(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 48: + if (context->argumentCount() == 0) { + QChar _q_result = _q_self->zeroDigit(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QLocale_throw_ambiguity_error_helper(context, + qtscript_QLocale_function_names[_id+9], + qtscript_QLocale_function_signatures[_id+9]); +} + +static QScriptValue qtscript_QLocale_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QLocale(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QLocale _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QLocale::Language _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLocale _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QLocale _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLocale _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QLocale _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QLocale::Language _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLocale::Country _q_arg1 = qscriptvalue_cast(context->argument(1)); + QLocale _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + QLocale::Language _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLocale::Script _q_arg1 = qscriptvalue_cast(context->argument(1)); + QLocale::Country _q_arg2 = qscriptvalue_cast(context->argument(2)); + QLocale _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QLocale _q_result = QLocale::c(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QLocale::Language _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = QLocale::countriesForLanguage(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QLocale::Country _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = QLocale::countryToString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QLocale::Language _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = QLocale::languageToString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 3) { + QLocale::Language _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLocale::Script _q_arg1 = qscriptvalue_cast(context->argument(1)); + QLocale::Country _q_arg2 = qscriptvalue_cast(context->argument(2)); + QList _q_result = QLocale::matchingLocales(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QLocale::Script _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = QLocale::scriptToString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QLocale _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLocale::setDefault(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QLocale _q_result = QLocale::system(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QLocale_throw_ambiguity_error_helper(context, + qtscript_QLocale_function_names[_id], + qtscript_QLocale_function_signatures[_id]); +} + +QScriptValue qtscript_create_QLocale_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QLocale*)0)); + for (int i = 0; i < 49; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QLocale_prototype_call, qtscript_QLocale_function_lengths[i+9]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QLocale_function_names[i+9]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QLocale_static_call, proto, qtscript_QLocale_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QLocale_static_call, + qtscript_QLocale_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QLocale_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("Language"), + qtscript_create_QLocale_Language_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("NumberOption"), + qtscript_create_QLocale_NumberOption_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("NumberOptions"), + qtscript_create_QLocale_NumberOptions_class(engine)); + ctor.setProperty(QString::fromLatin1("Country"), + qtscript_create_QLocale_Country_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("CurrencySymbolFormat"), + qtscript_create_QLocale_CurrencySymbolFormat_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Script"), + qtscript_create_QLocale_Script_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("QuotationStyle"), + qtscript_create_QLocale_QuotationStyle_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QMargins.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QMargins.cpp new file mode 100644 index 00000000..b046739c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QMargins.cpp @@ -0,0 +1,244 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +static const char * const qtscript_QMargins_function_names[] = { + "QMargins" + // static + // prototype + , "bottom" + , "isNull" + , "left" + , "equals" + , "right" + , "setBottom" + , "setLeft" + , "setRight" + , "setTop" + , "top" + , "toString" +}; + +static const char * const qtscript_QMargins_function_signatures[] = { + "\nint left, int top, int right, int bottom" + // static + // prototype + , "" + , "" + , "" + , "QMargins m2" + , "" + , "int bottom" + , "int left" + , "int right" + , "int top" + , "" +"" +}; + +static const int qtscript_QMargins_function_lengths[] = { + 4 + // static + // prototype + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QMargins_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QMargins::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QMargins) +Q_DECLARE_METATYPE(QMargins*) + +// +// QMargins +// + +static QScriptValue qtscript_QMargins_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 10; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QMargins* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QMargins.%0(): this object is not a QMargins") + .arg(qtscript_QMargins_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->bottom(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->left(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QMargins _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = operator==(*_q_self, _q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->right(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setBottom(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setLeft(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setRight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setTop(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->top(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QMargins_throw_ambiguity_error_helper(context, + qtscript_QMargins_function_names[_id+1], + qtscript_QMargins_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QMargins_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QMargins(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QMargins _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QMargins _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QMargins_throw_ambiguity_error_helper(context, + qtscript_QMargins_function_names[_id], + qtscript_QMargins_function_signatures[_id]); +} + +QScriptValue qtscript_create_QMargins_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QMargins*)0)); + for (int i = 0; i < 11; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMargins_prototype_call, qtscript_QMargins_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QMargins_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QMargins_static_call, proto, qtscript_QMargins_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QMimeData.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QMimeData.cpp new file mode 100644 index 00000000..7c125896 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QMimeData.cpp @@ -0,0 +1,374 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QMimeData.h" + +static const char * const qtscript_QMimeData_function_names[] = { + "QMimeData" + // static + // prototype + , "clear" + , "colorData" + , "data" + , "formats" + , "hasColor" + , "hasFormat" + , "hasHtml" + , "hasImage" + , "hasText" + , "hasUrls" + , "html" + , "imageData" + , "removeFormat" + , "setColorData" + , "setData" + , "setHtml" + , "setImageData" + , "setText" + , "setUrls" + , "text" + , "urls" + , "toString" +}; + +static const char * const qtscript_QMimeData_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "String mimetype" + , "" + , "" + , "String mimetype" + , "" + , "" + , "" + , "" + , "" + , "" + , "String mimetype" + , "Object color" + , "String mimetype, QByteArray data" + , "String html" + , "Object image" + , "String text" + , "List urls" + , "" + , "" +"" +}; + +static const int qtscript_QMimeData_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QMimeData_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QMimeData::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QMimeData*) +Q_DECLARE_METATYPE(QtScriptShell_QMimeData*) +Q_DECLARE_METATYPE(QList) + +// +// QMimeData +// + +static QScriptValue qtscript_QMimeData_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 21; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QMimeData* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QMimeData.%0(): this object is not a QMimeData") + .arg(qtscript_QMimeData_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QVariant _q_result = _q_self->colorData(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_result = _q_self->data(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->formats(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasColor(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->hasFormat(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasHtml(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasImage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasUrls(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->html(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QVariant _q_result = _q_self->imageData(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->removeFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QVariant _q_arg0 = context->argument(0).toVariant(); + _q_self->setColorData(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setData(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setHtml(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QVariant _q_arg0 = context->argument(0).toVariant(); + _q_self->setImageData(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setUrls(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->text(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->urls(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 21: { + QString result = QString::fromLatin1("QMimeData"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QMimeData_throw_ambiguity_error_helper(context, + qtscript_QMimeData_function_names[_id+1], + qtscript_QMimeData_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QMimeData_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QMimeData(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QMimeData* _q_cpp_result = new QtScriptShell_QMimeData(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMimeData*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QMimeData_throw_ambiguity_error_helper(context, + qtscript_QMimeData_function_names[_id], + qtscript_QMimeData_function_signatures[_id]); +} + +static QScriptValue qtscript_QMimeData_toScriptValue(QScriptEngine *engine, QMimeData* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QMimeData_fromScriptValue(const QScriptValue &value, QMimeData* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QMimeData_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QMimeData*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 22; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMimeData_prototype_call, qtscript_QMimeData_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QMimeData_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QMimeData_toScriptValue, + qtscript_QMimeData_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QMimeData_static_call, proto, qtscript_QMimeData_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QModelIndex.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QModelIndex.cpp new file mode 100644 index 00000000..008f444b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QModelIndex.cpp @@ -0,0 +1,275 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QModelIndex_function_names[] = { + "QModelIndex" + // static + // prototype + , "child" + , "column" + , "data" + , "flags" + , "internalId" + , "internalPointer" + , "isValid" + , "model" + , "equals" + , "operator_less" + , "parent" + , "row" + , "sibling" + , "toString" +}; + +static const char * const qtscript_QModelIndex_function_signatures[] = { + "" + // static + // prototype + , "int row, int column" + , "" + , "int role" + , "" + , "" + , "" + , "" + , "" + , "QModelIndex other" + , "QModelIndex other" + , "" + , "" + , "int row, int column" +"" +}; + +static const int qtscript_QModelIndex_function_lengths[] = { + 0 + // static + // prototype + , 2 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 2 + , 0 +}; + +static QScriptValue qtscript_QModelIndex_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QModelIndex::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QModelIndex*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(quintptr) +Q_DECLARE_METATYPE(const QAbstractItemModel*) + +// +// QModelIndex +// + +static QScriptValue qtscript_QModelIndex_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 13; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QModelIndex* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QModelIndex.%0(): this object is not a QModelIndex") + .arg(qtscript_QModelIndex_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QModelIndex _q_result = _q_self->child(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->column(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QVariant _q_result = _q_self->data(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_result = _q_self->data(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->flags(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + quintptr _q_result = _q_self->internalId(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + void* _q_result = _q_self->internalPointer(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + const QAbstractItemModel* _q_result = const_cast(_q_self->model()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator<(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QModelIndex _q_result = _q_self->parent(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + int _q_result = _q_self->row(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QModelIndex _q_result = _q_self->sibling(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QModelIndex_throw_ambiguity_error_helper(context, + qtscript_QModelIndex_function_names[_id+1], + qtscript_QModelIndex_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QModelIndex_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QModelIndex(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QModelIndex _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QModelIndex_throw_ambiguity_error_helper(context, + qtscript_QModelIndex_function_names[_id], + qtscript_QModelIndex_function_signatures[_id]); +} + +QScriptValue qtscript_create_QModelIndex_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QModelIndex*)0)); + for (int i = 0; i < 14; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QModelIndex_prototype_call, qtscript_QModelIndex_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QModelIndex_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QModelIndex_static_call, proto, qtscript_QModelIndex_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QMutex.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QMutex.cpp new file mode 100644 index 00000000..e4bf370d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QMutex.cpp @@ -0,0 +1,230 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QMutex_function_names[] = { + "QMutex" + // static + // prototype + , "tryLock" + , "toString" +}; + +static const char * const qtscript_QMutex_function_signatures[] = { + "RecursionMode mode" + // static + // prototype + , "int timeout" +"" +}; + +static const int qtscript_QMutex_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 +}; + +static QScriptValue qtscript_QMutex_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QMutex::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QMutex*) +Q_DECLARE_METATYPE(QMutex::RecursionMode) +Q_DECLARE_METATYPE(QBasicMutex*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QMutex::RecursionMode +// + +static const QMutex::RecursionMode qtscript_QMutex_RecursionMode_values[] = { + QMutex::NonRecursive + , QMutex::Recursive +}; + +static const char * const qtscript_QMutex_RecursionMode_keys[] = { + "NonRecursive" + , "Recursive" +}; + +static QString qtscript_QMutex_RecursionMode_toStringHelper(QMutex::RecursionMode value) +{ + if ((value >= QMutex::NonRecursive) && (value <= QMutex::Recursive)) + return qtscript_QMutex_RecursionMode_keys[static_cast(value)-static_cast(QMutex::NonRecursive)]; + return QString(); +} + +static QScriptValue qtscript_QMutex_RecursionMode_toScriptValue(QScriptEngine *engine, const QMutex::RecursionMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QMutex")); + return clazz.property(qtscript_QMutex_RecursionMode_toStringHelper(value)); +} + +static void qtscript_QMutex_RecursionMode_fromScriptValue(const QScriptValue &value, QMutex::RecursionMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QMutex_RecursionMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QMutex::NonRecursive) && (arg <= QMutex::Recursive)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("RecursionMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QMutex_RecursionMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QMutex::RecursionMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QMutex_RecursionMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QMutex::RecursionMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QMutex_RecursionMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QMutex_RecursionMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QMutex_RecursionMode, + qtscript_QMutex_RecursionMode_valueOf, qtscript_QMutex_RecursionMode_toString); + qScriptRegisterMetaType(engine, qtscript_QMutex_RecursionMode_toScriptValue, + qtscript_QMutex_RecursionMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QMutex_RecursionMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QMutex_RecursionMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QMutex +// + +static QScriptValue qtscript_QMutex_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QMutex* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QMutex.%0(): this object is not a QMutex") + .arg(qtscript_QMutex_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->tryLock(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("QMutex"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QMutex_throw_ambiguity_error_helper(context, + qtscript_QMutex_function_names[_id+1], + qtscript_QMutex_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QMutex_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QMutex(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QMutex* _q_cpp_result = new QMutex(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QMutex::RecursionMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMutex* _q_cpp_result = new QMutex(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QMutex_throw_ambiguity_error_helper(context, + qtscript_QMutex_function_names[_id], + qtscript_QMutex_function_signatures[_id]); +} + +QScriptValue qtscript_create_QMutex_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QMutex*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMutex_prototype_call, qtscript_QMutex_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QMutex_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QMutex_static_call, proto, qtscript_QMutex_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("RecursionMode"), + qtscript_create_QMutex_RecursionMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QObject.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QObject.cpp new file mode 100644 index 00000000..4e121461 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QObject.cpp @@ -0,0 +1,373 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QObject.h" + +static const char * const qtscript_QObject_function_names[] = { + "QObject" + // static + // prototype + , "blockSignals" + , "children" + , "dumpObjectInfo" + , "dumpObjectTree" + , "dynamicPropertyNames" + , "event" + , "eventFilter" + , "inherits" + , "installEventFilter" + , "isWidgetType" + , "isWindowType" + , "killTimer" + , "parent" + , "property" + , "removeEventFilter" + , "setParent" + , "setProperty" + , "signalsBlocked" + , "startTimer" + , "toString" +}; + +static const char * const qtscript_QObject_function_signatures[] = { + "QObject parent" + // static + // prototype + , "bool b" + , "" + , "" + , "" + , "" + , "QEvent event" + , "QObject watched, QEvent event" + , "char classname" + , "QObject filterObj" + , "" + , "" + , "int id" + , "" + , "char name" + , "QObject obj" + , "QObject parent" + , "char name, Object value" + , "" + , "int interval, TimerType timerType" +"" +}; + +static const int qtscript_QObject_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 2 + , 1 + , 1 + , 0 + , 0 + , 1 + , 0 + , 1 + , 1 + , 1 + , 2 + , 0 + , 2 + , 0 +}; + +static QScriptValue qtscript_QObject_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QObject::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QtScriptShell_QObject*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(Qt::TimerType) + +// +// QObject +// + +static QScriptValue qtscript_QObject_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 19; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QObject* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QObject.%0(): this object is not a QObject") + .arg(qtscript_QObject_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + bool _q_result = _q_self->blockSignals(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + const QList& _q_result = _q_self->children(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->dumpObjectInfo(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->dumpObjectTree(); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->dynamicPropertyNames(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QEvent* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->event(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QEvent* _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->eventFilter(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg0 = context->argument(0).toString().toLatin1(); + const char * _q_arg0 = tmp__q_arg0.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + bool _q_result = _q_self->inherits(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + _q_self->installEventFilter(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isWidgetType(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isWindowType(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->killTimer(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QObject* _q_result = _q_self->parent(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg0 = context->argument(0).toString().toLatin1(); + const char * _q_arg0 = tmp__q_arg0.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + QVariant _q_result = _q_self->property(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + _q_self->removeEventFilter(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + _q_self->setParent(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 2) { + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg0 = context->argument(0).toString().toLatin1(); + const char * _q_arg0 = tmp__q_arg0.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + QVariant _q_arg1 = context->argument(1).toVariant(); + bool _q_result = _q_self->setProperty(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->signalsBlocked(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::TimerType _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_result = _q_self->startTimer(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: { + QString result; + QDebug d(&result); + d << _q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QObject_throw_ambiguity_error_helper(context, + qtscript_QObject_function_names[_id+1], + qtscript_QObject_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QObject_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QObject(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QObject* _q_cpp_result = new QtScriptShell_QObject(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QObject*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QObject* _q_cpp_result = new QtScriptShell_QObject(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QObject*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QObject_throw_ambiguity_error_helper(context, + qtscript_QObject_function_names[_id], + qtscript_QObject_function_signatures[_id]); +} + +static QScriptValue qtscript_QObject_toScriptValue(QScriptEngine *engine, QObject* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QObject_fromScriptValue(const QScriptValue &value, QObject* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QObject_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QObject*)0)); + for (int i = 0; i < 20; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QObject_prototype_call, qtscript_QObject_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QObject_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QObject_toScriptValue, + qtscript_QObject_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QObject_static_call, proto, qtscript_QObject_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QParallelAnimationGroup.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QParallelAnimationGroup.cpp new file mode 100644 index 00000000..cee53c5b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QParallelAnimationGroup.cpp @@ -0,0 +1,151 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QParallelAnimationGroup.h" + +static const char * const qtscript_QParallelAnimationGroup_function_names[] = { + "QParallelAnimationGroup" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QParallelAnimationGroup_function_signatures[] = { + "QObject parent" + // static + // prototype +"" +}; + +static const int qtscript_QParallelAnimationGroup_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QParallelAnimationGroup_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QParallelAnimationGroup::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QParallelAnimationGroup*) +Q_DECLARE_METATYPE(QtScriptShell_QParallelAnimationGroup*) +Q_DECLARE_METATYPE(QAnimationGroup*) + +// +// QParallelAnimationGroup +// + +static QScriptValue qtscript_QParallelAnimationGroup_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QParallelAnimationGroup* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QParallelAnimationGroup.%0(): this object is not a QParallelAnimationGroup") + .arg(qtscript_QParallelAnimationGroup_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QParallelAnimationGroup"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QParallelAnimationGroup_throw_ambiguity_error_helper(context, + qtscript_QParallelAnimationGroup_function_names[_id+1], + qtscript_QParallelAnimationGroup_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QParallelAnimationGroup_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QParallelAnimationGroup(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QParallelAnimationGroup* _q_cpp_result = new QtScriptShell_QParallelAnimationGroup(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QParallelAnimationGroup*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QParallelAnimationGroup* _q_cpp_result = new QtScriptShell_QParallelAnimationGroup(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QParallelAnimationGroup*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QParallelAnimationGroup_throw_ambiguity_error_helper(context, + qtscript_QParallelAnimationGroup_function_names[_id], + qtscript_QParallelAnimationGroup_function_signatures[_id]); +} + +static QScriptValue qtscript_QParallelAnimationGroup_toScriptValue(QScriptEngine *engine, QParallelAnimationGroup* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QParallelAnimationGroup_fromScriptValue(const QScriptValue &value, QParallelAnimationGroup* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QParallelAnimationGroup_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QParallelAnimationGroup*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QParallelAnimationGroup_toScriptValue, + qtscript_QParallelAnimationGroup_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QParallelAnimationGroup_static_call, proto, qtscript_QParallelAnimationGroup_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPauseAnimation.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPauseAnimation.cpp new file mode 100644 index 00000000..fcfb1f42 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPauseAnimation.cpp @@ -0,0 +1,165 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPauseAnimation.h" + +static const char * const qtscript_QPauseAnimation_function_names[] = { + "QPauseAnimation" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QPauseAnimation_function_signatures[] = { + "QObject parent\nint msecs, QObject parent" + // static + // prototype +"" +}; + +static const int qtscript_QPauseAnimation_function_lengths[] = { + 2 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QPauseAnimation_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPauseAnimation::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPauseAnimation*) +Q_DECLARE_METATYPE(QtScriptShell_QPauseAnimation*) +Q_DECLARE_METATYPE(QAbstractAnimation*) + +// +// QPauseAnimation +// + +static QScriptValue qtscript_QPauseAnimation_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPauseAnimation* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPauseAnimation.%0(): this object is not a QPauseAnimation") + .arg(qtscript_QPauseAnimation_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QPauseAnimation"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPauseAnimation_throw_ambiguity_error_helper(context, + qtscript_QPauseAnimation_function_names[_id+1], + qtscript_QPauseAnimation_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPauseAnimation_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPauseAnimation(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPauseAnimation* _q_cpp_result = new QtScriptShell_QPauseAnimation(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPauseAnimation*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isQObject()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QPauseAnimation* _q_cpp_result = new QtScriptShell_QPauseAnimation(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPauseAnimation*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QtScriptShell_QPauseAnimation* _q_cpp_result = new QtScriptShell_QPauseAnimation(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPauseAnimation*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QPauseAnimation* _q_cpp_result = new QtScriptShell_QPauseAnimation(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPauseAnimation*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPauseAnimation_throw_ambiguity_error_helper(context, + qtscript_QPauseAnimation_function_names[_id], + qtscript_QPauseAnimation_function_signatures[_id]); +} + +static QScriptValue qtscript_QPauseAnimation_toScriptValue(QScriptEngine *engine, QPauseAnimation* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QPauseAnimation_fromScriptValue(const QScriptValue &value, QPauseAnimation* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QPauseAnimation_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPauseAnimation*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QPauseAnimation_toScriptValue, + qtscript_QPauseAnimation_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPauseAnimation_static_call, proto, qtscript_QPauseAnimation_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPersistentModelIndex.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPersistentModelIndex.cpp new file mode 100644 index 00000000..722675a3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPersistentModelIndex.cpp @@ -0,0 +1,304 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QPersistentModelIndex_function_names[] = { + "QPersistentModelIndex" + // static + // prototype + , "child" + , "column" + , "data" + , "flags" + , "internalId" + , "isValid" + , "model" + , "operator_cast_QModelIndex" + , "equals" + , "operator_less" + , "parent" + , "row" + , "sibling" + , "swap" + , "toString" +}; + +static const char * const qtscript_QPersistentModelIndex_function_signatures[] = { + "\nQModelIndex index\nQPersistentModelIndex other" + // static + // prototype + , "int row, int column" + , "" + , "int role" + , "" + , "" + , "" + , "" + , "" + , "QModelIndex other\nQPersistentModelIndex other" + , "QPersistentModelIndex other" + , "" + , "" + , "int row, int column" + , "QPersistentModelIndex other" +"" +}; + +static const int qtscript_QPersistentModelIndex_function_lengths[] = { + 1 + // static + // prototype + , 2 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 2 + , 1 + , 0 +}; + +static QScriptValue qtscript_QPersistentModelIndex_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPersistentModelIndex::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPersistentModelIndex*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(quintptr) +Q_DECLARE_METATYPE(const QAbstractItemModel*) + +// +// QPersistentModelIndex +// + +static QScriptValue qtscript_QPersistentModelIndex_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 14; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPersistentModelIndex* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPersistentModelIndex.%0(): this object is not a QPersistentModelIndex") + .arg(qtscript_QPersistentModelIndex_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QModelIndex _q_result = _q_self->child(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->column(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QVariant _q_result = _q_self->data(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_result = _q_self->data(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->flags(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + quintptr _q_result = _q_self->internalId(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + const QAbstractItemModel* _q_result = const_cast(_q_self->model()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QModelIndex _q_result = _q_self->operator const QModelIndex&(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPersistentModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 9: + if (context->argumentCount() == 1) { + QPersistentModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator<(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QModelIndex _q_result = _q_self->parent(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + int _q_result = _q_self->row(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QModelIndex _q_result = _q_self->sibling(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QPersistentModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPersistentModelIndex_throw_ambiguity_error_helper(context, + qtscript_QPersistentModelIndex_function_names[_id+1], + qtscript_QPersistentModelIndex_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPersistentModelIndex_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPersistentModelIndex(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QPersistentModelIndex _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPersistentModelIndex _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPersistentModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPersistentModelIndex _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPersistentModelIndex_throw_ambiguity_error_helper(context, + qtscript_QPersistentModelIndex_function_names[_id], + qtscript_QPersistentModelIndex_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPersistentModelIndex_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPersistentModelIndex*)0)); + for (int i = 0; i < 15; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPersistentModelIndex_prototype_call, qtscript_QPersistentModelIndex_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPersistentModelIndex_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPersistentModelIndex_static_call, proto, qtscript_QPersistentModelIndex_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPoint.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPoint.cpp new file mode 100644 index 00000000..7159c82b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPoint.cpp @@ -0,0 +1,283 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QPoint_function_names[] = { + "QPoint" + // static + , "dotProduct" + // prototype + , "isNull" + , "manhattanLength" + , "operator_add_assign" + , "operator_divide_assign" + , "equals" + , "operator_multiply_assign" + , "operator_subtract_assign" + , "setX" + , "setY" + , "x" + , "y" + , "toString" +}; + +static const char * const qtscript_QPoint_function_signatures[] = { + "\nint xpos, int ypos" + // static + , "QPoint p1, QPoint p2" + // prototype + , "" + , "" + , "QPoint p" + , "qreal divisor" + , "QPoint p2" + , "double factor\nfloat factor\nint factor" + , "QPoint p" + , "int x" + , "int y" + , "" + , "" +"" +}; + +static const int qtscript_QPoint_function_lengths[] = { + 2 + // static + , 2 + // prototype + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPoint_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPoint::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPoint*) + +// +// QPoint +// + +static QScriptValue qtscript_QPoint_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 11; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPoint* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPoint.%0(): this object is not a QPoint") + .arg(qtscript_QPoint_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->manhattanLength(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint& _q_result = _q_self->operator+=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint& _q_result = _q_self->operator/=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = operator==(*_q_self, _q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + if (context->argument(0).isNumber()) { + double _q_arg0 = context->argument(0).toNumber(); + QPoint& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QPoint& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 6: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint& _q_result = _q_self->operator-=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setX(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setY(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->x(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + int _q_result = _q_self->y(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPoint_throw_ambiguity_error_helper(context, + qtscript_QPoint_function_names[_id+2], + qtscript_QPoint_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QPoint_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPoint(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QPoint _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QPoint _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_result = QPoint::dotProduct(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPoint_throw_ambiguity_error_helper(context, + qtscript_QPoint_function_names[_id], + qtscript_QPoint_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPoint_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPoint*)0)); + for (int i = 0; i < 12; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPoint_prototype_call, qtscript_QPoint_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPoint_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPoint_static_call, proto, qtscript_QPoint_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPoint_static_call, + qtscript_QPoint_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QPoint_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPointF.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPointF.cpp new file mode 100644 index 00000000..5c5258ac --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPointF.cpp @@ -0,0 +1,288 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QPointF_function_names[] = { + "QPointF" + // static + , "dotProduct" + // prototype + , "isNull" + , "manhattanLength" + , "operator_add_assign" + , "operator_divide_assign" + , "equals" + , "operator_multiply_assign" + , "operator_subtract_assign" + , "setX" + , "setY" + , "toPoint" + , "x" + , "y" + , "toString" +}; + +static const char * const qtscript_QPointF_function_signatures[] = { + "\nQPoint p\nqreal xpos, qreal ypos" + // static + , "QPointF p1, QPointF p2" + // prototype + , "" + , "" + , "QPointF p" + , "qreal c" + , "QPointF p2" + , "qreal c" + , "QPointF p" + , "qreal x" + , "qreal y" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QPointF_function_lengths[] = { + 2 + // static + , 2 + // prototype + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPointF_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPointF::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPointF*) + +// +// QPointF +// + +static QScriptValue qtscript_QPointF_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 12; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPointF* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPointF.%0(): this object is not a QPointF") + .arg(qtscript_QPointF_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->manhattanLength(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF& _q_result = _q_self->operator+=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF& _q_result = _q_self->operator/=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = operator==(*_q_self, _q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF& _q_result = _q_self->operator-=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setX(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setY(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->toPoint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->x(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->y(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPointF_throw_ambiguity_error_helper(context, + qtscript_QPointF_function_names[_id+2], + qtscript_QPointF_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QPointF_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPointF(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QPointF _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_result = QPointF::dotProduct(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPointF_throw_ambiguity_error_helper(context, + qtscript_QPointF_function_names[_id], + qtscript_QPointF_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPointF_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPointF*)0)); + for (int i = 0; i < 13; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPointF_prototype_call, qtscript_QPointF_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPointF_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPointF_static_call, proto, qtscript_QPointF_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPointF_static_call, + qtscript_QPointF_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QPointF_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QProcess.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QProcess.cpp new file mode 100644 index 00000000..56c73081 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QProcess.cpp @@ -0,0 +1,706 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QProcess.h" + +static const char * const qtscript_QProcess_function_names[] = { + "QProcess" + // static + , "execute" + , "nullDevice" + , "startDetached" + , "systemEnvironment" + // prototype + , "arguments" + , "closeReadChannel" + , "closeWriteChannel" + , "environment" + , "error" + , "exitCode" + , "exitStatus" + , "processChannelMode" + , "processEnvironment" + , "processId" + , "program" + , "readAllStandardError" + , "readAllStandardOutput" + , "readChannel" + , "setArguments" + , "setEnvironment" + , "setProcessChannelMode" + , "setProcessEnvironment" + , "setProgram" + , "setReadChannel" + , "setStandardErrorFile" + , "setStandardInputFile" + , "setStandardOutputFile" + , "setStandardOutputProcess" + , "setWorkingDirectory" + , "start" + , "state" + , "waitForFinished" + , "waitForStarted" + , "workingDirectory" + , "toString" +}; + +static const char * const qtscript_QProcess_function_signatures[] = { + "QObject parent" + // static + , "String command\nString program, List arguments" + , "" + , "String command\nString program, List arguments\nString program, List arguments, String workingDirectory, qint64 pid" + , "" + // prototype + , "" + , "ProcessChannel channel" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "List arguments" + , "List environment" + , "ProcessChannelMode mode" + , "QProcessEnvironment environment" + , "String program" + , "ProcessChannel channel" + , "String fileName, OpenMode mode" + , "String fileName" + , "String fileName, OpenMode mode" + , "QProcess destination" + , "String dir" + , "OpenMode mode\nString command, OpenMode mode\nString program, List arguments, OpenMode mode" + , "" + , "int msecs" + , "int msecs" + , "" +"" +}; + +static const int qtscript_QProcess_function_lengths[] = { + 1 + // static + , 2 + , 0 + , 4 + , 0 + // prototype + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 2 + , 1 + , 1 + , 3 + , 0 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QProcess_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QProcess::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QProcess*) +Q_DECLARE_METATYPE(QtScriptShell_QProcess*) +Q_DECLARE_METATYPE(QProcess::ProcessError) +Q_DECLARE_METATYPE(QProcess::ProcessChannel) +Q_DECLARE_METATYPE(QProcess::ExitStatus) +Q_DECLARE_METATYPE(QProcess::ProcessChannelMode) +Q_DECLARE_METATYPE(QProcessEnvironment) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QProcess::ProcessState) +Q_DECLARE_METATYPE(qint64*) +Q_DECLARE_METATYPE(QIODevice*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QProcess::ProcessError +// + +static const QProcess::ProcessError qtscript_QProcess_ProcessError_values[] = { + QProcess::FailedToStart + , QProcess::Crashed + , QProcess::Timedout + , QProcess::ReadError + , QProcess::WriteError + , QProcess::UnknownError +}; + +static const char * const qtscript_QProcess_ProcessError_keys[] = { + "FailedToStart" + , "Crashed" + , "Timedout" + , "ReadError" + , "WriteError" + , "UnknownError" +}; + +static QString qtscript_QProcess_ProcessError_toStringHelper(QProcess::ProcessError value) +{ + if ((value >= QProcess::FailedToStart) && (value <= QProcess::UnknownError)) + return qtscript_QProcess_ProcessError_keys[static_cast(value)-static_cast(QProcess::FailedToStart)]; + return QString(); +} + +static QScriptValue qtscript_QProcess_ProcessError_toScriptValue(QScriptEngine *engine, const QProcess::ProcessError &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QProcess")); + return clazz.property(qtscript_QProcess_ProcessError_toStringHelper(value)); +} + +static void qtscript_QProcess_ProcessError_fromScriptValue(const QScriptValue &value, QProcess::ProcessError &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QProcess_ProcessError(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QProcess::FailedToStart) && (arg <= QProcess::UnknownError)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ProcessError(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QProcess_ProcessError_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QProcess::ProcessError value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QProcess_ProcessError_toString(QScriptContext *context, QScriptEngine *engine) +{ + QProcess::ProcessError value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QProcess_ProcessError_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QProcess_ProcessError_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QProcess_ProcessError, + qtscript_QProcess_ProcessError_valueOf, qtscript_QProcess_ProcessError_toString); + qScriptRegisterMetaType(engine, qtscript_QProcess_ProcessError_toScriptValue, + qtscript_QProcess_ProcessError_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QProcess_ProcessError_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QProcess_ProcessError_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QProcess +// + +static QScriptValue qtscript_QProcess_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 30; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QProcess* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QProcess.%0(): this object is not a QProcess") + .arg(qtscript_QProcess_function_names[_id+5])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->arguments(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QProcess::ProcessChannel _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->closeReadChannel(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->closeWriteChannel(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->environment(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QProcess::ProcessError _q_result = _q_self->error(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->exitCode(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QProcess::ExitStatus _q_result = _q_self->exitStatus(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QProcess::ProcessChannelMode _q_result = _q_self->processChannelMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QProcessEnvironment _q_result = _q_self->processEnvironment(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->processId(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->program(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->readAllStandardError(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->readAllStandardOutput(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QProcess::ProcessChannel _q_result = _q_self->readChannel(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setArguments(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setEnvironment(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QProcess::ProcessChannelMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setProcessChannelMode(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QProcessEnvironment _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setProcessEnvironment(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setProgram(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QProcess::ProcessChannel _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setReadChannel(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setStandardErrorFile(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + _q_self->setStandardErrorFile(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setStandardInputFile(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setStandardOutputFile(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + _q_self->setStandardOutputFile(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QProcess* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStandardOutputProcess(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setWorkingDirectory(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 0) { + _q_self->start(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->start(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->start(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + _q_self->start(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && context->argument(1).isArray()) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + _q_self->start(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + _q_self->start(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 0) { + QProcess::ProcessState _q_result = _q_self->state(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->waitForFinished(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->waitForFinished(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->waitForStarted(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->waitForStarted(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->workingDirectory(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 30: { + QString result = QString::fromLatin1("QProcess"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QProcess_throw_ambiguity_error_helper(context, + qtscript_QProcess_function_names[_id+5], + qtscript_QProcess_function_signatures[_id+5]); +} + +static QScriptValue qtscript_QProcess_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QProcess(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QProcess* _q_cpp_result = new QtScriptShell_QProcess(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QProcess*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QProcess* _q_cpp_result = new QtScriptShell_QProcess(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QProcess*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + int _q_result = QProcess::execute(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + int _q_result = QProcess::execute(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = QProcess::nullDevice(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = QProcess::startDetached(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + bool _q_result = QProcess::startDetached(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + QString _q_arg2 = context->argument(2).toString(); + bool _q_result = QProcess::startDetached(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + QString _q_arg2 = context->argument(2).toString(); + qint64* _q_arg3 = qscriptvalue_cast(context->argument(3)); + bool _q_result = QProcess::startDetached(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QStringList _q_result = QProcess::systemEnvironment(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QProcess_throw_ambiguity_error_helper(context, + qtscript_QProcess_function_names[_id], + qtscript_QProcess_function_signatures[_id]); +} + +static QScriptValue qtscript_QProcess_toScriptValue(QScriptEngine *engine, QProcess* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QProcess_fromScriptValue(const QScriptValue &value, QProcess* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QProcess_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QProcess*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 31; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QProcess_prototype_call, qtscript_QProcess_function_lengths[i+5]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QProcess_function_names[i+5]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QProcess_toScriptValue, + qtscript_QProcess_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QProcess_static_call, proto, qtscript_QProcess_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QProcess_static_call, + qtscript_QProcess_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QProcess_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("ProcessError"), + qtscript_create_QProcess_ProcessError_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QProcessEnvironment.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QProcessEnvironment.cpp new file mode 100644 index 00000000..65a7fd06 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QProcessEnvironment.cpp @@ -0,0 +1,282 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QProcessEnvironment_function_names[] = { + "QProcessEnvironment" + // static + , "systemEnvironment" + // prototype + , "clear" + , "contains" + , "insert" + , "isEmpty" + , "keys" + , "operator_assign" + , "equals" + , "remove" + , "swap" + , "toStringList" + , "value" + , "toString" +}; + +static const char * const qtscript_QProcessEnvironment_function_signatures[] = { + "\nQProcessEnvironment other" + // static + , "" + // prototype + , "" + , "String name" + , "QProcessEnvironment e\nString name, String value" + , "" + , "" + , "QProcessEnvironment other" + , "QProcessEnvironment other" + , "String name" + , "QProcessEnvironment other" + , "" + , "String name, String defaultValue" +"" +}; + +static const int qtscript_QProcessEnvironment_function_lengths[] = { + 1 + // static + , 0 + // prototype + , 0 + , 1 + , 2 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 0 + , 2 + , 0 +}; + +static QScriptValue qtscript_QProcessEnvironment_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QProcessEnvironment::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QProcessEnvironment) +Q_DECLARE_METATYPE(QProcessEnvironment*) + +// +// QProcessEnvironment +// + +static QScriptValue qtscript_QProcessEnvironment_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 11; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QProcessEnvironment* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QProcessEnvironment.%0(): this object is not a QProcessEnvironment") + .arg(qtscript_QProcessEnvironment_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QProcessEnvironment _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->insert(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->insert(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->keys(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QProcessEnvironment _q_arg0 = qscriptvalue_cast(context->argument(0)); + QProcessEnvironment& _q_result = _q_self->operator=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QProcessEnvironment _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->remove(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QProcessEnvironment _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->toStringList(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = _q_self->value(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->value(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: { + QString result = QString::fromLatin1("QProcessEnvironment"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QProcessEnvironment_throw_ambiguity_error_helper(context, + qtscript_QProcessEnvironment_function_names[_id+2], + qtscript_QProcessEnvironment_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QProcessEnvironment_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QProcessEnvironment(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QProcessEnvironment _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QProcessEnvironment _q_arg0 = qscriptvalue_cast(context->argument(0)); + QProcessEnvironment _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QProcessEnvironment _q_result = QProcessEnvironment::systemEnvironment(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QProcessEnvironment_throw_ambiguity_error_helper(context, + qtscript_QProcessEnvironment_function_names[_id], + qtscript_QProcessEnvironment_function_signatures[_id]); +} + +QScriptValue qtscript_create_QProcessEnvironment_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QProcessEnvironment*)0)); + for (int i = 0; i < 12; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QProcessEnvironment_prototype_call, qtscript_QProcessEnvironment_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QProcessEnvironment_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QProcessEnvironment_static_call, proto, qtscript_QProcessEnvironment_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QProcessEnvironment_static_call, + qtscript_QProcessEnvironment_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QProcessEnvironment_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPropertyAnimation.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPropertyAnimation.cpp new file mode 100644 index 00000000..f6d55c8b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QPropertyAnimation.cpp @@ -0,0 +1,172 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPropertyAnimation.h" + +static const char * const qtscript_QPropertyAnimation_function_names[] = { + "QPropertyAnimation" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QPropertyAnimation_function_signatures[] = { + "QObject parent\nQObject target, QByteArray propertyName, QObject parent" + // static + // prototype +"" +}; + +static const int qtscript_QPropertyAnimation_function_lengths[] = { + 3 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QPropertyAnimation_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPropertyAnimation::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPropertyAnimation*) +Q_DECLARE_METATYPE(QtScriptShell_QPropertyAnimation*) +Q_DECLARE_METATYPE(QVariantAnimation*) + +// +// QPropertyAnimation +// + +static QScriptValue qtscript_QPropertyAnimation_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPropertyAnimation* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPropertyAnimation.%0(): this object is not a QPropertyAnimation") + .arg(qtscript_QPropertyAnimation_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QPropertyAnimation"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPropertyAnimation_throw_ambiguity_error_helper(context, + qtscript_QPropertyAnimation_function_names[_id+1], + qtscript_QPropertyAnimation_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPropertyAnimation_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPropertyAnimation(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPropertyAnimation* _q_cpp_result = new QtScriptShell_QPropertyAnimation(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPropertyAnimation*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QPropertyAnimation* _q_cpp_result = new QtScriptShell_QPropertyAnimation(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPropertyAnimation*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + + // TEMPLATE - core.convert_string_arg_to_latin1 - START + QByteArray _q_arg1 = context->argument(1).toString().toLatin1(); + // TEMPLATE - core.convert_string_arg_to_latin1 - END + QtScriptShell_QPropertyAnimation* _q_cpp_result = new QtScriptShell_QPropertyAnimation(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPropertyAnimation*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 3) { + QObject* _q_arg0 = context->argument(0).toQObject(); + + // TEMPLATE - core.convert_string_arg_to_latin1 - START + QByteArray _q_arg1 = context->argument(1).toString().toLatin1(); + // TEMPLATE - core.convert_string_arg_to_latin1 - END + QObject* _q_arg2 = context->argument(2).toQObject(); + QtScriptShell_QPropertyAnimation* _q_cpp_result = new QtScriptShell_QPropertyAnimation(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPropertyAnimation*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPropertyAnimation_throw_ambiguity_error_helper(context, + qtscript_QPropertyAnimation_function_names[_id], + qtscript_QPropertyAnimation_function_signatures[_id]); +} + +static QScriptValue qtscript_QPropertyAnimation_toScriptValue(QScriptEngine *engine, QPropertyAnimation* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QPropertyAnimation_fromScriptValue(const QScriptValue &value, QPropertyAnimation* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QPropertyAnimation_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPropertyAnimation*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QPropertyAnimation_toScriptValue, + qtscript_QPropertyAnimation_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPropertyAnimation_static_call, proto, qtscript_QPropertyAnimation_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QReadWriteLock.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QReadWriteLock.cpp new file mode 100644 index 00000000..866606fc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QReadWriteLock.cpp @@ -0,0 +1,277 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QReadWriteLock_function_names[] = { + "QReadWriteLock" + // static + // prototype + , "lockForRead" + , "lockForWrite" + , "tryLockForRead" + , "tryLockForWrite" + , "unlock" + , "toString" +}; + +static const char * const qtscript_QReadWriteLock_function_signatures[] = { + "RecursionMode recursionMode" + // static + // prototype + , "" + , "" + , "\nint timeout" + , "\nint timeout" + , "" +"" +}; + +static const int qtscript_QReadWriteLock_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QReadWriteLock_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QReadWriteLock::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QReadWriteLock*) +Q_DECLARE_METATYPE(QReadWriteLock::RecursionMode) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QReadWriteLock::RecursionMode +// + +static const QReadWriteLock::RecursionMode qtscript_QReadWriteLock_RecursionMode_values[] = { + QReadWriteLock::NonRecursive + , QReadWriteLock::Recursive +}; + +static const char * const qtscript_QReadWriteLock_RecursionMode_keys[] = { + "NonRecursive" + , "Recursive" +}; + +static QString qtscript_QReadWriteLock_RecursionMode_toStringHelper(QReadWriteLock::RecursionMode value) +{ + if ((value >= QReadWriteLock::NonRecursive) && (value <= QReadWriteLock::Recursive)) + return qtscript_QReadWriteLock_RecursionMode_keys[static_cast(value)-static_cast(QReadWriteLock::NonRecursive)]; + return QString(); +} + +static QScriptValue qtscript_QReadWriteLock_RecursionMode_toScriptValue(QScriptEngine *engine, const QReadWriteLock::RecursionMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QReadWriteLock")); + return clazz.property(qtscript_QReadWriteLock_RecursionMode_toStringHelper(value)); +} + +static void qtscript_QReadWriteLock_RecursionMode_fromScriptValue(const QScriptValue &value, QReadWriteLock::RecursionMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QReadWriteLock_RecursionMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QReadWriteLock::NonRecursive) && (arg <= QReadWriteLock::Recursive)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("RecursionMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QReadWriteLock_RecursionMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QReadWriteLock::RecursionMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QReadWriteLock_RecursionMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QReadWriteLock::RecursionMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QReadWriteLock_RecursionMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QReadWriteLock_RecursionMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QReadWriteLock_RecursionMode, + qtscript_QReadWriteLock_RecursionMode_valueOf, qtscript_QReadWriteLock_RecursionMode_toString); + qScriptRegisterMetaType(engine, qtscript_QReadWriteLock_RecursionMode_toScriptValue, + qtscript_QReadWriteLock_RecursionMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QReadWriteLock_RecursionMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QReadWriteLock_RecursionMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QReadWriteLock +// + +static QScriptValue qtscript_QReadWriteLock_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QReadWriteLock* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QReadWriteLock.%0(): this object is not a QReadWriteLock") + .arg(qtscript_QReadWriteLock_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->lockForRead(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->lockForWrite(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->tryLockForRead(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->tryLockForRead(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->tryLockForWrite(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->tryLockForWrite(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + _q_self->unlock(); + return context->engine()->undefinedValue(); + } + break; + + case 5: { + QString result = QString::fromLatin1("QReadWriteLock"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QReadWriteLock_throw_ambiguity_error_helper(context, + qtscript_QReadWriteLock_function_names[_id+1], + qtscript_QReadWriteLock_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QReadWriteLock_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QReadWriteLock(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QReadWriteLock* _q_cpp_result = new QReadWriteLock(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QReadWriteLock::RecursionMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QReadWriteLock* _q_cpp_result = new QReadWriteLock(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QReadWriteLock_throw_ambiguity_error_helper(context, + qtscript_QReadWriteLock_function_names[_id], + qtscript_QReadWriteLock_function_signatures[_id]); +} + +QScriptValue qtscript_create_QReadWriteLock_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QReadWriteLock*)0)); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QReadWriteLock_prototype_call, qtscript_QReadWriteLock_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QReadWriteLock_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QReadWriteLock_static_call, proto, qtscript_QReadWriteLock_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("RecursionMode"), + qtscript_create_QReadWriteLock_RecursionMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QRect.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QRect.cpp new file mode 100644 index 00000000..2a71eb60 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QRect.cpp @@ -0,0 +1,821 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QRect_function_names[] = { + "QRect" + // static + // prototype + , "adjust" + , "adjusted" + , "bottom" + , "bottomLeft" + , "bottomRight" + , "center" + , "contains" + , "height" + , "intersected" + , "intersects" + , "isEmpty" + , "isNull" + , "isValid" + , "left" + , "marginsAdded" + , "marginsRemoved" + , "moveBottom" + , "moveBottomLeft" + , "moveBottomRight" + , "moveCenter" + , "moveLeft" + , "moveRight" + , "moveTo" + , "moveTop" + , "moveTopLeft" + , "moveTopRight" + , "normalized" + , "operator_add_assign" + , "equals" + , "operator_subtract_assign" + , "right" + , "setBottom" + , "setBottomLeft" + , "setBottomRight" + , "setCoords" + , "setHeight" + , "setLeft" + , "setRect" + , "setRight" + , "setSize" + , "setTop" + , "setTopLeft" + , "setTopRight" + , "setWidth" + , "setX" + , "setY" + , "size" + , "top" + , "topLeft" + , "topRight" + , "translate" + , "translated" + , "united" + , "width" + , "x" + , "y" + , "toString" +}; + +static const char * const qtscript_QRect_function_signatures[] = { + "\nQPoint topleft, QPoint bottomright\nQPoint topleft, QSize size\nint left, int top, int width, int height" + // static + // prototype + , "int x1, int y1, int x2, int y2" + , "int x1, int y1, int x2, int y2" + , "" + , "" + , "" + , "" + , "QPoint p, bool proper\nQRect r, bool proper\nint x, int y\nint x, int y, bool proper" + , "" + , "QRect other" + , "QRect r" + , "" + , "" + , "" + , "" + , "QMargins margins" + , "QMargins margins" + , "int pos" + , "QPoint p" + , "QPoint p" + , "QPoint p" + , "int pos" + , "int pos" + , "QPoint p\nint x, int t" + , "int pos" + , "QPoint p" + , "QPoint p" + , "" + , "QMargins margins" + , "QRect arg__2" + , "QMargins margins" + , "" + , "int pos" + , "QPoint p" + , "QPoint p" + , "int x1, int y1, int x2, int y2" + , "int h" + , "int pos" + , "int x, int y, int w, int h" + , "int pos" + , "QSize s" + , "int pos" + , "QPoint p" + , "QPoint p" + , "int w" + , "int x" + , "int y" + , "" + , "" + , "" + , "" + , "QPoint p\nint dx, int dy" + , "QPoint p\nint dx, int dy" + , "QRect other" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QRect_function_lengths[] = { + 4 + // static + // prototype + , 4 + , 4 + , 0 + , 0 + , 0 + , 0 + , 3 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 0 + , 1 + , 1 + , 1 + , 0 + , 1 + , 1 + , 1 + , 4 + , 1 + , 1 + , 4 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 2 + , 2 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QRect_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QRect::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QRect*) +Q_DECLARE_METATYPE(QMargins) + +// +// QRect +// + +static QScriptValue qtscript_QRect_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 56; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QRect* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QRect.%0(): this object is not a QRect") + .arg(qtscript_QRect_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->adjust(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QRect _q_result = _q_self->adjusted(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->bottom(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->bottomLeft(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->bottomRight(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->center(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isBoolean()) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + bool _q_result = _q_self->contains(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isBoolean()) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + bool _q_result = _q_self->contains(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + bool _q_result = _q_self->contains(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + bool _q_arg2 = context->argument(2).toBoolean(); + bool _q_result = _q_self->contains(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->height(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->intersected(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->intersects(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + int _q_result = _q_self->left(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QMargins _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->marginsAdded(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QMargins _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->marginsRemoved(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->moveBottom(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveBottomLeft(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveBottomRight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveCenter(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->moveLeft(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->moveRight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveTo(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->moveTo(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->moveTop(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveTopLeft(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveTopRight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->normalized(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 1) { + QMargins _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect& _q_result = _q_self->operator+=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = operator==(*_q_self, _q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 1) { + QMargins _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect& _q_result = _q_self->operator-=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 0) { + int _q_result = _q_self->right(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setBottom(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBottomLeft(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBottomRight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setCoords(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setHeight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setLeft(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setRight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 39: + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setTop(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTopLeft(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 42: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTopRight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 43: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 44: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setX(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 45: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setY(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 46: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->size(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 47: + if (context->argumentCount() == 0) { + int _q_result = _q_self->top(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 48: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->topLeft(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 49: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->topRight(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 50: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->translate(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->translate(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 51: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->translated(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QRect _q_result = _q_self->translated(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 52: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->united(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 53: + if (context->argumentCount() == 0) { + int _q_result = _q_self->width(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 54: + if (context->argumentCount() == 0) { + int _q_result = _q_self->x(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 55: + if (context->argumentCount() == 0) { + int _q_result = _q_self->y(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 56: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QRect_throw_ambiguity_error_helper(context, + qtscript_QRect_function_names[_id+1], + qtscript_QRect_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QRect_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QRect(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QRect _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRect _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSize _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRect _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QRect _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QRect_throw_ambiguity_error_helper(context, + qtscript_QRect_function_names[_id], + qtscript_QRect_function_signatures[_id]); +} + +QScriptValue qtscript_create_QRect_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QRect*)0)); + for (int i = 0; i < 57; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QRect_prototype_call, qtscript_QRect_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QRect_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QRect_static_call, proto, qtscript_QRect_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QRectF.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QRectF.cpp new file mode 100644 index 00000000..8cb94f4a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QRectF.cpp @@ -0,0 +1,778 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QRectF_function_names[] = { + "QRectF" + // static + // prototype + , "adjust" + , "adjusted" + , "bottom" + , "bottomLeft" + , "bottomRight" + , "center" + , "contains" + , "height" + , "intersected" + , "intersects" + , "isEmpty" + , "isNull" + , "isValid" + , "left" + , "moveBottom" + , "moveBottomLeft" + , "moveBottomRight" + , "moveCenter" + , "moveLeft" + , "moveRight" + , "moveTo" + , "moveTop" + , "moveTopLeft" + , "moveTopRight" + , "normalized" + , "equals" + , "right" + , "setBottom" + , "setBottomLeft" + , "setBottomRight" + , "setCoords" + , "setHeight" + , "setLeft" + , "setRect" + , "setRight" + , "setSize" + , "setTop" + , "setTopLeft" + , "setTopRight" + , "setWidth" + , "setX" + , "setY" + , "size" + , "toAlignedRect" + , "toRect" + , "top" + , "topLeft" + , "topRight" + , "translate" + , "translated" + , "united" + , "width" + , "x" + , "y" + , "toString" +}; + +static const char * const qtscript_QRectF_function_signatures[] = { + "\nQPointF topleft, QPointF bottomRight\nQPointF topleft, QSizeF size\nQRect rect\nqreal left, qreal top, qreal width, qreal height" + // static + // prototype + , "qreal x1, qreal y1, qreal x2, qreal y2" + , "qreal x1, qreal y1, qreal x2, qreal y2" + , "" + , "" + , "" + , "" + , "QPointF p\nQRectF r\nqreal x, qreal y" + , "" + , "QRectF other" + , "QRectF r" + , "" + , "" + , "" + , "" + , "qreal pos" + , "QPointF p" + , "QPointF p" + , "QPointF p" + , "qreal pos" + , "qreal pos" + , "QPointF p\nqreal x, qreal y" + , "qreal pos" + , "QPointF p" + , "QPointF p" + , "" + , "QRectF arg__2" + , "" + , "qreal pos" + , "QPointF p" + , "QPointF p" + , "qreal x1, qreal y1, qreal x2, qreal y2" + , "qreal h" + , "qreal pos" + , "qreal x, qreal y, qreal w, qreal h" + , "qreal pos" + , "QSizeF s" + , "qreal pos" + , "QPointF p" + , "QPointF p" + , "qreal w" + , "qreal pos" + , "qreal pos" + , "" + , "" + , "" + , "" + , "" + , "" + , "QPointF p\nqreal dx, qreal dy" + , "QPointF p\nqreal dx, qreal dy" + , "QRectF other" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QRectF_function_lengths[] = { + 4 + // static + // prototype + , 4 + , 4 + , 0 + , 0 + , 0 + , 0 + , 2 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 0 + , 1 + , 0 + , 1 + , 1 + , 1 + , 4 + , 1 + , 1 + , 4 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 2 + , 2 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QRectF_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QRectF::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QRectF*) + +// +// QRectF +// + +static QScriptValue qtscript_QRectF_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 54; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QRectF* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QRectF.%0(): this object is not a QRectF") + .arg(qtscript_QRectF_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->adjust(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QRectF _q_result = _q_self->adjusted(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->bottom(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->bottomLeft(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->bottomRight(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->center(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->contains(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->height(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->intersected(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->intersects(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->left(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveBottom(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveBottomLeft(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveBottomRight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveCenter(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveLeft(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveRight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveTo(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->moveTo(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveTop(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveTopLeft(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveTopRight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->normalized(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = operator==(*_q_self, _q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->right(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBottom(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBottomLeft(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBottomRight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setCoords(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setHeight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLeft(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + QSizeF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTop(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTopLeft(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTopRight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 39: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setX(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setY(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 42: + if (context->argumentCount() == 0) { + QSizeF _q_result = _q_self->size(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 43: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->toAlignedRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 44: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->toRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 45: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->top(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 46: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->topLeft(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 47: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->topRight(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 48: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->translate(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->translate(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 49: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->translated(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_result = _q_self->translated(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 50: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->united(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 51: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->width(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 52: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->x(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 53: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->y(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 54: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QRectF_throw_ambiguity_error_helper(context, + qtscript_QRectF_function_names[_id+1], + qtscript_QRectF_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QRectF_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QRectF(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QRectF _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizeF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QRectF _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QRectF_throw_ambiguity_error_helper(context, + qtscript_QRectF_function_names[_id], + qtscript_QRectF_function_signatures[_id]); +} + +QScriptValue qtscript_create_QRectF_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QRectF*)0)); + for (int i = 0; i < 55; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QRectF_prototype_call, qtscript_QRectF_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QRectF_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QRectF_static_call, proto, qtscript_QRectF_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QRegExp.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QRegExp.cpp new file mode 100644 index 00000000..dd37ff93 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QRegExp.cpp @@ -0,0 +1,596 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QRegExp_function_names[] = { + "QRegExp" + // static + , "escape" + // prototype + , "cap" + , "captureCount" + , "capturedTexts" + , "caseSensitivity" + , "errorString" + , "exactMatch" + , "indexIn" + , "isEmpty" + , "isMinimal" + , "isValid" + , "lastIndexIn" + , "matchedLength" + , "equals" + , "pattern" + , "patternSyntax" + , "pos" + , "setCaseSensitivity" + , "setMinimal" + , "setPattern" + , "setPatternSyntax" + , "swap" + , "toString" +}; + +static const char * const qtscript_QRegExp_function_signatures[] = { + "\nQRegExp rx\nString pattern, CaseSensitivity cs, PatternSyntax syntax" + // static + , "String str" + // prototype + , "int nth" + , "" + , "" + , "" + , "" + , "String str" + , "String str, int offset, CaretMode caretMode" + , "" + , "" + , "" + , "String str, int offset, CaretMode caretMode" + , "" + , "QRegExp rx" + , "" + , "" + , "int nth" + , "CaseSensitivity cs" + , "bool minimal" + , "String pattern" + , "PatternSyntax syntax" + , "QRegExp other" +"" +}; + +static const int qtscript_QRegExp_function_lengths[] = { + 3 + // static + , 1 + // prototype + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 3 + , 0 + , 0 + , 0 + , 3 + , 0 + , 1 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QRegExp_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QRegExp::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QRegExp*) +Q_DECLARE_METATYPE(QRegExp::PatternSyntax) +Q_DECLARE_METATYPE(QRegExp::CaretMode) +Q_DECLARE_METATYPE(Qt::CaseSensitivity) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QRegExp::PatternSyntax +// + +static const QRegExp::PatternSyntax qtscript_QRegExp_PatternSyntax_values[] = { + QRegExp::RegExp + , QRegExp::Wildcard + , QRegExp::FixedString + , QRegExp::RegExp2 + , QRegExp::WildcardUnix + , QRegExp::W3CXmlSchema11 +}; + +static const char * const qtscript_QRegExp_PatternSyntax_keys[] = { + "RegExp" + , "Wildcard" + , "FixedString" + , "RegExp2" + , "WildcardUnix" + , "W3CXmlSchema11" +}; + +static QString qtscript_QRegExp_PatternSyntax_toStringHelper(QRegExp::PatternSyntax value) +{ + if ((value >= QRegExp::RegExp) && (value <= QRegExp::W3CXmlSchema11)) + return qtscript_QRegExp_PatternSyntax_keys[static_cast(value)-static_cast(QRegExp::RegExp)]; + return QString(); +} + +static QScriptValue qtscript_QRegExp_PatternSyntax_toScriptValue(QScriptEngine *engine, const QRegExp::PatternSyntax &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QRegExp")); + return clazz.property(qtscript_QRegExp_PatternSyntax_toStringHelper(value)); +} + +static void qtscript_QRegExp_PatternSyntax_fromScriptValue(const QScriptValue &value, QRegExp::PatternSyntax &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QRegExp_PatternSyntax(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QRegExp::RegExp) && (arg <= QRegExp::W3CXmlSchema11)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("PatternSyntax(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QRegExp_PatternSyntax_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QRegExp::PatternSyntax value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QRegExp_PatternSyntax_toString(QScriptContext *context, QScriptEngine *engine) +{ + QRegExp::PatternSyntax value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QRegExp_PatternSyntax_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QRegExp_PatternSyntax_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QRegExp_PatternSyntax, + qtscript_QRegExp_PatternSyntax_valueOf, qtscript_QRegExp_PatternSyntax_toString); + qScriptRegisterMetaType(engine, qtscript_QRegExp_PatternSyntax_toScriptValue, + qtscript_QRegExp_PatternSyntax_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QRegExp_PatternSyntax_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QRegExp_PatternSyntax_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QRegExp::CaretMode +// + +static const QRegExp::CaretMode qtscript_QRegExp_CaretMode_values[] = { + QRegExp::CaretAtZero + , QRegExp::CaretAtOffset + , QRegExp::CaretWontMatch +}; + +static const char * const qtscript_QRegExp_CaretMode_keys[] = { + "CaretAtZero" + , "CaretAtOffset" + , "CaretWontMatch" +}; + +static QString qtscript_QRegExp_CaretMode_toStringHelper(QRegExp::CaretMode value) +{ + if ((value >= QRegExp::CaretAtZero) && (value <= QRegExp::CaretWontMatch)) + return qtscript_QRegExp_CaretMode_keys[static_cast(value)-static_cast(QRegExp::CaretAtZero)]; + return QString(); +} + +static QScriptValue qtscript_QRegExp_CaretMode_toScriptValue(QScriptEngine *engine, const QRegExp::CaretMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QRegExp")); + return clazz.property(qtscript_QRegExp_CaretMode_toStringHelper(value)); +} + +static void qtscript_QRegExp_CaretMode_fromScriptValue(const QScriptValue &value, QRegExp::CaretMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QRegExp_CaretMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QRegExp::CaretAtZero) && (arg <= QRegExp::CaretWontMatch)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("CaretMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QRegExp_CaretMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QRegExp::CaretMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QRegExp_CaretMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QRegExp::CaretMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QRegExp_CaretMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QRegExp_CaretMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QRegExp_CaretMode, + qtscript_QRegExp_CaretMode_valueOf, qtscript_QRegExp_CaretMode_toString); + qScriptRegisterMetaType(engine, qtscript_QRegExp_CaretMode_toScriptValue, + qtscript_QRegExp_CaretMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QRegExp_CaretMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QRegExp_CaretMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QRegExp +// + +static QScriptValue qtscript_QRegExp_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 21; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QRegExp* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QRegExp.%0(): this object is not a QRegExp") + .arg(qtscript_QRegExp_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->cap(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->cap(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->captureCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->capturedTexts(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + Qt::CaseSensitivity _q_result = _q_self->caseSensitivity(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->exactMatch(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + int _q_result = _q_self->indexIn(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->indexIn(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + QRegExp::CaretMode _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_result = _q_self->indexIn(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isMinimal(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + int _q_result = _q_self->lastIndexIn(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->lastIndexIn(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + QRegExp::CaretMode _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_result = _q_self->lastIndexIn(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + int _q_result = _q_self->matchedLength(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QRegExp _q_arg0 = context->argument(0).toRegExp(); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->pattern(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QRegExp::PatternSyntax _q_result = _q_self->patternSyntax(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + int _q_result = _q_self->pos(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->pos(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + Qt::CaseSensitivity _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCaseSensitivity(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setMinimal(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPattern(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QRegExp::PatternSyntax _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPatternSyntax(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QRegExp _q_arg0 = context->argument(0).toRegExp(); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QRegExp_throw_ambiguity_error_helper(context, + qtscript_QRegExp_function_names[_id+2], + qtscript_QRegExp_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QRegExp_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QRegExp(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QRegExp _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isRegExp()) { + QRegExp _q_arg0 = context->argument(0).toRegExp(); + QRegExp _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QRegExp _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + Qt::CaseSensitivity _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRegExp _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + Qt::CaseSensitivity _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRegExp::PatternSyntax _q_arg2 = qscriptvalue_cast(context->argument(2)); + QRegExp _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = QRegExp::escape(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QRegExp_throw_ambiguity_error_helper(context, + qtscript_QRegExp_function_names[_id], + qtscript_QRegExp_function_signatures[_id]); +} + +QScriptValue qtscript_create_QRegExp_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QRegExp*)0)); + for (int i = 0; i < 22; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QRegExp_prototype_call, qtscript_QRegExp_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QRegExp_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QRegExp_static_call, proto, qtscript_QRegExp_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QRegExp_static_call, + qtscript_QRegExp_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QRegExp_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("PatternSyntax"), + qtscript_create_QRegExp_PatternSyntax_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("CaretMode"), + qtscript_create_QRegExp_CaretMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QRunnable.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QRunnable.cpp new file mode 100644 index 00000000..4f462de5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QRunnable.cpp @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QRunnable.h" + +static const char * const qtscript_QRunnable_function_names[] = { + "QRunnable" + // static + // prototype + , "autoDelete" + , "run" + , "setAutoDelete" + , "toString" +}; + +static const char * const qtscript_QRunnable_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "bool _autoDelete" +"" +}; + +static const int qtscript_QRunnable_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QRunnable_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QRunnable::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QRunnable*) +Q_DECLARE_METATYPE(QtScriptShell_QRunnable*) + +// +// QRunnable +// + +static QScriptValue qtscript_QRunnable_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QRunnable* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QRunnable.%0(): this object is not a QRunnable") + .arg(qtscript_QRunnable_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->autoDelete(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->run(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setAutoDelete(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: { + QString result = QString::fromLatin1("QRunnable"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QRunnable_throw_ambiguity_error_helper(context, + qtscript_QRunnable_function_names[_id+1], + qtscript_QRunnable_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QRunnable_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QRunnable(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QRunnable* _q_cpp_result = new QtScriptShell_QRunnable(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QRunnable*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QRunnable_throw_ambiguity_error_helper(context, + qtscript_QRunnable_function_names[_id], + qtscript_QRunnable_function_signatures[_id]); +} + +QScriptValue qtscript_create_QRunnable_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QRunnable*)0)); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QRunnable_prototype_call, qtscript_QRunnable_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QRunnable_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QRunnable_static_call, proto, qtscript_QRunnable_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSemaphore.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSemaphore.cpp new file mode 100644 index 00000000..47d9d7cc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSemaphore.cpp @@ -0,0 +1,194 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QSemaphore_function_names[] = { + "QSemaphore" + // static + // prototype + , "acquire" + , "available" + , "release" + , "tryAcquire" + , "toString" +}; + +static const char * const qtscript_QSemaphore_function_signatures[] = { + "int n" + // static + // prototype + , "int n" + , "" + , "int n" + , "int n\nint n, int timeout" +"" +}; + +static const int qtscript_QSemaphore_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QSemaphore_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSemaphore::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSemaphore*) + +// +// QSemaphore +// + +static QScriptValue qtscript_QSemaphore_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSemaphore* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSemaphore.%0(): this object is not a QSemaphore") + .arg(qtscript_QSemaphore_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->acquire(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->acquire(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->available(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->release(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->release(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->tryAcquire(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->tryAcquire(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + bool _q_result = _q_self->tryAcquire(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QSemaphore"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSemaphore_throw_ambiguity_error_helper(context, + qtscript_QSemaphore_function_names[_id+1], + qtscript_QSemaphore_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSemaphore_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSemaphore(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QSemaphore* _q_cpp_result = new QSemaphore(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QSemaphore* _q_cpp_result = new QSemaphore(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSemaphore_throw_ambiguity_error_helper(context, + qtscript_QSemaphore_function_names[_id], + qtscript_QSemaphore_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSemaphore_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSemaphore*)0)); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSemaphore_prototype_call, qtscript_QSemaphore_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSemaphore_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSemaphore_static_call, proto, qtscript_QSemaphore_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSequentialAnimationGroup.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSequentialAnimationGroup.cpp new file mode 100644 index 00000000..6e03413b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSequentialAnimationGroup.cpp @@ -0,0 +1,182 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSequentialAnimationGroup.h" + +static const char * const qtscript_QSequentialAnimationGroup_function_names[] = { + "QSequentialAnimationGroup" + // static + // prototype + , "addPause" + , "insertPause" + , "toString" +}; + +static const char * const qtscript_QSequentialAnimationGroup_function_signatures[] = { + "QObject parent" + // static + // prototype + , "int msecs" + , "int index, int msecs" +"" +}; + +static const int qtscript_QSequentialAnimationGroup_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QSequentialAnimationGroup_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSequentialAnimationGroup::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSequentialAnimationGroup*) +Q_DECLARE_METATYPE(QtScriptShell_QSequentialAnimationGroup*) +Q_DECLARE_METATYPE(QPauseAnimation*) +Q_DECLARE_METATYPE(QAnimationGroup*) + +// +// QSequentialAnimationGroup +// + +static QScriptValue qtscript_QSequentialAnimationGroup_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSequentialAnimationGroup* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSequentialAnimationGroup.%0(): this object is not a QSequentialAnimationGroup") + .arg(qtscript_QSequentialAnimationGroup_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QPauseAnimation* _q_result = _q_self->addPause(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QPauseAnimation* _q_result = _q_self->insertPause(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QSequentialAnimationGroup"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSequentialAnimationGroup_throw_ambiguity_error_helper(context, + qtscript_QSequentialAnimationGroup_function_names[_id+1], + qtscript_QSequentialAnimationGroup_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSequentialAnimationGroup_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSequentialAnimationGroup(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSequentialAnimationGroup* _q_cpp_result = new QtScriptShell_QSequentialAnimationGroup(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSequentialAnimationGroup*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QSequentialAnimationGroup* _q_cpp_result = new QtScriptShell_QSequentialAnimationGroup(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSequentialAnimationGroup*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSequentialAnimationGroup_throw_ambiguity_error_helper(context, + qtscript_QSequentialAnimationGroup_function_names[_id], + qtscript_QSequentialAnimationGroup_function_signatures[_id]); +} + +static QScriptValue qtscript_QSequentialAnimationGroup_toScriptValue(QScriptEngine *engine, QSequentialAnimationGroup* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSequentialAnimationGroup_fromScriptValue(const QScriptValue &value, QSequentialAnimationGroup* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSequentialAnimationGroup_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSequentialAnimationGroup*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSequentialAnimationGroup_prototype_call, qtscript_QSequentialAnimationGroup_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSequentialAnimationGroup_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSequentialAnimationGroup_toScriptValue, + qtscript_QSequentialAnimationGroup_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSequentialAnimationGroup_static_call, proto, qtscript_QSequentialAnimationGroup_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSettings.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSettings.cpp new file mode 100644 index 00000000..3b3f87e5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSettings.cpp @@ -0,0 +1,875 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSettings.h" + +static const char * const qtscript_QSettings_function_names[] = { + "QSettings" + // static + , "defaultFormat" + , "setDefaultFormat" + , "setPath" + // prototype + , "allKeys" + , "applicationName" + , "beginGroup" + , "beginReadArray" + , "beginWriteArray" + , "childGroups" + , "childKeys" + , "clear" + , "contains" + , "endArray" + , "endGroup" + , "fallbacksEnabled" + , "fileName" + , "format" + , "group" + , "iniCodec" + , "isWritable" + , "organizationName" + , "remove" + , "scope" + , "setArrayIndex" + , "setFallbacksEnabled" + , "setIniCodec" + , "setValue" + , "status" + , "sync" + , "value" + , "toString" +}; + +static const char * const qtscript_QSettings_function_signatures[] = { + "QObject parent\nFormat format, Scope scope, String organization, String application, QObject parent\nScope scope, String organization, String application, QObject parent\nString fileName, Format format, QObject parent\nString organization, String application, QObject parent" + // static + , "" + , "Format format" + , "Format format, Scope scope, String path" + // prototype + , "" + , "" + , "String prefix" + , "String prefix" + , "String prefix, int size" + , "" + , "" + , "" + , "String key" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "String key" + , "" + , "int i" + , "bool b" + , "QTextCodec codec\nchar codecName" + , "String key, Object value" + , "" + , "" + , "String key, Object defaultValue" +"" +}; + +static const int qtscript_QSettings_function_lengths[] = { + 5 + // static + , 0 + , 1 + , 3 + // prototype + , 0 + , 0 + , 1 + , 1 + , 2 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 1 + , 1 + , 2 + , 0 + , 0 + , 2 + , 0 +}; + +static QScriptValue qtscript_QSettings_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSettings::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSettings*) +Q_DECLARE_METATYPE(QtScriptShell_QSettings*) +Q_DECLARE_METATYPE(QSettings::Format) +Q_DECLARE_METATYPE(QSettings::Scope) +Q_DECLARE_METATYPE(QSettings::Status) +Q_DECLARE_METATYPE(QTextCodec*) +Q_DECLARE_METATYPE(const char*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QSettings::Format +// + +static const QSettings::Format qtscript_QSettings_Format_values[] = { + QSettings::NativeFormat + , QSettings::IniFormat + , QSettings::InvalidFormat + , QSettings::CustomFormat1 + , QSettings::CustomFormat2 + , QSettings::CustomFormat3 + , QSettings::CustomFormat4 + , QSettings::CustomFormat5 + , QSettings::CustomFormat6 + , QSettings::CustomFormat7 + , QSettings::CustomFormat8 + , QSettings::CustomFormat9 + , QSettings::CustomFormat10 + , QSettings::CustomFormat11 + , QSettings::CustomFormat12 + , QSettings::CustomFormat13 + , QSettings::CustomFormat14 + , QSettings::CustomFormat15 + , QSettings::CustomFormat16 +}; + +static const char * const qtscript_QSettings_Format_keys[] = { + "NativeFormat" + , "IniFormat" + , "InvalidFormat" + , "CustomFormat1" + , "CustomFormat2" + , "CustomFormat3" + , "CustomFormat4" + , "CustomFormat5" + , "CustomFormat6" + , "CustomFormat7" + , "CustomFormat8" + , "CustomFormat9" + , "CustomFormat10" + , "CustomFormat11" + , "CustomFormat12" + , "CustomFormat13" + , "CustomFormat14" + , "CustomFormat15" + , "CustomFormat16" +}; + +static QString qtscript_QSettings_Format_toStringHelper(QSettings::Format value) +{ + for (int i = 0; i < 19; ++i) { + if (qtscript_QSettings_Format_values[i] == value) + return QString::fromLatin1(qtscript_QSettings_Format_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QSettings_Format_toScriptValue(QScriptEngine *engine, const QSettings::Format &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSettings")); + return clazz.property(qtscript_QSettings_Format_toStringHelper(value)); +} + +static void qtscript_QSettings_Format_fromScriptValue(const QScriptValue &value, QSettings::Format &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSettings_Format(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 19; ++i) { + if (qtscript_QSettings_Format_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Format(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSettings_Format_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSettings::Format value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSettings_Format_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSettings::Format value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSettings_Format_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSettings_Format_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSettings_Format, + qtscript_QSettings_Format_valueOf, qtscript_QSettings_Format_toString); + qScriptRegisterMetaType(engine, qtscript_QSettings_Format_toScriptValue, + qtscript_QSettings_Format_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 19; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSettings_Format_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSettings_Format_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSettings::Scope +// + +static const QSettings::Scope qtscript_QSettings_Scope_values[] = { + QSettings::UserScope + , QSettings::SystemScope +}; + +static const char * const qtscript_QSettings_Scope_keys[] = { + "UserScope" + , "SystemScope" +}; + +static QString qtscript_QSettings_Scope_toStringHelper(QSettings::Scope value) +{ + if ((value >= QSettings::UserScope) && (value <= QSettings::SystemScope)) + return qtscript_QSettings_Scope_keys[static_cast(value)-static_cast(QSettings::UserScope)]; + return QString(); +} + +static QScriptValue qtscript_QSettings_Scope_toScriptValue(QScriptEngine *engine, const QSettings::Scope &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSettings")); + return clazz.property(qtscript_QSettings_Scope_toStringHelper(value)); +} + +static void qtscript_QSettings_Scope_fromScriptValue(const QScriptValue &value, QSettings::Scope &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSettings_Scope(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSettings::UserScope) && (arg <= QSettings::SystemScope)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Scope(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSettings_Scope_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSettings::Scope value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSettings_Scope_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSettings::Scope value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSettings_Scope_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSettings_Scope_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSettings_Scope, + qtscript_QSettings_Scope_valueOf, qtscript_QSettings_Scope_toString); + qScriptRegisterMetaType(engine, qtscript_QSettings_Scope_toScriptValue, + qtscript_QSettings_Scope_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSettings_Scope_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSettings_Scope_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSettings::Status +// + +static const QSettings::Status qtscript_QSettings_Status_values[] = { + QSettings::NoError + , QSettings::AccessError + , QSettings::FormatError +}; + +static const char * const qtscript_QSettings_Status_keys[] = { + "NoError" + , "AccessError" + , "FormatError" +}; + +static QString qtscript_QSettings_Status_toStringHelper(QSettings::Status value) +{ + if ((value >= QSettings::NoError) && (value <= QSettings::FormatError)) + return qtscript_QSettings_Status_keys[static_cast(value)-static_cast(QSettings::NoError)]; + return QString(); +} + +static QScriptValue qtscript_QSettings_Status_toScriptValue(QScriptEngine *engine, const QSettings::Status &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSettings")); + return clazz.property(qtscript_QSettings_Status_toStringHelper(value)); +} + +static void qtscript_QSettings_Status_fromScriptValue(const QScriptValue &value, QSettings::Status &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSettings_Status(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSettings::NoError) && (arg <= QSettings::FormatError)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Status(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSettings_Status_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSettings::Status value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSettings_Status_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSettings::Status value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSettings_Status_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSettings_Status_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSettings_Status, + qtscript_QSettings_Status_valueOf, qtscript_QSettings_Status_toString); + qScriptRegisterMetaType(engine, qtscript_QSettings_Status_toScriptValue, + qtscript_QSettings_Status_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSettings_Status_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSettings_Status_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSettings +// + +static QScriptValue qtscript_QSettings_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 27; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSettings* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSettings.%0(): this object is not a QSettings") + .arg(qtscript_QSettings_function_names[_id+4])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->allKeys(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->applicationName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->beginGroup(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + int _q_result = _q_self->beginReadArray(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->beginWriteArray(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->beginWriteArray(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->childGroups(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->childKeys(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + _q_self->endArray(); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 0) { + _q_self->endGroup(); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->fallbacksEnabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->fileName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QSettings::Format _q_result = _q_self->format(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->group(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QTextCodec* _q_result = _q_self->iniCodec(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isWritable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->organizationName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->remove(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QSettings::Scope _q_result = _q_self->scope(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setArrayIndex(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setFallbacksEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QTextCodec* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setIniCodec(_q_arg0); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0))) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setIniCodec(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 23: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 0) { + QSettings::Status _q_result = _q_self->status(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + _q_self->sync(); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QVariant _q_result = _q_self->value(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QVariant _q_arg1 = context->argument(1).toVariant(); + QVariant _q_result = _q_self->value(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: { + QString result = QString::fromLatin1("QSettings"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSettings_throw_ambiguity_error_helper(context, + qtscript_QSettings_function_names[_id+4], + qtscript_QSettings_function_signatures[_id+4]); +} + +static QScriptValue qtscript_QSettings_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSettings(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSettings* _q_cpp_result = new QtScriptShell_QSettings(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSettings*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isQObject()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QSettings* _q_cpp_result = new QtScriptShell_QSettings(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSettings*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QSettings* _q_cpp_result = new QtScriptShell_QSettings(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSettings*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QSettings::Scope _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QtScriptShell_QSettings* _q_cpp_result = new QtScriptShell_QSettings(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSettings*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QSettings::Format _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QSettings* _q_cpp_result = new QtScriptShell_QSettings(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSettings*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QtScriptShell_QSettings* _q_cpp_result = new QtScriptShell_QSettings(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSettings*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && context->argument(2).isString()) { + QSettings::Format _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSettings::Scope _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + QtScriptShell_QSettings* _q_cpp_result = new QtScriptShell_QSettings(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSettings*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString() + && context->argument(2).isString()) { + QSettings::Scope _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QtScriptShell_QSettings* _q_cpp_result = new QtScriptShell_QSettings(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSettings*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && context->argument(2).isQObject()) { + QString _q_arg0 = context->argument(0).toString(); + QSettings::Format _q_arg1 = qscriptvalue_cast(context->argument(1)); + QObject* _q_arg2 = context->argument(2).toQObject(); + QtScriptShell_QSettings* _q_cpp_result = new QtScriptShell_QSettings(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSettings*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString() + && context->argument(1).isString() + && context->argument(2).isQObject()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QObject* _q_arg2 = context->argument(2).toQObject(); + QtScriptShell_QSettings* _q_cpp_result = new QtScriptShell_QSettings(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSettings*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 4) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && context->argument(2).isString() + && context->argument(3).isString()) { + QSettings::Format _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSettings::Scope _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + QtScriptShell_QSettings* _q_cpp_result = new QtScriptShell_QSettings(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSettings*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString() + && context->argument(2).isString() + && context->argument(3).isQObject()) { + QSettings::Scope _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QObject* _q_arg3 = context->argument(3).toQObject(); + QtScriptShell_QSettings* _q_cpp_result = new QtScriptShell_QSettings(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSettings*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 5) { + QSettings::Format _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSettings::Scope _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + QObject* _q_arg4 = context->argument(4).toQObject(); + QtScriptShell_QSettings* _q_cpp_result = new QtScriptShell_QSettings(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSettings*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QSettings::Format _q_result = QSettings::defaultFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QSettings::Format _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSettings::setDefaultFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 3) { + QSettings::Format _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSettings::Scope _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + QSettings::setPath(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSettings_throw_ambiguity_error_helper(context, + qtscript_QSettings_function_names[_id], + qtscript_QSettings_function_signatures[_id]); +} + +static QScriptValue qtscript_QSettings_toScriptValue(QScriptEngine *engine, QSettings* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSettings_fromScriptValue(const QScriptValue &value, QSettings* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSettings_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSettings*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 28; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSettings_prototype_call, qtscript_QSettings_function_lengths[i+4]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSettings_function_names[i+4]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSettings_toScriptValue, + qtscript_QSettings_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSettings_static_call, proto, qtscript_QSettings_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSettings_static_call, + qtscript_QSettings_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QSettings_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("Format"), + qtscript_create_QSettings_Format_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Scope"), + qtscript_create_QSettings_Scope_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Status"), + qtscript_create_QSettings_Status_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSignalMapper.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSignalMapper.cpp new file mode 100644 index 00000000..58d772e3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSignalMapper.cpp @@ -0,0 +1,234 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSignalMapper.h" + +static const char * const qtscript_QSignalMapper_function_names[] = { + "QSignalMapper" + // static + // prototype + , "mappingById" + , "mappingByObject" + , "mappingByString" + , "removeMappings" + , "setMappingById" + , "setMappingByObject" + , "setMappingByString" + , "toString" +}; + +static const char * const qtscript_QSignalMapper_function_signatures[] = { + "QObject parent" + // static + // prototype + , "int id" + , "QObject object" + , "String text" + , "QObject sender" + , "QObject sender, int id" + , "QObject sender, QObject object" + , "QObject sender, String text" +"" +}; + +static const int qtscript_QSignalMapper_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 1 + , 1 + , 1 + , 2 + , 2 + , 2 + , 0 +}; + +static QScriptValue qtscript_QSignalMapper_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSignalMapper::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSignalMapper*) +Q_DECLARE_METATYPE(QtScriptShell_QSignalMapper*) + +// +// QSignalMapper +// + +static QScriptValue qtscript_QSignalMapper_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 7; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSignalMapper* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSignalMapper.%0(): this object is not a QSignalMapper") + .arg(qtscript_QSignalMapper_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QObject* _q_result = _q_self->mapping(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QObject* _q_result = _q_self->mapping(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QObject* _q_result = _q_self->mapping(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + _q_self->removeMappings(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setMapping(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QObject* _q_arg1 = context->argument(1).toQObject(); + _q_self->setMapping(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setMapping(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 7: { + QString result = QString::fromLatin1("QSignalMapper"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSignalMapper_throw_ambiguity_error_helper(context, + qtscript_QSignalMapper_function_names[_id+1], + qtscript_QSignalMapper_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSignalMapper_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSignalMapper(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSignalMapper* _q_cpp_result = new QtScriptShell_QSignalMapper(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSignalMapper*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QSignalMapper* _q_cpp_result = new QtScriptShell_QSignalMapper(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSignalMapper*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSignalMapper_throw_ambiguity_error_helper(context, + qtscript_QSignalMapper_function_names[_id], + qtscript_QSignalMapper_function_signatures[_id]); +} + +static QScriptValue qtscript_QSignalMapper_toScriptValue(QScriptEngine *engine, QSignalMapper* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSignalMapper_fromScriptValue(const QScriptValue &value, QSignalMapper* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSignalMapper_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSignalMapper*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSignalMapper_prototype_call, qtscript_QSignalMapper_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSignalMapper_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSignalMapper_toScriptValue, + qtscript_QSignalMapper_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSignalMapper_static_call, proto, qtscript_QSignalMapper_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSignalTransition.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSignalTransition.cpp new file mode 100644 index 00000000..b750c201 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSignalTransition.cpp @@ -0,0 +1,171 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSignalTransition.h" + +static const char * const qtscript_QSignalTransition_function_names[] = { + "QSignalTransition" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QSignalTransition_function_signatures[] = { + "QState sourceState\nQObject sender, char signal, QState sourceState" + // static + // prototype +"" +}; + +static const int qtscript_QSignalTransition_function_lengths[] = { + 3 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QSignalTransition_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSignalTransition::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSignalTransition*) +Q_DECLARE_METATYPE(QtScriptShell_QSignalTransition*) +Q_DECLARE_METATYPE(QState*) +Q_DECLARE_METATYPE(const QObject*) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(QAbstractTransition*) + +// +// QSignalTransition +// + +static QScriptValue qtscript_QSignalTransition_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSignalTransition* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSignalTransition.%0(): this object is not a QSignalTransition") + .arg(qtscript_QSignalTransition_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QSignalTransition"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSignalTransition_throw_ambiguity_error_helper(context, + qtscript_QSignalTransition_function_names[_id+1], + qtscript_QSignalTransition_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSignalTransition_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSignalTransition(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSignalTransition* _q_cpp_result = new QtScriptShell_QSignalTransition(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSignalTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QState* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QSignalTransition* _q_cpp_result = new QtScriptShell_QSignalTransition(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSignalTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + const QObject* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QSignalTransition* _q_cpp_result = new QtScriptShell_QSignalTransition(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSignalTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 3) { + const QObject* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QState* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QSignalTransition* _q_cpp_result = new QtScriptShell_QSignalTransition(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSignalTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSignalTransition_throw_ambiguity_error_helper(context, + qtscript_QSignalTransition_function_names[_id], + qtscript_QSignalTransition_function_signatures[_id]); +} + +static QScriptValue qtscript_QSignalTransition_toScriptValue(QScriptEngine *engine, QSignalTransition* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSignalTransition_fromScriptValue(const QScriptValue &value, QSignalTransition* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSignalTransition_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSignalTransition*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QSignalTransition_toScriptValue, + qtscript_QSignalTransition_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSignalTransition_static_call, proto, qtscript_QSignalTransition_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSize.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSize.cpp new file mode 100644 index 00000000..1aee21f3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSize.cpp @@ -0,0 +1,345 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QSize_function_names[] = { + "QSize" + // static + // prototype + , "boundedTo" + , "expandedTo" + , "height" + , "isEmpty" + , "isNull" + , "isValid" + , "operator_add_assign" + , "operator_divide_assign" + , "equals" + , "operator_multiply_assign" + , "operator_subtract_assign" + , "scale" + , "scaled" + , "setHeight" + , "setWidth" + , "transpose" + , "transposed" + , "width" + , "toString" +}; + +static const char * const qtscript_QSize_function_signatures[] = { + "\nint w, int h" + // static + // prototype + , "QSize arg__1" + , "QSize arg__1" + , "" + , "" + , "" + , "" + , "QSize arg__1" + , "qreal c" + , "QSize s2" + , "qreal c" + , "QSize arg__1" + , "QSize s, AspectRatioMode mode\nint w, int h, AspectRatioMode mode" + , "QSize s, AspectRatioMode mode\nint w, int h, AspectRatioMode mode" + , "int h" + , "int w" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QSize_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 3 + , 3 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QSize_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSize::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSize*) +Q_DECLARE_METATYPE(Qt::AspectRatioMode) + +// +// QSize +// + +static QScriptValue qtscript_QSize_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 18; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSize* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSize.%0(): this object is not a QSize") + .arg(qtscript_QSize_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSize _q_result = _q_self->boundedTo(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSize _q_result = _q_self->expandedTo(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->height(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSize& _q_result = _q_self->operator+=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSize& _q_result = _q_self->operator/=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = operator==(*_q_self, _q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSize& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSize& _q_result = _q_self->operator-=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 2) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::AspectRatioMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->scale(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + Qt::AspectRatioMode _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->scale(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 2) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::AspectRatioMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QSize _q_result = _q_self->scaled(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + Qt::AspectRatioMode _q_arg2 = qscriptvalue_cast(context->argument(2)); + QSize _q_result = _q_self->scaled(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setHeight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 0) { + _q_self->transpose(); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->transposed(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + int _q_result = _q_self->width(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSize_throw_ambiguity_error_helper(context, + qtscript_QSize_function_names[_id+1], + qtscript_QSize_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSize_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSize(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QSize _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QSize _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSize_throw_ambiguity_error_helper(context, + qtscript_QSize_function_names[_id], + qtscript_QSize_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSize_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSize*)0)); + for (int i = 0; i < 19; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSize_prototype_call, qtscript_QSize_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSize_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSize_static_call, proto, qtscript_QSize_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSizeF.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSizeF.cpp new file mode 100644 index 00000000..a528cef8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSizeF.cpp @@ -0,0 +1,360 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QSizeF_function_names[] = { + "QSizeF" + // static + // prototype + , "boundedTo" + , "expandedTo" + , "height" + , "isEmpty" + , "isNull" + , "isValid" + , "operator_add_assign" + , "operator_divide_assign" + , "equals" + , "operator_multiply_assign" + , "operator_subtract_assign" + , "scale" + , "scaled" + , "setHeight" + , "setWidth" + , "toSize" + , "transpose" + , "transposed" + , "width" + , "toString" +}; + +static const char * const qtscript_QSizeF_function_signatures[] = { + "\nQSize sz\nqreal w, qreal h" + // static + // prototype + , "QSizeF arg__1" + , "QSizeF arg__1" + , "" + , "" + , "" + , "" + , "QSizeF arg__1" + , "qreal c" + , "QSizeF s2" + , "qreal c" + , "QSizeF arg__1" + , "QSizeF s, AspectRatioMode mode\nqreal w, qreal h, AspectRatioMode mode" + , "QSizeF s, AspectRatioMode mode\nqreal w, qreal h, AspectRatioMode mode" + , "qreal h" + , "qreal w" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QSizeF_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 3 + , 3 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QSizeF_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSizeF::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSizeF*) +Q_DECLARE_METATYPE(Qt::AspectRatioMode) + +// +// QSizeF +// + +static QScriptValue qtscript_QSizeF_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 19; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSizeF* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSizeF.%0(): this object is not a QSizeF") + .arg(qtscript_QSizeF_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QSizeF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizeF _q_result = _q_self->boundedTo(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QSizeF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizeF _q_result = _q_self->expandedTo(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->height(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QSizeF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizeF& _q_result = _q_self->operator+=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizeF& _q_result = _q_self->operator/=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QSizeF _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = operator==(*_q_self, _q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizeF& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QSizeF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizeF& _q_result = _q_self->operator-=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 2) { + QSizeF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::AspectRatioMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->scale(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::AspectRatioMode _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->scale(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 2) { + QSizeF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::AspectRatioMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QSizeF _q_result = _q_self->scaled(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::AspectRatioMode _q_arg2 = qscriptvalue_cast(context->argument(2)); + QSizeF _q_result = _q_self->scaled(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setHeight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->toSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + _q_self->transpose(); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QSizeF _q_result = _q_self->transposed(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->width(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSizeF_throw_ambiguity_error_helper(context, + qtscript_QSizeF_function_names[_id+1], + qtscript_QSizeF_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSizeF_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSizeF(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QSizeF _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizeF _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QSizeF _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSizeF_throw_ambiguity_error_helper(context, + qtscript_QSizeF_function_names[_id], + qtscript_QSizeF_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSizeF_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSizeF*)0)); + for (int i = 0; i < 20; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSizeF_prototype_call, qtscript_QSizeF_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSizeF_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSizeF_static_call, proto, qtscript_QSizeF_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSocketNotifier.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSocketNotifier.cpp new file mode 100644 index 00000000..1fa4f50e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSocketNotifier.cpp @@ -0,0 +1,244 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QSocketNotifier_function_names[] = { + "QSocketNotifier" + // static + // prototype + , "isEnabled" + , "type" + , "toString" +}; + +static const char * const qtscript_QSocketNotifier_function_signatures[] = { + "" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QSocketNotifier_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QSocketNotifier_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSocketNotifier::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSocketNotifier*) +Q_DECLARE_METATYPE(QSocketNotifier::Type) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QSocketNotifier::Type +// + +static const QSocketNotifier::Type qtscript_QSocketNotifier_Type_values[] = { + QSocketNotifier::Read + , QSocketNotifier::Write + , QSocketNotifier::Exception +}; + +static const char * const qtscript_QSocketNotifier_Type_keys[] = { + "Read" + , "Write" + , "Exception" +}; + +static QString qtscript_QSocketNotifier_Type_toStringHelper(QSocketNotifier::Type value) +{ + if ((value >= QSocketNotifier::Read) && (value <= QSocketNotifier::Exception)) + return qtscript_QSocketNotifier_Type_keys[static_cast(value)-static_cast(QSocketNotifier::Read)]; + return QString(); +} + +static QScriptValue qtscript_QSocketNotifier_Type_toScriptValue(QScriptEngine *engine, const QSocketNotifier::Type &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSocketNotifier")); + return clazz.property(qtscript_QSocketNotifier_Type_toStringHelper(value)); +} + +static void qtscript_QSocketNotifier_Type_fromScriptValue(const QScriptValue &value, QSocketNotifier::Type &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSocketNotifier_Type(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSocketNotifier::Read) && (arg <= QSocketNotifier::Exception)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Type(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSocketNotifier_Type_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSocketNotifier::Type value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSocketNotifier_Type_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSocketNotifier::Type value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSocketNotifier_Type_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSocketNotifier_Type_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSocketNotifier_Type, + qtscript_QSocketNotifier_Type_valueOf, qtscript_QSocketNotifier_Type_toString); + qScriptRegisterMetaType(engine, qtscript_QSocketNotifier_Type_toScriptValue, + qtscript_QSocketNotifier_Type_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSocketNotifier_Type_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSocketNotifier_Type_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSocketNotifier +// + +static QScriptValue qtscript_QSocketNotifier_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSocketNotifier* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSocketNotifier.%0(): this object is not a QSocketNotifier") + .arg(qtscript_QSocketNotifier_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEnabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QSocketNotifier::Type _q_result = _q_self->type(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QSocketNotifier"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSocketNotifier_throw_ambiguity_error_helper(context, + qtscript_QSocketNotifier_function_names[_id+1], + qtscript_QSocketNotifier_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSocketNotifier_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSocketNotifier cannot be constructed")); + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSocketNotifier_throw_ambiguity_error_helper(context, + qtscript_QSocketNotifier_function_names[_id], + qtscript_QSocketNotifier_function_signatures[_id]); +} + +static QScriptValue qtscript_QSocketNotifier_toScriptValue(QScriptEngine *engine, QSocketNotifier* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSocketNotifier_fromScriptValue(const QScriptValue &value, QSocketNotifier* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSocketNotifier_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSocketNotifier*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSocketNotifier_prototype_call, qtscript_QSocketNotifier_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSocketNotifier_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSocketNotifier_toScriptValue, + qtscript_QSocketNotifier_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSocketNotifier_static_call, proto, qtscript_QSocketNotifier_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Type"), + qtscript_create_QSocketNotifier_Type_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QState.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QState.cpp new file mode 100644 index 00000000..031d551c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QState.cpp @@ -0,0 +1,325 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QState.h" + +static const char * const qtscript_QState_function_names[] = { + "QState" + // static + // prototype + , "addTransition" + , "assignProperty" + , "removeTransition" + , "transitions" + , "toString" +}; + +static const char * const qtscript_QState_function_signatures[] = { + "QState parent\nChildMode childMode, QState parent" + // static + // prototype + , "QAbstractState target\nQAbstractTransition transition\nQObject sender, char signal, QAbstractState target" + , "QObject object, char name, Object value" + , "QAbstractTransition transition" + , "" +"" +}; + +static const int qtscript_QState_function_lengths[] = { + 2 + // static + // prototype + , 3 + , 3 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QState_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QState::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QState*) +Q_DECLARE_METATYPE(QtScriptShell_QState*) +Q_DECLARE_METATYPE(QState::ChildMode) +Q_DECLARE_METATYPE(QAbstractState*) +Q_DECLARE_METATYPE(QAbstractTransition*) +Q_DECLARE_METATYPE(const QObject*) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(QSignalTransition*) +Q_DECLARE_METATYPE(QList) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QState::ChildMode +// + +static const QState::ChildMode qtscript_QState_ChildMode_values[] = { + QState::ExclusiveStates + , QState::ParallelStates +}; + +static const char * const qtscript_QState_ChildMode_keys[] = { + "ExclusiveStates" + , "ParallelStates" +}; + +static QString qtscript_QState_ChildMode_toStringHelper(QState::ChildMode value) +{ + if ((value >= QState::ExclusiveStates) && (value <= QState::ParallelStates)) + return qtscript_QState_ChildMode_keys[static_cast(value)-static_cast(QState::ExclusiveStates)]; + return QString(); +} + +static QScriptValue qtscript_QState_ChildMode_toScriptValue(QScriptEngine *engine, const QState::ChildMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QState")); + return clazz.property(qtscript_QState_ChildMode_toStringHelper(value)); +} + +static void qtscript_QState_ChildMode_fromScriptValue(const QScriptValue &value, QState::ChildMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QState_ChildMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QState::ExclusiveStates) && (arg <= QState::ParallelStates)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ChildMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QState_ChildMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QState::ChildMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QState_ChildMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QState::ChildMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QState_ChildMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QState_ChildMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QState_ChildMode, + qtscript_QState_ChildMode_valueOf, qtscript_QState_ChildMode_toString); + qScriptRegisterMetaType(engine, qtscript_QState_ChildMode_toScriptValue, + qtscript_QState_ChildMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QState_ChildMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QState_ChildMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QState +// + +static QScriptValue qtscript_QState_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QState* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QState.%0(): this object is not a QState") + .arg(qtscript_QState_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QAbstractState* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAbstractTransition* _q_result = _q_self->addTransition(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0))) { + QAbstractTransition* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addTransition(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + const QObject* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QAbstractState* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QSignalTransition* _q_result = _q_self->addTransition(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 3) { + QObject* _q_arg0 = context->argument(0).toQObject(); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + QVariant _q_arg2 = context->argument(2).toVariant(); + _q_self->assignProperty(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QAbstractTransition* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeTransition(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->transitions(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QState"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QState_throw_ambiguity_error_helper(context, + qtscript_QState_function_names[_id+1], + qtscript_QState_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QState_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QState(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QState* _q_cpp_result = new QtScriptShell_QState(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QState*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QState* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QState* _q_cpp_result = new QtScriptShell_QState(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QState*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QState::ChildMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QState* _q_cpp_result = new QtScriptShell_QState(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QState*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QState::ChildMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QState* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QState* _q_cpp_result = new QtScriptShell_QState(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QState*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QState_throw_ambiguity_error_helper(context, + qtscript_QState_function_names[_id], + qtscript_QState_function_signatures[_id]); +} + +static QScriptValue qtscript_QState_toScriptValue(QScriptEngine *engine, QState* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QState_fromScriptValue(const QScriptValue &value, QState* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QState_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QState*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QState_prototype_call, qtscript_QState_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QState_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QState_toScriptValue, + qtscript_QState_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QState_static_call, proto, qtscript_QState_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ChildMode"), + qtscript_create_QState_ChildMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QStateMachine.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QStateMachine.cpp new file mode 100644 index 00000000..398c847b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QStateMachine.cpp @@ -0,0 +1,463 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QStateMachine.h" + +static const char * const qtscript_QStateMachine_function_names[] = { + "QStateMachine" + // static + // prototype + , "addDefaultAnimation" + , "addState" + , "cancelDelayedEvent" + , "clearError" + , "configuration" + , "defaultAnimations" + , "error" + , "postDelayedEvent" + , "postEvent" + , "removeDefaultAnimation" + , "removeState" + , "toString" +}; + +static const char * const qtscript_QStateMachine_function_signatures[] = { + "QObject parent\nChildMode childMode, QObject parent" + // static + // prototype + , "QAbstractAnimation animation" + , "QAbstractState state" + , "int id" + , "" + , "" + , "" + , "" + , "QEvent event, int delay" + , "QEvent event, EventPriority priority" + , "QAbstractAnimation animation" + , "QAbstractState state" +"" +}; + +static const int qtscript_QStateMachine_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 2 + , 2 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QStateMachine_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStateMachine::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStateMachine*) +Q_DECLARE_METATYPE(QtScriptShell_QStateMachine*) +Q_DECLARE_METATYPE(QStateMachine::Error) +Q_DECLARE_METATYPE(QStateMachine::EventPriority) +Q_DECLARE_METATYPE(QAbstractAnimation*) +Q_DECLARE_METATYPE(QAbstractState*) +Q_DECLARE_METATYPE(QSet) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QState::ChildMode) +Q_DECLARE_METATYPE(QState*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStateMachine::Error +// + +static const QStateMachine::Error qtscript_QStateMachine_Error_values[] = { + QStateMachine::NoError + , QStateMachine::NoInitialStateError + , QStateMachine::NoDefaultStateInHistoryStateError + , QStateMachine::NoCommonAncestorForTransitionError +}; + +static const char * const qtscript_QStateMachine_Error_keys[] = { + "NoError" + , "NoInitialStateError" + , "NoDefaultStateInHistoryStateError" + , "NoCommonAncestorForTransitionError" +}; + +static QString qtscript_QStateMachine_Error_toStringHelper(QStateMachine::Error value) +{ + if ((value >= QStateMachine::NoError) && (value <= QStateMachine::NoCommonAncestorForTransitionError)) + return qtscript_QStateMachine_Error_keys[static_cast(value)-static_cast(QStateMachine::NoError)]; + return QString(); +} + +static QScriptValue qtscript_QStateMachine_Error_toScriptValue(QScriptEngine *engine, const QStateMachine::Error &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStateMachine")); + return clazz.property(qtscript_QStateMachine_Error_toStringHelper(value)); +} + +static void qtscript_QStateMachine_Error_fromScriptValue(const QScriptValue &value, QStateMachine::Error &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStateMachine_Error(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStateMachine::NoError) && (arg <= QStateMachine::NoCommonAncestorForTransitionError)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Error(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStateMachine_Error_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStateMachine::Error value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStateMachine_Error_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStateMachine::Error value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStateMachine_Error_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStateMachine_Error_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStateMachine_Error, + qtscript_QStateMachine_Error_valueOf, qtscript_QStateMachine_Error_toString); + qScriptRegisterMetaType(engine, qtscript_QStateMachine_Error_toScriptValue, + qtscript_QStateMachine_Error_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStateMachine_Error_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStateMachine_Error_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStateMachine::EventPriority +// + +static const QStateMachine::EventPriority qtscript_QStateMachine_EventPriority_values[] = { + QStateMachine::NormalPriority + , QStateMachine::HighPriority +}; + +static const char * const qtscript_QStateMachine_EventPriority_keys[] = { + "NormalPriority" + , "HighPriority" +}; + +static QString qtscript_QStateMachine_EventPriority_toStringHelper(QStateMachine::EventPriority value) +{ + if ((value >= QStateMachine::NormalPriority) && (value <= QStateMachine::HighPriority)) + return qtscript_QStateMachine_EventPriority_keys[static_cast(value)-static_cast(QStateMachine::NormalPriority)]; + return QString(); +} + +static QScriptValue qtscript_QStateMachine_EventPriority_toScriptValue(QScriptEngine *engine, const QStateMachine::EventPriority &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStateMachine")); + return clazz.property(qtscript_QStateMachine_EventPriority_toStringHelper(value)); +} + +static void qtscript_QStateMachine_EventPriority_fromScriptValue(const QScriptValue &value, QStateMachine::EventPriority &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStateMachine_EventPriority(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStateMachine::NormalPriority) && (arg <= QStateMachine::HighPriority)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("EventPriority(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStateMachine_EventPriority_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStateMachine::EventPriority value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStateMachine_EventPriority_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStateMachine::EventPriority value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStateMachine_EventPriority_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStateMachine_EventPriority_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStateMachine_EventPriority, + qtscript_QStateMachine_EventPriority_valueOf, qtscript_QStateMachine_EventPriority_toString); + qScriptRegisterMetaType(engine, qtscript_QStateMachine_EventPriority_toScriptValue, + qtscript_QStateMachine_EventPriority_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStateMachine_EventPriority_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStateMachine_EventPriority_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStateMachine +// + +static QScriptValue qtscript_QStateMachine_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 11; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStateMachine* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStateMachine.%0(): this object is not a QStateMachine") + .arg(qtscript_QStateMachine_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QAbstractAnimation* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addDefaultAnimation(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QAbstractState* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addState(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->cancelDelayedEvent(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->clearError(); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QSet _q_result = _q_self->configuration(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->defaultAnimations(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QStateMachine::Error _q_result = _q_self->error(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 2) { + QEvent* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->postDelayedEvent(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QEvent* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->postEvent(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QEvent* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStateMachine::EventPriority _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->postEvent(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QAbstractAnimation* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeDefaultAnimation(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QAbstractState* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeState(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: { + QString result = QString::fromLatin1("QStateMachine"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStateMachine_throw_ambiguity_error_helper(context, + qtscript_QStateMachine_function_names[_id+1], + qtscript_QStateMachine_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStateMachine_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStateMachine(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStateMachine* _q_cpp_result = new QtScriptShell_QStateMachine(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStateMachine*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isQObject()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QStateMachine* _q_cpp_result = new QtScriptShell_QStateMachine(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStateMachine*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QState::ChildMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStateMachine* _q_cpp_result = new QtScriptShell_QStateMachine(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStateMachine*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QState::ChildMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QStateMachine* _q_cpp_result = new QtScriptShell_QStateMachine(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStateMachine*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStateMachine_throw_ambiguity_error_helper(context, + qtscript_QStateMachine_function_names[_id], + qtscript_QStateMachine_function_signatures[_id]); +} + +static QScriptValue qtscript_QStateMachine_toScriptValue(QScriptEngine *engine, QStateMachine* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QStateMachine_fromScriptValue(const QScriptValue &value, QStateMachine* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QStateMachine_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStateMachine*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 12; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStateMachine_prototype_call, qtscript_QStateMachine_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStateMachine_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QStateMachine_toScriptValue, + qtscript_QStateMachine_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStateMachine_static_call, proto, qtscript_QStateMachine_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Error"), + qtscript_create_QStateMachine_Error_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("EventPriority"), + qtscript_create_QStateMachine_EventPriority_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QStateMachine_SignalEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QStateMachine_SignalEvent.cpp new file mode 100644 index 00000000..e0b1505d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QStateMachine_SignalEvent.cpp @@ -0,0 +1,166 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QStateMachine_SignalEvent_function_names[] = { + "QStateMachine_SignalEvent" + // static + // prototype + , "arguments" + , "sender" + , "signalIndex" + , "toString" +}; + +static const char * const qtscript_QStateMachine_SignalEvent_function_signatures[] = { + "QObject sender, int signalIndex, List arguments" + // static + // prototype + , "" + , "" + , "" +"" +}; + +static const int qtscript_QStateMachine_SignalEvent_function_lengths[] = { + 3 + // static + // prototype + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QStateMachine_SignalEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStateMachine_SignalEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStateMachine::SignalEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QStateMachine_SignalEvent +// + +static QScriptValue qtscript_QStateMachine_SignalEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStateMachine::SignalEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStateMachine_SignalEvent.%0(): this object is not a QStateMachine_SignalEvent") + .arg(qtscript_QStateMachine_SignalEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->arguments(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QObject* _q_result = _q_self->sender(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->signalIndex(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: { + QString result = QString::fromLatin1("QStateMachine_SignalEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStateMachine_SignalEvent_throw_ambiguity_error_helper(context, + qtscript_QStateMachine_SignalEvent_function_names[_id+1], + qtscript_QStateMachine_SignalEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStateMachine_SignalEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStateMachine_SignalEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 3) { + QObject* _q_arg0 = context->argument(0).toQObject(); + int _q_arg1 = context->argument(1).toInt32(); + QList _q_arg2; + qScriptValueToSequence(context->argument(2), _q_arg2); + QStateMachine::SignalEvent* _q_cpp_result = new QStateMachine::SignalEvent(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStateMachine_SignalEvent_throw_ambiguity_error_helper(context, + qtscript_QStateMachine_SignalEvent_function_names[_id], + qtscript_QStateMachine_SignalEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStateMachine_SignalEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStateMachine::SignalEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStateMachine_SignalEvent_prototype_call, qtscript_QStateMachine_SignalEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStateMachine_SignalEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStateMachine_SignalEvent_static_call, proto, qtscript_QStateMachine_SignalEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QStateMachine_WrappedEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QStateMachine_WrappedEvent.cpp new file mode 100644 index 00000000..84500ec1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QStateMachine_WrappedEvent.cpp @@ -0,0 +1,153 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QStateMachine_WrappedEvent_function_names[] = { + "QStateMachine_WrappedEvent" + // static + // prototype + , "event" + , "object" + , "toString" +}; + +static const char * const qtscript_QStateMachine_WrappedEvent_function_signatures[] = { + "QObject object, QEvent event" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QStateMachine_WrappedEvent_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QStateMachine_WrappedEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStateMachine_WrappedEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStateMachine::WrappedEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QStateMachine_WrappedEvent +// + +static QScriptValue qtscript_QStateMachine_WrappedEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStateMachine::WrappedEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStateMachine_WrappedEvent.%0(): this object is not a QStateMachine_WrappedEvent") + .arg(qtscript_QStateMachine_WrappedEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QEvent* _q_result = _q_self->event(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QObject* _q_result = _q_self->object(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QStateMachine_WrappedEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStateMachine_WrappedEvent_throw_ambiguity_error_helper(context, + qtscript_QStateMachine_WrappedEvent_function_names[_id+1], + qtscript_QStateMachine_WrappedEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStateMachine_WrappedEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStateMachine_WrappedEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QEvent* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QStateMachine::WrappedEvent* _q_cpp_result = new QStateMachine::WrappedEvent(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStateMachine_WrappedEvent_throw_ambiguity_error_helper(context, + qtscript_QStateMachine_WrappedEvent_function_names[_id], + qtscript_QStateMachine_WrappedEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStateMachine_WrappedEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStateMachine::WrappedEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStateMachine_WrappedEvent_prototype_call, qtscript_QStateMachine_WrappedEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStateMachine_WrappedEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStateMachine_WrappedEvent_static_call, proto, qtscript_QStateMachine_WrappedEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QStringMatcher.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QStringMatcher.cpp new file mode 100644 index 00000000..969103fe --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QStringMatcher.cpp @@ -0,0 +1,208 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QStringMatcher_function_names[] = { + "QStringMatcher" + // static + // prototype + , "caseSensitivity" + , "indexIn" + , "pattern" + , "setCaseSensitivity" + , "setPattern" + , "toString" +}; + +static const char * const qtscript_QStringMatcher_function_signatures[] = { + "\nString pattern, CaseSensitivity cs\nQStringMatcher other" + // static + // prototype + , "" + , "String str, int from" + , "" + , "CaseSensitivity cs" + , "String pattern" +"" +}; + +static const int qtscript_QStringMatcher_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 2 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QStringMatcher_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStringMatcher::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStringMatcher) +Q_DECLARE_METATYPE(QStringMatcher*) +Q_DECLARE_METATYPE(Qt::CaseSensitivity) + +// +// QStringMatcher +// + +static QScriptValue qtscript_QStringMatcher_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStringMatcher* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStringMatcher.%0(): this object is not a QStringMatcher") + .arg(qtscript_QStringMatcher_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + Qt::CaseSensitivity _q_result = _q_self->caseSensitivity(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + int _q_result = _q_self->indexIn(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->indexIn(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->pattern(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + Qt::CaseSensitivity _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCaseSensitivity(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPattern(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: { + QString result = QString::fromLatin1("QStringMatcher"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStringMatcher_throw_ambiguity_error_helper(context, + qtscript_QStringMatcher_function_names[_id+1], + qtscript_QStringMatcher_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStringMatcher_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStringMatcher(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QStringMatcher _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QStringMatcher _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QStringMatcher _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStringMatcher _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + Qt::CaseSensitivity _q_arg1 = qscriptvalue_cast(context->argument(1)); + QStringMatcher _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStringMatcher_throw_ambiguity_error_helper(context, + qtscript_QStringMatcher_function_names[_id], + qtscript_QStringMatcher_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStringMatcher_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStringMatcher*)0)); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStringMatcher_prototype_call, qtscript_QStringMatcher_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStringMatcher_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStringMatcher_static_call, proto, qtscript_QStringMatcher_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSystemSemaphore.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSystemSemaphore.cpp new file mode 100644 index 00000000..31cea4e5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QSystemSemaphore.cpp @@ -0,0 +1,385 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QSystemSemaphore_function_names[] = { + "QSystemSemaphore" + // static + // prototype + , "acquire" + , "error" + , "errorString" + , "key" + , "release" + , "setKey" + , "toString" +}; + +static const char * const qtscript_QSystemSemaphore_function_signatures[] = { + "String key, int initialValue, AccessMode mode" + // static + // prototype + , "" + , "" + , "" + , "" + , "int n" + , "String key, int initialValue, AccessMode mode" +"" +}; + +static const int qtscript_QSystemSemaphore_function_lengths[] = { + 3 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 1 + , 3 + , 0 +}; + +static QScriptValue qtscript_QSystemSemaphore_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSystemSemaphore::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSystemSemaphore*) +Q_DECLARE_METATYPE(QSystemSemaphore::SystemSemaphoreError) +Q_DECLARE_METATYPE(QSystemSemaphore::AccessMode) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QSystemSemaphore::SystemSemaphoreError +// + +static const QSystemSemaphore::SystemSemaphoreError qtscript_QSystemSemaphore_SystemSemaphoreError_values[] = { + QSystemSemaphore::NoError + , QSystemSemaphore::PermissionDenied + , QSystemSemaphore::KeyError + , QSystemSemaphore::AlreadyExists + , QSystemSemaphore::NotFound + , QSystemSemaphore::OutOfResources + , QSystemSemaphore::UnknownError +}; + +static const char * const qtscript_QSystemSemaphore_SystemSemaphoreError_keys[] = { + "NoError" + , "PermissionDenied" + , "KeyError" + , "AlreadyExists" + , "NotFound" + , "OutOfResources" + , "UnknownError" +}; + +static QString qtscript_QSystemSemaphore_SystemSemaphoreError_toStringHelper(QSystemSemaphore::SystemSemaphoreError value) +{ + if ((value >= QSystemSemaphore::NoError) && (value <= QSystemSemaphore::UnknownError)) + return qtscript_QSystemSemaphore_SystemSemaphoreError_keys[static_cast(value)-static_cast(QSystemSemaphore::NoError)]; + return QString(); +} + +static QScriptValue qtscript_QSystemSemaphore_SystemSemaphoreError_toScriptValue(QScriptEngine *engine, const QSystemSemaphore::SystemSemaphoreError &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSystemSemaphore")); + return clazz.property(qtscript_QSystemSemaphore_SystemSemaphoreError_toStringHelper(value)); +} + +static void qtscript_QSystemSemaphore_SystemSemaphoreError_fromScriptValue(const QScriptValue &value, QSystemSemaphore::SystemSemaphoreError &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSystemSemaphore_SystemSemaphoreError(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSystemSemaphore::NoError) && (arg <= QSystemSemaphore::UnknownError)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SystemSemaphoreError(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSystemSemaphore_SystemSemaphoreError_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSystemSemaphore::SystemSemaphoreError value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSystemSemaphore_SystemSemaphoreError_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSystemSemaphore::SystemSemaphoreError value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSystemSemaphore_SystemSemaphoreError_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSystemSemaphore_SystemSemaphoreError_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSystemSemaphore_SystemSemaphoreError, + qtscript_QSystemSemaphore_SystemSemaphoreError_valueOf, qtscript_QSystemSemaphore_SystemSemaphoreError_toString); + qScriptRegisterMetaType(engine, qtscript_QSystemSemaphore_SystemSemaphoreError_toScriptValue, + qtscript_QSystemSemaphore_SystemSemaphoreError_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 7; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSystemSemaphore_SystemSemaphoreError_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSystemSemaphore_SystemSemaphoreError_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSystemSemaphore::AccessMode +// + +static const QSystemSemaphore::AccessMode qtscript_QSystemSemaphore_AccessMode_values[] = { + QSystemSemaphore::Open + , QSystemSemaphore::Create +}; + +static const char * const qtscript_QSystemSemaphore_AccessMode_keys[] = { + "Open" + , "Create" +}; + +static QString qtscript_QSystemSemaphore_AccessMode_toStringHelper(QSystemSemaphore::AccessMode value) +{ + if ((value >= QSystemSemaphore::Open) && (value <= QSystemSemaphore::Create)) + return qtscript_QSystemSemaphore_AccessMode_keys[static_cast(value)-static_cast(QSystemSemaphore::Open)]; + return QString(); +} + +static QScriptValue qtscript_QSystemSemaphore_AccessMode_toScriptValue(QScriptEngine *engine, const QSystemSemaphore::AccessMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSystemSemaphore")); + return clazz.property(qtscript_QSystemSemaphore_AccessMode_toStringHelper(value)); +} + +static void qtscript_QSystemSemaphore_AccessMode_fromScriptValue(const QScriptValue &value, QSystemSemaphore::AccessMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSystemSemaphore_AccessMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSystemSemaphore::Open) && (arg <= QSystemSemaphore::Create)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("AccessMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSystemSemaphore_AccessMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSystemSemaphore::AccessMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSystemSemaphore_AccessMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSystemSemaphore::AccessMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSystemSemaphore_AccessMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSystemSemaphore_AccessMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSystemSemaphore_AccessMode, + qtscript_QSystemSemaphore_AccessMode_valueOf, qtscript_QSystemSemaphore_AccessMode_toString); + qScriptRegisterMetaType(engine, qtscript_QSystemSemaphore_AccessMode_toScriptValue, + qtscript_QSystemSemaphore_AccessMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSystemSemaphore_AccessMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSystemSemaphore_AccessMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSystemSemaphore +// + +static QScriptValue qtscript_QSystemSemaphore_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSystemSemaphore* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSystemSemaphore.%0(): this object is not a QSystemSemaphore") + .arg(qtscript_QSystemSemaphore_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->acquire(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QSystemSemaphore::SystemSemaphoreError _q_result = _q_self->error(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->key(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->release(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->release(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setKey(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setKey(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + QSystemSemaphore::AccessMode _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setKey(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 6: { + QString result = QString::fromLatin1("QSystemSemaphore"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSystemSemaphore_throw_ambiguity_error_helper(context, + qtscript_QSystemSemaphore_function_names[_id+1], + qtscript_QSystemSemaphore_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSystemSemaphore_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSystemSemaphore(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QSystemSemaphore* _q_cpp_result = new QSystemSemaphore(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + QSystemSemaphore* _q_cpp_result = new QSystemSemaphore(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + QSystemSemaphore::AccessMode _q_arg2 = qscriptvalue_cast(context->argument(2)); + QSystemSemaphore* _q_cpp_result = new QSystemSemaphore(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSystemSemaphore_throw_ambiguity_error_helper(context, + qtscript_QSystemSemaphore_function_names[_id], + qtscript_QSystemSemaphore_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSystemSemaphore_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSystemSemaphore*)0)); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSystemSemaphore_prototype_call, qtscript_QSystemSemaphore_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSystemSemaphore_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSystemSemaphore_static_call, proto, qtscript_QSystemSemaphore_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("SystemSemaphoreError"), + qtscript_create_QSystemSemaphore_SystemSemaphoreError_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("AccessMode"), + qtscript_create_QSystemSemaphore_AccessMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTemporaryFile.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTemporaryFile.cpp new file mode 100644 index 00000000..fc29eb69 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTemporaryFile.cpp @@ -0,0 +1,276 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTemporaryFile.h" + +static const char * const qtscript_QTemporaryFile_function_names[] = { + "QTemporaryFile" + // static + , "createLocalFile" + , "createNativeFile" + // prototype + , "autoRemove" + , "fileTemplate" + , "open" + , "setAutoRemove" + , "setFileTemplate" + , "uniqueFilename" + , "toString" +}; + +static const char * const qtscript_QTemporaryFile_function_signatures[] = { + "\nQObject parent\nString templateName\nString templateName, QObject parent" + // static + , "QFile file\nString fileName" + , "QFile file\nString fileName" + // prototype + , "" + , "" + , "" + , "bool b" + , "String name" + , "" +"" +}; + +static const int qtscript_QTemporaryFile_function_lengths[] = { + 2 + // static + , 1 + , 1 + // prototype + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTemporaryFile_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTemporaryFile::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTemporaryFile*) +Q_DECLARE_METATYPE(QtScriptShell_QTemporaryFile*) +Q_DECLARE_METATYPE(QFile*) + +// +// QTemporaryFile +// + +static QScriptValue qtscript_QTemporaryFile_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTemporaryFile* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTemporaryFile.%0(): this object is not a QTemporaryFile") + .arg(qtscript_QTemporaryFile_function_names[_id+3])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->autoRemove(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->fileTemplate(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->open(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setAutoRemove(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setFileTemplate(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->fileName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: { + QString result = QString::fromLatin1("QTemporaryFile"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTemporaryFile_throw_ambiguity_error_helper(context, + qtscript_QTemporaryFile_function_names[_id+3], + qtscript_QTemporaryFile_function_signatures[_id+3]); +} + +static QScriptValue qtscript_QTemporaryFile_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTemporaryFile(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTemporaryFile* _q_cpp_result = new QtScriptShell_QTemporaryFile(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTemporaryFile*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isQObject()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QTemporaryFile* _q_cpp_result = new QtScriptShell_QTemporaryFile(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTemporaryFile*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QTemporaryFile* _q_cpp_result = new QtScriptShell_QTemporaryFile(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTemporaryFile*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QTemporaryFile* _q_cpp_result = new QtScriptShell_QTemporaryFile(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTemporaryFile*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + + QFile & _q_arg0 = *qscriptvalue_cast(context->argument(0)); + QTemporaryFile* _q_result = QTemporaryFile::createLocalFile(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QTemporaryFile* _q_result = QTemporaryFile::createLocalFile(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 2: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + + QFile & _q_arg0 = *qscriptvalue_cast(context->argument(0)); + QTemporaryFile* _q_result = QTemporaryFile::createNativeFile(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QTemporaryFile* _q_result = QTemporaryFile::createNativeFile(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTemporaryFile_throw_ambiguity_error_helper(context, + qtscript_QTemporaryFile_function_names[_id], + qtscript_QTemporaryFile_function_signatures[_id]); +} + +static QScriptValue qtscript_QTemporaryFile_toScriptValue(QScriptEngine *engine, QTemporaryFile* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTemporaryFile_fromScriptValue(const QScriptValue &value, QTemporaryFile* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTemporaryFile_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTemporaryFile*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTemporaryFile_prototype_call, qtscript_QTemporaryFile_function_lengths[i+3]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTemporaryFile_function_names[i+3]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTemporaryFile_toScriptValue, + qtscript_QTemporaryFile_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTemporaryFile_static_call, proto, qtscript_QTemporaryFile_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTemporaryFile_static_call, + qtscript_QTemporaryFile_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QTemporaryFile_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextBoundaryFinder.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextBoundaryFinder.cpp new file mode 100644 index 00000000..006f086e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextBoundaryFinder.cpp @@ -0,0 +1,518 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QTextBoundaryFinder_function_names[] = { + "QTextBoundaryFinder" + // static + // prototype + , "boundaryReasons" + , "isAtBoundary" + , "isValid" + , "position" + , "setPosition" + , "string" + , "toEnd" + , "toNextBoundary" + , "toPreviousBoundary" + , "toStart" + , "type" + , "toString" +}; + +static const char * const qtscript_QTextBoundaryFinder_function_signatures[] = { + "\nBoundaryType type, String string\nQTextBoundaryFinder other" + // static + // prototype + , "" + , "" + , "" + , "" + , "int position" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QTextBoundaryFinder_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextBoundaryFinder_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextBoundaryFinder::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextBoundaryFinder) +Q_DECLARE_METATYPE(QTextBoundaryFinder*) +Q_DECLARE_METATYPE(QTextBoundaryFinder::BoundaryType) +Q_DECLARE_METATYPE(QTextBoundaryFinder::BoundaryReason) +Q_DECLARE_METATYPE(QFlags) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QTextBoundaryFinder::BoundaryType +// + +static const QTextBoundaryFinder::BoundaryType qtscript_QTextBoundaryFinder_BoundaryType_values[] = { + QTextBoundaryFinder::Grapheme + , QTextBoundaryFinder::Word + , QTextBoundaryFinder::Sentence + , QTextBoundaryFinder::Line +}; + +static const char * const qtscript_QTextBoundaryFinder_BoundaryType_keys[] = { + "Grapheme" + , "Word" + , "Sentence" + , "Line" +}; + +static QString qtscript_QTextBoundaryFinder_BoundaryType_toStringHelper(QTextBoundaryFinder::BoundaryType value) +{ + if ((value >= QTextBoundaryFinder::Grapheme) && (value <= QTextBoundaryFinder::Line)) + return qtscript_QTextBoundaryFinder_BoundaryType_keys[static_cast(value)-static_cast(QTextBoundaryFinder::Grapheme)]; + return QString(); +} + +static QScriptValue qtscript_QTextBoundaryFinder_BoundaryType_toScriptValue(QScriptEngine *engine, const QTextBoundaryFinder::BoundaryType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextBoundaryFinder")); + return clazz.property(qtscript_QTextBoundaryFinder_BoundaryType_toStringHelper(value)); +} + +static void qtscript_QTextBoundaryFinder_BoundaryType_fromScriptValue(const QScriptValue &value, QTextBoundaryFinder::BoundaryType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextBoundaryFinder_BoundaryType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextBoundaryFinder::Grapheme) && (arg <= QTextBoundaryFinder::Line)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("BoundaryType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextBoundaryFinder_BoundaryType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextBoundaryFinder::BoundaryType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextBoundaryFinder_BoundaryType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextBoundaryFinder::BoundaryType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextBoundaryFinder_BoundaryType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextBoundaryFinder_BoundaryType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextBoundaryFinder_BoundaryType, + qtscript_QTextBoundaryFinder_BoundaryType_valueOf, qtscript_QTextBoundaryFinder_BoundaryType_toString); + qScriptRegisterMetaType(engine, qtscript_QTextBoundaryFinder_BoundaryType_toScriptValue, + qtscript_QTextBoundaryFinder_BoundaryType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextBoundaryFinder_BoundaryType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextBoundaryFinder_BoundaryType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextBoundaryFinder::BoundaryReason +// + +static const QTextBoundaryFinder::BoundaryReason qtscript_QTextBoundaryFinder_BoundaryReason_values[] = { + QTextBoundaryFinder::NotAtBoundary + , QTextBoundaryFinder::BreakOpportunity + , QTextBoundaryFinder::StartOfItem + , QTextBoundaryFinder::EndOfItem + , QTextBoundaryFinder::MandatoryBreak + , QTextBoundaryFinder::SoftHyphen +}; + +static const char * const qtscript_QTextBoundaryFinder_BoundaryReason_keys[] = { + "NotAtBoundary" + , "BreakOpportunity" + , "StartOfItem" + , "EndOfItem" + , "MandatoryBreak" + , "SoftHyphen" +}; + +static QString qtscript_QTextBoundaryFinder_BoundaryReason_toStringHelper(QTextBoundaryFinder::BoundaryReason value) +{ + for (int i = 0; i < 6; ++i) { + if (qtscript_QTextBoundaryFinder_BoundaryReason_values[i] == value) + return QString::fromLatin1(qtscript_QTextBoundaryFinder_BoundaryReason_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QTextBoundaryFinder_BoundaryReason_toScriptValue(QScriptEngine *engine, const QTextBoundaryFinder::BoundaryReason &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextBoundaryFinder")); + return clazz.property(qtscript_QTextBoundaryFinder_BoundaryReason_toStringHelper(value)); +} + +static void qtscript_QTextBoundaryFinder_BoundaryReason_fromScriptValue(const QScriptValue &value, QTextBoundaryFinder::BoundaryReason &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextBoundaryFinder_BoundaryReason(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 6; ++i) { + if (qtscript_QTextBoundaryFinder_BoundaryReason_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("BoundaryReason(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextBoundaryFinder_BoundaryReason_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextBoundaryFinder::BoundaryReason value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextBoundaryFinder_BoundaryReason_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextBoundaryFinder::BoundaryReason value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextBoundaryFinder_BoundaryReason_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextBoundaryFinder_BoundaryReason_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextBoundaryFinder_BoundaryReason, + qtscript_QTextBoundaryFinder_BoundaryReason_valueOf, qtscript_QTextBoundaryFinder_BoundaryReason_toString); + qScriptRegisterMetaType(engine, qtscript_QTextBoundaryFinder_BoundaryReason_toScriptValue, + qtscript_QTextBoundaryFinder_BoundaryReason_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextBoundaryFinder_BoundaryReason_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextBoundaryFinder_BoundaryReason_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextBoundaryFinder::BoundaryReasons +// + +static QScriptValue qtscript_QTextBoundaryFinder_BoundaryReasons_toScriptValue(QScriptEngine *engine, const QTextBoundaryFinder::BoundaryReasons &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QTextBoundaryFinder_BoundaryReasons_fromScriptValue(const QScriptValue &value, QTextBoundaryFinder::BoundaryReasons &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QTextBoundaryFinder_BoundaryReasons(QScriptContext *context, QScriptEngine *engine) +{ + QTextBoundaryFinder::BoundaryReasons result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("BoundaryReasons(): argument %0 is not of type BoundaryReason").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QTextBoundaryFinder_BoundaryReasons_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextBoundaryFinder::BoundaryReasons value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextBoundaryFinder_BoundaryReasons_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextBoundaryFinder::BoundaryReasons value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 6; ++i) { + if ((value & qtscript_QTextBoundaryFinder_BoundaryReason_values[i]) == qtscript_QTextBoundaryFinder_BoundaryReason_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QTextBoundaryFinder_BoundaryReason_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QTextBoundaryFinder_BoundaryReasons_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QTextBoundaryFinder_BoundaryReasons_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QTextBoundaryFinder_BoundaryReasons, qtscript_QTextBoundaryFinder_BoundaryReasons_valueOf, + qtscript_QTextBoundaryFinder_BoundaryReasons_toString, qtscript_QTextBoundaryFinder_BoundaryReasons_equals); + qScriptRegisterMetaType(engine, qtscript_QTextBoundaryFinder_BoundaryReasons_toScriptValue, + qtscript_QTextBoundaryFinder_BoundaryReasons_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QTextBoundaryFinder +// + +static QScriptValue qtscript_QTextBoundaryFinder_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 11; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextBoundaryFinder* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextBoundaryFinder.%0(): this object is not a QTextBoundaryFinder") + .arg(qtscript_QTextBoundaryFinder_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->boundaryReasons(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isAtBoundary(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->position(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setPosition(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->string(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + _q_self->toEnd(); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->toNextBoundary(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + int _q_result = _q_self->toPreviousBoundary(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + _q_self->toStart(); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QTextBoundaryFinder::BoundaryType _q_result = _q_self->type(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: { + QString result = QString::fromLatin1("QTextBoundaryFinder"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextBoundaryFinder_throw_ambiguity_error_helper(context, + qtscript_QTextBoundaryFinder_function_names[_id+1], + qtscript_QTextBoundaryFinder_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextBoundaryFinder_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextBoundaryFinder(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QTextBoundaryFinder _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QTextBoundaryFinder _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextBoundaryFinder _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QTextBoundaryFinder::BoundaryType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QTextBoundaryFinder _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextBoundaryFinder_throw_ambiguity_error_helper(context, + qtscript_QTextBoundaryFinder_function_names[_id], + qtscript_QTextBoundaryFinder_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextBoundaryFinder_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextBoundaryFinder*)0)); + for (int i = 0; i < 12; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextBoundaryFinder_prototype_call, qtscript_QTextBoundaryFinder_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextBoundaryFinder_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextBoundaryFinder_static_call, proto, qtscript_QTextBoundaryFinder_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("BoundaryType"), + qtscript_create_QTextBoundaryFinder_BoundaryType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("BoundaryReason"), + qtscript_create_QTextBoundaryFinder_BoundaryReason_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("BoundaryReasons"), + qtscript_create_QTextBoundaryFinder_BoundaryReasons_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextCodec.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextCodec.cpp new file mode 100644 index 00000000..857add29 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextCodec.cpp @@ -0,0 +1,529 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextCodec.h" + +static const char * const qtscript_QTextCodec_function_names[] = { + "QTextCodec" + // static + , "availableCodecs" + , "availableMibs" + , "codecForHtml" + , "codecForLocale" + , "codecForMib" + , "codecForName" + , "codecForUtfText" + , "setCodecForLocale" + // prototype + , "aliases" + , "canEncode" + , "fromUnicode" + , "makeDecoder" + , "makeEncoder" + , "mibEnum" + , "name" + , "toUnicode" + , "toString" +}; + +static const char * const qtscript_QTextCodec_function_signatures[] = { + "" + // static + , "" + , "" + , "QByteArray ba\nQByteArray ba, QTextCodec defaultCodec" + , "" + , "int mib" + , "QByteArray name\nchar name" + , "QByteArray ba\nQByteArray ba, QTextCodec defaultCodec" + , "QTextCodec c" + // prototype + , "" + , "char arg__1\nString arg__1" + , "String uc" + , "ConversionFlags flags" + , "ConversionFlags flags" + , "" + , "" + , "QByteArray arg__1" +"" +}; + +static const int qtscript_QTextCodec_function_lengths[] = { + 0 + // static + , 0 + , 0 + , 2 + , 0 + , 1 + , 1 + , 2 + , 1 + // prototype + , 0 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QTextCodec_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextCodec::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextCodec*) +Q_DECLARE_METATYPE(QtScriptShell_QTextCodec*) +Q_DECLARE_METATYPE(QTextCodec::ConversionFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTextDecoder*) +Q_DECLARE_METATYPE(QTextEncoder*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(const char*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QTextCodec::ConversionFlag +// + +static const QTextCodec::ConversionFlag qtscript_QTextCodec_ConversionFlag_values[] = { + QTextCodec::ConvertInvalidToNull + , QTextCodec::DefaultConversion + , QTextCodec::IgnoreHeader + , QTextCodec::FreeFunction +}; + +static const char * const qtscript_QTextCodec_ConversionFlag_keys[] = { + "ConvertInvalidToNull" + , "DefaultConversion" + , "IgnoreHeader" + , "FreeFunction" +}; + +static QString qtscript_QTextCodec_ConversionFlag_toStringHelper(QTextCodec::ConversionFlag value) +{ + for (int i = 0; i < 4; ++i) { + if (qtscript_QTextCodec_ConversionFlag_values[i] == value) + return QString::fromLatin1(qtscript_QTextCodec_ConversionFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QTextCodec_ConversionFlag_toScriptValue(QScriptEngine *engine, const QTextCodec::ConversionFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextCodec")); + return clazz.property(qtscript_QTextCodec_ConversionFlag_toStringHelper(value)); +} + +static void qtscript_QTextCodec_ConversionFlag_fromScriptValue(const QScriptValue &value, QTextCodec::ConversionFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextCodec_ConversionFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 4; ++i) { + if (qtscript_QTextCodec_ConversionFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ConversionFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextCodec_ConversionFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextCodec::ConversionFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextCodec_ConversionFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextCodec::ConversionFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextCodec_ConversionFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextCodec_ConversionFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextCodec_ConversionFlag, + qtscript_QTextCodec_ConversionFlag_valueOf, qtscript_QTextCodec_ConversionFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QTextCodec_ConversionFlag_toScriptValue, + qtscript_QTextCodec_ConversionFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextCodec_ConversionFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextCodec_ConversionFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextCodec::ConversionFlags +// + +static QScriptValue qtscript_QTextCodec_ConversionFlags_toScriptValue(QScriptEngine *engine, const QTextCodec::ConversionFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QTextCodec_ConversionFlags_fromScriptValue(const QScriptValue &value, QTextCodec::ConversionFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QTextCodec_ConversionFlags(QScriptContext *context, QScriptEngine *engine) +{ + QTextCodec::ConversionFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("ConversionFlags(): argument %0 is not of type ConversionFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QTextCodec_ConversionFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextCodec::ConversionFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextCodec_ConversionFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextCodec::ConversionFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 4; ++i) { + if ((value & qtscript_QTextCodec_ConversionFlag_values[i]) == qtscript_QTextCodec_ConversionFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QTextCodec_ConversionFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QTextCodec_ConversionFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QTextCodec_ConversionFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QTextCodec_ConversionFlags, qtscript_QTextCodec_ConversionFlags_valueOf, + qtscript_QTextCodec_ConversionFlags_toString, qtscript_QTextCodec_ConversionFlags_equals); + qScriptRegisterMetaType(engine, qtscript_QTextCodec_ConversionFlags_toScriptValue, + qtscript_QTextCodec_ConversionFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QTextCodec +// + +static QScriptValue qtscript_QTextCodec_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextCodec* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextCodec.%0(): this object is not a QTextCodec") + .arg(qtscript_QTextCodec_function_names[_id+9])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->aliases(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QChar _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->canEncode(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->canEncode(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_result = _q_self->fromUnicode(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QTextDecoder* _q_result = _q_self->makeDecoder(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QTextDecoder* _q_result = _q_self->makeDecoder(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QTextEncoder* _q_result = _q_self->makeEncoder(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QTextEncoder* _q_result = _q_self->makeEncoder(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->mibEnum(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->name(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toUnicode(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: { + QString result = QString::fromLatin1("QTextCodec"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextCodec_throw_ambiguity_error_helper(context, + qtscript_QTextCodec_function_names[_id+9], + qtscript_QTextCodec_function_signatures[_id+9]); +} + +static QScriptValue qtscript_QTextCodec_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextCodec cannot be constructed")); + break; + + case 1: + if (context->argumentCount() == 0) { + QList _q_result = QTextCodec::availableCodecs(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QList _q_result = QTextCodec::availableMibs(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCodec* _q_result = QTextCodec::codecForHtml(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCodec* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTextCodec* _q_result = QTextCodec::codecForHtml(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QTextCodec* _q_result = QTextCodec::codecForLocale(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTextCodec* _q_result = QTextCodec::codecForMib(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCodec* _q_result = QTextCodec::codecForName(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0))) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCodec* _q_result = QTextCodec::codecForName(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 7: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCodec* _q_result = QTextCodec::codecForUtfText(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCodec* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTextCodec* _q_result = QTextCodec::codecForUtfText(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QTextCodec* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCodec::setCodecForLocale(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextCodec_throw_ambiguity_error_helper(context, + qtscript_QTextCodec_function_names[_id], + qtscript_QTextCodec_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextCodec_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextCodec*)0)); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextCodec_prototype_call, qtscript_QTextCodec_function_lengths[i+9]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextCodec_function_names[i+9]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextCodec_static_call, proto, qtscript_QTextCodec_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextCodec_static_call, + qtscript_QTextCodec_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QTextCodec_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("ConversionFlag"), + qtscript_create_QTextCodec_ConversionFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ConversionFlags"), + qtscript_create_QTextCodec_ConversionFlags_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextDecoder.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextDecoder.cpp new file mode 100644 index 00000000..32dc863a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextDecoder.cpp @@ -0,0 +1,159 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QTextDecoder_function_names[] = { + "QTextDecoder" + // static + // prototype + , "hasFailure" + , "toUnicode" + , "toString" +}; + +static const char * const qtscript_QTextDecoder_function_signatures[] = { + "QTextCodec codec\nQTextCodec codec, ConversionFlags flags" + // static + // prototype + , "" + , "QByteArray ba" +"" +}; + +static const int qtscript_QTextDecoder_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QTextDecoder_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextDecoder::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextDecoder*) +Q_DECLARE_METATYPE(const QTextCodec*) +Q_DECLARE_METATYPE(QFlags) + +// +// QTextDecoder +// + +static QScriptValue qtscript_QTextDecoder_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextDecoder* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextDecoder.%0(): this object is not a QTextDecoder") + .arg(qtscript_QTextDecoder_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasFailure(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toUnicode(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QTextDecoder"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextDecoder_throw_ambiguity_error_helper(context, + qtscript_QTextDecoder_function_names[_id+1], + qtscript_QTextDecoder_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextDecoder_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextDecoder(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + const QTextCodec* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextDecoder* _q_cpp_result = new QTextDecoder(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + const QTextCodec* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QTextDecoder* _q_cpp_result = new QTextDecoder(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextDecoder_throw_ambiguity_error_helper(context, + qtscript_QTextDecoder_function_names[_id], + qtscript_QTextDecoder_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextDecoder_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextDecoder*)0)); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextDecoder_prototype_call, qtscript_QTextDecoder_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextDecoder_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextDecoder_static_call, proto, qtscript_QTextDecoder_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextEncoder.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextEncoder.cpp new file mode 100644 index 00000000..d935837d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextEncoder.cpp @@ -0,0 +1,159 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QTextEncoder_function_names[] = { + "QTextEncoder" + // static + // prototype + , "fromUnicode" + , "hasFailure" + , "toString" +}; + +static const char * const qtscript_QTextEncoder_function_signatures[] = { + "QTextCodec codec\nQTextCodec codec, ConversionFlags flags" + // static + // prototype + , "String str" + , "" +"" +}; + +static const int qtscript_QTextEncoder_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextEncoder_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextEncoder::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextEncoder*) +Q_DECLARE_METATYPE(const QTextCodec*) +Q_DECLARE_METATYPE(QFlags) + +// +// QTextEncoder +// + +static QScriptValue qtscript_QTextEncoder_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextEncoder* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextEncoder.%0(): this object is not a QTextEncoder") + .arg(qtscript_QTextEncoder_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_result = _q_self->fromUnicode(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasFailure(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QTextEncoder"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextEncoder_throw_ambiguity_error_helper(context, + qtscript_QTextEncoder_function_names[_id+1], + qtscript_QTextEncoder_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextEncoder_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextEncoder(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + const QTextCodec* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextEncoder* _q_cpp_result = new QTextEncoder(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + const QTextCodec* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QTextEncoder* _q_cpp_result = new QTextEncoder(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextEncoder_throw_ambiguity_error_helper(context, + qtscript_QTextEncoder_function_names[_id], + qtscript_QTextEncoder_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextEncoder_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextEncoder*)0)); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextEncoder_prototype_call, qtscript_QTextEncoder_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextEncoder_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextEncoder_static_call, proto, qtscript_QTextEncoder_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextStream.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextStream.cpp new file mode 100644 index 00000000..8d77c9a4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTextStream.cpp @@ -0,0 +1,1189 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextStream.h" + +static const char * const qtscript_QTextStream_function_names[] = { + "QTextStream" + // static + // prototype + , "atEnd" + , "autoDetectUnicode" + , "codec" + , "device" + , "fieldAlignment" + , "fieldWidth" + , "flush" + , "generateByteOrderMark" + , "integerBase" + , "locale" + , "numberFlags" + , "padChar" + , "pos" + , "read" + , "readAll" + , "readByte" + , "readDouble" + , "readFloat" + , "readInt" + , "readLine" + , "readLineInto" + , "readLongLong" + , "readShort" + , "readUInt" + , "readUShort" + , "realNumberNotation" + , "realNumberPrecision" + , "reset" + , "resetStatus" + , "seek" + , "setAutoDetectUnicode" + , "setCodec" + , "setDevice" + , "setFieldAlignment" + , "setFieldWidth" + , "setGenerateByteOrderMark" + , "setIntegerBase" + , "setLocale" + , "setNumberFlags" + , "setPadChar" + , "setRealNumberNotation" + , "setRealNumberPrecision" + , "setStatus" + , "skipWhiteSpace" + , "status" + , "writeByte" + , "writeByteArray" + , "writeDouble" + , "writeFloat" + , "writeInt" + , "writeShort" + , "writeString" + , "writeStringRef" + , "toString" +}; + +static const char * const qtscript_QTextStream_function_signatures[] = { + "\nQIODevice device\nQByteArray array, OpenMode openMode" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "qint64 maxlen" + , "" + , "" + , "" + , "" + , "" + , "qint64 maxlen" + , "String line, qint64 maxlen" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "qint64 pos" + , "bool enabled" + , "QTextCodec codec\nchar codecName" + , "QIODevice device" + , "FieldAlignment alignment" + , "int width" + , "bool generate" + , "int base" + , "QLocale locale" + , "NumberFlags flags" + , "char ch" + , "RealNumberNotation notation" + , "int precision" + , "Status status" + , "" + , "" + , "char ch" + , "QByteArray array" + , "double f" + , "float f" + , "signed int i" + , "signed short i" + , "String s" + , "String s" +"" +}; + +static const int qtscript_QTextStream_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QTextStream_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextStream::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextStream*) +Q_DECLARE_METATYPE(QtScriptShell_QTextStream*) +Q_DECLARE_METATYPE(QTextStream::RealNumberNotation) +Q_DECLARE_METATYPE(QTextStream::NumberFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTextStream::Status) +Q_DECLARE_METATYPE(QTextStream::FieldAlignment) +Q_DECLARE_METATYPE(QTextCodec*) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QString*) +Q_DECLARE_METATYPE(signed int) +Q_DECLARE_METATYPE(signed short) +Q_DECLARE_METATYPE(QStringRef) +Q_DECLARE_METATYPE(QFlags) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QTextStream::RealNumberNotation +// + +static const QTextStream::RealNumberNotation qtscript_QTextStream_RealNumberNotation_values[] = { + QTextStream::SmartNotation + , QTextStream::FixedNotation + , QTextStream::ScientificNotation +}; + +static const char * const qtscript_QTextStream_RealNumberNotation_keys[] = { + "SmartNotation" + , "FixedNotation" + , "ScientificNotation" +}; + +static QString qtscript_QTextStream_RealNumberNotation_toStringHelper(QTextStream::RealNumberNotation value) +{ + if ((value >= QTextStream::SmartNotation) && (value <= QTextStream::ScientificNotation)) + return qtscript_QTextStream_RealNumberNotation_keys[static_cast(value)-static_cast(QTextStream::SmartNotation)]; + return QString(); +} + +static QScriptValue qtscript_QTextStream_RealNumberNotation_toScriptValue(QScriptEngine *engine, const QTextStream::RealNumberNotation &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextStream")); + return clazz.property(qtscript_QTextStream_RealNumberNotation_toStringHelper(value)); +} + +static void qtscript_QTextStream_RealNumberNotation_fromScriptValue(const QScriptValue &value, QTextStream::RealNumberNotation &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextStream_RealNumberNotation(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextStream::SmartNotation) && (arg <= QTextStream::ScientificNotation)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("RealNumberNotation(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextStream_RealNumberNotation_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextStream::RealNumberNotation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextStream_RealNumberNotation_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextStream::RealNumberNotation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextStream_RealNumberNotation_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextStream_RealNumberNotation_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextStream_RealNumberNotation, + qtscript_QTextStream_RealNumberNotation_valueOf, qtscript_QTextStream_RealNumberNotation_toString); + qScriptRegisterMetaType(engine, qtscript_QTextStream_RealNumberNotation_toScriptValue, + qtscript_QTextStream_RealNumberNotation_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextStream_RealNumberNotation_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextStream_RealNumberNotation_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextStream::NumberFlag +// + +static const QTextStream::NumberFlag qtscript_QTextStream_NumberFlag_values[] = { + QTextStream::ShowBase + , QTextStream::ForcePoint + , QTextStream::ForceSign + , QTextStream::UppercaseBase + , QTextStream::UppercaseDigits +}; + +static const char * const qtscript_QTextStream_NumberFlag_keys[] = { + "ShowBase" + , "ForcePoint" + , "ForceSign" + , "UppercaseBase" + , "UppercaseDigits" +}; + +static QString qtscript_QTextStream_NumberFlag_toStringHelper(QTextStream::NumberFlag value) +{ + for (int i = 0; i < 5; ++i) { + if (qtscript_QTextStream_NumberFlag_values[i] == value) + return QString::fromLatin1(qtscript_QTextStream_NumberFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QTextStream_NumberFlag_toScriptValue(QScriptEngine *engine, const QTextStream::NumberFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextStream")); + return clazz.property(qtscript_QTextStream_NumberFlag_toStringHelper(value)); +} + +static void qtscript_QTextStream_NumberFlag_fromScriptValue(const QScriptValue &value, QTextStream::NumberFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextStream_NumberFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 5; ++i) { + if (qtscript_QTextStream_NumberFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("NumberFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextStream_NumberFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextStream::NumberFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextStream_NumberFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextStream::NumberFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextStream_NumberFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextStream_NumberFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextStream_NumberFlag, + qtscript_QTextStream_NumberFlag_valueOf, qtscript_QTextStream_NumberFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QTextStream_NumberFlag_toScriptValue, + qtscript_QTextStream_NumberFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextStream_NumberFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextStream_NumberFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextStream::NumberFlags +// + +static QScriptValue qtscript_QTextStream_NumberFlags_toScriptValue(QScriptEngine *engine, const QTextStream::NumberFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QTextStream_NumberFlags_fromScriptValue(const QScriptValue &value, QTextStream::NumberFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QTextStream_NumberFlags(QScriptContext *context, QScriptEngine *engine) +{ + QTextStream::NumberFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("NumberFlags(): argument %0 is not of type NumberFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QTextStream_NumberFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextStream::NumberFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextStream_NumberFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextStream::NumberFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 5; ++i) { + if ((value & qtscript_QTextStream_NumberFlag_values[i]) == qtscript_QTextStream_NumberFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QTextStream_NumberFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QTextStream_NumberFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QTextStream_NumberFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QTextStream_NumberFlags, qtscript_QTextStream_NumberFlags_valueOf, + qtscript_QTextStream_NumberFlags_toString, qtscript_QTextStream_NumberFlags_equals); + qScriptRegisterMetaType(engine, qtscript_QTextStream_NumberFlags_toScriptValue, + qtscript_QTextStream_NumberFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QTextStream::Status +// + +static const QTextStream::Status qtscript_QTextStream_Status_values[] = { + QTextStream::Ok + , QTextStream::ReadPastEnd + , QTextStream::ReadCorruptData + , QTextStream::WriteFailed +}; + +static const char * const qtscript_QTextStream_Status_keys[] = { + "Ok" + , "ReadPastEnd" + , "ReadCorruptData" + , "WriteFailed" +}; + +static QString qtscript_QTextStream_Status_toStringHelper(QTextStream::Status value) +{ + if ((value >= QTextStream::Ok) && (value <= QTextStream::WriteFailed)) + return qtscript_QTextStream_Status_keys[static_cast(value)-static_cast(QTextStream::Ok)]; + return QString(); +} + +static QScriptValue qtscript_QTextStream_Status_toScriptValue(QScriptEngine *engine, const QTextStream::Status &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextStream")); + return clazz.property(qtscript_QTextStream_Status_toStringHelper(value)); +} + +static void qtscript_QTextStream_Status_fromScriptValue(const QScriptValue &value, QTextStream::Status &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextStream_Status(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextStream::Ok) && (arg <= QTextStream::WriteFailed)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Status(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextStream_Status_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextStream::Status value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextStream_Status_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextStream::Status value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextStream_Status_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextStream_Status_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextStream_Status, + qtscript_QTextStream_Status_valueOf, qtscript_QTextStream_Status_toString); + qScriptRegisterMetaType(engine, qtscript_QTextStream_Status_toScriptValue, + qtscript_QTextStream_Status_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextStream_Status_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextStream_Status_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextStream::FieldAlignment +// + +static const QTextStream::FieldAlignment qtscript_QTextStream_FieldAlignment_values[] = { + QTextStream::AlignLeft + , QTextStream::AlignRight + , QTextStream::AlignCenter + , QTextStream::AlignAccountingStyle +}; + +static const char * const qtscript_QTextStream_FieldAlignment_keys[] = { + "AlignLeft" + , "AlignRight" + , "AlignCenter" + , "AlignAccountingStyle" +}; + +static QString qtscript_QTextStream_FieldAlignment_toStringHelper(QTextStream::FieldAlignment value) +{ + if ((value >= QTextStream::AlignLeft) && (value <= QTextStream::AlignAccountingStyle)) + return qtscript_QTextStream_FieldAlignment_keys[static_cast(value)-static_cast(QTextStream::AlignLeft)]; + return QString(); +} + +static QScriptValue qtscript_QTextStream_FieldAlignment_toScriptValue(QScriptEngine *engine, const QTextStream::FieldAlignment &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextStream")); + return clazz.property(qtscript_QTextStream_FieldAlignment_toStringHelper(value)); +} + +static void qtscript_QTextStream_FieldAlignment_fromScriptValue(const QScriptValue &value, QTextStream::FieldAlignment &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextStream_FieldAlignment(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextStream::AlignLeft) && (arg <= QTextStream::AlignAccountingStyle)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("FieldAlignment(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextStream_FieldAlignment_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextStream::FieldAlignment value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextStream_FieldAlignment_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextStream::FieldAlignment value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextStream_FieldAlignment_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextStream_FieldAlignment_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextStream_FieldAlignment, + qtscript_QTextStream_FieldAlignment_valueOf, qtscript_QTextStream_FieldAlignment_toString); + qScriptRegisterMetaType(engine, qtscript_QTextStream_FieldAlignment_toScriptValue, + qtscript_QTextStream_FieldAlignment_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextStream_FieldAlignment_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextStream_FieldAlignment_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextStream +// + +static QScriptValue qtscript_QTextStream_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 53; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextStream* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextStream.%0(): this object is not a QTextStream") + .arg(qtscript_QTextStream_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->atEnd(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->autoDetectUnicode(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QTextCodec* _q_result = _q_self->codec(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QIODevice* _q_result = _q_self->device(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QTextStream::FieldAlignment _q_result = _q_self->fieldAlignment(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->fieldWidth(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + _q_self->flush(); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->generateByteOrderMark(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + int _q_result = _q_self->integerBase(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QLocale _q_result = _q_self->locale(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->numberFlags(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QChar _q_result = _q_self->padChar(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->read(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->readAll(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + + char __result; + char & _q_arg0 = __result; + _q_self->operator>>(_q_arg0); + + int _q_convertedResult = __result; + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 16: + if (context->argumentCount() == 0) { + + double __result; + double & _q_arg0 = __result; + _q_self->operator>>(_q_arg0); + + double _q_convertedResult = __result; + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 17: + if (context->argumentCount() == 0) { + + float __result; + float & _q_arg0 = __result; + _q_self->operator>>(_q_arg0); + + float _q_convertedResult = __result; + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 18: + if (context->argumentCount() == 0) { + + int __result; + int & _q_arg0 = __result; + _q_self->operator>>(_q_arg0); + + int _q_convertedResult = __result; + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->readLine(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->readLine(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QString* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->readLineInto(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString* _q_arg0 = qscriptvalue_cast(context->argument(0)); + qint64 _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->readLineInto(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + + qlonglong __result; + qlonglong & _q_arg0 = __result; + _q_self->operator>>(_q_arg0); + + qlonglong _q_convertedResult = __result; + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 22: + if (context->argumentCount() == 0) { + + short __result; + short & _q_arg0 = __result; + _q_self->operator>>(_q_arg0); + + short _q_convertedResult = __result; + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 23: + if (context->argumentCount() == 0) { + + unsigned int __result; + unsigned int & _q_arg0 = __result; + _q_self->operator>>(_q_arg0); + + unsigned int _q_convertedResult = __result; + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 24: + if (context->argumentCount() == 0) { + + unsigned short __result; + unsigned short & _q_arg0 = __result; + _q_self->operator>>(_q_arg0); + + unsigned short _q_convertedResult = __result; + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 25: + if (context->argumentCount() == 0) { + QTextStream::RealNumberNotation _q_result = _q_self->realNumberNotation(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + int _q_result = _q_self->realNumberPrecision(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + _q_self->reset(); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 0) { + _q_self->resetStatus(); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->seek(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setAutoDetectUnicode(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QTextCodec* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCodec(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString()) { + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg0 = context->argument(0).toString().toLatin1(); + const char * _q_arg0 = tmp__q_arg0.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + _q_self->setCodec(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 32: + if (context->argumentCount() == 1) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDevice(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 1) { + QTextStream::FieldAlignment _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFieldAlignment(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setFieldWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setGenerateByteOrderMark(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setIntegerBase(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 1) { + QLocale _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLocale(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setNumberFlags(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 39: + if (context->argumentCount() == 1) { + QChar _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPadChar(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 1) { + QTextStream::RealNumberNotation _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRealNumberNotation(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setRealNumberPrecision(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 42: + if (context->argumentCount() == 1) { + QTextStream::Status _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStatus(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 43: + if (context->argumentCount() == 0) { + _q_self->skipWhiteSpace(); + return context->engine()->undefinedValue(); + } + break; + + case 44: + if (context->argumentCount() == 0) { + QTextStream::Status _q_result = _q_self->status(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 45: + if (context->argumentCount() == 1) { + char _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->operator<<(_q_arg0); + return context->thisObject(); + } + break; + + case 46: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->operator<<(_q_arg0); + return context->thisObject(); + } + break; + + case 47: + if (context->argumentCount() == 1) { + double _q_arg0 = context->argument(0).toNumber(); + _q_self->operator<<(_q_arg0); + return context->thisObject(); + } + break; + + case 48: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->operator<<(_q_arg0); + return context->thisObject(); + } + break; + + case 49: + if (context->argumentCount() == 1) { + signed int _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->operator<<(_q_arg0); + return context->thisObject(); + } + break; + + case 50: + if (context->argumentCount() == 1) { + signed short _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->operator<<(_q_arg0); + return context->thisObject(); + } + break; + + case 51: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->operator<<(_q_arg0); + return context->thisObject(); + } + break; + + case 52: + if (context->argumentCount() == 1) { + QStringRef _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->operator<<(_q_arg0); + return context->thisObject(); + } + break; + + case 53: { + QString result = QString::fromLatin1("QTextStream"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextStream_throw_ambiguity_error_helper(context, + qtscript_QTextStream_function_names[_id+1], + qtscript_QTextStream_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextStream_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextStream(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTextStream* _q_cpp_result = new QtScriptShell_QTextStream(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTextStream*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTextStream* _q_cpp_result = new QtScriptShell_QTextStream(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTextStream*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTextStream* _q_cpp_result = new QtScriptShell_QTextStream(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTextStream*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QTextStream* _q_cpp_result = new QtScriptShell_QTextStream(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTextStream*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextStream_throw_ambiguity_error_helper(context, + qtscript_QTextStream_function_names[_id], + qtscript_QTextStream_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextStream_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextStream*)0)); + for (int i = 0; i < 54; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextStream_prototype_call, qtscript_QTextStream_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextStream_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextStream_static_call, proto, qtscript_QTextStream_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("RealNumberNotation"), + qtscript_create_QTextStream_RealNumberNotation_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("NumberFlag"), + qtscript_create_QTextStream_NumberFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("NumberFlags"), + qtscript_create_QTextStream_NumberFlags_class(engine)); + ctor.setProperty(QString::fromLatin1("Status"), + qtscript_create_QTextStream_Status_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("FieldAlignment"), + qtscript_create_QTextStream_FieldAlignment_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QThreadPool.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QThreadPool.cpp new file mode 100644 index 00000000..b02353a4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QThreadPool.cpp @@ -0,0 +1,257 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QThreadPool.h" + +static const char * const qtscript_QThreadPool_function_names[] = { + "QThreadPool" + // static + , "globalInstance" + // prototype + , "cancel" + , "clear" + , "releaseThread" + , "reserveThread" + , "start" + , "tryStart" + , "waitForDone" + , "toString" +}; + +static const char * const qtscript_QThreadPool_function_signatures[] = { + "QObject parent" + // static + , "" + // prototype + , "QRunnable runnable" + , "" + , "" + , "" + , "QRunnable runnable, int priority" + , "QRunnable runnable" + , "int msecs" +"" +}; + +static const int qtscript_QThreadPool_function_lengths[] = { + 1 + // static + , 0 + // prototype + , 1 + , 0 + , 0 + , 0 + , 2 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QThreadPool_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QThreadPool::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QThreadPool*) +Q_DECLARE_METATYPE(QtScriptShell_QThreadPool*) +Q_DECLARE_METATYPE(QRunnable*) + +// +// QThreadPool +// + +static QScriptValue qtscript_QThreadPool_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 7; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QThreadPool* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QThreadPool.%0(): this object is not a QThreadPool") + .arg(qtscript_QThreadPool_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QRunnable* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->cancel(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->releaseThread(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->reserveThread(); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QRunnable* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->start(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QRunnable* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->start(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QRunnable* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->tryStart(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->waitForDone(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->waitForDone(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: { + QString result = QString::fromLatin1("QThreadPool"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QThreadPool_throw_ambiguity_error_helper(context, + qtscript_QThreadPool_function_names[_id+2], + qtscript_QThreadPool_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QThreadPool_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QThreadPool(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QThreadPool* _q_cpp_result = new QtScriptShell_QThreadPool(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QThreadPool*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QThreadPool* _q_cpp_result = new QtScriptShell_QThreadPool(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QThreadPool*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QThreadPool* _q_result = QThreadPool::globalInstance(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QThreadPool_throw_ambiguity_error_helper(context, + qtscript_QThreadPool_function_names[_id], + qtscript_QThreadPool_function_signatures[_id]); +} + +static QScriptValue qtscript_QThreadPool_toScriptValue(QScriptEngine *engine, QThreadPool* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QThreadPool_fromScriptValue(const QScriptValue &value, QThreadPool* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QThreadPool_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QThreadPool*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QThreadPool_prototype_call, qtscript_QThreadPool_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QThreadPool_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QThreadPool_toScriptValue, + qtscript_QThreadPool_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QThreadPool_static_call, proto, qtscript_QThreadPool_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QThreadPool_static_call, + qtscript_QThreadPool_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QThreadPool_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTime.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTime.cpp new file mode 100644 index 00000000..5ea183dd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTime.cpp @@ -0,0 +1,426 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QTime_function_names[] = { + "QTime" + // static + , "currentTime" + , "fromMSecsSinceStartOfDay" + , "fromString" + , "isValid" + // prototype + , "addMSecs" + , "addSecs" + , "elapsed" + , "hour" + , "isNull" + , "isValid" + , "minute" + , "msec" + , "msecsSinceStartOfDay" + , "msecsTo" + , "equals" + , "operator_less" + , "restart" + , "second" + , "secsTo" + , "setHMS" + , "start" + , "toString" +}; + +static const char * const qtscript_QTime_function_signatures[] = { + "\nint h, int m, int s, int ms" + // static + , "" + , "int msecs" + , "String s, DateFormat f\nString s, String format" + , "int h, int m, int s, int ms" + // prototype + , "int ms" + , "int secs" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QTime arg__1" + , "QTime other" + , "QTime other" + , "" + , "" + , "QTime arg__1" + , "int h, int m, int s, int ms" + , "" + , "DateFormat f\nString format" +}; + +static const int qtscript_QTime_function_lengths[] = { + 4 + // static + , 0 + , 1 + , 2 + , 4 + // prototype + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 0 + , 0 + , 1 + , 4 + , 0 + , 1 +}; + +static QScriptValue qtscript_QTime_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTime::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTime*) +Q_DECLARE_METATYPE(Qt::DateFormat) + +// +// QTime +// + +static QScriptValue qtscript_QTime_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 18; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTime* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTime.%0(): this object is not a QTime") + .arg(qtscript_QTime_function_names[_id+5])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTime _q_result = _q_self->addMSecs(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTime _q_result = _q_self->addSecs(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->elapsed(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->hour(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = _q_self->minute(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->msec(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + int _q_result = _q_self->msecsSinceStartOfDay(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QTime _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->msecsTo(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QTime _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QTime _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator<(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + int _q_result = _q_self->restart(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + int _q_result = _q_self->second(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QTime _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->secsTo(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + bool _q_result = _q_self->setHMS(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + bool _q_result = _q_self->setHMS(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + _q_self->start(); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toString(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::DateFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = _q_self->toString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTime_throw_ambiguity_error_helper(context, + qtscript_QTime_function_names[_id+5], + qtscript_QTime_function_signatures[_id+5]); +} + +static QScriptValue qtscript_QTime_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTime(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QTime _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QTime _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QTime _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QTime _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QTime _q_result = QTime::currentTime(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTime _q_result = QTime::fromMSecsSinceStartOfDay(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QTime _q_result = QTime::fromString(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + Qt::DateFormat _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTime _q_result = QTime::fromString(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QTime _q_result = QTime::fromString(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 4: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + bool _q_result = QTime::isValid(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + bool _q_result = QTime::isValid(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTime_throw_ambiguity_error_helper(context, + qtscript_QTime_function_names[_id], + qtscript_QTime_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTime_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTime*)0)); + for (int i = 0; i < 18; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTime_prototype_call, qtscript_QTime_function_lengths[i+5]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTime_function_names[i+5]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTime_static_call, proto, qtscript_QTime_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTime_static_call, + qtscript_QTime_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QTime_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTimeLine.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTimeLine.cpp new file mode 100644 index 00000000..6207c677 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTimeLine.cpp @@ -0,0 +1,502 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTimeLine.h" + +static const char * const qtscript_QTimeLine_function_names[] = { + "QTimeLine" + // static + // prototype + , "currentFrame" + , "currentValue" + , "endFrame" + , "frameForTime" + , "setEndFrame" + , "setFrameRange" + , "setStartFrame" + , "startFrame" + , "state" + , "valueForTime" + , "toString" +}; + +static const char * const qtscript_QTimeLine_function_signatures[] = { + "int duration, QObject parent" + // static + // prototype + , "" + , "" + , "" + , "int msec" + , "int frame" + , "int startFrame, int endFrame" + , "int frame" + , "" + , "" + , "int msec" +"" +}; + +static const int qtscript_QTimeLine_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 + , 1 + , 1 + , 2 + , 1 + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QTimeLine_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTimeLine::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTimeLine*) +Q_DECLARE_METATYPE(QtScriptShell_QTimeLine*) +Q_DECLARE_METATYPE(QTimeLine::Direction) +Q_DECLARE_METATYPE(QTimeLine::CurveShape) +Q_DECLARE_METATYPE(QTimeLine::State) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTimeLine::Direction +// + +static const QTimeLine::Direction qtscript_QTimeLine_Direction_values[] = { + QTimeLine::Forward + , QTimeLine::Backward +}; + +static const char * const qtscript_QTimeLine_Direction_keys[] = { + "Forward" + , "Backward" +}; + +static QString qtscript_QTimeLine_Direction_toStringHelper(QTimeLine::Direction value) +{ + if ((value >= QTimeLine::Forward) && (value <= QTimeLine::Backward)) + return qtscript_QTimeLine_Direction_keys[static_cast(value)-static_cast(QTimeLine::Forward)]; + return QString(); +} + +static QScriptValue qtscript_QTimeLine_Direction_toScriptValue(QScriptEngine *engine, const QTimeLine::Direction &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTimeLine")); + return clazz.property(qtscript_QTimeLine_Direction_toStringHelper(value)); +} + +static void qtscript_QTimeLine_Direction_fromScriptValue(const QScriptValue &value, QTimeLine::Direction &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTimeLine_Direction(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTimeLine::Forward) && (arg <= QTimeLine::Backward)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Direction(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTimeLine_Direction_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTimeLine::Direction value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTimeLine_Direction_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTimeLine::Direction value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTimeLine_Direction_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTimeLine_Direction_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTimeLine_Direction, + qtscript_QTimeLine_Direction_valueOf, qtscript_QTimeLine_Direction_toString); + qScriptRegisterMetaType(engine, qtscript_QTimeLine_Direction_toScriptValue, + qtscript_QTimeLine_Direction_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTimeLine_Direction_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTimeLine_Direction_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTimeLine::CurveShape +// + +static const QTimeLine::CurveShape qtscript_QTimeLine_CurveShape_values[] = { + QTimeLine::EaseInCurve + , QTimeLine::EaseOutCurve + , QTimeLine::EaseInOutCurve + , QTimeLine::LinearCurve + , QTimeLine::SineCurve + , QTimeLine::CosineCurve +}; + +static const char * const qtscript_QTimeLine_CurveShape_keys[] = { + "EaseInCurve" + , "EaseOutCurve" + , "EaseInOutCurve" + , "LinearCurve" + , "SineCurve" + , "CosineCurve" +}; + +static QString qtscript_QTimeLine_CurveShape_toStringHelper(QTimeLine::CurveShape value) +{ + if ((value >= QTimeLine::EaseInCurve) && (value <= QTimeLine::CosineCurve)) + return qtscript_QTimeLine_CurveShape_keys[static_cast(value)-static_cast(QTimeLine::EaseInCurve)]; + return QString(); +} + +static QScriptValue qtscript_QTimeLine_CurveShape_toScriptValue(QScriptEngine *engine, const QTimeLine::CurveShape &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTimeLine")); + return clazz.property(qtscript_QTimeLine_CurveShape_toStringHelper(value)); +} + +static void qtscript_QTimeLine_CurveShape_fromScriptValue(const QScriptValue &value, QTimeLine::CurveShape &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTimeLine_CurveShape(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTimeLine::EaseInCurve) && (arg <= QTimeLine::CosineCurve)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("CurveShape(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTimeLine_CurveShape_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTimeLine::CurveShape value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTimeLine_CurveShape_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTimeLine::CurveShape value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTimeLine_CurveShape_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTimeLine_CurveShape_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTimeLine_CurveShape, + qtscript_QTimeLine_CurveShape_valueOf, qtscript_QTimeLine_CurveShape_toString); + qScriptRegisterMetaType(engine, qtscript_QTimeLine_CurveShape_toScriptValue, + qtscript_QTimeLine_CurveShape_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTimeLine_CurveShape_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTimeLine_CurveShape_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTimeLine::State +// + +static const QTimeLine::State qtscript_QTimeLine_State_values[] = { + QTimeLine::NotRunning + , QTimeLine::Paused + , QTimeLine::Running +}; + +static const char * const qtscript_QTimeLine_State_keys[] = { + "NotRunning" + , "Paused" + , "Running" +}; + +static QString qtscript_QTimeLine_State_toStringHelper(QTimeLine::State value) +{ + if ((value >= QTimeLine::NotRunning) && (value <= QTimeLine::Running)) + return qtscript_QTimeLine_State_keys[static_cast(value)-static_cast(QTimeLine::NotRunning)]; + return QString(); +} + +static QScriptValue qtscript_QTimeLine_State_toScriptValue(QScriptEngine *engine, const QTimeLine::State &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTimeLine")); + return clazz.property(qtscript_QTimeLine_State_toStringHelper(value)); +} + +static void qtscript_QTimeLine_State_fromScriptValue(const QScriptValue &value, QTimeLine::State &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTimeLine_State(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTimeLine::NotRunning) && (arg <= QTimeLine::Running)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("State(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTimeLine_State_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTimeLine::State value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTimeLine_State_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTimeLine::State value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTimeLine_State_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTimeLine_State_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTimeLine_State, + qtscript_QTimeLine_State_valueOf, qtscript_QTimeLine_State_toString); + qScriptRegisterMetaType(engine, qtscript_QTimeLine_State_toScriptValue, + qtscript_QTimeLine_State_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTimeLine_State_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTimeLine_State_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTimeLine +// + +static QScriptValue qtscript_QTimeLine_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 10; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTimeLine* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTimeLine.%0(): this object is not a QTimeLine") + .arg(qtscript_QTimeLine_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->currentFrame(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->currentValue(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->endFrame(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->frameForTime(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setEndFrame(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setFrameRange(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setStartFrame(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->startFrame(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QTimeLine::State _q_result = _q_self->state(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_result = _q_self->valueForTime(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: { + QString result = QString::fromLatin1("QTimeLine"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTimeLine_throw_ambiguity_error_helper(context, + qtscript_QTimeLine_function_names[_id+1], + qtscript_QTimeLine_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTimeLine_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTimeLine(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTimeLine* _q_cpp_result = new QtScriptShell_QTimeLine(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTimeLine*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QtScriptShell_QTimeLine* _q_cpp_result = new QtScriptShell_QTimeLine(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTimeLine*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QTimeLine* _q_cpp_result = new QtScriptShell_QTimeLine(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTimeLine*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTimeLine_throw_ambiguity_error_helper(context, + qtscript_QTimeLine_function_names[_id], + qtscript_QTimeLine_function_signatures[_id]); +} + +static QScriptValue qtscript_QTimeLine_toScriptValue(QScriptEngine *engine, QTimeLine* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTimeLine_fromScriptValue(const QScriptValue &value, QTimeLine* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTimeLine_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTimeLine*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 11; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTimeLine_prototype_call, qtscript_QTimeLine_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTimeLine_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTimeLine_toScriptValue, + qtscript_QTimeLine_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTimeLine_static_call, proto, qtscript_QTimeLine_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Direction"), + qtscript_create_QTimeLine_Direction_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("CurveShape"), + qtscript_create_QTimeLine_CurveShape_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("State"), + qtscript_create_QTimeLine_State_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTimer.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTimer.cpp new file mode 100644 index 00000000..159fd352 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTimer.cpp @@ -0,0 +1,164 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTimer.h" + +static const char * const qtscript_QTimer_function_names[] = { + "QTimer" + // static + // prototype + , "timerId" + , "toString" +}; + +static const char * const qtscript_QTimer_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" +"" +}; + +static const int qtscript_QTimer_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 +}; + +static QScriptValue qtscript_QTimer_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTimer::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTimer*) +Q_DECLARE_METATYPE(QtScriptShell_QTimer*) + +// +// QTimer +// + +static QScriptValue qtscript_QTimer_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTimer* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTimer.%0(): this object is not a QTimer") + .arg(qtscript_QTimer_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->timerId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("QTimer"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTimer_throw_ambiguity_error_helper(context, + qtscript_QTimer_function_names[_id+1], + qtscript_QTimer_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTimer_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTimer(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTimer* _q_cpp_result = new QtScriptShell_QTimer(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTimer*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QTimer* _q_cpp_result = new QtScriptShell_QTimer(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTimer*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTimer_throw_ambiguity_error_helper(context, + qtscript_QTimer_function_names[_id], + qtscript_QTimer_function_signatures[_id]); +} + +static QScriptValue qtscript_QTimer_toScriptValue(QScriptEngine *engine, QTimer* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTimer_fromScriptValue(const QScriptValue &value, QTimer* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTimer_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTimer*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTimer_prototype_call, qtscript_QTimer_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTimer_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTimer_toScriptValue, + qtscript_QTimer_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTimer_static_call, proto, qtscript_QTimer_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTimerEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTimerEvent.cpp new file mode 100644 index 00000000..85d6979f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTimerEvent.cpp @@ -0,0 +1,145 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +#include "qtscriptshell_QTimerEvent.h" + +static const char * const qtscript_QTimerEvent_function_names[] = { + "QTimerEvent" + // static + // prototype + , "timerId" + , "toString" +}; + +static const char * const qtscript_QTimerEvent_function_signatures[] = { + "int timerId" + // static + // prototype + , "" +"" +}; + +static const int qtscript_QTimerEvent_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 +}; + +static QScriptValue qtscript_QTimerEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTimerEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QtScriptShell_QTimerEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QTimerEvent +// + +static QScriptValue qtscript_QTimerEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTimerEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTimerEvent.%0(): this object is not a QTimerEvent") + .arg(qtscript_QTimerEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->timerId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("QTimerEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTimerEvent_throw_ambiguity_error_helper(context, + qtscript_QTimerEvent_function_names[_id+1], + qtscript_QTimerEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTimerEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTimerEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QtScriptShell_QTimerEvent* _q_cpp_result = new QtScriptShell_QTimerEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTimerEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTimerEvent_throw_ambiguity_error_helper(context, + qtscript_QTimerEvent_function_names[_id], + qtscript_QTimerEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTimerEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTimerEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTimerEvent_prototype_call, qtscript_QTimerEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTimerEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTimerEvent_static_call, proto, qtscript_QTimerEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTranslator.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTranslator.cpp new file mode 100644 index 00000000..d72dd277 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QTranslator.cpp @@ -0,0 +1,257 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTranslator.h" + +static const char * const qtscript_QTranslator_function_names[] = { + "QTranslator" + // static + // prototype + , "isEmpty" + , "load" + , "toString" +}; + +static const char * const qtscript_QTranslator_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" + , "QLocale locale, String filename, String prefix, String directory, String suffix\nString filename, String directory, String search_delimiters, String suffix\nuchar data, int len, String directory" +"" +}; + +static const int qtscript_QTranslator_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 5 + , 0 +}; + +static QScriptValue qtscript_QTranslator_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTranslator::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTranslator*) +Q_DECLARE_METATYPE(QtScriptShell_QTranslator*) +Q_DECLARE_METATYPE(const uchar*) + +// +// QTranslator +// + +static QScriptValue qtscript_QTranslator_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTranslator* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTranslator.%0(): this object is not a QTranslator") + .arg(qtscript_QTranslator_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->load(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QLocale _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = _q_self->load(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = _q_self->load(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + const uchar* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + bool _q_result = _q_self->load(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString() + && context->argument(2).isString()) { + QLocale _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + bool _q_result = _q_self->load(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString() + && context->argument(2).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + bool _q_result = _q_self->load(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber() + && context->argument(2).isString()) { + const uchar* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QString _q_arg2 = context->argument(2).toString(); + bool _q_result = _q_self->load(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 4) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString() + && context->argument(2).isString() + && context->argument(3).isString()) { + QLocale _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + bool _q_result = _q_self->load(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString() + && context->argument(2).isString() + && context->argument(3).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + bool _q_result = _q_self->load(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 5) { + QLocale _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + QString _q_arg4 = context->argument(4).toString(); + bool _q_result = _q_self->load(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QTranslator"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTranslator_throw_ambiguity_error_helper(context, + qtscript_QTranslator_function_names[_id+1], + qtscript_QTranslator_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTranslator_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTranslator(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTranslator* _q_cpp_result = new QtScriptShell_QTranslator(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTranslator*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QTranslator* _q_cpp_result = new QtScriptShell_QTranslator(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTranslator*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTranslator_throw_ambiguity_error_helper(context, + qtscript_QTranslator_function_names[_id], + qtscript_QTranslator_function_signatures[_id]); +} + +static QScriptValue qtscript_QTranslator_toScriptValue(QScriptEngine *engine, QTranslator* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTranslator_fromScriptValue(const QScriptValue &value, QTranslator* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTranslator_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTranslator*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTranslator_prototype_call, qtscript_QTranslator_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTranslator_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTranslator_toScriptValue, + qtscript_QTranslator_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTranslator_static_call, proto, qtscript_QTranslator_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QUrl.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QUrl.cpp new file mode 100644 index 00000000..32498c48 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QUrl.cpp @@ -0,0 +1,729 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QUrl_function_names[] = { + "QUrl" + // static + , "fromAce" + , "fromEncoded" + , "fromLocalFile" + , "fromPercentEncoding" + , "fromStringList" + , "fromUserInput" + , "idnWhitelist" + , "setIdnWhitelist" + , "toAce" + , "toPercentEncoding" + // prototype + , "clear" + , "errorString" + , "hasFragment" + , "hasQuery" + , "isEmpty" + , "isLocalFile" + , "isParentOf" + , "isRelative" + , "isValid" + , "equals" + , "operator_less" + , "port" + , "resolved" + , "scheme" + , "setAuthority" + , "setFragment" + , "setHost" + , "setPassword" + , "setPath" + , "setPort" + , "setQuery" + , "setScheme" + , "setUrl" + , "setUserInfo" + , "setUserName" + , "swap" + , "toLocalFile" + , "toString" +}; + +static const char * const qtscript_QUrl_function_signatures[] = { + "\nString url, ParsingMode mode\nQUrl copy" + // static + , "QByteArray arg__1" + , "QByteArray url, ParsingMode mode" + , "String localfile" + , "QByteArray arg__1" + , "List uris, ParsingMode mode" + , "String userInput" + , "" + , "List arg__1" + , "String arg__1" + , "String arg__1, QByteArray exclude, QByteArray include" + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "QUrl url" + , "" + , "" + , "QUrl url" + , "QUrl url" + , "int defaultPort" + , "QUrl relative" + , "" + , "String authority, ParsingMode mode" + , "String fragment, ParsingMode mode" + , "String host, ParsingMode mode" + , "String password, ParsingMode mode" + , "String path, ParsingMode mode" + , "int port" + , "String query, ParsingMode mode" + , "String scheme" + , "String url, ParsingMode mode" + , "String userInfo, ParsingMode mode" + , "String userName, ParsingMode mode" + , "QUrl other" + , "" +"" +}; + +static const int qtscript_QUrl_function_lengths[] = { + 2 + // static + , 1 + , 2 + , 1 + , 1 + , 2 + , 1 + , 0 + , 1 + , 1 + , 3 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 0 + , 2 + , 2 + , 2 + , 2 + , 2 + , 1 + , 2 + , 1 + , 2 + , 2 + , 2 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QUrl_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QUrl::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QUrl*) +Q_DECLARE_METATYPE(QUrl::ParsingMode) +Q_DECLARE_METATYPE(QList) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QUrl::ParsingMode +// + +static const QUrl::ParsingMode qtscript_QUrl_ParsingMode_values[] = { + QUrl::TolerantMode + , QUrl::StrictMode + , QUrl::DecodedMode +}; + +static const char * const qtscript_QUrl_ParsingMode_keys[] = { + "TolerantMode" + , "StrictMode" + , "DecodedMode" +}; + +static QString qtscript_QUrl_ParsingMode_toStringHelper(QUrl::ParsingMode value) +{ + if ((value >= QUrl::TolerantMode) && (value <= QUrl::DecodedMode)) + return qtscript_QUrl_ParsingMode_keys[static_cast(value)-static_cast(QUrl::TolerantMode)]; + return QString(); +} + +static QScriptValue qtscript_QUrl_ParsingMode_toScriptValue(QScriptEngine *engine, const QUrl::ParsingMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QUrl")); + return clazz.property(qtscript_QUrl_ParsingMode_toStringHelper(value)); +} + +static void qtscript_QUrl_ParsingMode_fromScriptValue(const QScriptValue &value, QUrl::ParsingMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QUrl_ParsingMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QUrl::TolerantMode) && (arg <= QUrl::DecodedMode)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ParsingMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QUrl_ParsingMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QUrl::ParsingMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QUrl_ParsingMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QUrl::ParsingMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QUrl_ParsingMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QUrl_ParsingMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QUrl_ParsingMode, + qtscript_QUrl_ParsingMode_valueOf, qtscript_QUrl_ParsingMode_toString); + qScriptRegisterMetaType(engine, qtscript_QUrl_ParsingMode_toScriptValue, + qtscript_QUrl_ParsingMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QUrl_ParsingMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QUrl_ParsingMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QUrl +// + +static QScriptValue qtscript_QUrl_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 27; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QUrl* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QUrl.%0(): this object is not a QUrl") + .arg(qtscript_QUrl_function_names[_id+11])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasFragment(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasQuery(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isLocalFile(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isParentOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isRelative(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator<(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + int _q_result = _q_self->port(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->port(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + QUrl _q_result = _q_self->resolved(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->scheme(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setAuthority(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QUrl::ParsingMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAuthority(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setFragment(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QUrl::ParsingMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setFragment(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setHost(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QUrl::ParsingMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setHost(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPassword(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QUrl::ParsingMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setPassword(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPath(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QUrl::ParsingMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setPath(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setPort(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setQuery(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QUrl::ParsingMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setQuery(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setScheme(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setUrl(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QUrl::ParsingMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUrl(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setUserInfo(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QUrl::ParsingMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUserInfo(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setUserName(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QUrl::ParsingMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUserName(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toLocalFile(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 27: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QUrl_throw_ambiguity_error_helper(context, + qtscript_QUrl_function_names[_id+11], + qtscript_QUrl_function_signatures[_id+11]); +} + +static QScriptValue qtscript_QUrl_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QUrl(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QUrl _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QUrl _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + QUrl _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QUrl::ParsingMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QUrl _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = QUrl::fromAce(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QUrl _q_result = QUrl::fromEncoded(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QUrl::ParsingMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QUrl _q_result = QUrl::fromEncoded(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QUrl _q_result = QUrl::fromLocalFile(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = QUrl::fromPercentEncoding(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QList _q_result = QUrl::fromStringList(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QUrl::ParsingMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QList _q_result = QUrl::fromStringList(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QUrl _q_result = QUrl::fromUserInput(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QStringList _q_result = QUrl::idnWhitelist(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QUrl::setIdnWhitelist(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_result = QUrl::toAce(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_result = QUrl::toPercentEncoding(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QByteArray _q_result = QUrl::toPercentEncoding(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QByteArray _q_arg2 = qscriptvalue_cast(context->argument(2)); + QByteArray _q_result = QUrl::toPercentEncoding(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QUrl_throw_ambiguity_error_helper(context, + qtscript_QUrl_function_names[_id], + qtscript_QUrl_function_signatures[_id]); +} + +QScriptValue qtscript_create_QUrl_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QUrl*)0)); + for (int i = 0; i < 28; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QUrl_prototype_call, qtscript_QUrl_function_lengths[i+11]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QUrl_function_names[i+11]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QUrl_static_call, proto, qtscript_QUrl_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 10; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QUrl_static_call, + qtscript_QUrl_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QUrl_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("ParsingMode"), + qtscript_create_QUrl_ParsingMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QUuid.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QUuid.cpp new file mode 100644 index 00000000..15919d15 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QUuid.cpp @@ -0,0 +1,485 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QUuid.h" + +static const char * const qtscript_QUuid_function_names[] = { + "QUuid" + // static + , "createUuid" + , "createUuidV3" + , "createUuidV5" + , "fromRfc4122" + // prototype + , "isNull" + , "equals" + , "operator_less" + , "toByteArray" + , "toRfc4122" + , "toString" + , "variant" + , "version" +}; + +static const char * const qtscript_QUuid_function_signatures[] = { + "\nQByteArray arg__1\nString arg__1\nuint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8" + // static + , "" + , "QUuid ns, QByteArray baseData\nQUuid ns, String baseData" + , "QUuid ns, QByteArray baseData\nQUuid ns, String baseData" + , "QByteArray arg__1" + // prototype + , "" + , "QUuid orig" + , "QUuid other" + , "" + , "" + , "" + , "" + , "" +}; + +static const int qtscript_QUuid_function_lengths[] = { + 11 + // static + , 0 + , 2 + , 2 + , 1 + // prototype + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QUuid_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QUuid::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QUuid*) +Q_DECLARE_METATYPE(QtScriptShell_QUuid) +Q_DECLARE_METATYPE(QtScriptShell_QUuid*) +Q_DECLARE_METATYPE(QUuid::Version) +Q_DECLARE_METATYPE(QUuid::Variant) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QUuid::Version +// + +static const QUuid::Version qtscript_QUuid_Version_values[] = { + QUuid::VerUnknown + , QUuid::Time + , QUuid::EmbeddedPOSIX + , QUuid::Md5 + , QUuid::Random + , QUuid::Sha1 +}; + +static const char * const qtscript_QUuid_Version_keys[] = { + "VerUnknown" + , "Time" + , "EmbeddedPOSIX" + , "Md5" + , "Random" + , "Sha1" +}; + +static QString qtscript_QUuid_Version_toStringHelper(QUuid::Version value) +{ + for (int i = 0; i < 6; ++i) { + if (qtscript_QUuid_Version_values[i] == value) + return QString::fromLatin1(qtscript_QUuid_Version_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QUuid_Version_toScriptValue(QScriptEngine *engine, const QUuid::Version &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QUuid")); + return clazz.property(qtscript_QUuid_Version_toStringHelper(value)); +} + +static void qtscript_QUuid_Version_fromScriptValue(const QScriptValue &value, QUuid::Version &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QUuid_Version(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 6; ++i) { + if (qtscript_QUuid_Version_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Version(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QUuid_Version_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QUuid::Version value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QUuid_Version_toString(QScriptContext *context, QScriptEngine *engine) +{ + QUuid::Version value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QUuid_Version_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QUuid_Version_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QUuid_Version, + qtscript_QUuid_Version_valueOf, qtscript_QUuid_Version_toString); + qScriptRegisterMetaType(engine, qtscript_QUuid_Version_toScriptValue, + qtscript_QUuid_Version_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QUuid_Version_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QUuid_Version_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QUuid::Variant +// + +static const QUuid::Variant qtscript_QUuid_Variant_values[] = { + QUuid::VarUnknown + , QUuid::NCS + , QUuid::DCE + , QUuid::Microsoft + , QUuid::Reserved +}; + +static const char * const qtscript_QUuid_Variant_keys[] = { + "VarUnknown" + , "NCS" + , "DCE" + , "Microsoft" + , "Reserved" +}; + +static QString qtscript_QUuid_Variant_toStringHelper(QUuid::Variant value) +{ + for (int i = 0; i < 5; ++i) { + if (qtscript_QUuid_Variant_values[i] == value) + return QString::fromLatin1(qtscript_QUuid_Variant_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QUuid_Variant_toScriptValue(QScriptEngine *engine, const QUuid::Variant &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QUuid")); + return clazz.property(qtscript_QUuid_Variant_toStringHelper(value)); +} + +static void qtscript_QUuid_Variant_fromScriptValue(const QScriptValue &value, QUuid::Variant &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QUuid_Variant(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 5; ++i) { + if (qtscript_QUuid_Variant_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Variant(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QUuid_Variant_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QUuid::Variant value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QUuid_Variant_toString(QScriptContext *context, QScriptEngine *engine) +{ + QUuid::Variant value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QUuid_Variant_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QUuid_Variant_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QUuid_Variant, + qtscript_QUuid_Variant_valueOf, qtscript_QUuid_Variant_toString); + qScriptRegisterMetaType(engine, qtscript_QUuid_Variant_toScriptValue, + qtscript_QUuid_Variant_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QUuid_Variant_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QUuid_Variant_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QUuid +// + +static QScriptValue qtscript_QUuid_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QUuid* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QUuid.%0(): this object is not a QUuid") + .arg(qtscript_QUuid_function_names[_id+5])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QUuid _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QUuid _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator<(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->toByteArray(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->toRfc4122(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QUuid::Variant _q_result = _q_self->variant(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QUuid::Version _q_result = _q_self->version(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QUuid_throw_ambiguity_error_helper(context, + qtscript_QUuid_function_names[_id+5], + qtscript_QUuid_function_signatures[_id+5]); +} + +static QScriptValue qtscript_QUuid_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QUuid(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QUuid _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QUuid)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QUuid _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QUuid)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QUuid _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QUuid)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 11) { + uint _q_arg0 = context->argument(0).toUInt32(); + ushort _q_arg1 = qscriptvalue_cast(context->argument(1)); + ushort _q_arg2 = qscriptvalue_cast(context->argument(2)); + uchar _q_arg3 = qscriptvalue_cast(context->argument(3)); + uchar _q_arg4 = qscriptvalue_cast(context->argument(4)); + uchar _q_arg5 = qscriptvalue_cast(context->argument(5)); + uchar _q_arg6 = qscriptvalue_cast(context->argument(6)); + uchar _q_arg7 = qscriptvalue_cast(context->argument(7)); + uchar _q_arg8 = qscriptvalue_cast(context->argument(8)); + uchar _q_arg9 = qscriptvalue_cast(context->argument(9)); + uchar _q_arg10 = qscriptvalue_cast(context->argument(10)); + QtScriptShell_QUuid _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7, _q_arg8, _q_arg9, _q_arg10); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QUuid)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QUuid _q_result = QUuid::createUuid(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QUuid _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QUuid _q_result = QUuid::createUuidV3(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QUuid _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QUuid _q_result = QUuid::createUuidV3(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 3: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QUuid _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QUuid _q_result = QUuid::createUuidV5(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QUuid _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QUuid _q_result = QUuid::createUuidV5(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 4: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QUuid _q_result = QUuid::fromRfc4122(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QUuid_throw_ambiguity_error_helper(context, + qtscript_QUuid_function_names[_id], + qtscript_QUuid_function_signatures[_id]); +} + +QScriptValue qtscript_create_QUuid_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QUuid*)0)); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QUuid_prototype_call, qtscript_QUuid_function_lengths[i+5]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QUuid_function_names[i+5]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QUuid_static_call, proto, qtscript_QUuid_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QUuid_static_call, + qtscript_QUuid_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QUuid_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("Version"), + qtscript_create_QUuid_Version_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Variant"), + qtscript_create_QUuid_Variant_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QVariantAnimation.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QVariantAnimation.cpp new file mode 100644 index 00000000..cdcab5b7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QVariantAnimation.cpp @@ -0,0 +1,180 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QVariantAnimation.h" + +static const char * const qtscript_QVariantAnimation_function_names[] = { + "QVariantAnimation" + // static + // prototype + , "keyValueAt" + , "setKeyValueAt" + , "toString" +}; + +static const char * const qtscript_QVariantAnimation_function_signatures[] = { + "QObject parent" + // static + // prototype + , "qreal step" + , "qreal step, Object value" +"" +}; + +static const int qtscript_QVariantAnimation_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QVariantAnimation_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QVariantAnimation::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QVariantAnimation*) +Q_DECLARE_METATYPE(QtScriptShell_QVariantAnimation*) +Q_DECLARE_METATYPE(QAbstractAnimation*) + +// +// QVariantAnimation +// + +static QScriptValue qtscript_QVariantAnimation_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QVariantAnimation* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QVariantAnimation.%0(): this object is not a QVariantAnimation") + .arg(qtscript_QVariantAnimation_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_result = _q_self->keyValueAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setKeyValueAt(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 2: { + QString result = QString::fromLatin1("QVariantAnimation"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QVariantAnimation_throw_ambiguity_error_helper(context, + qtscript_QVariantAnimation_function_names[_id+1], + qtscript_QVariantAnimation_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QVariantAnimation_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QVariantAnimation(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QVariantAnimation* _q_cpp_result = new QtScriptShell_QVariantAnimation(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QVariantAnimation*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QVariantAnimation* _q_cpp_result = new QtScriptShell_QVariantAnimation(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QVariantAnimation*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QVariantAnimation_throw_ambiguity_error_helper(context, + qtscript_QVariantAnimation_function_names[_id], + qtscript_QVariantAnimation_function_signatures[_id]); +} + +static QScriptValue qtscript_QVariantAnimation_toScriptValue(QScriptEngine *engine, QVariantAnimation* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QVariantAnimation_fromScriptValue(const QScriptValue &value, QVariantAnimation* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QVariantAnimation_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QVariantAnimation*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QVariantAnimation_prototype_call, qtscript_QVariantAnimation_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QVariantAnimation_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QVariantAnimation_toScriptValue, + qtscript_QVariantAnimation_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QVariantAnimation_static_call, proto, qtscript_QVariantAnimation_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QWaitCondition.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QWaitCondition.cpp new file mode 100644 index 00000000..6db21ad4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QWaitCondition.cpp @@ -0,0 +1,184 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QWaitCondition_function_names[] = { + "QWaitCondition" + // static + // prototype + , "wait" + , "wakeAll" + , "wakeOne" + , "toString" +}; + +static const char * const qtscript_QWaitCondition_function_signatures[] = { + "" + // static + // prototype + , "QMutex lockedMutex, unsigned long time\nQReadWriteLock lockedReadWriteLock, unsigned long time" + , "" + , "" +"" +}; + +static const int qtscript_QWaitCondition_function_lengths[] = { + 0 + // static + // prototype + , 2 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QWaitCondition_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QWaitCondition::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QWaitCondition*) +Q_DECLARE_METATYPE(QMutex*) +Q_DECLARE_METATYPE(QReadWriteLock*) + +// +// QWaitCondition +// + +static QScriptValue qtscript_QWaitCondition_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QWaitCondition* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QWaitCondition.%0(): this object is not a QWaitCondition") + .arg(qtscript_QWaitCondition_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QMutex* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->wait(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0))) { + QReadWriteLock* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->wait(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QMutex* _q_arg0 = qscriptvalue_cast(context->argument(0)); + ulong _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->wait(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QReadWriteLock* _q_arg0 = qscriptvalue_cast(context->argument(0)); + ulong _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->wait(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->wakeAll(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->wakeOne(); + return context->engine()->undefinedValue(); + } + break; + + case 3: { + QString result = QString::fromLatin1("QWaitCondition"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QWaitCondition_throw_ambiguity_error_helper(context, + qtscript_QWaitCondition_function_names[_id+1], + qtscript_QWaitCondition_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QWaitCondition_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QWaitCondition(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QWaitCondition* _q_cpp_result = new QWaitCondition(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QWaitCondition_throw_ambiguity_error_helper(context, + qtscript_QWaitCondition_function_names[_id], + qtscript_QWaitCondition_function_signatures[_id]); +} + +QScriptValue qtscript_create_QWaitCondition_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QWaitCondition*)0)); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QWaitCondition_prototype_call, qtscript_QWaitCondition_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QWaitCondition_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QWaitCondition_static_call, proto, qtscript_QWaitCondition_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamAttribute.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamAttribute.cpp new file mode 100644 index 00000000..b579b063 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamAttribute.cpp @@ -0,0 +1,240 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QXmlStreamAttribute_function_names[] = { + "QXmlStreamAttribute" + // static + // prototype + , "isDefault" + , "name" + , "namespaceUri" + , "equals" + , "prefix" + , "qualifiedName" + , "value" + , "toString" +}; + +static const char * const qtscript_QXmlStreamAttribute_function_signatures[] = { + "\nString namespaceUri, String name, String value\nString qualifiedName, String value\nQXmlStreamAttribute arg__1" + // static + // prototype + , "" + , "" + , "" + , "QXmlStreamAttribute other" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QXmlStreamAttribute_function_lengths[] = { + 3 + // static + // prototype + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QXmlStreamAttribute_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlStreamAttribute::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlStreamAttribute) +Q_DECLARE_METATYPE(QXmlStreamAttribute*) +Q_DECLARE_METATYPE(QStringRef) + +// +// QXmlStreamAttribute +// + +static QScriptValue qtscript_QXmlStreamAttribute_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 7; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlStreamAttribute* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlStreamAttribute.%0(): this object is not a QXmlStreamAttribute") + .arg(qtscript_QXmlStreamAttribute_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isDefault(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->name(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->namespaceUri(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QXmlStreamAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->prefix(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->qualifiedName(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->value(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 7: { + QString result = QString::fromLatin1("QXmlStreamAttribute"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlStreamAttribute_throw_ambiguity_error_helper(context, + qtscript_QXmlStreamAttribute_function_names[_id+1], + qtscript_QXmlStreamAttribute_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlStreamAttribute_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlStreamAttribute(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QXmlStreamAttribute _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QXmlStreamAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + QXmlStreamAttribute _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QXmlStreamAttribute _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QXmlStreamAttribute _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlStreamAttribute_throw_ambiguity_error_helper(context, + qtscript_QXmlStreamAttribute_function_names[_id], + qtscript_QXmlStreamAttribute_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlStreamAttribute_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlStreamAttribute*)0)); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlStreamAttribute_prototype_call, qtscript_QXmlStreamAttribute_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlStreamAttribute_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlStreamAttribute_static_call, proto, qtscript_QXmlStreamAttribute_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamAttributes.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamAttributes.cpp new file mode 100644 index 00000000..cd4d43c5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamAttributes.cpp @@ -0,0 +1,668 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QXmlStreamAttributes_function_names[] = { + "QXmlStreamAttributes" + // static + , "fromList" + // prototype + , "append" + , "at" + , "capacity" + , "clear" + , "constFirst" + , "constLast" + , "contains" + , "count" + , "empty" + , "endsWith" + , "fill" + , "first" + , "hasAttribute" + , "indexOf" + , "isEmpty" + , "isSharedWith" + , "last" + , "lastIndexOf" + , "length" + , "mid" + , "move" + , "equals" + , "prepend" + , "remove" + , "removeAll" + , "removeAt" + , "removeFirst" + , "removeLast" + , "removeOne" + , "replace" + , "reserve" + , "resize" + , "setSharable" + , "size" + , "squeeze" + , "startsWith" + , "swap" + , "takeAt" + , "takeFirst" + , "takeLast" + , "toList" + , "value" + , "toString" +}; + +static const char * const qtscript_QXmlStreamAttributes_function_signatures[] = { + "" + // static + , "List list" + // prototype + , "String namespaceUri, String name, String value\nString qualifiedName, String value" + , "int i" + , "" + , "" + , "" + , "" + , "QXmlStreamAttribute t" + , "\nQXmlStreamAttribute t" + , "" + , "QXmlStreamAttribute t" + , "QXmlStreamAttribute t, int size" + , "" + , "String namespaceUri, String name\nString qualifiedName" + , "QXmlStreamAttribute t, int from" + , "" + , "List other" + , "" + , "QXmlStreamAttribute t, int from" + , "" + , "int pos, int len" + , "int from, int to" + , "List v" + , "QXmlStreamAttribute t" + , "int i\nint i, int n" + , "QXmlStreamAttribute t" + , "int i" + , "" + , "" + , "QXmlStreamAttribute t" + , "int i, QXmlStreamAttribute t" + , "int size" + , "int size" + , "bool sharable" + , "" + , "" + , "QXmlStreamAttribute t" + , "List other" + , "int i" + , "" + , "" + , "" + , "String namespaceUri, String name\nString qualifiedName" +"" +}; + +static const int qtscript_QXmlStreamAttributes_function_lengths[] = { + 0 + // static + , 1 + // prototype + , 3 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 1 + , 2 + , 0 + , 2 + , 2 + , 0 + , 1 + , 0 + , 2 + , 0 + , 2 + , 2 + , 1 + , 1 + , 2 + , 1 + , 1 + , 0 + , 0 + , 1 + , 2 + , 1 + , 1 + , 1 + , 0 + , 0 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 2 + , 0 +}; + +static QScriptValue qtscript_QXmlStreamAttributes_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlStreamAttributes::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlStreamAttributes) +Q_DECLARE_METATYPE(QXmlStreamAttributes*) +Q_DECLARE_METATYPE(QXmlStreamAttribute) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QStringRef) + +// +// QXmlStreamAttributes +// + +static QScriptValue qtscript_QXmlStreamAttributes_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 42; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlStreamAttributes* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlStreamAttributes.%0(): this object is not a QXmlStreamAttributes") + .arg(qtscript_QXmlStreamAttributes_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->append(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + _q_self->append(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + const QXmlStreamAttribute& _q_result = _q_self->at(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->capacity(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + const QXmlStreamAttribute& _q_result = _q_self->constFirst(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + const QXmlStreamAttribute& _q_result = _q_self->constLast(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QXmlStreamAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QXmlStreamAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->count(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->empty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QXmlStreamAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->endsWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QXmlStreamAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector& _q_result = _q_self->fill(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QXmlStreamAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QVector& _q_result = _q_self->fill(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + const QXmlStreamAttribute& _q_result = _q_self->first(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->hasAttribute(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = _q_self->hasAttribute(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QXmlStreamAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->indexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QXmlStreamAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->indexOf(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + bool _q_result = _q_self->isSharedWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + const QXmlStreamAttribute& _q_result = _q_self->last(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QXmlStreamAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->lastIndexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QXmlStreamAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->lastIndexOf(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + int _q_result = _q_self->length(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QVector _q_result = _q_self->mid(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QVector _q_result = _q_self->mid(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->move(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QXmlStreamAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->prepend(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->remove(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->remove(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QXmlStreamAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->removeAll(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->removeAt(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 0) { + _q_self->removeFirst(); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 0) { + _q_self->removeLast(); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + QXmlStreamAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->removeOne(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QXmlStreamAttribute _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->replace(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->reserve(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->resize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setSharable(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 0) { + int _q_result = _q_self->size(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 34: + if (context->argumentCount() == 0) { + _q_self->squeeze(); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + QXmlStreamAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->startsWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 36: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QXmlStreamAttribute _q_result = _q_self->takeAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 38: + if (context->argumentCount() == 0) { + QXmlStreamAttribute _q_result = _q_self->takeFirst(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 0) { + QXmlStreamAttribute _q_result = _q_self->takeLast(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 40: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->toList(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 41: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QStringRef _q_result = _q_self->value(_q_arg0); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QStringRef _q_result = _q_self->value(_q_arg0, _q_arg1); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 42: { + QString result = QString::fromLatin1("QXmlStreamAttributes"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlStreamAttributes_throw_ambiguity_error_helper(context, + qtscript_QXmlStreamAttributes_function_names[_id+2], + qtscript_QXmlStreamAttributes_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QXmlStreamAttributes_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlStreamAttributes(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QXmlStreamAttributes _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QVector _q_result = QXmlStreamAttributes::fromList(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlStreamAttributes_throw_ambiguity_error_helper(context, + qtscript_QXmlStreamAttributes_function_names[_id], + qtscript_QXmlStreamAttributes_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlStreamAttributes_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlStreamAttributes*)0)); + for (int i = 0; i < 43; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlStreamAttributes_prototype_call, qtscript_QXmlStreamAttributes_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlStreamAttributes_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlStreamAttributes_static_call, proto, qtscript_QXmlStreamAttributes_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlStreamAttributes_static_call, + qtscript_QXmlStreamAttributes_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QXmlStreamAttributes_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamEntityDeclaration.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamEntityDeclaration.cpp new file mode 100644 index 00000000..34529759 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamEntityDeclaration.cpp @@ -0,0 +1,217 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QXmlStreamEntityDeclaration_function_names[] = { + "QXmlStreamEntityDeclaration" + // static + // prototype + , "name" + , "notationName" + , "equals" + , "publicId" + , "systemId" + , "value" + , "toString" +}; + +static const char * const qtscript_QXmlStreamEntityDeclaration_function_signatures[] = { + "\nQXmlStreamEntityDeclaration arg__1" + // static + // prototype + , "" + , "" + , "QXmlStreamEntityDeclaration other" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QXmlStreamEntityDeclaration_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QXmlStreamEntityDeclaration_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlStreamEntityDeclaration::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlStreamEntityDeclaration) +Q_DECLARE_METATYPE(QXmlStreamEntityDeclaration*) +Q_DECLARE_METATYPE(QStringRef) + +// +// QXmlStreamEntityDeclaration +// + +static QScriptValue qtscript_QXmlStreamEntityDeclaration_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlStreamEntityDeclaration* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlStreamEntityDeclaration.%0(): this object is not a QXmlStreamEntityDeclaration") + .arg(qtscript_QXmlStreamEntityDeclaration_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->name(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->notationName(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QXmlStreamEntityDeclaration _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->publicId(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->systemId(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->value(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 6: { + QString result = QString::fromLatin1("QXmlStreamEntityDeclaration"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlStreamEntityDeclaration_throw_ambiguity_error_helper(context, + qtscript_QXmlStreamEntityDeclaration_function_names[_id+1], + qtscript_QXmlStreamEntityDeclaration_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlStreamEntityDeclaration_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlStreamEntityDeclaration(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QXmlStreamEntityDeclaration _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QXmlStreamEntityDeclaration _q_arg0 = qscriptvalue_cast(context->argument(0)); + QXmlStreamEntityDeclaration _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlStreamEntityDeclaration_throw_ambiguity_error_helper(context, + qtscript_QXmlStreamEntityDeclaration_function_names[_id], + qtscript_QXmlStreamEntityDeclaration_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlStreamEntityDeclaration_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlStreamEntityDeclaration*)0)); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlStreamEntityDeclaration_prototype_call, qtscript_QXmlStreamEntityDeclaration_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlStreamEntityDeclaration_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlStreamEntityDeclaration_static_call, proto, qtscript_QXmlStreamEntityDeclaration_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamEntityResolver.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamEntityResolver.cpp new file mode 100644 index 00000000..91438dff --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamEntityResolver.cpp @@ -0,0 +1,154 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QXmlStreamEntityResolver.h" + +static const char * const qtscript_QXmlStreamEntityResolver_function_names[] = { + "QXmlStreamEntityResolver" + // static + // prototype + , "resolveEntity" + , "resolveUndeclaredEntity" + , "toString" +}; + +static const char * const qtscript_QXmlStreamEntityResolver_function_signatures[] = { + "" + // static + // prototype + , "String publicId, String systemId" + , "String name" +"" +}; + +static const int qtscript_QXmlStreamEntityResolver_function_lengths[] = { + 0 + // static + // prototype + , 2 + , 1 + , 0 +}; + +static QScriptValue qtscript_QXmlStreamEntityResolver_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlStreamEntityResolver::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlStreamEntityResolver*) +Q_DECLARE_METATYPE(QtScriptShell_QXmlStreamEntityResolver*) + +// +// QXmlStreamEntityResolver +// + +static QScriptValue qtscript_QXmlStreamEntityResolver_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlStreamEntityResolver* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlStreamEntityResolver.%0(): this object is not a QXmlStreamEntityResolver") + .arg(qtscript_QXmlStreamEntityResolver_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->resolveEntity(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = _q_self->resolveUndeclaredEntity(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QXmlStreamEntityResolver"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlStreamEntityResolver_throw_ambiguity_error_helper(context, + qtscript_QXmlStreamEntityResolver_function_names[_id+1], + qtscript_QXmlStreamEntityResolver_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlStreamEntityResolver_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlStreamEntityResolver(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QXmlStreamEntityResolver* _q_cpp_result = new QtScriptShell_QXmlStreamEntityResolver(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QXmlStreamEntityResolver*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlStreamEntityResolver_throw_ambiguity_error_helper(context, + qtscript_QXmlStreamEntityResolver_function_names[_id], + qtscript_QXmlStreamEntityResolver_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlStreamEntityResolver_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlStreamEntityResolver*)0)); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlStreamEntityResolver_prototype_call, qtscript_QXmlStreamEntityResolver_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlStreamEntityResolver_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlStreamEntityResolver_static_call, proto, qtscript_QXmlStreamEntityResolver_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamNamespaceDeclaration.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamNamespaceDeclaration.cpp new file mode 100644 index 00000000..22e74ff8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamNamespaceDeclaration.cpp @@ -0,0 +1,181 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QXmlStreamNamespaceDeclaration_function_names[] = { + "QXmlStreamNamespaceDeclaration" + // static + // prototype + , "namespaceUri" + , "equals" + , "prefix" + , "toString" +}; + +static const char * const qtscript_QXmlStreamNamespaceDeclaration_function_signatures[] = { + "\nString prefix, String namespaceUri\nQXmlStreamNamespaceDeclaration arg__1" + // static + // prototype + , "" + , "QXmlStreamNamespaceDeclaration other" + , "" +"" +}; + +static const int qtscript_QXmlStreamNamespaceDeclaration_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QXmlStreamNamespaceDeclaration_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlStreamNamespaceDeclaration::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlStreamNamespaceDeclaration) +Q_DECLARE_METATYPE(QXmlStreamNamespaceDeclaration*) +Q_DECLARE_METATYPE(QStringRef) + +// +// QXmlStreamNamespaceDeclaration +// + +static QScriptValue qtscript_QXmlStreamNamespaceDeclaration_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlStreamNamespaceDeclaration* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlStreamNamespaceDeclaration.%0(): this object is not a QXmlStreamNamespaceDeclaration") + .arg(qtscript_QXmlStreamNamespaceDeclaration_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->namespaceUri(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QXmlStreamNamespaceDeclaration _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->prefix(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 3: { + QString result = QString::fromLatin1("QXmlStreamNamespaceDeclaration"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlStreamNamespaceDeclaration_throw_ambiguity_error_helper(context, + qtscript_QXmlStreamNamespaceDeclaration_function_names[_id+1], + qtscript_QXmlStreamNamespaceDeclaration_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlStreamNamespaceDeclaration_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlStreamNamespaceDeclaration(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QXmlStreamNamespaceDeclaration _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QXmlStreamNamespaceDeclaration _q_arg0 = qscriptvalue_cast(context->argument(0)); + QXmlStreamNamespaceDeclaration _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QXmlStreamNamespaceDeclaration _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlStreamNamespaceDeclaration_throw_ambiguity_error_helper(context, + qtscript_QXmlStreamNamespaceDeclaration_function_names[_id], + qtscript_QXmlStreamNamespaceDeclaration_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlStreamNamespaceDeclaration_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlStreamNamespaceDeclaration*)0)); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlStreamNamespaceDeclaration_prototype_call, qtscript_QXmlStreamNamespaceDeclaration_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlStreamNamespaceDeclaration_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlStreamNamespaceDeclaration_static_call, proto, qtscript_QXmlStreamNamespaceDeclaration_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamNotationDeclaration.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamNotationDeclaration.cpp new file mode 100644 index 00000000..2ab1353d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamNotationDeclaration.cpp @@ -0,0 +1,189 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QXmlStreamNotationDeclaration_function_names[] = { + "QXmlStreamNotationDeclaration" + // static + // prototype + , "name" + , "equals" + , "publicId" + , "systemId" + , "toString" +}; + +static const char * const qtscript_QXmlStreamNotationDeclaration_function_signatures[] = { + "\nQXmlStreamNotationDeclaration arg__1" + // static + // prototype + , "" + , "QXmlStreamNotationDeclaration other" + , "" + , "" +"" +}; + +static const int qtscript_QXmlStreamNotationDeclaration_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QXmlStreamNotationDeclaration_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlStreamNotationDeclaration::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlStreamNotationDeclaration) +Q_DECLARE_METATYPE(QXmlStreamNotationDeclaration*) +Q_DECLARE_METATYPE(QStringRef) + +// +// QXmlStreamNotationDeclaration +// + +static QScriptValue qtscript_QXmlStreamNotationDeclaration_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlStreamNotationDeclaration* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlStreamNotationDeclaration.%0(): this object is not a QXmlStreamNotationDeclaration") + .arg(qtscript_QXmlStreamNotationDeclaration_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->name(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QXmlStreamNotationDeclaration _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->publicId(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->systemId(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 4: { + QString result = QString::fromLatin1("QXmlStreamNotationDeclaration"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlStreamNotationDeclaration_throw_ambiguity_error_helper(context, + qtscript_QXmlStreamNotationDeclaration_function_names[_id+1], + qtscript_QXmlStreamNotationDeclaration_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlStreamNotationDeclaration_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlStreamNotationDeclaration(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QXmlStreamNotationDeclaration _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QXmlStreamNotationDeclaration _q_arg0 = qscriptvalue_cast(context->argument(0)); + QXmlStreamNotationDeclaration _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlStreamNotationDeclaration_throw_ambiguity_error_helper(context, + qtscript_QXmlStreamNotationDeclaration_function_names[_id], + qtscript_QXmlStreamNotationDeclaration_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlStreamNotationDeclaration_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlStreamNotationDeclaration*)0)); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlStreamNotationDeclaration_prototype_call, qtscript_QXmlStreamNotationDeclaration_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlStreamNotationDeclaration_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlStreamNotationDeclaration_static_call, proto, qtscript_QXmlStreamNotationDeclaration_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamReader.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamReader.cpp new file mode 100644 index 00000000..8e88224b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamReader.cpp @@ -0,0 +1,999 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QXmlStreamReader_function_names[] = { + "QXmlStreamReader" + // static + // prototype + , "addData" + , "addExtraNamespaceDeclaration" + , "addExtraNamespaceDeclarations" + , "atEnd" + , "attributes" + , "characterOffset" + , "clear" + , "columnNumber" + , "device" + , "documentEncoding" + , "documentVersion" + , "dtdName" + , "dtdPublicId" + , "dtdSystemId" + , "entityDeclarations" + , "entityResolver" + , "error" + , "errorString" + , "hasError" + , "isCDATA" + , "isCharacters" + , "isComment" + , "isDTD" + , "isEndDocument" + , "isEndElement" + , "isEntityReference" + , "isProcessingInstruction" + , "isStandaloneDocument" + , "isStartDocument" + , "isStartElement" + , "isWhitespace" + , "lineNumber" + , "name" + , "namespaceDeclarations" + , "namespaceProcessing" + , "namespaceUri" + , "notationDeclarations" + , "prefix" + , "processingInstructionData" + , "processingInstructionTarget" + , "qualifiedName" + , "raiseError" + , "readElementText" + , "readNext" + , "readNextStartElement" + , "setDevice" + , "setEntityResolver" + , "setNamespaceProcessing" + , "skipCurrentElement" + , "text" + , "tokenString" + , "tokenType" + , "toString" +}; + +static const char * const qtscript_QXmlStreamReader_function_signatures[] = { + "\nQIODevice device\nQByteArray data\nString data" + // static + // prototype + , "QByteArray data\nString data" + , "QXmlStreamNamespaceDeclaration extraNamespaceDeclaraction" + , "List extraNamespaceDeclaractions" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "String message" + , "ReadElementTextBehaviour behaviour" + , "" + , "" + , "QIODevice device" + , "QXmlStreamEntityResolver resolver" + , "bool arg__1" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QXmlStreamReader_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QXmlStreamReader_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlStreamReader::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlStreamReader*) +Q_DECLARE_METATYPE(QXmlStreamReader::TokenType) +Q_DECLARE_METATYPE(QXmlStreamReader::Error) +Q_DECLARE_METATYPE(QXmlStreamReader::ReadElementTextBehaviour) +Q_DECLARE_METATYPE(QXmlStreamNamespaceDeclaration) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QXmlStreamAttributes) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QStringRef) +Q_DECLARE_METATYPE(QXmlStreamEntityDeclaration) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QXmlStreamEntityResolver*) +Q_DECLARE_METATYPE(QXmlStreamNotationDeclaration) +Q_DECLARE_METATYPE(QVector) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QXmlStreamReader::TokenType +// + +static const QXmlStreamReader::TokenType qtscript_QXmlStreamReader_TokenType_values[] = { + QXmlStreamReader::NoToken + , QXmlStreamReader::Invalid + , QXmlStreamReader::StartDocument + , QXmlStreamReader::EndDocument + , QXmlStreamReader::StartElement + , QXmlStreamReader::EndElement + , QXmlStreamReader::Characters + , QXmlStreamReader::Comment + , QXmlStreamReader::DTD + , QXmlStreamReader::EntityReference + , QXmlStreamReader::ProcessingInstruction +}; + +static const char * const qtscript_QXmlStreamReader_TokenType_keys[] = { + "NoToken" + , "Invalid" + , "StartDocument" + , "EndDocument" + , "StartElement" + , "EndElement" + , "Characters" + , "Comment" + , "DTD" + , "EntityReference" + , "ProcessingInstruction" +}; + +static QString qtscript_QXmlStreamReader_TokenType_toStringHelper(QXmlStreamReader::TokenType value) +{ + if ((value >= QXmlStreamReader::NoToken) && (value <= QXmlStreamReader::ProcessingInstruction)) + return qtscript_QXmlStreamReader_TokenType_keys[static_cast(value)-static_cast(QXmlStreamReader::NoToken)]; + return QString(); +} + +static QScriptValue qtscript_QXmlStreamReader_TokenType_toScriptValue(QScriptEngine *engine, const QXmlStreamReader::TokenType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QXmlStreamReader")); + return clazz.property(qtscript_QXmlStreamReader_TokenType_toStringHelper(value)); +} + +static void qtscript_QXmlStreamReader_TokenType_fromScriptValue(const QScriptValue &value, QXmlStreamReader::TokenType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QXmlStreamReader_TokenType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QXmlStreamReader::NoToken) && (arg <= QXmlStreamReader::ProcessingInstruction)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("TokenType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QXmlStreamReader_TokenType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QXmlStreamReader::TokenType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QXmlStreamReader_TokenType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QXmlStreamReader::TokenType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QXmlStreamReader_TokenType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QXmlStreamReader_TokenType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QXmlStreamReader_TokenType, + qtscript_QXmlStreamReader_TokenType_valueOf, qtscript_QXmlStreamReader_TokenType_toString); + qScriptRegisterMetaType(engine, qtscript_QXmlStreamReader_TokenType_toScriptValue, + qtscript_QXmlStreamReader_TokenType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 11; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QXmlStreamReader_TokenType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QXmlStreamReader_TokenType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QXmlStreamReader::Error +// + +static const QXmlStreamReader::Error qtscript_QXmlStreamReader_Error_values[] = { + QXmlStreamReader::NoError + , QXmlStreamReader::UnexpectedElementError + , QXmlStreamReader::CustomError + , QXmlStreamReader::NotWellFormedError + , QXmlStreamReader::PrematureEndOfDocumentError +}; + +static const char * const qtscript_QXmlStreamReader_Error_keys[] = { + "NoError" + , "UnexpectedElementError" + , "CustomError" + , "NotWellFormedError" + , "PrematureEndOfDocumentError" +}; + +static QString qtscript_QXmlStreamReader_Error_toStringHelper(QXmlStreamReader::Error value) +{ + if ((value >= QXmlStreamReader::NoError) && (value <= QXmlStreamReader::PrematureEndOfDocumentError)) + return qtscript_QXmlStreamReader_Error_keys[static_cast(value)-static_cast(QXmlStreamReader::NoError)]; + return QString(); +} + +static QScriptValue qtscript_QXmlStreamReader_Error_toScriptValue(QScriptEngine *engine, const QXmlStreamReader::Error &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QXmlStreamReader")); + return clazz.property(qtscript_QXmlStreamReader_Error_toStringHelper(value)); +} + +static void qtscript_QXmlStreamReader_Error_fromScriptValue(const QScriptValue &value, QXmlStreamReader::Error &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QXmlStreamReader_Error(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QXmlStreamReader::NoError) && (arg <= QXmlStreamReader::PrematureEndOfDocumentError)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Error(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QXmlStreamReader_Error_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QXmlStreamReader::Error value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QXmlStreamReader_Error_toString(QScriptContext *context, QScriptEngine *engine) +{ + QXmlStreamReader::Error value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QXmlStreamReader_Error_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QXmlStreamReader_Error_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QXmlStreamReader_Error, + qtscript_QXmlStreamReader_Error_valueOf, qtscript_QXmlStreamReader_Error_toString); + qScriptRegisterMetaType(engine, qtscript_QXmlStreamReader_Error_toScriptValue, + qtscript_QXmlStreamReader_Error_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QXmlStreamReader_Error_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QXmlStreamReader_Error_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QXmlStreamReader::ReadElementTextBehaviour +// + +static const QXmlStreamReader::ReadElementTextBehaviour qtscript_QXmlStreamReader_ReadElementTextBehaviour_values[] = { + QXmlStreamReader::ErrorOnUnexpectedElement + , QXmlStreamReader::IncludeChildElements + , QXmlStreamReader::SkipChildElements +}; + +static const char * const qtscript_QXmlStreamReader_ReadElementTextBehaviour_keys[] = { + "ErrorOnUnexpectedElement" + , "IncludeChildElements" + , "SkipChildElements" +}; + +static QString qtscript_QXmlStreamReader_ReadElementTextBehaviour_toStringHelper(QXmlStreamReader::ReadElementTextBehaviour value) +{ + if ((value >= QXmlStreamReader::ErrorOnUnexpectedElement) && (value <= QXmlStreamReader::SkipChildElements)) + return qtscript_QXmlStreamReader_ReadElementTextBehaviour_keys[static_cast(value)-static_cast(QXmlStreamReader::ErrorOnUnexpectedElement)]; + return QString(); +} + +static QScriptValue qtscript_QXmlStreamReader_ReadElementTextBehaviour_toScriptValue(QScriptEngine *engine, const QXmlStreamReader::ReadElementTextBehaviour &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QXmlStreamReader")); + return clazz.property(qtscript_QXmlStreamReader_ReadElementTextBehaviour_toStringHelper(value)); +} + +static void qtscript_QXmlStreamReader_ReadElementTextBehaviour_fromScriptValue(const QScriptValue &value, QXmlStreamReader::ReadElementTextBehaviour &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QXmlStreamReader_ReadElementTextBehaviour(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QXmlStreamReader::ErrorOnUnexpectedElement) && (arg <= QXmlStreamReader::SkipChildElements)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ReadElementTextBehaviour(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QXmlStreamReader_ReadElementTextBehaviour_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QXmlStreamReader::ReadElementTextBehaviour value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QXmlStreamReader_ReadElementTextBehaviour_toString(QScriptContext *context, QScriptEngine *engine) +{ + QXmlStreamReader::ReadElementTextBehaviour value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QXmlStreamReader_ReadElementTextBehaviour_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QXmlStreamReader_ReadElementTextBehaviour_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QXmlStreamReader_ReadElementTextBehaviour, + qtscript_QXmlStreamReader_ReadElementTextBehaviour_valueOf, qtscript_QXmlStreamReader_ReadElementTextBehaviour_toString); + qScriptRegisterMetaType(engine, qtscript_QXmlStreamReader_ReadElementTextBehaviour_toScriptValue, + qtscript_QXmlStreamReader_ReadElementTextBehaviour_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QXmlStreamReader_ReadElementTextBehaviour_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QXmlStreamReader_ReadElementTextBehaviour_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QXmlStreamReader +// + +static QScriptValue qtscript_QXmlStreamReader_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 52; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlStreamReader* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlStreamReader.%0(): this object is not a QXmlStreamReader") + .arg(qtscript_QXmlStreamReader_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addData(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->addData(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + QXmlStreamNamespaceDeclaration _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addExtraNamespaceDeclaration(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->addExtraNamespaceDeclarations(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->atEnd(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QXmlStreamAttributes _q_result = _q_self->attributes(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->characterOffset(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->columnNumber(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QIODevice* _q_result = _q_self->device(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->documentEncoding(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->documentVersion(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->dtdName(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->dtdPublicId(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->dtdSystemId(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QVector _q_result = _q_self->entityDeclarations(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QXmlStreamEntityResolver* _q_result = _q_self->entityResolver(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QXmlStreamReader::Error _q_result = _q_self->error(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasError(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isCDATA(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isCharacters(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isComment(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isDTD(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEndDocument(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEndElement(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEntityReference(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isProcessingInstruction(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isStandaloneDocument(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isStartDocument(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isStartElement(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isWhitespace(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->lineNumber(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->name(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 33: + if (context->argumentCount() == 0) { + QVector _q_result = _q_self->namespaceDeclarations(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 34: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->namespaceProcessing(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 35: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->namespaceUri(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 36: + if (context->argumentCount() == 0) { + QVector _q_result = _q_self->notationDeclarations(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 37: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->prefix(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 38: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->processingInstructionData(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 39: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->processingInstructionTarget(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 40: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->qualifiedName(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 41: + if (context->argumentCount() == 0) { + _q_self->raiseError(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->raiseError(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 42: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->readElementText(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QXmlStreamReader::ReadElementTextBehaviour _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->readElementText(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 43: + if (context->argumentCount() == 0) { + QXmlStreamReader::TokenType _q_result = _q_self->readNext(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 44: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->readNextStartElement(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 45: + if (context->argumentCount() == 1) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDevice(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 46: + if (context->argumentCount() == 1) { + QXmlStreamEntityResolver* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setEntityResolver(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 47: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setNamespaceProcessing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 48: + if (context->argumentCount() == 0) { + _q_self->skipCurrentElement(); + return context->engine()->undefinedValue(); + } + break; + + case 49: + if (context->argumentCount() == 0) { + QStringRef _q_result = _q_self->text(); + + // TEMPLATE - core.convert_stringref_to_string - START + QString _q_convertedResult = _q_result.toString(); + // TEMPLATE - core.convert_stringref_to_string - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 50: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->tokenString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 51: + if (context->argumentCount() == 0) { + QXmlStreamReader::TokenType _q_result = _q_self->tokenType(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 52: { + QString result = QString::fromLatin1("QXmlStreamReader"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlStreamReader_throw_ambiguity_error_helper(context, + qtscript_QXmlStreamReader_function_names[_id+1], + qtscript_QXmlStreamReader_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlStreamReader_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlStreamReader(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QXmlStreamReader* _q_cpp_result = new QXmlStreamReader(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QXmlStreamReader* _q_cpp_result = new QXmlStreamReader(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QXmlStreamReader* _q_cpp_result = new QXmlStreamReader(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QXmlStreamReader* _q_cpp_result = new QXmlStreamReader(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlStreamReader_throw_ambiguity_error_helper(context, + qtscript_QXmlStreamReader_function_names[_id], + qtscript_QXmlStreamReader_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlStreamReader_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlStreamReader*)0)); + for (int i = 0; i < 53; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlStreamReader_prototype_call, qtscript_QXmlStreamReader_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlStreamReader_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlStreamReader_static_call, proto, qtscript_QXmlStreamReader_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("TokenType"), + qtscript_create_QXmlStreamReader_TokenType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Error"), + qtscript_create_QXmlStreamReader_Error_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ReadElementTextBehaviour"), + qtscript_create_QXmlStreamReader_ReadElementTextBehaviour_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamWriter.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamWriter.cpp new file mode 100644 index 00000000..63bc1b3d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_QXmlStreamWriter.cpp @@ -0,0 +1,494 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QXmlStreamWriter_function_names[] = { + "QXmlStreamWriter" + // static + // prototype + , "autoFormatting" + , "autoFormattingIndent" + , "codec" + , "device" + , "hasError" + , "setAutoFormatting" + , "setAutoFormattingIndent" + , "setCodec" + , "setDevice" + , "writeAttribute" + , "writeAttributes" + , "writeCDATA" + , "writeCharacters" + , "writeComment" + , "writeCurrentToken" + , "writeDTD" + , "writeDefaultNamespace" + , "writeEmptyElement" + , "writeEndDocument" + , "writeEndElement" + , "writeEntityReference" + , "writeNamespace" + , "writeProcessingInstruction" + , "writeStartDocument" + , "writeStartElement" + , "writeTextElement" + , "toString" +}; + +static const char * const qtscript_QXmlStreamWriter_function_signatures[] = { + "\nQByteArray array\nQIODevice device" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "bool arg__1" + , "int spacesOrTabs" + , "QTextCodec codec\nchar codecName" + , "QIODevice device" + , "String namespaceUri, String name, String value\nString qualifiedName, String value\nQXmlStreamAttribute attribute" + , "QXmlStreamAttributes attributes" + , "String text" + , "String text" + , "String text" + , "QXmlStreamReader reader" + , "String dtd" + , "String namespaceUri" + , "String namespaceUri, String name\nString qualifiedName" + , "" + , "" + , "String name" + , "String namespaceUri, String prefix" + , "String target, String data" + , "\nString version\nString version, bool standalone" + , "String namespaceUri, String name\nString qualifiedName" + , "String namespaceUri, String name, String text\nString qualifiedName, String text" +"" +}; + +static const int qtscript_QXmlStreamWriter_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 3 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 0 + , 0 + , 1 + , 2 + , 2 + , 2 + , 2 + , 3 + , 0 +}; + +static QScriptValue qtscript_QXmlStreamWriter_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlStreamWriter::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlStreamWriter*) +Q_DECLARE_METATYPE(QTextCodec*) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QXmlStreamAttribute) +Q_DECLARE_METATYPE(QXmlStreamAttributes) +Q_DECLARE_METATYPE(QXmlStreamReader*) +Q_DECLARE_METATYPE(QByteArray*) + +// +// QXmlStreamWriter +// + +static QScriptValue qtscript_QXmlStreamWriter_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 26; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlStreamWriter* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlStreamWriter.%0(): this object is not a QXmlStreamWriter") + .arg(qtscript_QXmlStreamWriter_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->autoFormatting(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->autoFormattingIndent(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QTextCodec* _q_result = _q_self->codec(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QIODevice* _q_result = _q_self->device(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasError(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setAutoFormatting(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setAutoFormattingIndent(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QTextCodec* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCodec(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString()) { + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg0 = context->argument(0).toString().toLatin1(); + const char * _q_arg0 = tmp__q_arg0.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + _q_self->setCodec(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 8: + if (context->argumentCount() == 1) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDevice(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QXmlStreamAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->writeAttribute(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->writeAttribute(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + _q_self->writeAttribute(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QXmlStreamAttributes _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->writeAttributes(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->writeCDATA(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->writeCharacters(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->writeComment(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + + QXmlStreamReader & _q_arg0 = *qscriptvalue_cast(context->argument(0)); + _q_self->writeCurrentToken(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->writeDTD(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->writeDefaultNamespace(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->writeEmptyElement(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->writeEmptyElement(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 0) { + _q_self->writeEndDocument(); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 0) { + _q_self->writeEndElement(); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->writeEntityReference(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->writeNamespace(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->writeNamespace(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->writeProcessingInstruction(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->writeProcessingInstruction(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 0) { + _q_self->writeStartDocument(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->writeStartDocument(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->writeStartDocument(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->writeStartElement(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->writeStartElement(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->writeTextElement(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + _q_self->writeTextElement(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 26: { + QString result = QString::fromLatin1("QXmlStreamWriter"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlStreamWriter_throw_ambiguity_error_helper(context, + qtscript_QXmlStreamWriter_function_names[_id+1], + qtscript_QXmlStreamWriter_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlStreamWriter_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlStreamWriter(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QXmlStreamWriter* _q_cpp_result = new QXmlStreamWriter(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QByteArray* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QXmlStreamWriter* _q_cpp_result = new QXmlStreamWriter(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QXmlStreamWriter* _q_cpp_result = new QXmlStreamWriter(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlStreamWriter_throw_ambiguity_error_helper(context, + qtscript_QXmlStreamWriter_function_names[_id], + qtscript_QXmlStreamWriter_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlStreamWriter_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlStreamWriter*)0)); + for (int i = 0; i < 27; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlStreamWriter_prototype_call, qtscript_QXmlStreamWriter_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlStreamWriter_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlStreamWriter_static_call, proto, qtscript_QXmlStreamWriter_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_Qt.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_Qt.cpp new file mode 100644 index 00000000..b88a0541 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscript_Qt.cpp @@ -0,0 +1,8793 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include + +static const char * const qtscript_Qt_function_names[] = { + "Qt" + // static + , "qt_getEnumName" + // prototype + , "toString" +}; + +static const char * const qtscript_Qt_function_signatures[] = { + "" + // static + , "Alignment arg__1\nDockWidgetAreas arg__1\nDropActions arg__1\nImageConversionFlags arg__1\nInputMethodHints arg__1\nItemFlags arg__1\nKeyboardModifiers arg__1\nMatchFlags arg__1\nMouseButtons arg__1\nOrientations arg__1\nTextInteractionFlags arg__1\nToolBarAreas arg__1\nTouchPointStates arg__1\nWindowStates arg__1\nWindowFlags arg__1\nApplicationAttribute arg__1\nArrowType arg__1\nAspectRatioMode arg__1\nAxis arg__1\nBGMode arg__1\nBrushStyle arg__1\nCaseSensitivity arg__1\nCheckState arg__1\nClipOperation arg__1\nConnectionType arg__1\nContextMenuPolicy arg__1\nCorner arg__1\nCursorMoveStyle arg__1\nCursorShape arg__1\nDateFormat arg__1\nDayOfWeek arg__1\nDockWidgetArea arg__1\nDropAction arg__1\nFillRule arg__1\nFocusPolicy arg__1\nFocusReason arg__1\nGestureState arg__1\nGestureType arg__1\nGlobalColor arg__1\nInputMethodHint arg__1\nInputMethodQuery arg__1\nItemDataRole arg__1\nItemSelectionMode arg__1\nKey arg__1\nLayoutDirection arg__1\nMaskMode arg__1\nOrientation arg__1\nPenCapStyle arg__1\nPenJoinStyle arg__1\nPenStyle arg__1\nScreenOrientation arg__1\nScrollBarPolicy arg__1\nShortcutContext arg__1\nSizeHint arg__1\nSizeMode arg__1\nSortOrder arg__1\nTextElideMode arg__1\nTextFormat arg__1\nTextInteractionFlag arg__1\nTimeSpec arg__1\nTimerType arg__1\nToolBarArea arg__1\nToolButtonStyle arg__1\nTransformationMode arg__1\nWidgetAttribute arg__1\nWindowModality arg__1\nWindowState arg__1\nWindowType arg__1" + // prototype +"" +}; + +static const int qtscript_Qt_function_lengths[] = { + 0 + // static + , 1 + // prototype + , 0 +}; + +static QScriptValue qtscript_Qt_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("Qt::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(Qt::TextInteractionFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::ScrollBarPolicy) +Q_DECLARE_METATYPE(Qt::EventPriority) +Q_DECLARE_METATYPE(Qt::WindowFrameSection) +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(Qt::BGMode) +Q_DECLARE_METATYPE(Qt::TileRule) +Q_DECLARE_METATYPE(Qt::WidgetAttribute) +Q_DECLARE_METATYPE(Qt::TransformationMode) +Q_DECLARE_METATYPE(Qt::PenJoinStyle) +Q_DECLARE_METATYPE(Qt::FocusReason) +Q_DECLARE_METATYPE(Qt::WindowModality) +Q_DECLARE_METATYPE(Qt::ScreenOrientation) +Q_DECLARE_METATYPE(Qt::DropAction) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::WindowType) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::ImageConversionFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::AnchorPoint) +Q_DECLARE_METATYPE(Qt::TextFlag) +Q_DECLARE_METATYPE(Qt::MatchFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::DateFormat) +Q_DECLARE_METATYPE(Qt::DockWidgetAreaSizes) +Q_DECLARE_METATYPE(Qt::ArrowType) +Q_DECLARE_METATYPE(Qt::ItemFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::PenCapStyle) +Q_DECLARE_METATYPE(Qt::KeyboardModifier) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::LayoutDirection) +Q_DECLARE_METATYPE(Qt::DockWidgetArea) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::UIEffect) +Q_DECLARE_METATYPE(Qt::InputMethodHint) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::CoordinateSystem) +Q_DECLARE_METATYPE(Qt::TextElideMode) +Q_DECLARE_METATYPE(Qt::ApplicationAttribute) +Q_DECLARE_METATYPE(Qt::MouseButton) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::ItemDataRole) +Q_DECLARE_METATYPE(Qt::CursorShape) +Q_DECLARE_METATYPE(Qt::FillRule) +Q_DECLARE_METATYPE(Qt::AspectRatioMode) +Q_DECLARE_METATYPE(Qt::TextFormat) +Q_DECLARE_METATYPE(Qt::CursorMoveStyle) +Q_DECLARE_METATYPE(Qt::PenStyle) +Q_DECLARE_METATYPE(Qt::TimerType) +Q_DECLARE_METATYPE(Qt::ClipOperation) +Q_DECLARE_METATYPE(Qt::GlobalColor) +Q_DECLARE_METATYPE(Qt::FindChildOption) +Q_DECLARE_METATYPE(Qt::ShortcutContext) +Q_DECLARE_METATYPE(Qt::ConnectionType) +Q_DECLARE_METATYPE(Qt::ToolBarAreaSizes) +Q_DECLARE_METATYPE(Qt::Key) +Q_DECLARE_METATYPE(Qt::GestureFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::SizeHint) +Q_DECLARE_METATYPE(Qt::ToolButtonStyle) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(Qt::AlignmentFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::TimeSpec) +Q_DECLARE_METATYPE(Qt::Axis) +Q_DECLARE_METATYPE(Qt::CheckState) +Q_DECLARE_METATYPE(Qt::BrushStyle) +Q_DECLARE_METATYPE(Qt::ContextMenuPolicy) +Q_DECLARE_METATYPE(Qt::CaseSensitivity) +Q_DECLARE_METATYPE(Qt::WhiteSpaceMode) +Q_DECLARE_METATYPE(Qt::MaskMode) +Q_DECLARE_METATYPE(Qt::HitTestAccuracy) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::SizeMode) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(Qt::ToolBarArea) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::FocusPolicy) +Q_DECLARE_METATYPE(Qt::Corner) +Q_DECLARE_METATYPE(Qt::TouchPointState) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::WindowState) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::DayOfWeek) +Q_DECLARE_METATYPE(Qt::NavigationMode) +Q_DECLARE_METATYPE(const char*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// Qt::TextInteractionFlag +// + +static const Qt::TextInteractionFlag qtscript_Qt_TextInteractionFlag_values[] = { + Qt::NoTextInteraction + , Qt::TextSelectableByMouse + , Qt::TextSelectableByKeyboard + , Qt::LinksAccessibleByMouse + , Qt::LinksAccessibleByKeyboard + , Qt::TextBrowserInteraction + , Qt::TextEditable + , Qt::TextEditorInteraction +}; + +static const char * const qtscript_Qt_TextInteractionFlag_keys[] = { + "NoTextInteraction" + , "TextSelectableByMouse" + , "TextSelectableByKeyboard" + , "LinksAccessibleByMouse" + , "LinksAccessibleByKeyboard" + , "TextBrowserInteraction" + , "TextEditable" + , "TextEditorInteraction" +}; + +static QString qtscript_Qt_TextInteractionFlag_toStringHelper(Qt::TextInteractionFlag value) +{ + for (int i = 0; i < 8; ++i) { + if (qtscript_Qt_TextInteractionFlag_values[i] == value) + return QString::fromLatin1(qtscript_Qt_TextInteractionFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_TextInteractionFlag_toScriptValue(QScriptEngine *engine, const Qt::TextInteractionFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_TextInteractionFlag_toStringHelper(value)); +} + +static void qtscript_Qt_TextInteractionFlag_fromScriptValue(const QScriptValue &value, Qt::TextInteractionFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_TextInteractionFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 8; ++i) { + if (qtscript_Qt_TextInteractionFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("TextInteractionFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_TextInteractionFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TextInteractionFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_TextInteractionFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TextInteractionFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_TextInteractionFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_TextInteractionFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_TextInteractionFlag, + qtscript_Qt_TextInteractionFlag_valueOf, qtscript_Qt_TextInteractionFlag_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_TextInteractionFlag_toScriptValue, + qtscript_Qt_TextInteractionFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 8; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_TextInteractionFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_TextInteractionFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::TextInteractionFlags +// + +static QScriptValue qtscript_Qt_TextInteractionFlags_toScriptValue(QScriptEngine *engine, const Qt::TextInteractionFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_Qt_TextInteractionFlags_fromScriptValue(const QScriptValue &value, Qt::TextInteractionFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_Qt_TextInteractionFlags(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TextInteractionFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("TextInteractionFlags(): argument %0 is not of type TextInteractionFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_Qt_TextInteractionFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TextInteractionFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_TextInteractionFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TextInteractionFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 8; ++i) { + if ((value & qtscript_Qt_TextInteractionFlag_values[i]) == qtscript_Qt_TextInteractionFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_Qt_TextInteractionFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_Qt_TextInteractionFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_Qt_TextInteractionFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_Qt_TextInteractionFlags, qtscript_Qt_TextInteractionFlags_valueOf, + qtscript_Qt_TextInteractionFlags_toString, qtscript_Qt_TextInteractionFlags_equals); + qScriptRegisterMetaType(engine, qtscript_Qt_TextInteractionFlags_toScriptValue, + qtscript_Qt_TextInteractionFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// Qt::ScrollBarPolicy +// + +static const Qt::ScrollBarPolicy qtscript_Qt_ScrollBarPolicy_values[] = { + Qt::ScrollBarAsNeeded + , Qt::ScrollBarAlwaysOff + , Qt::ScrollBarAlwaysOn +}; + +static const char * const qtscript_Qt_ScrollBarPolicy_keys[] = { + "ScrollBarAsNeeded" + , "ScrollBarAlwaysOff" + , "ScrollBarAlwaysOn" +}; + +static QString qtscript_Qt_ScrollBarPolicy_toStringHelper(Qt::ScrollBarPolicy value) +{ + if ((value >= Qt::ScrollBarAsNeeded) && (value <= Qt::ScrollBarAlwaysOn)) + return qtscript_Qt_ScrollBarPolicy_keys[static_cast(value)-static_cast(Qt::ScrollBarAsNeeded)]; + return QString(); +} + +static QScriptValue qtscript_Qt_ScrollBarPolicy_toScriptValue(QScriptEngine *engine, const Qt::ScrollBarPolicy &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_ScrollBarPolicy_toStringHelper(value)); +} + +static void qtscript_Qt_ScrollBarPolicy_fromScriptValue(const QScriptValue &value, Qt::ScrollBarPolicy &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_ScrollBarPolicy(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::ScrollBarAsNeeded) && (arg <= Qt::ScrollBarAlwaysOn)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ScrollBarPolicy(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_ScrollBarPolicy_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ScrollBarPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ScrollBarPolicy_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ScrollBarPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_ScrollBarPolicy_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_ScrollBarPolicy_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_ScrollBarPolicy, + qtscript_Qt_ScrollBarPolicy_valueOf, qtscript_Qt_ScrollBarPolicy_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_ScrollBarPolicy_toScriptValue, + qtscript_Qt_ScrollBarPolicy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_ScrollBarPolicy_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_ScrollBarPolicy_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::EventPriority +// + +static const Qt::EventPriority qtscript_Qt_EventPriority_values[] = { + Qt::LowEventPriority + , Qt::NormalEventPriority + , Qt::HighEventPriority +}; + +static const char * const qtscript_Qt_EventPriority_keys[] = { + "LowEventPriority" + , "NormalEventPriority" + , "HighEventPriority" +}; + +static QString qtscript_Qt_EventPriority_toStringHelper(Qt::EventPriority value) +{ + if ((value >= Qt::LowEventPriority) && (value <= Qt::HighEventPriority)) + return qtscript_Qt_EventPriority_keys[static_cast(value)-static_cast(Qt::LowEventPriority)]; + return QString(); +} + +static QScriptValue qtscript_Qt_EventPriority_toScriptValue(QScriptEngine *engine, const Qt::EventPriority &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_EventPriority_toStringHelper(value)); +} + +static void qtscript_Qt_EventPriority_fromScriptValue(const QScriptValue &value, Qt::EventPriority &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_EventPriority(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::LowEventPriority) && (arg <= Qt::HighEventPriority)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("EventPriority(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_EventPriority_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::EventPriority value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_EventPriority_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::EventPriority value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_EventPriority_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_EventPriority_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_EventPriority, + qtscript_Qt_EventPriority_valueOf, qtscript_Qt_EventPriority_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_EventPriority_toScriptValue, + qtscript_Qt_EventPriority_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_EventPriority_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_EventPriority_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::WindowFrameSection +// + +static const Qt::WindowFrameSection qtscript_Qt_WindowFrameSection_values[] = { + Qt::NoSection + , Qt::LeftSection + , Qt::TopLeftSection + , Qt::TopSection + , Qt::TopRightSection + , Qt::RightSection + , Qt::BottomRightSection + , Qt::BottomSection + , Qt::BottomLeftSection + , Qt::TitleBarArea +}; + +static const char * const qtscript_Qt_WindowFrameSection_keys[] = { + "NoSection" + , "LeftSection" + , "TopLeftSection" + , "TopSection" + , "TopRightSection" + , "RightSection" + , "BottomRightSection" + , "BottomSection" + , "BottomLeftSection" + , "TitleBarArea" +}; + +static QString qtscript_Qt_WindowFrameSection_toStringHelper(Qt::WindowFrameSection value) +{ + if ((value >= Qt::NoSection) && (value <= Qt::TitleBarArea)) + return qtscript_Qt_WindowFrameSection_keys[static_cast(value)-static_cast(Qt::NoSection)]; + return QString(); +} + +static QScriptValue qtscript_Qt_WindowFrameSection_toScriptValue(QScriptEngine *engine, const Qt::WindowFrameSection &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_WindowFrameSection_toStringHelper(value)); +} + +static void qtscript_Qt_WindowFrameSection_fromScriptValue(const QScriptValue &value, Qt::WindowFrameSection &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_WindowFrameSection(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::NoSection) && (arg <= Qt::TitleBarArea)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("WindowFrameSection(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_WindowFrameSection_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WindowFrameSection value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_WindowFrameSection_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WindowFrameSection value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_WindowFrameSection_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_WindowFrameSection_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_WindowFrameSection, + qtscript_Qt_WindowFrameSection_valueOf, qtscript_Qt_WindowFrameSection_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_WindowFrameSection_toScriptValue, + qtscript_Qt_WindowFrameSection_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 10; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_WindowFrameSection_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_WindowFrameSection_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::SortOrder +// + +static const Qt::SortOrder qtscript_Qt_SortOrder_values[] = { + Qt::AscendingOrder + , Qt::DescendingOrder +}; + +static const char * const qtscript_Qt_SortOrder_keys[] = { + "AscendingOrder" + , "DescendingOrder" +}; + +static QString qtscript_Qt_SortOrder_toStringHelper(Qt::SortOrder value) +{ + if ((value >= Qt::AscendingOrder) && (value <= Qt::DescendingOrder)) + return qtscript_Qt_SortOrder_keys[static_cast(value)-static_cast(Qt::AscendingOrder)]; + return QString(); +} + +static QScriptValue qtscript_Qt_SortOrder_toScriptValue(QScriptEngine *engine, const Qt::SortOrder &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_SortOrder_toStringHelper(value)); +} + +static void qtscript_Qt_SortOrder_fromScriptValue(const QScriptValue &value, Qt::SortOrder &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_SortOrder(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::AscendingOrder) && (arg <= Qt::DescendingOrder)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SortOrder(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_SortOrder_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::SortOrder value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_SortOrder_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::SortOrder value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_SortOrder_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_SortOrder_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_SortOrder, + qtscript_Qt_SortOrder_valueOf, qtscript_Qt_SortOrder_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_SortOrder_toScriptValue, + qtscript_Qt_SortOrder_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_SortOrder_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_SortOrder_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::BGMode +// + +static const Qt::BGMode qtscript_Qt_BGMode_values[] = { + Qt::TransparentMode + , Qt::OpaqueMode +}; + +static const char * const qtscript_Qt_BGMode_keys[] = { + "TransparentMode" + , "OpaqueMode" +}; + +static QString qtscript_Qt_BGMode_toStringHelper(Qt::BGMode value) +{ + if ((value >= Qt::TransparentMode) && (value <= Qt::OpaqueMode)) + return qtscript_Qt_BGMode_keys[static_cast(value)-static_cast(Qt::TransparentMode)]; + return QString(); +} + +static QScriptValue qtscript_Qt_BGMode_toScriptValue(QScriptEngine *engine, const Qt::BGMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_BGMode_toStringHelper(value)); +} + +static void qtscript_Qt_BGMode_fromScriptValue(const QScriptValue &value, Qt::BGMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_BGMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::TransparentMode) && (arg <= Qt::OpaqueMode)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("BGMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_BGMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::BGMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_BGMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::BGMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_BGMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_BGMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_BGMode, + qtscript_Qt_BGMode_valueOf, qtscript_Qt_BGMode_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_BGMode_toScriptValue, + qtscript_Qt_BGMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_BGMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_BGMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::TileRule +// + +static const Qt::TileRule qtscript_Qt_TileRule_values[] = { + Qt::StretchTile + , Qt::RepeatTile + , Qt::RoundTile +}; + +static const char * const qtscript_Qt_TileRule_keys[] = { + "StretchTile" + , "RepeatTile" + , "RoundTile" +}; + +static QString qtscript_Qt_TileRule_toStringHelper(Qt::TileRule value) +{ + if ((value >= Qt::StretchTile) && (value <= Qt::RoundTile)) + return qtscript_Qt_TileRule_keys[static_cast(value)-static_cast(Qt::StretchTile)]; + return QString(); +} + +static QScriptValue qtscript_Qt_TileRule_toScriptValue(QScriptEngine *engine, const Qt::TileRule &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_TileRule_toStringHelper(value)); +} + +static void qtscript_Qt_TileRule_fromScriptValue(const QScriptValue &value, Qt::TileRule &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_TileRule(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::StretchTile) && (arg <= Qt::RoundTile)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("TileRule(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_TileRule_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TileRule value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_TileRule_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TileRule value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_TileRule_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_TileRule_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_TileRule, + qtscript_Qt_TileRule_valueOf, qtscript_Qt_TileRule_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_TileRule_toScriptValue, + qtscript_Qt_TileRule_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_TileRule_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_TileRule_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::WidgetAttribute +// + +static const Qt::WidgetAttribute qtscript_Qt_WidgetAttribute_values[] = { + Qt::WA_Disabled + , Qt::WA_UnderMouse + , Qt::WA_MouseTracking + , Qt::WA_ContentsPropagated + , Qt::WA_OpaquePaintEvent + , Qt::WA_StaticContents + , Qt::WA_LaidOut + , Qt::WA_PaintOnScreen + , Qt::WA_NoSystemBackground + , Qt::WA_UpdatesDisabled + , Qt::WA_Mapped + , Qt::WA_MacNoClickThrough + , Qt::WA_InputMethodEnabled + , Qt::WA_WState_Visible + , Qt::WA_WState_Hidden + , Qt::WA_ForceDisabled + , Qt::WA_KeyCompression + , Qt::WA_PendingMoveEvent + , Qt::WA_PendingResizeEvent + , Qt::WA_SetPalette + , Qt::WA_SetFont + , Qt::WA_SetCursor + , Qt::WA_NoChildEventsFromChildren + , Qt::WA_WindowModified + , Qt::WA_Resized + , Qt::WA_Moved + , Qt::WA_PendingUpdate + , Qt::WA_InvalidSize + , Qt::WA_MacBrushedMetal + , Qt::WA_CustomWhatsThis + , Qt::WA_LayoutOnEntireRect + , Qt::WA_OutsideWSRange + , Qt::WA_GrabbedShortcut + , Qt::WA_TransparentForMouseEvents + , Qt::WA_PaintUnclipped + , Qt::WA_SetWindowIcon + , Qt::WA_NoMouseReplay + , Qt::WA_DeleteOnClose + , Qt::WA_RightToLeft + , Qt::WA_SetLayoutDirection + , Qt::WA_NoChildEventsForParent + , Qt::WA_ForceUpdatesDisabled + , Qt::WA_WState_Created + , Qt::WA_WState_CompressKeys + , Qt::WA_WState_InPaintEvent + , Qt::WA_WState_Reparented + , Qt::WA_WState_ConfigPending + , Qt::WA_WState_Polished + , Qt::WA_WState_DND + , Qt::WA_WState_OwnSizePolicy + , Qt::WA_WState_ExplicitShowHide + , Qt::WA_ShowModal + , Qt::WA_MouseNoMask + , Qt::WA_GroupLeader + , Qt::WA_NoMousePropagation + , Qt::WA_Hover + , Qt::WA_InputMethodTransparent + , Qt::WA_QuitOnClose + , Qt::WA_KeyboardFocusChange + , Qt::WA_AcceptDrops + , Qt::WA_DropSiteRegistered + , Qt::WA_WindowPropagation + , Qt::WA_NoX11EventCompression + , Qt::WA_TintedBackground + , Qt::WA_X11OpenGLOverlay + , Qt::WA_AlwaysShowToolTips + , Qt::WA_MacOpaqueSizeGrip + , Qt::WA_SetStyle + , Qt::WA_SetLocale + , Qt::WA_MacShowFocusRect + , Qt::WA_MacNormalSize + , Qt::WA_MacSmallSize + , Qt::WA_MacMiniSize + , Qt::WA_LayoutUsesWidgetRect + , Qt::WA_StyledBackground + , Qt::WA_MSWindowsUseDirect3D + , Qt::WA_CanHostQMdiSubWindowTitleBar + , Qt::WA_MacAlwaysShowToolWindow + , Qt::WA_StyleSheet + , Qt::WA_ShowWithoutActivating + , Qt::WA_X11BypassTransientForHint + , Qt::WA_NativeWindow + , Qt::WA_DontCreateNativeAncestors + , Qt::WA_MacVariableSize + , Qt::WA_DontShowOnScreen + , Qt::WA_X11NetWmWindowTypeDesktop + , Qt::WA_X11NetWmWindowTypeDock + , Qt::WA_X11NetWmWindowTypeToolBar + , Qt::WA_X11NetWmWindowTypeMenu + , Qt::WA_X11NetWmWindowTypeUtility + , Qt::WA_X11NetWmWindowTypeSplash + , Qt::WA_X11NetWmWindowTypeDialog + , Qt::WA_X11NetWmWindowTypeDropDownMenu + , Qt::WA_X11NetWmWindowTypePopupMenu + , Qt::WA_X11NetWmWindowTypeToolTip + , Qt::WA_X11NetWmWindowTypeNotification + , Qt::WA_X11NetWmWindowTypeCombo + , Qt::WA_X11NetWmWindowTypeDND + , Qt::WA_MacFrameworkScaled + , Qt::WA_SetWindowModality + , Qt::WA_WState_WindowOpacitySet + , Qt::WA_TranslucentBackground + , Qt::WA_AcceptTouchEvents + , Qt::WA_WState_AcceptedTouchBeginEvent + , Qt::WA_TouchPadAcceptSingleTouchEvents + , Qt::WA_X11DoNotAcceptFocus + , Qt::WA_MacNoShadow + , Qt::WA_AlwaysStackOnTop + , Qt::WA_AttributeCount +}; + +static const char * const qtscript_Qt_WidgetAttribute_keys[] = { + "WA_Disabled" + , "WA_UnderMouse" + , "WA_MouseTracking" + , "WA_ContentsPropagated" + , "WA_OpaquePaintEvent" + , "WA_StaticContents" + , "WA_LaidOut" + , "WA_PaintOnScreen" + , "WA_NoSystemBackground" + , "WA_UpdatesDisabled" + , "WA_Mapped" + , "WA_MacNoClickThrough" + , "WA_InputMethodEnabled" + , "WA_WState_Visible" + , "WA_WState_Hidden" + , "WA_ForceDisabled" + , "WA_KeyCompression" + , "WA_PendingMoveEvent" + , "WA_PendingResizeEvent" + , "WA_SetPalette" + , "WA_SetFont" + , "WA_SetCursor" + , "WA_NoChildEventsFromChildren" + , "WA_WindowModified" + , "WA_Resized" + , "WA_Moved" + , "WA_PendingUpdate" + , "WA_InvalidSize" + , "WA_MacBrushedMetal" + , "WA_CustomWhatsThis" + , "WA_LayoutOnEntireRect" + , "WA_OutsideWSRange" + , "WA_GrabbedShortcut" + , "WA_TransparentForMouseEvents" + , "WA_PaintUnclipped" + , "WA_SetWindowIcon" + , "WA_NoMouseReplay" + , "WA_DeleteOnClose" + , "WA_RightToLeft" + , "WA_SetLayoutDirection" + , "WA_NoChildEventsForParent" + , "WA_ForceUpdatesDisabled" + , "WA_WState_Created" + , "WA_WState_CompressKeys" + , "WA_WState_InPaintEvent" + , "WA_WState_Reparented" + , "WA_WState_ConfigPending" + , "WA_WState_Polished" + , "WA_WState_DND" + , "WA_WState_OwnSizePolicy" + , "WA_WState_ExplicitShowHide" + , "WA_ShowModal" + , "WA_MouseNoMask" + , "WA_GroupLeader" + , "WA_NoMousePropagation" + , "WA_Hover" + , "WA_InputMethodTransparent" + , "WA_QuitOnClose" + , "WA_KeyboardFocusChange" + , "WA_AcceptDrops" + , "WA_DropSiteRegistered" + , "WA_WindowPropagation" + , "WA_NoX11EventCompression" + , "WA_TintedBackground" + , "WA_X11OpenGLOverlay" + , "WA_AlwaysShowToolTips" + , "WA_MacOpaqueSizeGrip" + , "WA_SetStyle" + , "WA_SetLocale" + , "WA_MacShowFocusRect" + , "WA_MacNormalSize" + , "WA_MacSmallSize" + , "WA_MacMiniSize" + , "WA_LayoutUsesWidgetRect" + , "WA_StyledBackground" + , "WA_MSWindowsUseDirect3D" + , "WA_CanHostQMdiSubWindowTitleBar" + , "WA_MacAlwaysShowToolWindow" + , "WA_StyleSheet" + , "WA_ShowWithoutActivating" + , "WA_X11BypassTransientForHint" + , "WA_NativeWindow" + , "WA_DontCreateNativeAncestors" + , "WA_MacVariableSize" + , "WA_DontShowOnScreen" + , "WA_X11NetWmWindowTypeDesktop" + , "WA_X11NetWmWindowTypeDock" + , "WA_X11NetWmWindowTypeToolBar" + , "WA_X11NetWmWindowTypeMenu" + , "WA_X11NetWmWindowTypeUtility" + , "WA_X11NetWmWindowTypeSplash" + , "WA_X11NetWmWindowTypeDialog" + , "WA_X11NetWmWindowTypeDropDownMenu" + , "WA_X11NetWmWindowTypePopupMenu" + , "WA_X11NetWmWindowTypeToolTip" + , "WA_X11NetWmWindowTypeNotification" + , "WA_X11NetWmWindowTypeCombo" + , "WA_X11NetWmWindowTypeDND" + , "WA_MacFrameworkScaled" + , "WA_SetWindowModality" + , "WA_WState_WindowOpacitySet" + , "WA_TranslucentBackground" + , "WA_AcceptTouchEvents" + , "WA_WState_AcceptedTouchBeginEvent" + , "WA_TouchPadAcceptSingleTouchEvents" + , "WA_X11DoNotAcceptFocus" + , "WA_MacNoShadow" + , "WA_AlwaysStackOnTop" + , "WA_AttributeCount" +}; + +static QString qtscript_Qt_WidgetAttribute_toStringHelper(Qt::WidgetAttribute value) +{ + for (int i = 0; i < 109; ++i) { + if (qtscript_Qt_WidgetAttribute_values[i] == value) + return QString::fromLatin1(qtscript_Qt_WidgetAttribute_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_WidgetAttribute_toScriptValue(QScriptEngine *engine, const Qt::WidgetAttribute &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_WidgetAttribute_toStringHelper(value)); +} + +static void qtscript_Qt_WidgetAttribute_fromScriptValue(const QScriptValue &value, Qt::WidgetAttribute &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_WidgetAttribute(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 109; ++i) { + if (qtscript_Qt_WidgetAttribute_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("WidgetAttribute(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_WidgetAttribute_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WidgetAttribute value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_WidgetAttribute_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WidgetAttribute value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_WidgetAttribute_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_WidgetAttribute_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_WidgetAttribute, + qtscript_Qt_WidgetAttribute_valueOf, qtscript_Qt_WidgetAttribute_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_WidgetAttribute_toScriptValue, + qtscript_Qt_WidgetAttribute_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 109; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_WidgetAttribute_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_WidgetAttribute_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::TransformationMode +// + +static const Qt::TransformationMode qtscript_Qt_TransformationMode_values[] = { + Qt::FastTransformation + , Qt::SmoothTransformation +}; + +static const char * const qtscript_Qt_TransformationMode_keys[] = { + "FastTransformation" + , "SmoothTransformation" +}; + +static QString qtscript_Qt_TransformationMode_toStringHelper(Qt::TransformationMode value) +{ + if ((value >= Qt::FastTransformation) && (value <= Qt::SmoothTransformation)) + return qtscript_Qt_TransformationMode_keys[static_cast(value)-static_cast(Qt::FastTransformation)]; + return QString(); +} + +static QScriptValue qtscript_Qt_TransformationMode_toScriptValue(QScriptEngine *engine, const Qt::TransformationMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_TransformationMode_toStringHelper(value)); +} + +static void qtscript_Qt_TransformationMode_fromScriptValue(const QScriptValue &value, Qt::TransformationMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_TransformationMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::FastTransformation) && (arg <= Qt::SmoothTransformation)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("TransformationMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_TransformationMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TransformationMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_TransformationMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TransformationMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_TransformationMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_TransformationMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_TransformationMode, + qtscript_Qt_TransformationMode_valueOf, qtscript_Qt_TransformationMode_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_TransformationMode_toScriptValue, + qtscript_Qt_TransformationMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_TransformationMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_TransformationMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::PenJoinStyle +// + +static const Qt::PenJoinStyle qtscript_Qt_PenJoinStyle_values[] = { + Qt::MiterJoin + , Qt::BevelJoin + , Qt::RoundJoin + , Qt::SvgMiterJoin + , Qt::MPenJoinStyle +}; + +static const char * const qtscript_Qt_PenJoinStyle_keys[] = { + "MiterJoin" + , "BevelJoin" + , "RoundJoin" + , "SvgMiterJoin" + , "MPenJoinStyle" +}; + +static QString qtscript_Qt_PenJoinStyle_toStringHelper(Qt::PenJoinStyle value) +{ + for (int i = 0; i < 5; ++i) { + if (qtscript_Qt_PenJoinStyle_values[i] == value) + return QString::fromLatin1(qtscript_Qt_PenJoinStyle_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_PenJoinStyle_toScriptValue(QScriptEngine *engine, const Qt::PenJoinStyle &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_PenJoinStyle_toStringHelper(value)); +} + +static void qtscript_Qt_PenJoinStyle_fromScriptValue(const QScriptValue &value, Qt::PenJoinStyle &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_PenJoinStyle(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 5; ++i) { + if (qtscript_Qt_PenJoinStyle_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("PenJoinStyle(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_PenJoinStyle_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::PenJoinStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_PenJoinStyle_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::PenJoinStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_PenJoinStyle_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_PenJoinStyle_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_PenJoinStyle, + qtscript_Qt_PenJoinStyle_valueOf, qtscript_Qt_PenJoinStyle_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_PenJoinStyle_toScriptValue, + qtscript_Qt_PenJoinStyle_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_PenJoinStyle_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_PenJoinStyle_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::FocusReason +// + +static const Qt::FocusReason qtscript_Qt_FocusReason_values[] = { + Qt::MouseFocusReason + , Qt::TabFocusReason + , Qt::BacktabFocusReason + , Qt::ActiveWindowFocusReason + , Qt::PopupFocusReason + , Qt::ShortcutFocusReason + , Qt::MenuBarFocusReason + , Qt::OtherFocusReason + , Qt::NoFocusReason +}; + +static const char * const qtscript_Qt_FocusReason_keys[] = { + "MouseFocusReason" + , "TabFocusReason" + , "BacktabFocusReason" + , "ActiveWindowFocusReason" + , "PopupFocusReason" + , "ShortcutFocusReason" + , "MenuBarFocusReason" + , "OtherFocusReason" + , "NoFocusReason" +}; + +static QString qtscript_Qt_FocusReason_toStringHelper(Qt::FocusReason value) +{ + if ((value >= Qt::MouseFocusReason) && (value <= Qt::NoFocusReason)) + return qtscript_Qt_FocusReason_keys[static_cast(value)-static_cast(Qt::MouseFocusReason)]; + return QString(); +} + +static QScriptValue qtscript_Qt_FocusReason_toScriptValue(QScriptEngine *engine, const Qt::FocusReason &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_FocusReason_toStringHelper(value)); +} + +static void qtscript_Qt_FocusReason_fromScriptValue(const QScriptValue &value, Qt::FocusReason &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_FocusReason(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::MouseFocusReason) && (arg <= Qt::NoFocusReason)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("FocusReason(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_FocusReason_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::FocusReason value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_FocusReason_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::FocusReason value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_FocusReason_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_FocusReason_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_FocusReason, + qtscript_Qt_FocusReason_valueOf, qtscript_Qt_FocusReason_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_FocusReason_toScriptValue, + qtscript_Qt_FocusReason_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 9; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_FocusReason_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_FocusReason_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::WindowModality +// + +static const Qt::WindowModality qtscript_Qt_WindowModality_values[] = { + Qt::NonModal + , Qt::WindowModal + , Qt::ApplicationModal +}; + +static const char * const qtscript_Qt_WindowModality_keys[] = { + "NonModal" + , "WindowModal" + , "ApplicationModal" +}; + +static QString qtscript_Qt_WindowModality_toStringHelper(Qt::WindowModality value) +{ + if ((value >= Qt::NonModal) && (value <= Qt::ApplicationModal)) + return qtscript_Qt_WindowModality_keys[static_cast(value)-static_cast(Qt::NonModal)]; + return QString(); +} + +static QScriptValue qtscript_Qt_WindowModality_toScriptValue(QScriptEngine *engine, const Qt::WindowModality &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_WindowModality_toStringHelper(value)); +} + +static void qtscript_Qt_WindowModality_fromScriptValue(const QScriptValue &value, Qt::WindowModality &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_WindowModality(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::NonModal) && (arg <= Qt::ApplicationModal)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("WindowModality(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_WindowModality_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WindowModality value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_WindowModality_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WindowModality value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_WindowModality_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_WindowModality_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_WindowModality, + qtscript_Qt_WindowModality_valueOf, qtscript_Qt_WindowModality_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_WindowModality_toScriptValue, + qtscript_Qt_WindowModality_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_WindowModality_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_WindowModality_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::ScreenOrientation +// + +static const Qt::ScreenOrientation qtscript_Qt_ScreenOrientation_values[] = { + Qt::PrimaryOrientation + , Qt::PortraitOrientation + , Qt::LandscapeOrientation + , Qt::InvertedPortraitOrientation + , Qt::InvertedLandscapeOrientation +}; + +static const char * const qtscript_Qt_ScreenOrientation_keys[] = { + "PrimaryOrientation" + , "PortraitOrientation" + , "LandscapeOrientation" + , "InvertedPortraitOrientation" + , "InvertedLandscapeOrientation" +}; + +static QString qtscript_Qt_ScreenOrientation_toStringHelper(Qt::ScreenOrientation value) +{ + for (int i = 0; i < 5; ++i) { + if (qtscript_Qt_ScreenOrientation_values[i] == value) + return QString::fromLatin1(qtscript_Qt_ScreenOrientation_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_ScreenOrientation_toScriptValue(QScriptEngine *engine, const Qt::ScreenOrientation &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_ScreenOrientation_toStringHelper(value)); +} + +static void qtscript_Qt_ScreenOrientation_fromScriptValue(const QScriptValue &value, Qt::ScreenOrientation &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_ScreenOrientation(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 5; ++i) { + if (qtscript_Qt_ScreenOrientation_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ScreenOrientation(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_ScreenOrientation_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ScreenOrientation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ScreenOrientation_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ScreenOrientation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_ScreenOrientation_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_ScreenOrientation_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_ScreenOrientation, + qtscript_Qt_ScreenOrientation_valueOf, qtscript_Qt_ScreenOrientation_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_ScreenOrientation_toScriptValue, + qtscript_Qt_ScreenOrientation_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_ScreenOrientation_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_ScreenOrientation_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::DropAction +// + +static const Qt::DropAction qtscript_Qt_DropAction_values[] = { + Qt::IgnoreAction + , Qt::CopyAction + , Qt::MoveAction + , Qt::LinkAction + , Qt::ActionMask + , Qt::TargetMoveAction +}; + +static const char * const qtscript_Qt_DropAction_keys[] = { + "IgnoreAction" + , "CopyAction" + , "MoveAction" + , "LinkAction" + , "ActionMask" + , "TargetMoveAction" +}; + +static QString qtscript_Qt_DropAction_toStringHelper(Qt::DropAction value) +{ + for (int i = 0; i < 6; ++i) { + if (qtscript_Qt_DropAction_values[i] == value) + return QString::fromLatin1(qtscript_Qt_DropAction_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_DropAction_toScriptValue(QScriptEngine *engine, const Qt::DropAction &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_DropAction_toStringHelper(value)); +} + +static void qtscript_Qt_DropAction_fromScriptValue(const QScriptValue &value, Qt::DropAction &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_DropAction(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 6; ++i) { + if (qtscript_Qt_DropAction_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("DropAction(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_DropAction_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::DropAction value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_DropAction_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::DropAction value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_DropAction_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_DropAction_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_DropAction, + qtscript_Qt_DropAction_valueOf, qtscript_Qt_DropAction_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_DropAction_toScriptValue, + qtscript_Qt_DropAction_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_DropAction_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_DropAction_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::DropActions +// + +static QScriptValue qtscript_Qt_DropActions_toScriptValue(QScriptEngine *engine, const Qt::DropActions &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_Qt_DropActions_fromScriptValue(const QScriptValue &value, Qt::DropActions &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_Qt_DropActions(QScriptContext *context, QScriptEngine *engine) +{ + Qt::DropActions result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("DropActions(): argument %0 is not of type DropAction").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_Qt_DropActions_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::DropActions value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_DropActions_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::DropActions value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 6; ++i) { + if ((value & qtscript_Qt_DropAction_values[i]) == qtscript_Qt_DropAction_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_Qt_DropAction_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_Qt_DropActions_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_Qt_DropActions_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_Qt_DropActions, qtscript_Qt_DropActions_valueOf, + qtscript_Qt_DropActions_toString, qtscript_Qt_DropActions_equals); + qScriptRegisterMetaType(engine, qtscript_Qt_DropActions_toScriptValue, + qtscript_Qt_DropActions_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// Qt::WindowType +// + +static const Qt::WindowType qtscript_Qt_WindowType_values[] = { + Qt::WindowFullscreenButtonHint + , Qt::Widget + , Qt::Window + , Qt::Dialog + , Qt::Sheet + , Qt::Drawer + , Qt::Popup + , Qt::Tool + , Qt::ToolTip + , Qt::SplashScreen + , Qt::Desktop + , Qt::SubWindow + , Qt::ForeignWindow + , Qt::CoverWindow + , Qt::WindowType_Mask + , Qt::MSWindowsFixedSizeDialogHint + , Qt::MSWindowsOwnDC + , Qt::BypassWindowManagerHint + , Qt::FramelessWindowHint + , Qt::WindowTitleHint + , Qt::WindowSystemMenuHint + , Qt::WindowMinimizeButtonHint + , Qt::WindowMaximizeButtonHint + , Qt::WindowMinMaxButtonsHint + , Qt::WindowContextHelpButtonHint + , Qt::WindowShadeButtonHint + , Qt::WindowStaysOnTopHint + , Qt::WindowTransparentForInput + , Qt::WindowOverridesSystemGestures + , Qt::WindowDoesNotAcceptFocus + , Qt::MaximizeUsingFullscreenGeometryHint + , Qt::CustomizeWindowHint + , Qt::WindowStaysOnBottomHint + , Qt::WindowCloseButtonHint + , Qt::MacWindowToolBarButtonHint + , Qt::BypassGraphicsProxyWidget + , Qt::NoDropShadowWindowHint +}; + +static const char * const qtscript_Qt_WindowType_keys[] = { + "WindowFullscreenButtonHint" + , "Widget" + , "Window" + , "Dialog" + , "Sheet" + , "Drawer" + , "Popup" + , "Tool" + , "ToolTip" + , "SplashScreen" + , "Desktop" + , "SubWindow" + , "ForeignWindow" + , "CoverWindow" + , "WindowType_Mask" + , "MSWindowsFixedSizeDialogHint" + , "MSWindowsOwnDC" + , "BypassWindowManagerHint" + , "FramelessWindowHint" + , "WindowTitleHint" + , "WindowSystemMenuHint" + , "WindowMinimizeButtonHint" + , "WindowMaximizeButtonHint" + , "WindowMinMaxButtonsHint" + , "WindowContextHelpButtonHint" + , "WindowShadeButtonHint" + , "WindowStaysOnTopHint" + , "WindowTransparentForInput" + , "WindowOverridesSystemGestures" + , "WindowDoesNotAcceptFocus" + , "MaximizeUsingFullscreenGeometryHint" + , "CustomizeWindowHint" + , "WindowStaysOnBottomHint" + , "WindowCloseButtonHint" + , "MacWindowToolBarButtonHint" + , "BypassGraphicsProxyWidget" + , "NoDropShadowWindowHint" +}; + +static QString qtscript_Qt_WindowType_toStringHelper(Qt::WindowType value) +{ + for (int i = 0; i < 37; ++i) { + if (qtscript_Qt_WindowType_values[i] == value) + return QString::fromLatin1(qtscript_Qt_WindowType_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_WindowType_toScriptValue(QScriptEngine *engine, const Qt::WindowType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_WindowType_toStringHelper(value)); +} + +static void qtscript_Qt_WindowType_fromScriptValue(const QScriptValue &value, Qt::WindowType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_WindowType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 37; ++i) { + if (qtscript_Qt_WindowType_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("WindowType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_WindowType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WindowType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_WindowType_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WindowType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_WindowType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_WindowType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_WindowType, + qtscript_Qt_WindowType_valueOf, qtscript_Qt_WindowType_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_WindowType_toScriptValue, + qtscript_Qt_WindowType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 37; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_WindowType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_WindowType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::WindowFlags +// + +static QScriptValue qtscript_Qt_WindowFlags_toScriptValue(QScriptEngine *engine, const Qt::WindowFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_Qt_WindowFlags_fromScriptValue(const QScriptValue &value, Qt::WindowFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_Qt_WindowFlags(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WindowFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("WindowFlags(): argument %0 is not of type WindowType").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_Qt_WindowFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WindowFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_WindowFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WindowFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 37; ++i) { + if ((value & qtscript_Qt_WindowType_values[i]) == qtscript_Qt_WindowType_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_Qt_WindowType_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_Qt_WindowFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_Qt_WindowFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_Qt_WindowFlags, qtscript_Qt_WindowFlags_valueOf, + qtscript_Qt_WindowFlags_toString, qtscript_Qt_WindowFlags_equals); + qScriptRegisterMetaType(engine, qtscript_Qt_WindowFlags_toScriptValue, + qtscript_Qt_WindowFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// Qt::ImageConversionFlag +// + +static const Qt::ImageConversionFlag qtscript_Qt_ImageConversionFlag_values[] = { + Qt::AutoColor + , Qt::MonoOnly + , Qt::ColorMode_Mask + , Qt::OrderedAlphaDither + , Qt::DiffuseAlphaDither + , Qt::AlphaDither_Mask + , Qt::OrderedDither + , Qt::ThresholdDither + , Qt::Dither_Mask + , Qt::PreferDither + , Qt::AvoidDither + , Qt::DitherMode_Mask + , Qt::NoOpaqueDetection + , Qt::NoFormatConversion +}; + +static const char * const qtscript_Qt_ImageConversionFlag_keys[] = { + "AutoColor" + , "MonoOnly" + , "ColorMode_Mask" + , "OrderedAlphaDither" + , "DiffuseAlphaDither" + , "AlphaDither_Mask" + , "OrderedDither" + , "ThresholdDither" + , "Dither_Mask" + , "PreferDither" + , "AvoidDither" + , "DitherMode_Mask" + , "NoOpaqueDetection" + , "NoFormatConversion" +}; + +static QString qtscript_Qt_ImageConversionFlag_toStringHelper(Qt::ImageConversionFlag value) +{ + for (int i = 0; i < 14; ++i) { + if (qtscript_Qt_ImageConversionFlag_values[i] == value) + return QString::fromLatin1(qtscript_Qt_ImageConversionFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_ImageConversionFlag_toScriptValue(QScriptEngine *engine, const Qt::ImageConversionFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_ImageConversionFlag_toStringHelper(value)); +} + +static void qtscript_Qt_ImageConversionFlag_fromScriptValue(const QScriptValue &value, Qt::ImageConversionFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_ImageConversionFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 14; ++i) { + if (qtscript_Qt_ImageConversionFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ImageConversionFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_ImageConversionFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ImageConversionFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ImageConversionFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ImageConversionFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_ImageConversionFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_ImageConversionFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_ImageConversionFlag, + qtscript_Qt_ImageConversionFlag_valueOf, qtscript_Qt_ImageConversionFlag_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_ImageConversionFlag_toScriptValue, + qtscript_Qt_ImageConversionFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 14; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_ImageConversionFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_ImageConversionFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::ImageConversionFlags +// + +static QScriptValue qtscript_Qt_ImageConversionFlags_toScriptValue(QScriptEngine *engine, const Qt::ImageConversionFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_Qt_ImageConversionFlags_fromScriptValue(const QScriptValue &value, Qt::ImageConversionFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_Qt_ImageConversionFlags(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ImageConversionFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("ImageConversionFlags(): argument %0 is not of type ImageConversionFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_Qt_ImageConversionFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ImageConversionFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ImageConversionFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ImageConversionFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 14; ++i) { + if ((value & qtscript_Qt_ImageConversionFlag_values[i]) == qtscript_Qt_ImageConversionFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_Qt_ImageConversionFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_Qt_ImageConversionFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_Qt_ImageConversionFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_Qt_ImageConversionFlags, qtscript_Qt_ImageConversionFlags_valueOf, + qtscript_Qt_ImageConversionFlags_toString, qtscript_Qt_ImageConversionFlags_equals); + qScriptRegisterMetaType(engine, qtscript_Qt_ImageConversionFlags_toScriptValue, + qtscript_Qt_ImageConversionFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// Qt::AnchorPoint +// + +static const Qt::AnchorPoint qtscript_Qt_AnchorPoint_values[] = { + Qt::AnchorLeft + , Qt::AnchorHorizontalCenter + , Qt::AnchorRight + , Qt::AnchorTop + , Qt::AnchorVerticalCenter + , Qt::AnchorBottom +}; + +static const char * const qtscript_Qt_AnchorPoint_keys[] = { + "AnchorLeft" + , "AnchorHorizontalCenter" + , "AnchorRight" + , "AnchorTop" + , "AnchorVerticalCenter" + , "AnchorBottom" +}; + +static QString qtscript_Qt_AnchorPoint_toStringHelper(Qt::AnchorPoint value) +{ + if ((value >= Qt::AnchorLeft) && (value <= Qt::AnchorBottom)) + return qtscript_Qt_AnchorPoint_keys[static_cast(value)-static_cast(Qt::AnchorLeft)]; + return QString(); +} + +static QScriptValue qtscript_Qt_AnchorPoint_toScriptValue(QScriptEngine *engine, const Qt::AnchorPoint &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_AnchorPoint_toStringHelper(value)); +} + +static void qtscript_Qt_AnchorPoint_fromScriptValue(const QScriptValue &value, Qt::AnchorPoint &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_AnchorPoint(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::AnchorLeft) && (arg <= Qt::AnchorBottom)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("AnchorPoint(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_AnchorPoint_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::AnchorPoint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_AnchorPoint_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::AnchorPoint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_AnchorPoint_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_AnchorPoint_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_AnchorPoint, + qtscript_Qt_AnchorPoint_valueOf, qtscript_Qt_AnchorPoint_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_AnchorPoint_toScriptValue, + qtscript_Qt_AnchorPoint_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_AnchorPoint_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_AnchorPoint_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::TextFlag +// + +static const Qt::TextFlag qtscript_Qt_TextFlag_values[] = { + Qt::TextSingleLine + , Qt::TextDontClip + , Qt::TextExpandTabs + , Qt::TextShowMnemonic + , Qt::TextWordWrap + , Qt::TextWrapAnywhere + , Qt::TextDontPrint + , Qt::TextHideMnemonic + , Qt::TextJustificationForced + , Qt::TextForceLeftToRight + , Qt::TextForceRightToLeft + , Qt::TextLongestVariant + , Qt::TextBypassShaping + , Qt::TextIncludeTrailingSpaces +}; + +static const char * const qtscript_Qt_TextFlag_keys[] = { + "TextSingleLine" + , "TextDontClip" + , "TextExpandTabs" + , "TextShowMnemonic" + , "TextWordWrap" + , "TextWrapAnywhere" + , "TextDontPrint" + , "TextHideMnemonic" + , "TextJustificationForced" + , "TextForceLeftToRight" + , "TextForceRightToLeft" + , "TextLongestVariant" + , "TextBypassShaping" + , "TextIncludeTrailingSpaces" +}; + +static QString qtscript_Qt_TextFlag_toStringHelper(Qt::TextFlag value) +{ + for (int i = 0; i < 14; ++i) { + if (qtscript_Qt_TextFlag_values[i] == value) + return QString::fromLatin1(qtscript_Qt_TextFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_TextFlag_toScriptValue(QScriptEngine *engine, const Qt::TextFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_TextFlag_toStringHelper(value)); +} + +static void qtscript_Qt_TextFlag_fromScriptValue(const QScriptValue &value, Qt::TextFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_TextFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 14; ++i) { + if (qtscript_Qt_TextFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("TextFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_TextFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TextFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_TextFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TextFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_TextFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_TextFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_TextFlag, + qtscript_Qt_TextFlag_valueOf, qtscript_Qt_TextFlag_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_TextFlag_toScriptValue, + qtscript_Qt_TextFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 14; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_TextFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_TextFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::MatchFlag +// + +static const Qt::MatchFlag qtscript_Qt_MatchFlag_values[] = { + Qt::MatchExactly + , Qt::MatchContains + , Qt::MatchStartsWith + , Qt::MatchEndsWith + , Qt::MatchRegExp + , Qt::MatchWildcard + , Qt::MatchFixedString + , Qt::MatchCaseSensitive + , Qt::MatchWrap + , Qt::MatchRecursive +}; + +static const char * const qtscript_Qt_MatchFlag_keys[] = { + "MatchExactly" + , "MatchContains" + , "MatchStartsWith" + , "MatchEndsWith" + , "MatchRegExp" + , "MatchWildcard" + , "MatchFixedString" + , "MatchCaseSensitive" + , "MatchWrap" + , "MatchRecursive" +}; + +static QString qtscript_Qt_MatchFlag_toStringHelper(Qt::MatchFlag value) +{ + for (int i = 0; i < 10; ++i) { + if (qtscript_Qt_MatchFlag_values[i] == value) + return QString::fromLatin1(qtscript_Qt_MatchFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_MatchFlag_toScriptValue(QScriptEngine *engine, const Qt::MatchFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_MatchFlag_toStringHelper(value)); +} + +static void qtscript_Qt_MatchFlag_fromScriptValue(const QScriptValue &value, Qt::MatchFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_MatchFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 10; ++i) { + if (qtscript_Qt_MatchFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("MatchFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_MatchFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::MatchFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_MatchFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::MatchFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_MatchFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_MatchFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_MatchFlag, + qtscript_Qt_MatchFlag_valueOf, qtscript_Qt_MatchFlag_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_MatchFlag_toScriptValue, + qtscript_Qt_MatchFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 10; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_MatchFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_MatchFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::MatchFlags +// + +static QScriptValue qtscript_Qt_MatchFlags_toScriptValue(QScriptEngine *engine, const Qt::MatchFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_Qt_MatchFlags_fromScriptValue(const QScriptValue &value, Qt::MatchFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_Qt_MatchFlags(QScriptContext *context, QScriptEngine *engine) +{ + Qt::MatchFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("MatchFlags(): argument %0 is not of type MatchFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_Qt_MatchFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::MatchFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_MatchFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::MatchFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 10; ++i) { + if ((value & qtscript_Qt_MatchFlag_values[i]) == qtscript_Qt_MatchFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_Qt_MatchFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_Qt_MatchFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_Qt_MatchFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_Qt_MatchFlags, qtscript_Qt_MatchFlags_valueOf, + qtscript_Qt_MatchFlags_toString, qtscript_Qt_MatchFlags_equals); + qScriptRegisterMetaType(engine, qtscript_Qt_MatchFlags_toScriptValue, + qtscript_Qt_MatchFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// Qt::DateFormat +// + +static const Qt::DateFormat qtscript_Qt_DateFormat_values[] = { + Qt::TextDate + , Qt::ISODate + , Qt::SystemLocaleDate + , Qt::LocaleDate + , Qt::SystemLocaleShortDate + , Qt::SystemLocaleLongDate + , Qt::DefaultLocaleShortDate + , Qt::DefaultLocaleLongDate + , Qt::RFC2822Date +}; + +static const char * const qtscript_Qt_DateFormat_keys[] = { + "TextDate" + , "ISODate" + , "SystemLocaleDate" + , "LocaleDate" + , "SystemLocaleShortDate" + , "SystemLocaleLongDate" + , "DefaultLocaleShortDate" + , "DefaultLocaleLongDate" + , "RFC2822Date" +}; + +static QString qtscript_Qt_DateFormat_toStringHelper(Qt::DateFormat value) +{ + if ((value >= Qt::TextDate) && (value <= Qt::RFC2822Date)) + return qtscript_Qt_DateFormat_keys[static_cast(value)-static_cast(Qt::TextDate)]; + return QString(); +} + +static QScriptValue qtscript_Qt_DateFormat_toScriptValue(QScriptEngine *engine, const Qt::DateFormat &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_DateFormat_toStringHelper(value)); +} + +static void qtscript_Qt_DateFormat_fromScriptValue(const QScriptValue &value, Qt::DateFormat &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_DateFormat(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::TextDate) && (arg <= Qt::RFC2822Date)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("DateFormat(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_DateFormat_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::DateFormat value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_DateFormat_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::DateFormat value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_DateFormat_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_DateFormat_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_DateFormat, + qtscript_Qt_DateFormat_valueOf, qtscript_Qt_DateFormat_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_DateFormat_toScriptValue, + qtscript_Qt_DateFormat_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 9; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_DateFormat_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_DateFormat_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::DockWidgetAreaSizes +// + +static const Qt::DockWidgetAreaSizes qtscript_Qt_DockWidgetAreaSizes_values[] = { + Qt::NDockWidgetAreas +}; + +static const char * const qtscript_Qt_DockWidgetAreaSizes_keys[] = { + "NDockWidgetAreas" +}; + +static QString qtscript_Qt_DockWidgetAreaSizes_toStringHelper(Qt::DockWidgetAreaSizes value) +{ + if ((value >= Qt::NDockWidgetAreas) && (value <= Qt::NDockWidgetAreas)) + return qtscript_Qt_DockWidgetAreaSizes_keys[static_cast(value)-static_cast(Qt::NDockWidgetAreas)]; + return QString(); +} + +static QScriptValue qtscript_Qt_DockWidgetAreaSizes_toScriptValue(QScriptEngine *engine, const Qt::DockWidgetAreaSizes &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_DockWidgetAreaSizes_toStringHelper(value)); +} + +static void qtscript_Qt_DockWidgetAreaSizes_fromScriptValue(const QScriptValue &value, Qt::DockWidgetAreaSizes &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_DockWidgetAreaSizes(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::NDockWidgetAreas) && (arg <= Qt::NDockWidgetAreas)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("DockWidgetAreaSizes(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_DockWidgetAreaSizes_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::DockWidgetAreaSizes value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_DockWidgetAreaSizes_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::DockWidgetAreaSizes value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_DockWidgetAreaSizes_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_DockWidgetAreaSizes_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_DockWidgetAreaSizes, + qtscript_Qt_DockWidgetAreaSizes_valueOf, qtscript_Qt_DockWidgetAreaSizes_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_DockWidgetAreaSizes_toScriptValue, + qtscript_Qt_DockWidgetAreaSizes_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_DockWidgetAreaSizes_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_DockWidgetAreaSizes_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::ArrowType +// + +static const Qt::ArrowType qtscript_Qt_ArrowType_values[] = { + Qt::NoArrow + , Qt::UpArrow + , Qt::DownArrow + , Qt::LeftArrow + , Qt::RightArrow +}; + +static const char * const qtscript_Qt_ArrowType_keys[] = { + "NoArrow" + , "UpArrow" + , "DownArrow" + , "LeftArrow" + , "RightArrow" +}; + +static QString qtscript_Qt_ArrowType_toStringHelper(Qt::ArrowType value) +{ + if ((value >= Qt::NoArrow) && (value <= Qt::RightArrow)) + return qtscript_Qt_ArrowType_keys[static_cast(value)-static_cast(Qt::NoArrow)]; + return QString(); +} + +static QScriptValue qtscript_Qt_ArrowType_toScriptValue(QScriptEngine *engine, const Qt::ArrowType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_ArrowType_toStringHelper(value)); +} + +static void qtscript_Qt_ArrowType_fromScriptValue(const QScriptValue &value, Qt::ArrowType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_ArrowType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::NoArrow) && (arg <= Qt::RightArrow)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ArrowType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_ArrowType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ArrowType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ArrowType_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ArrowType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_ArrowType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_ArrowType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_ArrowType, + qtscript_Qt_ArrowType_valueOf, qtscript_Qt_ArrowType_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_ArrowType_toScriptValue, + qtscript_Qt_ArrowType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_ArrowType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_ArrowType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::ItemFlag +// + +static const Qt::ItemFlag qtscript_Qt_ItemFlag_values[] = { + Qt::NoItemFlags + , Qt::ItemIsSelectable + , Qt::ItemIsEditable + , Qt::ItemIsDragEnabled + , Qt::ItemIsDropEnabled + , Qt::ItemIsUserCheckable + , Qt::ItemIsEnabled + , Qt::ItemIsAutoTristate + , Qt::ItemNeverHasChildren + , Qt::ItemIsUserTristate +}; + +static const char * const qtscript_Qt_ItemFlag_keys[] = { + "NoItemFlags" + , "ItemIsSelectable" + , "ItemIsEditable" + , "ItemIsDragEnabled" + , "ItemIsDropEnabled" + , "ItemIsUserCheckable" + , "ItemIsEnabled" + , "ItemIsAutoTristate" + , "ItemNeverHasChildren" + , "ItemIsUserTristate" +}; + +static QString qtscript_Qt_ItemFlag_toStringHelper(Qt::ItemFlag value) +{ + for (int i = 0; i < 10; ++i) { + if (qtscript_Qt_ItemFlag_values[i] == value) + return QString::fromLatin1(qtscript_Qt_ItemFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_ItemFlag_toScriptValue(QScriptEngine *engine, const Qt::ItemFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_ItemFlag_toStringHelper(value)); +} + +static void qtscript_Qt_ItemFlag_fromScriptValue(const QScriptValue &value, Qt::ItemFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_ItemFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 10; ++i) { + if (qtscript_Qt_ItemFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ItemFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_ItemFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ItemFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ItemFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ItemFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_ItemFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_ItemFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_ItemFlag, + qtscript_Qt_ItemFlag_valueOf, qtscript_Qt_ItemFlag_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_ItemFlag_toScriptValue, + qtscript_Qt_ItemFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 10; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_ItemFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_ItemFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::ItemFlags +// + +static QScriptValue qtscript_Qt_ItemFlags_toScriptValue(QScriptEngine *engine, const Qt::ItemFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_Qt_ItemFlags_fromScriptValue(const QScriptValue &value, Qt::ItemFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_Qt_ItemFlags(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ItemFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("ItemFlags(): argument %0 is not of type ItemFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_Qt_ItemFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ItemFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ItemFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ItemFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 10; ++i) { + if ((value & qtscript_Qt_ItemFlag_values[i]) == qtscript_Qt_ItemFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_Qt_ItemFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_Qt_ItemFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_Qt_ItemFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_Qt_ItemFlags, qtscript_Qt_ItemFlags_valueOf, + qtscript_Qt_ItemFlags_toString, qtscript_Qt_ItemFlags_equals); + qScriptRegisterMetaType(engine, qtscript_Qt_ItemFlags_toScriptValue, + qtscript_Qt_ItemFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// Qt::PenCapStyle +// + +static const Qt::PenCapStyle qtscript_Qt_PenCapStyle_values[] = { + Qt::FlatCap + , Qt::SquareCap + , Qt::RoundCap + , Qt::MPenCapStyle +}; + +static const char * const qtscript_Qt_PenCapStyle_keys[] = { + "FlatCap" + , "SquareCap" + , "RoundCap" + , "MPenCapStyle" +}; + +static QString qtscript_Qt_PenCapStyle_toStringHelper(Qt::PenCapStyle value) +{ + for (int i = 0; i < 4; ++i) { + if (qtscript_Qt_PenCapStyle_values[i] == value) + return QString::fromLatin1(qtscript_Qt_PenCapStyle_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_PenCapStyle_toScriptValue(QScriptEngine *engine, const Qt::PenCapStyle &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_PenCapStyle_toStringHelper(value)); +} + +static void qtscript_Qt_PenCapStyle_fromScriptValue(const QScriptValue &value, Qt::PenCapStyle &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_PenCapStyle(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 4; ++i) { + if (qtscript_Qt_PenCapStyle_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("PenCapStyle(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_PenCapStyle_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::PenCapStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_PenCapStyle_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::PenCapStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_PenCapStyle_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_PenCapStyle_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_PenCapStyle, + qtscript_Qt_PenCapStyle_valueOf, qtscript_Qt_PenCapStyle_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_PenCapStyle_toScriptValue, + qtscript_Qt_PenCapStyle_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_PenCapStyle_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_PenCapStyle_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::KeyboardModifier +// + +static const Qt::KeyboardModifier qtscript_Qt_KeyboardModifier_values[] = { + Qt::KeyboardModifierMask + , Qt::NoModifier + , Qt::ShiftModifier + , Qt::ControlModifier + , Qt::AltModifier + , Qt::MetaModifier + , Qt::KeypadModifier + , Qt::GroupSwitchModifier +}; + +static const char * const qtscript_Qt_KeyboardModifier_keys[] = { + "KeyboardModifierMask" + , "NoModifier" + , "ShiftModifier" + , "ControlModifier" + , "AltModifier" + , "MetaModifier" + , "KeypadModifier" + , "GroupSwitchModifier" +}; + +static QString qtscript_Qt_KeyboardModifier_toStringHelper(Qt::KeyboardModifier value) +{ + for (int i = 0; i < 8; ++i) { + if (qtscript_Qt_KeyboardModifier_values[i] == value) + return QString::fromLatin1(qtscript_Qt_KeyboardModifier_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_KeyboardModifier_toScriptValue(QScriptEngine *engine, const Qt::KeyboardModifier &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_KeyboardModifier_toStringHelper(value)); +} + +static void qtscript_Qt_KeyboardModifier_fromScriptValue(const QScriptValue &value, Qt::KeyboardModifier &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_KeyboardModifier(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 8; ++i) { + if (qtscript_Qt_KeyboardModifier_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("KeyboardModifier(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_KeyboardModifier_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::KeyboardModifier value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_KeyboardModifier_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::KeyboardModifier value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_KeyboardModifier_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_KeyboardModifier_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_KeyboardModifier, + qtscript_Qt_KeyboardModifier_valueOf, qtscript_Qt_KeyboardModifier_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_KeyboardModifier_toScriptValue, + qtscript_Qt_KeyboardModifier_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 8; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_KeyboardModifier_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_KeyboardModifier_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::KeyboardModifiers +// + +static QScriptValue qtscript_Qt_KeyboardModifiers_toScriptValue(QScriptEngine *engine, const Qt::KeyboardModifiers &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_Qt_KeyboardModifiers_fromScriptValue(const QScriptValue &value, Qt::KeyboardModifiers &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_Qt_KeyboardModifiers(QScriptContext *context, QScriptEngine *engine) +{ + Qt::KeyboardModifiers result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("KeyboardModifiers(): argument %0 is not of type KeyboardModifier").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_Qt_KeyboardModifiers_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::KeyboardModifiers value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_KeyboardModifiers_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::KeyboardModifiers value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 8; ++i) { + if ((value & qtscript_Qt_KeyboardModifier_values[i]) == qtscript_Qt_KeyboardModifier_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_Qt_KeyboardModifier_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_Qt_KeyboardModifiers_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_Qt_KeyboardModifiers_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_Qt_KeyboardModifiers, qtscript_Qt_KeyboardModifiers_valueOf, + qtscript_Qt_KeyboardModifiers_toString, qtscript_Qt_KeyboardModifiers_equals); + qScriptRegisterMetaType(engine, qtscript_Qt_KeyboardModifiers_toScriptValue, + qtscript_Qt_KeyboardModifiers_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// Qt::LayoutDirection +// + +static const Qt::LayoutDirection qtscript_Qt_LayoutDirection_values[] = { + Qt::LeftToRight + , Qt::RightToLeft + , Qt::LayoutDirectionAuto +}; + +static const char * const qtscript_Qt_LayoutDirection_keys[] = { + "LeftToRight" + , "RightToLeft" + , "LayoutDirectionAuto" +}; + +static QString qtscript_Qt_LayoutDirection_toStringHelper(Qt::LayoutDirection value) +{ + if ((value >= Qt::LeftToRight) && (value <= Qt::LayoutDirectionAuto)) + return qtscript_Qt_LayoutDirection_keys[static_cast(value)-static_cast(Qt::LeftToRight)]; + return QString(); +} + +static QScriptValue qtscript_Qt_LayoutDirection_toScriptValue(QScriptEngine *engine, const Qt::LayoutDirection &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_LayoutDirection_toStringHelper(value)); +} + +static void qtscript_Qt_LayoutDirection_fromScriptValue(const QScriptValue &value, Qt::LayoutDirection &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_LayoutDirection(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::LeftToRight) && (arg <= Qt::LayoutDirectionAuto)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("LayoutDirection(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_LayoutDirection_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::LayoutDirection value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_LayoutDirection_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::LayoutDirection value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_LayoutDirection_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_LayoutDirection_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_LayoutDirection, + qtscript_Qt_LayoutDirection_valueOf, qtscript_Qt_LayoutDirection_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_LayoutDirection_toScriptValue, + qtscript_Qt_LayoutDirection_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_LayoutDirection_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_LayoutDirection_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::GestureType +// + +static const Qt::GestureType qtscript_Qt_GestureType_values[] = { + Qt::TapGesture + , Qt::TapAndHoldGesture + , Qt::PanGesture + , Qt::PinchGesture + , Qt::SwipeGesture + , Qt::CustomGesture + , Qt::LastGestureType +}; + +static const char * const qtscript_Qt_GestureType_keys[] = { + "TapGesture" + , "TapAndHoldGesture" + , "PanGesture" + , "PinchGesture" + , "SwipeGesture" + , "CustomGesture" + , "LastGestureType" +}; + +static QString qtscript_Qt_GestureType_toStringHelper(Qt::GestureType value) +{ + for (int i = 0; i < 7; ++i) { + if (qtscript_Qt_GestureType_values[i] == value) + return QString::fromLatin1(qtscript_Qt_GestureType_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_GestureType_toScriptValue(QScriptEngine *engine, const Qt::GestureType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_GestureType_toStringHelper(value)); +} + +static void qtscript_Qt_GestureType_fromScriptValue(const QScriptValue &value, Qt::GestureType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_GestureType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 7; ++i) { + if (qtscript_Qt_GestureType_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("GestureType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_GestureType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::GestureType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_GestureType_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::GestureType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_GestureType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_GestureType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_GestureType, + qtscript_Qt_GestureType_valueOf, qtscript_Qt_GestureType_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_GestureType_toScriptValue, + qtscript_Qt_GestureType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 7; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_GestureType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_GestureType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::DockWidgetArea +// + +static const Qt::DockWidgetArea qtscript_Qt_DockWidgetArea_values[] = { + Qt::NoDockWidgetArea + , Qt::LeftDockWidgetArea + , Qt::RightDockWidgetArea + , Qt::TopDockWidgetArea + , Qt::BottomDockWidgetArea + , Qt::DockWidgetArea_Mask +}; + +static const char * const qtscript_Qt_DockWidgetArea_keys[] = { + "NoDockWidgetArea" + , "LeftDockWidgetArea" + , "RightDockWidgetArea" + , "TopDockWidgetArea" + , "BottomDockWidgetArea" + , "DockWidgetArea_Mask" +}; + +static QString qtscript_Qt_DockWidgetArea_toStringHelper(Qt::DockWidgetArea value) +{ + for (int i = 0; i < 6; ++i) { + if (qtscript_Qt_DockWidgetArea_values[i] == value) + return QString::fromLatin1(qtscript_Qt_DockWidgetArea_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_DockWidgetArea_toScriptValue(QScriptEngine *engine, const Qt::DockWidgetArea &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_DockWidgetArea_toStringHelper(value)); +} + +static void qtscript_Qt_DockWidgetArea_fromScriptValue(const QScriptValue &value, Qt::DockWidgetArea &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_DockWidgetArea(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 6; ++i) { + if (qtscript_Qt_DockWidgetArea_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("DockWidgetArea(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_DockWidgetArea_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::DockWidgetArea value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_DockWidgetArea_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::DockWidgetArea value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_DockWidgetArea_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_DockWidgetArea_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_DockWidgetArea, + qtscript_Qt_DockWidgetArea_valueOf, qtscript_Qt_DockWidgetArea_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_DockWidgetArea_toScriptValue, + qtscript_Qt_DockWidgetArea_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_DockWidgetArea_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_DockWidgetArea_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::DockWidgetAreas +// + +static QScriptValue qtscript_Qt_DockWidgetAreas_toScriptValue(QScriptEngine *engine, const Qt::DockWidgetAreas &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_Qt_DockWidgetAreas_fromScriptValue(const QScriptValue &value, Qt::DockWidgetAreas &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_Qt_DockWidgetAreas(QScriptContext *context, QScriptEngine *engine) +{ + Qt::DockWidgetAreas result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("DockWidgetAreas(): argument %0 is not of type DockWidgetArea").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_Qt_DockWidgetAreas_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::DockWidgetAreas value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_DockWidgetAreas_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::DockWidgetAreas value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 6; ++i) { + if ((value & qtscript_Qt_DockWidgetArea_values[i]) == qtscript_Qt_DockWidgetArea_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_Qt_DockWidgetArea_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_Qt_DockWidgetAreas_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_Qt_DockWidgetAreas_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_Qt_DockWidgetAreas, qtscript_Qt_DockWidgetAreas_valueOf, + qtscript_Qt_DockWidgetAreas_toString, qtscript_Qt_DockWidgetAreas_equals); + qScriptRegisterMetaType(engine, qtscript_Qt_DockWidgetAreas_toScriptValue, + qtscript_Qt_DockWidgetAreas_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// Qt::UIEffect +// + +static const Qt::UIEffect qtscript_Qt_UIEffect_values[] = { + Qt::UI_General + , Qt::UI_AnimateMenu + , Qt::UI_FadeMenu + , Qt::UI_AnimateCombo + , Qt::UI_AnimateTooltip + , Qt::UI_FadeTooltip + , Qt::UI_AnimateToolBox +}; + +static const char * const qtscript_Qt_UIEffect_keys[] = { + "UI_General" + , "UI_AnimateMenu" + , "UI_FadeMenu" + , "UI_AnimateCombo" + , "UI_AnimateTooltip" + , "UI_FadeTooltip" + , "UI_AnimateToolBox" +}; + +static QString qtscript_Qt_UIEffect_toStringHelper(Qt::UIEffect value) +{ + if ((value >= Qt::UI_General) && (value <= Qt::UI_AnimateToolBox)) + return qtscript_Qt_UIEffect_keys[static_cast(value)-static_cast(Qt::UI_General)]; + return QString(); +} + +static QScriptValue qtscript_Qt_UIEffect_toScriptValue(QScriptEngine *engine, const Qt::UIEffect &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_UIEffect_toStringHelper(value)); +} + +static void qtscript_Qt_UIEffect_fromScriptValue(const QScriptValue &value, Qt::UIEffect &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_UIEffect(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::UI_General) && (arg <= Qt::UI_AnimateToolBox)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("UIEffect(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_UIEffect_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::UIEffect value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_UIEffect_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::UIEffect value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_UIEffect_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_UIEffect_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_UIEffect, + qtscript_Qt_UIEffect_valueOf, qtscript_Qt_UIEffect_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_UIEffect_toScriptValue, + qtscript_Qt_UIEffect_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 7; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_UIEffect_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_UIEffect_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::InputMethodHint +// + +static const Qt::InputMethodHint qtscript_Qt_InputMethodHint_values[] = { + Qt::ImhExclusiveInputMask + , Qt::ImhNone + , Qt::ImhHiddenText + , Qt::ImhSensitiveData + , Qt::ImhNoAutoUppercase + , Qt::ImhPreferNumbers + , Qt::ImhPreferUppercase + , Qt::ImhPreferLowercase + , Qt::ImhNoPredictiveText + , Qt::ImhDate + , Qt::ImhTime + , Qt::ImhPreferLatin + , Qt::ImhMultiLine + , Qt::ImhDigitsOnly + , Qt::ImhFormattedNumbersOnly + , Qt::ImhUppercaseOnly + , Qt::ImhLowercaseOnly + , Qt::ImhDialableCharactersOnly + , Qt::ImhEmailCharactersOnly + , Qt::ImhUrlCharactersOnly + , Qt::ImhLatinOnly +}; + +static const char * const qtscript_Qt_InputMethodHint_keys[] = { + "ImhExclusiveInputMask" + , "ImhNone" + , "ImhHiddenText" + , "ImhSensitiveData" + , "ImhNoAutoUppercase" + , "ImhPreferNumbers" + , "ImhPreferUppercase" + , "ImhPreferLowercase" + , "ImhNoPredictiveText" + , "ImhDate" + , "ImhTime" + , "ImhPreferLatin" + , "ImhMultiLine" + , "ImhDigitsOnly" + , "ImhFormattedNumbersOnly" + , "ImhUppercaseOnly" + , "ImhLowercaseOnly" + , "ImhDialableCharactersOnly" + , "ImhEmailCharactersOnly" + , "ImhUrlCharactersOnly" + , "ImhLatinOnly" +}; + +static QString qtscript_Qt_InputMethodHint_toStringHelper(Qt::InputMethodHint value) +{ + for (int i = 0; i < 21; ++i) { + if (qtscript_Qt_InputMethodHint_values[i] == value) + return QString::fromLatin1(qtscript_Qt_InputMethodHint_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_InputMethodHint_toScriptValue(QScriptEngine *engine, const Qt::InputMethodHint &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_InputMethodHint_toStringHelper(value)); +} + +static void qtscript_Qt_InputMethodHint_fromScriptValue(const QScriptValue &value, Qt::InputMethodHint &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_InputMethodHint(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 21; ++i) { + if (qtscript_Qt_InputMethodHint_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("InputMethodHint(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_InputMethodHint_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::InputMethodHint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_InputMethodHint_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::InputMethodHint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_InputMethodHint_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_InputMethodHint_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_InputMethodHint, + qtscript_Qt_InputMethodHint_valueOf, qtscript_Qt_InputMethodHint_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_InputMethodHint_toScriptValue, + qtscript_Qt_InputMethodHint_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 21; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_InputMethodHint_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_InputMethodHint_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::InputMethodHints +// + +static QScriptValue qtscript_Qt_InputMethodHints_toScriptValue(QScriptEngine *engine, const Qt::InputMethodHints &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_Qt_InputMethodHints_fromScriptValue(const QScriptValue &value, Qt::InputMethodHints &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_Qt_InputMethodHints(QScriptContext *context, QScriptEngine *engine) +{ + Qt::InputMethodHints result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("InputMethodHints(): argument %0 is not of type InputMethodHint").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_Qt_InputMethodHints_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::InputMethodHints value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_InputMethodHints_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::InputMethodHints value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 21; ++i) { + if ((value & qtscript_Qt_InputMethodHint_values[i]) == qtscript_Qt_InputMethodHint_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_Qt_InputMethodHint_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_Qt_InputMethodHints_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_Qt_InputMethodHints_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_Qt_InputMethodHints, qtscript_Qt_InputMethodHints_valueOf, + qtscript_Qt_InputMethodHints_toString, qtscript_Qt_InputMethodHints_equals); + qScriptRegisterMetaType(engine, qtscript_Qt_InputMethodHints_toScriptValue, + qtscript_Qt_InputMethodHints_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// Qt::CoordinateSystem +// + +static const Qt::CoordinateSystem qtscript_Qt_CoordinateSystem_values[] = { + Qt::DeviceCoordinates + , Qt::LogicalCoordinates +}; + +static const char * const qtscript_Qt_CoordinateSystem_keys[] = { + "DeviceCoordinates" + , "LogicalCoordinates" +}; + +static QString qtscript_Qt_CoordinateSystem_toStringHelper(Qt::CoordinateSystem value) +{ + if ((value >= Qt::DeviceCoordinates) && (value <= Qt::LogicalCoordinates)) + return qtscript_Qt_CoordinateSystem_keys[static_cast(value)-static_cast(Qt::DeviceCoordinates)]; + return QString(); +} + +static QScriptValue qtscript_Qt_CoordinateSystem_toScriptValue(QScriptEngine *engine, const Qt::CoordinateSystem &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_CoordinateSystem_toStringHelper(value)); +} + +static void qtscript_Qt_CoordinateSystem_fromScriptValue(const QScriptValue &value, Qt::CoordinateSystem &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_CoordinateSystem(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::DeviceCoordinates) && (arg <= Qt::LogicalCoordinates)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("CoordinateSystem(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_CoordinateSystem_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::CoordinateSystem value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_CoordinateSystem_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::CoordinateSystem value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_CoordinateSystem_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_CoordinateSystem_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_CoordinateSystem, + qtscript_Qt_CoordinateSystem_valueOf, qtscript_Qt_CoordinateSystem_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_CoordinateSystem_toScriptValue, + qtscript_Qt_CoordinateSystem_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_CoordinateSystem_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_CoordinateSystem_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::TextElideMode +// + +static const Qt::TextElideMode qtscript_Qt_TextElideMode_values[] = { + Qt::ElideLeft + , Qt::ElideRight + , Qt::ElideMiddle + , Qt::ElideNone +}; + +static const char * const qtscript_Qt_TextElideMode_keys[] = { + "ElideLeft" + , "ElideRight" + , "ElideMiddle" + , "ElideNone" +}; + +static QString qtscript_Qt_TextElideMode_toStringHelper(Qt::TextElideMode value) +{ + if ((value >= Qt::ElideLeft) && (value <= Qt::ElideNone)) + return qtscript_Qt_TextElideMode_keys[static_cast(value)-static_cast(Qt::ElideLeft)]; + return QString(); +} + +static QScriptValue qtscript_Qt_TextElideMode_toScriptValue(QScriptEngine *engine, const Qt::TextElideMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_TextElideMode_toStringHelper(value)); +} + +static void qtscript_Qt_TextElideMode_fromScriptValue(const QScriptValue &value, Qt::TextElideMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_TextElideMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::ElideLeft) && (arg <= Qt::ElideNone)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("TextElideMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_TextElideMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TextElideMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_TextElideMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TextElideMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_TextElideMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_TextElideMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_TextElideMode, + qtscript_Qt_TextElideMode_valueOf, qtscript_Qt_TextElideMode_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_TextElideMode_toScriptValue, + qtscript_Qt_TextElideMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_TextElideMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_TextElideMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::ApplicationAttribute +// + +static const Qt::ApplicationAttribute qtscript_Qt_ApplicationAttribute_values[] = { + Qt::AA_ImmediateWidgetCreation + , Qt::AA_MSWindowsUseDirect3DByDefault + , Qt::AA_DontShowIconsInMenus + , Qt::AA_NativeWindows + , Qt::AA_DontCreateNativeWidgetSiblings + , Qt::AA_MacPluginApplication + , Qt::AA_DontUseNativeMenuBar + , Qt::AA_MacDontSwapCtrlAndMeta + , Qt::AA_Use96Dpi + , Qt::AA_X11InitThreads + , Qt::AA_SynthesizeTouchForUnhandledMouseEvents + , Qt::AA_SynthesizeMouseForUnhandledTouchEvents + , Qt::AA_UseHighDpiPixmaps + , Qt::AA_ForceRasterWidgets + , Qt::AA_UseDesktopOpenGL + , Qt::AA_UseOpenGLES + , Qt::AA_UseSoftwareOpenGL + , Qt::AA_ShareOpenGLContexts + , Qt::AA_SetPalette + , Qt::AA_EnableHighDpiScaling + , Qt::AA_DisableHighDpiScaling + , Qt::AA_AttributeCount +}; + +static const char * const qtscript_Qt_ApplicationAttribute_keys[] = { + "AA_ImmediateWidgetCreation" + , "AA_MSWindowsUseDirect3DByDefault" + , "AA_DontShowIconsInMenus" + , "AA_NativeWindows" + , "AA_DontCreateNativeWidgetSiblings" + , "AA_MacPluginApplication" + , "AA_DontUseNativeMenuBar" + , "AA_MacDontSwapCtrlAndMeta" + , "AA_Use96Dpi" + , "AA_X11InitThreads" + , "AA_SynthesizeTouchForUnhandledMouseEvents" + , "AA_SynthesizeMouseForUnhandledTouchEvents" + , "AA_UseHighDpiPixmaps" + , "AA_ForceRasterWidgets" + , "AA_UseDesktopOpenGL" + , "AA_UseOpenGLES" + , "AA_UseSoftwareOpenGL" + , "AA_ShareOpenGLContexts" + , "AA_SetPalette" + , "AA_EnableHighDpiScaling" + , "AA_DisableHighDpiScaling" + , "AA_AttributeCount" +}; + +static QString qtscript_Qt_ApplicationAttribute_toStringHelper(Qt::ApplicationAttribute value) +{ + for (int i = 0; i < 22; ++i) { + if (qtscript_Qt_ApplicationAttribute_values[i] == value) + return QString::fromLatin1(qtscript_Qt_ApplicationAttribute_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_ApplicationAttribute_toScriptValue(QScriptEngine *engine, const Qt::ApplicationAttribute &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_ApplicationAttribute_toStringHelper(value)); +} + +static void qtscript_Qt_ApplicationAttribute_fromScriptValue(const QScriptValue &value, Qt::ApplicationAttribute &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_ApplicationAttribute(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 22; ++i) { + if (qtscript_Qt_ApplicationAttribute_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ApplicationAttribute(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_ApplicationAttribute_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ApplicationAttribute value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ApplicationAttribute_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ApplicationAttribute value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_ApplicationAttribute_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_ApplicationAttribute_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_ApplicationAttribute, + qtscript_Qt_ApplicationAttribute_valueOf, qtscript_Qt_ApplicationAttribute_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_ApplicationAttribute_toScriptValue, + qtscript_Qt_ApplicationAttribute_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 22; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_ApplicationAttribute_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_ApplicationAttribute_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::MouseButton +// + +static const Qt::MouseButton qtscript_Qt_MouseButton_values[] = { + Qt::MouseButtonMask + , Qt::NoButton + , Qt::LeftButton + , Qt::RightButton + , Qt::MidButton + , Qt::BackButton + , Qt::ForwardButton + , Qt::TaskButton + , Qt::ExtraButton4 + , Qt::ExtraButton5 + , Qt::ExtraButton6 + , Qt::ExtraButton7 + , Qt::ExtraButton8 + , Qt::ExtraButton9 + , Qt::ExtraButton10 + , Qt::ExtraButton11 + , Qt::ExtraButton12 + , Qt::ExtraButton13 + , Qt::ExtraButton14 + , Qt::ExtraButton15 + , Qt::ExtraButton16 + , Qt::ExtraButton17 + , Qt::ExtraButton18 + , Qt::ExtraButton19 + , Qt::ExtraButton20 + , Qt::ExtraButton21 + , Qt::ExtraButton22 + , Qt::ExtraButton23 + , Qt::ExtraButton24 + , Qt::AllButtons +}; + +static const char * const qtscript_Qt_MouseButton_keys[] = { + "MouseButtonMask" + , "NoButton" + , "LeftButton" + , "RightButton" + , "MidButton" + , "BackButton" + , "ForwardButton" + , "TaskButton" + , "ExtraButton4" + , "ExtraButton5" + , "ExtraButton6" + , "ExtraButton7" + , "ExtraButton8" + , "ExtraButton9" + , "ExtraButton10" + , "ExtraButton11" + , "ExtraButton12" + , "ExtraButton13" + , "ExtraButton14" + , "ExtraButton15" + , "ExtraButton16" + , "ExtraButton17" + , "ExtraButton18" + , "ExtraButton19" + , "ExtraButton20" + , "ExtraButton21" + , "ExtraButton22" + , "ExtraButton23" + , "ExtraButton24" + , "AllButtons" +}; + +static QString qtscript_Qt_MouseButton_toStringHelper(Qt::MouseButton value) +{ + for (int i = 0; i < 30; ++i) { + if (qtscript_Qt_MouseButton_values[i] == value) + return QString::fromLatin1(qtscript_Qt_MouseButton_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_MouseButton_toScriptValue(QScriptEngine *engine, const Qt::MouseButton &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_MouseButton_toStringHelper(value)); +} + +static void qtscript_Qt_MouseButton_fromScriptValue(const QScriptValue &value, Qt::MouseButton &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_MouseButton(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 30; ++i) { + if (qtscript_Qt_MouseButton_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("MouseButton(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_MouseButton_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::MouseButton value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_MouseButton_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::MouseButton value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_MouseButton_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_MouseButton_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_MouseButton, + qtscript_Qt_MouseButton_valueOf, qtscript_Qt_MouseButton_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_MouseButton_toScriptValue, + qtscript_Qt_MouseButton_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 30; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_MouseButton_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_MouseButton_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::MouseButtons +// + +static QScriptValue qtscript_Qt_MouseButtons_toScriptValue(QScriptEngine *engine, const Qt::MouseButtons &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_Qt_MouseButtons_fromScriptValue(const QScriptValue &value, Qt::MouseButtons &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_Qt_MouseButtons(QScriptContext *context, QScriptEngine *engine) +{ + Qt::MouseButtons result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("MouseButtons(): argument %0 is not of type MouseButton").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_Qt_MouseButtons_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::MouseButtons value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_MouseButtons_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::MouseButtons value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 30; ++i) { + if ((value & qtscript_Qt_MouseButton_values[i]) == qtscript_Qt_MouseButton_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_Qt_MouseButton_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_Qt_MouseButtons_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_Qt_MouseButtons_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_Qt_MouseButtons, qtscript_Qt_MouseButtons_valueOf, + qtscript_Qt_MouseButtons_toString, qtscript_Qt_MouseButtons_equals); + qScriptRegisterMetaType(engine, qtscript_Qt_MouseButtons_toScriptValue, + qtscript_Qt_MouseButtons_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// Qt::ItemDataRole +// + +static const Qt::ItemDataRole qtscript_Qt_ItemDataRole_values[] = { + Qt::DisplayRole + , Qt::DecorationRole + , Qt::EditRole + , Qt::ToolTipRole + , Qt::StatusTipRole + , Qt::WhatsThisRole + , Qt::FontRole + , Qt::TextAlignmentRole + , Qt::BackgroundColorRole + , Qt::TextColorRole + , Qt::CheckStateRole + , Qt::AccessibleTextRole + , Qt::AccessibleDescriptionRole + , Qt::SizeHintRole + , Qt::InitialSortOrderRole + , Qt::DisplayPropertyRole + , Qt::DecorationPropertyRole + , Qt::ToolTipPropertyRole + , Qt::StatusTipPropertyRole + , Qt::WhatsThisPropertyRole + , Qt::UserRole +}; + +static const char * const qtscript_Qt_ItemDataRole_keys[] = { + "DisplayRole" + , "DecorationRole" + , "EditRole" + , "ToolTipRole" + , "StatusTipRole" + , "WhatsThisRole" + , "FontRole" + , "TextAlignmentRole" + , "BackgroundColorRole" + , "TextColorRole" + , "CheckStateRole" + , "AccessibleTextRole" + , "AccessibleDescriptionRole" + , "SizeHintRole" + , "InitialSortOrderRole" + , "DisplayPropertyRole" + , "DecorationPropertyRole" + , "ToolTipPropertyRole" + , "StatusTipPropertyRole" + , "WhatsThisPropertyRole" + , "UserRole" +}; + +static QString qtscript_Qt_ItemDataRole_toStringHelper(Qt::ItemDataRole value) +{ + for (int i = 0; i < 21; ++i) { + if (qtscript_Qt_ItemDataRole_values[i] == value) + return QString::fromLatin1(qtscript_Qt_ItemDataRole_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_ItemDataRole_toScriptValue(QScriptEngine *engine, const Qt::ItemDataRole &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_ItemDataRole_toStringHelper(value)); +} + +static void qtscript_Qt_ItemDataRole_fromScriptValue(const QScriptValue &value, Qt::ItemDataRole &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_ItemDataRole(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 21; ++i) { + if (qtscript_Qt_ItemDataRole_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ItemDataRole(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_ItemDataRole_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ItemDataRole value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ItemDataRole_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ItemDataRole value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_ItemDataRole_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_ItemDataRole_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_ItemDataRole, + qtscript_Qt_ItemDataRole_valueOf, qtscript_Qt_ItemDataRole_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_ItemDataRole_toScriptValue, + qtscript_Qt_ItemDataRole_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 21; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_ItemDataRole_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_ItemDataRole_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::CursorShape +// + +static const Qt::CursorShape qtscript_Qt_CursorShape_values[] = { + Qt::ArrowCursor + , Qt::UpArrowCursor + , Qt::CrossCursor + , Qt::WaitCursor + , Qt::IBeamCursor + , Qt::SizeVerCursor + , Qt::SizeHorCursor + , Qt::SizeBDiagCursor + , Qt::SizeFDiagCursor + , Qt::SizeAllCursor + , Qt::BlankCursor + , Qt::SplitVCursor + , Qt::SplitHCursor + , Qt::PointingHandCursor + , Qt::ForbiddenCursor + , Qt::WhatsThisCursor + , Qt::BusyCursor + , Qt::OpenHandCursor + , Qt::ClosedHandCursor + , Qt::DragCopyCursor + , Qt::DragMoveCursor + , Qt::DragLinkCursor + , Qt::BitmapCursor + , Qt::CustomCursor +}; + +static const char * const qtscript_Qt_CursorShape_keys[] = { + "ArrowCursor" + , "UpArrowCursor" + , "CrossCursor" + , "WaitCursor" + , "IBeamCursor" + , "SizeVerCursor" + , "SizeHorCursor" + , "SizeBDiagCursor" + , "SizeFDiagCursor" + , "SizeAllCursor" + , "BlankCursor" + , "SplitVCursor" + , "SplitHCursor" + , "PointingHandCursor" + , "ForbiddenCursor" + , "WhatsThisCursor" + , "BusyCursor" + , "OpenHandCursor" + , "ClosedHandCursor" + , "DragCopyCursor" + , "DragMoveCursor" + , "DragLinkCursor" + , "BitmapCursor" + , "CustomCursor" +}; + +static QString qtscript_Qt_CursorShape_toStringHelper(Qt::CursorShape value) +{ + for (int i = 0; i < 24; ++i) { + if (qtscript_Qt_CursorShape_values[i] == value) + return QString::fromLatin1(qtscript_Qt_CursorShape_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_CursorShape_toScriptValue(QScriptEngine *engine, const Qt::CursorShape &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_CursorShape_toStringHelper(value)); +} + +static void qtscript_Qt_CursorShape_fromScriptValue(const QScriptValue &value, Qt::CursorShape &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_CursorShape(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 24; ++i) { + if (qtscript_Qt_CursorShape_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("CursorShape(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_CursorShape_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::CursorShape value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_CursorShape_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::CursorShape value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_CursorShape_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_CursorShape_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_CursorShape, + qtscript_Qt_CursorShape_valueOf, qtscript_Qt_CursorShape_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_CursorShape_toScriptValue, + qtscript_Qt_CursorShape_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 24; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_CursorShape_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_CursorShape_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::FillRule +// + +static const Qt::FillRule qtscript_Qt_FillRule_values[] = { + Qt::OddEvenFill + , Qt::WindingFill +}; + +static const char * const qtscript_Qt_FillRule_keys[] = { + "OddEvenFill" + , "WindingFill" +}; + +static QString qtscript_Qt_FillRule_toStringHelper(Qt::FillRule value) +{ + if ((value >= Qt::OddEvenFill) && (value <= Qt::WindingFill)) + return qtscript_Qt_FillRule_keys[static_cast(value)-static_cast(Qt::OddEvenFill)]; + return QString(); +} + +static QScriptValue qtscript_Qt_FillRule_toScriptValue(QScriptEngine *engine, const Qt::FillRule &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_FillRule_toStringHelper(value)); +} + +static void qtscript_Qt_FillRule_fromScriptValue(const QScriptValue &value, Qt::FillRule &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_FillRule(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::OddEvenFill) && (arg <= Qt::WindingFill)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("FillRule(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_FillRule_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::FillRule value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_FillRule_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::FillRule value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_FillRule_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_FillRule_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_FillRule, + qtscript_Qt_FillRule_valueOf, qtscript_Qt_FillRule_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_FillRule_toScriptValue, + qtscript_Qt_FillRule_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_FillRule_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_FillRule_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::AspectRatioMode +// + +static const Qt::AspectRatioMode qtscript_Qt_AspectRatioMode_values[] = { + Qt::IgnoreAspectRatio + , Qt::KeepAspectRatio + , Qt::KeepAspectRatioByExpanding +}; + +static const char * const qtscript_Qt_AspectRatioMode_keys[] = { + "IgnoreAspectRatio" + , "KeepAspectRatio" + , "KeepAspectRatioByExpanding" +}; + +static QString qtscript_Qt_AspectRatioMode_toStringHelper(Qt::AspectRatioMode value) +{ + if ((value >= Qt::IgnoreAspectRatio) && (value <= Qt::KeepAspectRatioByExpanding)) + return qtscript_Qt_AspectRatioMode_keys[static_cast(value)-static_cast(Qt::IgnoreAspectRatio)]; + return QString(); +} + +static QScriptValue qtscript_Qt_AspectRatioMode_toScriptValue(QScriptEngine *engine, const Qt::AspectRatioMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_AspectRatioMode_toStringHelper(value)); +} + +static void qtscript_Qt_AspectRatioMode_fromScriptValue(const QScriptValue &value, Qt::AspectRatioMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_AspectRatioMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::IgnoreAspectRatio) && (arg <= Qt::KeepAspectRatioByExpanding)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("AspectRatioMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_AspectRatioMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::AspectRatioMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_AspectRatioMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::AspectRatioMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_AspectRatioMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_AspectRatioMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_AspectRatioMode, + qtscript_Qt_AspectRatioMode_valueOf, qtscript_Qt_AspectRatioMode_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_AspectRatioMode_toScriptValue, + qtscript_Qt_AspectRatioMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_AspectRatioMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_AspectRatioMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::TextFormat +// + +static const Qt::TextFormat qtscript_Qt_TextFormat_values[] = { + Qt::PlainText + , Qt::RichText + , Qt::AutoText +}; + +static const char * const qtscript_Qt_TextFormat_keys[] = { + "PlainText" + , "RichText" + , "AutoText" +}; + +static QString qtscript_Qt_TextFormat_toStringHelper(Qt::TextFormat value) +{ + if ((value >= Qt::PlainText) && (value <= Qt::AutoText)) + return qtscript_Qt_TextFormat_keys[static_cast(value)-static_cast(Qt::PlainText)]; + return QString(); +} + +static QScriptValue qtscript_Qt_TextFormat_toScriptValue(QScriptEngine *engine, const Qt::TextFormat &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_TextFormat_toStringHelper(value)); +} + +static void qtscript_Qt_TextFormat_fromScriptValue(const QScriptValue &value, Qt::TextFormat &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_TextFormat(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::PlainText) && (arg <= Qt::AutoText)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("TextFormat(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_TextFormat_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TextFormat value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_TextFormat_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TextFormat value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_TextFormat_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_TextFormat_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_TextFormat, + qtscript_Qt_TextFormat_valueOf, qtscript_Qt_TextFormat_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_TextFormat_toScriptValue, + qtscript_Qt_TextFormat_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_TextFormat_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_TextFormat_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::CursorMoveStyle +// + +static const Qt::CursorMoveStyle qtscript_Qt_CursorMoveStyle_values[] = { + Qt::LogicalMoveStyle + , Qt::VisualMoveStyle +}; + +static const char * const qtscript_Qt_CursorMoveStyle_keys[] = { + "LogicalMoveStyle" + , "VisualMoveStyle" +}; + +static QString qtscript_Qt_CursorMoveStyle_toStringHelper(Qt::CursorMoveStyle value) +{ + if ((value >= Qt::LogicalMoveStyle) && (value <= Qt::VisualMoveStyle)) + return qtscript_Qt_CursorMoveStyle_keys[static_cast(value)-static_cast(Qt::LogicalMoveStyle)]; + return QString(); +} + +static QScriptValue qtscript_Qt_CursorMoveStyle_toScriptValue(QScriptEngine *engine, const Qt::CursorMoveStyle &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_CursorMoveStyle_toStringHelper(value)); +} + +static void qtscript_Qt_CursorMoveStyle_fromScriptValue(const QScriptValue &value, Qt::CursorMoveStyle &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_CursorMoveStyle(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::LogicalMoveStyle) && (arg <= Qt::VisualMoveStyle)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("CursorMoveStyle(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_CursorMoveStyle_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::CursorMoveStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_CursorMoveStyle_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::CursorMoveStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_CursorMoveStyle_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_CursorMoveStyle_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_CursorMoveStyle, + qtscript_Qt_CursorMoveStyle_valueOf, qtscript_Qt_CursorMoveStyle_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_CursorMoveStyle_toScriptValue, + qtscript_Qt_CursorMoveStyle_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_CursorMoveStyle_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_CursorMoveStyle_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::PenStyle +// + +static const Qt::PenStyle qtscript_Qt_PenStyle_values[] = { + Qt::NoPen + , Qt::SolidLine + , Qt::DashLine + , Qt::DotLine + , Qt::DashDotLine + , Qt::DashDotDotLine + , Qt::CustomDashLine + , Qt::MPenStyle +}; + +static const char * const qtscript_Qt_PenStyle_keys[] = { + "NoPen" + , "SolidLine" + , "DashLine" + , "DotLine" + , "DashDotLine" + , "DashDotDotLine" + , "CustomDashLine" + , "MPenStyle" +}; + +static QString qtscript_Qt_PenStyle_toStringHelper(Qt::PenStyle value) +{ + for (int i = 0; i < 8; ++i) { + if (qtscript_Qt_PenStyle_values[i] == value) + return QString::fromLatin1(qtscript_Qt_PenStyle_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_PenStyle_toScriptValue(QScriptEngine *engine, const Qt::PenStyle &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_PenStyle_toStringHelper(value)); +} + +static void qtscript_Qt_PenStyle_fromScriptValue(const QScriptValue &value, Qt::PenStyle &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_PenStyle(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 8; ++i) { + if (qtscript_Qt_PenStyle_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("PenStyle(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_PenStyle_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::PenStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_PenStyle_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::PenStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_PenStyle_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_PenStyle_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_PenStyle, + qtscript_Qt_PenStyle_valueOf, qtscript_Qt_PenStyle_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_PenStyle_toScriptValue, + qtscript_Qt_PenStyle_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 8; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_PenStyle_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_PenStyle_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::TimerType +// + +static const Qt::TimerType qtscript_Qt_TimerType_values[] = { + Qt::PreciseTimer + , Qt::CoarseTimer + , Qt::VeryCoarseTimer +}; + +static const char * const qtscript_Qt_TimerType_keys[] = { + "PreciseTimer" + , "CoarseTimer" + , "VeryCoarseTimer" +}; + +static QString qtscript_Qt_TimerType_toStringHelper(Qt::TimerType value) +{ + if ((value >= Qt::PreciseTimer) && (value <= Qt::VeryCoarseTimer)) + return qtscript_Qt_TimerType_keys[static_cast(value)-static_cast(Qt::PreciseTimer)]; + return QString(); +} + +static QScriptValue qtscript_Qt_TimerType_toScriptValue(QScriptEngine *engine, const Qt::TimerType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_TimerType_toStringHelper(value)); +} + +static void qtscript_Qt_TimerType_fromScriptValue(const QScriptValue &value, Qt::TimerType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_TimerType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::PreciseTimer) && (arg <= Qt::VeryCoarseTimer)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("TimerType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_TimerType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TimerType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_TimerType_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TimerType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_TimerType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_TimerType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_TimerType, + qtscript_Qt_TimerType_valueOf, qtscript_Qt_TimerType_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_TimerType_toScriptValue, + qtscript_Qt_TimerType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_TimerType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_TimerType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::ClipOperation +// + +static const Qt::ClipOperation qtscript_Qt_ClipOperation_values[] = { + Qt::NoClip + , Qt::ReplaceClip + , Qt::IntersectClip +}; + +static const char * const qtscript_Qt_ClipOperation_keys[] = { + "NoClip" + , "ReplaceClip" + , "IntersectClip" +}; + +static QString qtscript_Qt_ClipOperation_toStringHelper(Qt::ClipOperation value) +{ + if ((value >= Qt::NoClip) && (value <= Qt::IntersectClip)) + return qtscript_Qt_ClipOperation_keys[static_cast(value)-static_cast(Qt::NoClip)]; + return QString(); +} + +static QScriptValue qtscript_Qt_ClipOperation_toScriptValue(QScriptEngine *engine, const Qt::ClipOperation &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_ClipOperation_toStringHelper(value)); +} + +static void qtscript_Qt_ClipOperation_fromScriptValue(const QScriptValue &value, Qt::ClipOperation &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_ClipOperation(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::NoClip) && (arg <= Qt::IntersectClip)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ClipOperation(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_ClipOperation_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ClipOperation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ClipOperation_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ClipOperation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_ClipOperation_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_ClipOperation_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_ClipOperation, + qtscript_Qt_ClipOperation_valueOf, qtscript_Qt_ClipOperation_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_ClipOperation_toScriptValue, + qtscript_Qt_ClipOperation_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_ClipOperation_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_ClipOperation_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::GlobalColor +// + +static const Qt::GlobalColor qtscript_Qt_GlobalColor_values[] = { + Qt::color0 + , Qt::color1 + , Qt::black + , Qt::white + , Qt::darkGray + , Qt::gray + , Qt::lightGray + , Qt::red + , Qt::green + , Qt::blue + , Qt::cyan + , Qt::magenta + , Qt::yellow + , Qt::darkRed + , Qt::darkGreen + , Qt::darkBlue + , Qt::darkCyan + , Qt::darkMagenta + , Qt::darkYellow + , Qt::transparent +}; + +static const char * const qtscript_Qt_GlobalColor_keys[] = { + "color0" + , "color1" + , "black" + , "white" + , "darkGray" + , "gray" + , "lightGray" + , "red" + , "green" + , "blue" + , "cyan" + , "magenta" + , "yellow" + , "darkRed" + , "darkGreen" + , "darkBlue" + , "darkCyan" + , "darkMagenta" + , "darkYellow" + , "transparent" +}; + +static QString qtscript_Qt_GlobalColor_toStringHelper(Qt::GlobalColor value) +{ + if ((value >= Qt::color0) && (value <= Qt::transparent)) + return qtscript_Qt_GlobalColor_keys[static_cast(value)-static_cast(Qt::color0)]; + return QString(); +} + +static QScriptValue qtscript_Qt_GlobalColor_toScriptValue(QScriptEngine *engine, const Qt::GlobalColor &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_GlobalColor_toStringHelper(value)); +} + +static void qtscript_Qt_GlobalColor_fromScriptValue(const QScriptValue &value, Qt::GlobalColor &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_GlobalColor(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::color0) && (arg <= Qt::transparent)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("GlobalColor(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_GlobalColor_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::GlobalColor value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_GlobalColor_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::GlobalColor value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_GlobalColor_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_GlobalColor_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_GlobalColor, + qtscript_Qt_GlobalColor_valueOf, qtscript_Qt_GlobalColor_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_GlobalColor_toScriptValue, + qtscript_Qt_GlobalColor_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 20; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_GlobalColor_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_GlobalColor_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::FindChildOption +// + +static const Qt::FindChildOption qtscript_Qt_FindChildOption_values[] = { + Qt::FindDirectChildrenOnly + , Qt::FindChildrenRecursively +}; + +static const char * const qtscript_Qt_FindChildOption_keys[] = { + "FindDirectChildrenOnly" + , "FindChildrenRecursively" +}; + +static QString qtscript_Qt_FindChildOption_toStringHelper(Qt::FindChildOption value) +{ + if ((value >= Qt::FindDirectChildrenOnly) && (value <= Qt::FindChildrenRecursively)) + return qtscript_Qt_FindChildOption_keys[static_cast(value)-static_cast(Qt::FindDirectChildrenOnly)]; + return QString(); +} + +static QScriptValue qtscript_Qt_FindChildOption_toScriptValue(QScriptEngine *engine, const Qt::FindChildOption &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_FindChildOption_toStringHelper(value)); +} + +static void qtscript_Qt_FindChildOption_fromScriptValue(const QScriptValue &value, Qt::FindChildOption &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_FindChildOption(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::FindDirectChildrenOnly) && (arg <= Qt::FindChildrenRecursively)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("FindChildOption(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_FindChildOption_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::FindChildOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_FindChildOption_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::FindChildOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_FindChildOption_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_FindChildOption_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_FindChildOption, + qtscript_Qt_FindChildOption_valueOf, qtscript_Qt_FindChildOption_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_FindChildOption_toScriptValue, + qtscript_Qt_FindChildOption_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_FindChildOption_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_FindChildOption_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::ShortcutContext +// + +static const Qt::ShortcutContext qtscript_Qt_ShortcutContext_values[] = { + Qt::WidgetShortcut + , Qt::WindowShortcut + , Qt::ApplicationShortcut + , Qt::WidgetWithChildrenShortcut +}; + +static const char * const qtscript_Qt_ShortcutContext_keys[] = { + "WidgetShortcut" + , "WindowShortcut" + , "ApplicationShortcut" + , "WidgetWithChildrenShortcut" +}; + +static QString qtscript_Qt_ShortcutContext_toStringHelper(Qt::ShortcutContext value) +{ + if ((value >= Qt::WidgetShortcut) && (value <= Qt::WidgetWithChildrenShortcut)) + return qtscript_Qt_ShortcutContext_keys[static_cast(value)-static_cast(Qt::WidgetShortcut)]; + return QString(); +} + +static QScriptValue qtscript_Qt_ShortcutContext_toScriptValue(QScriptEngine *engine, const Qt::ShortcutContext &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_ShortcutContext_toStringHelper(value)); +} + +static void qtscript_Qt_ShortcutContext_fromScriptValue(const QScriptValue &value, Qt::ShortcutContext &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_ShortcutContext(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::WidgetShortcut) && (arg <= Qt::WidgetWithChildrenShortcut)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ShortcutContext(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_ShortcutContext_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ShortcutContext value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ShortcutContext_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ShortcutContext value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_ShortcutContext_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_ShortcutContext_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_ShortcutContext, + qtscript_Qt_ShortcutContext_valueOf, qtscript_Qt_ShortcutContext_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_ShortcutContext_toScriptValue, + qtscript_Qt_ShortcutContext_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_ShortcutContext_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_ShortcutContext_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::ConnectionType +// + +static const Qt::ConnectionType qtscript_Qt_ConnectionType_values[] = { + Qt::AutoConnection + , Qt::DirectConnection + , Qt::QueuedConnection + , Qt::BlockingQueuedConnection + , Qt::UniqueConnection +}; + +static const char * const qtscript_Qt_ConnectionType_keys[] = { + "AutoConnection" + , "DirectConnection" + , "QueuedConnection" + , "BlockingQueuedConnection" + , "UniqueConnection" +}; + +static QString qtscript_Qt_ConnectionType_toStringHelper(Qt::ConnectionType value) +{ + for (int i = 0; i < 5; ++i) { + if (qtscript_Qt_ConnectionType_values[i] == value) + return QString::fromLatin1(qtscript_Qt_ConnectionType_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_ConnectionType_toScriptValue(QScriptEngine *engine, const Qt::ConnectionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_ConnectionType_toStringHelper(value)); +} + +static void qtscript_Qt_ConnectionType_fromScriptValue(const QScriptValue &value, Qt::ConnectionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_ConnectionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 5; ++i) { + if (qtscript_Qt_ConnectionType_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ConnectionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_ConnectionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ConnectionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ConnectionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ConnectionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_ConnectionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_ConnectionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_ConnectionType, + qtscript_Qt_ConnectionType_valueOf, qtscript_Qt_ConnectionType_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_ConnectionType_toScriptValue, + qtscript_Qt_ConnectionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_ConnectionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_ConnectionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::ToolBarAreaSizes +// + +static const Qt::ToolBarAreaSizes qtscript_Qt_ToolBarAreaSizes_values[] = { + Qt::NToolBarAreas +}; + +static const char * const qtscript_Qt_ToolBarAreaSizes_keys[] = { + "NToolBarAreas" +}; + +static QString qtscript_Qt_ToolBarAreaSizes_toStringHelper(Qt::ToolBarAreaSizes value) +{ + if ((value >= Qt::NToolBarAreas) && (value <= Qt::NToolBarAreas)) + return qtscript_Qt_ToolBarAreaSizes_keys[static_cast(value)-static_cast(Qt::NToolBarAreas)]; + return QString(); +} + +static QScriptValue qtscript_Qt_ToolBarAreaSizes_toScriptValue(QScriptEngine *engine, const Qt::ToolBarAreaSizes &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_ToolBarAreaSizes_toStringHelper(value)); +} + +static void qtscript_Qt_ToolBarAreaSizes_fromScriptValue(const QScriptValue &value, Qt::ToolBarAreaSizes &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_ToolBarAreaSizes(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::NToolBarAreas) && (arg <= Qt::NToolBarAreas)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ToolBarAreaSizes(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_ToolBarAreaSizes_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ToolBarAreaSizes value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ToolBarAreaSizes_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ToolBarAreaSizes value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_ToolBarAreaSizes_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_ToolBarAreaSizes_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_ToolBarAreaSizes, + qtscript_Qt_ToolBarAreaSizes_valueOf, qtscript_Qt_ToolBarAreaSizes_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_ToolBarAreaSizes_toScriptValue, + qtscript_Qt_ToolBarAreaSizes_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_ToolBarAreaSizes_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_ToolBarAreaSizes_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::Key +// + +static const Qt::Key qtscript_Qt_Key_values[] = { + Qt::Key_Space + , Qt::Key_Exclam + , Qt::Key_QuoteDbl + , Qt::Key_NumberSign + , Qt::Key_Dollar + , Qt::Key_Percent + , Qt::Key_Ampersand + , Qt::Key_Apostrophe + , Qt::Key_ParenLeft + , Qt::Key_ParenRight + , Qt::Key_Asterisk + , Qt::Key_Plus + , Qt::Key_Comma + , Qt::Key_Minus + , Qt::Key_Period + , Qt::Key_Slash + , Qt::Key_0 + , Qt::Key_1 + , Qt::Key_2 + , Qt::Key_3 + , Qt::Key_4 + , Qt::Key_5 + , Qt::Key_6 + , Qt::Key_7 + , Qt::Key_8 + , Qt::Key_9 + , Qt::Key_Colon + , Qt::Key_Semicolon + , Qt::Key_Less + , Qt::Key_Equal + , Qt::Key_Greater + , Qt::Key_Question + , Qt::Key_At + , Qt::Key_A + , Qt::Key_B + , Qt::Key_C + , Qt::Key_D + , Qt::Key_E + , Qt::Key_F + , Qt::Key_G + , Qt::Key_H + , Qt::Key_I + , Qt::Key_J + , Qt::Key_K + , Qt::Key_L + , Qt::Key_M + , Qt::Key_N + , Qt::Key_O + , Qt::Key_P + , Qt::Key_Q + , Qt::Key_R + , Qt::Key_S + , Qt::Key_T + , Qt::Key_U + , Qt::Key_V + , Qt::Key_W + , Qt::Key_X + , Qt::Key_Y + , Qt::Key_Z + , Qt::Key_BracketLeft + , Qt::Key_Backslash + , Qt::Key_BracketRight + , Qt::Key_AsciiCircum + , Qt::Key_Underscore + , Qt::Key_QuoteLeft + , Qt::Key_BraceLeft + , Qt::Key_Bar + , Qt::Key_BraceRight + , Qt::Key_AsciiTilde + , Qt::Key_nobreakspace + , Qt::Key_exclamdown + , Qt::Key_cent + , Qt::Key_sterling + , Qt::Key_currency + , Qt::Key_yen + , Qt::Key_brokenbar + , Qt::Key_section + , Qt::Key_diaeresis + , Qt::Key_copyright + , Qt::Key_ordfeminine + , Qt::Key_guillemotleft + , Qt::Key_notsign + , Qt::Key_hyphen + , Qt::Key_registered + , Qt::Key_macron + , Qt::Key_degree + , Qt::Key_plusminus + , Qt::Key_twosuperior + , Qt::Key_threesuperior + , Qt::Key_acute + , Qt::Key_mu + , Qt::Key_paragraph + , Qt::Key_periodcentered + , Qt::Key_cedilla + , Qt::Key_onesuperior + , Qt::Key_masculine + , Qt::Key_guillemotright + , Qt::Key_onequarter + , Qt::Key_onehalf + , Qt::Key_threequarters + , Qt::Key_questiondown + , Qt::Key_Agrave + , Qt::Key_Aacute + , Qt::Key_Acircumflex + , Qt::Key_Atilde + , Qt::Key_Adiaeresis + , Qt::Key_Aring + , Qt::Key_AE + , Qt::Key_Ccedilla + , Qt::Key_Egrave + , Qt::Key_Eacute + , Qt::Key_Ecircumflex + , Qt::Key_Ediaeresis + , Qt::Key_Igrave + , Qt::Key_Iacute + , Qt::Key_Icircumflex + , Qt::Key_Idiaeresis + , Qt::Key_ETH + , Qt::Key_Ntilde + , Qt::Key_Ograve + , Qt::Key_Oacute + , Qt::Key_Ocircumflex + , Qt::Key_Otilde + , Qt::Key_Odiaeresis + , Qt::Key_multiply + , Qt::Key_Ooblique + , Qt::Key_Ugrave + , Qt::Key_Uacute + , Qt::Key_Ucircumflex + , Qt::Key_Udiaeresis + , Qt::Key_Yacute + , Qt::Key_THORN + , Qt::Key_ssharp + , Qt::Key_division + , Qt::Key_ydiaeresis + , Qt::Key_Escape + , Qt::Key_Tab + , Qt::Key_Backtab + , Qt::Key_Backspace + , Qt::Key_Return + , Qt::Key_Enter + , Qt::Key_Insert + , Qt::Key_Delete + , Qt::Key_Pause + , Qt::Key_Print + , Qt::Key_SysReq + , Qt::Key_Clear + , Qt::Key_Home + , Qt::Key_End + , Qt::Key_Left + , Qt::Key_Up + , Qt::Key_Right + , Qt::Key_Down + , Qt::Key_PageUp + , Qt::Key_PageDown + , Qt::Key_Shift + , Qt::Key_Control + , Qt::Key_Meta + , Qt::Key_Alt + , Qt::Key_CapsLock + , Qt::Key_NumLock + , Qt::Key_ScrollLock + , Qt::Key_F1 + , Qt::Key_F2 + , Qt::Key_F3 + , Qt::Key_F4 + , Qt::Key_F5 + , Qt::Key_F6 + , Qt::Key_F7 + , Qt::Key_F8 + , Qt::Key_F9 + , Qt::Key_F10 + , Qt::Key_F11 + , Qt::Key_F12 + , Qt::Key_F13 + , Qt::Key_F14 + , Qt::Key_F15 + , Qt::Key_F16 + , Qt::Key_F17 + , Qt::Key_F18 + , Qt::Key_F19 + , Qt::Key_F20 + , Qt::Key_F21 + , Qt::Key_F22 + , Qt::Key_F23 + , Qt::Key_F24 + , Qt::Key_F25 + , Qt::Key_F26 + , Qt::Key_F27 + , Qt::Key_F28 + , Qt::Key_F29 + , Qt::Key_F30 + , Qt::Key_F31 + , Qt::Key_F32 + , Qt::Key_F33 + , Qt::Key_F34 + , Qt::Key_F35 + , Qt::Key_Super_L + , Qt::Key_Super_R + , Qt::Key_Menu + , Qt::Key_Hyper_L + , Qt::Key_Hyper_R + , Qt::Key_Help + , Qt::Key_Direction_L + , Qt::Key_Direction_R + , Qt::Key_Back + , Qt::Key_Forward + , Qt::Key_Stop + , Qt::Key_Refresh + , Qt::Key_VolumeDown + , Qt::Key_VolumeMute + , Qt::Key_VolumeUp + , Qt::Key_BassBoost + , Qt::Key_BassUp + , Qt::Key_BassDown + , Qt::Key_TrebleUp + , Qt::Key_TrebleDown + , Qt::Key_MediaPlay + , Qt::Key_MediaStop + , Qt::Key_MediaPrevious + , Qt::Key_MediaNext + , Qt::Key_MediaRecord + , Qt::Key_MediaPause + , Qt::Key_MediaTogglePlayPause + , Qt::Key_HomePage + , Qt::Key_Favorites + , Qt::Key_Search + , Qt::Key_Standby + , Qt::Key_OpenUrl + , Qt::Key_LaunchMail + , Qt::Key_LaunchMedia + , Qt::Key_Launch0 + , Qt::Key_Launch1 + , Qt::Key_Launch2 + , Qt::Key_Launch3 + , Qt::Key_Launch4 + , Qt::Key_Launch5 + , Qt::Key_Launch6 + , Qt::Key_Launch7 + , Qt::Key_Launch8 + , Qt::Key_Launch9 + , Qt::Key_LaunchA + , Qt::Key_LaunchB + , Qt::Key_LaunchC + , Qt::Key_LaunchD + , Qt::Key_LaunchE + , Qt::Key_LaunchF + , Qt::Key_MonBrightnessUp + , Qt::Key_MonBrightnessDown + , Qt::Key_KeyboardLightOnOff + , Qt::Key_KeyboardBrightnessUp + , Qt::Key_KeyboardBrightnessDown + , Qt::Key_PowerOff + , Qt::Key_WakeUp + , Qt::Key_Eject + , Qt::Key_ScreenSaver + , Qt::Key_WWW + , Qt::Key_Memo + , Qt::Key_LightBulb + , Qt::Key_Shop + , Qt::Key_History + , Qt::Key_AddFavorite + , Qt::Key_HotLinks + , Qt::Key_BrightnessAdjust + , Qt::Key_Finance + , Qt::Key_Community + , Qt::Key_AudioRewind + , Qt::Key_BackForward + , Qt::Key_ApplicationLeft + , Qt::Key_ApplicationRight + , Qt::Key_Book + , Qt::Key_CD + , Qt::Key_Calculator + , Qt::Key_ToDoList + , Qt::Key_ClearGrab + , Qt::Key_Close + , Qt::Key_Copy + , Qt::Key_Cut + , Qt::Key_Display + , Qt::Key_DOS + , Qt::Key_Documents + , Qt::Key_Excel + , Qt::Key_Explorer + , Qt::Key_Game + , Qt::Key_Go + , Qt::Key_iTouch + , Qt::Key_LogOff + , Qt::Key_Market + , Qt::Key_Meeting + , Qt::Key_MenuKB + , Qt::Key_MenuPB + , Qt::Key_MySites + , Qt::Key_News + , Qt::Key_OfficeHome + , Qt::Key_Option + , Qt::Key_Paste + , Qt::Key_Phone + , Qt::Key_Calendar + , Qt::Key_Reply + , Qt::Key_Reload + , Qt::Key_RotateWindows + , Qt::Key_RotationPB + , Qt::Key_RotationKB + , Qt::Key_Save + , Qt::Key_Send + , Qt::Key_Spell + , Qt::Key_SplitScreen + , Qt::Key_Support + , Qt::Key_TaskPane + , Qt::Key_Terminal + , Qt::Key_Tools + , Qt::Key_Travel + , Qt::Key_Video + , Qt::Key_Word + , Qt::Key_Xfer + , Qt::Key_ZoomIn + , Qt::Key_ZoomOut + , Qt::Key_Away + , Qt::Key_Messenger + , Qt::Key_WebCam + , Qt::Key_MailForward + , Qt::Key_Pictures + , Qt::Key_Music + , Qt::Key_Battery + , Qt::Key_Bluetooth + , Qt::Key_WLAN + , Qt::Key_UWB + , Qt::Key_AudioForward + , Qt::Key_AudioRepeat + , Qt::Key_AudioRandomPlay + , Qt::Key_Subtitle + , Qt::Key_AudioCycleTrack + , Qt::Key_Time + , Qt::Key_Hibernate + , Qt::Key_View + , Qt::Key_TopMenu + , Qt::Key_PowerDown + , Qt::Key_Suspend + , Qt::Key_ContrastAdjust + , Qt::Key_LaunchG + , Qt::Key_LaunchH + , Qt::Key_TouchpadToggle + , Qt::Key_TouchpadOn + , Qt::Key_TouchpadOff + , Qt::Key_MicMute + , Qt::Key_Red + , Qt::Key_Green + , Qt::Key_Yellow + , Qt::Key_Blue + , Qt::Key_ChannelUp + , Qt::Key_ChannelDown + , Qt::Key_Guide + , Qt::Key_Info + , Qt::Key_Settings + , Qt::Key_MicVolumeUp + , Qt::Key_MicVolumeDown + , Qt::Key_New + , Qt::Key_Open + , Qt::Key_Find + , Qt::Key_Undo + , Qt::Key_Redo + , Qt::Key_AltGr + , Qt::Key_Multi_key + , Qt::Key_Kanji + , Qt::Key_Muhenkan + , Qt::Key_Henkan + , Qt::Key_Romaji + , Qt::Key_Hiragana + , Qt::Key_Katakana + , Qt::Key_Hiragana_Katakana + , Qt::Key_Zenkaku + , Qt::Key_Hankaku + , Qt::Key_Zenkaku_Hankaku + , Qt::Key_Touroku + , Qt::Key_Massyo + , Qt::Key_Kana_Lock + , Qt::Key_Kana_Shift + , Qt::Key_Eisu_Shift + , Qt::Key_Eisu_toggle + , Qt::Key_Hangul + , Qt::Key_Hangul_Start + , Qt::Key_Hangul_End + , Qt::Key_Hangul_Hanja + , Qt::Key_Hangul_Jamo + , Qt::Key_Hangul_Romaja + , Qt::Key_Codeinput + , Qt::Key_Hangul_Jeonja + , Qt::Key_Hangul_Banja + , Qt::Key_Hangul_PreHanja + , Qt::Key_Hangul_PostHanja + , Qt::Key_SingleCandidate + , Qt::Key_MultipleCandidate + , Qt::Key_PreviousCandidate + , Qt::Key_Hangul_Special + , Qt::Key_Mode_switch + , Qt::Key_Dead_Grave + , Qt::Key_Dead_Acute + , Qt::Key_Dead_Circumflex + , Qt::Key_Dead_Tilde + , Qt::Key_Dead_Macron + , Qt::Key_Dead_Breve + , Qt::Key_Dead_Abovedot + , Qt::Key_Dead_Diaeresis + , Qt::Key_Dead_Abovering + , Qt::Key_Dead_Doubleacute + , Qt::Key_Dead_Caron + , Qt::Key_Dead_Cedilla + , Qt::Key_Dead_Ogonek + , Qt::Key_Dead_Iota + , Qt::Key_Dead_Voiced_Sound + , Qt::Key_Dead_Semivoiced_Sound + , Qt::Key_Dead_Belowdot + , Qt::Key_Dead_Hook + , Qt::Key_Dead_Horn + , Qt::Key_MediaLast + , Qt::Key_Select + , Qt::Key_Yes + , Qt::Key_No + , Qt::Key_Cancel + , Qt::Key_Printer + , Qt::Key_Execute + , Qt::Key_Sleep + , Qt::Key_Play + , Qt::Key_Zoom + , Qt::Key_Exit + , Qt::Key_Context1 + , Qt::Key_Context2 + , Qt::Key_Context3 + , Qt::Key_Context4 + , Qt::Key_Call + , Qt::Key_Hangup + , Qt::Key_Flip + , Qt::Key_ToggleCallHangup + , Qt::Key_VoiceDial + , Qt::Key_LastNumberRedial + , Qt::Key_Camera + , Qt::Key_CameraFocus + , Qt::Key_unknown +}; + +static const char * const qtscript_Qt_Key_keys[] = { + "Key_Space" + , "Key_Exclam" + , "Key_QuoteDbl" + , "Key_NumberSign" + , "Key_Dollar" + , "Key_Percent" + , "Key_Ampersand" + , "Key_Apostrophe" + , "Key_ParenLeft" + , "Key_ParenRight" + , "Key_Asterisk" + , "Key_Plus" + , "Key_Comma" + , "Key_Minus" + , "Key_Period" + , "Key_Slash" + , "Key_0" + , "Key_1" + , "Key_2" + , "Key_3" + , "Key_4" + , "Key_5" + , "Key_6" + , "Key_7" + , "Key_8" + , "Key_9" + , "Key_Colon" + , "Key_Semicolon" + , "Key_Less" + , "Key_Equal" + , "Key_Greater" + , "Key_Question" + , "Key_At" + , "Key_A" + , "Key_B" + , "Key_C" + , "Key_D" + , "Key_E" + , "Key_F" + , "Key_G" + , "Key_H" + , "Key_I" + , "Key_J" + , "Key_K" + , "Key_L" + , "Key_M" + , "Key_N" + , "Key_O" + , "Key_P" + , "Key_Q" + , "Key_R" + , "Key_S" + , "Key_T" + , "Key_U" + , "Key_V" + , "Key_W" + , "Key_X" + , "Key_Y" + , "Key_Z" + , "Key_BracketLeft" + , "Key_Backslash" + , "Key_BracketRight" + , "Key_AsciiCircum" + , "Key_Underscore" + , "Key_QuoteLeft" + , "Key_BraceLeft" + , "Key_Bar" + , "Key_BraceRight" + , "Key_AsciiTilde" + , "Key_nobreakspace" + , "Key_exclamdown" + , "Key_cent" + , "Key_sterling" + , "Key_currency" + , "Key_yen" + , "Key_brokenbar" + , "Key_section" + , "Key_diaeresis" + , "Key_copyright" + , "Key_ordfeminine" + , "Key_guillemotleft" + , "Key_notsign" + , "Key_hyphen" + , "Key_registered" + , "Key_macron" + , "Key_degree" + , "Key_plusminus" + , "Key_twosuperior" + , "Key_threesuperior" + , "Key_acute" + , "Key_mu" + , "Key_paragraph" + , "Key_periodcentered" + , "Key_cedilla" + , "Key_onesuperior" + , "Key_masculine" + , "Key_guillemotright" + , "Key_onequarter" + , "Key_onehalf" + , "Key_threequarters" + , "Key_questiondown" + , "Key_Agrave" + , "Key_Aacute" + , "Key_Acircumflex" + , "Key_Atilde" + , "Key_Adiaeresis" + , "Key_Aring" + , "Key_AE" + , "Key_Ccedilla" + , "Key_Egrave" + , "Key_Eacute" + , "Key_Ecircumflex" + , "Key_Ediaeresis" + , "Key_Igrave" + , "Key_Iacute" + , "Key_Icircumflex" + , "Key_Idiaeresis" + , "Key_ETH" + , "Key_Ntilde" + , "Key_Ograve" + , "Key_Oacute" + , "Key_Ocircumflex" + , "Key_Otilde" + , "Key_Odiaeresis" + , "Key_multiply" + , "Key_Ooblique" + , "Key_Ugrave" + , "Key_Uacute" + , "Key_Ucircumflex" + , "Key_Udiaeresis" + , "Key_Yacute" + , "Key_THORN" + , "Key_ssharp" + , "Key_division" + , "Key_ydiaeresis" + , "Key_Escape" + , "Key_Tab" + , "Key_Backtab" + , "Key_Backspace" + , "Key_Return" + , "Key_Enter" + , "Key_Insert" + , "Key_Delete" + , "Key_Pause" + , "Key_Print" + , "Key_SysReq" + , "Key_Clear" + , "Key_Home" + , "Key_End" + , "Key_Left" + , "Key_Up" + , "Key_Right" + , "Key_Down" + , "Key_PageUp" + , "Key_PageDown" + , "Key_Shift" + , "Key_Control" + , "Key_Meta" + , "Key_Alt" + , "Key_CapsLock" + , "Key_NumLock" + , "Key_ScrollLock" + , "Key_F1" + , "Key_F2" + , "Key_F3" + , "Key_F4" + , "Key_F5" + , "Key_F6" + , "Key_F7" + , "Key_F8" + , "Key_F9" + , "Key_F10" + , "Key_F11" + , "Key_F12" + , "Key_F13" + , "Key_F14" + , "Key_F15" + , "Key_F16" + , "Key_F17" + , "Key_F18" + , "Key_F19" + , "Key_F20" + , "Key_F21" + , "Key_F22" + , "Key_F23" + , "Key_F24" + , "Key_F25" + , "Key_F26" + , "Key_F27" + , "Key_F28" + , "Key_F29" + , "Key_F30" + , "Key_F31" + , "Key_F32" + , "Key_F33" + , "Key_F34" + , "Key_F35" + , "Key_Super_L" + , "Key_Super_R" + , "Key_Menu" + , "Key_Hyper_L" + , "Key_Hyper_R" + , "Key_Help" + , "Key_Direction_L" + , "Key_Direction_R" + , "Key_Back" + , "Key_Forward" + , "Key_Stop" + , "Key_Refresh" + , "Key_VolumeDown" + , "Key_VolumeMute" + , "Key_VolumeUp" + , "Key_BassBoost" + , "Key_BassUp" + , "Key_BassDown" + , "Key_TrebleUp" + , "Key_TrebleDown" + , "Key_MediaPlay" + , "Key_MediaStop" + , "Key_MediaPrevious" + , "Key_MediaNext" + , "Key_MediaRecord" + , "Key_MediaPause" + , "Key_MediaTogglePlayPause" + , "Key_HomePage" + , "Key_Favorites" + , "Key_Search" + , "Key_Standby" + , "Key_OpenUrl" + , "Key_LaunchMail" + , "Key_LaunchMedia" + , "Key_Launch0" + , "Key_Launch1" + , "Key_Launch2" + , "Key_Launch3" + , "Key_Launch4" + , "Key_Launch5" + , "Key_Launch6" + , "Key_Launch7" + , "Key_Launch8" + , "Key_Launch9" + , "Key_LaunchA" + , "Key_LaunchB" + , "Key_LaunchC" + , "Key_LaunchD" + , "Key_LaunchE" + , "Key_LaunchF" + , "Key_MonBrightnessUp" + , "Key_MonBrightnessDown" + , "Key_KeyboardLightOnOff" + , "Key_KeyboardBrightnessUp" + , "Key_KeyboardBrightnessDown" + , "Key_PowerOff" + , "Key_WakeUp" + , "Key_Eject" + , "Key_ScreenSaver" + , "Key_WWW" + , "Key_Memo" + , "Key_LightBulb" + , "Key_Shop" + , "Key_History" + , "Key_AddFavorite" + , "Key_HotLinks" + , "Key_BrightnessAdjust" + , "Key_Finance" + , "Key_Community" + , "Key_AudioRewind" + , "Key_BackForward" + , "Key_ApplicationLeft" + , "Key_ApplicationRight" + , "Key_Book" + , "Key_CD" + , "Key_Calculator" + , "Key_ToDoList" + , "Key_ClearGrab" + , "Key_Close" + , "Key_Copy" + , "Key_Cut" + , "Key_Display" + , "Key_DOS" + , "Key_Documents" + , "Key_Excel" + , "Key_Explorer" + , "Key_Game" + , "Key_Go" + , "Key_iTouch" + , "Key_LogOff" + , "Key_Market" + , "Key_Meeting" + , "Key_MenuKB" + , "Key_MenuPB" + , "Key_MySites" + , "Key_News" + , "Key_OfficeHome" + , "Key_Option" + , "Key_Paste" + , "Key_Phone" + , "Key_Calendar" + , "Key_Reply" + , "Key_Reload" + , "Key_RotateWindows" + , "Key_RotationPB" + , "Key_RotationKB" + , "Key_Save" + , "Key_Send" + , "Key_Spell" + , "Key_SplitScreen" + , "Key_Support" + , "Key_TaskPane" + , "Key_Terminal" + , "Key_Tools" + , "Key_Travel" + , "Key_Video" + , "Key_Word" + , "Key_Xfer" + , "Key_ZoomIn" + , "Key_ZoomOut" + , "Key_Away" + , "Key_Messenger" + , "Key_WebCam" + , "Key_MailForward" + , "Key_Pictures" + , "Key_Music" + , "Key_Battery" + , "Key_Bluetooth" + , "Key_WLAN" + , "Key_UWB" + , "Key_AudioForward" + , "Key_AudioRepeat" + , "Key_AudioRandomPlay" + , "Key_Subtitle" + , "Key_AudioCycleTrack" + , "Key_Time" + , "Key_Hibernate" + , "Key_View" + , "Key_TopMenu" + , "Key_PowerDown" + , "Key_Suspend" + , "Key_ContrastAdjust" + , "Key_LaunchG" + , "Key_LaunchH" + , "Key_TouchpadToggle" + , "Key_TouchpadOn" + , "Key_TouchpadOff" + , "Key_MicMute" + , "Key_Red" + , "Key_Green" + , "Key_Yellow" + , "Key_Blue" + , "Key_ChannelUp" + , "Key_ChannelDown" + , "Key_Guide" + , "Key_Info" + , "Key_Settings" + , "Key_MicVolumeUp" + , "Key_MicVolumeDown" + , "Key_New" + , "Key_Open" + , "Key_Find" + , "Key_Undo" + , "Key_Redo" + , "Key_AltGr" + , "Key_Multi_key" + , "Key_Kanji" + , "Key_Muhenkan" + , "Key_Henkan" + , "Key_Romaji" + , "Key_Hiragana" + , "Key_Katakana" + , "Key_Hiragana_Katakana" + , "Key_Zenkaku" + , "Key_Hankaku" + , "Key_Zenkaku_Hankaku" + , "Key_Touroku" + , "Key_Massyo" + , "Key_Kana_Lock" + , "Key_Kana_Shift" + , "Key_Eisu_Shift" + , "Key_Eisu_toggle" + , "Key_Hangul" + , "Key_Hangul_Start" + , "Key_Hangul_End" + , "Key_Hangul_Hanja" + , "Key_Hangul_Jamo" + , "Key_Hangul_Romaja" + , "Key_Codeinput" + , "Key_Hangul_Jeonja" + , "Key_Hangul_Banja" + , "Key_Hangul_PreHanja" + , "Key_Hangul_PostHanja" + , "Key_SingleCandidate" + , "Key_MultipleCandidate" + , "Key_PreviousCandidate" + , "Key_Hangul_Special" + , "Key_Mode_switch" + , "Key_Dead_Grave" + , "Key_Dead_Acute" + , "Key_Dead_Circumflex" + , "Key_Dead_Tilde" + , "Key_Dead_Macron" + , "Key_Dead_Breve" + , "Key_Dead_Abovedot" + , "Key_Dead_Diaeresis" + , "Key_Dead_Abovering" + , "Key_Dead_Doubleacute" + , "Key_Dead_Caron" + , "Key_Dead_Cedilla" + , "Key_Dead_Ogonek" + , "Key_Dead_Iota" + , "Key_Dead_Voiced_Sound" + , "Key_Dead_Semivoiced_Sound" + , "Key_Dead_Belowdot" + , "Key_Dead_Hook" + , "Key_Dead_Horn" + , "Key_MediaLast" + , "Key_Select" + , "Key_Yes" + , "Key_No" + , "Key_Cancel" + , "Key_Printer" + , "Key_Execute" + , "Key_Sleep" + , "Key_Play" + , "Key_Zoom" + , "Key_Exit" + , "Key_Context1" + , "Key_Context2" + , "Key_Context3" + , "Key_Context4" + , "Key_Call" + , "Key_Hangup" + , "Key_Flip" + , "Key_ToggleCallHangup" + , "Key_VoiceDial" + , "Key_LastNumberRedial" + , "Key_Camera" + , "Key_CameraFocus" + , "Key_unknown" +}; + +static QString qtscript_Qt_Key_toStringHelper(Qt::Key value) +{ + for (int i = 0; i < 438; ++i) { + if (qtscript_Qt_Key_values[i] == value) + return QString::fromLatin1(qtscript_Qt_Key_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_Key_toScriptValue(QScriptEngine *engine, const Qt::Key &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_Key_toStringHelper(value)); +} + +static void qtscript_Qt_Key_fromScriptValue(const QScriptValue &value, Qt::Key &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_Key(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 438; ++i) { + if (qtscript_Qt_Key_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Key(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_Key_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::Key value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_Key_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::Key value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_Key_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_Key_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_Key, + qtscript_Qt_Key_valueOf, qtscript_Qt_Key_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_Key_toScriptValue, + qtscript_Qt_Key_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 438; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_Key_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_Key_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::GestureFlag +// + +static const Qt::GestureFlag qtscript_Qt_GestureFlag_values[] = { + Qt::DontStartGestureOnChildren + , Qt::ReceivePartialGestures + , Qt::IgnoredGesturesPropagateToParent +}; + +static const char * const qtscript_Qt_GestureFlag_keys[] = { + "DontStartGestureOnChildren" + , "ReceivePartialGestures" + , "IgnoredGesturesPropagateToParent" +}; + +static QString qtscript_Qt_GestureFlag_toStringHelper(Qt::GestureFlag value) +{ + for (int i = 0; i < 3; ++i) { + if (qtscript_Qt_GestureFlag_values[i] == value) + return QString::fromLatin1(qtscript_Qt_GestureFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_GestureFlag_toScriptValue(QScriptEngine *engine, const Qt::GestureFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_GestureFlag_toStringHelper(value)); +} + +static void qtscript_Qt_GestureFlag_fromScriptValue(const QScriptValue &value, Qt::GestureFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_GestureFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 3; ++i) { + if (qtscript_Qt_GestureFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("GestureFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_GestureFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::GestureFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_GestureFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::GestureFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_GestureFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_GestureFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_GestureFlag, + qtscript_Qt_GestureFlag_valueOf, qtscript_Qt_GestureFlag_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_GestureFlag_toScriptValue, + qtscript_Qt_GestureFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_GestureFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_GestureFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::GestureFlags +// + +static QScriptValue qtscript_Qt_GestureFlags_toScriptValue(QScriptEngine *engine, const Qt::GestureFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_Qt_GestureFlags_fromScriptValue(const QScriptValue &value, Qt::GestureFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_Qt_GestureFlags(QScriptContext *context, QScriptEngine *engine) +{ + Qt::GestureFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("GestureFlags(): argument %0 is not of type GestureFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_Qt_GestureFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::GestureFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_GestureFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::GestureFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 3; ++i) { + if ((value & qtscript_Qt_GestureFlag_values[i]) == qtscript_Qt_GestureFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_Qt_GestureFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_Qt_GestureFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_Qt_GestureFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_Qt_GestureFlags, qtscript_Qt_GestureFlags_valueOf, + qtscript_Qt_GestureFlags_toString, qtscript_Qt_GestureFlags_equals); + qScriptRegisterMetaType(engine, qtscript_Qt_GestureFlags_toScriptValue, + qtscript_Qt_GestureFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// Qt::SizeHint +// + +static const Qt::SizeHint qtscript_Qt_SizeHint_values[] = { + Qt::MinimumSize + , Qt::PreferredSize + , Qt::MaximumSize + , Qt::MinimumDescent + , Qt::NSizeHints +}; + +static const char * const qtscript_Qt_SizeHint_keys[] = { + "MinimumSize" + , "PreferredSize" + , "MaximumSize" + , "MinimumDescent" + , "NSizeHints" +}; + +static QString qtscript_Qt_SizeHint_toStringHelper(Qt::SizeHint value) +{ + if ((value >= Qt::MinimumSize) && (value <= Qt::NSizeHints)) + return qtscript_Qt_SizeHint_keys[static_cast(value)-static_cast(Qt::MinimumSize)]; + return QString(); +} + +static QScriptValue qtscript_Qt_SizeHint_toScriptValue(QScriptEngine *engine, const Qt::SizeHint &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_SizeHint_toStringHelper(value)); +} + +static void qtscript_Qt_SizeHint_fromScriptValue(const QScriptValue &value, Qt::SizeHint &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_SizeHint(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::MinimumSize) && (arg <= Qt::NSizeHints)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SizeHint(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_SizeHint_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::SizeHint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_SizeHint_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::SizeHint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_SizeHint_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_SizeHint_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_SizeHint, + qtscript_Qt_SizeHint_valueOf, qtscript_Qt_SizeHint_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_SizeHint_toScriptValue, + qtscript_Qt_SizeHint_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_SizeHint_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_SizeHint_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::ToolButtonStyle +// + +static const Qt::ToolButtonStyle qtscript_Qt_ToolButtonStyle_values[] = { + Qt::ToolButtonIconOnly + , Qt::ToolButtonTextOnly + , Qt::ToolButtonTextBesideIcon + , Qt::ToolButtonTextUnderIcon + , Qt::ToolButtonFollowStyle +}; + +static const char * const qtscript_Qt_ToolButtonStyle_keys[] = { + "ToolButtonIconOnly" + , "ToolButtonTextOnly" + , "ToolButtonTextBesideIcon" + , "ToolButtonTextUnderIcon" + , "ToolButtonFollowStyle" +}; + +static QString qtscript_Qt_ToolButtonStyle_toStringHelper(Qt::ToolButtonStyle value) +{ + if ((value >= Qt::ToolButtonIconOnly) && (value <= Qt::ToolButtonFollowStyle)) + return qtscript_Qt_ToolButtonStyle_keys[static_cast(value)-static_cast(Qt::ToolButtonIconOnly)]; + return QString(); +} + +static QScriptValue qtscript_Qt_ToolButtonStyle_toScriptValue(QScriptEngine *engine, const Qt::ToolButtonStyle &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_ToolButtonStyle_toStringHelper(value)); +} + +static void qtscript_Qt_ToolButtonStyle_fromScriptValue(const QScriptValue &value, Qt::ToolButtonStyle &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_ToolButtonStyle(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::ToolButtonIconOnly) && (arg <= Qt::ToolButtonFollowStyle)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ToolButtonStyle(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_ToolButtonStyle_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ToolButtonStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ToolButtonStyle_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ToolButtonStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_ToolButtonStyle_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_ToolButtonStyle_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_ToolButtonStyle, + qtscript_Qt_ToolButtonStyle_valueOf, qtscript_Qt_ToolButtonStyle_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_ToolButtonStyle_toScriptValue, + qtscript_Qt_ToolButtonStyle_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_ToolButtonStyle_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_ToolButtonStyle_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::ItemSelectionMode +// + +static const Qt::ItemSelectionMode qtscript_Qt_ItemSelectionMode_values[] = { + Qt::ContainsItemShape + , Qt::IntersectsItemShape + , Qt::ContainsItemBoundingRect + , Qt::IntersectsItemBoundingRect +}; + +static const char * const qtscript_Qt_ItemSelectionMode_keys[] = { + "ContainsItemShape" + , "IntersectsItemShape" + , "ContainsItemBoundingRect" + , "IntersectsItemBoundingRect" +}; + +static QString qtscript_Qt_ItemSelectionMode_toStringHelper(Qt::ItemSelectionMode value) +{ + if ((value >= Qt::ContainsItemShape) && (value <= Qt::IntersectsItemBoundingRect)) + return qtscript_Qt_ItemSelectionMode_keys[static_cast(value)-static_cast(Qt::ContainsItemShape)]; + return QString(); +} + +static QScriptValue qtscript_Qt_ItemSelectionMode_toScriptValue(QScriptEngine *engine, const Qt::ItemSelectionMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_ItemSelectionMode_toStringHelper(value)); +} + +static void qtscript_Qt_ItemSelectionMode_fromScriptValue(const QScriptValue &value, Qt::ItemSelectionMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_ItemSelectionMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::ContainsItemShape) && (arg <= Qt::IntersectsItemBoundingRect)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ItemSelectionMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_ItemSelectionMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ItemSelectionMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ItemSelectionMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ItemSelectionMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_ItemSelectionMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_ItemSelectionMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_ItemSelectionMode, + qtscript_Qt_ItemSelectionMode_valueOf, qtscript_Qt_ItemSelectionMode_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_ItemSelectionMode_toScriptValue, + qtscript_Qt_ItemSelectionMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_ItemSelectionMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_ItemSelectionMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::AlignmentFlag +// + +static const Qt::AlignmentFlag qtscript_Qt_AlignmentFlag_values[] = { + Qt::AlignLeft + , Qt::AlignRight + , Qt::AlignHCenter + , Qt::AlignJustify + , Qt::AlignAbsolute + , Qt::AlignHorizontal_Mask + , Qt::AlignTop + , Qt::AlignBottom + , Qt::AlignVCenter + , Qt::AlignCenter + , Qt::AlignBaseline + , Qt::AlignVertical_Mask +}; + +static const char * const qtscript_Qt_AlignmentFlag_keys[] = { + "AlignLeft" + , "AlignRight" + , "AlignHCenter" + , "AlignJustify" + , "AlignAbsolute" + , "AlignHorizontal_Mask" + , "AlignTop" + , "AlignBottom" + , "AlignVCenter" + , "AlignCenter" + , "AlignBaseline" + , "AlignVertical_Mask" +}; + +static QString qtscript_Qt_AlignmentFlag_toStringHelper(Qt::AlignmentFlag value) +{ + for (int i = 0; i < 12; ++i) { + if (qtscript_Qt_AlignmentFlag_values[i] == value) + return QString::fromLatin1(qtscript_Qt_AlignmentFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_AlignmentFlag_toScriptValue(QScriptEngine *engine, const Qt::AlignmentFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_AlignmentFlag_toStringHelper(value)); +} + +static void qtscript_Qt_AlignmentFlag_fromScriptValue(const QScriptValue &value, Qt::AlignmentFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_AlignmentFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 12; ++i) { + if (qtscript_Qt_AlignmentFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("AlignmentFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_AlignmentFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::AlignmentFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_AlignmentFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::AlignmentFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_AlignmentFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_AlignmentFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_AlignmentFlag, + qtscript_Qt_AlignmentFlag_valueOf, qtscript_Qt_AlignmentFlag_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_AlignmentFlag_toScriptValue, + qtscript_Qt_AlignmentFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 12; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_AlignmentFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_AlignmentFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::Alignment +// + +static QScriptValue qtscript_Qt_Alignment_toScriptValue(QScriptEngine *engine, const Qt::Alignment &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_Qt_Alignment_fromScriptValue(const QScriptValue &value, Qt::Alignment &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_Qt_Alignment(QScriptContext *context, QScriptEngine *engine) +{ + Qt::Alignment result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("Alignment(): argument %0 is not of type AlignmentFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_Qt_Alignment_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::Alignment value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_Alignment_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::Alignment value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 12; ++i) { + if ((value & qtscript_Qt_AlignmentFlag_values[i]) == qtscript_Qt_AlignmentFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_Qt_AlignmentFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_Qt_Alignment_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_Qt_Alignment_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_Qt_Alignment, qtscript_Qt_Alignment_valueOf, + qtscript_Qt_Alignment_toString, qtscript_Qt_Alignment_equals); + qScriptRegisterMetaType(engine, qtscript_Qt_Alignment_toScriptValue, + qtscript_Qt_Alignment_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// Qt::TimeSpec +// + +static const Qt::TimeSpec qtscript_Qt_TimeSpec_values[] = { + Qt::LocalTime + , Qt::UTC + , Qt::OffsetFromUTC + , Qt::TimeZone +}; + +static const char * const qtscript_Qt_TimeSpec_keys[] = { + "LocalTime" + , "UTC" + , "OffsetFromUTC" + , "TimeZone" +}; + +static QString qtscript_Qt_TimeSpec_toStringHelper(Qt::TimeSpec value) +{ + if ((value >= Qt::LocalTime) && (value <= Qt::TimeZone)) + return qtscript_Qt_TimeSpec_keys[static_cast(value)-static_cast(Qt::LocalTime)]; + return QString(); +} + +static QScriptValue qtscript_Qt_TimeSpec_toScriptValue(QScriptEngine *engine, const Qt::TimeSpec &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_TimeSpec_toStringHelper(value)); +} + +static void qtscript_Qt_TimeSpec_fromScriptValue(const QScriptValue &value, Qt::TimeSpec &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_TimeSpec(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::LocalTime) && (arg <= Qt::TimeZone)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("TimeSpec(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_TimeSpec_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TimeSpec value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_TimeSpec_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TimeSpec value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_TimeSpec_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_TimeSpec_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_TimeSpec, + qtscript_Qt_TimeSpec_valueOf, qtscript_Qt_TimeSpec_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_TimeSpec_toScriptValue, + qtscript_Qt_TimeSpec_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_TimeSpec_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_TimeSpec_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::Axis +// + +static const Qt::Axis qtscript_Qt_Axis_values[] = { + Qt::XAxis + , Qt::YAxis + , Qt::ZAxis +}; + +static const char * const qtscript_Qt_Axis_keys[] = { + "XAxis" + , "YAxis" + , "ZAxis" +}; + +static QString qtscript_Qt_Axis_toStringHelper(Qt::Axis value) +{ + if ((value >= Qt::XAxis) && (value <= Qt::ZAxis)) + return qtscript_Qt_Axis_keys[static_cast(value)-static_cast(Qt::XAxis)]; + return QString(); +} + +static QScriptValue qtscript_Qt_Axis_toScriptValue(QScriptEngine *engine, const Qt::Axis &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_Axis_toStringHelper(value)); +} + +static void qtscript_Qt_Axis_fromScriptValue(const QScriptValue &value, Qt::Axis &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_Axis(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::XAxis) && (arg <= Qt::ZAxis)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Axis(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_Axis_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::Axis value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_Axis_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::Axis value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_Axis_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_Axis_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_Axis, + qtscript_Qt_Axis_valueOf, qtscript_Qt_Axis_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_Axis_toScriptValue, + qtscript_Qt_Axis_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_Axis_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_Axis_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::CheckState +// + +static const Qt::CheckState qtscript_Qt_CheckState_values[] = { + Qt::Unchecked + , Qt::PartiallyChecked + , Qt::Checked +}; + +static const char * const qtscript_Qt_CheckState_keys[] = { + "Unchecked" + , "PartiallyChecked" + , "Checked" +}; + +static QString qtscript_Qt_CheckState_toStringHelper(Qt::CheckState value) +{ + if ((value >= Qt::Unchecked) && (value <= Qt::Checked)) + return qtscript_Qt_CheckState_keys[static_cast(value)-static_cast(Qt::Unchecked)]; + return QString(); +} + +static QScriptValue qtscript_Qt_CheckState_toScriptValue(QScriptEngine *engine, const Qt::CheckState &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_CheckState_toStringHelper(value)); +} + +static void qtscript_Qt_CheckState_fromScriptValue(const QScriptValue &value, Qt::CheckState &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_CheckState(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::Unchecked) && (arg <= Qt::Checked)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("CheckState(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_CheckState_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::CheckState value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_CheckState_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::CheckState value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_CheckState_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_CheckState_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_CheckState, + qtscript_Qt_CheckState_valueOf, qtscript_Qt_CheckState_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_CheckState_toScriptValue, + qtscript_Qt_CheckState_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_CheckState_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_CheckState_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::BrushStyle +// + +static const Qt::BrushStyle qtscript_Qt_BrushStyle_values[] = { + Qt::NoBrush + , Qt::SolidPattern + , Qt::Dense1Pattern + , Qt::Dense2Pattern + , Qt::Dense3Pattern + , Qt::Dense4Pattern + , Qt::Dense5Pattern + , Qt::Dense6Pattern + , Qt::Dense7Pattern + , Qt::HorPattern + , Qt::VerPattern + , Qt::CrossPattern + , Qt::BDiagPattern + , Qt::FDiagPattern + , Qt::DiagCrossPattern + , Qt::LinearGradientPattern + , Qt::RadialGradientPattern + , Qt::ConicalGradientPattern + , Qt::TexturePattern +}; + +static const char * const qtscript_Qt_BrushStyle_keys[] = { + "NoBrush" + , "SolidPattern" + , "Dense1Pattern" + , "Dense2Pattern" + , "Dense3Pattern" + , "Dense4Pattern" + , "Dense5Pattern" + , "Dense6Pattern" + , "Dense7Pattern" + , "HorPattern" + , "VerPattern" + , "CrossPattern" + , "BDiagPattern" + , "FDiagPattern" + , "DiagCrossPattern" + , "LinearGradientPattern" + , "RadialGradientPattern" + , "ConicalGradientPattern" + , "TexturePattern" +}; + +static QString qtscript_Qt_BrushStyle_toStringHelper(Qt::BrushStyle value) +{ + for (int i = 0; i < 19; ++i) { + if (qtscript_Qt_BrushStyle_values[i] == value) + return QString::fromLatin1(qtscript_Qt_BrushStyle_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_BrushStyle_toScriptValue(QScriptEngine *engine, const Qt::BrushStyle &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_BrushStyle_toStringHelper(value)); +} + +static void qtscript_Qt_BrushStyle_fromScriptValue(const QScriptValue &value, Qt::BrushStyle &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_BrushStyle(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 19; ++i) { + if (qtscript_Qt_BrushStyle_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("BrushStyle(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_BrushStyle_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::BrushStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_BrushStyle_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::BrushStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_BrushStyle_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_BrushStyle_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_BrushStyle, + qtscript_Qt_BrushStyle_valueOf, qtscript_Qt_BrushStyle_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_BrushStyle_toScriptValue, + qtscript_Qt_BrushStyle_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 19; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_BrushStyle_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_BrushStyle_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::ContextMenuPolicy +// + +static const Qt::ContextMenuPolicy qtscript_Qt_ContextMenuPolicy_values[] = { + Qt::NoContextMenu + , Qt::DefaultContextMenu + , Qt::ActionsContextMenu + , Qt::CustomContextMenu + , Qt::PreventContextMenu +}; + +static const char * const qtscript_Qt_ContextMenuPolicy_keys[] = { + "NoContextMenu" + , "DefaultContextMenu" + , "ActionsContextMenu" + , "CustomContextMenu" + , "PreventContextMenu" +}; + +static QString qtscript_Qt_ContextMenuPolicy_toStringHelper(Qt::ContextMenuPolicy value) +{ + if ((value >= Qt::NoContextMenu) && (value <= Qt::PreventContextMenu)) + return qtscript_Qt_ContextMenuPolicy_keys[static_cast(value)-static_cast(Qt::NoContextMenu)]; + return QString(); +} + +static QScriptValue qtscript_Qt_ContextMenuPolicy_toScriptValue(QScriptEngine *engine, const Qt::ContextMenuPolicy &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_ContextMenuPolicy_toStringHelper(value)); +} + +static void qtscript_Qt_ContextMenuPolicy_fromScriptValue(const QScriptValue &value, Qt::ContextMenuPolicy &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_ContextMenuPolicy(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::NoContextMenu) && (arg <= Qt::PreventContextMenu)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ContextMenuPolicy(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_ContextMenuPolicy_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ContextMenuPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ContextMenuPolicy_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ContextMenuPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_ContextMenuPolicy_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_ContextMenuPolicy_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_ContextMenuPolicy, + qtscript_Qt_ContextMenuPolicy_valueOf, qtscript_Qt_ContextMenuPolicy_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_ContextMenuPolicy_toScriptValue, + qtscript_Qt_ContextMenuPolicy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_ContextMenuPolicy_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_ContextMenuPolicy_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::CaseSensitivity +// + +static const Qt::CaseSensitivity qtscript_Qt_CaseSensitivity_values[] = { + Qt::CaseInsensitive + , Qt::CaseSensitive +}; + +static const char * const qtscript_Qt_CaseSensitivity_keys[] = { + "CaseInsensitive" + , "CaseSensitive" +}; + +static QString qtscript_Qt_CaseSensitivity_toStringHelper(Qt::CaseSensitivity value) +{ + if ((value >= Qt::CaseInsensitive) && (value <= Qt::CaseSensitive)) + return qtscript_Qt_CaseSensitivity_keys[static_cast(value)-static_cast(Qt::CaseInsensitive)]; + return QString(); +} + +static QScriptValue qtscript_Qt_CaseSensitivity_toScriptValue(QScriptEngine *engine, const Qt::CaseSensitivity &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_CaseSensitivity_toStringHelper(value)); +} + +static void qtscript_Qt_CaseSensitivity_fromScriptValue(const QScriptValue &value, Qt::CaseSensitivity &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_CaseSensitivity(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::CaseInsensitive) && (arg <= Qt::CaseSensitive)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("CaseSensitivity(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_CaseSensitivity_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::CaseSensitivity value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_CaseSensitivity_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::CaseSensitivity value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_CaseSensitivity_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_CaseSensitivity_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_CaseSensitivity, + qtscript_Qt_CaseSensitivity_valueOf, qtscript_Qt_CaseSensitivity_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_CaseSensitivity_toScriptValue, + qtscript_Qt_CaseSensitivity_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_CaseSensitivity_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_CaseSensitivity_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::WhiteSpaceMode +// + +static const Qt::WhiteSpaceMode qtscript_Qt_WhiteSpaceMode_values[] = { + Qt::WhiteSpaceModeUndefined + , Qt::WhiteSpaceNormal + , Qt::WhiteSpacePre + , Qt::WhiteSpaceNoWrap +}; + +static const char * const qtscript_Qt_WhiteSpaceMode_keys[] = { + "WhiteSpaceModeUndefined" + , "WhiteSpaceNormal" + , "WhiteSpacePre" + , "WhiteSpaceNoWrap" +}; + +static QString qtscript_Qt_WhiteSpaceMode_toStringHelper(Qt::WhiteSpaceMode value) +{ + if ((value >= Qt::WhiteSpaceModeUndefined) && (value <= Qt::WhiteSpaceNoWrap)) + return qtscript_Qt_WhiteSpaceMode_keys[static_cast(value)-static_cast(Qt::WhiteSpaceModeUndefined)]; + return QString(); +} + +static QScriptValue qtscript_Qt_WhiteSpaceMode_toScriptValue(QScriptEngine *engine, const Qt::WhiteSpaceMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_WhiteSpaceMode_toStringHelper(value)); +} + +static void qtscript_Qt_WhiteSpaceMode_fromScriptValue(const QScriptValue &value, Qt::WhiteSpaceMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_WhiteSpaceMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::WhiteSpaceModeUndefined) && (arg <= Qt::WhiteSpaceNoWrap)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("WhiteSpaceMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_WhiteSpaceMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WhiteSpaceMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_WhiteSpaceMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WhiteSpaceMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_WhiteSpaceMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_WhiteSpaceMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_WhiteSpaceMode, + qtscript_Qt_WhiteSpaceMode_valueOf, qtscript_Qt_WhiteSpaceMode_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_WhiteSpaceMode_toScriptValue, + qtscript_Qt_WhiteSpaceMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_WhiteSpaceMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_WhiteSpaceMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::MaskMode +// + +static const Qt::MaskMode qtscript_Qt_MaskMode_values[] = { + Qt::MaskInColor + , Qt::MaskOutColor +}; + +static const char * const qtscript_Qt_MaskMode_keys[] = { + "MaskInColor" + , "MaskOutColor" +}; + +static QString qtscript_Qt_MaskMode_toStringHelper(Qt::MaskMode value) +{ + if ((value >= Qt::MaskInColor) && (value <= Qt::MaskOutColor)) + return qtscript_Qt_MaskMode_keys[static_cast(value)-static_cast(Qt::MaskInColor)]; + return QString(); +} + +static QScriptValue qtscript_Qt_MaskMode_toScriptValue(QScriptEngine *engine, const Qt::MaskMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_MaskMode_toStringHelper(value)); +} + +static void qtscript_Qt_MaskMode_fromScriptValue(const QScriptValue &value, Qt::MaskMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_MaskMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::MaskInColor) && (arg <= Qt::MaskOutColor)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("MaskMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_MaskMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::MaskMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_MaskMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::MaskMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_MaskMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_MaskMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_MaskMode, + qtscript_Qt_MaskMode_valueOf, qtscript_Qt_MaskMode_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_MaskMode_toScriptValue, + qtscript_Qt_MaskMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_MaskMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_MaskMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::HitTestAccuracy +// + +static const Qt::HitTestAccuracy qtscript_Qt_HitTestAccuracy_values[] = { + Qt::ExactHit + , Qt::FuzzyHit +}; + +static const char * const qtscript_Qt_HitTestAccuracy_keys[] = { + "ExactHit" + , "FuzzyHit" +}; + +static QString qtscript_Qt_HitTestAccuracy_toStringHelper(Qt::HitTestAccuracy value) +{ + if ((value >= Qt::ExactHit) && (value <= Qt::FuzzyHit)) + return qtscript_Qt_HitTestAccuracy_keys[static_cast(value)-static_cast(Qt::ExactHit)]; + return QString(); +} + +static QScriptValue qtscript_Qt_HitTestAccuracy_toScriptValue(QScriptEngine *engine, const Qt::HitTestAccuracy &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_HitTestAccuracy_toStringHelper(value)); +} + +static void qtscript_Qt_HitTestAccuracy_fromScriptValue(const QScriptValue &value, Qt::HitTestAccuracy &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_HitTestAccuracy(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::ExactHit) && (arg <= Qt::FuzzyHit)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("HitTestAccuracy(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_HitTestAccuracy_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::HitTestAccuracy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_HitTestAccuracy_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::HitTestAccuracy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_HitTestAccuracy_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_HitTestAccuracy_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_HitTestAccuracy, + qtscript_Qt_HitTestAccuracy_valueOf, qtscript_Qt_HitTestAccuracy_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_HitTestAccuracy_toScriptValue, + qtscript_Qt_HitTestAccuracy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_HitTestAccuracy_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_HitTestAccuracy_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::GestureState +// + +static const Qt::GestureState qtscript_Qt_GestureState_values[] = { + Qt::NoGesture + , Qt::GestureStarted + , Qt::GestureUpdated + , Qt::GestureFinished + , Qt::GestureCanceled +}; + +static const char * const qtscript_Qt_GestureState_keys[] = { + "NoGesture" + , "GestureStarted" + , "GestureUpdated" + , "GestureFinished" + , "GestureCanceled" +}; + +static QString qtscript_Qt_GestureState_toStringHelper(Qt::GestureState value) +{ + if ((value >= Qt::NoGesture) && (value <= Qt::GestureCanceled)) + return qtscript_Qt_GestureState_keys[static_cast(value)-static_cast(Qt::NoGesture)]; + return QString(); +} + +static QScriptValue qtscript_Qt_GestureState_toScriptValue(QScriptEngine *engine, const Qt::GestureState &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_GestureState_toStringHelper(value)); +} + +static void qtscript_Qt_GestureState_fromScriptValue(const QScriptValue &value, Qt::GestureState &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_GestureState(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::NoGesture) && (arg <= Qt::GestureCanceled)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("GestureState(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_GestureState_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::GestureState value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_GestureState_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::GestureState value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_GestureState_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_GestureState_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_GestureState, + qtscript_Qt_GestureState_valueOf, qtscript_Qt_GestureState_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_GestureState_toScriptValue, + qtscript_Qt_GestureState_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_GestureState_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_GestureState_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::Orientation +// + +static const Qt::Orientation qtscript_Qt_Orientation_values[] = { + Qt::Horizontal + , Qt::Vertical +}; + +static const char * const qtscript_Qt_Orientation_keys[] = { + "Horizontal" + , "Vertical" +}; + +static QString qtscript_Qt_Orientation_toStringHelper(Qt::Orientation value) +{ + if ((value >= Qt::Horizontal) && (value <= Qt::Vertical)) + return qtscript_Qt_Orientation_keys[static_cast(value)-static_cast(Qt::Horizontal)]; + return QString(); +} + +static QScriptValue qtscript_Qt_Orientation_toScriptValue(QScriptEngine *engine, const Qt::Orientation &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_Orientation_toStringHelper(value)); +} + +static void qtscript_Qt_Orientation_fromScriptValue(const QScriptValue &value, Qt::Orientation &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_Orientation(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::Horizontal) && (arg <= Qt::Vertical)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Orientation(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_Orientation_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::Orientation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_Orientation_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::Orientation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_Orientation_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_Orientation_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_Orientation, + qtscript_Qt_Orientation_valueOf, qtscript_Qt_Orientation_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_Orientation_toScriptValue, + qtscript_Qt_Orientation_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_Orientation_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_Orientation_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::Orientations +// + +static QScriptValue qtscript_Qt_Orientations_toScriptValue(QScriptEngine *engine, const Qt::Orientations &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_Qt_Orientations_fromScriptValue(const QScriptValue &value, Qt::Orientations &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_Qt_Orientations(QScriptContext *context, QScriptEngine *engine) +{ + Qt::Orientations result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("Orientations(): argument %0 is not of type Orientation").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_Qt_Orientations_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::Orientations value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_Orientations_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::Orientations value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 2; ++i) { + if ((value & qtscript_Qt_Orientation_values[i]) == qtscript_Qt_Orientation_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_Qt_Orientation_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_Qt_Orientations_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_Qt_Orientations_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_Qt_Orientations, qtscript_Qt_Orientations_valueOf, + qtscript_Qt_Orientations_toString, qtscript_Qt_Orientations_equals); + qScriptRegisterMetaType(engine, qtscript_Qt_Orientations_toScriptValue, + qtscript_Qt_Orientations_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// Qt::SizeMode +// + +static const Qt::SizeMode qtscript_Qt_SizeMode_values[] = { + Qt::AbsoluteSize + , Qt::RelativeSize +}; + +static const char * const qtscript_Qt_SizeMode_keys[] = { + "AbsoluteSize" + , "RelativeSize" +}; + +static QString qtscript_Qt_SizeMode_toStringHelper(Qt::SizeMode value) +{ + if ((value >= Qt::AbsoluteSize) && (value <= Qt::RelativeSize)) + return qtscript_Qt_SizeMode_keys[static_cast(value)-static_cast(Qt::AbsoluteSize)]; + return QString(); +} + +static QScriptValue qtscript_Qt_SizeMode_toScriptValue(QScriptEngine *engine, const Qt::SizeMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_SizeMode_toStringHelper(value)); +} + +static void qtscript_Qt_SizeMode_fromScriptValue(const QScriptValue &value, Qt::SizeMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_SizeMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::AbsoluteSize) && (arg <= Qt::RelativeSize)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SizeMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_SizeMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::SizeMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_SizeMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::SizeMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_SizeMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_SizeMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_SizeMode, + qtscript_Qt_SizeMode_valueOf, qtscript_Qt_SizeMode_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_SizeMode_toScriptValue, + qtscript_Qt_SizeMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_SizeMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_SizeMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::InputMethodQuery +// + +static const Qt::InputMethodQuery qtscript_Qt_InputMethodQuery_values[] = { + Qt::ImPlatformData + , Qt::ImQueryAll + , Qt::ImEnabled + , Qt::ImCursorRectangle + , Qt::ImFont + , Qt::ImCursorPosition + , Qt::ImSurroundingText + , Qt::ImCurrentSelection + , Qt::ImMaximumTextLength + , Qt::ImAnchorPosition + , Qt::ImQueryInput + , Qt::ImHints + , Qt::ImPreferredLanguage + , Qt::ImAbsolutePosition + , Qt::ImTextBeforeCursor + , Qt::ImTextAfterCursor + , Qt::ImEnterKeyType +}; + +static const char * const qtscript_Qt_InputMethodQuery_keys[] = { + "ImPlatformData" + , "ImQueryAll" + , "ImEnabled" + , "ImCursorRectangle" + , "ImFont" + , "ImCursorPosition" + , "ImSurroundingText" + , "ImCurrentSelection" + , "ImMaximumTextLength" + , "ImAnchorPosition" + , "ImQueryInput" + , "ImHints" + , "ImPreferredLanguage" + , "ImAbsolutePosition" + , "ImTextBeforeCursor" + , "ImTextAfterCursor" + , "ImEnterKeyType" +}; + +static QString qtscript_Qt_InputMethodQuery_toStringHelper(Qt::InputMethodQuery value) +{ + for (int i = 0; i < 17; ++i) { + if (qtscript_Qt_InputMethodQuery_values[i] == value) + return QString::fromLatin1(qtscript_Qt_InputMethodQuery_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_InputMethodQuery_toScriptValue(QScriptEngine *engine, const Qt::InputMethodQuery &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_InputMethodQuery_toStringHelper(value)); +} + +static void qtscript_Qt_InputMethodQuery_fromScriptValue(const QScriptValue &value, Qt::InputMethodQuery &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_InputMethodQuery(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 17; ++i) { + if (qtscript_Qt_InputMethodQuery_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("InputMethodQuery(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_InputMethodQuery_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::InputMethodQuery value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_InputMethodQuery_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::InputMethodQuery value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_InputMethodQuery_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_InputMethodQuery_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_InputMethodQuery, + qtscript_Qt_InputMethodQuery_valueOf, qtscript_Qt_InputMethodQuery_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_InputMethodQuery_toScriptValue, + qtscript_Qt_InputMethodQuery_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 17; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_InputMethodQuery_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_InputMethodQuery_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::ToolBarArea +// + +static const Qt::ToolBarArea qtscript_Qt_ToolBarArea_values[] = { + Qt::NoToolBarArea + , Qt::LeftToolBarArea + , Qt::RightToolBarArea + , Qt::TopToolBarArea + , Qt::BottomToolBarArea + , Qt::ToolBarArea_Mask +}; + +static const char * const qtscript_Qt_ToolBarArea_keys[] = { + "NoToolBarArea" + , "LeftToolBarArea" + , "RightToolBarArea" + , "TopToolBarArea" + , "BottomToolBarArea" + , "ToolBarArea_Mask" +}; + +static QString qtscript_Qt_ToolBarArea_toStringHelper(Qt::ToolBarArea value) +{ + for (int i = 0; i < 6; ++i) { + if (qtscript_Qt_ToolBarArea_values[i] == value) + return QString::fromLatin1(qtscript_Qt_ToolBarArea_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_ToolBarArea_toScriptValue(QScriptEngine *engine, const Qt::ToolBarArea &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_ToolBarArea_toStringHelper(value)); +} + +static void qtscript_Qt_ToolBarArea_fromScriptValue(const QScriptValue &value, Qt::ToolBarArea &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_ToolBarArea(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 6; ++i) { + if (qtscript_Qt_ToolBarArea_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ToolBarArea(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_ToolBarArea_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ToolBarArea value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ToolBarArea_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ToolBarArea value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_ToolBarArea_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_ToolBarArea_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_ToolBarArea, + qtscript_Qt_ToolBarArea_valueOf, qtscript_Qt_ToolBarArea_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_ToolBarArea_toScriptValue, + qtscript_Qt_ToolBarArea_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_ToolBarArea_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_ToolBarArea_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::ToolBarAreas +// + +static QScriptValue qtscript_Qt_ToolBarAreas_toScriptValue(QScriptEngine *engine, const Qt::ToolBarAreas &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_Qt_ToolBarAreas_fromScriptValue(const QScriptValue &value, Qt::ToolBarAreas &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_Qt_ToolBarAreas(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ToolBarAreas result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("ToolBarAreas(): argument %0 is not of type ToolBarArea").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_Qt_ToolBarAreas_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ToolBarAreas value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_ToolBarAreas_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::ToolBarAreas value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 6; ++i) { + if ((value & qtscript_Qt_ToolBarArea_values[i]) == qtscript_Qt_ToolBarArea_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_Qt_ToolBarArea_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_Qt_ToolBarAreas_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_Qt_ToolBarAreas_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_Qt_ToolBarAreas, qtscript_Qt_ToolBarAreas_valueOf, + qtscript_Qt_ToolBarAreas_toString, qtscript_Qt_ToolBarAreas_equals); + qScriptRegisterMetaType(engine, qtscript_Qt_ToolBarAreas_toScriptValue, + qtscript_Qt_ToolBarAreas_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// Qt::FocusPolicy +// + +static const Qt::FocusPolicy qtscript_Qt_FocusPolicy_values[] = { + Qt::NoFocus + , Qt::TabFocus + , Qt::ClickFocus + , Qt::StrongFocus + , Qt::WheelFocus +}; + +static const char * const qtscript_Qt_FocusPolicy_keys[] = { + "NoFocus" + , "TabFocus" + , "ClickFocus" + , "StrongFocus" + , "WheelFocus" +}; + +static QString qtscript_Qt_FocusPolicy_toStringHelper(Qt::FocusPolicy value) +{ + for (int i = 0; i < 5; ++i) { + if (qtscript_Qt_FocusPolicy_values[i] == value) + return QString::fromLatin1(qtscript_Qt_FocusPolicy_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_FocusPolicy_toScriptValue(QScriptEngine *engine, const Qt::FocusPolicy &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_FocusPolicy_toStringHelper(value)); +} + +static void qtscript_Qt_FocusPolicy_fromScriptValue(const QScriptValue &value, Qt::FocusPolicy &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_FocusPolicy(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 5; ++i) { + if (qtscript_Qt_FocusPolicy_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("FocusPolicy(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_FocusPolicy_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::FocusPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_FocusPolicy_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::FocusPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_FocusPolicy_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_FocusPolicy_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_FocusPolicy, + qtscript_Qt_FocusPolicy_valueOf, qtscript_Qt_FocusPolicy_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_FocusPolicy_toScriptValue, + qtscript_Qt_FocusPolicy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_FocusPolicy_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_FocusPolicy_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::Corner +// + +static const Qt::Corner qtscript_Qt_Corner_values[] = { + Qt::TopLeftCorner + , Qt::TopRightCorner + , Qt::BottomLeftCorner + , Qt::BottomRightCorner +}; + +static const char * const qtscript_Qt_Corner_keys[] = { + "TopLeftCorner" + , "TopRightCorner" + , "BottomLeftCorner" + , "BottomRightCorner" +}; + +static QString qtscript_Qt_Corner_toStringHelper(Qt::Corner value) +{ + if ((value >= Qt::TopLeftCorner) && (value <= Qt::BottomRightCorner)) + return qtscript_Qt_Corner_keys[static_cast(value)-static_cast(Qt::TopLeftCorner)]; + return QString(); +} + +static QScriptValue qtscript_Qt_Corner_toScriptValue(QScriptEngine *engine, const Qt::Corner &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_Corner_toStringHelper(value)); +} + +static void qtscript_Qt_Corner_fromScriptValue(const QScriptValue &value, Qt::Corner &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_Corner(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::TopLeftCorner) && (arg <= Qt::BottomRightCorner)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Corner(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_Corner_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::Corner value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_Corner_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::Corner value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_Corner_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_Corner_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_Corner, + qtscript_Qt_Corner_valueOf, qtscript_Qt_Corner_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_Corner_toScriptValue, + qtscript_Qt_Corner_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_Corner_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_Corner_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::TouchPointState +// + +static const Qt::TouchPointState qtscript_Qt_TouchPointState_values[] = { + Qt::TouchPointPressed + , Qt::TouchPointMoved + , Qt::TouchPointStationary + , Qt::TouchPointReleased +}; + +static const char * const qtscript_Qt_TouchPointState_keys[] = { + "TouchPointPressed" + , "TouchPointMoved" + , "TouchPointStationary" + , "TouchPointReleased" +}; + +static QString qtscript_Qt_TouchPointState_toStringHelper(Qt::TouchPointState value) +{ + for (int i = 0; i < 4; ++i) { + if (qtscript_Qt_TouchPointState_values[i] == value) + return QString::fromLatin1(qtscript_Qt_TouchPointState_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_TouchPointState_toScriptValue(QScriptEngine *engine, const Qt::TouchPointState &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_TouchPointState_toStringHelper(value)); +} + +static void qtscript_Qt_TouchPointState_fromScriptValue(const QScriptValue &value, Qt::TouchPointState &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_TouchPointState(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 4; ++i) { + if (qtscript_Qt_TouchPointState_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("TouchPointState(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_TouchPointState_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TouchPointState value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_TouchPointState_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TouchPointState value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_TouchPointState_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_TouchPointState_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_TouchPointState, + qtscript_Qt_TouchPointState_valueOf, qtscript_Qt_TouchPointState_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_TouchPointState_toScriptValue, + qtscript_Qt_TouchPointState_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_TouchPointState_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_TouchPointState_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::TouchPointStates +// + +static QScriptValue qtscript_Qt_TouchPointStates_toScriptValue(QScriptEngine *engine, const Qt::TouchPointStates &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_Qt_TouchPointStates_fromScriptValue(const QScriptValue &value, Qt::TouchPointStates &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_Qt_TouchPointStates(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TouchPointStates result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("TouchPointStates(): argument %0 is not of type TouchPointState").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_Qt_TouchPointStates_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TouchPointStates value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_TouchPointStates_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::TouchPointStates value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 4; ++i) { + if ((value & qtscript_Qt_TouchPointState_values[i]) == qtscript_Qt_TouchPointState_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_Qt_TouchPointState_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_Qt_TouchPointStates_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_Qt_TouchPointStates_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_Qt_TouchPointStates, qtscript_Qt_TouchPointStates_valueOf, + qtscript_Qt_TouchPointStates_toString, qtscript_Qt_TouchPointStates_equals); + qScriptRegisterMetaType(engine, qtscript_Qt_TouchPointStates_toScriptValue, + qtscript_Qt_TouchPointStates_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// Qt::WindowState +// + +static const Qt::WindowState qtscript_Qt_WindowState_values[] = { + Qt::WindowNoState + , Qt::WindowMinimized + , Qt::WindowMaximized + , Qt::WindowFullScreen + , Qt::WindowActive +}; + +static const char * const qtscript_Qt_WindowState_keys[] = { + "WindowNoState" + , "WindowMinimized" + , "WindowMaximized" + , "WindowFullScreen" + , "WindowActive" +}; + +static QString qtscript_Qt_WindowState_toStringHelper(Qt::WindowState value) +{ + for (int i = 0; i < 5; ++i) { + if (qtscript_Qt_WindowState_values[i] == value) + return QString::fromLatin1(qtscript_Qt_WindowState_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_Qt_WindowState_toScriptValue(QScriptEngine *engine, const Qt::WindowState &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_WindowState_toStringHelper(value)); +} + +static void qtscript_Qt_WindowState_fromScriptValue(const QScriptValue &value, Qt::WindowState &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_WindowState(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 5; ++i) { + if (qtscript_Qt_WindowState_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("WindowState(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_WindowState_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WindowState value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_WindowState_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WindowState value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_WindowState_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_WindowState_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_WindowState, + qtscript_Qt_WindowState_valueOf, qtscript_Qt_WindowState_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_WindowState_toScriptValue, + qtscript_Qt_WindowState_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_WindowState_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_WindowState_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::WindowStates +// + +static QScriptValue qtscript_Qt_WindowStates_toScriptValue(QScriptEngine *engine, const Qt::WindowStates &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_Qt_WindowStates_fromScriptValue(const QScriptValue &value, Qt::WindowStates &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_Qt_WindowStates(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WindowStates result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("WindowStates(): argument %0 is not of type WindowState").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_Qt_WindowStates_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WindowStates value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_WindowStates_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::WindowStates value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 5; ++i) { + if ((value & qtscript_Qt_WindowState_values[i]) == qtscript_Qt_WindowState_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_Qt_WindowState_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_Qt_WindowStates_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_Qt_WindowStates_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_Qt_WindowStates, qtscript_Qt_WindowStates_valueOf, + qtscript_Qt_WindowStates_toString, qtscript_Qt_WindowStates_equals); + qScriptRegisterMetaType(engine, qtscript_Qt_WindowStates_toScriptValue, + qtscript_Qt_WindowStates_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// Qt::DayOfWeek +// + +static const Qt::DayOfWeek qtscript_Qt_DayOfWeek_values[] = { + Qt::Monday + , Qt::Tuesday + , Qt::Wednesday + , Qt::Thursday + , Qt::Friday + , Qt::Saturday + , Qt::Sunday +}; + +static const char * const qtscript_Qt_DayOfWeek_keys[] = { + "Monday" + , "Tuesday" + , "Wednesday" + , "Thursday" + , "Friday" + , "Saturday" + , "Sunday" +}; + +static QString qtscript_Qt_DayOfWeek_toStringHelper(Qt::DayOfWeek value) +{ + if ((value >= Qt::Monday) && (value <= Qt::Sunday)) + return qtscript_Qt_DayOfWeek_keys[static_cast(value)-static_cast(Qt::Monday)]; + return QString(); +} + +static QScriptValue qtscript_Qt_DayOfWeek_toScriptValue(QScriptEngine *engine, const Qt::DayOfWeek &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_DayOfWeek_toStringHelper(value)); +} + +static void qtscript_Qt_DayOfWeek_fromScriptValue(const QScriptValue &value, Qt::DayOfWeek &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_DayOfWeek(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::Monday) && (arg <= Qt::Sunday)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("DayOfWeek(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_DayOfWeek_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::DayOfWeek value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_DayOfWeek_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::DayOfWeek value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_DayOfWeek_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_DayOfWeek_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_DayOfWeek, + qtscript_Qt_DayOfWeek_valueOf, qtscript_Qt_DayOfWeek_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_DayOfWeek_toScriptValue, + qtscript_Qt_DayOfWeek_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 7; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_DayOfWeek_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_DayOfWeek_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt::NavigationMode +// + +static const Qt::NavigationMode qtscript_Qt_NavigationMode_values[] = { + Qt::NavigationModeNone + , Qt::NavigationModeKeypadTabOrder + , Qt::NavigationModeKeypadDirectional + , Qt::NavigationModeCursorAuto + , Qt::NavigationModeCursorForceVisible +}; + +static const char * const qtscript_Qt_NavigationMode_keys[] = { + "NavigationModeNone" + , "NavigationModeKeypadTabOrder" + , "NavigationModeKeypadDirectional" + , "NavigationModeCursorAuto" + , "NavigationModeCursorForceVisible" +}; + +static QString qtscript_Qt_NavigationMode_toStringHelper(Qt::NavigationMode value) +{ + if ((value >= Qt::NavigationModeNone) && (value <= Qt::NavigationModeCursorForceVisible)) + return qtscript_Qt_NavigationMode_keys[static_cast(value)-static_cast(Qt::NavigationModeNone)]; + return QString(); +} + +static QScriptValue qtscript_Qt_NavigationMode_toScriptValue(QScriptEngine *engine, const Qt::NavigationMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("Qt")); + return clazz.property(qtscript_Qt_NavigationMode_toStringHelper(value)); +} + +static void qtscript_Qt_NavigationMode_fromScriptValue(const QScriptValue &value, Qt::NavigationMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_Qt_NavigationMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= Qt::NavigationModeNone) && (arg <= Qt::NavigationModeCursorForceVisible)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("NavigationMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_Qt_NavigationMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + Qt::NavigationMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_Qt_NavigationMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + Qt::NavigationMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_Qt_NavigationMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_Qt_NavigationMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_Qt_NavigationMode, + qtscript_Qt_NavigationMode_valueOf, qtscript_Qt_NavigationMode_toString); + qScriptRegisterMetaType(engine, qtscript_Qt_NavigationMode_toScriptValue, + qtscript_Qt_NavigationMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_Qt_NavigationMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_Qt_NavigationMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// Qt +// + +static QScriptValue qtscript_Qt_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("Qt cannot be constructed")); + break; + + case 1: + if (context->argumentCount() == 1) { + if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::ApplicationAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::ArrowType _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::AspectRatioMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::Axis _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::BGMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::BrushStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::CaseSensitivity _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::CheckState _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::ClipOperation _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::ConnectionType _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::ContextMenuPolicy _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::Corner _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::CursorMoveStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::CursorShape _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::DateFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::DayOfWeek _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::DockWidgetArea _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::DropAction _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::FillRule _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::FocusPolicy _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::FocusReason _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::GestureState _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::GestureType _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::GlobalColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::InputMethodHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::InputMethodQuery _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::ItemDataRole _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::ItemSelectionMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::Key _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::LayoutDirection _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::MaskMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::PenCapStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::PenJoinStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::PenStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::ScreenOrientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::ScrollBarPolicy _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::ShortcutContext _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::SizeHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::SizeMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::SortOrder _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::TextElideMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::TextFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::TextInteractionFlag _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::TimeSpec _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::TimerType _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::ToolBarArea _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::ToolButtonStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::TransformationMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::WidgetAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::WindowModality _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::WindowState _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::WindowType _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_result = const_cast(Qt::qt_getEnumName(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_Qt_throw_ambiguity_error_helper(context, + qtscript_Qt_function_names[_id], + qtscript_Qt_function_signatures[_id]); +} + +QScriptValue qtscript_create_Qt_class(QScriptEngine *engine) +{ + QScriptValue proto = QScriptValue(); + QScriptValue ctor = engine->newFunction(qtscript_Qt_static_call, proto, qtscript_Qt_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_Qt_static_call, + qtscript_Qt_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_Qt_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("TextInteractionFlag"), + qtscript_create_Qt_TextInteractionFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("TextInteractionFlags"), + qtscript_create_Qt_TextInteractionFlags_class(engine)); + ctor.setProperty(QString::fromLatin1("ScrollBarPolicy"), + qtscript_create_Qt_ScrollBarPolicy_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("EventPriority"), + qtscript_create_Qt_EventPriority_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("WindowFrameSection"), + qtscript_create_Qt_WindowFrameSection_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("SortOrder"), + qtscript_create_Qt_SortOrder_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("BGMode"), + qtscript_create_Qt_BGMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("TileRule"), + qtscript_create_Qt_TileRule_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("WidgetAttribute"), + qtscript_create_Qt_WidgetAttribute_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("TransformationMode"), + qtscript_create_Qt_TransformationMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("PenJoinStyle"), + qtscript_create_Qt_PenJoinStyle_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("FocusReason"), + qtscript_create_Qt_FocusReason_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("WindowModality"), + qtscript_create_Qt_WindowModality_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ScreenOrientation"), + qtscript_create_Qt_ScreenOrientation_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("DropAction"), + qtscript_create_Qt_DropAction_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("DropActions"), + qtscript_create_Qt_DropActions_class(engine)); + ctor.setProperty(QString::fromLatin1("WindowType"), + qtscript_create_Qt_WindowType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("WindowFlags"), + qtscript_create_Qt_WindowFlags_class(engine)); + ctor.setProperty(QString::fromLatin1("ImageConversionFlag"), + qtscript_create_Qt_ImageConversionFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ImageConversionFlags"), + qtscript_create_Qt_ImageConversionFlags_class(engine)); + ctor.setProperty(QString::fromLatin1("AnchorPoint"), + qtscript_create_Qt_AnchorPoint_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("TextFlag"), + qtscript_create_Qt_TextFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("MatchFlag"), + qtscript_create_Qt_MatchFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("MatchFlags"), + qtscript_create_Qt_MatchFlags_class(engine)); + ctor.setProperty(QString::fromLatin1("DateFormat"), + qtscript_create_Qt_DateFormat_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("DockWidgetAreaSizes"), + qtscript_create_Qt_DockWidgetAreaSizes_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ArrowType"), + qtscript_create_Qt_ArrowType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ItemFlag"), + qtscript_create_Qt_ItemFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ItemFlags"), + qtscript_create_Qt_ItemFlags_class(engine)); + ctor.setProperty(QString::fromLatin1("PenCapStyle"), + qtscript_create_Qt_PenCapStyle_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("KeyboardModifier"), + qtscript_create_Qt_KeyboardModifier_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("KeyboardModifiers"), + qtscript_create_Qt_KeyboardModifiers_class(engine)); + ctor.setProperty(QString::fromLatin1("LayoutDirection"), + qtscript_create_Qt_LayoutDirection_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("GestureType"), + qtscript_create_Qt_GestureType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("DockWidgetArea"), + qtscript_create_Qt_DockWidgetArea_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("DockWidgetAreas"), + qtscript_create_Qt_DockWidgetAreas_class(engine)); + ctor.setProperty(QString::fromLatin1("UIEffect"), + qtscript_create_Qt_UIEffect_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("InputMethodHint"), + qtscript_create_Qt_InputMethodHint_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("InputMethodHints"), + qtscript_create_Qt_InputMethodHints_class(engine)); + ctor.setProperty(QString::fromLatin1("CoordinateSystem"), + qtscript_create_Qt_CoordinateSystem_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("TextElideMode"), + qtscript_create_Qt_TextElideMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ApplicationAttribute"), + qtscript_create_Qt_ApplicationAttribute_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("MouseButton"), + qtscript_create_Qt_MouseButton_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("MouseButtons"), + qtscript_create_Qt_MouseButtons_class(engine)); + ctor.setProperty(QString::fromLatin1("ItemDataRole"), + qtscript_create_Qt_ItemDataRole_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("CursorShape"), + qtscript_create_Qt_CursorShape_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("FillRule"), + qtscript_create_Qt_FillRule_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("AspectRatioMode"), + qtscript_create_Qt_AspectRatioMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("TextFormat"), + qtscript_create_Qt_TextFormat_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("CursorMoveStyle"), + qtscript_create_Qt_CursorMoveStyle_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("PenStyle"), + qtscript_create_Qt_PenStyle_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("TimerType"), + qtscript_create_Qt_TimerType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ClipOperation"), + qtscript_create_Qt_ClipOperation_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("GlobalColor"), + qtscript_create_Qt_GlobalColor_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("FindChildOption"), + qtscript_create_Qt_FindChildOption_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ShortcutContext"), + qtscript_create_Qt_ShortcutContext_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ConnectionType"), + qtscript_create_Qt_ConnectionType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ToolBarAreaSizes"), + qtscript_create_Qt_ToolBarAreaSizes_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Key"), + qtscript_create_Qt_Key_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("GestureFlag"), + qtscript_create_Qt_GestureFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("GestureFlags"), + qtscript_create_Qt_GestureFlags_class(engine)); + ctor.setProperty(QString::fromLatin1("SizeHint"), + qtscript_create_Qt_SizeHint_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ToolButtonStyle"), + qtscript_create_Qt_ToolButtonStyle_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ItemSelectionMode"), + qtscript_create_Qt_ItemSelectionMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("AlignmentFlag"), + qtscript_create_Qt_AlignmentFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Alignment"), + qtscript_create_Qt_Alignment_class(engine)); + ctor.setProperty(QString::fromLatin1("TimeSpec"), + qtscript_create_Qt_TimeSpec_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Axis"), + qtscript_create_Qt_Axis_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("CheckState"), + qtscript_create_Qt_CheckState_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("BrushStyle"), + qtscript_create_Qt_BrushStyle_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ContextMenuPolicy"), + qtscript_create_Qt_ContextMenuPolicy_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("CaseSensitivity"), + qtscript_create_Qt_CaseSensitivity_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("WhiteSpaceMode"), + qtscript_create_Qt_WhiteSpaceMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("MaskMode"), + qtscript_create_Qt_MaskMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("HitTestAccuracy"), + qtscript_create_Qt_HitTestAccuracy_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("GestureState"), + qtscript_create_Qt_GestureState_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Orientation"), + qtscript_create_Qt_Orientation_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Orientations"), + qtscript_create_Qt_Orientations_class(engine)); + ctor.setProperty(QString::fromLatin1("SizeMode"), + qtscript_create_Qt_SizeMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("InputMethodQuery"), + qtscript_create_Qt_InputMethodQuery_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ToolBarArea"), + qtscript_create_Qt_ToolBarArea_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ToolBarAreas"), + qtscript_create_Qt_ToolBarAreas_class(engine)); + ctor.setProperty(QString::fromLatin1("FocusPolicy"), + qtscript_create_Qt_FocusPolicy_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Corner"), + qtscript_create_Qt_Corner_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("TouchPointState"), + qtscript_create_Qt_TouchPointState_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("TouchPointStates"), + qtscript_create_Qt_TouchPointStates_class(engine)); + ctor.setProperty(QString::fromLatin1("WindowState"), + qtscript_create_Qt_WindowState_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("WindowStates"), + qtscript_create_Qt_WindowStates_class(engine)); + ctor.setProperty(QString::fromLatin1("DayOfWeek"), + qtscript_create_Qt_DayOfWeek_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("NavigationMode"), + qtscript_create_Qt_NavigationMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractAnimation.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractAnimation.cpp new file mode 100644 index 00000000..352b6e45 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractAnimation.cpp @@ -0,0 +1,149 @@ +#include "qtscriptshell_QAbstractAnimation.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QAbstractAnimation::Direction) +Q_DECLARE_METATYPE(QAbstractAnimation::State) + +QtScriptShell_QAbstractAnimation::QtScriptShell_QAbstractAnimation(QObject* parent) + : QAbstractAnimation(parent) {} + +QtScriptShell_QAbstractAnimation::~QtScriptShell_QAbstractAnimation() {} + +void QtScriptShell_QAbstractAnimation::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAbstractAnimation::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractAnimation::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAbstractAnimation::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAbstractAnimation::duration() const +{ + QScriptValue _q_function = __qtscript_self.property("_qs_duration"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("_qs_duration") & QScriptValue::QObjectMember)) { + qFatal("QAbstractAnimation::duration() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QAbstractAnimation::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAbstractAnimation::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QAbstractAnimation::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAbstractAnimation::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QAbstractAnimation::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAbstractAnimation::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractAnimation::updateCurrentTime(int currentTime) +{ + QScriptValue _q_function = __qtscript_self.property("updateCurrentTime"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateCurrentTime") & QScriptValue::QObjectMember)) { + qFatal("QAbstractAnimation::updateCurrentTime() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, currentTime)); + } +} + +void QtScriptShell_QAbstractAnimation::updateDirection(QAbstractAnimation::Direction direction) +{ + QScriptValue _q_function = __qtscript_self.property("updateDirection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateDirection") & QScriptValue::QObjectMember)) { + QAbstractAnimation::updateDirection(direction); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, direction)); + } +} + +void QtScriptShell_QAbstractAnimation::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) +{ + QScriptValue _q_function = __qtscript_self.property("updateState"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateState") & QScriptValue::QObjectMember)) { + QAbstractAnimation::updateState(newState, oldState); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, newState) + << qScriptValueFromValue(_q_engine, oldState)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractAnimation.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractAnimation.h new file mode 100644 index 00000000..a450e406 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractAnimation.h @@ -0,0 +1,28 @@ +#ifndef QTSCRIPTSHELL_QABSTRACTANIMATION_H +#define QTSCRIPTSHELL_QABSTRACTANIMATION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAbstractAnimation : public QAbstractAnimation +{ +public: + QtScriptShell_QAbstractAnimation(QObject* parent = 0); + ~QtScriptShell_QAbstractAnimation(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + int duration() const; + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + void updateCurrentTime(int currentTime); + void updateDirection(QAbstractAnimation::Direction direction); + void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QABSTRACTANIMATION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractItemModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractItemModel.cpp new file mode 100644 index 00000000..dba64138 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractItemModel.cpp @@ -0,0 +1,628 @@ +#include "qtscriptshell_QAbstractItemModel.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(Qt::DropAction) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::Orientation) +template <> \ +struct QMetaTypeId< QMap > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QMap >("QMap")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QMimeData*) +template <> \ +struct QMetaTypeId< QHash > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QHash >("QHash")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QAbstractItemModel::QtScriptShell_QAbstractItemModel(QObject* parent) + : QAbstractItemModel(parent) {} + +QtScriptShell_QAbstractItemModel::~QtScriptShell_QAbstractItemModel() {} + +QModelIndex QtScriptShell_QAbstractItemModel::buddy(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("buddy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("buddy") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::buddy(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QAbstractItemModel::canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("canDropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canDropMimeData") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::canDropMimeData(data, action, row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action) + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractItemModel::canFetchMore(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("canFetchMore"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canFetchMore") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::canFetchMore(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QAbstractItemModel::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAbstractItemModel::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAbstractItemModel::columnCount(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("columnCount"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("columnCount") & QScriptValue::QObjectMember)) { + qFatal("QAbstractItemModel::columnCount() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QAbstractItemModel::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAbstractItemModel::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QAbstractItemModel::data(const QModelIndex& index, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("data"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("data") & QScriptValue::QObjectMember)) { + qFatal("QAbstractItemModel::data() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QAbstractItemModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("dropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropMimeData") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::dropMimeData(data, action, row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action) + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractItemModel::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QAbstractItemModel::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QAbstractItemModel::fetchMore(const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("fetchMore"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fetchMore") & QScriptValue::QObjectMember)) { + QAbstractItemModel::fetchMore(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent)); + } +} + +Qt::ItemFlags QtScriptShell_QAbstractItemModel::flags(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("flags"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("flags") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::flags(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QAbstractItemModel::hasChildren(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("hasChildren"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasChildren") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::hasChildren(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +QVariant QtScriptShell_QAbstractItemModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("headerData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("headerData") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::headerData(section, orientation, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, section) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, role))); + } +} + +QModelIndex QtScriptShell_QAbstractItemModel::index(int row, int column, const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("index"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("index") & QScriptValue::QObjectMember)) { + qFatal("QAbstractItemModel::index() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractItemModel::insertColumns(int column, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("insertColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertColumns") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::insertColumns(column, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractItemModel::insertRows(int row, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("insertRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertRows") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::insertRows(row, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +QMap QtScriptShell_QAbstractItemModel::itemData(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("itemData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemData") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::itemData(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QList QtScriptShell_QAbstractItemModel::match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const +{ + QScriptValue _q_function = __qtscript_self.property("match"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("match") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::match(start, role, value, hits, flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, role) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, hits) + << qScriptValueFromValue(_q_engine, flags))); + } +} + +QMimeData* QtScriptShell_QAbstractItemModel::mimeData(const QList& indexes) const +{ + QScriptValue _q_function = __qtscript_self.property("mimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeData") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::mimeData(indexes); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, indexes))); + } +} + +QStringList QtScriptShell_QAbstractItemModel::mimeTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("mimeTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeTypes") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::mimeTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QAbstractItemModel::moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) +{ + QScriptValue _q_function = __qtscript_self.property("moveColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveColumns") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceParent) + << qScriptValueFromValue(_q_engine, sourceColumn) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, destinationParent) + << qScriptValueFromValue(_q_engine, destinationChild))); + } +} + +bool QtScriptShell_QAbstractItemModel::moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) +{ + QScriptValue _q_function = __qtscript_self.property("moveRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveRows") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceParent) + << qScriptValueFromValue(_q_engine, sourceRow) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, destinationParent) + << qScriptValueFromValue(_q_engine, destinationChild))); + } +} + +QModelIndex QtScriptShell_QAbstractItemModel::parent(const QModelIndex& child) const +{ + QScriptValue _q_function = __qtscript_self.property("parent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("parent") & QScriptValue::QObjectMember)) { + qFatal("QAbstractItemModel::parent() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, child))); + } +} + +bool QtScriptShell_QAbstractItemModel::removeColumns(int column, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("removeColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeColumns") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::removeColumns(column, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractItemModel::removeRows(int row, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("removeRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeRows") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::removeRows(row, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QAbstractItemModel::revert() +{ + QScriptValue _q_function = __qtscript_self.property("revert"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("revert") & QScriptValue::QObjectMember)) { + QAbstractItemModel::revert(); + } else { + _q_function.call(__qtscript_self); + } +} + +QHash QtScriptShell_QAbstractItemModel::roleNames() const +{ + QScriptValue _q_function = __qtscript_self.property("roleNames"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("roleNames") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::roleNames(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QAbstractItemModel::rowCount(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("rowCount"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowCount") & QScriptValue::QObjectMember)) { + qFatal("QAbstractItemModel::rowCount() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractItemModel::setData(const QModelIndex& index, const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setData") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::setData(index, value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QAbstractItemModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setHeaderData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setHeaderData") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::setHeaderData(section, orientation, value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, section) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QAbstractItemModel::setItemData(const QModelIndex& index, const QMap& roles) +{ + QScriptValue _q_function = __qtscript_self.property("setItemData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setItemData") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::setItemData(index, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, roles))); + } +} + +QModelIndex QtScriptShell_QAbstractItemModel::sibling(int row, int column, const QModelIndex& idx) const +{ + QScriptValue _q_function = __qtscript_self.property("sibling"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sibling") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::sibling(row, column, idx); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, idx))); + } +} + +void QtScriptShell_QAbstractItemModel::sort(int column, Qt::SortOrder order) +{ + QScriptValue _q_function = __qtscript_self.property("sort"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sort") & QScriptValue::QObjectMember)) { + QAbstractItemModel::sort(column, order); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, order)); + } +} + +QSize QtScriptShell_QAbstractItemModel::span(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("span"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("span") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::span(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QAbstractItemModel::submit() +{ + QScriptValue _q_function = __qtscript_self.property("submit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("submit") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::submit(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::DropActions QtScriptShell_QAbstractItemModel::supportedDragActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDragActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDragActions") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::supportedDragActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::DropActions QtScriptShell_QAbstractItemModel::supportedDropActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDropActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDropActions") & QScriptValue::QObjectMember)) { + return QAbstractItemModel::supportedDropActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractItemModel::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAbstractItemModel::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractItemModel.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractItemModel.h new file mode 100644 index 00000000..6ecb155b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractItemModel.h @@ -0,0 +1,58 @@ +#ifndef QTSCRIPTSHELL_QABSTRACTITEMMODEL_H +#define QTSCRIPTSHELL_QABSTRACTITEMMODEL_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAbstractItemModel : public QAbstractItemModel +{ +public: + QtScriptShell_QAbstractItemModel(QObject* parent = 0); + ~QtScriptShell_QAbstractItemModel(); + + QModelIndex buddy(const QModelIndex& index) const; + bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const; + bool canFetchMore(const QModelIndex& parent) const; + void childEvent(QChildEvent* event); + int columnCount(const QModelIndex& parent = QModelIndex()) const; + void customEvent(QEvent* event); + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; + bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fetchMore(const QModelIndex& parent); + Qt::ItemFlags flags(const QModelIndex& index) const; + bool hasChildren(const QModelIndex& parent = QModelIndex()) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const; + bool insertColumns(int column, int count, const QModelIndex& parent = QModelIndex()); + bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex()); + QMap itemData(const QModelIndex& index) const; + QList match(const QModelIndex& start, int role, const QVariant& value, int hits = 1, Qt::MatchFlags flags = Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const; + QMimeData* mimeData(const QList& indexes) const; + QStringList mimeTypes() const; + bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild); + bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild); + QModelIndex parent(const QModelIndex& child) const; + bool removeColumns(int column, int count, const QModelIndex& parent = QModelIndex()); + bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()); + void revert(); + QHash roleNames() const; + int rowCount(const QModelIndex& parent = QModelIndex()) const; + bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); + bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role = Qt::EditRole); + bool setItemData(const QModelIndex& index, const QMap& roles); + QModelIndex sibling(int row, int column, const QModelIndex& idx) const; + void sort(int column, Qt::SortOrder order = Qt::AscendingOrder); + QSize span(const QModelIndex& index) const; + bool submit(); + Qt::DropActions supportedDragActions() const; + Qt::DropActions supportedDropActions() const; + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QABSTRACTITEMMODEL_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractListModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractListModel.cpp new file mode 100644 index 00000000..83f2be48 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractListModel.cpp @@ -0,0 +1,588 @@ +#include "qtscriptshell_QAbstractListModel.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(Qt::DropAction) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::Orientation) +template <> \ +struct QMetaTypeId< QMap > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QMap >("QMap")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QMimeData*) +template <> \ +struct QMetaTypeId< QHash > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QHash >("QHash")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QAbstractListModel::QtScriptShell_QAbstractListModel(QObject* parent) + : QAbstractListModel(parent) {} + +QtScriptShell_QAbstractListModel::~QtScriptShell_QAbstractListModel() {} + +QModelIndex QtScriptShell_QAbstractListModel::buddy(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("buddy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("buddy") & QScriptValue::QObjectMember)) { + return QAbstractListModel::buddy(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QAbstractListModel::canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("canDropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canDropMimeData") & QScriptValue::QObjectMember)) { + return QAbstractListModel::canDropMimeData(data, action, row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action) + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractListModel::canFetchMore(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("canFetchMore"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canFetchMore") & QScriptValue::QObjectMember)) { + return QAbstractListModel::canFetchMore(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QAbstractListModel::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAbstractListModel::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractListModel::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAbstractListModel::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QAbstractListModel::data(const QModelIndex& index, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("data"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("data") & QScriptValue::QObjectMember)) { + qFatal("QAbstractListModel::data() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QAbstractListModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("dropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropMimeData") & QScriptValue::QObjectMember)) { + return QAbstractListModel::dropMimeData(data, action, row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action) + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractListModel::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAbstractListModel::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QAbstractListModel::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAbstractListModel::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QAbstractListModel::fetchMore(const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("fetchMore"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fetchMore") & QScriptValue::QObjectMember)) { + QAbstractListModel::fetchMore(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent)); + } +} + +Qt::ItemFlags QtScriptShell_QAbstractListModel::flags(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("flags"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("flags") & QScriptValue::QObjectMember)) { + return QAbstractListModel::flags(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QVariant QtScriptShell_QAbstractListModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("headerData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("headerData") & QScriptValue::QObjectMember)) { + return QAbstractListModel::headerData(section, orientation, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, section) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, role))); + } +} + +QModelIndex QtScriptShell_QAbstractListModel::index(int row, int column, const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("index"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("index") & QScriptValue::QObjectMember)) { + return QAbstractListModel::index(row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractListModel::insertColumns(int column, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("insertColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertColumns") & QScriptValue::QObjectMember)) { + return QAbstractListModel::insertColumns(column, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractListModel::insertRows(int row, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("insertRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertRows") & QScriptValue::QObjectMember)) { + return QAbstractListModel::insertRows(row, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +QMap QtScriptShell_QAbstractListModel::itemData(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("itemData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemData") & QScriptValue::QObjectMember)) { + return QAbstractListModel::itemData(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QList QtScriptShell_QAbstractListModel::match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const +{ + QScriptValue _q_function = __qtscript_self.property("match"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("match") & QScriptValue::QObjectMember)) { + return QAbstractListModel::match(start, role, value, hits, flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, role) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, hits) + << qScriptValueFromValue(_q_engine, flags))); + } +} + +QMimeData* QtScriptShell_QAbstractListModel::mimeData(const QList& indexes) const +{ + QScriptValue _q_function = __qtscript_self.property("mimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeData") & QScriptValue::QObjectMember)) { + return QAbstractListModel::mimeData(indexes); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, indexes))); + } +} + +QStringList QtScriptShell_QAbstractListModel::mimeTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("mimeTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeTypes") & QScriptValue::QObjectMember)) { + return QAbstractListModel::mimeTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QAbstractListModel::moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) +{ + QScriptValue _q_function = __qtscript_self.property("moveColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveColumns") & QScriptValue::QObjectMember)) { + return QAbstractListModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceParent) + << qScriptValueFromValue(_q_engine, sourceColumn) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, destinationParent) + << qScriptValueFromValue(_q_engine, destinationChild))); + } +} + +bool QtScriptShell_QAbstractListModel::moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) +{ + QScriptValue _q_function = __qtscript_self.property("moveRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveRows") & QScriptValue::QObjectMember)) { + return QAbstractListModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceParent) + << qScriptValueFromValue(_q_engine, sourceRow) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, destinationParent) + << qScriptValueFromValue(_q_engine, destinationChild))); + } +} + +bool QtScriptShell_QAbstractListModel::removeColumns(int column, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("removeColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeColumns") & QScriptValue::QObjectMember)) { + return QAbstractListModel::removeColumns(column, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractListModel::removeRows(int row, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("removeRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeRows") & QScriptValue::QObjectMember)) { + return QAbstractListModel::removeRows(row, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QAbstractListModel::revert() +{ + QScriptValue _q_function = __qtscript_self.property("revert"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("revert") & QScriptValue::QObjectMember)) { + QAbstractListModel::revert(); + } else { + _q_function.call(__qtscript_self); + } +} + +QHash QtScriptShell_QAbstractListModel::roleNames() const +{ + QScriptValue _q_function = __qtscript_self.property("roleNames"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("roleNames") & QScriptValue::QObjectMember)) { + return QAbstractListModel::roleNames(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QAbstractListModel::rowCount(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("rowCount"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowCount") & QScriptValue::QObjectMember)) { + qFatal("QAbstractListModel::rowCount() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractListModel::setData(const QModelIndex& index, const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setData") & QScriptValue::QObjectMember)) { + return QAbstractListModel::setData(index, value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QAbstractListModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setHeaderData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setHeaderData") & QScriptValue::QObjectMember)) { + return QAbstractListModel::setHeaderData(section, orientation, value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, section) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QAbstractListModel::setItemData(const QModelIndex& index, const QMap& roles) +{ + QScriptValue _q_function = __qtscript_self.property("setItemData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setItemData") & QScriptValue::QObjectMember)) { + return QAbstractListModel::setItemData(index, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, roles))); + } +} + +QModelIndex QtScriptShell_QAbstractListModel::sibling(int row, int column, const QModelIndex& idx) const +{ + QScriptValue _q_function = __qtscript_self.property("sibling"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sibling") & QScriptValue::QObjectMember)) { + return QAbstractListModel::sibling(row, column, idx); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, idx))); + } +} + +void QtScriptShell_QAbstractListModel::sort(int column, Qt::SortOrder order) +{ + QScriptValue _q_function = __qtscript_self.property("sort"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sort") & QScriptValue::QObjectMember)) { + QAbstractListModel::sort(column, order); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, order)); + } +} + +QSize QtScriptShell_QAbstractListModel::span(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("span"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("span") & QScriptValue::QObjectMember)) { + return QAbstractListModel::span(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QAbstractListModel::submit() +{ + QScriptValue _q_function = __qtscript_self.property("submit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("submit") & QScriptValue::QObjectMember)) { + return QAbstractListModel::submit(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::DropActions QtScriptShell_QAbstractListModel::supportedDragActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDragActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDragActions") & QScriptValue::QObjectMember)) { + return QAbstractListModel::supportedDragActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::DropActions QtScriptShell_QAbstractListModel::supportedDropActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDropActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDropActions") & QScriptValue::QObjectMember)) { + return QAbstractListModel::supportedDropActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractListModel::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAbstractListModel::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractListModel.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractListModel.h new file mode 100644 index 00000000..1f7193a3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractListModel.h @@ -0,0 +1,55 @@ +#ifndef QTSCRIPTSHELL_QABSTRACTLISTMODEL_H +#define QTSCRIPTSHELL_QABSTRACTLISTMODEL_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAbstractListModel : public QAbstractListModel +{ +public: + QtScriptShell_QAbstractListModel(QObject* parent = 0); + ~QtScriptShell_QAbstractListModel(); + + QModelIndex buddy(const QModelIndex& index) const; + bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const; + bool canFetchMore(const QModelIndex& parent) const; + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + QVariant data(const QModelIndex& index, int role) const; + bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fetchMore(const QModelIndex& parent); + Qt::ItemFlags flags(const QModelIndex& index) const; + QVariant headerData(int section, Qt::Orientation orientation, int role) const; + QModelIndex index(int row, int column = 0, const QModelIndex& parent = QModelIndex()) const; + bool insertColumns(int column, int count, const QModelIndex& parent); + bool insertRows(int row, int count, const QModelIndex& parent); + QMap itemData(const QModelIndex& index) const; + QList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const; + QMimeData* mimeData(const QList& indexes) const; + QStringList mimeTypes() const; + bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild); + bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild); + bool removeColumns(int column, int count, const QModelIndex& parent); + bool removeRows(int row, int count, const QModelIndex& parent); + void revert(); + QHash roleNames() const; + int rowCount(const QModelIndex& parent) const; + bool setData(const QModelIndex& index, const QVariant& value, int role); + bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role); + bool setItemData(const QModelIndex& index, const QMap& roles); + QModelIndex sibling(int row, int column, const QModelIndex& idx) const; + void sort(int column, Qt::SortOrder order); + QSize span(const QModelIndex& index) const; + bool submit(); + Qt::DropActions supportedDragActions() const; + Qt::DropActions supportedDropActions() const; + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QABSTRACTLISTMODEL_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractState.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractState.cpp new file mode 100644 index 00000000..c17770d1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractState.cpp @@ -0,0 +1,122 @@ +#include "qtscriptshell_QAbstractState.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QAbstractState::QtScriptShell_QAbstractState(QState* parent) + : QAbstractState(parent) {} + +QtScriptShell_QAbstractState::~QtScriptShell_QAbstractState() {} + +void QtScriptShell_QAbstractState::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAbstractState::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractState::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAbstractState::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractState::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAbstractState::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QAbstractState::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAbstractState::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QAbstractState::onEntry(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("onEntry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("onEntry") & QScriptValue::QObjectMember)) { + qFatal("QAbstractState::onEntry() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractState::onExit(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("onExit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("onExit") & QScriptValue::QObjectMember)) { + qFatal("QAbstractState::onExit() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractState::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAbstractState::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractState.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractState.h new file mode 100644 index 00000000..e0fb1ce9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractState.h @@ -0,0 +1,26 @@ +#ifndef QTSCRIPTSHELL_QABSTRACTSTATE_H +#define QTSCRIPTSHELL_QABSTRACTSTATE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAbstractState : public QAbstractState +{ +public: + QtScriptShell_QAbstractState(QState* parent = 0); + ~QtScriptShell_QAbstractState(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void onEntry(QEvent* event); + void onExit(QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QABSTRACTSTATE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractTableModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractTableModel.cpp new file mode 100644 index 00000000..53d0f5ca --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractTableModel.cpp @@ -0,0 +1,602 @@ +#include "qtscriptshell_QAbstractTableModel.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(Qt::DropAction) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::Orientation) +template <> \ +struct QMetaTypeId< QMap > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QMap >("QMap")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QMimeData*) +template <> \ +struct QMetaTypeId< QHash > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QHash >("QHash")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QAbstractTableModel::QtScriptShell_QAbstractTableModel(QObject* parent) + : QAbstractTableModel(parent) {} + +QtScriptShell_QAbstractTableModel::~QtScriptShell_QAbstractTableModel() {} + +QModelIndex QtScriptShell_QAbstractTableModel::buddy(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("buddy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("buddy") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::buddy(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QAbstractTableModel::canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("canDropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canDropMimeData") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::canDropMimeData(data, action, row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action) + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractTableModel::canFetchMore(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("canFetchMore"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canFetchMore") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::canFetchMore(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QAbstractTableModel::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAbstractTableModel::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAbstractTableModel::columnCount(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("columnCount"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("columnCount") & QScriptValue::QObjectMember)) { + qFatal("QAbstractTableModel::columnCount() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QAbstractTableModel::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAbstractTableModel::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QAbstractTableModel::data(const QModelIndex& index, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("data"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("data") & QScriptValue::QObjectMember)) { + qFatal("QAbstractTableModel::data() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QAbstractTableModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("dropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropMimeData") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::dropMimeData(data, action, row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action) + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractTableModel::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QAbstractTableModel::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QAbstractTableModel::fetchMore(const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("fetchMore"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fetchMore") & QScriptValue::QObjectMember)) { + QAbstractTableModel::fetchMore(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent)); + } +} + +Qt::ItemFlags QtScriptShell_QAbstractTableModel::flags(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("flags"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("flags") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::flags(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QVariant QtScriptShell_QAbstractTableModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("headerData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("headerData") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::headerData(section, orientation, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, section) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, role))); + } +} + +QModelIndex QtScriptShell_QAbstractTableModel::index(int row, int column, const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("index"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("index") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::index(row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractTableModel::insertColumns(int column, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("insertColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertColumns") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::insertColumns(column, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractTableModel::insertRows(int row, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("insertRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertRows") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::insertRows(row, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +QMap QtScriptShell_QAbstractTableModel::itemData(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("itemData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemData") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::itemData(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QList QtScriptShell_QAbstractTableModel::match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const +{ + QScriptValue _q_function = __qtscript_self.property("match"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("match") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::match(start, role, value, hits, flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, role) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, hits) + << qScriptValueFromValue(_q_engine, flags))); + } +} + +QMimeData* QtScriptShell_QAbstractTableModel::mimeData(const QList& indexes) const +{ + QScriptValue _q_function = __qtscript_self.property("mimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeData") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::mimeData(indexes); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, indexes))); + } +} + +QStringList QtScriptShell_QAbstractTableModel::mimeTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("mimeTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeTypes") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::mimeTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QAbstractTableModel::moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) +{ + QScriptValue _q_function = __qtscript_self.property("moveColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveColumns") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceParent) + << qScriptValueFromValue(_q_engine, sourceColumn) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, destinationParent) + << qScriptValueFromValue(_q_engine, destinationChild))); + } +} + +bool QtScriptShell_QAbstractTableModel::moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) +{ + QScriptValue _q_function = __qtscript_self.property("moveRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveRows") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceParent) + << qScriptValueFromValue(_q_engine, sourceRow) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, destinationParent) + << qScriptValueFromValue(_q_engine, destinationChild))); + } +} + +bool QtScriptShell_QAbstractTableModel::removeColumns(int column, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("removeColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeColumns") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::removeColumns(column, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractTableModel::removeRows(int row, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("removeRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeRows") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::removeRows(row, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QAbstractTableModel::revert() +{ + QScriptValue _q_function = __qtscript_self.property("revert"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("revert") & QScriptValue::QObjectMember)) { + QAbstractTableModel::revert(); + } else { + _q_function.call(__qtscript_self); + } +} + +QHash QtScriptShell_QAbstractTableModel::roleNames() const +{ + QScriptValue _q_function = __qtscript_self.property("roleNames"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("roleNames") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::roleNames(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QAbstractTableModel::rowCount(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("rowCount"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowCount") & QScriptValue::QObjectMember)) { + qFatal("QAbstractTableModel::rowCount() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QAbstractTableModel::setData(const QModelIndex& index, const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setData") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::setData(index, value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QAbstractTableModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setHeaderData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setHeaderData") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::setHeaderData(section, orientation, value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, section) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QAbstractTableModel::setItemData(const QModelIndex& index, const QMap& roles) +{ + QScriptValue _q_function = __qtscript_self.property("setItemData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setItemData") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::setItemData(index, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, roles))); + } +} + +QModelIndex QtScriptShell_QAbstractTableModel::sibling(int row, int column, const QModelIndex& idx) const +{ + QScriptValue _q_function = __qtscript_self.property("sibling"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sibling") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::sibling(row, column, idx); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, idx))); + } +} + +void QtScriptShell_QAbstractTableModel::sort(int column, Qt::SortOrder order) +{ + QScriptValue _q_function = __qtscript_self.property("sort"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sort") & QScriptValue::QObjectMember)) { + QAbstractTableModel::sort(column, order); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, order)); + } +} + +QSize QtScriptShell_QAbstractTableModel::span(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("span"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("span") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::span(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QAbstractTableModel::submit() +{ + QScriptValue _q_function = __qtscript_self.property("submit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("submit") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::submit(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::DropActions QtScriptShell_QAbstractTableModel::supportedDragActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDragActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDragActions") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::supportedDragActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::DropActions QtScriptShell_QAbstractTableModel::supportedDropActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDropActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDropActions") & QScriptValue::QObjectMember)) { + return QAbstractTableModel::supportedDropActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractTableModel::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAbstractTableModel::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractTableModel.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractTableModel.h new file mode 100644 index 00000000..049ca756 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractTableModel.h @@ -0,0 +1,56 @@ +#ifndef QTSCRIPTSHELL_QABSTRACTTABLEMODEL_H +#define QTSCRIPTSHELL_QABSTRACTTABLEMODEL_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAbstractTableModel : public QAbstractTableModel +{ +public: + QtScriptShell_QAbstractTableModel(QObject* parent = 0); + ~QtScriptShell_QAbstractTableModel(); + + QModelIndex buddy(const QModelIndex& index) const; + bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const; + bool canFetchMore(const QModelIndex& parent) const; + void childEvent(QChildEvent* event); + int columnCount(const QModelIndex& parent) const; + void customEvent(QEvent* event); + QVariant data(const QModelIndex& index, int role) const; + bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fetchMore(const QModelIndex& parent); + Qt::ItemFlags flags(const QModelIndex& index) const; + QVariant headerData(int section, Qt::Orientation orientation, int role) const; + QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const; + bool insertColumns(int column, int count, const QModelIndex& parent); + bool insertRows(int row, int count, const QModelIndex& parent); + QMap itemData(const QModelIndex& index) const; + QList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const; + QMimeData* mimeData(const QList& indexes) const; + QStringList mimeTypes() const; + bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild); + bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild); + bool removeColumns(int column, int count, const QModelIndex& parent); + bool removeRows(int row, int count, const QModelIndex& parent); + void revert(); + QHash roleNames() const; + int rowCount(const QModelIndex& parent) const; + bool setData(const QModelIndex& index, const QVariant& value, int role); + bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role); + bool setItemData(const QModelIndex& index, const QMap& roles); + QModelIndex sibling(int row, int column, const QModelIndex& idx) const; + void sort(int column, Qt::SortOrder order); + QSize span(const QModelIndex& index) const; + bool submit(); + Qt::DropActions supportedDragActions() const; + Qt::DropActions supportedDropActions() const; + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QABSTRACTTABLEMODEL_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractTransition.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractTransition.cpp new file mode 100644 index 00000000..b6fc1c0f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractTransition.cpp @@ -0,0 +1,124 @@ +#include "qtscriptshell_QAbstractTransition.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QAbstractTransition::QtScriptShell_QAbstractTransition(QState* sourceState) + : QAbstractTransition(sourceState) {} + +QtScriptShell_QAbstractTransition::~QtScriptShell_QAbstractTransition() {} + +void QtScriptShell_QAbstractTransition::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAbstractTransition::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractTransition::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAbstractTransition::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractTransition::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAbstractTransition::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QAbstractTransition::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAbstractTransition::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QAbstractTransition::eventTest(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventTest"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventTest") & QScriptValue::QObjectMember)) { + qFatal("QAbstractTransition::eventTest() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QAbstractTransition::onTransition(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("onTransition"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("onTransition") & QScriptValue::QObjectMember)) { + qFatal("QAbstractTransition::onTransition() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractTransition::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAbstractTransition::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractTransition.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractTransition.h new file mode 100644 index 00000000..11a3724b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAbstractTransition.h @@ -0,0 +1,26 @@ +#ifndef QTSCRIPTSHELL_QABSTRACTTRANSITION_H +#define QTSCRIPTSHELL_QABSTRACTTRANSITION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAbstractTransition : public QAbstractTransition +{ +public: + QtScriptShell_QAbstractTransition(QState* sourceState = 0); + ~QtScriptShell_QAbstractTransition(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + bool eventTest(QEvent* event); + void onTransition(QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QABSTRACTTRANSITION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAnimationGroup.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAnimationGroup.cpp new file mode 100644 index 00000000..a749e791 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAnimationGroup.cpp @@ -0,0 +1,149 @@ +#include "qtscriptshell_QAnimationGroup.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QAbstractAnimation::Direction) +Q_DECLARE_METATYPE(QAbstractAnimation::State) + +QtScriptShell_QAnimationGroup::QtScriptShell_QAnimationGroup(QObject* parent) + : QAnimationGroup(parent) {} + +QtScriptShell_QAnimationGroup::~QtScriptShell_QAnimationGroup() {} + +void QtScriptShell_QAnimationGroup::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAnimationGroup::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAnimationGroup::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAnimationGroup::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAnimationGroup::duration() const +{ + QScriptValue _q_function = __qtscript_self.property("_qs_duration"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("_qs_duration") & QScriptValue::QObjectMember)) { + qFatal("QAnimationGroup::duration() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QAnimationGroup::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAnimationGroup::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QAnimationGroup::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAnimationGroup::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QAnimationGroup::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAnimationGroup::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAnimationGroup::updateCurrentTime(int currentTime) +{ + QScriptValue _q_function = __qtscript_self.property("updateCurrentTime"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateCurrentTime") & QScriptValue::QObjectMember)) { + qFatal("QAnimationGroup::updateCurrentTime() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, currentTime)); + } +} + +void QtScriptShell_QAnimationGroup::updateDirection(QAbstractAnimation::Direction direction) +{ + QScriptValue _q_function = __qtscript_self.property("updateDirection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateDirection") & QScriptValue::QObjectMember)) { + QAnimationGroup::updateDirection(direction); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, direction)); + } +} + +void QtScriptShell_QAnimationGroup::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) +{ + QScriptValue _q_function = __qtscript_self.property("updateState"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateState") & QScriptValue::QObjectMember)) { + QAnimationGroup::updateState(newState, oldState); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, newState) + << qScriptValueFromValue(_q_engine, oldState)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAnimationGroup.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAnimationGroup.h new file mode 100644 index 00000000..04ff4f41 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QAnimationGroup.h @@ -0,0 +1,28 @@ +#ifndef QTSCRIPTSHELL_QANIMATIONGROUP_H +#define QTSCRIPTSHELL_QANIMATIONGROUP_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAnimationGroup : public QAnimationGroup +{ +public: + QtScriptShell_QAnimationGroup(QObject* parent = 0); + ~QtScriptShell_QAnimationGroup(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + int duration() const; + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + void updateCurrentTime(int currentTime); + void updateDirection(QAbstractAnimation::Direction direction); + void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QANIMATIONGROUP_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QBasicMutex.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QBasicMutex.cpp new file mode 100644 index 00000000..7843670f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QBasicMutex.cpp @@ -0,0 +1,13 @@ +#include "qtscriptshell_QBasicMutex.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QBasicMutex::QtScriptShell_QBasicMutex() + : QBasicMutex() {} + +QtScriptShell_QBasicMutex::~QtScriptShell_QBasicMutex() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QBasicMutex.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QBasicMutex.h new file mode 100644 index 00000000..b37e7a79 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QBasicMutex.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QBASICMUTEX_H +#define QTSCRIPTSHELL_QBASICMUTEX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QBasicMutex : public QBasicMutex +{ +public: + QtScriptShell_QBasicMutex(); + ~QtScriptShell_QBasicMutex(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QBASICMUTEX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QBuffer.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QBuffer.cpp new file mode 100644 index 00000000..cf4c71c8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QBuffer.cpp @@ -0,0 +1,298 @@ +#include "qtscriptshell_QBuffer.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(char*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(const char*) + +QtScriptShell_QBuffer::QtScriptShell_QBuffer(QByteArray* buf, QObject* parent) + : QBuffer(buf, parent) {} + +QtScriptShell_QBuffer::QtScriptShell_QBuffer(QObject* parent) + : QBuffer(parent) {} + +QtScriptShell_QBuffer::~QtScriptShell_QBuffer() {} + +bool QtScriptShell_QBuffer::atEnd() const +{ + QScriptValue _q_function = __qtscript_self.property("atEnd"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)) { + return QBuffer::atEnd(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QBuffer::bytesAvailable() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesAvailable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesAvailable") & QScriptValue::QObjectMember)) { + return QBuffer::bytesAvailable(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QBuffer::bytesToWrite() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesToWrite"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesToWrite") & QScriptValue::QObjectMember)) { + return QBuffer::bytesToWrite(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QBuffer::canReadLine() const +{ + QScriptValue _q_function = __qtscript_self.property("canReadLine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canReadLine") & QScriptValue::QObjectMember)) { + return QBuffer::canReadLine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QBuffer::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QBuffer::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QBuffer::close() +{ + QScriptValue _q_function = __qtscript_self.property("close"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("close") & QScriptValue::QObjectMember)) { + QBuffer::close(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QBuffer::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QBuffer::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QBuffer::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QBuffer::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QBuffer::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QBuffer::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QBuffer::isSequential() const +{ + QScriptValue _q_function = __qtscript_self.property("isSequential"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isSequential") & QScriptValue::QObjectMember)) { + return QBuffer::isSequential(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QBuffer::open(QIODevice::OpenMode openMode) +{ + QScriptValue _q_function = __qtscript_self.property("open"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("open") & QScriptValue::QObjectMember)) { + return QBuffer::open(openMode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, openMode))); + } +} + +qint64 QtScriptShell_QBuffer::pos() const +{ + QScriptValue _q_function = __qtscript_self.property("pos"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("pos") & QScriptValue::QObjectMember)) { + return QBuffer::pos(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QBuffer::readData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readData") & QScriptValue::QObjectMember)) { + return QBuffer::readData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +qint64 QtScriptShell_QBuffer::readLineData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readLineData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readLineData") & QScriptValue::QObjectMember)) { + return QBuffer::readLineData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +bool QtScriptShell_QBuffer::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + return QBuffer::reset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QBuffer::seek(qint64 off) +{ + QScriptValue _q_function = __qtscript_self.property("seek"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("seek") & QScriptValue::QObjectMember)) { + return QBuffer::seek(off); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, off))); + } +} + +qint64 QtScriptShell_QBuffer::size() const +{ + QScriptValue _q_function = __qtscript_self.property("size"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("size") & QScriptValue::QObjectMember)) { + return QBuffer::size(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QBuffer::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QBuffer::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QBuffer::waitForBytesWritten(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForBytesWritten"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForBytesWritten") & QScriptValue::QObjectMember)) { + return QBuffer::waitForBytesWritten(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QBuffer::waitForReadyRead(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForReadyRead"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForReadyRead") & QScriptValue::QObjectMember)) { + return QBuffer::waitForReadyRead(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +qint64 QtScriptShell_QBuffer::writeData(const char* data, qint64 len) +{ + QScriptValue _q_function = __qtscript_self.property("writeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("writeData") & QScriptValue::QObjectMember)) { + return QBuffer::writeData(data, len); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, len))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QBuffer.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QBuffer.h new file mode 100644 index 00000000..59ae9e47 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QBuffer.h @@ -0,0 +1,41 @@ +#ifndef QTSCRIPTSHELL_QBUFFER_H +#define QTSCRIPTSHELL_QBUFFER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QBuffer : public QBuffer +{ +public: + QtScriptShell_QBuffer(QByteArray* buf, QObject* parent = 0); + QtScriptShell_QBuffer(QObject* parent = 0); + ~QtScriptShell_QBuffer(); + + bool atEnd() const; + qint64 bytesAvailable() const; + qint64 bytesToWrite() const; + bool canReadLine() const; + void childEvent(QChildEvent* event); + void close(); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + bool isSequential() const; + bool open(QIODevice::OpenMode openMode); + qint64 pos() const; + qint64 readData(char* data, qint64 maxlen); + qint64 readLineData(char* data, qint64 maxlen); + bool reset(); + bool seek(qint64 off); + qint64 size() const; + void timerEvent(QTimerEvent* event); + bool waitForBytesWritten(int msecs); + bool waitForReadyRead(int msecs); + qint64 writeData(const char* data, qint64 len); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QBUFFER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QChildEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QChildEvent.cpp new file mode 100644 index 00000000..48d6227c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QChildEvent.cpp @@ -0,0 +1,15 @@ +#include "qtscriptshell_QChildEvent.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QChildEvent::QtScriptShell_QChildEvent(QEvent::Type type, QObject* child) + : QChildEvent(type, child) {} + +QtScriptShell_QChildEvent::~QtScriptShell_QChildEvent() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QChildEvent.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QChildEvent.h new file mode 100644 index 00000000..d4570f38 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QChildEvent.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QCHILDEVENT_H +#define QTSCRIPTSHELL_QCHILDEVENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QChildEvent : public QChildEvent +{ +public: + QtScriptShell_QChildEvent(QEvent::Type type, QObject* child); + ~QtScriptShell_QChildEvent(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QCHILDEVENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QCoreApplication.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QCoreApplication.cpp new file mode 100644 index 00000000..2c83ea06 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QCoreApplication.cpp @@ -0,0 +1,110 @@ +#include "qtscriptshell_QCoreApplication.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QCoreApplication::QtScriptShell_QCoreApplication(int& argc, char** argv, int arg__3) + : QCoreApplication(argc, argv, arg__3) {} + +QtScriptShell_QCoreApplication::~QtScriptShell_QCoreApplication() {} + +void QtScriptShell_QCoreApplication::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QCoreApplication::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCoreApplication::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QCoreApplication::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QCoreApplication::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QCoreApplication::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QCoreApplication::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QCoreApplication::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QCoreApplication::notify(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("notify"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("notify") & QScriptValue::QObjectMember)) { + return QCoreApplication::notify(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QCoreApplication::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QCoreApplication::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QCoreApplication.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QCoreApplication.h new file mode 100644 index 00000000..fec594d4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QCoreApplication.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QCOREAPPLICATION_H +#define QTSCRIPTSHELL_QCOREAPPLICATION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QCoreApplication : public QCoreApplication +{ +public: + QtScriptShell_QCoreApplication(int& argc, char** argv, int arg__3 = ApplicationFlags); + ~QtScriptShell_QCoreApplication(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* arg__1); + bool eventFilter(QObject* watched, QEvent* event); + bool notify(QObject* arg__1, QEvent* arg__2); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QCOREAPPLICATION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEvent.cpp new file mode 100644 index 00000000..2d98b108 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEvent.cpp @@ -0,0 +1,17 @@ +#include "qtscriptshell_QEvent.h" + +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QEvent::QtScriptShell_QEvent(QEvent::Type type) + : QEvent(type) {} + +QtScriptShell_QEvent::QtScriptShell_QEvent(const QEvent& other) + : QEvent(other) {} + +QtScriptShell_QEvent::~QtScriptShell_QEvent() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEvent.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEvent.h new file mode 100644 index 00000000..4815cd06 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEvent.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QEVENT_H +#define QTSCRIPTSHELL_QEVENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QEvent : public QEvent +{ +public: + QtScriptShell_QEvent(QEvent::Type type); + QtScriptShell_QEvent(const QEvent& other); + ~QtScriptShell_QEvent(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QEVENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEventLoop.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEventLoop.cpp new file mode 100644 index 00000000..d7686435 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEventLoop.cpp @@ -0,0 +1,91 @@ +#include "qtscriptshell_QEventLoop.h" + +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QEventLoop::QtScriptShell_QEventLoop(QObject* parent) + : QEventLoop(parent) {} + +QtScriptShell_QEventLoop::~QtScriptShell_QEventLoop() {} + +void QtScriptShell_QEventLoop::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QEventLoop::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QEventLoop::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QEventLoop::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QEventLoop::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QEventLoop::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QEventLoop::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QEventLoop::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QEventLoop::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QEventLoop::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEventLoop.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEventLoop.h new file mode 100644 index 00000000..bb253056 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEventLoop.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QEVENTLOOP_H +#define QTSCRIPTSHELL_QEVENTLOOP_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QEventLoop : public QEventLoop +{ +public: + QtScriptShell_QEventLoop(QObject* parent = 0); + ~QtScriptShell_QEventLoop(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QEVENTLOOP_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEventTransition.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEventTransition.cpp new file mode 100644 index 00000000..5fc57f6f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEventTransition.cpp @@ -0,0 +1,127 @@ +#include "qtscriptshell_QEventTransition.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QEventTransition::QtScriptShell_QEventTransition(QObject* object, QEvent::Type type, QState* sourceState) + : QEventTransition(object, type, sourceState) {} + +QtScriptShell_QEventTransition::QtScriptShell_QEventTransition(QState* sourceState) + : QEventTransition(sourceState) {} + +QtScriptShell_QEventTransition::~QtScriptShell_QEventTransition() {} + +void QtScriptShell_QEventTransition::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QEventTransition::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QEventTransition::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QEventTransition::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QEventTransition::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QEventTransition::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QEventTransition::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QEventTransition::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QEventTransition::eventTest(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventTest"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventTest") & QScriptValue::QObjectMember)) { + return QEventTransition::eventTest(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QEventTransition::onTransition(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("onTransition"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("onTransition") & QScriptValue::QObjectMember)) { + QEventTransition::onTransition(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QEventTransition::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QEventTransition::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEventTransition.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEventTransition.h new file mode 100644 index 00000000..cdf06fff --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QEventTransition.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QEVENTTRANSITION_H +#define QTSCRIPTSHELL_QEVENTTRANSITION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QEventTransition : public QEventTransition +{ +public: + QtScriptShell_QEventTransition(QObject* object, QEvent::Type type, QState* sourceState = 0); + QtScriptShell_QEventTransition(QState* sourceState = 0); + ~QtScriptShell_QEventTransition(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + bool eventTest(QEvent* event); + void onTransition(QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QEVENTTRANSITION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFile.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFile.cpp new file mode 100644 index 00000000..ffa59512 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFile.cpp @@ -0,0 +1,355 @@ +#include "qtscriptshell_QFile.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(char*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(const char*) + +QtScriptShell_QFile::QtScriptShell_QFile() + : QFile() {} + +QtScriptShell_QFile::QtScriptShell_QFile(QObject* parent) + : QFile(parent) {} + +QtScriptShell_QFile::QtScriptShell_QFile(const QString& name) + : QFile(name) {} + +QtScriptShell_QFile::QtScriptShell_QFile(const QString& name, QObject* parent) + : QFile(name, parent) {} + +QtScriptShell_QFile::~QtScriptShell_QFile() {} + +bool QtScriptShell_QFile::atEnd() const +{ + QScriptValue _q_function = __qtscript_self.property("atEnd"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)) { + return QFile::atEnd(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QFile::bytesAvailable() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesAvailable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesAvailable") & QScriptValue::QObjectMember)) { + return QFile::bytesAvailable(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QFile::bytesToWrite() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesToWrite"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesToWrite") & QScriptValue::QObjectMember)) { + return QFile::bytesToWrite(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QFile::canReadLine() const +{ + QScriptValue _q_function = __qtscript_self.property("canReadLine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canReadLine") & QScriptValue::QObjectMember)) { + return QFile::canReadLine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFile::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QFile::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFile::close() +{ + QScriptValue _q_function = __qtscript_self.property("close"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("close") & QScriptValue::QObjectMember)) { + QFile::close(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QFile::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QFile::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFile::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QFile::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QFile::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QFile::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QString QtScriptShell_QFile::fileName() const +{ + QScriptValue _q_function = __qtscript_self.property("fileName"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fileName") & QScriptValue::QObjectMember)) { + return QFile::fileName(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QFile::isSequential() const +{ + QScriptValue _q_function = __qtscript_self.property("isSequential"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isSequential") & QScriptValue::QObjectMember)) { + return QFile::isSequential(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QFile::open(QIODevice::OpenMode flags) +{ + QScriptValue _q_function = __qtscript_self.property("open"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("open") & QScriptValue::QObjectMember)) { + return QFile::open(flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, flags))); + } +} + +QFileDevice::Permissions QtScriptShell_QFile::permissions() const +{ + QScriptValue _q_function = __qtscript_self.property("permissions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("permissions") & QScriptValue::QObjectMember)) { + return QFile::permissions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QFile::pos() const +{ + QScriptValue _q_function = __qtscript_self.property("pos"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("pos") & QScriptValue::QObjectMember)) { + return QFile::pos(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QFile::readData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readData") & QScriptValue::QObjectMember)) { + return QFile::readData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +qint64 QtScriptShell_QFile::readLineData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readLineData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readLineData") & QScriptValue::QObjectMember)) { + return QFile::readLineData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +bool QtScriptShell_QFile::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + return QFile::reset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QFile::resize(qint64 sz) +{ + QScriptValue _q_function = __qtscript_self.property("resize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resize") & QScriptValue::QObjectMember)) { + return QFile::resize(sz); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sz))); + } +} + +bool QtScriptShell_QFile::seek(qint64 offset) +{ + QScriptValue _q_function = __qtscript_self.property("seek"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("seek") & QScriptValue::QObjectMember)) { + return QFile::seek(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +bool QtScriptShell_QFile::setPermissions(QFileDevice::Permissions permissionSpec) +{ + QScriptValue _q_function = __qtscript_self.property("setPermissions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setPermissions") & QScriptValue::QObjectMember)) { + return QFile::setPermissions(permissionSpec); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, permissionSpec))); + } +} + +qint64 QtScriptShell_QFile::size() const +{ + QScriptValue _q_function = __qtscript_self.property("size"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("size") & QScriptValue::QObjectMember)) { + return QFile::size(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFile::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QFile::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFile::waitForBytesWritten(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForBytesWritten"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForBytesWritten") & QScriptValue::QObjectMember)) { + return QFile::waitForBytesWritten(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QFile::waitForReadyRead(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForReadyRead"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForReadyRead") & QScriptValue::QObjectMember)) { + return QFile::waitForReadyRead(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +qint64 QtScriptShell_QFile::writeData(const char* data, qint64 len) +{ + QScriptValue _q_function = __qtscript_self.property("writeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("writeData") & QScriptValue::QObjectMember)) { + return QFile::writeData(data, len); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, len))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFile.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFile.h new file mode 100644 index 00000000..d9be1084 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFile.h @@ -0,0 +1,47 @@ +#ifndef QTSCRIPTSHELL_QFILE_H +#define QTSCRIPTSHELL_QFILE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QFile : public QFile +{ +public: + QtScriptShell_QFile(); + QtScriptShell_QFile(QObject* parent); + QtScriptShell_QFile(const QString& name); + QtScriptShell_QFile(const QString& name, QObject* parent); + ~QtScriptShell_QFile(); + + bool atEnd() const; + qint64 bytesAvailable() const; + qint64 bytesToWrite() const; + bool canReadLine() const; + void childEvent(QChildEvent* event); + void close(); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + QString fileName() const; + bool isSequential() const; + bool open(QIODevice::OpenMode flags); + QFileDevice::Permissions permissions() const; + qint64 pos() const; + qint64 readData(char* data, qint64 maxlen); + qint64 readLineData(char* data, qint64 maxlen); + bool reset(); + bool resize(qint64 sz); + bool seek(qint64 offset); + bool setPermissions(QFileDevice::Permissions permissionSpec); + qint64 size() const; + void timerEvent(QTimerEvent* event); + bool waitForBytesWritten(int msecs); + bool waitForReadyRead(int msecs); + qint64 writeData(const char* data, qint64 len); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QFILE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFileDevice.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFileDevice.cpp new file mode 100644 index 00000000..a72582b3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFileDevice.cpp @@ -0,0 +1,349 @@ +#include "qtscriptshell_QFileDevice.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(char*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(const char*) + +QtScriptShell_QFileDevice::QtScriptShell_QFileDevice() + : QFileDevice() {} + +QtScriptShell_QFileDevice::QtScriptShell_QFileDevice(QObject* parent) + : QFileDevice(parent) {} + +QtScriptShell_QFileDevice::~QtScriptShell_QFileDevice() {} + +bool QtScriptShell_QFileDevice::atEnd() const +{ + QScriptValue _q_function = __qtscript_self.property("atEnd"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)) { + return QFileDevice::atEnd(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QFileDevice::bytesAvailable() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesAvailable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesAvailable") & QScriptValue::QObjectMember)) { + return QFileDevice::bytesAvailable(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QFileDevice::bytesToWrite() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesToWrite"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesToWrite") & QScriptValue::QObjectMember)) { + return QFileDevice::bytesToWrite(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QFileDevice::canReadLine() const +{ + QScriptValue _q_function = __qtscript_self.property("canReadLine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canReadLine") & QScriptValue::QObjectMember)) { + return QFileDevice::canReadLine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFileDevice::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QFileDevice::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFileDevice::close() +{ + QScriptValue _q_function = __qtscript_self.property("close"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("close") & QScriptValue::QObjectMember)) { + QFileDevice::close(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QFileDevice::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QFileDevice::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFileDevice::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QFileDevice::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QFileDevice::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QFileDevice::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QString QtScriptShell_QFileDevice::fileName() const +{ + QScriptValue _q_function = __qtscript_self.property("fileName"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fileName") & QScriptValue::QObjectMember)) { + return QFileDevice::fileName(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QFileDevice::isSequential() const +{ + QScriptValue _q_function = __qtscript_self.property("isSequential"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isSequential") & QScriptValue::QObjectMember)) { + return QFileDevice::isSequential(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QFileDevice::open(QIODevice::OpenMode mode) +{ + QScriptValue _q_function = __qtscript_self.property("open"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("open") & QScriptValue::QObjectMember)) { + return QFileDevice::open(mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, mode))); + } +} + +QFileDevice::Permissions QtScriptShell_QFileDevice::permissions() const +{ + QScriptValue _q_function = __qtscript_self.property("permissions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("permissions") & QScriptValue::QObjectMember)) { + return QFileDevice::permissions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QFileDevice::pos() const +{ + QScriptValue _q_function = __qtscript_self.property("pos"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("pos") & QScriptValue::QObjectMember)) { + return QFileDevice::pos(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QFileDevice::readData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readData") & QScriptValue::QObjectMember)) { + return QFileDevice::readData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +qint64 QtScriptShell_QFileDevice::readLineData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readLineData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readLineData") & QScriptValue::QObjectMember)) { + return QFileDevice::readLineData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +bool QtScriptShell_QFileDevice::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + return QFileDevice::reset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QFileDevice::resize(qint64 sz) +{ + QScriptValue _q_function = __qtscript_self.property("resize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resize") & QScriptValue::QObjectMember)) { + return QFileDevice::resize(sz); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sz))); + } +} + +bool QtScriptShell_QFileDevice::seek(qint64 offset) +{ + QScriptValue _q_function = __qtscript_self.property("seek"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("seek") & QScriptValue::QObjectMember)) { + return QFileDevice::seek(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +bool QtScriptShell_QFileDevice::setPermissions(QFileDevice::Permissions permissionSpec) +{ + QScriptValue _q_function = __qtscript_self.property("setPermissions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setPermissions") & QScriptValue::QObjectMember)) { + return QFileDevice::setPermissions(permissionSpec); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, permissionSpec))); + } +} + +qint64 QtScriptShell_QFileDevice::size() const +{ + QScriptValue _q_function = __qtscript_self.property("size"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("size") & QScriptValue::QObjectMember)) { + return QFileDevice::size(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFileDevice::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QFileDevice::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFileDevice::waitForBytesWritten(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForBytesWritten"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForBytesWritten") & QScriptValue::QObjectMember)) { + return QFileDevice::waitForBytesWritten(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QFileDevice::waitForReadyRead(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForReadyRead"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForReadyRead") & QScriptValue::QObjectMember)) { + return QFileDevice::waitForReadyRead(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +qint64 QtScriptShell_QFileDevice::writeData(const char* data, qint64 len) +{ + QScriptValue _q_function = __qtscript_self.property("writeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("writeData") & QScriptValue::QObjectMember)) { + return QFileDevice::writeData(data, len); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, len))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFileDevice.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFileDevice.h new file mode 100644 index 00000000..8e322e69 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFileDevice.h @@ -0,0 +1,45 @@ +#ifndef QTSCRIPTSHELL_QFILEDEVICE_H +#define QTSCRIPTSHELL_QFILEDEVICE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QFileDevice : public QFileDevice +{ +public: + QtScriptShell_QFileDevice(); + QtScriptShell_QFileDevice(QObject* parent); + ~QtScriptShell_QFileDevice(); + + bool atEnd() const; + qint64 bytesAvailable() const; + qint64 bytesToWrite() const; + bool canReadLine() const; + void childEvent(QChildEvent* event); + void close(); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + QString fileName() const; + bool isSequential() const; + bool open(QIODevice::OpenMode mode); + QFileDevice::Permissions permissions() const; + qint64 pos() const; + qint64 readData(char* data, qint64 maxlen); + qint64 readLineData(char* data, qint64 maxlen); + bool reset(); + bool resize(qint64 sz); + bool seek(qint64 offset); + bool setPermissions(QFileDevice::Permissions permissionSpec); + qint64 size() const; + void timerEvent(QTimerEvent* event); + bool waitForBytesWritten(int msecs); + bool waitForReadyRead(int msecs); + qint64 writeData(const char* data, qint64 len); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QFILEDEVICE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFileSystemWatcher.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFileSystemWatcher.cpp new file mode 100644 index 00000000..91b6f033 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFileSystemWatcher.cpp @@ -0,0 +1,96 @@ +#include "qtscriptshell_QFileSystemWatcher.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QFileSystemWatcher::QtScriptShell_QFileSystemWatcher(QObject* parent) + : QFileSystemWatcher(parent) {} + +QtScriptShell_QFileSystemWatcher::QtScriptShell_QFileSystemWatcher(const QStringList& paths, QObject* parent) + : QFileSystemWatcher(paths, parent) {} + +QtScriptShell_QFileSystemWatcher::~QtScriptShell_QFileSystemWatcher() {} + +void QtScriptShell_QFileSystemWatcher::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QFileSystemWatcher::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFileSystemWatcher::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QFileSystemWatcher::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFileSystemWatcher::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QFileSystemWatcher::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QFileSystemWatcher::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QFileSystemWatcher::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QFileSystemWatcher::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QFileSystemWatcher::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFileSystemWatcher.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFileSystemWatcher.h new file mode 100644 index 00000000..a3437ebb --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFileSystemWatcher.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QFILESYSTEMWATCHER_H +#define QTSCRIPTSHELL_QFILESYSTEMWATCHER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QFileSystemWatcher : public QFileSystemWatcher +{ +public: + QtScriptShell_QFileSystemWatcher(QObject* parent = 0); + QtScriptShell_QFileSystemWatcher(const QStringList& paths, QObject* parent = 0); + ~QtScriptShell_QFileSystemWatcher(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QFILESYSTEMWATCHER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFinalState.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFinalState.cpp new file mode 100644 index 00000000..84a93b93 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFinalState.cpp @@ -0,0 +1,122 @@ +#include "qtscriptshell_QFinalState.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QFinalState::QtScriptShell_QFinalState(QState* parent) + : QFinalState(parent) {} + +QtScriptShell_QFinalState::~QtScriptShell_QFinalState() {} + +void QtScriptShell_QFinalState::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QFinalState::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFinalState::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QFinalState::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFinalState::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QFinalState::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QFinalState::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QFinalState::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QFinalState::onEntry(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("onEntry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("onEntry") & QScriptValue::QObjectMember)) { + QFinalState::onEntry(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFinalState::onExit(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("onExit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("onExit") & QScriptValue::QObjectMember)) { + QFinalState::onExit(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFinalState::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QFinalState::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFinalState.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFinalState.h new file mode 100644 index 00000000..1962aeef --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFinalState.h @@ -0,0 +1,26 @@ +#ifndef QTSCRIPTSHELL_QFINALSTATE_H +#define QTSCRIPTSHELL_QFINALSTATE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QFinalState : public QFinalState +{ +public: + QtScriptShell_QFinalState(QState* parent = 0); + ~QtScriptShell_QFinalState(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void onEntry(QEvent* event); + void onExit(QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QFINALSTATE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureSynchronizer.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureSynchronizer.cpp new file mode 100644 index 00000000..ebd74e51 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureSynchronizer.cpp @@ -0,0 +1,13 @@ +#include "qtscriptshell_QFutureSynchronizer.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QFutureSynchronizer::QtScriptShell_QFutureSynchronizer() + : QtScriptFutureSynchronizer() {} + +QtScriptShell_QFutureSynchronizer::~QtScriptShell_QFutureSynchronizer() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureSynchronizer.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureSynchronizer.h new file mode 100644 index 00000000..4f5f9fe5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureSynchronizer.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QFUTURESYNCHRONIZER_H +#define QTSCRIPTSHELL_QFUTURESYNCHRONIZER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QFutureSynchronizer : public QtScriptFutureSynchronizer +{ +public: + QtScriptShell_QFutureSynchronizer(); + ~QtScriptShell_QFutureSynchronizer(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QFUTURESYNCHRONIZER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureSynchronizerVoid.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureSynchronizerVoid.cpp new file mode 100644 index 00000000..f574a0ee --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureSynchronizerVoid.cpp @@ -0,0 +1,13 @@ +#include "qtscriptshell_QFutureSynchronizerVoid.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QFutureSynchronizerVoid::QtScriptShell_QFutureSynchronizerVoid() + : QtScriptVoidFutureSynchronizer() {} + +QtScriptShell_QFutureSynchronizerVoid::~QtScriptShell_QFutureSynchronizerVoid() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureSynchronizerVoid.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureSynchronizerVoid.h new file mode 100644 index 00000000..15c46c38 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureSynchronizerVoid.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QFUTURESYNCHRONIZERVOID_H +#define QTSCRIPTSHELL_QFUTURESYNCHRONIZERVOID_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QFutureSynchronizerVoid : public QtScriptVoidFutureSynchronizer +{ +public: + QtScriptShell_QFutureSynchronizerVoid(); + ~QtScriptShell_QFutureSynchronizerVoid(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QFUTURESYNCHRONIZERVOID_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureWatcher.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureWatcher.cpp new file mode 100644 index 00000000..319b4c63 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureWatcher.cpp @@ -0,0 +1,14 @@ +#include "qtscriptshell_QFutureWatcher.h" + +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QFutureWatcher::QtScriptShell_QFutureWatcher() + : QtScriptFutureWatcher() {} + +QtScriptShell_QFutureWatcher::~QtScriptShell_QFutureWatcher() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureWatcher.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureWatcher.h new file mode 100644 index 00000000..ed156e40 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureWatcher.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QFUTUREWATCHER_H +#define QTSCRIPTSHELL_QFUTUREWATCHER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QFutureWatcher : public QtScriptFutureWatcher +{ +public: + QtScriptShell_QFutureWatcher(); + ~QtScriptShell_QFutureWatcher(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QFUTUREWATCHER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureWatcherVoid.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureWatcherVoid.cpp new file mode 100644 index 00000000..ca2b1397 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureWatcherVoid.cpp @@ -0,0 +1,14 @@ +#include "qtscriptshell_QFutureWatcherVoid.h" + +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QFutureWatcherVoid::QtScriptShell_QFutureWatcherVoid() + : QtScriptVoidFutureWatcher() {} + +QtScriptShell_QFutureWatcherVoid::~QtScriptShell_QFutureWatcherVoid() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureWatcherVoid.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureWatcherVoid.h new file mode 100644 index 00000000..f9fcff3c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QFutureWatcherVoid.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QFUTUREWATCHERVOID_H +#define QTSCRIPTSHELL_QFUTUREWATCHERVOID_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QFutureWatcherVoid : public QtScriptVoidFutureWatcher +{ +public: + QtScriptShell_QFutureWatcherVoid(); + ~QtScriptShell_QFutureWatcherVoid(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QFUTUREWATCHERVOID_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QHistoryState.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QHistoryState.cpp new file mode 100644 index 00000000..3b505ef5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QHistoryState.cpp @@ -0,0 +1,127 @@ +#include "qtscriptshell_QHistoryState.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QHistoryState::QtScriptShell_QHistoryState(QHistoryState::HistoryType type, QState* parent) + : QHistoryState(type, parent) {} + +QtScriptShell_QHistoryState::QtScriptShell_QHistoryState(QState* parent) + : QHistoryState(parent) {} + +QtScriptShell_QHistoryState::~QtScriptShell_QHistoryState() {} + +void QtScriptShell_QHistoryState::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QHistoryState::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QHistoryState::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QHistoryState::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QHistoryState::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QHistoryState::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QHistoryState::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QHistoryState::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QHistoryState::onEntry(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("onEntry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("onEntry") & QScriptValue::QObjectMember)) { + QHistoryState::onEntry(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QHistoryState::onExit(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("onExit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("onExit") & QScriptValue::QObjectMember)) { + QHistoryState::onExit(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QHistoryState::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QHistoryState::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QHistoryState.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QHistoryState.h new file mode 100644 index 00000000..235b5213 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QHistoryState.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QHISTORYSTATE_H +#define QTSCRIPTSHELL_QHISTORYSTATE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QHistoryState : public QHistoryState +{ +public: + QtScriptShell_QHistoryState(QHistoryState::HistoryType type, QState* parent = 0); + QtScriptShell_QHistoryState(QState* parent = 0); + ~QtScriptShell_QHistoryState(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void onEntry(QEvent* event); + void onExit(QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QHISTORYSTATE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QIODevice.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QIODevice.cpp new file mode 100644 index 00000000..3ff81b2b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QIODevice.cpp @@ -0,0 +1,298 @@ +#include "qtscriptshell_QIODevice.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(char*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(const char*) + +QtScriptShell_QIODevice::QtScriptShell_QIODevice() + : QIODevice() {} + +QtScriptShell_QIODevice::QtScriptShell_QIODevice(QObject* parent) + : QIODevice(parent) {} + +QtScriptShell_QIODevice::~QtScriptShell_QIODevice() {} + +bool QtScriptShell_QIODevice::atEnd() const +{ + QScriptValue _q_function = __qtscript_self.property("atEnd"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)) { + return QIODevice::atEnd(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QIODevice::bytesAvailable() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesAvailable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesAvailable") & QScriptValue::QObjectMember)) { + return QIODevice::bytesAvailable(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QIODevice::bytesToWrite() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesToWrite"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesToWrite") & QScriptValue::QObjectMember)) { + return QIODevice::bytesToWrite(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QIODevice::canReadLine() const +{ + QScriptValue _q_function = __qtscript_self.property("canReadLine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canReadLine") & QScriptValue::QObjectMember)) { + return QIODevice::canReadLine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QIODevice::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QIODevice::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QIODevice::close() +{ + QScriptValue _q_function = __qtscript_self.property("close"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("close") & QScriptValue::QObjectMember)) { + QIODevice::close(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QIODevice::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QIODevice::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QIODevice::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QIODevice::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QIODevice::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QIODevice::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QIODevice::isSequential() const +{ + QScriptValue _q_function = __qtscript_self.property("isSequential"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isSequential") & QScriptValue::QObjectMember)) { + return QIODevice::isSequential(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QIODevice::open(QIODevice::OpenMode mode) +{ + QScriptValue _q_function = __qtscript_self.property("open"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("open") & QScriptValue::QObjectMember)) { + return QIODevice::open(mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, mode))); + } +} + +qint64 QtScriptShell_QIODevice::pos() const +{ + QScriptValue _q_function = __qtscript_self.property("pos"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("pos") & QScriptValue::QObjectMember)) { + return QIODevice::pos(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QIODevice::readData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readData") & QScriptValue::QObjectMember)) { + qFatal("QIODevice::readData() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +qint64 QtScriptShell_QIODevice::readLineData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readLineData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readLineData") & QScriptValue::QObjectMember)) { + return QIODevice::readLineData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +bool QtScriptShell_QIODevice::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + return QIODevice::reset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QIODevice::seek(qint64 pos) +{ + QScriptValue _q_function = __qtscript_self.property("seek"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("seek") & QScriptValue::QObjectMember)) { + return QIODevice::seek(pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pos))); + } +} + +qint64 QtScriptShell_QIODevice::size() const +{ + QScriptValue _q_function = __qtscript_self.property("size"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("size") & QScriptValue::QObjectMember)) { + return QIODevice::size(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QIODevice::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QIODevice::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QIODevice::waitForBytesWritten(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForBytesWritten"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForBytesWritten") & QScriptValue::QObjectMember)) { + return QIODevice::waitForBytesWritten(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QIODevice::waitForReadyRead(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForReadyRead"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForReadyRead") & QScriptValue::QObjectMember)) { + return QIODevice::waitForReadyRead(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +qint64 QtScriptShell_QIODevice::writeData(const char* data, qint64 len) +{ + QScriptValue _q_function = __qtscript_self.property("writeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("writeData") & QScriptValue::QObjectMember)) { + qFatal("QIODevice::writeData() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, len))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QIODevice.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QIODevice.h new file mode 100644 index 00000000..cd207518 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QIODevice.h @@ -0,0 +1,41 @@ +#ifndef QTSCRIPTSHELL_QIODEVICE_H +#define QTSCRIPTSHELL_QIODEVICE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QIODevice : public QIODevice +{ +public: + QtScriptShell_QIODevice(); + QtScriptShell_QIODevice(QObject* parent); + ~QtScriptShell_QIODevice(); + + bool atEnd() const; + qint64 bytesAvailable() const; + qint64 bytesToWrite() const; + bool canReadLine() const; + void childEvent(QChildEvent* event); + void close(); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + bool isSequential() const; + bool open(QIODevice::OpenMode mode); + qint64 pos() const; + qint64 readData(char* data, qint64 maxlen); + qint64 readLineData(char* data, qint64 maxlen); + bool reset(); + bool seek(qint64 pos); + qint64 size() const; + void timerEvent(QTimerEvent* event); + bool waitForBytesWritten(int msecs); + bool waitForReadyRead(int msecs); + qint64 writeData(const char* data, qint64 len); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QIODEVICE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QMimeData.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QMimeData.cpp new file mode 100644 index 00000000..0aabd20f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QMimeData.cpp @@ -0,0 +1,137 @@ +#include "qtscriptshell_QMimeData.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QVariant::Type) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QMimeData::QtScriptShell_QMimeData() + : QMimeData() {} + +QtScriptShell_QMimeData::~QtScriptShell_QMimeData() {} + +void QtScriptShell_QMimeData::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QMimeData::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMimeData::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QMimeData::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMimeData::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QMimeData::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QMimeData::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QMimeData::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QStringList QtScriptShell_QMimeData::formats() const +{ + QScriptValue _q_function = __qtscript_self.property("formats"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("formats") & QScriptValue::QObjectMember)) { + return QMimeData::formats(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QMimeData::hasFormat(const QString& mimetype) const +{ + QScriptValue _q_function = __qtscript_self.property("hasFormat"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasFormat") & QScriptValue::QObjectMember)) { + return QMimeData::hasFormat(mimetype); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, mimetype))); + } +} + +QVariant QtScriptShell_QMimeData::retrieveData(const QString& mimetype, QVariant::Type preferredType) const +{ + QScriptValue _q_function = __qtscript_self.property("retrieveData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("retrieveData") & QScriptValue::QObjectMember)) { + return QMimeData::retrieveData(mimetype, preferredType); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, mimetype) + << qScriptValueFromValue(_q_engine, preferredType))); + } +} + +void QtScriptShell_QMimeData::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QMimeData::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QMimeData.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QMimeData.h new file mode 100644 index 00000000..693fd1e6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QMimeData.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QMIMEDATA_H +#define QTSCRIPTSHELL_QMIMEDATA_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QMimeData : public QMimeData +{ +public: + QtScriptShell_QMimeData(); + ~QtScriptShell_QMimeData(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + QStringList formats() const; + bool hasFormat(const QString& mimetype) const; + QVariant retrieveData(const QString& mimetype, QVariant::Type preferredType) const; + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QMIMEDATA_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QObject.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QObject.cpp new file mode 100644 index 00000000..58e094af --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QObject.cpp @@ -0,0 +1,92 @@ +#include "qtscriptshell_QObject.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QObject::QtScriptShell_QObject(QObject* parent) + : QObject(parent) {} + +QtScriptShell_QObject::~QtScriptShell_QObject() {} + +void QtScriptShell_QObject::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QObject::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QObject::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QObject::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QObject::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QObject::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QObject::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QObject::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QObject::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QObject::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QObject.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QObject.h new file mode 100644 index 00000000..723985f8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QObject.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QOBJECT_H +#define QTSCRIPTSHELL_QOBJECT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QObject : public QObject +{ +public: + QtScriptShell_QObject(QObject* parent = 0); + ~QtScriptShell_QObject(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QOBJECT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QParallelAnimationGroup.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QParallelAnimationGroup.cpp new file mode 100644 index 00000000..44a55dd9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QParallelAnimationGroup.cpp @@ -0,0 +1,150 @@ +#include "qtscriptshell_QParallelAnimationGroup.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QAbstractAnimation::Direction) +Q_DECLARE_METATYPE(QAbstractAnimation::State) + +QtScriptShell_QParallelAnimationGroup::QtScriptShell_QParallelAnimationGroup(QObject* parent) + : QParallelAnimationGroup(parent) {} + +QtScriptShell_QParallelAnimationGroup::~QtScriptShell_QParallelAnimationGroup() {} + +void QtScriptShell_QParallelAnimationGroup::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QParallelAnimationGroup::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QParallelAnimationGroup::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QParallelAnimationGroup::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QParallelAnimationGroup::duration() const +{ + QScriptValue _q_function = __qtscript_self.property("_qs_duration"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("_qs_duration") & QScriptValue::QObjectMember)) { + return QParallelAnimationGroup::duration(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QParallelAnimationGroup::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QParallelAnimationGroup::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QParallelAnimationGroup::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QParallelAnimationGroup::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QParallelAnimationGroup::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QParallelAnimationGroup::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QParallelAnimationGroup::updateCurrentTime(int currentTime) +{ + QScriptValue _q_function = __qtscript_self.property("updateCurrentTime"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateCurrentTime") & QScriptValue::QObjectMember)) { + QParallelAnimationGroup::updateCurrentTime(currentTime); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, currentTime)); + } +} + +void QtScriptShell_QParallelAnimationGroup::updateDirection(QAbstractAnimation::Direction direction) +{ + QScriptValue _q_function = __qtscript_self.property("updateDirection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateDirection") & QScriptValue::QObjectMember)) { + QParallelAnimationGroup::updateDirection(direction); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, direction)); + } +} + +void QtScriptShell_QParallelAnimationGroup::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) +{ + QScriptValue _q_function = __qtscript_self.property("updateState"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateState") & QScriptValue::QObjectMember)) { + QParallelAnimationGroup::updateState(newState, oldState); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, newState) + << qScriptValueFromValue(_q_engine, oldState)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QParallelAnimationGroup.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QParallelAnimationGroup.h new file mode 100644 index 00000000..4e08d03f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QParallelAnimationGroup.h @@ -0,0 +1,28 @@ +#ifndef QTSCRIPTSHELL_QPARALLELANIMATIONGROUP_H +#define QTSCRIPTSHELL_QPARALLELANIMATIONGROUP_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QParallelAnimationGroup : public QParallelAnimationGroup +{ +public: + QtScriptShell_QParallelAnimationGroup(QObject* parent = 0); + ~QtScriptShell_QParallelAnimationGroup(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + int duration() const; + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + void updateCurrentTime(int currentTime); + void updateDirection(QAbstractAnimation::Direction direction); + void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPARALLELANIMATIONGROUP_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QPauseAnimation.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QPauseAnimation.cpp new file mode 100644 index 00000000..4536aff5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QPauseAnimation.cpp @@ -0,0 +1,152 @@ +#include "qtscriptshell_QPauseAnimation.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QAbstractAnimation::Direction) +Q_DECLARE_METATYPE(QAbstractAnimation::State) + +QtScriptShell_QPauseAnimation::QtScriptShell_QPauseAnimation(QObject* parent) + : QPauseAnimation(parent) {} + +QtScriptShell_QPauseAnimation::QtScriptShell_QPauseAnimation(int msecs, QObject* parent) + : QPauseAnimation(msecs, parent) {} + +QtScriptShell_QPauseAnimation::~QtScriptShell_QPauseAnimation() {} + +void QtScriptShell_QPauseAnimation::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QPauseAnimation::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPauseAnimation::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QPauseAnimation::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QPauseAnimation::duration() const +{ + QScriptValue _q_function = __qtscript_self.property("_qs_duration"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("_qs_duration") & QScriptValue::QObjectMember)) { + return QPauseAnimation::duration(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QPauseAnimation::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QPauseAnimation::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QPauseAnimation::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QPauseAnimation::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QPauseAnimation::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QPauseAnimation::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPauseAnimation::updateCurrentTime(int arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("updateCurrentTime"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateCurrentTime") & QScriptValue::QObjectMember)) { + QPauseAnimation::updateCurrentTime(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPauseAnimation::updateDirection(QAbstractAnimation::Direction direction) +{ + QScriptValue _q_function = __qtscript_self.property("updateDirection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateDirection") & QScriptValue::QObjectMember)) { + QPauseAnimation::updateDirection(direction); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, direction)); + } +} + +void QtScriptShell_QPauseAnimation::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) +{ + QScriptValue _q_function = __qtscript_self.property("updateState"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateState") & QScriptValue::QObjectMember)) { + QPauseAnimation::updateState(newState, oldState); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, newState) + << qScriptValueFromValue(_q_engine, oldState)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QPauseAnimation.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QPauseAnimation.h new file mode 100644 index 00000000..fe2f50da --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QPauseAnimation.h @@ -0,0 +1,29 @@ +#ifndef QTSCRIPTSHELL_QPAUSEANIMATION_H +#define QTSCRIPTSHELL_QPAUSEANIMATION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPauseAnimation : public QPauseAnimation +{ +public: + QtScriptShell_QPauseAnimation(QObject* parent = 0); + QtScriptShell_QPauseAnimation(int msecs, QObject* parent = 0); + ~QtScriptShell_QPauseAnimation(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + int duration() const; + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + void updateCurrentTime(int arg__1); + void updateDirection(QAbstractAnimation::Direction direction); + void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPAUSEANIMATION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QProcess.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QProcess.cpp new file mode 100644 index 00000000..5d405520 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QProcess.cpp @@ -0,0 +1,307 @@ +#include "qtscriptshell_QProcess.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(char*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(const char*) + +QtScriptShell_QProcess::QtScriptShell_QProcess(QObject* parent) + : QProcess(parent) {} + +QtScriptShell_QProcess::~QtScriptShell_QProcess() {} + +bool QtScriptShell_QProcess::atEnd() const +{ + QScriptValue _q_function = __qtscript_self.property("atEnd"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)) { + return QProcess::atEnd(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QProcess::bytesAvailable() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesAvailable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesAvailable") & QScriptValue::QObjectMember)) { + return QProcess::bytesAvailable(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QProcess::bytesToWrite() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesToWrite"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesToWrite") & QScriptValue::QObjectMember)) { + return QProcess::bytesToWrite(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QProcess::canReadLine() const +{ + QScriptValue _q_function = __qtscript_self.property("canReadLine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canReadLine") & QScriptValue::QObjectMember)) { + return QProcess::canReadLine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QProcess::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QProcess::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProcess::close() +{ + QScriptValue _q_function = __qtscript_self.property("close"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("close") & QScriptValue::QObjectMember)) { + QProcess::close(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QProcess::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QProcess::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QProcess::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QProcess::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QProcess::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QProcess::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QProcess::isSequential() const +{ + QScriptValue _q_function = __qtscript_self.property("isSequential"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isSequential") & QScriptValue::QObjectMember)) { + return QProcess::isSequential(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QProcess::open(QIODevice::OpenMode mode) +{ + QScriptValue _q_function = __qtscript_self.property("open"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("open") & QScriptValue::QObjectMember)) { + return QProcess::open(mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, mode))); + } +} + +qint64 QtScriptShell_QProcess::pos() const +{ + QScriptValue _q_function = __qtscript_self.property("pos"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("pos") & QScriptValue::QObjectMember)) { + return QProcess::pos(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QProcess::readData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readData") & QScriptValue::QObjectMember)) { + return QProcess::readData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +qint64 QtScriptShell_QProcess::readLineData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readLineData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readLineData") & QScriptValue::QObjectMember)) { + return QProcess::readLineData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +bool QtScriptShell_QProcess::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + return QProcess::reset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QProcess::seek(qint64 pos) +{ + QScriptValue _q_function = __qtscript_self.property("seek"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("seek") & QScriptValue::QObjectMember)) { + return QProcess::seek(pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pos))); + } +} + +void QtScriptShell_QProcess::setupChildProcess() +{ + QScriptValue _q_function = __qtscript_self.property("setupChildProcess"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupChildProcess") & QScriptValue::QObjectMember)) { + QProcess::setupChildProcess(); + } else { + _q_function.call(__qtscript_self); + } +} + +qint64 QtScriptShell_QProcess::size() const +{ + QScriptValue _q_function = __qtscript_self.property("size"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("size") & QScriptValue::QObjectMember)) { + return QProcess::size(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QProcess::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QProcess::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QProcess::waitForBytesWritten(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForBytesWritten"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForBytesWritten") & QScriptValue::QObjectMember)) { + return QProcess::waitForBytesWritten(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QProcess::waitForReadyRead(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForReadyRead"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForReadyRead") & QScriptValue::QObjectMember)) { + return QProcess::waitForReadyRead(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +qint64 QtScriptShell_QProcess::writeData(const char* data, qint64 len) +{ + QScriptValue _q_function = __qtscript_self.property("writeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("writeData") & QScriptValue::QObjectMember)) { + return QProcess::writeData(data, len); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, len))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QProcess.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QProcess.h new file mode 100644 index 00000000..1591afc7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QProcess.h @@ -0,0 +1,41 @@ +#ifndef QTSCRIPTSHELL_QPROCESS_H +#define QTSCRIPTSHELL_QPROCESS_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QProcess : public QProcess +{ +public: + QtScriptShell_QProcess(QObject* parent = 0); + ~QtScriptShell_QProcess(); + + bool atEnd() const; + qint64 bytesAvailable() const; + qint64 bytesToWrite() const; + bool canReadLine() const; + void childEvent(QChildEvent* event); + void close(); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + bool isSequential() const; + bool open(QIODevice::OpenMode mode = ReadWrite); + qint64 pos() const; + qint64 readData(char* data, qint64 maxlen); + qint64 readLineData(char* data, qint64 maxlen); + bool reset(); + bool seek(qint64 pos); + void setupChildProcess(); + qint64 size() const; + void timerEvent(QTimerEvent* event); + bool waitForBytesWritten(int msecs = 30000); + bool waitForReadyRead(int msecs = 30000); + qint64 writeData(const char* data, qint64 len); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPROCESS_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QPropertyAnimation.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QPropertyAnimation.cpp new file mode 100644 index 00000000..5fed25ef --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QPropertyAnimation.cpp @@ -0,0 +1,183 @@ +#include "qtscriptshell_QPropertyAnimation.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QAbstractAnimation::Direction) +Q_DECLARE_METATYPE(QAbstractAnimation::State) + +QtScriptShell_QPropertyAnimation::QtScriptShell_QPropertyAnimation(QObject* parent) + : QPropertyAnimation(parent) {} + +QtScriptShell_QPropertyAnimation::QtScriptShell_QPropertyAnimation(QObject* target, const QByteArray& propertyName, QObject* parent) + : QPropertyAnimation(target, propertyName, parent) {} + +QtScriptShell_QPropertyAnimation::~QtScriptShell_QPropertyAnimation() {} + +void QtScriptShell_QPropertyAnimation::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QPropertyAnimation::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPropertyAnimation::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QPropertyAnimation::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QPropertyAnimation::duration() const +{ + QScriptValue _q_function = __qtscript_self.property("_qs_duration"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("_qs_duration") & QScriptValue::QObjectMember)) { + return QPropertyAnimation::duration(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QPropertyAnimation::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QPropertyAnimation::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QPropertyAnimation::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QPropertyAnimation::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QVariant QtScriptShell_QPropertyAnimation::interpolated(const QVariant& from, const QVariant& to, qreal progress) const +{ + QScriptValue _q_function = __qtscript_self.property("interpolated"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("interpolated") & QScriptValue::QObjectMember)) { + return QPropertyAnimation::interpolated(from, to, progress); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, from) + << qScriptValueFromValue(_q_engine, to) + << qScriptValueFromValue(_q_engine, progress))); + } +} + +void QtScriptShell_QPropertyAnimation::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QPropertyAnimation::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPropertyAnimation::updateCurrentTime(int arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("updateCurrentTime"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateCurrentTime") & QScriptValue::QObjectMember)) { + QPropertyAnimation::updateCurrentTime(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPropertyAnimation::updateCurrentValue(const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("updateCurrentValue"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateCurrentValue") & QScriptValue::QObjectMember)) { + QPropertyAnimation::updateCurrentValue(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +void QtScriptShell_QPropertyAnimation::updateDirection(QAbstractAnimation::Direction direction) +{ + QScriptValue _q_function = __qtscript_self.property("updateDirection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateDirection") & QScriptValue::QObjectMember)) { + QPropertyAnimation::updateDirection(direction); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, direction)); + } +} + +void QtScriptShell_QPropertyAnimation::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) +{ + QScriptValue _q_function = __qtscript_self.property("updateState"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateState") & QScriptValue::QObjectMember)) { + QPropertyAnimation::updateState(newState, oldState); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, newState) + << qScriptValueFromValue(_q_engine, oldState)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QPropertyAnimation.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QPropertyAnimation.h new file mode 100644 index 00000000..6bf66d20 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QPropertyAnimation.h @@ -0,0 +1,31 @@ +#ifndef QTSCRIPTSHELL_QPROPERTYANIMATION_H +#define QTSCRIPTSHELL_QPROPERTYANIMATION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPropertyAnimation : public QPropertyAnimation +{ +public: + QtScriptShell_QPropertyAnimation(QObject* parent = 0); + QtScriptShell_QPropertyAnimation(QObject* target, const QByteArray& propertyName, QObject* parent = 0); + ~QtScriptShell_QPropertyAnimation(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + int duration() const; + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + QVariant interpolated(const QVariant& from, const QVariant& to, qreal progress) const; + void timerEvent(QTimerEvent* event); + void updateCurrentTime(int arg__1); + void updateCurrentValue(const QVariant& value); + void updateDirection(QAbstractAnimation::Direction direction); + void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPROPERTYANIMATION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QRunnable.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QRunnable.cpp new file mode 100644 index 00000000..dd327370 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QRunnable.cpp @@ -0,0 +1,24 @@ +#include "qtscriptshell_QRunnable.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QRunnable::QtScriptShell_QRunnable() + : QRunnable() {} + +QtScriptShell_QRunnable::~QtScriptShell_QRunnable() {} + +void QtScriptShell_QRunnable::run() +{ + QScriptValue _q_function = __qtscript_self.property("run"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("run") & QScriptValue::QObjectMember)) { + qFatal("QRunnable::run() is abstract!"); + } else { + _q_function.call(__qtscript_self); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QRunnable.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QRunnable.h new file mode 100644 index 00000000..4131c9d7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QRunnable.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QRUNNABLE_H +#define QTSCRIPTSHELL_QRUNNABLE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QRunnable : public QRunnable +{ +public: + QtScriptShell_QRunnable(); + ~QtScriptShell_QRunnable(); + + void run(); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QRUNNABLE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSequentialAnimationGroup.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSequentialAnimationGroup.cpp new file mode 100644 index 00000000..d8785147 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSequentialAnimationGroup.cpp @@ -0,0 +1,151 @@ +#include "qtscriptshell_QSequentialAnimationGroup.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QAbstractAnimation::Direction) +Q_DECLARE_METATYPE(QAbstractAnimation::State) + +QtScriptShell_QSequentialAnimationGroup::QtScriptShell_QSequentialAnimationGroup(QObject* parent) + : QSequentialAnimationGroup(parent) {} + +QtScriptShell_QSequentialAnimationGroup::~QtScriptShell_QSequentialAnimationGroup() {} + +void QtScriptShell_QSequentialAnimationGroup::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSequentialAnimationGroup::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSequentialAnimationGroup::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSequentialAnimationGroup::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QSequentialAnimationGroup::duration() const +{ + QScriptValue _q_function = __qtscript_self.property("_qs_duration"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("_qs_duration") & QScriptValue::QObjectMember)) { + return QSequentialAnimationGroup::duration(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSequentialAnimationGroup::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSequentialAnimationGroup::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QSequentialAnimationGroup::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSequentialAnimationGroup::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSequentialAnimationGroup::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSequentialAnimationGroup::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSequentialAnimationGroup::updateCurrentTime(int arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("updateCurrentTime"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateCurrentTime") & QScriptValue::QObjectMember)) { + QSequentialAnimationGroup::updateCurrentTime(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QSequentialAnimationGroup::updateDirection(QAbstractAnimation::Direction direction) +{ + QScriptValue _q_function = __qtscript_self.property("updateDirection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateDirection") & QScriptValue::QObjectMember)) { + QSequentialAnimationGroup::updateDirection(direction); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, direction)); + } +} + +void QtScriptShell_QSequentialAnimationGroup::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) +{ + QScriptValue _q_function = __qtscript_self.property("updateState"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateState") & QScriptValue::QObjectMember)) { + QSequentialAnimationGroup::updateState(newState, oldState); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, newState) + << qScriptValueFromValue(_q_engine, oldState)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSequentialAnimationGroup.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSequentialAnimationGroup.h new file mode 100644 index 00000000..8cf9d8e8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSequentialAnimationGroup.h @@ -0,0 +1,28 @@ +#ifndef QTSCRIPTSHELL_QSEQUENTIALANIMATIONGROUP_H +#define QTSCRIPTSHELL_QSEQUENTIALANIMATIONGROUP_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSequentialAnimationGroup : public QSequentialAnimationGroup +{ +public: + QtScriptShell_QSequentialAnimationGroup(QObject* parent = 0); + ~QtScriptShell_QSequentialAnimationGroup(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + int duration() const; + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + void updateCurrentTime(int arg__1); + void updateDirection(QAbstractAnimation::Direction direction); + void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSEQUENTIALANIMATIONGROUP_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSettings.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSettings.cpp new file mode 100644 index 00000000..cec2ce41 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSettings.cpp @@ -0,0 +1,107 @@ +#include "qtscriptshell_QSettings.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QSettings::QtScriptShell_QSettings(QObject* parent) + : QSettings(parent) {} + +QtScriptShell_QSettings::QtScriptShell_QSettings(QSettings::Format format, QSettings::Scope scope, const QString& organization, const QString& application, QObject* parent) + : QSettings(format, scope, organization, application, parent) {} + +QtScriptShell_QSettings::QtScriptShell_QSettings(QSettings::Scope scope, const QString& organization, const QString& application, QObject* parent) + : QSettings(scope, organization, application, parent) {} + +QtScriptShell_QSettings::QtScriptShell_QSettings(const QString& fileName, QSettings::Format format, QObject* parent) + : QSettings(fileName, format, parent) {} + +QtScriptShell_QSettings::QtScriptShell_QSettings(const QString& organization, const QString& application, QObject* parent) + : QSettings(organization, application, parent) {} + +QtScriptShell_QSettings::~QtScriptShell_QSettings() {} + +void QtScriptShell_QSettings::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSettings::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSettings::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSettings::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSettings::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSettings::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QSettings::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSettings::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSettings::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSettings::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSettings.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSettings.h new file mode 100644 index 00000000..c62a78f6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSettings.h @@ -0,0 +1,28 @@ +#ifndef QTSCRIPTSHELL_QSETTINGS_H +#define QTSCRIPTSHELL_QSETTINGS_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSettings : public QSettings +{ +public: + QtScriptShell_QSettings(QObject* parent = 0); + QtScriptShell_QSettings(QSettings::Format format, QSettings::Scope scope, const QString& organization, const QString& application = QString(), QObject* parent = 0); + QtScriptShell_QSettings(QSettings::Scope scope, const QString& organization, const QString& application = QString(), QObject* parent = 0); + QtScriptShell_QSettings(const QString& fileName, QSettings::Format format, QObject* parent = 0); + QtScriptShell_QSettings(const QString& organization, const QString& application = QString(), QObject* parent = 0); + ~QtScriptShell_QSettings(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSETTINGS_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSignalMapper.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSignalMapper.cpp new file mode 100644 index 00000000..40405cb5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSignalMapper.cpp @@ -0,0 +1,92 @@ +#include "qtscriptshell_QSignalMapper.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QSignalMapper::QtScriptShell_QSignalMapper(QObject* parent) + : QSignalMapper(parent) {} + +QtScriptShell_QSignalMapper::~QtScriptShell_QSignalMapper() {} + +void QtScriptShell_QSignalMapper::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSignalMapper::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSignalMapper::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSignalMapper::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSignalMapper::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSignalMapper::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QSignalMapper::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSignalMapper::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSignalMapper::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSignalMapper::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSignalMapper.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSignalMapper.h new file mode 100644 index 00000000..ef0f66c3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSignalMapper.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QSIGNALMAPPER_H +#define QTSCRIPTSHELL_QSIGNALMAPPER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSignalMapper : public QSignalMapper +{ +public: + QtScriptShell_QSignalMapper(QObject* parent = 0); + ~QtScriptShell_QSignalMapper(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSIGNALMAPPER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSignalTransition.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSignalTransition.cpp new file mode 100644 index 00000000..653d6acc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSignalTransition.cpp @@ -0,0 +1,127 @@ +#include "qtscriptshell_QSignalTransition.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QSignalTransition::QtScriptShell_QSignalTransition(QState* sourceState) + : QSignalTransition(sourceState) {} + +QtScriptShell_QSignalTransition::QtScriptShell_QSignalTransition(const QObject* sender, const char* signal, QState* sourceState) + : QSignalTransition(sender, signal, sourceState) {} + +QtScriptShell_QSignalTransition::~QtScriptShell_QSignalTransition() {} + +void QtScriptShell_QSignalTransition::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSignalTransition::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSignalTransition::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSignalTransition::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSignalTransition::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSignalTransition::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QSignalTransition::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSignalTransition::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QSignalTransition::eventTest(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventTest"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventTest") & QScriptValue::QObjectMember)) { + return QSignalTransition::eventTest(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSignalTransition::onTransition(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("onTransition"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("onTransition") & QScriptValue::QObjectMember)) { + QSignalTransition::onTransition(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSignalTransition::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSignalTransition::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSignalTransition.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSignalTransition.h new file mode 100644 index 00000000..b0fdafaa --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QSignalTransition.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QSIGNALTRANSITION_H +#define QTSCRIPTSHELL_QSIGNALTRANSITION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSignalTransition : public QSignalTransition +{ +public: + QtScriptShell_QSignalTransition(QState* sourceState = 0); + QtScriptShell_QSignalTransition(const QObject* sender, const char* signal, QState* sourceState = 0); + ~QtScriptShell_QSignalTransition(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + bool eventTest(QEvent* event); + void onTransition(QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSIGNALTRANSITION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QState.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QState.cpp new file mode 100644 index 00000000..6e884167 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QState.cpp @@ -0,0 +1,127 @@ +#include "qtscriptshell_QState.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QState::QtScriptShell_QState(QState* parent) + : QState(parent) {} + +QtScriptShell_QState::QtScriptShell_QState(QState::ChildMode childMode, QState* parent) + : QState(childMode, parent) {} + +QtScriptShell_QState::~QtScriptShell_QState() {} + +void QtScriptShell_QState::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QState::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QState::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QState::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QState::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QState::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QState::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QState::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QState::onEntry(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("onEntry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("onEntry") & QScriptValue::QObjectMember)) { + QState::onEntry(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QState::onExit(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("onExit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("onExit") & QScriptValue::QObjectMember)) { + QState::onExit(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QState::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QState::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QState.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QState.h new file mode 100644 index 00000000..4f8b70dc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QState.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QSTATE_H +#define QTSCRIPTSHELL_QSTATE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QState : public QState +{ +public: + QtScriptShell_QState(QState* parent = 0); + QtScriptShell_QState(QState::ChildMode childMode, QState* parent = 0); + ~QtScriptShell_QState(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void onEntry(QEvent* event); + void onExit(QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTATE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QStateMachine.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QStateMachine.cpp new file mode 100644 index 00000000..ba79a2cb --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QStateMachine.cpp @@ -0,0 +1,184 @@ +#include "qtscriptshell_QStateMachine.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QStateMachine::QtScriptShell_QStateMachine(QObject* parent) + : QStateMachine(parent) {} + +QtScriptShell_QStateMachine::QtScriptShell_QStateMachine(QState::ChildMode childMode, QObject* parent) + : QStateMachine(childMode, parent) {} + +QtScriptShell_QStateMachine::~QtScriptShell_QStateMachine() {} + +void QtScriptShell_QStateMachine::beginMicrostep(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("beginMicrostep"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("beginMicrostep") & QScriptValue::QObjectMember)) { + QStateMachine::beginMicrostep(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStateMachine::beginSelectTransitions(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("beginSelectTransitions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("beginSelectTransitions") & QScriptValue::QObjectMember)) { + QStateMachine::beginSelectTransitions(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStateMachine::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QStateMachine::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStateMachine::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QStateMachine::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStateMachine::endMicrostep(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("endMicrostep"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("endMicrostep") & QScriptValue::QObjectMember)) { + QStateMachine::endMicrostep(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStateMachine::endSelectTransitions(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("endSelectTransitions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("endSelectTransitions") & QScriptValue::QObjectMember)) { + QStateMachine::endSelectTransitions(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QStateMachine::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QStateMachine::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QStateMachine::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QStateMachine::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QStateMachine::onEntry(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("onEntry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("onEntry") & QScriptValue::QObjectMember)) { + QStateMachine::onEntry(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStateMachine::onExit(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("onExit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("onExit") & QScriptValue::QObjectMember)) { + QStateMachine::onExit(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStateMachine::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QStateMachine::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QStateMachine.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QStateMachine.h new file mode 100644 index 00000000..93f1a36f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QStateMachine.h @@ -0,0 +1,31 @@ +#ifndef QTSCRIPTSHELL_QSTATEMACHINE_H +#define QTSCRIPTSHELL_QSTATEMACHINE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStateMachine : public QStateMachine +{ +public: + QtScriptShell_QStateMachine(QObject* parent = 0); + QtScriptShell_QStateMachine(QState::ChildMode childMode, QObject* parent = 0); + ~QtScriptShell_QStateMachine(); + + void beginMicrostep(QEvent* event); + void beginSelectTransitions(QEvent* event); + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + void endMicrostep(QEvent* event); + void endSelectTransitions(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void onEntry(QEvent* event); + void onExit(QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTATEMACHINE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTemporaryFile.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTemporaryFile.cpp new file mode 100644 index 00000000..59babb7e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTemporaryFile.cpp @@ -0,0 +1,345 @@ +#include "qtscriptshell_QTemporaryFile.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(char*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(const char*) + +QtScriptShell_QTemporaryFile::QtScriptShell_QTemporaryFile() + : QTemporaryFile() {} + +QtScriptShell_QTemporaryFile::QtScriptShell_QTemporaryFile(QObject* parent) + : QTemporaryFile(parent) {} + +QtScriptShell_QTemporaryFile::QtScriptShell_QTemporaryFile(const QString& templateName) + : QTemporaryFile(templateName) {} + +QtScriptShell_QTemporaryFile::QtScriptShell_QTemporaryFile(const QString& templateName, QObject* parent) + : QTemporaryFile(templateName, parent) {} + +QtScriptShell_QTemporaryFile::~QtScriptShell_QTemporaryFile() {} + +bool QtScriptShell_QTemporaryFile::atEnd() const +{ + QScriptValue _q_function = __qtscript_self.property("atEnd"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)) { + return QTemporaryFile::atEnd(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QTemporaryFile::bytesAvailable() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesAvailable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesAvailable") & QScriptValue::QObjectMember)) { + return QTemporaryFile::bytesAvailable(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QTemporaryFile::bytesToWrite() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesToWrite"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesToWrite") & QScriptValue::QObjectMember)) { + return QTemporaryFile::bytesToWrite(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QTemporaryFile::canReadLine() const +{ + QScriptValue _q_function = __qtscript_self.property("canReadLine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canReadLine") & QScriptValue::QObjectMember)) { + return QTemporaryFile::canReadLine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTemporaryFile::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTemporaryFile::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTemporaryFile::close() +{ + QScriptValue _q_function = __qtscript_self.property("close"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("close") & QScriptValue::QObjectMember)) { + QTemporaryFile::close(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTemporaryFile::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTemporaryFile::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTemporaryFile::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTemporaryFile::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTemporaryFile::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTemporaryFile::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTemporaryFile::isSequential() const +{ + QScriptValue _q_function = __qtscript_self.property("isSequential"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isSequential") & QScriptValue::QObjectMember)) { + return QTemporaryFile::isSequential(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QTemporaryFile::open(QIODevice::OpenMode flags) +{ + QScriptValue _q_function = __qtscript_self.property("open"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("open") & QScriptValue::QObjectMember)) { + return QTemporaryFile::open(flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, flags))); + } +} + +QFileDevice::Permissions QtScriptShell_QTemporaryFile::permissions() const +{ + QScriptValue _q_function = __qtscript_self.property("permissions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("permissions") & QScriptValue::QObjectMember)) { + return QTemporaryFile::permissions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QTemporaryFile::pos() const +{ + QScriptValue _q_function = __qtscript_self.property("pos"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("pos") & QScriptValue::QObjectMember)) { + return QTemporaryFile::pos(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QTemporaryFile::readData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readData") & QScriptValue::QObjectMember)) { + return QTemporaryFile::readData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +qint64 QtScriptShell_QTemporaryFile::readLineData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readLineData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readLineData") & QScriptValue::QObjectMember)) { + return QTemporaryFile::readLineData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +bool QtScriptShell_QTemporaryFile::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + return QTemporaryFile::reset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QTemporaryFile::resize(qint64 sz) +{ + QScriptValue _q_function = __qtscript_self.property("resize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resize") & QScriptValue::QObjectMember)) { + return QTemporaryFile::resize(sz); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sz))); + } +} + +bool QtScriptShell_QTemporaryFile::seek(qint64 offset) +{ + QScriptValue _q_function = __qtscript_self.property("seek"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("seek") & QScriptValue::QObjectMember)) { + return QTemporaryFile::seek(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +bool QtScriptShell_QTemporaryFile::setPermissions(QFileDevice::Permissions permissionSpec) +{ + QScriptValue _q_function = __qtscript_self.property("setPermissions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setPermissions") & QScriptValue::QObjectMember)) { + return QTemporaryFile::setPermissions(permissionSpec); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, permissionSpec))); + } +} + +qint64 QtScriptShell_QTemporaryFile::size() const +{ + QScriptValue _q_function = __qtscript_self.property("size"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("size") & QScriptValue::QObjectMember)) { + return QTemporaryFile::size(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTemporaryFile::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTemporaryFile::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTemporaryFile::waitForBytesWritten(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForBytesWritten"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForBytesWritten") & QScriptValue::QObjectMember)) { + return QTemporaryFile::waitForBytesWritten(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QTemporaryFile::waitForReadyRead(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForReadyRead"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForReadyRead") & QScriptValue::QObjectMember)) { + return QTemporaryFile::waitForReadyRead(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +qint64 QtScriptShell_QTemporaryFile::writeData(const char* data, qint64 len) +{ + QScriptValue _q_function = __qtscript_self.property("writeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("writeData") & QScriptValue::QObjectMember)) { + return QTemporaryFile::writeData(data, len); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, len))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTemporaryFile.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTemporaryFile.h new file mode 100644 index 00000000..0f1f5ee3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTemporaryFile.h @@ -0,0 +1,46 @@ +#ifndef QTSCRIPTSHELL_QTEMPORARYFILE_H +#define QTSCRIPTSHELL_QTEMPORARYFILE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTemporaryFile : public QTemporaryFile +{ +public: + QtScriptShell_QTemporaryFile(); + QtScriptShell_QTemporaryFile(QObject* parent); + QtScriptShell_QTemporaryFile(const QString& templateName); + QtScriptShell_QTemporaryFile(const QString& templateName, QObject* parent); + ~QtScriptShell_QTemporaryFile(); + + bool atEnd() const; + qint64 bytesAvailable() const; + qint64 bytesToWrite() const; + bool canReadLine() const; + void childEvent(QChildEvent* event); + void close(); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + bool isSequential() const; + bool open(QIODevice::OpenMode flags); + QFileDevice::Permissions permissions() const; + qint64 pos() const; + qint64 readData(char* data, qint64 maxlen); + qint64 readLineData(char* data, qint64 maxlen); + bool reset(); + bool resize(qint64 sz); + bool seek(qint64 offset); + bool setPermissions(QFileDevice::Permissions permissionSpec); + qint64 size() const; + void timerEvent(QTimerEvent* event); + bool waitForBytesWritten(int msecs); + bool waitForReadyRead(int msecs); + qint64 writeData(const char* data, qint64 len); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEMPORARYFILE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTextCodec.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTextCodec.cpp new file mode 100644 index 00000000..35780e46 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTextCodec.cpp @@ -0,0 +1,85 @@ +#include "qtscriptshell_QTextCodec.h" + +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QChar*) +Q_DECLARE_METATYPE(QTextCodec::ConverterState*) +Q_DECLARE_METATYPE(const char*) + +QtScriptShell_QTextCodec::QtScriptShell_QTextCodec() + : QTextCodec() {} + +QtScriptShell_QTextCodec::~QtScriptShell_QTextCodec() {} + +QList QtScriptShell_QTextCodec::aliases() const +{ + QScriptValue _q_function = __qtscript_self.property("aliases"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("aliases") & QScriptValue::QObjectMember)) { + return QTextCodec::aliases(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +QByteArray QtScriptShell_QTextCodec::convertFromUnicode(const QChar* in, int length, QTextCodec::ConverterState* state) const +{ + QScriptValue _q_function = __qtscript_self.property("convertFromUnicode"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("convertFromUnicode") & QScriptValue::QObjectMember)) { + qFatal("QTextCodec::convertFromUnicode() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(in)) + << qScriptValueFromValue(_q_engine, length) + << qScriptValueFromValue(_q_engine, state))); + } +} + +QString QtScriptShell_QTextCodec::convertToUnicode(const char* in, int length, QTextCodec::ConverterState* state) const +{ + QScriptValue _q_function = __qtscript_self.property("convertToUnicode"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("convertToUnicode") & QScriptValue::QObjectMember)) { + qFatal("QTextCodec::convertToUnicode() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(in)) + << qScriptValueFromValue(_q_engine, length) + << qScriptValueFromValue(_q_engine, state))); + } +} + +int QtScriptShell_QTextCodec::mibEnum() const +{ + QScriptValue _q_function = __qtscript_self.property("mibEnum"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mibEnum") & QScriptValue::QObjectMember)) { + qFatal("QTextCodec::mibEnum() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QByteArray QtScriptShell_QTextCodec::name() const +{ + QScriptValue _q_function = __qtscript_self.property("name"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("name") & QScriptValue::QObjectMember)) { + qFatal("QTextCodec::name() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTextCodec.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTextCodec.h new file mode 100644 index 00000000..224422b5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTextCodec.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QTEXTCODEC_H +#define QTSCRIPTSHELL_QTEXTCODEC_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextCodec : public QTextCodec +{ +public: + QtScriptShell_QTextCodec(); + ~QtScriptShell_QTextCodec(); + + QList aliases() const; + QByteArray convertFromUnicode(const QChar* in, int length, QTextCodec::ConverterState* state) const; + QString convertToUnicode(const char* in, int length, QTextCodec::ConverterState* state) const; + int mibEnum() const; + QByteArray name() const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTCODEC_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTextStream.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTextStream.cpp new file mode 100644 index 00000000..69c6b222 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTextStream.cpp @@ -0,0 +1,24 @@ +#include "qtscriptshell_QTextStream.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QTextStream::QtScriptShell_QTextStream() + : QTextStream() {} + +QtScriptShell_QTextStream::QtScriptShell_QTextStream(QIODevice* device) + : QTextStream(device) {} + +QtScriptShell_QTextStream::QtScriptShell_QTextStream(const QByteArray& array, QIODevice::OpenMode openMode) + : QTextStream(array, openMode) {} + +QtScriptShell_QTextStream::~QtScriptShell_QTextStream() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTextStream.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTextStream.h new file mode 100644 index 00000000..da30c5c4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTextStream.h @@ -0,0 +1,23 @@ +#ifndef QTSCRIPTSHELL_QTEXTSTREAM_H +#define QTSCRIPTSHELL_QTEXTSTREAM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextStream : public QTextStream +{ +public: + QtScriptShell_QTextStream(); + QtScriptShell_QTextStream(QByteArray* array, QIODevice::OpenMode openMode = QIODevice::ReadWrite); + QtScriptShell_QTextStream(QIODevice* device); + QtScriptShell_QTextStream(QString* string, QIODevice::OpenMode openMode = QIODevice::ReadWrite); + QtScriptShell_QTextStream(const QByteArray& array, QIODevice::OpenMode openMode = QIODevice::ReadOnly); + ~QtScriptShell_QTextStream(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTSTREAM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QThreadPool.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QThreadPool.cpp new file mode 100644 index 00000000..446ee487 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QThreadPool.cpp @@ -0,0 +1,93 @@ +#include "qtscriptshell_QThreadPool.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QThreadPool::QtScriptShell_QThreadPool(QObject* parent) + : QThreadPool(parent) {} + +QtScriptShell_QThreadPool::~QtScriptShell_QThreadPool() {} + +void QtScriptShell_QThreadPool::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QThreadPool::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QThreadPool::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QThreadPool::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QThreadPool::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QThreadPool::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QThreadPool::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QThreadPool::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QThreadPool::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QThreadPool::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QThreadPool.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QThreadPool.h new file mode 100644 index 00000000..9cf815dc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QThreadPool.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QTHREADPOOL_H +#define QTSCRIPTSHELL_QTHREADPOOL_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QThreadPool : public QThreadPool +{ +public: + QtScriptShell_QThreadPool(QObject* parent = 0); + ~QtScriptShell_QThreadPool(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTHREADPOOL_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimeLine.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimeLine.cpp new file mode 100644 index 00000000..e97d5078 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimeLine.cpp @@ -0,0 +1,107 @@ +#include "qtscriptshell_QTimeLine.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QTimeLine::QtScriptShell_QTimeLine(int duration, QObject* parent) + : QTimeLine(duration, parent) {} + +QtScriptShell_QTimeLine::~QtScriptShell_QTimeLine() {} + +void QtScriptShell_QTimeLine::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTimeLine::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeLine::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTimeLine::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTimeLine::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTimeLine::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTimeLine::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTimeLine::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QTimeLine::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTimeLine::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +qreal QtScriptShell_QTimeLine::valueForTime(int msec) const +{ + QScriptValue _q_function = __qtscript_self.property("valueForTime"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("valueForTime") & QScriptValue::QObjectMember)) { + return QTimeLine::valueForTime(msec); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msec))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimeLine.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimeLine.h new file mode 100644 index 00000000..1b3d7e3c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimeLine.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QTIMELINE_H +#define QTSCRIPTSHELL_QTIMELINE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTimeLine : public QTimeLine +{ +public: + QtScriptShell_QTimeLine(int duration = 1000, QObject* parent = 0); + ~QtScriptShell_QTimeLine(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + qreal valueForTime(int msec) const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTIMELINE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimer.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimer.cpp new file mode 100644 index 00000000..3a6e7efa --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimer.cpp @@ -0,0 +1,92 @@ +#include "qtscriptshell_QTimer.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QTimer::QtScriptShell_QTimer(QObject* parent) + : QTimer(parent) {} + +QtScriptShell_QTimer::~QtScriptShell_QTimer() {} + +void QtScriptShell_QTimer::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTimer::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimer::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTimer::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTimer::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTimer::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTimer::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTimer::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QTimer::timerEvent(QTimerEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTimer::timerEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimer.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimer.h new file mode 100644 index 00000000..0d864a5e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimer.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QTIMER_H +#define QTSCRIPTSHELL_QTIMER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTimer : public QTimer +{ +public: + QtScriptShell_QTimer(QObject* parent = 0); + ~QtScriptShell_QTimer(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* arg__1); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTIMER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimerEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimerEvent.cpp new file mode 100644 index 00000000..32fb763a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimerEvent.cpp @@ -0,0 +1,14 @@ +#include "qtscriptshell_QTimerEvent.h" + +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QTimerEvent::QtScriptShell_QTimerEvent(int timerId) + : QTimerEvent(timerId) {} + +QtScriptShell_QTimerEvent::~QtScriptShell_QTimerEvent() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimerEvent.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimerEvent.h new file mode 100644 index 00000000..073ed3cd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTimerEvent.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QTIMEREVENT_H +#define QTSCRIPTSHELL_QTIMEREVENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTimerEvent : public QTimerEvent +{ +public: + QtScriptShell_QTimerEvent(int timerId); + ~QtScriptShell_QTimerEvent(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTIMEREVENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTranslator.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTranslator.cpp new file mode 100644 index 00000000..c6c035b7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTranslator.cpp @@ -0,0 +1,104 @@ +#include "qtscriptshell_QTranslator.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QTranslator::QtScriptShell_QTranslator(QObject* parent) + : QTranslator(parent) {} + +QtScriptShell_QTranslator::~QtScriptShell_QTranslator() {} + +void QtScriptShell_QTranslator::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTranslator::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTranslator::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTranslator::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTranslator::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTranslator::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTranslator::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTranslator::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTranslator::isEmpty() const +{ + QScriptValue _q_function = __qtscript_self.property("isEmpty"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isEmpty") & QScriptValue::QObjectMember)) { + return QTranslator::isEmpty(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTranslator::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTranslator::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTranslator.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTranslator.h new file mode 100644 index 00000000..53e37b76 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QTranslator.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QTRANSLATOR_H +#define QTSCRIPTSHELL_QTRANSLATOR_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTranslator : public QTranslator +{ +public: + QtScriptShell_QTranslator(QObject* parent = 0); + ~QtScriptShell_QTranslator(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + bool isEmpty() const; + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTRANSLATOR_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QUuid.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QUuid.cpp new file mode 100644 index 00000000..59ba6ae9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QUuid.cpp @@ -0,0 +1,24 @@ +#include "qtscriptshell_QUuid.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QUuid::QtScriptShell_QUuid() + : QUuid() {} + +QtScriptShell_QUuid::QtScriptShell_QUuid(const QByteArray& arg__1) + : QUuid(arg__1) {} + +QtScriptShell_QUuid::QtScriptShell_QUuid(const QString& arg__1) + : QUuid(arg__1) {} + +QtScriptShell_QUuid::QtScriptShell_QUuid(uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8) + : QUuid(l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) {} + +QtScriptShell_QUuid::~QtScriptShell_QUuid() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QUuid.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QUuid.h new file mode 100644 index 00000000..08127997 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QUuid.h @@ -0,0 +1,23 @@ +#ifndef QTSCRIPTSHELL_QUUID_H +#define QTSCRIPTSHELL_QUUID_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QUuid : public QUuid +{ +public: + QtScriptShell_QUuid(); + QtScriptShell_QUuid(const QByteArray& arg__1); + QtScriptShell_QUuid(const QString& arg__1); + QtScriptShell_QUuid(const char* arg__1); + QtScriptShell_QUuid(uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8); + ~QtScriptShell_QUuid(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QUUID_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QVariantAnimation.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QVariantAnimation.cpp new file mode 100644 index 00000000..7c603561 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QVariantAnimation.cpp @@ -0,0 +1,180 @@ +#include "qtscriptshell_QVariantAnimation.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QAbstractAnimation::Direction) +Q_DECLARE_METATYPE(QAbstractAnimation::State) + +QtScriptShell_QVariantAnimation::QtScriptShell_QVariantAnimation(QObject* parent) + : QVariantAnimation(parent) {} + +QtScriptShell_QVariantAnimation::~QtScriptShell_QVariantAnimation() {} + +void QtScriptShell_QVariantAnimation::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QVariantAnimation::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QVariantAnimation::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QVariantAnimation::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QVariantAnimation::duration() const +{ + QScriptValue _q_function = __qtscript_self.property("_qs_duration"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("_qs_duration") & QScriptValue::QObjectMember)) { + return QVariantAnimation::duration(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QVariantAnimation::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QVariantAnimation::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QVariantAnimation::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QVariantAnimation::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QVariant QtScriptShell_QVariantAnimation::interpolated(const QVariant& from, const QVariant& to, qreal progress) const +{ + QScriptValue _q_function = __qtscript_self.property("interpolated"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("interpolated") & QScriptValue::QObjectMember)) { + return QVariantAnimation::interpolated(from, to, progress); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, from) + << qScriptValueFromValue(_q_engine, to) + << qScriptValueFromValue(_q_engine, progress))); + } +} + +void QtScriptShell_QVariantAnimation::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QVariantAnimation::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QVariantAnimation::updateCurrentTime(int arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("updateCurrentTime"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateCurrentTime") & QScriptValue::QObjectMember)) { + QVariantAnimation::updateCurrentTime(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QVariantAnimation::updateCurrentValue(const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("updateCurrentValue"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateCurrentValue") & QScriptValue::QObjectMember)) { + QVariantAnimation::updateCurrentValue(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +void QtScriptShell_QVariantAnimation::updateDirection(QAbstractAnimation::Direction direction) +{ + QScriptValue _q_function = __qtscript_self.property("updateDirection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateDirection") & QScriptValue::QObjectMember)) { + QVariantAnimation::updateDirection(direction); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, direction)); + } +} + +void QtScriptShell_QVariantAnimation::updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState) +{ + QScriptValue _q_function = __qtscript_self.property("updateState"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateState") & QScriptValue::QObjectMember)) { + QVariantAnimation::updateState(newState, oldState); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, newState) + << qScriptValueFromValue(_q_engine, oldState)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QVariantAnimation.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QVariantAnimation.h new file mode 100644 index 00000000..c0f45749 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QVariantAnimation.h @@ -0,0 +1,30 @@ +#ifndef QTSCRIPTSHELL_QVARIANTANIMATION_H +#define QTSCRIPTSHELL_QVARIANTANIMATION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QVariantAnimation : public QVariantAnimation +{ +public: + QtScriptShell_QVariantAnimation(QObject* parent = 0); + ~QtScriptShell_QVariantAnimation(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + int duration() const; + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + QVariant interpolated(const QVariant& from, const QVariant& to, qreal progress) const; + void timerEvent(QTimerEvent* event); + void updateCurrentTime(int arg__1); + void updateCurrentValue(const QVariant& value); + void updateDirection(QAbstractAnimation::Direction direction); + void updateState(QAbstractAnimation::State newState, QAbstractAnimation::State oldState); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QVARIANTANIMATION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QXmlStreamEntityResolver.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QXmlStreamEntityResolver.cpp new file mode 100644 index 00000000..f2646488 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QXmlStreamEntityResolver.cpp @@ -0,0 +1,42 @@ +#include "qtscriptshell_QXmlStreamEntityResolver.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QXmlStreamEntityResolver::QtScriptShell_QXmlStreamEntityResolver() + : QXmlStreamEntityResolver() {} + +QtScriptShell_QXmlStreamEntityResolver::~QtScriptShell_QXmlStreamEntityResolver() {} + +QString QtScriptShell_QXmlStreamEntityResolver::resolveEntity(const QString& publicId, const QString& systemId) +{ + QScriptValue _q_function = __qtscript_self.property("resolveEntity"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resolveEntity") & QScriptValue::QObjectMember)) { + return QXmlStreamEntityResolver::resolveEntity(publicId, systemId); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, publicId) + << qScriptValueFromValue(_q_engine, systemId))); + } +} + +QString QtScriptShell_QXmlStreamEntityResolver::resolveUndeclaredEntity(const QString& name) +{ + QScriptValue _q_function = __qtscript_self.property("resolveUndeclaredEntity"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resolveUndeclaredEntity") & QScriptValue::QObjectMember)) { + return QXmlStreamEntityResolver::resolveUndeclaredEntity(name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QXmlStreamEntityResolver.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QXmlStreamEntityResolver.h new file mode 100644 index 00000000..97fc968e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_core/qtscriptshell_QXmlStreamEntityResolver.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QXMLSTREAMENTITYRESOLVER_H +#define QTSCRIPTSHELL_QXMLSTREAMENTITYRESOLVER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QXmlStreamEntityResolver : public QXmlStreamEntityResolver +{ +public: + QtScriptShell_QXmlStreamEntityResolver(); + ~QtScriptShell_QXmlStreamEntityResolver(); + + QString resolveEntity(const QString& publicId, const QString& systemId); + QString resolveUndeclaredEntity(const QString& name); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QXMLSTREAMENTITYRESOLVER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/com_trolltech_qt_custom.pri b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/com_trolltech_qt_custom.pri new file mode 100644 index 00000000..8bbb980e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/com_trolltech_qt_custom.pri @@ -0,0 +1,16 @@ +HEADERS += \ + $$PWD/qtscriptshell_ColorPicker.h \ + $$PWD/qtscriptshell_Slider.h \ + $$PWD/qtscriptshell_SliderBox.h \ + $$PWD/qtscriptshell_StyledToolButton.h \ + +SOURCES += \ + $$PWD/qtscript_ColorPicker.cpp \ + $$PWD/qtscript_Slider.cpp \ + $$PWD/qtscript_SliderBox.cpp \ + $$PWD/qtscript_StyledToolButton.cpp \ + $$PWD/qtscriptshell_ColorPicker.cpp \ + $$PWD/qtscriptshell_Slider.cpp \ + $$PWD/qtscriptshell_SliderBox.cpp \ + $$PWD/qtscriptshell_StyledToolButton.cpp \ + $$PWD/com_trolltech_qt_custom_init.cpp diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/com_trolltech_qt_custom_init.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/com_trolltech_qt_custom_init.cpp new file mode 100644 index 00000000..70003262 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/com_trolltech_qt_custom_init.cpp @@ -0,0 +1,32 @@ +#include +#include + +QScriptValue qtscript_create_ColorPicker_class(QScriptEngine *engine); +QScriptValue qtscript_create_SliderBox_class(QScriptEngine *engine); +QScriptValue qtscript_create_Slider_class(QScriptEngine *engine); +QScriptValue qtscript_create_StyledToolButton_class(QScriptEngine *engine); + +static const char * const qtscript_com_trolltech_qt_custom_class_names[] = { + "ColorPicker" + , "SliderBox" + , "Slider" + , "StyledToolButton" +}; + +typedef QScriptValue (*QtBindingCreator)(QScriptEngine *engine); +static const QtBindingCreator qtscript_com_trolltech_qt_custom_class_functions[] = { + qtscript_create_ColorPicker_class + , qtscript_create_SliderBox_class + , qtscript_create_Slider_class + , qtscript_create_StyledToolButton_class +}; + +void qtscript_initialize_com_trolltech_qt_custom_bindings(QScriptValue &extensionObject) +{ + QScriptEngine *engine = extensionObject.engine(); + for (int i = 0; i < 4; ++i) { + extensionObject.setProperty(qtscript_com_trolltech_qt_custom_class_names[i], + qtscript_com_trolltech_qt_custom_class_functions[i](engine), + QScriptValue::SkipInEnumeration); + } +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscript_ColorPicker.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscript_ColorPicker.cpp new file mode 100644 index 00000000..23b9391a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscript_ColorPicker.cpp @@ -0,0 +1,196 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_ColorPicker.h" + +static const char * const qtscript_ColorPicker_function_names[] = { + "ColorPicker" + // static + // prototype + , "color" + , "setColor" + , "toString" +}; + +static const char * const qtscript_ColorPicker_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "" + , "QColor color" +"" +}; + +static const int qtscript_ColorPicker_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_ColorPicker_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("ColorPicker::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(ColorPicker*) +Q_DECLARE_METATYPE(QtScriptShell_ColorPicker*) +Q_DECLARE_METATYPE(QWidget*) + +// +// ColorPicker +// + +static QScriptValue qtscript_ColorPicker_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + ColorPicker* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("ColorPicker.%0(): this object is not a ColorPicker") + .arg(qtscript_ColorPicker_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QColor _q_result = _q_self->color(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setColor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: { + QString result = QString::fromLatin1("ColorPicker"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_ColorPicker_throw_ambiguity_error_helper(context, + qtscript_ColorPicker_function_names[_id+1], + qtscript_ColorPicker_function_signatures[_id+1]); +} + +static QScriptValue qtscript_ColorPicker_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("ColorPicker(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_ColorPicker* _q_cpp_result = new QtScriptShell_ColorPicker(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (ColorPicker*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_ColorPicker* _q_cpp_result = new QtScriptShell_ColorPicker(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (ColorPicker*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_ColorPicker_throw_ambiguity_error_helper(context, + qtscript_ColorPicker_function_names[_id], + qtscript_ColorPicker_function_signatures[_id]); +} + +static QScriptValue qtscript_ColorPicker_toScriptValue(QScriptEngine *engine, ColorPicker* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_ColorPicker_fromScriptValue(const QScriptValue &value, ColorPicker* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_ColorPicker_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((ColorPicker*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_ColorPicker_prototype_call, qtscript_ColorPicker_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_ColorPicker_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_ColorPicker_toScriptValue, + qtscript_ColorPicker_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_ColorPicker_static_call, proto, qtscript_ColorPicker_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscript_Slider.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscript_Slider.cpp new file mode 100644 index 00000000..b61069dd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscript_Slider.cpp @@ -0,0 +1,198 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_Slider.h" + +static const char * const qtscript_Slider_function_names[] = { + "Slider" + // static + // prototype + , "currentValue" + , "setCurrentValue" + , "toString" +}; + +static const char * const qtscript_Slider_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "" + , "int currentValue" +"" +}; + +static const int qtscript_Slider_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_Slider_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("Slider::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(Slider*) +Q_DECLARE_METATYPE(QtScriptShell_Slider*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QSlider*) + +// +// Slider +// + +static QScriptValue qtscript_Slider_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + Slider* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("Slider.%0(): this object is not a Slider") + .arg(qtscript_Slider_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->currentValue(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setCurrentValue(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: { + QString result = QString::fromLatin1("Slider"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_Slider_throw_ambiguity_error_helper(context, + qtscript_Slider_function_names[_id+1], + qtscript_Slider_function_signatures[_id+1]); +} + +static QScriptValue qtscript_Slider_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("Slider(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_Slider* _q_cpp_result = new QtScriptShell_Slider(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (Slider*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_Slider* _q_cpp_result = new QtScriptShell_Slider(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (Slider*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_Slider_throw_ambiguity_error_helper(context, + qtscript_Slider_function_names[_id], + qtscript_Slider_function_signatures[_id]); +} + +static QScriptValue qtscript_Slider_toScriptValue(QScriptEngine *engine, Slider* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_Slider_fromScriptValue(const QScriptValue &value, Slider* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_Slider_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((Slider*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_Slider_prototype_call, qtscript_Slider_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_Slider_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_Slider_toScriptValue, + qtscript_Slider_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_Slider_static_call, proto, qtscript_Slider_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscript_SliderBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscript_SliderBox.cpp new file mode 100644 index 00000000..9305cce2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscript_SliderBox.cpp @@ -0,0 +1,168 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_SliderBox.h" + +static const char * const qtscript_SliderBox_function_names[] = { + "SliderBox" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_SliderBox_function_signatures[] = { + "QWidget parent" + // static + // prototype +"" +}; + +static const int qtscript_SliderBox_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_SliderBox_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("SliderBox::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(SliderBox*) +Q_DECLARE_METATYPE(QtScriptShell_SliderBox*) +Q_DECLARE_METATYPE(QWidget*) + +// +// SliderBox +// + +static QScriptValue qtscript_SliderBox_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + SliderBox* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("SliderBox.%0(): this object is not a SliderBox") + .arg(qtscript_SliderBox_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("SliderBox"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_SliderBox_throw_ambiguity_error_helper(context, + qtscript_SliderBox_function_names[_id+1], + qtscript_SliderBox_function_signatures[_id+1]); +} + +static QScriptValue qtscript_SliderBox_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("SliderBox(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_SliderBox* _q_cpp_result = new QtScriptShell_SliderBox(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (SliderBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_SliderBox* _q_cpp_result = new QtScriptShell_SliderBox(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (SliderBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_SliderBox_throw_ambiguity_error_helper(context, + qtscript_SliderBox_function_names[_id], + qtscript_SliderBox_function_signatures[_id]); +} + +static QScriptValue qtscript_SliderBox_toScriptValue(QScriptEngine *engine, SliderBox* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_SliderBox_fromScriptValue(const QScriptValue &value, SliderBox* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_SliderBox_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((SliderBox*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_SliderBox_toScriptValue, + qtscript_SliderBox_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_SliderBox_static_call, proto, qtscript_SliderBox_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscript_StyledToolButton.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscript_StyledToolButton.cpp new file mode 100644 index 00000000..e1c4e9c1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscript_StyledToolButton.cpp @@ -0,0 +1,189 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_StyledToolButton.h" + +static const char * const qtscript_StyledToolButton_function_names[] = { + "StyledToolButton" + // static + // prototype + , "isHover" + , "toString" +}; + +static const char * const qtscript_StyledToolButton_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "" +"" +}; + +static const int qtscript_StyledToolButton_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 +}; + +static QScriptValue qtscript_StyledToolButton_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("StyledToolButton::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(StyledToolButton*) +Q_DECLARE_METATYPE(QtScriptShell_StyledToolButton*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QToolButton*) + +// +// StyledToolButton +// + +static QScriptValue qtscript_StyledToolButton_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + StyledToolButton* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("StyledToolButton.%0(): this object is not a StyledToolButton") + .arg(qtscript_StyledToolButton_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isHover(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("StyledToolButton"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_StyledToolButton_throw_ambiguity_error_helper(context, + qtscript_StyledToolButton_function_names[_id+1], + qtscript_StyledToolButton_function_signatures[_id+1]); +} + +static QScriptValue qtscript_StyledToolButton_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("StyledToolButton(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_StyledToolButton* _q_cpp_result = new QtScriptShell_StyledToolButton(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (StyledToolButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_StyledToolButton* _q_cpp_result = new QtScriptShell_StyledToolButton(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (StyledToolButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_StyledToolButton_throw_ambiguity_error_helper(context, + qtscript_StyledToolButton_function_names[_id], + qtscript_StyledToolButton_function_signatures[_id]); +} + +static QScriptValue qtscript_StyledToolButton_toScriptValue(QScriptEngine *engine, StyledToolButton* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_StyledToolButton_fromScriptValue(const QScriptValue &value, StyledToolButton* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_StyledToolButton_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((StyledToolButton*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_StyledToolButton_prototype_call, qtscript_StyledToolButton_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_StyledToolButton_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_StyledToolButton_toScriptValue, + qtscript_StyledToolButton_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_StyledToolButton_static_call, proto, qtscript_StyledToolButton_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_ColorPicker.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_ColorPicker.cpp new file mode 100644 index 00000000..685efe46 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_ColorPicker.cpp @@ -0,0 +1,667 @@ +#include "qtscriptshell_ColorPicker.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_ColorPicker::QtScriptShell_ColorPicker(QWidget* parent) + : ColorPicker(parent) {} + +QtScriptShell_ColorPicker::~QtScriptShell_ColorPicker() {} + +void QtScriptShell_ColorPicker::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + ColorPicker::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + ColorPicker::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_ColorPicker::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + ColorPicker::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + ColorPicker::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + ColorPicker::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + ColorPicker::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_ColorPicker::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return ColorPicker::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_ColorPicker::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + ColorPicker::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + ColorPicker::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + ColorPicker::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + ColorPicker::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + ColorPicker::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_ColorPicker::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return ColorPicker::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_ColorPicker::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return ColorPicker::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_ColorPicker::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + ColorPicker::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_ColorPicker::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return ColorPicker::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_ColorPicker::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + ColorPicker::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_ColorPicker::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return ColorPicker::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_ColorPicker::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return ColorPicker::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_ColorPicker::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + ColorPicker::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + ColorPicker::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_ColorPicker::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + ColorPicker::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_ColorPicker::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return ColorPicker::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_ColorPicker::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + ColorPicker::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + ColorPicker::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + ColorPicker::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_ColorPicker::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return ColorPicker::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_ColorPicker::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return ColorPicker::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_ColorPicker::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + ColorPicker::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + ColorPicker::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + ColorPicker::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + ColorPicker::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + ColorPicker::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_ColorPicker::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return ColorPicker::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_ColorPicker::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return ColorPicker::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_ColorPicker::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + ColorPicker::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_ColorPicker::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return ColorPicker::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_ColorPicker::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + ColorPicker::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_ColorPicker::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return ColorPicker::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_ColorPicker::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + ColorPicker::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_ColorPicker::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return ColorPicker::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_ColorPicker::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + ColorPicker::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + ColorPicker::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_ColorPicker::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + ColorPicker::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_ColorPicker.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_ColorPicker.h new file mode 100644 index 00000000..d07cd7f3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_ColorPicker.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_COLORPICKER_H +#define QTSCRIPTSHELL_COLORPICKER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_ColorPicker : public ColorPicker +{ +public: + QtScriptShell_ColorPicker(QWidget* parent = 0); + ~QtScriptShell_ColorPicker(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_COLORPICKER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_Slider.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_Slider.cpp new file mode 100644 index 00000000..f00d1726 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_Slider.cpp @@ -0,0 +1,646 @@ +#include "qtscriptshell_Slider.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_Slider::QtScriptShell_Slider(QWidget* parent) + : Slider(parent) {} + +QtScriptShell_Slider::~QtScriptShell_Slider() {} + +void QtScriptShell_Slider::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + Slider::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_Slider::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + Slider::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_Slider::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + Slider::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_Slider::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + Slider::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_Slider::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + Slider::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_Slider::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + Slider::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_Slider::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return Slider::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_Slider::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + Slider::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_Slider::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + Slider::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_Slider::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + Slider::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_Slider::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + Slider::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_Slider::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + Slider::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_Slider::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return Slider::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_Slider::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return Slider::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_Slider::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + Slider::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_Slider::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return Slider::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_Slider::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + Slider::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_Slider::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return Slider::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_Slider::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return Slider::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_Slider::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + Slider::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_Slider::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + Slider::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_Slider::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + Slider::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_Slider::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return Slider::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_Slider::keyPressEvent(QKeyEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + Slider::keyPressEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_Slider::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + Slider::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_Slider::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + Slider::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_Slider::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return Slider::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_Slider::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + Slider::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_Slider::mouseMoveEvent(QMouseEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + Slider::mouseMoveEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_Slider::mousePressEvent(QMouseEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + Slider::mousePressEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_Slider::mouseReleaseEvent(QMouseEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + Slider::mouseReleaseEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_Slider::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + Slider::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_Slider::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return Slider::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_Slider::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return Slider::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_Slider::paintEvent(QPaintEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + Slider::paintEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +QPaintDevice* QtScriptShell_Slider::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return Slider::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_Slider::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + Slider::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_Slider::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return Slider::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_Slider::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + Slider::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_Slider::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + Slider::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_Slider::timerEvent(QTimerEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + Slider::timerEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_Slider::wheelEvent(QWheelEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + Slider::wheelEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_Slider.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_Slider.h new file mode 100644 index 00000000..ef6c9208 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_Slider.h @@ -0,0 +1,61 @@ +#ifndef QTSCRIPTSHELL_SLIDER_H +#define QTSCRIPTSHELL_SLIDER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_Slider : public Slider +{ +public: + QtScriptShell_Slider(QWidget* parent = 0); + ~QtScriptShell_Slider(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* e); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* ev); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* ev); + void mousePressEvent(QMouseEvent* ev); + void mouseReleaseEvent(QMouseEvent* ev); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* ev); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* arg__1); + void wheelEvent(QWheelEvent* e); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_SLIDER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_SliderBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_SliderBox.cpp new file mode 100644 index 00000000..c7c6d221 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_SliderBox.cpp @@ -0,0 +1,666 @@ +#include "qtscriptshell_SliderBox.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_SliderBox::QtScriptShell_SliderBox(QWidget* parent) + : SliderBox(parent) {} + +QtScriptShell_SliderBox::~QtScriptShell_SliderBox() {} + +void QtScriptShell_SliderBox::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + SliderBox::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + SliderBox::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_SliderBox::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + SliderBox::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + SliderBox::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + SliderBox::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + SliderBox::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_SliderBox::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return SliderBox::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_SliderBox::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + SliderBox::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + SliderBox::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + SliderBox::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + SliderBox::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + SliderBox::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_SliderBox::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return SliderBox::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_SliderBox::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return SliderBox::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_SliderBox::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + SliderBox::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_SliderBox::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return SliderBox::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_SliderBox::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + SliderBox::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_SliderBox::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return SliderBox::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_SliderBox::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return SliderBox::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_SliderBox::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + SliderBox::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + SliderBox::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_SliderBox::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + SliderBox::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_SliderBox::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return SliderBox::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_SliderBox::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + SliderBox::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + SliderBox::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + SliderBox::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_SliderBox::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return SliderBox::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_SliderBox::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return SliderBox::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_SliderBox::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + SliderBox::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + SliderBox::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + SliderBox::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + SliderBox::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + SliderBox::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_SliderBox::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return SliderBox::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_SliderBox::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return SliderBox::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_SliderBox::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + SliderBox::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_SliderBox::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return SliderBox::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_SliderBox::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + SliderBox::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_SliderBox::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return SliderBox::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_SliderBox::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + SliderBox::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_SliderBox::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return SliderBox::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_SliderBox::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + SliderBox::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + SliderBox::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_SliderBox::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + SliderBox::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_SliderBox.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_SliderBox.h new file mode 100644 index 00000000..64e22e91 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_SliderBox.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_SLIDERBOX_H +#define QTSCRIPTSHELL_SLIDERBOX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_SliderBox : public SliderBox +{ +public: + QtScriptShell_SliderBox(QWidget* parent = 0); + ~QtScriptShell_SliderBox(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_SLIDERBOX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_StyledToolButton.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_StyledToolButton.cpp new file mode 100644 index 00000000..d0347f34 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_StyledToolButton.cpp @@ -0,0 +1,669 @@ +#include "qtscriptshell_StyledToolButton.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_StyledToolButton::QtScriptShell_StyledToolButton(QWidget* parent) + : StyledToolButton(parent) {} + +QtScriptShell_StyledToolButton::~QtScriptShell_StyledToolButton() {} + +void QtScriptShell_StyledToolButton::actionEvent(QActionEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::actionEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_StyledToolButton::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_StyledToolButton::checkStateSet() +{ + QScriptValue _q_function = __qtscript_self.property("checkStateSet"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("checkStateSet") & QScriptValue::QObjectMember)) { + StyledToolButton::checkStateSet(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_StyledToolButton::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_StyledToolButton::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_StyledToolButton::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_StyledToolButton::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_StyledToolButton::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return StyledToolButton::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_StyledToolButton::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_StyledToolButton::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_StyledToolButton::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_StyledToolButton::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_StyledToolButton::enterEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::enterEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +bool QtScriptShell_StyledToolButton::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return StyledToolButton::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_StyledToolButton::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return StyledToolButton::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_StyledToolButton::focusInEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::focusInEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_StyledToolButton::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return StyledToolButton::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_StyledToolButton::focusOutEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::focusOutEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_StyledToolButton::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return StyledToolButton::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_StyledToolButton::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return StyledToolButton::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_StyledToolButton::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_StyledToolButton::hitButton(const QPoint& pos) const +{ + QScriptValue _q_function = __qtscript_self.property("hitButton"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hitButton") & QScriptValue::QObjectMember)) { + return StyledToolButton::hitButton(pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pos))); + } +} + +void QtScriptShell_StyledToolButton::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + StyledToolButton::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_StyledToolButton::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_StyledToolButton::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return StyledToolButton::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_StyledToolButton::keyPressEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::keyPressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_StyledToolButton::keyReleaseEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::keyReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_StyledToolButton::leaveEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::leaveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +int QtScriptShell_StyledToolButton::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return StyledToolButton::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_StyledToolButton::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_StyledToolButton::mouseMoveEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::mouseMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_StyledToolButton::mousePressEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::mousePressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_StyledToolButton::mouseReleaseEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::mouseReleaseEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_StyledToolButton::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_StyledToolButton::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return StyledToolButton::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +void QtScriptShell_StyledToolButton::nextCheckState() +{ + QScriptValue _q_function = __qtscript_self.property("nextCheckState"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nextCheckState") & QScriptValue::QObjectMember)) { + StyledToolButton::nextCheckState(); + } else { + _q_function.call(__qtscript_self); + } +} + +QPaintEngine* QtScriptShell_StyledToolButton::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return StyledToolButton::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QPaintDevice* QtScriptShell_StyledToolButton::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return StyledToolButton::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_StyledToolButton::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_StyledToolButton::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return StyledToolButton::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_StyledToolButton::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_StyledToolButton::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_StyledToolButton::timerEvent(QTimerEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::timerEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_StyledToolButton::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + StyledToolButton::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_StyledToolButton.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_StyledToolButton.h new file mode 100644 index 00000000..cfb6afbf --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_custom/qtscriptshell_StyledToolButton.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_STYLEDTOOLBUTTON_H +#define QTSCRIPTSHELL_STYLEDTOOLBUTTON_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_StyledToolButton : public StyledToolButton +{ +public: + QtScriptShell_StyledToolButton(QWidget* parent = 0); + ~QtScriptShell_StyledToolButton(); + + void actionEvent(QActionEvent* arg__1); + void changeEvent(QEvent* arg__1); + void checkStateSet(); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* arg__1); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* e); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* e); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + bool hitButton(const QPoint& pos) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* e); + void keyReleaseEvent(QKeyEvent* e); + void leaveEvent(QEvent* arg__1); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* e); + void mousePressEvent(QMouseEvent* arg__1); + void mouseReleaseEvent(QMouseEvent* arg__1); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + void nextCheckState(); + QPaintEngine* paintEngine() const; + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* arg__1); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_STYLEDTOOLBUTTON_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/com_trolltech_qt_gui.pri b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/com_trolltech_qt_gui.pri new file mode 100644 index 00000000..c20d96e4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/com_trolltech_qt_gui.pri @@ -0,0 +1,209 @@ +HEADERS += \ + $$PWD/qtscriptshell_QBitmap.h \ + $$PWD/qtscriptshell_QContextMenuEvent.h \ + $$PWD/qtscriptshell_QDesktopServices.h \ + $$PWD/qtscriptshell_QDoubleValidator.h \ + $$PWD/qtscriptshell_QDrag.h \ + $$PWD/qtscriptshell_QDragMoveEvent.h \ + $$PWD/qtscriptshell_QDropEvent.h \ + $$PWD/qtscriptshell_QGuiApplication.h \ + $$PWD/qtscriptshell_QHoverEvent.h \ + $$PWD/qtscriptshell_QImage.h \ + $$PWD/qtscriptshell_QImageIOHandler.h \ + $$PWD/qtscriptshell_QImageIOPlugin.h \ + $$PWD/qtscriptshell_QInputEvent.h \ + $$PWD/qtscriptshell_QIntValidator.h \ + $$PWD/qtscriptshell_QKeyEvent.h \ + $$PWD/qtscriptshell_QMatrix3x3.h \ + $$PWD/qtscriptshell_QMouseEvent.h \ + $$PWD/qtscriptshell_QMoveEvent.h \ + $$PWD/qtscriptshell_QMovie.h \ + $$PWD/qtscriptshell_QPaintEngine.h \ + $$PWD/qtscriptshell_QPaintEngineState.h \ + $$PWD/qtscriptshell_QPaintEvent.h \ + $$PWD/qtscriptshell_QPicture.h \ + $$PWD/qtscriptshell_QPixmap.h \ + $$PWD/qtscriptshell_QPixmapCache.h \ + $$PWD/qtscriptshell_QRegExpValidator.h \ + $$PWD/qtscriptshell_QResizeEvent.h \ + $$PWD/qtscriptshell_QShortcutEvent.h \ + $$PWD/qtscriptshell_QSyntaxHighlighter.h \ + $$PWD/qtscriptshell_QTabletEvent.h \ + $$PWD/qtscriptshell_QTextBlockFormat.h \ + $$PWD/qtscriptshell_QTextBlockGroup.h \ + $$PWD/qtscriptshell_QTextBlockUserData.h \ + $$PWD/qtscriptshell_QTextCharFormat.h \ + $$PWD/qtscriptshell_QTextDocument.h \ + $$PWD/qtscriptshell_QTextFrame.h \ + $$PWD/qtscriptshell_QTextFrameFormat.h \ + $$PWD/qtscriptshell_QTextImageFormat.h \ + $$PWD/qtscriptshell_QTextItem.h \ + $$PWD/qtscriptshell_QTextList.h \ + $$PWD/qtscriptshell_QTextListFormat.h \ + $$PWD/qtscriptshell_QTextObject.h \ + $$PWD/qtscriptshell_QTextTable.h \ + $$PWD/qtscriptshell_QTextTableCellFormat.h \ + $$PWD/qtscriptshell_QTextTableFormat.h \ + $$PWD/qtscriptshell_QTileRules.h \ + $$PWD/qtscriptshell_QValidator.h \ + $$PWD/qtscriptshell_QWheelEvent.h \ + +SOURCES += \ + $$PWD/qtscript_QActionEvent.cpp \ + $$PWD/qtscript_QBitmap.cpp \ + $$PWD/qtscript_QBrush.cpp \ + $$PWD/qtscript_QClipboard.cpp \ + $$PWD/qtscript_QCloseEvent.cpp \ + $$PWD/qtscript_QColor.cpp \ + $$PWD/qtscript_QConicalGradient.cpp \ + $$PWD/qtscript_QContextMenuEvent.cpp \ + $$PWD/qtscript_QCursor.cpp \ + $$PWD/qtscript_QDesktopServices.cpp \ + $$PWD/qtscript_QDoubleValidator.cpp \ + $$PWD/qtscript_QDrag.cpp \ + $$PWD/qtscript_QDragEnterEvent.cpp \ + $$PWD/qtscript_QDragLeaveEvent.cpp \ + $$PWD/qtscript_QDragMoveEvent.cpp \ + $$PWD/qtscript_QDropEvent.cpp \ + $$PWD/qtscript_QFileOpenEvent.cpp \ + $$PWD/qtscript_QFocusEvent.cpp \ + $$PWD/qtscript_QFont.cpp \ + $$PWD/qtscript_QFontInfo.cpp \ + $$PWD/qtscript_QFontMetrics.cpp \ + $$PWD/qtscript_QFontMetricsF.cpp \ + $$PWD/qtscript_QGradient.cpp \ + $$PWD/qtscript_QGuiApplication.cpp \ + $$PWD/qtscript_QHelpEvent.cpp \ + $$PWD/qtscript_QHideEvent.cpp \ + $$PWD/qtscript_QHoverEvent.cpp \ + $$PWD/qtscript_QIcon.cpp \ + $$PWD/qtscript_QIconDragEvent.cpp \ + $$PWD/qtscript_QImage.cpp \ + $$PWD/qtscript_QImageIOHandler.cpp \ + $$PWD/qtscript_QImageIOPlugin.cpp \ + $$PWD/qtscript_QImageReader.cpp \ + $$PWD/qtscript_QImageWriter.cpp \ + $$PWD/qtscript_QInputEvent.cpp \ + $$PWD/qtscript_QIntValidator.cpp \ + $$PWD/qtscript_QKeyEvent.cpp \ + $$PWD/qtscript_QKeySequence.cpp \ + $$PWD/qtscript_QLine.cpp \ + $$PWD/qtscript_QLineF.cpp \ + $$PWD/qtscript_QLinearGradient.cpp \ + $$PWD/qtscript_QMatrix.cpp \ + $$PWD/qtscript_QMatrix3x3.cpp \ + $$PWD/qtscript_QMatrix4x4.cpp \ + $$PWD/qtscript_QMouseEvent.cpp \ + $$PWD/qtscript_QMoveEvent.cpp \ + $$PWD/qtscript_QMovie.cpp \ + $$PWD/qtscript_QPaintEngine.cpp \ + $$PWD/qtscript_QPaintEngineState.cpp \ + $$PWD/qtscript_QPaintEvent.cpp \ + $$PWD/qtscript_QPainter.cpp \ + $$PWD/qtscript_QPainterPath.cpp \ + $$PWD/qtscript_QPainterPathStroker.cpp \ + $$PWD/qtscript_QPalette.cpp \ + $$PWD/qtscript_QPen.cpp \ + $$PWD/qtscript_QPicture.cpp \ + $$PWD/qtscript_QPictureIO.cpp \ + $$PWD/qtscript_QPixmap.cpp \ + $$PWD/qtscript_QPixmapCache.cpp \ + $$PWD/qtscript_QPixmapCache_Key.cpp \ + $$PWD/qtscript_QPolygon.cpp \ + $$PWD/qtscript_QPolygonF.cpp \ + $$PWD/qtscript_QQuaternion.cpp \ + $$PWD/qtscript_QRadialGradient.cpp \ + $$PWD/qtscript_QRegExpValidator.cpp \ + $$PWD/qtscript_QRegion.cpp \ + $$PWD/qtscript_QResizeEvent.cpp \ + $$PWD/qtscript_QShortcutEvent.cpp \ + $$PWD/qtscript_QShowEvent.cpp \ + $$PWD/qtscript_QStatusTipEvent.cpp \ + $$PWD/qtscript_QSyntaxHighlighter.cpp \ + $$PWD/qtscript_QTabletEvent.cpp \ + $$PWD/qtscript_QTextBlock.cpp \ + $$PWD/qtscript_QTextBlockFormat.cpp \ + $$PWD/qtscript_QTextBlockGroup.cpp \ + $$PWD/qtscript_QTextBlockUserData.cpp \ + $$PWD/qtscript_QTextCharFormat.cpp \ + $$PWD/qtscript_QTextCursor.cpp \ + $$PWD/qtscript_QTextDocument.cpp \ + $$PWD/qtscript_QTextDocumentFragment.cpp \ + $$PWD/qtscript_QTextDocumentWriter.cpp \ + $$PWD/qtscript_QTextFormat.cpp \ + $$PWD/qtscript_QTextFragment.cpp \ + $$PWD/qtscript_QTextFrame.cpp \ + $$PWD/qtscript_QTextFrameFormat.cpp \ + $$PWD/qtscript_QTextImageFormat.cpp \ + $$PWD/qtscript_QTextInlineObject.cpp \ + $$PWD/qtscript_QTextItem.cpp \ + $$PWD/qtscript_QTextLayout.cpp \ + $$PWD/qtscript_QTextLength.cpp \ + $$PWD/qtscript_QTextLine.cpp \ + $$PWD/qtscript_QTextList.cpp \ + $$PWD/qtscript_QTextListFormat.cpp \ + $$PWD/qtscript_QTextObject.cpp \ + $$PWD/qtscript_QTextTable.cpp \ + $$PWD/qtscript_QTextTableCell.cpp \ + $$PWD/qtscript_QTextTableCellFormat.cpp \ + $$PWD/qtscript_QTextTableFormat.cpp \ + $$PWD/qtscript_QTileRules.cpp \ + $$PWD/qtscript_QToolBarChangeEvent.cpp \ + $$PWD/qtscript_QTouchEvent_TouchPoint.cpp \ + $$PWD/qtscript_QTransform.cpp \ + $$PWD/qtscript_QValidator.cpp \ + $$PWD/qtscript_QVector2D.cpp \ + $$PWD/qtscript_QVector3D.cpp \ + $$PWD/qtscript_QVector4D.cpp \ + $$PWD/qtscript_QWhatsThisClickedEvent.cpp \ + $$PWD/qtscript_QWheelEvent.cpp \ + $$PWD/qtscript_QWindowStateChangeEvent.cpp \ + $$PWD/qtscriptshell_QBitmap.cpp \ + $$PWD/qtscriptshell_QContextMenuEvent.cpp \ + $$PWD/qtscriptshell_QDesktopServices.cpp \ + $$PWD/qtscriptshell_QDoubleValidator.cpp \ + $$PWD/qtscriptshell_QDrag.cpp \ + $$PWD/qtscriptshell_QDragMoveEvent.cpp \ + $$PWD/qtscriptshell_QDropEvent.cpp \ + $$PWD/qtscriptshell_QGuiApplication.cpp \ + $$PWD/qtscriptshell_QHoverEvent.cpp \ + $$PWD/qtscriptshell_QImage.cpp \ + $$PWD/qtscriptshell_QImageIOHandler.cpp \ + $$PWD/qtscriptshell_QImageIOPlugin.cpp \ + $$PWD/qtscriptshell_QInputEvent.cpp \ + $$PWD/qtscriptshell_QIntValidator.cpp \ + $$PWD/qtscriptshell_QKeyEvent.cpp \ + $$PWD/qtscriptshell_QMatrix3x3.cpp \ + $$PWD/qtscriptshell_QMouseEvent.cpp \ + $$PWD/qtscriptshell_QMoveEvent.cpp \ + $$PWD/qtscriptshell_QMovie.cpp \ + $$PWD/qtscriptshell_QPaintEngine.cpp \ + $$PWD/qtscriptshell_QPaintEngineState.cpp \ + $$PWD/qtscriptshell_QPaintEvent.cpp \ + $$PWD/qtscriptshell_QPicture.cpp \ + $$PWD/qtscriptshell_QPixmap.cpp \ + $$PWD/qtscriptshell_QPixmapCache.cpp \ + $$PWD/qtscriptshell_QRegExpValidator.cpp \ + $$PWD/qtscriptshell_QResizeEvent.cpp \ + $$PWD/qtscriptshell_QShortcutEvent.cpp \ + $$PWD/qtscriptshell_QSyntaxHighlighter.cpp \ + $$PWD/qtscriptshell_QTabletEvent.cpp \ + $$PWD/qtscriptshell_QTextBlockFormat.cpp \ + $$PWD/qtscriptshell_QTextBlockGroup.cpp \ + $$PWD/qtscriptshell_QTextBlockUserData.cpp \ + $$PWD/qtscriptshell_QTextCharFormat.cpp \ + $$PWD/qtscriptshell_QTextDocument.cpp \ + $$PWD/qtscriptshell_QTextFrame.cpp \ + $$PWD/qtscriptshell_QTextFrameFormat.cpp \ + $$PWD/qtscriptshell_QTextImageFormat.cpp \ + $$PWD/qtscriptshell_QTextItem.cpp \ + $$PWD/qtscriptshell_QTextList.cpp \ + $$PWD/qtscriptshell_QTextListFormat.cpp \ + $$PWD/qtscriptshell_QTextObject.cpp \ + $$PWD/qtscriptshell_QTextTable.cpp \ + $$PWD/qtscriptshell_QTextTableCellFormat.cpp \ + $$PWD/qtscriptshell_QTextTableFormat.cpp \ + $$PWD/qtscriptshell_QTileRules.cpp \ + $$PWD/qtscriptshell_QValidator.cpp \ + $$PWD/qtscriptshell_QWheelEvent.cpp \ + $$PWD/com_trolltech_qt_gui_init.cpp diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/com_trolltech_qt_gui_init.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/com_trolltech_qt_gui_init.cpp new file mode 100644 index 00000000..2db16ac6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/com_trolltech_qt_gui_init.cpp @@ -0,0 +1,347 @@ +#include +#include + +QScriptValue qtscript_create_QGradient_class(QScriptEngine *engine); +QScriptValue qtscript_create_QImageWriter_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTouchEvent_TouchPoint_class(QScriptEngine *engine); +QScriptValue qtscript_create_QVector4D_class(QScriptEngine *engine); +QScriptValue qtscript_create_QVector3D_class(QScriptEngine *engine); +QScriptValue qtscript_create_QMatrix_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPainterPathStroker_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPixmapCache_Key_class(QScriptEngine *engine); +QScriptValue qtscript_create_QLineF_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFontMetrics_class(QScriptEngine *engine); +QScriptValue qtscript_create_QRegion_class(QScriptEngine *engine); +QScriptValue qtscript_create_QImageReader_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPaintEngine_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDesktopServices_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextDocumentFragment_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPolygonF_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFontInfo_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextLength_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPalette_class(QScriptEngine *engine); +QScriptValue qtscript_create_QMatrix4x4_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextBlock_class(QScriptEngine *engine); +QScriptValue qtscript_create_QBrush_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextFragment_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPolygon_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTransform_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextCursor_class(QScriptEngine *engine); +QScriptValue qtscript_create_QKeySequence_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPaintEngineState_class(QScriptEngine *engine); +QScriptValue qtscript_create_QCursor_class(QScriptEngine *engine); +QScriptValue qtscript_create_QMatrix3x3_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextLayout_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPixmapCache_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextLine_class(QScriptEngine *engine); +QScriptValue qtscript_create_QQuaternion_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextFormat_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextBlockUserData_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextInlineObject_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFont_class(QScriptEngine *engine); +QScriptValue qtscript_create_QIcon_class(QScriptEngine *engine); +QScriptValue qtscript_create_QImageIOHandler_class(QScriptEngine *engine); +QScriptValue qtscript_create_QLine_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPen_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPictureIO_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextDocumentWriter_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFontMetricsF_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPainter_class(QScriptEngine *engine); +QScriptValue qtscript_create_QVector2D_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextTableCell_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTileRules_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPainterPath_class(QScriptEngine *engine); +QScriptValue qtscript_create_QColor_class(QScriptEngine *engine); +QScriptValue qtscript_create_QInputEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPixmap_class(QScriptEngine *engine); +QScriptValue qtscript_create_QImage_class(QScriptEngine *engine); +QScriptValue qtscript_create_QWhatsThisClickedEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QMovie_class(QScriptEngine *engine); +QScriptValue qtscript_create_QHelpEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextListFormat_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStatusTipEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QValidator_class(QScriptEngine *engine); +QScriptValue qtscript_create_QConicalGradient_class(QScriptEngine *engine); +QScriptValue qtscript_create_QToolBarChangeEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextFrameFormat_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFileOpenEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSyntaxHighlighter_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextDocument_class(QScriptEngine *engine); +QScriptValue qtscript_create_QLinearGradient_class(QScriptEngine *engine); +QScriptValue qtscript_create_QIconDragEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QResizeEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextObject_class(QScriptEngine *engine); +QScriptValue qtscript_create_QShowEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFocusEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDropEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QClipboard_class(QScriptEngine *engine); +QScriptValue qtscript_create_QCloseEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QImageIOPlugin_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextBlockFormat_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDrag_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPicture_class(QScriptEngine *engine); +QScriptValue qtscript_create_QRadialGradient_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextCharFormat_class(QScriptEngine *engine); +QScriptValue qtscript_create_QActionEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDragLeaveEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QWindowStateChangeEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QShortcutEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QHideEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QMoveEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPaintEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QContextMenuEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QBitmap_class(QScriptEngine *engine); +QScriptValue qtscript_create_QHoverEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTabletEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QIntValidator_class(QScriptEngine *engine); +QScriptValue qtscript_create_QKeyEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextTableCellFormat_class(QScriptEngine *engine); +QScriptValue qtscript_create_QMouseEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextFrame_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextTableFormat_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDragMoveEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QWheelEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDoubleValidator_class(QScriptEngine *engine); +QScriptValue qtscript_create_QRegExpValidator_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextBlockGroup_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGuiApplication_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextImageFormat_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextTable_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDragEnterEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextList_class(QScriptEngine *engine); + +static const char * const qtscript_com_trolltech_qt_gui_class_names[] = { + "QGradient" + , "QImageWriter" + , "QTouchEvent_TouchPoint" + , "QVector4D" + , "QVector3D" + , "QMatrix" + , "QPainterPathStroker" + , "QPixmapCache_Key" + , "QLineF" + , "QFontMetrics" + , "QRegion" + , "QImageReader" + , "QPaintEngine" + , "QDesktopServices" + , "QTextDocumentFragment" + , "QTextItem" + , "QPolygonF" + , "QFontInfo" + , "QTextLength" + , "QPalette" + , "QMatrix4x4" + , "QTextBlock" + , "QBrush" + , "QTextFragment" + , "QPolygon" + , "QTransform" + , "QTextCursor" + , "QKeySequence" + , "QPaintEngineState" + , "QCursor" + , "QMatrix3x3" + , "QTextLayout" + , "QPixmapCache" + , "QTextLine" + , "QQuaternion" + , "QTextFormat" + , "QTextBlockUserData" + , "QTextInlineObject" + , "QFont" + , "QIcon" + , "QImageIOHandler" + , "QLine" + , "QPen" + , "QPictureIO" + , "QTextDocumentWriter" + , "QFontMetricsF" + , "QPainter" + , "QVector2D" + , "QTextTableCell" + , "QTileRules" + , "QPainterPath" + , "QColor" + , "QInputEvent" + , "QPixmap" + , "QImage" + , "QWhatsThisClickedEvent" + , "QMovie" + , "QHelpEvent" + , "QTextListFormat" + , "QStatusTipEvent" + , "QValidator" + , "QConicalGradient" + , "QToolBarChangeEvent" + , "QTextFrameFormat" + , "QFileOpenEvent" + , "QSyntaxHighlighter" + , "QTextDocument" + , "QLinearGradient" + , "QIconDragEvent" + , "QResizeEvent" + , "QTextObject" + , "QShowEvent" + , "QFocusEvent" + , "QDropEvent" + , "QClipboard" + , "QCloseEvent" + , "QImageIOPlugin" + , "QTextBlockFormat" + , "QDrag" + , "QPicture" + , "QRadialGradient" + , "QTextCharFormat" + , "QActionEvent" + , "QDragLeaveEvent" + , "QWindowStateChangeEvent" + , "QShortcutEvent" + , "QHideEvent" + , "QMoveEvent" + , "QPaintEvent" + , "QContextMenuEvent" + , "QBitmap" + , "QHoverEvent" + , "QTabletEvent" + , "QIntValidator" + , "QKeyEvent" + , "QTextTableCellFormat" + , "QMouseEvent" + , "QTextFrame" + , "QTextTableFormat" + , "QDragMoveEvent" + , "QWheelEvent" + , "QDoubleValidator" + , "QRegExpValidator" + , "QTextBlockGroup" + , "QGuiApplication" + , "QTextImageFormat" + , "QTextTable" + , "QDragEnterEvent" + , "QTextList" +}; + +typedef QScriptValue (*QtBindingCreator)(QScriptEngine *engine); +static const QtBindingCreator qtscript_com_trolltech_qt_gui_class_functions[] = { + qtscript_create_QGradient_class + , qtscript_create_QImageWriter_class + , qtscript_create_QTouchEvent_TouchPoint_class + , qtscript_create_QVector4D_class + , qtscript_create_QVector3D_class + , qtscript_create_QMatrix_class + , qtscript_create_QPainterPathStroker_class + , qtscript_create_QPixmapCache_Key_class + , qtscript_create_QLineF_class + , qtscript_create_QFontMetrics_class + , qtscript_create_QRegion_class + , qtscript_create_QImageReader_class + , qtscript_create_QPaintEngine_class + , qtscript_create_QDesktopServices_class + , qtscript_create_QTextDocumentFragment_class + , qtscript_create_QTextItem_class + , qtscript_create_QPolygonF_class + , qtscript_create_QFontInfo_class + , qtscript_create_QTextLength_class + , qtscript_create_QPalette_class + , qtscript_create_QMatrix4x4_class + , qtscript_create_QTextBlock_class + , qtscript_create_QBrush_class + , qtscript_create_QTextFragment_class + , qtscript_create_QPolygon_class + , qtscript_create_QTransform_class + , qtscript_create_QTextCursor_class + , qtscript_create_QKeySequence_class + , qtscript_create_QPaintEngineState_class + , qtscript_create_QCursor_class + , qtscript_create_QMatrix3x3_class + , qtscript_create_QTextLayout_class + , qtscript_create_QPixmapCache_class + , qtscript_create_QTextLine_class + , qtscript_create_QQuaternion_class + , qtscript_create_QTextFormat_class + , qtscript_create_QTextBlockUserData_class + , qtscript_create_QTextInlineObject_class + , qtscript_create_QFont_class + , qtscript_create_QIcon_class + , qtscript_create_QImageIOHandler_class + , qtscript_create_QLine_class + , qtscript_create_QPen_class + , qtscript_create_QPictureIO_class + , qtscript_create_QTextDocumentWriter_class + , qtscript_create_QFontMetricsF_class + , qtscript_create_QPainter_class + , qtscript_create_QVector2D_class + , qtscript_create_QTextTableCell_class + , qtscript_create_QTileRules_class + , qtscript_create_QPainterPath_class + , qtscript_create_QColor_class + , qtscript_create_QInputEvent_class + , qtscript_create_QPixmap_class + , qtscript_create_QImage_class + , qtscript_create_QWhatsThisClickedEvent_class + , qtscript_create_QMovie_class + , qtscript_create_QHelpEvent_class + , qtscript_create_QTextListFormat_class + , qtscript_create_QStatusTipEvent_class + , qtscript_create_QValidator_class + , qtscript_create_QConicalGradient_class + , qtscript_create_QToolBarChangeEvent_class + , qtscript_create_QTextFrameFormat_class + , qtscript_create_QFileOpenEvent_class + , qtscript_create_QSyntaxHighlighter_class + , qtscript_create_QTextDocument_class + , qtscript_create_QLinearGradient_class + , qtscript_create_QIconDragEvent_class + , qtscript_create_QResizeEvent_class + , qtscript_create_QTextObject_class + , qtscript_create_QShowEvent_class + , qtscript_create_QFocusEvent_class + , qtscript_create_QDropEvent_class + , qtscript_create_QClipboard_class + , qtscript_create_QCloseEvent_class + , qtscript_create_QImageIOPlugin_class + , qtscript_create_QTextBlockFormat_class + , qtscript_create_QDrag_class + , qtscript_create_QPicture_class + , qtscript_create_QRadialGradient_class + , qtscript_create_QTextCharFormat_class + , qtscript_create_QActionEvent_class + , qtscript_create_QDragLeaveEvent_class + , qtscript_create_QWindowStateChangeEvent_class + , qtscript_create_QShortcutEvent_class + , qtscript_create_QHideEvent_class + , qtscript_create_QMoveEvent_class + , qtscript_create_QPaintEvent_class + , qtscript_create_QContextMenuEvent_class + , qtscript_create_QBitmap_class + , qtscript_create_QHoverEvent_class + , qtscript_create_QTabletEvent_class + , qtscript_create_QIntValidator_class + , qtscript_create_QKeyEvent_class + , qtscript_create_QTextTableCellFormat_class + , qtscript_create_QMouseEvent_class + , qtscript_create_QTextFrame_class + , qtscript_create_QTextTableFormat_class + , qtscript_create_QDragMoveEvent_class + , qtscript_create_QWheelEvent_class + , qtscript_create_QDoubleValidator_class + , qtscript_create_QRegExpValidator_class + , qtscript_create_QTextBlockGroup_class + , qtscript_create_QGuiApplication_class + , qtscript_create_QTextImageFormat_class + , qtscript_create_QTextTable_class + , qtscript_create_QDragEnterEvent_class + , qtscript_create_QTextList_class +}; + +void qtscript_initialize_com_trolltech_qt_gui_bindings(QScriptValue &extensionObject) +{ + QScriptEngine *engine = extensionObject.engine(); + for (int i = 0; i < 109; ++i) { + extensionObject.setProperty(qtscript_com_trolltech_qt_gui_class_names[i], + qtscript_com_trolltech_qt_gui_class_functions[i](engine), + QScriptValue::SkipInEnumeration); + } +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QActionEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QActionEvent.cpp new file mode 100644 index 00000000..994fa692 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QActionEvent.cpp @@ -0,0 +1,161 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QActionEvent_function_names[] = { + "QActionEvent" + // static + // prototype + , "action" + , "before" + , "toString" +}; + +static const char * const qtscript_QActionEvent_function_signatures[] = { + "int type, QAction action, QAction before" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QActionEvent_function_lengths[] = { + 3 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QActionEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QActionEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QAction*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QActionEvent +// + +static QScriptValue qtscript_QActionEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QActionEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QActionEvent.%0(): this object is not a QActionEvent") + .arg(qtscript_QActionEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QAction* _q_result = _q_self->action(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QAction* _q_result = _q_self->before(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QActionEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QActionEvent_throw_ambiguity_error_helper(context, + qtscript_QActionEvent_function_names[_id+1], + qtscript_QActionEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QActionEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QActionEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QAction* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QActionEvent* _q_cpp_result = new QActionEvent(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + QAction* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QAction* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QActionEvent* _q_cpp_result = new QActionEvent(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QActionEvent_throw_ambiguity_error_helper(context, + qtscript_QActionEvent_function_names[_id], + qtscript_QActionEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QActionEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QActionEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QActionEvent_prototype_call, qtscript_QActionEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QActionEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QActionEvent_static_call, proto, qtscript_QActionEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QBitmap.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QBitmap.cpp new file mode 100644 index 00000000..9e6b9d3d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QBitmap.cpp @@ -0,0 +1,227 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QBitmap.h" + +static const char * const qtscript_QBitmap_function_names[] = { + "QBitmap" + // static + // prototype + , "clear" + , "swap" + , "transformed" + , "toString" +}; + +static const char * const qtscript_QBitmap_function_signatures[] = { + "\nQPixmap arg__1\nQSize arg__1\nString fileName, char format\nint w, int h" + // static + // prototype + , "" + , "QBitmap other" + , "QMatrix arg__1\nQTransform matrix" +"" +}; + +static const int qtscript_QBitmap_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QBitmap_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QBitmap::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QBitmap*) +Q_DECLARE_METATYPE(QtScriptShell_QBitmap) +Q_DECLARE_METATYPE(QtScriptShell_QBitmap*) +Q_DECLARE_METATYPE(QPixmap*) + +// +// QBitmap +// + +static QScriptValue qtscript_QBitmap_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QBitmap* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QBitmap.%0(): this object is not a QBitmap") + .arg(qtscript_QBitmap_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QBitmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBitmap _q_result = _q_self->transformed(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBitmap _q_result = _q_self->transformed(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 3: { + QString result = QString::fromLatin1("QBitmap"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QBitmap_throw_ambiguity_error_helper(context, + qtscript_QBitmap_function_names[_id+1], + qtscript_QBitmap_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QBitmap_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QBitmap(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QBitmap _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QBitmap)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QBitmap _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QBitmap)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QBitmap _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QBitmap)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + QtScriptShell_QBitmap _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QBitmap)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QBitmap _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QBitmap)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QBitmap_throw_ambiguity_error_helper(context, + qtscript_QBitmap_function_names[_id], + qtscript_QBitmap_function_signatures[_id]); +} + +QScriptValue qtscript_create_QBitmap_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QBitmap*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QBitmap_prototype_call, qtscript_QBitmap_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QBitmap_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QBitmap_static_call, proto, qtscript_QBitmap_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QBrush.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QBrush.cpp new file mode 100644 index 00000000..c65285cf --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QBrush.cpp @@ -0,0 +1,371 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QBrush_function_names[] = { + "QBrush" + // static + // prototype + , "color" + , "gradient" + , "isOpaque" + , "matrix" + , "equals" + , "setColor" + , "setMatrix" + , "setStyle" + , "setTexture" + , "setTextureImage" + , "setTransform" + , "style" + , "swap" + , "texture" + , "textureImage" + , "transform" + , "toString" +}; + +static const char * const qtscript_QBrush_function_signatures[] = { + "\nBrushStyle bs\nGlobalColor color, QPixmap pixmap\nQBrush brush\nQColor color, BrushStyle bs\nQColor color, QPixmap pixmap\nQGradient gradient\nQImage image\nQPixmap pixmap" + // static + // prototype + , "" + , "" + , "" + , "" + , "QBrush b" + , "GlobalColor color\nQColor color" + , "QMatrix mat" + , "BrushStyle arg__1" + , "QPixmap pixmap" + , "QImage image" + , "QTransform arg__1" + , "" + , "QBrush other" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QBrush_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QBrush_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QBrush::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QBrush*) +Q_DECLARE_METATYPE(const QGradient*) +Q_DECLARE_METATYPE(Qt::GlobalColor) +Q_DECLARE_METATYPE(Qt::BrushStyle) +Q_DECLARE_METATYPE(QGradient*) + +// +// QBrush +// + +static QScriptValue qtscript_QBrush_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 16; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QBrush* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QBrush.%0(): this object is not a QBrush") + .arg(qtscript_QBrush_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + const QColor& _q_result = _q_self->color(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + const QGradient* _q_result = const_cast(_q_self->gradient()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isOpaque(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + const QMatrix& _q_result = _q_self->matrix(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::GlobalColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setColor(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setColor(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 6: + if (context->argumentCount() == 1) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMatrix(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + Qt::BrushStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStyle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTexture(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTextureImage(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTransform(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + Qt::BrushStyle _q_result = _q_self->style(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QPixmap _q_result = _q_self->texture(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QImage _q_result = _q_self->textureImage(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QTransform _q_result = _q_self->transform(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QBrush_throw_ambiguity_error_helper(context, + qtscript_QBrush_function_names[_id+1], + qtscript_QBrush_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QBrush_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QBrush(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QBrush _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::BrushStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBrush _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBrush _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBrush _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + + QGradient & _q_arg0 = *qscriptvalue_cast(context->argument(0)); + QBrush _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBrush _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBrush _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + Qt::GlobalColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + QBrush _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::BrushStyle _q_arg1 = qscriptvalue_cast(context->argument(1)); + QBrush _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + QBrush _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QBrush_throw_ambiguity_error_helper(context, + qtscript_QBrush_function_names[_id], + qtscript_QBrush_function_signatures[_id]); +} + +QScriptValue qtscript_create_QBrush_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QBrush*)0)); + for (int i = 0; i < 17; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QBrush_prototype_call, qtscript_QBrush_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QBrush_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QBrush_static_call, proto, qtscript_QBrush_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QClipboard.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QClipboard.cpp new file mode 100644 index 00000000..8cba0cbe --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QClipboard.cpp @@ -0,0 +1,430 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QClipboard_function_names[] = { + "QClipboard" + // static + // prototype + , "clear" + , "image" + , "mimeData" + , "ownsClipboard" + , "ownsFindBuffer" + , "ownsSelection" + , "pixmap" + , "setImage" + , "setMimeData" + , "setPixmap" + , "setText" + , "supportsFindBuffer" + , "supportsSelection" + , "text" + , "toString" +}; + +static const char * const qtscript_QClipboard_function_signatures[] = { + "" + // static + // prototype + , "Mode mode" + , "Mode mode" + , "Mode mode" + , "" + , "" + , "" + , "Mode mode" + , "QImage arg__1, Mode mode" + , "QMimeData data, Mode mode" + , "QPixmap arg__1, Mode mode" + , "String arg__1, Mode mode" + , "" + , "" + , "Mode mode\nString subtype, Mode mode" +"" +}; + +static const int qtscript_QClipboard_function_lengths[] = { + 0 + // static + // prototype + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 1 + , 2 + , 2 + , 2 + , 2 + , 0 + , 0 + , 2 + , 0 +}; + +static QScriptValue qtscript_QClipboard_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QClipboard::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QClipboard*) +Q_DECLARE_METATYPE(QClipboard::Mode) +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(QMimeData*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QClipboard::Mode +// + +static const QClipboard::Mode qtscript_QClipboard_Mode_values[] = { + QClipboard::Clipboard + , QClipboard::Selection + , QClipboard::FindBuffer +}; + +static const char * const qtscript_QClipboard_Mode_keys[] = { + "Clipboard" + , "Selection" + , "FindBuffer" +}; + +static QString qtscript_QClipboard_Mode_toStringHelper(QClipboard::Mode value) +{ + if ((value >= QClipboard::Clipboard) && (value <= QClipboard::FindBuffer)) + return qtscript_QClipboard_Mode_keys[static_cast(value)-static_cast(QClipboard::Clipboard)]; + return QString(); +} + +static QScriptValue qtscript_QClipboard_Mode_toScriptValue(QScriptEngine *engine, const QClipboard::Mode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QClipboard")); + return clazz.property(qtscript_QClipboard_Mode_toStringHelper(value)); +} + +static void qtscript_QClipboard_Mode_fromScriptValue(const QScriptValue &value, QClipboard::Mode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QClipboard_Mode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QClipboard::Clipboard) && (arg <= QClipboard::FindBuffer)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Mode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QClipboard_Mode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QClipboard::Mode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QClipboard_Mode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QClipboard::Mode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QClipboard_Mode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QClipboard_Mode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QClipboard_Mode, + qtscript_QClipboard_Mode_valueOf, qtscript_QClipboard_Mode_toString); + qScriptRegisterMetaType(engine, qtscript_QClipboard_Mode_toScriptValue, + qtscript_QClipboard_Mode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QClipboard_Mode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QClipboard_Mode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QClipboard +// + +static QScriptValue qtscript_QClipboard_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 14; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QClipboard* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QClipboard.%0(): this object is not a QClipboard") + .arg(qtscript_QClipboard_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + QClipboard::Mode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->clear(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QImage _q_result = _q_self->image(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QClipboard::Mode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_result = _q_self->image(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + const QMimeData* _q_result = const_cast(_q_self->mimeData()); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QClipboard::Mode _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QMimeData* _q_result = const_cast(_q_self->mimeData(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->ownsClipboard(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->ownsFindBuffer(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->ownsSelection(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QPixmap _q_result = _q_self->pixmap(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QClipboard::Mode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_result = _q_self->pixmap(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setImage(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + QClipboard::Mode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setImage(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QMimeData* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMimeData(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QMimeData* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QClipboard::Mode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setMimeData(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPixmap(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QClipboard::Mode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setPixmap(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setText(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QClipboard::Mode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->supportsFindBuffer(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->supportsSelection(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->text(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QClipboard::Mode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->text(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QClipboard::Mode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = _q_self->text(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: { + QString result = QString::fromLatin1("QClipboard"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QClipboard_throw_ambiguity_error_helper(context, + qtscript_QClipboard_function_names[_id+1], + qtscript_QClipboard_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QClipboard_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QClipboard cannot be constructed")); + break; + + default: + Q_ASSERT(false); + } + return qtscript_QClipboard_throw_ambiguity_error_helper(context, + qtscript_QClipboard_function_names[_id], + qtscript_QClipboard_function_signatures[_id]); +} + +static QScriptValue qtscript_QClipboard_toScriptValue(QScriptEngine *engine, QClipboard* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QClipboard_fromScriptValue(const QScriptValue &value, QClipboard* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QClipboard_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QClipboard*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 15; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QClipboard_prototype_call, qtscript_QClipboard_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QClipboard_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QClipboard_toScriptValue, + qtscript_QClipboard_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QClipboard_static_call, proto, qtscript_QClipboard_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Mode"), + qtscript_create_QClipboard_Mode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QCloseEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QCloseEvent.cpp new file mode 100644 index 00000000..a6831491 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QCloseEvent.cpp @@ -0,0 +1,124 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QCloseEvent_function_names[] = { + "QCloseEvent" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QCloseEvent_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QCloseEvent_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QCloseEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QCloseEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QCloseEvent +// + +static QScriptValue qtscript_QCloseEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QCloseEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QCloseEvent.%0(): this object is not a QCloseEvent") + .arg(qtscript_QCloseEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QCloseEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QCloseEvent_throw_ambiguity_error_helper(context, + qtscript_QCloseEvent_function_names[_id+1], + qtscript_QCloseEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QCloseEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QCloseEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QCloseEvent* _q_cpp_result = new QCloseEvent(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QCloseEvent_throw_ambiguity_error_helper(context, + qtscript_QCloseEvent_function_names[_id], + qtscript_QCloseEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QCloseEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QCloseEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QCloseEvent_static_call, proto, qtscript_QCloseEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QColor.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QColor.cpp new file mode 100644 index 00000000..6a12eafc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QColor.cpp @@ -0,0 +1,1290 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QColor_function_names[] = { + "QColor" + // static + , "colorNames" + , "fromCmyk" + , "fromCmykF" + , "fromHsl" + , "fromHslF" + , "fromHsv" + , "fromHsvF" + , "fromRgb" + , "fromRgbF" + , "fromRgba" + , "fromRgba64" + , "isValidColor" + // prototype + , "alpha" + , "alphaF" + , "black" + , "blackF" + , "blue" + , "blueF" + , "convertTo" + , "cyan" + , "cyanF" + , "darker" + , "getHsl" + , "getHslF" + , "green" + , "greenF" + , "hslHue" + , "hslHueF" + , "hslSaturation" + , "hslSaturationF" + , "hsvHue" + , "hsvHueF" + , "hsvSaturation" + , "hsvSaturationF" + , "hue" + , "hueF" + , "isValid" + , "lighter" + , "lightness" + , "lightnessF" + , "magenta" + , "magentaF" + , "name" + , "equals" + , "red" + , "redF" + , "rgb" + , "rgba" + , "saturation" + , "saturationF" + , "setAlpha" + , "setAlphaF" + , "setBlue" + , "setBlueF" + , "setCmyk" + , "setCmykF" + , "setGreen" + , "setGreenF" + , "setHsl" + , "setHslF" + , "setHsv" + , "setHsvF" + , "setNamedColor" + , "setRed" + , "setRedF" + , "setRgb" + , "setRgbF" + , "setRgba" + , "spec" + , "toCmyk" + , "toHsl" + , "toHsv" + , "toRgb" + , "value" + , "valueF" + , "yellow" + , "yellowF" + , "toString" +}; + +static const char * const qtscript_QColor_function_signatures[] = { + "\nGlobalColor color\nQColor color\nString name\nint r, int g, int b, int a\nunsigned int rgb" + // static + , "" + , "int c, int m, int y, int k, int a" + , "qreal c, qreal m, qreal y, qreal k, qreal a" + , "int h, int s, int l, int a" + , "qreal h, qreal s, qreal l, qreal a" + , "int h, int s, int v, int a" + , "qreal h, qreal s, qreal v, qreal a" + , "int r, int g, int b, int a\nunsigned int rgb" + , "qreal r, qreal g, qreal b, qreal a" + , "unsigned int rgba" + , "ushort r, ushort g, ushort b, ushort a" + , "String name" + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "Spec colorSpec" + , "" + , "" + , "int f" + , "int h, int s, int l, int a" + , "qreal h, qreal s, qreal l, qreal a" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "int f" + , "" + , "" + , "" + , "" + , "" + , "QColor c" + , "" + , "" + , "" + , "" + , "" + , "" + , "int alpha" + , "qreal alpha" + , "int blue" + , "qreal blue" + , "int c, int m, int y, int k, int a" + , "qreal c, qreal m, qreal y, qreal k, qreal a" + , "int green" + , "qreal green" + , "int h, int s, int l, int a" + , "qreal h, qreal s, qreal l, qreal a" + , "int h, int s, int v, int a" + , "qreal h, qreal s, qreal v, qreal a" + , "String name" + , "int red" + , "qreal red" + , "int r, int g, int b, int a\nunsigned int rgb" + , "qreal r, qreal g, qreal b, qreal a" + , "unsigned int rgba" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QColor_function_lengths[] = { + 4 + // static + , 0 + , 5 + , 5 + , 4 + , 4 + , 4 + , 4 + , 4 + , 4 + , 1 + , 4 + , 1 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 4 + , 4 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 5 + , 5 + , 1 + , 1 + , 4 + , 4 + , 4 + , 4 + , 1 + , 1 + , 1 + , 4 + , 4 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QColor_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QColor::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QColor*) +Q_DECLARE_METATYPE(QColor::Spec) +Q_DECLARE_METATYPE(int*) +Q_DECLARE_METATYPE(qreal*) +Q_DECLARE_METATYPE(Qt::GlobalColor) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QColor::Spec +// + +static const QColor::Spec qtscript_QColor_Spec_values[] = { + QColor::Invalid + , QColor::Rgb + , QColor::Hsv + , QColor::Cmyk + , QColor::Hsl +}; + +static const char * const qtscript_QColor_Spec_keys[] = { + "Invalid" + , "Rgb" + , "Hsv" + , "Cmyk" + , "Hsl" +}; + +static QString qtscript_QColor_Spec_toStringHelper(QColor::Spec value) +{ + if ((value >= QColor::Invalid) && (value <= QColor::Hsl)) + return qtscript_QColor_Spec_keys[static_cast(value)-static_cast(QColor::Invalid)]; + return QString(); +} + +static QScriptValue qtscript_QColor_Spec_toScriptValue(QScriptEngine *engine, const QColor::Spec &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QColor")); + return clazz.property(qtscript_QColor_Spec_toStringHelper(value)); +} + +static void qtscript_QColor_Spec_fromScriptValue(const QScriptValue &value, QColor::Spec &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QColor_Spec(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QColor::Invalid) && (arg <= QColor::Hsl)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Spec(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QColor_Spec_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QColor::Spec value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QColor_Spec_toString(QScriptContext *context, QScriptEngine *engine) +{ + QColor::Spec value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QColor_Spec_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QColor_Spec_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QColor_Spec, + qtscript_QColor_Spec_valueOf, qtscript_QColor_Spec_toString); + qScriptRegisterMetaType(engine, qtscript_QColor_Spec_toScriptValue, + qtscript_QColor_Spec_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QColor_Spec_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QColor_Spec_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QColor +// + +static QScriptValue qtscript_QColor_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 65; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QColor* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QColor.%0(): this object is not a QColor") + .arg(qtscript_QColor_function_names[_id+13])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->alpha(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->alphaF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->black(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->blackF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->blue(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->blueF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QColor::Spec _q_arg0 = qscriptvalue_cast(context->argument(0)); + QColor _q_result = _q_self->convertTo(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->cyan(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->cyanF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QColor _q_result = _q_self->darker(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QColor _q_result = _q_self->darker(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 3) { + int* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->getHsl(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + int* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->getHsl(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 3) { + qreal* _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal* _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->getHslF(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + qreal* _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal* _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal* _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal* _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->getHslF(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 0) { + int _q_result = _q_self->green(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->greenF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + int _q_result = _q_self->hslHue(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->hslHueF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + int _q_result = _q_self->hslSaturation(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->hslSaturationF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + int _q_result = _q_self->hsvHue(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->hsvHueF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + int _q_result = _q_self->hsvSaturation(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->hsvSaturationF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + int _q_result = _q_self->hue(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->hueF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + QColor _q_result = _q_self->lighter(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QColor _q_result = _q_self->lighter(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + int _q_result = _q_self->lightness(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->lightnessF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 0) { + int _q_result = _q_self->magenta(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->magentaF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->name(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 1) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 0) { + int _q_result = _q_self->red(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->redF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 34: + if (context->argumentCount() == 0) { + unsigned int _q_result = _q_self->rgb(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 35: + if (context->argumentCount() == 0) { + unsigned int _q_result = _q_self->rgba(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 36: + if (context->argumentCount() == 0) { + int _q_result = _q_self->saturation(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 37: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->saturationF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 38: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setAlpha(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 39: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setAlphaF(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setBlue(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBlueF(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 42: + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setCmyk(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + _q_self->setCmyk(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + break; + + case 43: + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setCmykF(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->setCmykF(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + break; + + case 44: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setGreen(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 45: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setGreenF(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 46: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setHsl(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setHsl(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 47: + if (context->argumentCount() == 3) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setHslF(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setHslF(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 48: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setHsv(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setHsv(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 49: + if (context->argumentCount() == 3) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setHsvF(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setHsvF(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 50: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setNamedColor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 51: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setRed(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 52: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRedF(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 53: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + _q_self->setRgb(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setRgb(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setRgb(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 54: + if (context->argumentCount() == 3) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setRgbF(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setRgbF(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 55: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + _q_self->setRgba(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 56: + if (context->argumentCount() == 0) { + QColor::Spec _q_result = _q_self->spec(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 57: + if (context->argumentCount() == 0) { + QColor _q_result = _q_self->toCmyk(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 58: + if (context->argumentCount() == 0) { + QColor _q_result = _q_self->toHsl(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 59: + if (context->argumentCount() == 0) { + QColor _q_result = _q_self->toHsv(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 60: + if (context->argumentCount() == 0) { + QColor _q_result = _q_self->toRgb(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 61: + if (context->argumentCount() == 0) { + int _q_result = _q_self->value(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 62: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->valueF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 63: + if (context->argumentCount() == 0) { + int _q_result = _q_self->yellow(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 64: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->yellowF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 65: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QColor_throw_ambiguity_error_helper(context, + qtscript_QColor_function_names[_id+13], + qtscript_QColor_function_signatures[_id+13]); +} + +static QScriptValue qtscript_QColor_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QColor(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QColor _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::GlobalColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QColor _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QColor _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QColor _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isNumber()) { + uint _q_arg0 = context->argument(0).toUInt32(); + QColor _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QColor _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QColor _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QStringList _q_result = QColor::colorNames(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QColor _q_result = QColor::fromCmyk(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + QColor _q_result = QColor::fromCmyk(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QColor _q_result = QColor::fromCmykF(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + QColor _q_result = QColor::fromCmykF(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QColor _q_result = QColor::fromHsl(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QColor _q_result = QColor::fromHsl(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 3) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + QColor _q_result = QColor::fromHslF(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QColor _q_result = QColor::fromHslF(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QColor _q_result = QColor::fromHsv(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QColor _q_result = QColor::fromHsv(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 3) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + QColor _q_result = QColor::fromHsvF(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QColor _q_result = QColor::fromHsvF(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + QColor _q_result = QColor::fromRgb(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QColor _q_result = QColor::fromRgb(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QColor _q_result = QColor::fromRgb(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 3) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + QColor _q_result = QColor::fromRgbF(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QColor _q_result = QColor::fromRgbF(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + QColor _q_result = QColor::fromRgba(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 3) { + ushort _q_arg0 = qscriptvalue_cast(context->argument(0)); + ushort _q_arg1 = qscriptvalue_cast(context->argument(1)); + ushort _q_arg2 = qscriptvalue_cast(context->argument(2)); + QColor _q_result = QColor::fromRgba64(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + ushort _q_arg0 = qscriptvalue_cast(context->argument(0)); + ushort _q_arg1 = qscriptvalue_cast(context->argument(1)); + ushort _q_arg2 = qscriptvalue_cast(context->argument(2)); + ushort _q_arg3 = qscriptvalue_cast(context->argument(3)); + QColor _q_result = QColor::fromRgba64(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = QColor::isValidColor(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QColor_throw_ambiguity_error_helper(context, + qtscript_QColor_function_names[_id], + qtscript_QColor_function_signatures[_id]); +} + +QScriptValue qtscript_create_QColor_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QColor*)0)); + for (int i = 0; i < 66; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QColor_prototype_call, qtscript_QColor_function_lengths[i+13]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QColor_function_names[i+13]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QColor_static_call, proto, qtscript_QColor_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 12; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QColor_static_call, + qtscript_QColor_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QColor_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("Spec"), + qtscript_create_QColor_Spec_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QConicalGradient.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QConicalGradient.cpp new file mode 100644 index 00000000..d3531455 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QConicalGradient.cpp @@ -0,0 +1,198 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QConicalGradient_function_names[] = { + "QConicalGradient" + // static + // prototype + , "angle" + , "center" + , "setAngle" + , "setCenter" + , "toString" +}; + +static const char * const qtscript_QConicalGradient_function_signatures[] = { + "\nQPointF center, qreal startAngle\nqreal cx, qreal cy, qreal startAngle" + // static + // prototype + , "" + , "" + , "qreal angle" + , "QPointF center\nqreal x, qreal y" +"" +}; + +static const int qtscript_QConicalGradient_function_lengths[] = { + 3 + // static + // prototype + , 0 + , 0 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QConicalGradient_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QConicalGradient::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QConicalGradient) +Q_DECLARE_METATYPE(QConicalGradient*) +Q_DECLARE_METATYPE(QGradient*) +Q_DECLARE_METATYPE(QGradient) + +// +// QConicalGradient +// + +static QScriptValue qtscript_QConicalGradient_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QConicalGradient* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QConicalGradient.%0(): this object is not a QConicalGradient") + .arg(qtscript_QConicalGradient_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->angle(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->center(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setAngle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCenter(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setCenter(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 4: { + QString result = QString::fromLatin1("QConicalGradient"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QConicalGradient_throw_ambiguity_error_helper(context, + qtscript_QConicalGradient_function_names[_id+1], + qtscript_QConicalGradient_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QConicalGradient_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QConicalGradient(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QConicalGradient _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QConicalGradient _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + QConicalGradient _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QConicalGradient_throw_ambiguity_error_helper(context, + qtscript_QConicalGradient_function_names[_id], + qtscript_QConicalGradient_function_signatures[_id]); +} + +QScriptValue qtscript_create_QConicalGradient_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QConicalGradient*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QConicalGradient_prototype_call, qtscript_QConicalGradient_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QConicalGradient_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QConicalGradient_static_call, proto, qtscript_QConicalGradient_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QContextMenuEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QContextMenuEvent.cpp new file mode 100644 index 00000000..66f716c4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QContextMenuEvent.cpp @@ -0,0 +1,311 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QContextMenuEvent.h" + +static const char * const qtscript_QContextMenuEvent_function_names[] = { + "QContextMenuEvent" + // static + // prototype + , "globalPos" + , "globalX" + , "globalY" + , "pos" + , "reason" + , "x" + , "y" + , "toString" +}; + +static const char * const qtscript_QContextMenuEvent_function_signatures[] = { + "Reason reason, QPoint pos\nReason reason, QPoint pos, QPoint globalPos\nReason reason, QPoint pos, QPoint globalPos, KeyboardModifiers modifiers" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QContextMenuEvent_function_lengths[] = { + 4 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QContextMenuEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QContextMenuEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QtScriptShell_QContextMenuEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent::Reason) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QInputEvent*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QContextMenuEvent::Reason +// + +static const QContextMenuEvent::Reason qtscript_QContextMenuEvent_Reason_values[] = { + QContextMenuEvent::Mouse + , QContextMenuEvent::Keyboard + , QContextMenuEvent::Other +}; + +static const char * const qtscript_QContextMenuEvent_Reason_keys[] = { + "Mouse" + , "Keyboard" + , "Other" +}; + +static QString qtscript_QContextMenuEvent_Reason_toStringHelper(QContextMenuEvent::Reason value) +{ + if ((value >= QContextMenuEvent::Mouse) && (value <= QContextMenuEvent::Other)) + return qtscript_QContextMenuEvent_Reason_keys[static_cast(value)-static_cast(QContextMenuEvent::Mouse)]; + return QString(); +} + +static QScriptValue qtscript_QContextMenuEvent_Reason_toScriptValue(QScriptEngine *engine, const QContextMenuEvent::Reason &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QContextMenuEvent")); + return clazz.property(qtscript_QContextMenuEvent_Reason_toStringHelper(value)); +} + +static void qtscript_QContextMenuEvent_Reason_fromScriptValue(const QScriptValue &value, QContextMenuEvent::Reason &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QContextMenuEvent_Reason(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QContextMenuEvent::Mouse) && (arg <= QContextMenuEvent::Other)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Reason(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QContextMenuEvent_Reason_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QContextMenuEvent::Reason value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QContextMenuEvent_Reason_toString(QScriptContext *context, QScriptEngine *engine) +{ + QContextMenuEvent::Reason value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QContextMenuEvent_Reason_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QContextMenuEvent_Reason_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QContextMenuEvent_Reason, + qtscript_QContextMenuEvent_Reason_valueOf, qtscript_QContextMenuEvent_Reason_toString); + qScriptRegisterMetaType(engine, qtscript_QContextMenuEvent_Reason_toScriptValue, + qtscript_QContextMenuEvent_Reason_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QContextMenuEvent_Reason_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QContextMenuEvent_Reason_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QContextMenuEvent +// + +static QScriptValue qtscript_QContextMenuEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 7; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QContextMenuEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QContextMenuEvent.%0(): this object is not a QContextMenuEvent") + .arg(qtscript_QContextMenuEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + const QPoint& _q_result = _q_self->globalPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->globalX(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->globalY(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + const QPoint& _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QContextMenuEvent::Reason _q_result = _q_self->reason(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->x(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = _q_self->y(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: { + QString result = QString::fromLatin1("QContextMenuEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QContextMenuEvent_throw_ambiguity_error_helper(context, + qtscript_QContextMenuEvent_function_names[_id+1], + qtscript_QContextMenuEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QContextMenuEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QContextMenuEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 2) { + QContextMenuEvent::Reason _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QContextMenuEvent* _q_cpp_result = new QtScriptShell_QContextMenuEvent(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QContextMenuEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 3) { + QContextMenuEvent::Reason _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPoint _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QContextMenuEvent* _q_cpp_result = new QtScriptShell_QContextMenuEvent(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QContextMenuEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 4) { + QContextMenuEvent::Reason _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPoint _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QtScriptShell_QContextMenuEvent* _q_cpp_result = new QtScriptShell_QContextMenuEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QContextMenuEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QContextMenuEvent_throw_ambiguity_error_helper(context, + qtscript_QContextMenuEvent_function_names[_id], + qtscript_QContextMenuEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QContextMenuEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QContextMenuEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QContextMenuEvent_prototype_call, qtscript_QContextMenuEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QContextMenuEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QContextMenuEvent_static_call, proto, qtscript_QContextMenuEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Reason"), + qtscript_create_QContextMenuEvent_Reason_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QCursor.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QCursor.cpp new file mode 100644 index 00000000..d36e29d0 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QCursor.cpp @@ -0,0 +1,293 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QCursor_function_names[] = { + "QCursor" + // static + , "pos" + , "setPos" + // prototype + , "bitmap" + , "hotSpot" + , "mask" + , "pixmap" + , "setShape" + , "shape" + , "toString" +}; + +static const char * const qtscript_QCursor_function_signatures[] = { + "\nCursorShape shape\nQBitmap bitmap, QBitmap mask, int hotX, int hotY\nQCursor cursor\nQPixmap pixmap, int hotX, int hotY" + // static + , "" + , "QPoint p\nint x, int y" + // prototype + , "" + , "" + , "" + , "" + , "CursorShape newShape" + , "" +"" +}; + +static const int qtscript_QCursor_function_lengths[] = { + 4 + // static + , 0 + , 2 + // prototype + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QCursor_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QCursor::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QCursor*) +Q_DECLARE_METATYPE(const QBitmap*) +Q_DECLARE_METATYPE(Qt::CursorShape) + +// +// QCursor +// + +static QScriptValue qtscript_QCursor_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QCursor* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QCursor.%0(): this object is not a QCursor") + .arg(qtscript_QCursor_function_names[_id+3])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + const QBitmap* _q_result = const_cast(_q_self->bitmap()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->hotSpot(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + const QBitmap* _q_result = const_cast(_q_self->mask()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QPixmap _q_result = _q_self->pixmap(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + Qt::CursorShape _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setShape(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + Qt::CursorShape _q_result = _q_self->shape(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QCursor_throw_ambiguity_error_helper(context, + qtscript_QCursor_function_names[_id+3], + qtscript_QCursor_function_signatures[_id+3]); +} + +static QScriptValue qtscript_QCursor_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QCursor(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QCursor _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::CursorShape _q_arg0 = qscriptvalue_cast(context->argument(0)); + QCursor _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QCursor _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QCursor _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QBitmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBitmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + QCursor _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QCursor _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && context->argument(2).isNumber()) { + QBitmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBitmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QCursor _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QCursor _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 4) { + QBitmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBitmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QCursor _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QPoint _q_result = QCursor::pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QCursor::setPos(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QCursor::setPos(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QCursor_throw_ambiguity_error_helper(context, + qtscript_QCursor_function_names[_id], + qtscript_QCursor_function_signatures[_id]); +} + +QScriptValue qtscript_create_QCursor_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QCursor*)0)); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QCursor_prototype_call, qtscript_QCursor_function_lengths[i+3]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QCursor_function_names[i+3]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QCursor_static_call, proto, qtscript_QCursor_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QCursor_static_call, + qtscript_QCursor_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QCursor_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDesktopServices.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDesktopServices.cpp new file mode 100644 index 00000000..6e488c17 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDesktopServices.cpp @@ -0,0 +1,170 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QDesktopServices.h" + +static const char * const qtscript_QDesktopServices_function_names[] = { + "QDesktopServices" + // static + , "openUrl" + , "setUrlHandler" + , "unsetUrlHandler" + // prototype + , "toString" +}; + +static const char * const qtscript_QDesktopServices_function_signatures[] = { + "" + // static + , "QUrl url" + , "String scheme, QObject receiver, char method" + , "String scheme" + // prototype +"" +}; + +static const int qtscript_QDesktopServices_function_lengths[] = { + 0 + // static + , 1 + , 3 + , 1 + // prototype + , 0 +}; + +static QScriptValue qtscript_QDesktopServices_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDesktopServices::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDesktopServices*) +Q_DECLARE_METATYPE(QtScriptShell_QDesktopServices*) +Q_DECLARE_METATYPE(const char*) + +// +// QDesktopServices +// + +static QScriptValue qtscript_QDesktopServices_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDesktopServices* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDesktopServices.%0(): this object is not a QDesktopServices") + .arg(qtscript_QDesktopServices_function_names[_id+4])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QDesktopServices"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDesktopServices_throw_ambiguity_error_helper(context, + qtscript_QDesktopServices_function_names[_id+4], + qtscript_QDesktopServices_function_signatures[_id+4]); +} + +static QScriptValue qtscript_QDesktopServices_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDesktopServices(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QDesktopServices* _q_cpp_result = new QtScriptShell_QDesktopServices(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QDesktopServices*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = QDesktopServices::openUrl(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QObject* _q_arg1 = context->argument(1).toQObject(); + const char* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QDesktopServices::setUrlHandler(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDesktopServices::unsetUrlHandler(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDesktopServices_throw_ambiguity_error_helper(context, + qtscript_QDesktopServices_function_names[_id], + qtscript_QDesktopServices_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDesktopServices_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDesktopServices*)0)); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDesktopServices_static_call, proto, qtscript_QDesktopServices_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDesktopServices_static_call, + qtscript_QDesktopServices_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QDesktopServices_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDoubleValidator.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDoubleValidator.cpp new file mode 100644 index 00000000..8ae17138 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDoubleValidator.cpp @@ -0,0 +1,276 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QDoubleValidator.h" + +static const char * const qtscript_QDoubleValidator_function_names[] = { + "QDoubleValidator" + // static + // prototype + , "setRange" + , "toString" +}; + +static const char * const qtscript_QDoubleValidator_function_signatures[] = { + "QObject parent\ndouble bottom, double top, int decimals, QObject parent" + // static + // prototype + , "double bottom, double top, int decimals" +"" +}; + +static const int qtscript_QDoubleValidator_function_lengths[] = { + 4 + // static + // prototype + , 3 + , 0 +}; + +static QScriptValue qtscript_QDoubleValidator_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDoubleValidator::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDoubleValidator*) +Q_DECLARE_METATYPE(QtScriptShell_QDoubleValidator*) +Q_DECLARE_METATYPE(QDoubleValidator::Notation) +Q_DECLARE_METATYPE(QValidator*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QDoubleValidator::Notation +// + +static const QDoubleValidator::Notation qtscript_QDoubleValidator_Notation_values[] = { + QDoubleValidator::StandardNotation + , QDoubleValidator::ScientificNotation +}; + +static const char * const qtscript_QDoubleValidator_Notation_keys[] = { + "StandardNotation" + , "ScientificNotation" +}; + +static QString qtscript_QDoubleValidator_Notation_toStringHelper(QDoubleValidator::Notation value) +{ + if ((value >= QDoubleValidator::StandardNotation) && (value <= QDoubleValidator::ScientificNotation)) + return qtscript_QDoubleValidator_Notation_keys[static_cast(value)-static_cast(QDoubleValidator::StandardNotation)]; + return QString(); +} + +static QScriptValue qtscript_QDoubleValidator_Notation_toScriptValue(QScriptEngine *engine, const QDoubleValidator::Notation &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QDoubleValidator")); + return clazz.property(qtscript_QDoubleValidator_Notation_toStringHelper(value)); +} + +static void qtscript_QDoubleValidator_Notation_fromScriptValue(const QScriptValue &value, QDoubleValidator::Notation &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QDoubleValidator_Notation(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QDoubleValidator::StandardNotation) && (arg <= QDoubleValidator::ScientificNotation)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Notation(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QDoubleValidator_Notation_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDoubleValidator::Notation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDoubleValidator_Notation_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDoubleValidator::Notation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QDoubleValidator_Notation_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QDoubleValidator_Notation_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QDoubleValidator_Notation, + qtscript_QDoubleValidator_Notation_valueOf, qtscript_QDoubleValidator_Notation_toString); + qScriptRegisterMetaType(engine, qtscript_QDoubleValidator_Notation_toScriptValue, + qtscript_QDoubleValidator_Notation_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QDoubleValidator_Notation_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QDoubleValidator_Notation_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QDoubleValidator +// + +static QScriptValue qtscript_QDoubleValidator_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDoubleValidator* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDoubleValidator.%0(): this object is not a QDoubleValidator") + .arg(qtscript_QDoubleValidator_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + double _q_arg0 = context->argument(0).toNumber(); + double _q_arg1 = context->argument(1).toNumber(); + _q_self->setRange(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + double _q_arg0 = context->argument(0).toNumber(); + double _q_arg1 = context->argument(1).toNumber(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setRange(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 1: { + QString result = QString::fromLatin1("QDoubleValidator"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDoubleValidator_throw_ambiguity_error_helper(context, + qtscript_QDoubleValidator_function_names[_id+1], + qtscript_QDoubleValidator_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDoubleValidator_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDoubleValidator(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QDoubleValidator* _q_cpp_result = new QtScriptShell_QDoubleValidator(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDoubleValidator*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QDoubleValidator* _q_cpp_result = new QtScriptShell_QDoubleValidator(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDoubleValidator*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 3) { + double _q_arg0 = context->argument(0).toNumber(); + double _q_arg1 = context->argument(1).toNumber(); + int _q_arg2 = context->argument(2).toInt32(); + QtScriptShell_QDoubleValidator* _q_cpp_result = new QtScriptShell_QDoubleValidator(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDoubleValidator*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 4) { + double _q_arg0 = context->argument(0).toNumber(); + double _q_arg1 = context->argument(1).toNumber(); + int _q_arg2 = context->argument(2).toInt32(); + QObject* _q_arg3 = context->argument(3).toQObject(); + QtScriptShell_QDoubleValidator* _q_cpp_result = new QtScriptShell_QDoubleValidator(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDoubleValidator*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDoubleValidator_throw_ambiguity_error_helper(context, + qtscript_QDoubleValidator_function_names[_id], + qtscript_QDoubleValidator_function_signatures[_id]); +} + +static QScriptValue qtscript_QDoubleValidator_toScriptValue(QScriptEngine *engine, QDoubleValidator* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QDoubleValidator_fromScriptValue(const QScriptValue &value, QDoubleValidator* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QDoubleValidator_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDoubleValidator*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDoubleValidator_prototype_call, qtscript_QDoubleValidator_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDoubleValidator_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QDoubleValidator_toScriptValue, + qtscript_QDoubleValidator_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDoubleValidator_static_call, proto, qtscript_QDoubleValidator_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Notation"), + qtscript_create_QDoubleValidator_Notation_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDrag.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDrag.cpp new file mode 100644 index 00000000..10915f02 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDrag.cpp @@ -0,0 +1,304 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QDrag.h" + +static const char * const qtscript_QDrag_function_names[] = { + "QDrag" + // static + // prototype + , "defaultAction" + , "dragCursor" + , "exec" + , "hotSpot" + , "mimeData" + , "pixmap" + , "setDragCursor" + , "setHotSpot" + , "setMimeData" + , "setPixmap" + , "source" + , "supportedActions" + , "target" + , "toString" +}; + +static const char * const qtscript_QDrag_function_signatures[] = { + "QObject dragSource" + // static + // prototype + , "" + , "DropAction action" + , "DropActions supportedActions\nDropActions supportedActions, DropAction defaultAction" + , "" + , "" + , "" + , "QPixmap cursor, DropAction action" + , "QPoint hotspot" + , "QMimeData data" + , "QPixmap arg__1" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QDrag_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 2 + , 0 + , 0 + , 0 + , 2 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QDrag_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDrag::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDrag*) +Q_DECLARE_METATYPE(QtScriptShell_QDrag*) +Q_DECLARE_METATYPE(Qt::DropAction) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QMimeData*) + +// +// QDrag +// + +static QScriptValue qtscript_QDrag_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 13; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDrag* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDrag.%0(): this object is not a QDrag") + .arg(qtscript_QDrag_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + Qt::DropAction _q_result = _q_self->defaultAction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + Qt::DropAction _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_result = _q_self->dragCursor(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + Qt::DropAction _q_result = _q_self->exec(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + Qt::DropAction _q_result = _q_self->exec(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + Qt::DropAction _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::DropAction _q_result = _q_self->exec(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->hotSpot(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QMimeData* _q_result = _q_self->mimeData(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QPixmap _q_result = _q_self->pixmap(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 2) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::DropAction _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setDragCursor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setHotSpot(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QMimeData* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMimeData(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPixmap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QObject* _q_result = _q_self->source(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->supportedActions(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QObject* _q_result = _q_self->target(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: { + QString result = QString::fromLatin1("QDrag"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDrag_throw_ambiguity_error_helper(context, + qtscript_QDrag_function_names[_id+1], + qtscript_QDrag_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDrag_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDrag(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QDrag* _q_cpp_result = new QtScriptShell_QDrag(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDrag*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDrag_throw_ambiguity_error_helper(context, + qtscript_QDrag_function_names[_id], + qtscript_QDrag_function_signatures[_id]); +} + +static QScriptValue qtscript_QDrag_toScriptValue(QScriptEngine *engine, QDrag* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QDrag_fromScriptValue(const QScriptValue &value, QDrag* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QDrag_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDrag*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 14; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDrag_prototype_call, qtscript_QDrag_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDrag_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QDrag_toScriptValue, + qtscript_QDrag_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDrag_static_call, proto, qtscript_QDrag_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDragEnterEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDragEnterEvent.cpp new file mode 100644 index 00000000..ec15fde0 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDragEnterEvent.cpp @@ -0,0 +1,137 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QDragEnterEvent_function_names[] = { + "QDragEnterEvent" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QDragEnterEvent_function_signatures[] = { + "QPoint pos, DropActions actions, QMimeData data, MouseButtons buttons, KeyboardModifiers modifiers" + // static + // prototype +"" +}; + +static const int qtscript_QDragEnterEvent_function_lengths[] = { + 5 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QDragEnterEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDragEnterEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QDragMoveEvent*) + +// +// QDragEnterEvent +// + +static QScriptValue qtscript_QDragEnterEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDragEnterEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDragEnterEvent.%0(): this object is not a QDragEnterEvent") + .arg(qtscript_QDragEnterEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QDragEnterEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDragEnterEvent_throw_ambiguity_error_helper(context, + qtscript_QDragEnterEvent_function_names[_id+1], + qtscript_QDragEnterEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDragEnterEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDragEnterEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 5) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + const QMimeData* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QFlags _q_arg4 = qscriptvalue_cast >(context->argument(4)); + QDragEnterEvent* _q_cpp_result = new QDragEnterEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDragEnterEvent_throw_ambiguity_error_helper(context, + qtscript_QDragEnterEvent_function_names[_id], + qtscript_QDragEnterEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDragEnterEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDragEnterEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDragEnterEvent_static_call, proto, qtscript_QDragEnterEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDragLeaveEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDragLeaveEvent.cpp new file mode 100644 index 00000000..70967a02 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDragLeaveEvent.cpp @@ -0,0 +1,124 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QDragLeaveEvent_function_names[] = { + "QDragLeaveEvent" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QDragLeaveEvent_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QDragLeaveEvent_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QDragLeaveEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDragLeaveEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QDragLeaveEvent +// + +static QScriptValue qtscript_QDragLeaveEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDragLeaveEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDragLeaveEvent.%0(): this object is not a QDragLeaveEvent") + .arg(qtscript_QDragLeaveEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QDragLeaveEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDragLeaveEvent_throw_ambiguity_error_helper(context, + qtscript_QDragLeaveEvent_function_names[_id+1], + qtscript_QDragLeaveEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDragLeaveEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDragLeaveEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDragLeaveEvent* _q_cpp_result = new QDragLeaveEvent(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDragLeaveEvent_throw_ambiguity_error_helper(context, + qtscript_QDragLeaveEvent_function_names[_id], + qtscript_QDragLeaveEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDragLeaveEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDragLeaveEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDragLeaveEvent_static_call, proto, qtscript_QDragLeaveEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDragMoveEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDragMoveEvent.cpp new file mode 100644 index 00000000..eea0ad58 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDragMoveEvent.cpp @@ -0,0 +1,191 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QDragMoveEvent.h" + +static const char * const qtscript_QDragMoveEvent_function_names[] = { + "QDragMoveEvent" + // static + // prototype + , "accept" + , "answerRect" + , "ignore" + , "toString" +}; + +static const char * const qtscript_QDragMoveEvent_function_signatures[] = { + "QPoint pos, DropActions actions, QMimeData data, MouseButtons buttons, KeyboardModifiers modifiers, Type type" + // static + // prototype + , "QRect r" + , "" + , "QRect r" +"" +}; + +static const int qtscript_QDragMoveEvent_function_lengths[] = { + 6 + // static + // prototype + , 1 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QDragMoveEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDragMoveEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QtScriptShell_QDragMoveEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QDropEvent*) + +// +// QDragMoveEvent +// + +static QScriptValue qtscript_QDragMoveEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDragMoveEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDragMoveEvent.%0(): this object is not a QDragMoveEvent") + .arg(qtscript_QDragMoveEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->accept(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->answerRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->ignore(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: { + QString result = QString::fromLatin1("QDragMoveEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDragMoveEvent_throw_ambiguity_error_helper(context, + qtscript_QDragMoveEvent_function_names[_id+1], + qtscript_QDragMoveEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDragMoveEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDragMoveEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 5) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + const QMimeData* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QFlags _q_arg4 = qscriptvalue_cast >(context->argument(4)); + QtScriptShell_QDragMoveEvent* _q_cpp_result = new QtScriptShell_QDragMoveEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QDragMoveEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 6) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + const QMimeData* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QFlags _q_arg4 = qscriptvalue_cast >(context->argument(4)); + QEvent::Type _q_arg5 = qscriptvalue_cast(context->argument(5)); + QtScriptShell_QDragMoveEvent* _q_cpp_result = new QtScriptShell_QDragMoveEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QDragMoveEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDragMoveEvent_throw_ambiguity_error_helper(context, + qtscript_QDragMoveEvent_function_names[_id], + qtscript_QDragMoveEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDragMoveEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDragMoveEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDragMoveEvent_prototype_call, qtscript_QDragMoveEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDragMoveEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDragMoveEvent_static_call, proto, qtscript_QDragMoveEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDropEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDropEvent.cpp new file mode 100644 index 00000000..00c47696 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QDropEvent.cpp @@ -0,0 +1,270 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QDropEvent.h" + +static const char * const qtscript_QDropEvent_function_names[] = { + "QDropEvent" + // static + // prototype + , "acceptProposedAction" + , "dropAction" + , "keyboardModifiers" + , "mimeData" + , "mouseButtons" + , "pos" + , "posF" + , "possibleActions" + , "proposedAction" + , "setDropAction" + , "source" + , "toString" +}; + +static const char * const qtscript_QDropEvent_function_signatures[] = { + "QPointF pos, DropActions actions, QMimeData data, MouseButtons buttons, KeyboardModifiers modifiers, Type type" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "DropAction action" + , "" +"" +}; + +static const int qtscript_QDropEvent_function_lengths[] = { + 6 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QDropEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDropEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QtScriptShell_QDropEvent*) +Q_DECLARE_METATYPE(Qt::DropAction) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QEvent*) + +// +// QDropEvent +// + +static QScriptValue qtscript_QDropEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 11; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDropEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDropEvent.%0(): this object is not a QDropEvent") + .arg(qtscript_QDropEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->acceptProposedAction(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + Qt::DropAction _q_result = _q_self->dropAction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->keyboardModifiers(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + const QMimeData* _q_result = const_cast(_q_self->mimeData()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->mouseButtons(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + const QPointF& _q_result = _q_self->posF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->possibleActions(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + Qt::DropAction _q_result = _q_self->proposedAction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + Qt::DropAction _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDropAction(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QObject* _q_result = _q_self->source(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: { + QString result = QString::fromLatin1("QDropEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDropEvent_throw_ambiguity_error_helper(context, + qtscript_QDropEvent_function_names[_id+1], + qtscript_QDropEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDropEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDropEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 5) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + const QMimeData* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QFlags _q_arg4 = qscriptvalue_cast >(context->argument(4)); + QtScriptShell_QDropEvent* _q_cpp_result = new QtScriptShell_QDropEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QDropEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 6) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + const QMimeData* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QFlags _q_arg4 = qscriptvalue_cast >(context->argument(4)); + QEvent::Type _q_arg5 = qscriptvalue_cast(context->argument(5)); + QtScriptShell_QDropEvent* _q_cpp_result = new QtScriptShell_QDropEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QDropEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDropEvent_throw_ambiguity_error_helper(context, + qtscript_QDropEvent_function_names[_id], + qtscript_QDropEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDropEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDropEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 12; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDropEvent_prototype_call, qtscript_QDropEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDropEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDropEvent_static_call, proto, qtscript_QDropEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFileOpenEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFileOpenEvent.cpp new file mode 100644 index 00000000..1471eb51 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFileOpenEvent.cpp @@ -0,0 +1,159 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QFileOpenEvent_function_names[] = { + "QFileOpenEvent" + // static + // prototype + , "file" + , "url" + , "toString" +}; + +static const char * const qtscript_QFileOpenEvent_function_signatures[] = { + "String file\nQUrl url" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QFileOpenEvent_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QFileOpenEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFileOpenEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFileOpenEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QFileOpenEvent +// + +static QScriptValue qtscript_QFileOpenEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFileOpenEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFileOpenEvent.%0(): this object is not a QFileOpenEvent") + .arg(qtscript_QFileOpenEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->file(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QUrl _q_result = _q_self->url(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QFileOpenEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFileOpenEvent_throw_ambiguity_error_helper(context, + qtscript_QFileOpenEvent_function_names[_id+1], + qtscript_QFileOpenEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFileOpenEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFileOpenEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QFileOpenEvent* _q_cpp_result = new QFileOpenEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFileOpenEvent* _q_cpp_result = new QFileOpenEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFileOpenEvent_throw_ambiguity_error_helper(context, + qtscript_QFileOpenEvent_function_names[_id], + qtscript_QFileOpenEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QFileOpenEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFileOpenEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFileOpenEvent_prototype_call, qtscript_QFileOpenEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFileOpenEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFileOpenEvent_static_call, proto, qtscript_QFileOpenEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFocusEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFocusEvent.cpp new file mode 100644 index 00000000..27003a5c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFocusEvent.cpp @@ -0,0 +1,159 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QFocusEvent_function_names[] = { + "QFocusEvent" + // static + // prototype + , "gotFocus" + , "lostFocus" + , "toString" +}; + +static const char * const qtscript_QFocusEvent_function_signatures[] = { + "Type type, FocusReason reason" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QFocusEvent_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QFocusEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFocusEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(Qt::FocusReason) +Q_DECLARE_METATYPE(QEvent*) + +// +// QFocusEvent +// + +static QScriptValue qtscript_QFocusEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFocusEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFocusEvent.%0(): this object is not a QFocusEvent") + .arg(qtscript_QFocusEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->gotFocus(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->lostFocus(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QFocusEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFocusEvent_throw_ambiguity_error_helper(context, + qtscript_QFocusEvent_function_names[_id+1], + qtscript_QFocusEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFocusEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFocusEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFocusEvent* _q_cpp_result = new QFocusEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::FocusReason _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFocusEvent* _q_cpp_result = new QFocusEvent(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFocusEvent_throw_ambiguity_error_helper(context, + qtscript_QFocusEvent_function_names[_id], + qtscript_QFocusEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QFocusEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFocusEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFocusEvent_prototype_call, qtscript_QFocusEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFocusEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFocusEvent_static_call, proto, qtscript_QFocusEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFont.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFont.cpp new file mode 100644 index 00000000..fb4545c3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFont.cpp @@ -0,0 +1,1476 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QFont_function_names[] = { + "QFont" + // static + , "cacheStatistics" + , "cleanup" + , "initialize" + , "insertSubstitution" + , "insertSubstitutions" + , "removeSubstitutions" + , "substitute" + , "substitutes" + , "substitutions" + // prototype + , "bold" + , "capitalization" + , "defaultFamily" + , "exactMatch" + , "family" + , "fixedPitch" + , "fromString" + , "isCopyOf" + , "italic" + , "kerning" + , "key" + , "lastResortFamily" + , "lastResortFont" + , "letterSpacing" + , "letterSpacingType" + , "equals" + , "operator_less" + , "overline" + , "pixelSize" + , "pointSize" + , "pointSizeF" + , "rawMode" + , "rawName" + , "resolve" + , "setBold" + , "setCapitalization" + , "setFamily" + , "setFixedPitch" + , "setItalic" + , "setKerning" + , "setLetterSpacing" + , "setOverline" + , "setPixelSize" + , "setPointSize" + , "setPointSizeF" + , "setRawMode" + , "setRawName" + , "setStretch" + , "setStrikeOut" + , "setStyle" + , "setStyleHint" + , "setStyleName" + , "setStyleStrategy" + , "setUnderline" + , "setWeight" + , "setWordSpacing" + , "stretch" + , "strikeOut" + , "style" + , "styleHint" + , "styleName" + , "styleStrategy" + , "swap" + , "toString" + , "underline" + , "weight" + , "wordSpacing" +}; + +static const char * const qtscript_QFont_function_signatures[] = { + "\nQFont arg__1\nQFont arg__1, QPaintDevice pd\nString family, int pointSize, int weight, bool italic" + // static + , "" + , "" + , "" + , "String arg__1, String arg__2" + , "String arg__1, List arg__2" + , "String arg__1" + , "String arg__1" + , "String arg__1" + , "" + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "String arg__1" + , "QFont arg__1" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QFont arg__1" + , "QFont arg__1" + , "" + , "" + , "" + , "" + , "" + , "" + , "\nQFont arg__1\nuint mask" + , "bool arg__1" + , "Capitalization arg__1" + , "String arg__1" + , "bool arg__1" + , "bool b" + , "bool arg__1" + , "SpacingType type, qreal spacing" + , "bool arg__1" + , "int arg__1" + , "int arg__1" + , "qreal arg__1" + , "bool arg__1" + , "String arg__1" + , "int arg__1" + , "bool arg__1" + , "Style style" + , "StyleHint arg__1, StyleStrategy arg__2" + , "String arg__1" + , "StyleStrategy s" + , "bool arg__1" + , "int arg__1" + , "qreal spacing" + , "" + , "" + , "" + , "" + , "" + , "" + , "QFont other" + , "" + , "" + , "" + , "" +}; + +static const int qtscript_QFont_function_lengths[] = { + 4 + // static + , 0 + , 0 + , 0 + , 2 + , 2 + , 1 + , 1 + , 1 + , 0 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QFont_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFont::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFont*) +Q_DECLARE_METATYPE(QFont::StyleStrategy) +Q_DECLARE_METATYPE(QFont::Stretch) +Q_DECLARE_METATYPE(QFont::Weight) +Q_DECLARE_METATYPE(QFont::Style) +Q_DECLARE_METATYPE(QFont::StyleHint) +Q_DECLARE_METATYPE(QFont::Capitalization) +Q_DECLARE_METATYPE(QFont::SpacingType) +Q_DECLARE_METATYPE(QPaintDevice*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QFont::StyleStrategy +// + +static const QFont::StyleStrategy qtscript_QFont_StyleStrategy_values[] = { + QFont::PreferDefault + , QFont::PreferBitmap + , QFont::PreferDevice + , QFont::PreferOutline + , QFont::ForceOutline + , QFont::PreferMatch + , QFont::PreferQuality + , QFont::PreferAntialias + , QFont::NoAntialias + , QFont::OpenGLCompatible + , QFont::ForceIntegerMetrics + , QFont::NoSubpixelAntialias + , QFont::NoFontMerging +}; + +static const char * const qtscript_QFont_StyleStrategy_keys[] = { + "PreferDefault" + , "PreferBitmap" + , "PreferDevice" + , "PreferOutline" + , "ForceOutline" + , "PreferMatch" + , "PreferQuality" + , "PreferAntialias" + , "NoAntialias" + , "OpenGLCompatible" + , "ForceIntegerMetrics" + , "NoSubpixelAntialias" + , "NoFontMerging" +}; + +static QString qtscript_QFont_StyleStrategy_toStringHelper(QFont::StyleStrategy value) +{ + for (int i = 0; i < 13; ++i) { + if (qtscript_QFont_StyleStrategy_values[i] == value) + return QString::fromLatin1(qtscript_QFont_StyleStrategy_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QFont_StyleStrategy_toScriptValue(QScriptEngine *engine, const QFont::StyleStrategy &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFont")); + return clazz.property(qtscript_QFont_StyleStrategy_toStringHelper(value)); +} + +static void qtscript_QFont_StyleStrategy_fromScriptValue(const QScriptValue &value, QFont::StyleStrategy &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFont_StyleStrategy(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 13; ++i) { + if (qtscript_QFont_StyleStrategy_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("StyleStrategy(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFont_StyleStrategy_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFont::StyleStrategy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFont_StyleStrategy_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFont::StyleStrategy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFont_StyleStrategy_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFont_StyleStrategy_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFont_StyleStrategy, + qtscript_QFont_StyleStrategy_valueOf, qtscript_QFont_StyleStrategy_toString); + qScriptRegisterMetaType(engine, qtscript_QFont_StyleStrategy_toScriptValue, + qtscript_QFont_StyleStrategy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 13; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFont_StyleStrategy_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFont_StyleStrategy_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFont::Stretch +// + +static const QFont::Stretch qtscript_QFont_Stretch_values[] = { + QFont::UltraCondensed + , QFont::ExtraCondensed + , QFont::Condensed + , QFont::SemiCondensed + , QFont::Unstretched + , QFont::SemiExpanded + , QFont::Expanded + , QFont::ExtraExpanded + , QFont::UltraExpanded +}; + +static const char * const qtscript_QFont_Stretch_keys[] = { + "UltraCondensed" + , "ExtraCondensed" + , "Condensed" + , "SemiCondensed" + , "Unstretched" + , "SemiExpanded" + , "Expanded" + , "ExtraExpanded" + , "UltraExpanded" +}; + +static QString qtscript_QFont_Stretch_toStringHelper(QFont::Stretch value) +{ + for (int i = 0; i < 9; ++i) { + if (qtscript_QFont_Stretch_values[i] == value) + return QString::fromLatin1(qtscript_QFont_Stretch_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QFont_Stretch_toScriptValue(QScriptEngine *engine, const QFont::Stretch &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFont")); + return clazz.property(qtscript_QFont_Stretch_toStringHelper(value)); +} + +static void qtscript_QFont_Stretch_fromScriptValue(const QScriptValue &value, QFont::Stretch &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFont_Stretch(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 9; ++i) { + if (qtscript_QFont_Stretch_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Stretch(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFont_Stretch_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFont::Stretch value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFont_Stretch_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFont::Stretch value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFont_Stretch_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFont_Stretch_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFont_Stretch, + qtscript_QFont_Stretch_valueOf, qtscript_QFont_Stretch_toString); + qScriptRegisterMetaType(engine, qtscript_QFont_Stretch_toScriptValue, + qtscript_QFont_Stretch_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 9; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFont_Stretch_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFont_Stretch_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFont::Weight +// + +static const QFont::Weight qtscript_QFont_Weight_values[] = { + QFont::Thin + , QFont::ExtraLight + , QFont::Light + , QFont::Normal + , QFont::Medium + , QFont::DemiBold + , QFont::Bold + , QFont::ExtraBold + , QFont::Black +}; + +static const char * const qtscript_QFont_Weight_keys[] = { + "Thin" + , "ExtraLight" + , "Light" + , "Normal" + , "Medium" + , "DemiBold" + , "Bold" + , "ExtraBold" + , "Black" +}; + +static QString qtscript_QFont_Weight_toStringHelper(QFont::Weight value) +{ + for (int i = 0; i < 9; ++i) { + if (qtscript_QFont_Weight_values[i] == value) + return QString::fromLatin1(qtscript_QFont_Weight_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QFont_Weight_toScriptValue(QScriptEngine *engine, const QFont::Weight &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFont")); + return clazz.property(qtscript_QFont_Weight_toStringHelper(value)); +} + +static void qtscript_QFont_Weight_fromScriptValue(const QScriptValue &value, QFont::Weight &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFont_Weight(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 9; ++i) { + if (qtscript_QFont_Weight_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Weight(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFont_Weight_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFont::Weight value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFont_Weight_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFont::Weight value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFont_Weight_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFont_Weight_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFont_Weight, + qtscript_QFont_Weight_valueOf, qtscript_QFont_Weight_toString); + qScriptRegisterMetaType(engine, qtscript_QFont_Weight_toScriptValue, + qtscript_QFont_Weight_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 9; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFont_Weight_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFont_Weight_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFont::Style +// + +static const QFont::Style qtscript_QFont_Style_values[] = { + QFont::StyleNormal + , QFont::StyleItalic + , QFont::StyleOblique +}; + +static const char * const qtscript_QFont_Style_keys[] = { + "StyleNormal" + , "StyleItalic" + , "StyleOblique" +}; + +static QString qtscript_QFont_Style_toStringHelper(QFont::Style value) +{ + if ((value >= QFont::StyleNormal) && (value <= QFont::StyleOblique)) + return qtscript_QFont_Style_keys[static_cast(value)-static_cast(QFont::StyleNormal)]; + return QString(); +} + +static QScriptValue qtscript_QFont_Style_toScriptValue(QScriptEngine *engine, const QFont::Style &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFont")); + return clazz.property(qtscript_QFont_Style_toStringHelper(value)); +} + +static void qtscript_QFont_Style_fromScriptValue(const QScriptValue &value, QFont::Style &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFont_Style(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QFont::StyleNormal) && (arg <= QFont::StyleOblique)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Style(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFont_Style_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFont::Style value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFont_Style_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFont::Style value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFont_Style_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFont_Style_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFont_Style, + qtscript_QFont_Style_valueOf, qtscript_QFont_Style_toString); + qScriptRegisterMetaType(engine, qtscript_QFont_Style_toScriptValue, + qtscript_QFont_Style_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFont_Style_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFont_Style_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFont::StyleHint +// + +static const QFont::StyleHint qtscript_QFont_StyleHint_values[] = { + QFont::Helvetica + , QFont::Times + , QFont::Courier + , QFont::OldEnglish + , QFont::System + , QFont::AnyStyle + , QFont::Cursive + , QFont::Monospace + , QFont::Fantasy +}; + +static const char * const qtscript_QFont_StyleHint_keys[] = { + "Helvetica" + , "Times" + , "Courier" + , "OldEnglish" + , "System" + , "AnyStyle" + , "Cursive" + , "Monospace" + , "Fantasy" +}; + +static QString qtscript_QFont_StyleHint_toStringHelper(QFont::StyleHint value) +{ + if ((value >= QFont::Helvetica) && (value <= QFont::Fantasy)) + return qtscript_QFont_StyleHint_keys[static_cast(value)-static_cast(QFont::Helvetica)]; + return QString(); +} + +static QScriptValue qtscript_QFont_StyleHint_toScriptValue(QScriptEngine *engine, const QFont::StyleHint &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFont")); + return clazz.property(qtscript_QFont_StyleHint_toStringHelper(value)); +} + +static void qtscript_QFont_StyleHint_fromScriptValue(const QScriptValue &value, QFont::StyleHint &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFont_StyleHint(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QFont::Helvetica) && (arg <= QFont::Fantasy)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleHint(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFont_StyleHint_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFont::StyleHint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFont_StyleHint_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFont::StyleHint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFont_StyleHint_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFont_StyleHint_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFont_StyleHint, + qtscript_QFont_StyleHint_valueOf, qtscript_QFont_StyleHint_toString); + qScriptRegisterMetaType(engine, qtscript_QFont_StyleHint_toScriptValue, + qtscript_QFont_StyleHint_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 9; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFont_StyleHint_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFont_StyleHint_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFont::Capitalization +// + +static const QFont::Capitalization qtscript_QFont_Capitalization_values[] = { + QFont::MixedCase + , QFont::AllUppercase + , QFont::AllLowercase + , QFont::SmallCaps + , QFont::Capitalize +}; + +static const char * const qtscript_QFont_Capitalization_keys[] = { + "MixedCase" + , "AllUppercase" + , "AllLowercase" + , "SmallCaps" + , "Capitalize" +}; + +static QString qtscript_QFont_Capitalization_toStringHelper(QFont::Capitalization value) +{ + if ((value >= QFont::MixedCase) && (value <= QFont::Capitalize)) + return qtscript_QFont_Capitalization_keys[static_cast(value)-static_cast(QFont::MixedCase)]; + return QString(); +} + +static QScriptValue qtscript_QFont_Capitalization_toScriptValue(QScriptEngine *engine, const QFont::Capitalization &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFont")); + return clazz.property(qtscript_QFont_Capitalization_toStringHelper(value)); +} + +static void qtscript_QFont_Capitalization_fromScriptValue(const QScriptValue &value, QFont::Capitalization &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFont_Capitalization(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QFont::MixedCase) && (arg <= QFont::Capitalize)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Capitalization(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFont_Capitalization_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFont::Capitalization value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFont_Capitalization_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFont::Capitalization value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFont_Capitalization_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFont_Capitalization_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFont_Capitalization, + qtscript_QFont_Capitalization_valueOf, qtscript_QFont_Capitalization_toString); + qScriptRegisterMetaType(engine, qtscript_QFont_Capitalization_toScriptValue, + qtscript_QFont_Capitalization_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFont_Capitalization_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFont_Capitalization_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFont::SpacingType +// + +static const QFont::SpacingType qtscript_QFont_SpacingType_values[] = { + QFont::PercentageSpacing + , QFont::AbsoluteSpacing +}; + +static const char * const qtscript_QFont_SpacingType_keys[] = { + "PercentageSpacing" + , "AbsoluteSpacing" +}; + +static QString qtscript_QFont_SpacingType_toStringHelper(QFont::SpacingType value) +{ + if ((value >= QFont::PercentageSpacing) && (value <= QFont::AbsoluteSpacing)) + return qtscript_QFont_SpacingType_keys[static_cast(value)-static_cast(QFont::PercentageSpacing)]; + return QString(); +} + +static QScriptValue qtscript_QFont_SpacingType_toScriptValue(QScriptEngine *engine, const QFont::SpacingType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFont")); + return clazz.property(qtscript_QFont_SpacingType_toStringHelper(value)); +} + +static void qtscript_QFont_SpacingType_fromScriptValue(const QScriptValue &value, QFont::SpacingType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFont_SpacingType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QFont::PercentageSpacing) && (arg <= QFont::AbsoluteSpacing)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SpacingType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFont_SpacingType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFont::SpacingType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFont_SpacingType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFont::SpacingType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFont_SpacingType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFont_SpacingType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFont_SpacingType, + qtscript_QFont_SpacingType_valueOf, qtscript_QFont_SpacingType_toString); + qScriptRegisterMetaType(engine, qtscript_QFont_SpacingType_toScriptValue, + qtscript_QFont_SpacingType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFont_SpacingType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFont_SpacingType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFont +// + +static QScriptValue qtscript_QFont_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 57; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFont* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFont.%0(): this object is not a QFont") + .arg(qtscript_QFont_function_names[_id+10])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->bold(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QFont::Capitalization _q_result = _q_self->capitalization(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->defaultFamily(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->exactMatch(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->family(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->fixedPitch(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->fromString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isCopyOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->italic(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->kerning(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->key(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->lastResortFamily(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->lastResortFont(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->letterSpacing(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QFont::SpacingType _q_result = _q_self->letterSpacingType(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator<(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->overline(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + int _q_result = _q_self->pixelSize(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + int _q_result = _q_self->pointSize(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->pointSizeF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->rawMode(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->rawName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + uint _q_result = _q_self->resolve(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFont _q_result = _q_self->resolve(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + uint _q_arg0 = context->argument(0).toUInt32(); + _q_self->resolve(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 24: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setBold(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QFont::Capitalization _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCapitalization(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setFamily(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setFixedPitch(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setItalic(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setKerning(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 2) { + QFont::SpacingType _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setLetterSpacing(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setOverline(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setPixelSize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setPointSize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPointSizeF(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setRawMode(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setRawName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setStretch(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setStrikeOut(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 39: + if (context->argumentCount() == 1) { + QFont::Style _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStyle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 1) { + QFont::StyleHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStyleHint(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QFont::StyleHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFont::StyleStrategy _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setStyleHint(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setStyleName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 42: + if (context->argumentCount() == 1) { + QFont::StyleStrategy _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStyleStrategy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 43: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setUnderline(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 44: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setWeight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 45: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWordSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 46: + if (context->argumentCount() == 0) { + int _q_result = _q_self->stretch(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 47: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->strikeOut(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 48: + if (context->argumentCount() == 0) { + QFont::Style _q_result = _q_self->style(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 49: + if (context->argumentCount() == 0) { + QFont::StyleHint _q_result = _q_self->styleHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 50: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->styleName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 51: + if (context->argumentCount() == 0) { + QFont::StyleStrategy _q_result = _q_self->styleStrategy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 52: + if (context->argumentCount() == 1) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 53: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 54: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->underline(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 55: + if (context->argumentCount() == 0) { + int _q_result = _q_self->weight(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 56: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->wordSpacing(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFont_throw_ambiguity_error_helper(context, + qtscript_QFont_function_names[_id+10], + qtscript_QFont_function_signatures[_id+10]); +} + +static QScriptValue qtscript_QFont_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFont(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QFont _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFont _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QFont _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPaintDevice* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFont _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString() + && context->argument(1).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + QFont _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QFont _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + bool _q_arg3 = context->argument(3).toBoolean(); + QFont _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QFont::cacheStatistics(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QFont::cleanup(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QFont::initialize(); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QFont::insertSubstitution(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + QFont::insertSubstitutions(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QFont::removeSubstitutions(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = QFont::substitute(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_result = QFont::substitutes(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QStringList _q_result = QFont::substitutions(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFont_throw_ambiguity_error_helper(context, + qtscript_QFont_function_names[_id], + qtscript_QFont_function_signatures[_id]); +} + +QScriptValue qtscript_create_QFont_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFont*)0)); + for (int i = 0; i < 57; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFont_prototype_call, qtscript_QFont_function_lengths[i+10]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFont_function_names[i+10]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFont_static_call, proto, qtscript_QFont_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFont_static_call, + qtscript_QFont_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QFont_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("StyleStrategy"), + qtscript_create_QFont_StyleStrategy_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Stretch"), + qtscript_create_QFont_Stretch_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Weight"), + qtscript_create_QFont_Weight_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Style"), + qtscript_create_QFont_Style_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleHint"), + qtscript_create_QFont_StyleHint_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Capitalization"), + qtscript_create_QFont_Capitalization_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("SpacingType"), + qtscript_create_QFont_SpacingType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFontInfo.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFontInfo.cpp new file mode 100644 index 00000000..ece5ea81 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFontInfo.cpp @@ -0,0 +1,311 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QFontInfo_function_names[] = { + "QFontInfo" + // static + // prototype + , "bold" + , "exactMatch" + , "family" + , "fixedPitch" + , "italic" + , "overline" + , "pixelSize" + , "pointSize" + , "pointSizeF" + , "rawMode" + , "strikeOut" + , "style" + , "styleHint" + , "styleName" + , "swap" + , "underline" + , "weight" + , "toString" +}; + +static const char * const qtscript_QFontInfo_function_signatures[] = { + "QFont arg__1\nQFontInfo arg__1" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QFontInfo other" + , "" + , "" +"" +}; + +static const int qtscript_QFontInfo_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QFontInfo_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFontInfo::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFontInfo*) +Q_DECLARE_METATYPE(QFont::Style) +Q_DECLARE_METATYPE(QFont::StyleHint) + +// +// QFontInfo +// + +static QScriptValue qtscript_QFontInfo_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 17; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFontInfo* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFontInfo.%0(): this object is not a QFontInfo") + .arg(qtscript_QFontInfo_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->bold(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->exactMatch(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->family(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->fixedPitch(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->italic(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->overline(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = _q_self->pixelSize(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->pointSize(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->pointSizeF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->rawMode(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->strikeOut(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QFont::Style _q_result = _q_self->style(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QFont::StyleHint _q_result = _q_self->styleHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->styleName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QFontInfo _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->underline(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + int _q_result = _q_self->weight(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: { + QString result = QString::fromLatin1("QFontInfo"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFontInfo_throw_ambiguity_error_helper(context, + qtscript_QFontInfo_function_names[_id+1], + qtscript_QFontInfo_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFontInfo_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFontInfo(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFontInfo* _q_cpp_result = new QFontInfo(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + + QFontInfo & _q_arg0 = *qscriptvalue_cast(context->argument(0)); + QFontInfo* _q_cpp_result = new QFontInfo(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFontInfo_throw_ambiguity_error_helper(context, + qtscript_QFontInfo_function_names[_id], + qtscript_QFontInfo_function_signatures[_id]); +} + +QScriptValue qtscript_create_QFontInfo_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFontInfo*)0)); + for (int i = 0; i < 18; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFontInfo_prototype_call, qtscript_QFontInfo_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFontInfo_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFontInfo_static_call, proto, qtscript_QFontInfo_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFontMetrics.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFontMetrics.cpp new file mode 100644 index 00000000..b1c1eb38 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFontMetrics.cpp @@ -0,0 +1,463 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QFontMetrics_function_names[] = { + "QFontMetrics" + // static + // prototype + , "ascent" + , "averageCharWidth" + , "boundingRect" + , "charWidth" + , "descent" + , "elidedText" + , "height" + , "inFont" + , "inFontUcs4" + , "leading" + , "leftBearing" + , "lineSpacing" + , "lineWidth" + , "maxWidth" + , "minLeftBearing" + , "minRightBearing" + , "overlinePos" + , "rightBearing" + , "size" + , "strikeOutPos" + , "swap" + , "tightBoundingRect" + , "underlinePos" + , "width" + , "xHeight" + , "toString" +}; + +static const char * const qtscript_QFontMetrics_function_signatures[] = { + "QFont arg__1\nQFont arg__1, QPaintDevice pd" + // static + // prototype + , "" + , "" + , "char arg__1\nQRect r, int flags, String text, int tabstops, int tabarray\nString text\nint x, int y, int w, int h, int flags, String text, int tabstops, int tabarray" + , "String str, int pos" + , "" + , "String text, TextElideMode mode, int width, int flags" + , "" + , "char arg__1" + , "uint ucs4" + , "" + , "char arg__1" + , "" + , "" + , "" + , "" + , "" + , "" + , "char arg__1" + , "int flags, String str, int tabstops, int tabarray" + , "" + , "QFontMetrics other" + , "String text" + , "" + , "char arg__1\nString arg__1, int len\nString arg__1, int len, int flags" + , "" +"" +}; + +static const int qtscript_QFontMetrics_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 8 + , 2 + , 0 + , 4 + , 0 + , 1 + , 1 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 4 + , 0 + , 1 + , 1 + , 0 + , 3 + , 0 + , 0 +}; + +static QScriptValue qtscript_QFontMetrics_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFontMetrics::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFontMetrics*) +Q_DECLARE_METATYPE(int*) +Q_DECLARE_METATYPE(Qt::TextElideMode) +Q_DECLARE_METATYPE(QPaintDevice*) + +// +// QFontMetrics +// + +static QScriptValue qtscript_QFontMetrics_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 25; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFontMetrics* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFontMetrics.%0(): this object is not a QFontMetrics") + .arg(qtscript_QFontMetrics_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->ascent(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->averageCharWidth(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QChar _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->boundingRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QRect _q_result = _q_self->boundingRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 5) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QString _q_arg2 = context->argument(2).toString(); + int _q_arg3 = context->argument(3).toInt32(); + int* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QRect _q_result = _q_self->boundingRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 8) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + QString _q_arg5 = context->argument(5).toString(); + int _q_arg6 = context->argument(6).toInt32(); + int* _q_arg7 = qscriptvalue_cast(context->argument(7)); + QRect _q_result = _q_self->boundingRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->charWidth(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->descent(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + Qt::TextElideMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QString _q_result = _q_self->elidedText(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QString _q_arg0 = context->argument(0).toString(); + Qt::TextElideMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QString _q_result = _q_self->elidedText(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = _q_self->height(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QChar _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->inFont(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + bool _q_result = _q_self->inFontUcs4(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->leading(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QChar _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->leftBearing(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + int _q_result = _q_self->lineSpacing(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + int _q_result = _q_self->lineWidth(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + int _q_result = _q_self->maxWidth(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + int _q_result = _q_self->minLeftBearing(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + int _q_result = _q_self->minRightBearing(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + int _q_result = _q_self->overlinePos(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QChar _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->rightBearing(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + int _q_arg2 = context->argument(2).toInt32(); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + QSize _q_result = _q_self->size(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + int _q_result = _q_self->strikeOutPos(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QFontMetrics _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QRect _q_result = _q_self->tightBoundingRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + int _q_result = _q_self->underlinePos(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QChar _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->width(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + int _q_result = _q_self->width(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->width(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_result = _q_self->width(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + int _q_result = _q_self->xHeight(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: { + QString result = QString::fromLatin1("QFontMetrics"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFontMetrics_throw_ambiguity_error_helper(context, + qtscript_QFontMetrics_function_names[_id+1], + qtscript_QFontMetrics_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFontMetrics_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFontMetrics(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFontMetrics* _q_cpp_result = new QFontMetrics(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPaintDevice* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFontMetrics* _q_cpp_result = new QFontMetrics(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFontMetrics_throw_ambiguity_error_helper(context, + qtscript_QFontMetrics_function_names[_id], + qtscript_QFontMetrics_function_signatures[_id]); +} + +QScriptValue qtscript_create_QFontMetrics_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFontMetrics*)0)); + for (int i = 0; i < 26; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFontMetrics_prototype_call, qtscript_QFontMetrics_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFontMetrics_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFontMetrics_static_call, proto, qtscript_QFontMetrics_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFontMetricsF.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFontMetricsF.cpp new file mode 100644 index 00000000..c34624f7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QFontMetricsF.cpp @@ -0,0 +1,426 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QFontMetricsF_function_names[] = { + "QFontMetricsF" + // static + // prototype + , "ascent" + , "averageCharWidth" + , "boundingRect" + , "descent" + , "elidedText" + , "height" + , "inFont" + , "inFontUcs4" + , "leading" + , "leftBearing" + , "lineSpacing" + , "lineWidth" + , "maxWidth" + , "minLeftBearing" + , "minRightBearing" + , "overlinePos" + , "rightBearing" + , "size" + , "strikeOutPos" + , "swap" + , "tightBoundingRect" + , "underlinePos" + , "width" + , "xHeight" + , "toString" +}; + +static const char * const qtscript_QFontMetricsF_function_signatures[] = { + "QFont arg__1\nQFont arg__1, QPaintDevice pd" + // static + // prototype + , "" + , "" + , "char arg__1\nQRectF r, int flags, String string, int tabstops, int tabarray\nString string" + , "" + , "String text, TextElideMode mode, qreal width, int flags" + , "" + , "char arg__1" + , "uint ucs4" + , "" + , "char arg__1" + , "" + , "" + , "" + , "" + , "" + , "" + , "char arg__1" + , "int flags, String str, int tabstops, int tabarray" + , "" + , "QFontMetricsF other" + , "String text" + , "" + , "char arg__1\nString string" + , "" +"" +}; + +static const int qtscript_QFontMetricsF_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 5 + , 0 + , 4 + , 0 + , 1 + , 1 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 4 + , 0 + , 1 + , 1 + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QFontMetricsF_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFontMetricsF::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFontMetricsF*) +Q_DECLARE_METATYPE(int*) +Q_DECLARE_METATYPE(Qt::TextElideMode) +Q_DECLARE_METATYPE(QPaintDevice*) + +// +// QFontMetricsF +// + +static QScriptValue qtscript_QFontMetricsF_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 24; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFontMetricsF* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFontMetricsF.%0(): this object is not a QFontMetricsF") + .arg(qtscript_QFontMetricsF_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->ascent(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->averageCharWidth(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QChar _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->boundingRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QRectF _q_result = _q_self->boundingRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 5) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QString _q_arg2 = context->argument(2).toString(); + int _q_arg3 = context->argument(3).toInt32(); + int* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QRectF _q_result = _q_self->boundingRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->descent(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + Qt::TextElideMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + QString _q_result = _q_self->elidedText(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QString _q_arg0 = context->argument(0).toString(); + Qt::TextElideMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + QString _q_result = _q_self->elidedText(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->height(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QChar _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->inFont(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + bool _q_result = _q_self->inFontUcs4(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->leading(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QChar _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->leftBearing(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->lineSpacing(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->lineWidth(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->maxWidth(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->minLeftBearing(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->minRightBearing(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->overlinePos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QChar _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->rightBearing(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + int _q_arg2 = context->argument(2).toInt32(); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + QSizeF _q_result = _q_self->size(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->strikeOutPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QFontMetricsF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QRectF _q_result = _q_self->tightBoundingRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->underlinePos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QChar _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->width(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + qreal _q_result = _q_self->width(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 23: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->xHeight(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: { + QString result = QString::fromLatin1("QFontMetricsF"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFontMetricsF_throw_ambiguity_error_helper(context, + qtscript_QFontMetricsF_function_names[_id+1], + qtscript_QFontMetricsF_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFontMetricsF_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFontMetricsF(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFontMetricsF* _q_cpp_result = new QFontMetricsF(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPaintDevice* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFontMetricsF* _q_cpp_result = new QFontMetricsF(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFontMetricsF_throw_ambiguity_error_helper(context, + qtscript_QFontMetricsF_function_names[_id], + qtscript_QFontMetricsF_function_signatures[_id]); +} + +QScriptValue qtscript_create_QFontMetricsF_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFontMetricsF*)0)); + for (int i = 0; i < 25; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFontMetricsF_prototype_call, qtscript_QFontMetricsF_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFontMetricsF_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFontMetricsF_static_call, proto, qtscript_QFontMetricsF_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QGradient.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QGradient.cpp new file mode 100644 index 00000000..39205ff6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QGradient.cpp @@ -0,0 +1,344 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QGradient_function_names[] = { + "QGradient" + // static + // prototype + , "coordinateMode" + , "equals" + , "setColorAt" + , "setCoordinateMode" + , "setSpread" + , "setStops" + , "spread" + , "stops" + , "type" + , "toString" +}; + +static const char * const qtscript_QGradient_function_signatures[] = { + "" + // static + // prototype + , "" + , "QGradient gradient" + , "qreal pos, QColor color" + , "CoordinateMode mode" + , "Spread spread" + , "List stops" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QGradient_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 1 + , 2 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGradient_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGradient::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGradient) +Q_DECLARE_METATYPE(QGradient*) +Q_DECLARE_METATYPE(QGradient::Type) +Q_DECLARE_METATYPE(QGradient::CoordinateMode) +Q_DECLARE_METATYPE(QGradient::Spread) +template <> \ +struct QMetaTypeId< QPair > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QPair >("QPair")); \ + return metatype_id.load(); \ + } \ +}; +template <> \ +struct QMetaTypeId< QVector > > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QVector > >("QVector >")); \ + return metatype_id.load(); \ + } \ +}; + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QGradient::Type +// + +static const QGradient::Type qtscript_QGradient_Type_values[] = { + QGradient::LinearGradient + , QGradient::RadialGradient + , QGradient::ConicalGradient + , QGradient::NoGradient +}; + +static const char * const qtscript_QGradient_Type_keys[] = { + "LinearGradient" + , "RadialGradient" + , "ConicalGradient" + , "NoGradient" +}; + +static QString qtscript_QGradient_Type_toStringHelper(QGradient::Type value) +{ + if ((value >= QGradient::LinearGradient) && (value <= QGradient::NoGradient)) + return qtscript_QGradient_Type_keys[static_cast(value)-static_cast(QGradient::LinearGradient)]; + return QString(); +} + +static QScriptValue qtscript_QGradient_Type_toScriptValue(QScriptEngine *engine, const QGradient::Type &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGradient")); + return clazz.property(qtscript_QGradient_Type_toStringHelper(value)); +} + +static void qtscript_QGradient_Type_fromScriptValue(const QScriptValue &value, QGradient::Type &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGradient_Type(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QGradient::LinearGradient) && (arg <= QGradient::NoGradient)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Type(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGradient_Type_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGradient::Type value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGradient_Type_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGradient::Type value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGradient_Type_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGradient_Type_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGradient_Type, + qtscript_QGradient_Type_valueOf, qtscript_QGradient_Type_toString); + qScriptRegisterMetaType(engine, qtscript_QGradient_Type_toScriptValue, + qtscript_QGradient_Type_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGradient_Type_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGradient_Type_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGradient +// + +static QScriptValue qtscript_QGradient_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 9; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGradient* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGradient.%0(): this object is not a QGradient") + .arg(qtscript_QGradient_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QGradient::CoordinateMode _q_result = _q_self->coordinateMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QGradient _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QColor _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setColorAt(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QGradient::CoordinateMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCoordinateMode(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QGradient::Spread _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSpread(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QVector > _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setStops(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QGradient::Spread _q_result = _q_self->spread(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QVector > _q_result = _q_self->stops(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QGradient::Type _q_result = _q_self->type(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: { + QString result = QString::fromLatin1("QGradient"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGradient_throw_ambiguity_error_helper(context, + qtscript_QGradient_function_names[_id+1], + qtscript_QGradient_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGradient_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGradient(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QGradient _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGradient_throw_ambiguity_error_helper(context, + qtscript_QGradient_function_names[_id], + qtscript_QGradient_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGradient_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGradient*)0)); + for (int i = 0; i < 10; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGradient_prototype_call, qtscript_QGradient_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGradient_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGradient_static_call, proto, qtscript_QGradient_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Type"), + qtscript_create_QGradient_Type_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QGuiApplication.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QGuiApplication.cpp new file mode 100644 index 00000000..dbc5dbd0 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QGuiApplication.cpp @@ -0,0 +1,436 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGuiApplication.h" + +static const char * const qtscript_QGuiApplication_function_names[] = { + "QGuiApplication" + // static + , "changeOverrideCursor" + , "clipboard" + , "desktopSettingsAware" + , "focusObject" + , "font" + , "isFallbackSessionManagementEnabled" + , "isLeftToRight" + , "isRightToLeft" + , "keyboardModifiers" + , "mouseButtons" + , "overrideCursor" + , "palette" + , "queryKeyboardModifiers" + , "restoreOverrideCursor" + , "setDesktopSettingsAware" + , "setFallbackSessionManagementEnabled" + , "setFont" + , "setOverrideCursor" + , "setPalette" + , "sync" + // prototype + , "devicePixelRatio" + , "isSavingSession" + , "isSessionRestored" + , "sessionId" + , "sessionKey" + , "toString" +}; + +static const char * const qtscript_QGuiApplication_function_signatures[] = { + "int argc, char argv, int arg__3" + // static + , "QCursor arg__1" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "bool on" + , "bool arg__1" + , "QFont arg__1" + , "QCursor arg__1" + , "QPalette pal" + , "" + // prototype + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QGuiApplication_function_lengths[] = { + 3 + // static + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGuiApplication_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGuiApplication::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGuiApplication*) +Q_DECLARE_METATYPE(QtScriptShell_QGuiApplication*) +Q_DECLARE_METATYPE(QClipboard*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QCursor*) +Q_DECLARE_METATYPE(char**) +Q_DECLARE_METATYPE(QCoreApplication*) + +// +// QGuiApplication +// + +static QScriptValue qtscript_QGuiApplication_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGuiApplication* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGuiApplication.%0(): this object is not a QGuiApplication") + .arg(qtscript_QGuiApplication_function_names[_id+21])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->devicePixelRatio(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isSavingSession(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isSessionRestored(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->sessionId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->sessionKey(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: { + QString result = QString::fromLatin1("QGuiApplication"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGuiApplication_throw_ambiguity_error_helper(context, + qtscript_QGuiApplication_function_names[_id+21], + qtscript_QGuiApplication_function_signatures[_id+21]); +} + +static QScriptValue qtscript_QGuiApplication_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGuiApplication(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + char** _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGuiApplication* _q_cpp_result = new QtScriptShell_QGuiApplication(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGuiApplication*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + char** _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QtScriptShell_QGuiApplication* _q_cpp_result = new QtScriptShell_QGuiApplication(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGuiApplication*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGuiApplication::changeOverrideCursor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QClipboard* _q_result = QGuiApplication::clipboard(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = QGuiApplication::desktopSettingsAware(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QObject* _q_result = QGuiApplication::focusObject(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QFont _q_result = QGuiApplication::font(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = QGuiApplication::isFallbackSessionManagementEnabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = QGuiApplication::isLeftToRight(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = QGuiApplication::isRightToLeft(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QFlags _q_result = QGuiApplication::keyboardModifiers(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QFlags _q_result = QGuiApplication::mouseButtons(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QCursor* _q_result = QGuiApplication::overrideCursor(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QPalette _q_result = QGuiApplication::palette(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QFlags _q_result = QGuiApplication::queryKeyboardModifiers(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QGuiApplication::restoreOverrideCursor(); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + QGuiApplication::setDesktopSettingsAware(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + QGuiApplication::setFallbackSessionManagementEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGuiApplication::setFont(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGuiApplication::setOverrideCursor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QPalette _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGuiApplication::setPalette(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QGuiApplication::sync(); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGuiApplication_throw_ambiguity_error_helper(context, + qtscript_QGuiApplication_function_names[_id], + qtscript_QGuiApplication_function_signatures[_id]); +} + +static QScriptValue qtscript_QGuiApplication_toScriptValue(QScriptEngine *engine, QGuiApplication* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGuiApplication_fromScriptValue(const QScriptValue &value, QGuiApplication* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGuiApplication_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGuiApplication*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGuiApplication_prototype_call, qtscript_QGuiApplication_function_lengths[i+21]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGuiApplication_function_names[i+21]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGuiApplication_toScriptValue, + qtscript_QGuiApplication_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGuiApplication_static_call, proto, qtscript_QGuiApplication_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 20; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGuiApplication_static_call, + qtscript_QGuiApplication_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QGuiApplication_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QHelpEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QHelpEvent.cpp new file mode 100644 index 00000000..57804640 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QHelpEvent.cpp @@ -0,0 +1,195 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QHelpEvent_function_names[] = { + "QHelpEvent" + // static + // prototype + , "globalPos" + , "globalX" + , "globalY" + , "pos" + , "x" + , "y" + , "toString" +}; + +static const char * const qtscript_QHelpEvent_function_signatures[] = { + "Type type, QPoint pos, QPoint globalPos" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QHelpEvent_function_lengths[] = { + 3 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QHelpEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QHelpEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QHelpEvent*) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QEvent*) + +// +// QHelpEvent +// + +static QScriptValue qtscript_QHelpEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QHelpEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QHelpEvent.%0(): this object is not a QHelpEvent") + .arg(qtscript_QHelpEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + const QPoint& _q_result = _q_self->globalPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->globalX(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->globalY(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + const QPoint& _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->x(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->y(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: { + QString result = QString::fromLatin1("QHelpEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QHelpEvent_throw_ambiguity_error_helper(context, + qtscript_QHelpEvent_function_names[_id+1], + qtscript_QHelpEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QHelpEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QHelpEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 3) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPoint _q_arg2 = qscriptvalue_cast(context->argument(2)); + QHelpEvent* _q_cpp_result = new QHelpEvent(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QHelpEvent_throw_ambiguity_error_helper(context, + qtscript_QHelpEvent_function_names[_id], + qtscript_QHelpEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QHelpEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QHelpEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QHelpEvent_prototype_call, qtscript_QHelpEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QHelpEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QHelpEvent_static_call, proto, qtscript_QHelpEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QHideEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QHideEvent.cpp new file mode 100644 index 00000000..44ff7502 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QHideEvent.cpp @@ -0,0 +1,124 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QHideEvent_function_names[] = { + "QHideEvent" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QHideEvent_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QHideEvent_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QHideEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QHideEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QHideEvent +// + +static QScriptValue qtscript_QHideEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QHideEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QHideEvent.%0(): this object is not a QHideEvent") + .arg(qtscript_QHideEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QHideEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QHideEvent_throw_ambiguity_error_helper(context, + qtscript_QHideEvent_function_names[_id+1], + qtscript_QHideEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QHideEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QHideEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QHideEvent* _q_cpp_result = new QHideEvent(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QHideEvent_throw_ambiguity_error_helper(context, + qtscript_QHideEvent_function_names[_id], + qtscript_QHideEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QHideEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QHideEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QHideEvent_static_call, proto, qtscript_QHideEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QHoverEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QHoverEvent.cpp new file mode 100644 index 00000000..36726720 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QHoverEvent.cpp @@ -0,0 +1,189 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QHoverEvent.h" + +static const char * const qtscript_QHoverEvent_function_names[] = { + "QHoverEvent" + // static + // prototype + , "oldPos" + , "oldPosF" + , "pos" + , "posF" + , "toString" +}; + +static const char * const qtscript_QHoverEvent_function_signatures[] = { + "Type type, QPointF pos, QPointF oldPos, KeyboardModifiers modifiers" + // static + // prototype + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QHoverEvent_function_lengths[] = { + 4 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QHoverEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QHoverEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QHoverEvent*) +Q_DECLARE_METATYPE(QtScriptShell_QHoverEvent*) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QInputEvent*) + +// +// QHoverEvent +// + +static QScriptValue qtscript_QHoverEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QHoverEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QHoverEvent.%0(): this object is not a QHoverEvent") + .arg(qtscript_QHoverEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->oldPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + const QPointF& _q_result = _q_self->oldPosF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + const QPointF& _q_result = _q_self->posF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QHoverEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QHoverEvent_throw_ambiguity_error_helper(context, + qtscript_QHoverEvent_function_names[_id+1], + qtscript_QHoverEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QHoverEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QHoverEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 3) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QHoverEvent* _q_cpp_result = new QtScriptShell_QHoverEvent(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QHoverEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 4) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QtScriptShell_QHoverEvent* _q_cpp_result = new QtScriptShell_QHoverEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QHoverEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QHoverEvent_throw_ambiguity_error_helper(context, + qtscript_QHoverEvent_function_names[_id], + qtscript_QHoverEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QHoverEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QHoverEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QHoverEvent_prototype_call, qtscript_QHoverEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QHoverEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QHoverEvent_static_call, proto, qtscript_QHoverEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QIcon.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QIcon.cpp new file mode 100644 index 00000000..169dd218 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QIcon.cpp @@ -0,0 +1,716 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QIcon_function_names[] = { + "QIcon" + // static + , "fromTheme" + , "hasThemeIcon" + , "setThemeName" + , "setThemeSearchPaths" + , "themeName" + , "themeSearchPaths" + // prototype + , "actualSize" + , "addFile" + , "addPixmap" + , "availableSizes" + , "cacheKey" + , "isMask" + , "isNull" + , "name" + , "paint" + , "pixmap" + , "setIsMask" + , "swap" + , "toString" +}; + +static const char * const qtscript_QIcon_function_signatures[] = { + "\nQIcon other\nQPixmap pixmap\nString fileName" + // static + , "String name, QIcon fallback" + , "String name" + , "String path" + , "List searchpath" + , "" + , "" + // prototype + , "QSize size, Mode mode, State state" + , "String fileName, QSize size, Mode mode, State state" + , "QPixmap pixmap, Mode mode, State state" + , "Mode mode, State state" + , "" + , "" + , "" + , "" + , "QPainter painter, QRect rect, Alignment alignment, Mode mode, State state\nQPainter painter, int x, int y, int w, int h, Alignment alignment, Mode mode, State state" + , "QSize size, Mode mode, State state\nint extent, Mode mode, State state\nint w, int h, Mode mode, State state" + , "bool isMask" + , "QIcon other" +"" +}; + +static const int qtscript_QIcon_function_lengths[] = { + 1 + // static + , 2 + , 1 + , 1 + , 1 + , 0 + , 0 + // prototype + , 3 + , 4 + , 3 + , 2 + , 0 + , 0 + , 0 + , 0 + , 8 + , 4 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QIcon_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QIcon::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QIcon*) +Q_DECLARE_METATYPE(QIcon::State) +Q_DECLARE_METATYPE(QIcon::Mode) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QFlags) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QIcon::State +// + +static const QIcon::State qtscript_QIcon_State_values[] = { + QIcon::On + , QIcon::Off +}; + +static const char * const qtscript_QIcon_State_keys[] = { + "On" + , "Off" +}; + +static QString qtscript_QIcon_State_toStringHelper(QIcon::State value) +{ + if ((value >= QIcon::On) && (value <= QIcon::Off)) + return qtscript_QIcon_State_keys[static_cast(value)-static_cast(QIcon::On)]; + return QString(); +} + +static QScriptValue qtscript_QIcon_State_toScriptValue(QScriptEngine *engine, const QIcon::State &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QIcon")); + return clazz.property(qtscript_QIcon_State_toStringHelper(value)); +} + +static void qtscript_QIcon_State_fromScriptValue(const QScriptValue &value, QIcon::State &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QIcon_State(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QIcon::On) && (arg <= QIcon::Off)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("State(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QIcon_State_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QIcon::State value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QIcon_State_toString(QScriptContext *context, QScriptEngine *engine) +{ + QIcon::State value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QIcon_State_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QIcon_State_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QIcon_State, + qtscript_QIcon_State_valueOf, qtscript_QIcon_State_toString); + qScriptRegisterMetaType(engine, qtscript_QIcon_State_toScriptValue, + qtscript_QIcon_State_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QIcon_State_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QIcon_State_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QIcon::Mode +// + +static const QIcon::Mode qtscript_QIcon_Mode_values[] = { + QIcon::Normal + , QIcon::Disabled + , QIcon::Active + , QIcon::Selected +}; + +static const char * const qtscript_QIcon_Mode_keys[] = { + "Normal" + , "Disabled" + , "Active" + , "Selected" +}; + +static QString qtscript_QIcon_Mode_toStringHelper(QIcon::Mode value) +{ + if ((value >= QIcon::Normal) && (value <= QIcon::Selected)) + return qtscript_QIcon_Mode_keys[static_cast(value)-static_cast(QIcon::Normal)]; + return QString(); +} + +static QScriptValue qtscript_QIcon_Mode_toScriptValue(QScriptEngine *engine, const QIcon::Mode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QIcon")); + return clazz.property(qtscript_QIcon_Mode_toStringHelper(value)); +} + +static void qtscript_QIcon_Mode_fromScriptValue(const QScriptValue &value, QIcon::Mode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QIcon_Mode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QIcon::Normal) && (arg <= QIcon::Selected)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Mode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QIcon_Mode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QIcon::Mode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QIcon_Mode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QIcon::Mode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QIcon_Mode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QIcon_Mode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QIcon_Mode, + qtscript_QIcon_Mode_valueOf, qtscript_QIcon_Mode_toString); + qScriptRegisterMetaType(engine, qtscript_QIcon_Mode_toScriptValue, + qtscript_QIcon_Mode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QIcon_Mode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QIcon_Mode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QIcon +// + +static QScriptValue qtscript_QIcon_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 12; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QIcon* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QIcon.%0(): this object is not a QIcon") + .arg(qtscript_QIcon_function_names[_id+7])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSize _q_result = _q_self->actualSize(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIcon::Mode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QSize _q_result = _q_self->actualSize(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIcon::Mode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QIcon::State _q_arg2 = qscriptvalue_cast(context->argument(2)); + QSize _q_result = _q_self->actualSize(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->addFile(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QSize _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->addFile(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QSize _q_arg1 = qscriptvalue_cast(context->argument(1)); + QIcon::Mode _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->addFile(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + QString _q_arg0 = context->argument(0).toString(); + QSize _q_arg1 = qscriptvalue_cast(context->argument(1)); + QIcon::Mode _q_arg2 = qscriptvalue_cast(context->argument(2)); + QIcon::State _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->addFile(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addPixmap(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIcon::Mode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->addPixmap(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIcon::Mode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QIcon::State _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->addPixmap(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->availableSizes(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QIcon::Mode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->availableSizes(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QIcon::Mode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIcon::State _q_arg1 = qscriptvalue_cast(context->argument(1)); + QList _q_result = _q_self->availableSizes(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->cacheKey(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isMask(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->name(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 2) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->paint(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + _q_self->paint(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QIcon::Mode _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->paint(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId >() == context->argument(2).toVariant().userType()) + && (qMetaTypeId() == context->argument(3).toVariant().userType()) + && (qMetaTypeId() == context->argument(4).toVariant().userType())) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QIcon::Mode _q_arg3 = qscriptvalue_cast(context->argument(3)); + QIcon::State _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->paint(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber() + && context->argument(4).isNumber()) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + _q_self->paint(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 6) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + _q_self->paint(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 7) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + QIcon::Mode _q_arg6 = qscriptvalue_cast(context->argument(6)); + _q_self->paint(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 8) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + QIcon::Mode _q_arg6 = qscriptvalue_cast(context->argument(6)); + QIcon::State _q_arg7 = qscriptvalue_cast(context->argument(7)); + _q_self->paint(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_result = _q_self->pixmap(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QPixmap _q_result = _q_self->pixmap(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIcon::Mode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPixmap _q_result = _q_self->pixmap(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QIcon::Mode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPixmap _q_result = _q_self->pixmap(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QPixmap _q_result = _q_self->pixmap(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIcon::Mode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QIcon::State _q_arg2 = qscriptvalue_cast(context->argument(2)); + QPixmap _q_result = _q_self->pixmap(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QIcon::Mode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QIcon::State _q_arg2 = qscriptvalue_cast(context->argument(2)); + QPixmap _q_result = _q_self->pixmap(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QIcon::Mode _q_arg2 = qscriptvalue_cast(context->argument(2)); + QPixmap _q_result = _q_self->pixmap(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QIcon::Mode _q_arg2 = qscriptvalue_cast(context->argument(2)); + QIcon::State _q_arg3 = qscriptvalue_cast(context->argument(3)); + QPixmap _q_result = _q_self->pixmap(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setIsMask(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QIcon_throw_ambiguity_error_helper(context, + qtscript_QIcon_function_names[_id+7], + qtscript_QIcon_function_signatures[_id+7]); +} + +static QScriptValue qtscript_QIcon_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QIcon(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QIcon _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIcon _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIcon _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QIcon _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QIcon _q_result = QIcon::fromTheme(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QIcon _q_arg1 = qscriptvalue_cast(context->argument(1)); + QIcon _q_result = QIcon::fromTheme(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = QIcon::hasThemeIcon(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QIcon::setThemeName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QIcon::setThemeSearchPaths(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QString _q_result = QIcon::themeName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QStringList _q_result = QIcon::themeSearchPaths(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QIcon_throw_ambiguity_error_helper(context, + qtscript_QIcon_function_names[_id], + qtscript_QIcon_function_signatures[_id]); +} + +QScriptValue qtscript_create_QIcon_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QIcon*)0)); + for (int i = 0; i < 13; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QIcon_prototype_call, qtscript_QIcon_function_lengths[i+7]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QIcon_function_names[i+7]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QIcon_static_call, proto, qtscript_QIcon_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QIcon_static_call, + qtscript_QIcon_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QIcon_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("State"), + qtscript_create_QIcon_State_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Mode"), + qtscript_create_QIcon_Mode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QIconDragEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QIconDragEvent.cpp new file mode 100644 index 00000000..eba3d740 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QIconDragEvent.cpp @@ -0,0 +1,124 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QIconDragEvent_function_names[] = { + "QIconDragEvent" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QIconDragEvent_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QIconDragEvent_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QIconDragEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QIconDragEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QIconDragEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QIconDragEvent +// + +static QScriptValue qtscript_QIconDragEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QIconDragEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QIconDragEvent.%0(): this object is not a QIconDragEvent") + .arg(qtscript_QIconDragEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QIconDragEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QIconDragEvent_throw_ambiguity_error_helper(context, + qtscript_QIconDragEvent_function_names[_id+1], + qtscript_QIconDragEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QIconDragEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QIconDragEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QIconDragEvent* _q_cpp_result = new QIconDragEvent(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QIconDragEvent_throw_ambiguity_error_helper(context, + qtscript_QIconDragEvent_function_names[_id], + qtscript_QIconDragEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QIconDragEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QIconDragEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QIconDragEvent_static_call, proto, qtscript_QIconDragEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImage.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImage.cpp new file mode 100644 index 00000000..49ae8482 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImage.cpp @@ -0,0 +1,1293 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QImage.h" + +static const char * const qtscript_QImage_function_names[] = { + "QImage" + // static + , "fromData" + , "trueMatrix" + // prototype + , "allGray" + , "alphaChannel" + , "bitPlaneCount" + , "byteCount" + , "bytesPerLine" + , "cacheKey" + , "color" + , "colorTable" + , "constBits" + , "constScanLine" + , "convertToFormat" + , "copy" + , "createAlphaMask" + , "createHeuristicMask" + , "createMaskFromColor" + , "dotsPerMeterX" + , "dotsPerMeterY" + , "fill" + , "format" + , "hasAlphaChannel" + , "invertPixels" + , "isGrayscale" + , "isNull" + , "load" + , "loadFromData" + , "mirrored" + , "offset" + , "equals" + , "pixel" + , "pixelColor" + , "pixelIndex" + , "rect" + , "rgbSwapped" + , "save" + , "scaled" + , "scaledToHeight" + , "scaledToWidth" + , "setAlphaChannel" + , "setColor" + , "setColorCount" + , "setDevicePixelRatio" + , "setDotsPerMeterX" + , "setDotsPerMeterY" + , "setOffset" + , "setPixel" + , "setPixelColor" + , "setText" + , "size" + , "swap" + , "text" + , "textKeys" + , "transformed" + , "valid" + , "toString" +}; + +static const char * const qtscript_QImage_function_signatures[] = { + "\nQImage arg__1\nQSize size, Format format\nString fileName, char format\nint width, int height, Format format" + // static + , "QByteArray data, char format" + , "QMatrix arg__1, int w, int h\nQTransform arg__1, int w, int h" + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "int i" + , "" + , "" + , "int arg__1" + , "Format f, ImageConversionFlags flags\nFormat f, List colorTable, ImageConversionFlags flags" + , "QRect rect\nint x, int y, int w, int h" + , "ImageConversionFlags flags" + , "bool clipTight" + , "unsigned int color, MaskMode mode" + , "" + , "" + , "GlobalColor color\nQColor color\nuint pixel" + , "" + , "" + , "InvertMode arg__1" + , "" + , "" + , "QIODevice device, char format\nString fileName, char format" + , "QByteArray data, char aformat" + , "bool horizontally, bool vertically" + , "" + , "QImage arg__1" + , "QPoint pt\nint x, int y" + , "QPoint pt\nint x, int y" + , "QPoint pt\nint x, int y" + , "" + , "" + , "QIODevice device, char format, int quality\nString fileName, char format, int quality" + , "QSize s, AspectRatioMode aspectMode, TransformationMode mode\nint w, int h, AspectRatioMode aspectMode, TransformationMode mode" + , "int h, TransformationMode mode" + , "int w, TransformationMode mode" + , "QImage alphaChannel" + , "int i, unsigned int c" + , "int arg__1" + , "qreal scaleFactor" + , "int arg__1" + , "int arg__1" + , "QPoint arg__1" + , "QPoint pt, uint index_or_rgb\nint x, int y, uint index_or_rgb" + , "QPoint pt, QColor c\nint x, int y, QColor c" + , "String key, String value" + , "" + , "QImage other" + , "String key" + , "" + , "QMatrix matrix, TransformationMode mode\nQTransform matrix, TransformationMode mode" + , "QPoint pt\nint x, int y" +"" +}; + +static const int qtscript_QImage_function_lengths[] = { + 3 + // static + , 2 + , 3 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 3 + , 4 + , 1 + , 1 + , 2 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 0 + , 0 + , 2 + , 2 + , 2 + , 0 + , 1 + , 2 + , 2 + , 2 + , 0 + , 0 + , 3 + , 4 + , 2 + , 2 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 3 + , 3 + , 2 + , 0 + , 1 + , 1 + , 0 + , 2 + , 2 + , 0 +}; + +static QScriptValue qtscript_QImage_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QImage::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QImage*) +Q_DECLARE_METATYPE(QtScriptShell_QImage) +Q_DECLARE_METATYPE(QtScriptShell_QImage*) +Q_DECLARE_METATYPE(QImage::InvertMode) +Q_DECLARE_METATYPE(QImage::Format) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(const uchar*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::MaskMode) +Q_DECLARE_METATYPE(Qt::GlobalColor) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(Qt::AspectRatioMode) +Q_DECLARE_METATYPE(Qt::TransformationMode) +Q_DECLARE_METATYPE(QPaintDevice*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QImage::InvertMode +// + +static const QImage::InvertMode qtscript_QImage_InvertMode_values[] = { + QImage::InvertRgb + , QImage::InvertRgba +}; + +static const char * const qtscript_QImage_InvertMode_keys[] = { + "InvertRgb" + , "InvertRgba" +}; + +static QString qtscript_QImage_InvertMode_toStringHelper(QImage::InvertMode value) +{ + if ((value >= QImage::InvertRgb) && (value <= QImage::InvertRgba)) + return qtscript_QImage_InvertMode_keys[static_cast(value)-static_cast(QImage::InvertRgb)]; + return QString(); +} + +static QScriptValue qtscript_QImage_InvertMode_toScriptValue(QScriptEngine *engine, const QImage::InvertMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QImage")); + return clazz.property(qtscript_QImage_InvertMode_toStringHelper(value)); +} + +static void qtscript_QImage_InvertMode_fromScriptValue(const QScriptValue &value, QImage::InvertMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QImage_InvertMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QImage::InvertRgb) && (arg <= QImage::InvertRgba)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("InvertMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QImage_InvertMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QImage::InvertMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QImage_InvertMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QImage::InvertMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QImage_InvertMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QImage_InvertMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QImage_InvertMode, + qtscript_QImage_InvertMode_valueOf, qtscript_QImage_InvertMode_toString); + qScriptRegisterMetaType(engine, qtscript_QImage_InvertMode_toScriptValue, + qtscript_QImage_InvertMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QImage_InvertMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QImage_InvertMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QImage::Format +// + +static const QImage::Format qtscript_QImage_Format_values[] = { + QImage::Format_Invalid + , QImage::Format_Mono + , QImage::Format_MonoLSB + , QImage::Format_Indexed8 + , QImage::Format_RGB32 + , QImage::Format_ARGB32 + , QImage::Format_ARGB32_Premultiplied + , QImage::Format_RGB16 + , QImage::Format_ARGB8565_Premultiplied + , QImage::Format_RGB666 + , QImage::Format_ARGB6666_Premultiplied + , QImage::Format_RGB555 + , QImage::Format_ARGB8555_Premultiplied + , QImage::Format_RGB888 + , QImage::Format_RGB444 + , QImage::Format_ARGB4444_Premultiplied + , QImage::Format_RGBX8888 + , QImage::Format_RGBA8888 + , QImage::Format_RGBA8888_Premultiplied + , QImage::Format_BGR30 + , QImage::Format_A2BGR30_Premultiplied + , QImage::Format_RGB30 + , QImage::Format_A2RGB30_Premultiplied + , QImage::Format_Alpha8 + , QImage::Format_Grayscale8 + , QImage::NImageFormats +}; + +static const char * const qtscript_QImage_Format_keys[] = { + "Format_Invalid" + , "Format_Mono" + , "Format_MonoLSB" + , "Format_Indexed8" + , "Format_RGB32" + , "Format_ARGB32" + , "Format_ARGB32_Premultiplied" + , "Format_RGB16" + , "Format_ARGB8565_Premultiplied" + , "Format_RGB666" + , "Format_ARGB6666_Premultiplied" + , "Format_RGB555" + , "Format_ARGB8555_Premultiplied" + , "Format_RGB888" + , "Format_RGB444" + , "Format_ARGB4444_Premultiplied" + , "Format_RGBX8888" + , "Format_RGBA8888" + , "Format_RGBA8888_Premultiplied" + , "Format_BGR30" + , "Format_A2BGR30_Premultiplied" + , "Format_RGB30" + , "Format_A2RGB30_Premultiplied" + , "Format_Alpha8" + , "Format_Grayscale8" + , "NImageFormats" +}; + +static QString qtscript_QImage_Format_toStringHelper(QImage::Format value) +{ + if ((value >= QImage::Format_Invalid) && (value <= QImage::NImageFormats)) + return qtscript_QImage_Format_keys[static_cast(value)-static_cast(QImage::Format_Invalid)]; + return QString(); +} + +static QScriptValue qtscript_QImage_Format_toScriptValue(QScriptEngine *engine, const QImage::Format &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QImage")); + return clazz.property(qtscript_QImage_Format_toStringHelper(value)); +} + +static void qtscript_QImage_Format_fromScriptValue(const QScriptValue &value, QImage::Format &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QImage_Format(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QImage::Format_Invalid) && (arg <= QImage::NImageFormats)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Format(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QImage_Format_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QImage::Format value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QImage_Format_toString(QScriptContext *context, QScriptEngine *engine) +{ + QImage::Format value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QImage_Format_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QImage_Format_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QImage_Format, + qtscript_QImage_Format_valueOf, qtscript_QImage_Format_toString); + qScriptRegisterMetaType(engine, qtscript_QImage_Format_toScriptValue, + qtscript_QImage_Format_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 26; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QImage_Format_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QImage_Format_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QImage +// + +static QScriptValue qtscript_QImage_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 53; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QImage* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QImage.%0(): this object is not a QImage") + .arg(qtscript_QImage_function_names[_id+3])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->allGray(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QImage _q_result = _q_self->alphaChannel(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->bitPlaneCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->byteCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->bytesPerLine(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->cacheKey(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + unsigned int _q_result = _q_self->color(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QVector _q_result = _q_self->colorTable(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + const uchar* _q_result = const_cast(_q_self->constBits()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + const uchar* _q_result = const_cast(_q_self->constScanLine(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QImage::Format _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_result = _q_self->convertToFormat(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QImage::Format _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QImage _q_result = _q_self->convertToFormat(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isArray()) { + QImage::Format _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + QImage _q_result = _q_self->convertToFormat(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + QImage::Format _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QImage _q_result = _q_self->convertToFormat(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QImage _q_result = _q_self->copy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_result = _q_self->copy(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QImage _q_result = _q_self->copy(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QImage _q_result = _q_self->createAlphaMask(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QImage _q_result = _q_self->createAlphaMask(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QImage _q_result = _q_self->createHeuristicMask(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + QImage _q_result = _q_self->createHeuristicMask(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + QImage _q_result = _q_self->createMaskFromColor(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + uint _q_arg0 = context->argument(0).toUInt32(); + Qt::MaskMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QImage _q_result = _q_self->createMaskFromColor(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + int _q_result = _q_self->dotsPerMeterX(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + int _q_result = _q_self->dotsPerMeterY(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::GlobalColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->fill(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->fill(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber()) { + uint _q_arg0 = context->argument(0).toUInt32(); + _q_self->fill(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 18: + if (context->argumentCount() == 0) { + QImage::Format _q_result = _q_self->format(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasAlphaChannel(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + _q_self->invertPixels(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + QImage::InvertMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->invertPixels(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isGrayscale(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString()) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + bool _q_result = _q_self->load(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + bool _q_result = _q_self->load(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 24: + if (context->argumentCount() == 2) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + bool _q_result = _q_self->loadFromData(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + QImage _q_result = _q_self->mirrored(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + QImage _q_result = _q_self->mirrored(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + bool _q_arg0 = context->argument(0).toBoolean(); + bool _q_arg1 = context->argument(1).toBoolean(); + QImage _q_result = _q_self->mirrored(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->offset(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 1) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + unsigned int _q_result = _q_self->pixel(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + unsigned int _q_result = _q_self->pixel(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QColor _q_result = _q_self->pixelColor(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QColor _q_result = _q_self->pixelColor(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->pixelIndex(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->pixelIndex(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->rect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 0) { + QImage _q_result = _q_self->rgbSwapped(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->save(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->save(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString()) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + bool _q_result = _q_self->save(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + bool _q_result = _q_self->save(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString() + && context->argument(2).isNumber()) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + int _q_arg2 = context->argument(2).toInt32(); + bool _q_result = _q_self->save(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString() + && context->argument(2).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + int _q_arg2 = context->argument(2).toInt32(); + bool _q_result = _q_self->save(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 34: + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_result = _q_self->scaled(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::AspectRatioMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QImage _q_result = _q_self->scaled(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QImage _q_result = _q_self->scaled(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::AspectRatioMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::TransformationMode _q_arg2 = qscriptvalue_cast(context->argument(2)); + QImage _q_result = _q_self->scaled(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + Qt::AspectRatioMode _q_arg2 = qscriptvalue_cast(context->argument(2)); + QImage _q_result = _q_self->scaled(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + Qt::AspectRatioMode _q_arg2 = qscriptvalue_cast(context->argument(2)); + Qt::TransformationMode _q_arg3 = qscriptvalue_cast(context->argument(3)); + QImage _q_result = _q_self->scaled(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 35: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QImage _q_result = _q_self->scaledToHeight(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::TransformationMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QImage _q_result = _q_self->scaledToHeight(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 36: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QImage _q_result = _q_self->scaledToWidth(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::TransformationMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QImage _q_result = _q_self->scaledToWidth(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 37: + if (context->argumentCount() == 1) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setAlphaChannel(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + uint _q_arg1 = context->argument(1).toUInt32(); + _q_self->setColor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 39: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setColorCount(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDevicePixelRatio(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setDotsPerMeterX(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 42: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setDotsPerMeterY(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 43: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOffset(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 44: + if (context->argumentCount() == 2) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + _q_self->setPixel(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + uint _q_arg2 = context->argument(2).toUInt32(); + _q_self->setPixel(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 45: + if (context->argumentCount() == 2) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QColor _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setPixelColor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QColor _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setPixelColor(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 46: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 47: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->size(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 48: + if (context->argumentCount() == 1) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 49: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->text(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = _q_self->text(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 50: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->textKeys(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 51: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_result = _q_self->transformed(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_result = _q_self->transformed(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::TransformationMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QImage _q_result = _q_self->transformed(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::TransformationMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QImage _q_result = _q_self->transformed(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 52: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->valid(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + bool _q_result = _q_self->valid(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 53: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QImage_throw_ambiguity_error_helper(context, + qtscript_QImage_function_names[_id+3], + qtscript_QImage_function_signatures[_id+3]); +} + +static QScriptValue qtscript_QImage_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QImage(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QImage _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QImage)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QImage _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QImage)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QImage _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QImage)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage::Format _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QImage _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QImage)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + QtScriptShell_QImage _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QImage)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QImage::Format _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QImage _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QImage)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + QImage _q_result = QImage::fromData(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QMatrix _q_result = QImage::trueMatrix(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QTransform _q_result = QImage::trueMatrix(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QImage_throw_ambiguity_error_helper(context, + qtscript_QImage_function_names[_id], + qtscript_QImage_function_signatures[_id]); +} + +QScriptValue qtscript_create_QImage_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QImage*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 54; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QImage_prototype_call, qtscript_QImage_function_lengths[i+3]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QImage_function_names[i+3]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QImage_static_call, proto, qtscript_QImage_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QImage_static_call, + qtscript_QImage_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QImage_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("InvertMode"), + qtscript_create_QImage_InvertMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Format"), + qtscript_create_QImage_Format_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImageIOHandler.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImageIOHandler.cpp new file mode 100644 index 00000000..b134757f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImageIOHandler.cpp @@ -0,0 +1,438 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QImageIOHandler.h" + +static const char * const qtscript_QImageIOHandler_function_names[] = { + "QImageIOHandler" + // static + // prototype + , "canRead" + , "currentImageNumber" + , "currentImageRect" + , "device" + , "format" + , "imageCount" + , "jumpToImage" + , "jumpToNextImage" + , "loopCount" + , "nextImageDelay" + , "option" + , "read" + , "setDevice" + , "setFormat" + , "setOption" + , "supportsOption" + , "write" + , "toString" +}; + +static const char * const qtscript_QImageIOHandler_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "int imageNumber" + , "" + , "" + , "" + , "ImageOption option" + , "QImage image" + , "QIODevice device" + , "QByteArray format" + , "ImageOption option, Object value" + , "ImageOption option" + , "QImage image" +"" +}; + +static const int qtscript_QImageIOHandler_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QImageIOHandler_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QImageIOHandler::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QImageIOHandler*) +Q_DECLARE_METATYPE(QtScriptShell_QImageIOHandler*) +Q_DECLARE_METATYPE(QImageIOHandler::ImageOption) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QImage*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QImageIOHandler::ImageOption +// + +static const QImageIOHandler::ImageOption qtscript_QImageIOHandler_ImageOption_values[] = { + QImageIOHandler::Size + , QImageIOHandler::ClipRect + , QImageIOHandler::Description + , QImageIOHandler::ScaledClipRect + , QImageIOHandler::ScaledSize + , QImageIOHandler::CompressionRatio + , QImageIOHandler::Gamma + , QImageIOHandler::Quality + , QImageIOHandler::Name + , QImageIOHandler::SubType + , QImageIOHandler::IncrementalReading + , QImageIOHandler::Endianness + , QImageIOHandler::Animation + , QImageIOHandler::BackgroundColor + , QImageIOHandler::ImageFormat + , QImageIOHandler::SupportedSubTypes + , QImageIOHandler::OptimizedWrite + , QImageIOHandler::ProgressiveScanWrite + , QImageIOHandler::ImageTransformation + , QImageIOHandler::TransformedByDefault +}; + +static const char * const qtscript_QImageIOHandler_ImageOption_keys[] = { + "Size" + , "ClipRect" + , "Description" + , "ScaledClipRect" + , "ScaledSize" + , "CompressionRatio" + , "Gamma" + , "Quality" + , "Name" + , "SubType" + , "IncrementalReading" + , "Endianness" + , "Animation" + , "BackgroundColor" + , "ImageFormat" + , "SupportedSubTypes" + , "OptimizedWrite" + , "ProgressiveScanWrite" + , "ImageTransformation" + , "TransformedByDefault" +}; + +static QString qtscript_QImageIOHandler_ImageOption_toStringHelper(QImageIOHandler::ImageOption value) +{ + if ((value >= QImageIOHandler::Size) && (value <= QImageIOHandler::TransformedByDefault)) + return qtscript_QImageIOHandler_ImageOption_keys[static_cast(value)-static_cast(QImageIOHandler::Size)]; + return QString(); +} + +static QScriptValue qtscript_QImageIOHandler_ImageOption_toScriptValue(QScriptEngine *engine, const QImageIOHandler::ImageOption &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QImageIOHandler")); + return clazz.property(qtscript_QImageIOHandler_ImageOption_toStringHelper(value)); +} + +static void qtscript_QImageIOHandler_ImageOption_fromScriptValue(const QScriptValue &value, QImageIOHandler::ImageOption &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QImageIOHandler_ImageOption(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QImageIOHandler::Size) && (arg <= QImageIOHandler::TransformedByDefault)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ImageOption(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QImageIOHandler_ImageOption_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QImageIOHandler::ImageOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QImageIOHandler_ImageOption_toString(QScriptContext *context, QScriptEngine *engine) +{ + QImageIOHandler::ImageOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QImageIOHandler_ImageOption_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QImageIOHandler_ImageOption_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QImageIOHandler_ImageOption, + qtscript_QImageIOHandler_ImageOption_valueOf, qtscript_QImageIOHandler_ImageOption_toString); + qScriptRegisterMetaType(engine, qtscript_QImageIOHandler_ImageOption_toScriptValue, + qtscript_QImageIOHandler_ImageOption_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 20; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QImageIOHandler_ImageOption_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QImageIOHandler_ImageOption_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QImageIOHandler +// + +static QScriptValue qtscript_QImageIOHandler_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 17; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QImageIOHandler* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QImageIOHandler.%0(): this object is not a QImageIOHandler") + .arg(qtscript_QImageIOHandler_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->canRead(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->currentImageNumber(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->currentImageRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QIODevice* _q_result = _q_self->device(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->format(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->imageCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->jumpToImage(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->jumpToNextImage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + int _q_result = _q_self->loopCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->nextImageDelay(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QImageIOHandler::ImageOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_result = _q_self->option(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QImage* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->read(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDevice(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 2) { + QImageIOHandler::ImageOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setOption(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QImageIOHandler::ImageOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->supportsOption(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->write(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: { + QString result = QString::fromLatin1("QImageIOHandler"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QImageIOHandler_throw_ambiguity_error_helper(context, + qtscript_QImageIOHandler_function_names[_id+1], + qtscript_QImageIOHandler_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QImageIOHandler_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QImageIOHandler(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QImageIOHandler* _q_cpp_result = new QtScriptShell_QImageIOHandler(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QImageIOHandler*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QImageIOHandler_throw_ambiguity_error_helper(context, + qtscript_QImageIOHandler_function_names[_id], + qtscript_QImageIOHandler_function_signatures[_id]); +} + +QScriptValue qtscript_create_QImageIOHandler_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QImageIOHandler*)0)); + for (int i = 0; i < 18; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QImageIOHandler_prototype_call, qtscript_QImageIOHandler_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QImageIOHandler_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QImageIOHandler_static_call, proto, qtscript_QImageIOHandler_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ImageOption"), + qtscript_create_QImageIOHandler_ImageOption_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImageIOPlugin.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImageIOPlugin.cpp new file mode 100644 index 00000000..280ad933 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImageIOPlugin.cpp @@ -0,0 +1,372 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QImageIOPlugin.h" + +static const char * const qtscript_QImageIOPlugin_function_names[] = { + "QImageIOPlugin" + // static + // prototype + , "capabilities" + , "create" + , "toString" +}; + +static const char * const qtscript_QImageIOPlugin_function_signatures[] = { + "QObject parent" + // static + // prototype + , "QIODevice device, QByteArray format" + , "QIODevice device, QByteArray format" +"" +}; + +static const int qtscript_QImageIOPlugin_function_lengths[] = { + 1 + // static + // prototype + , 2 + , 2 + , 0 +}; + +static QScriptValue qtscript_QImageIOPlugin_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QImageIOPlugin::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QImageIOPlugin*) +Q_DECLARE_METATYPE(QtScriptShell_QImageIOPlugin*) +Q_DECLARE_METATYPE(QImageIOPlugin::Capability) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QImageIOHandler*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QImageIOPlugin::Capability +// + +static const QImageIOPlugin::Capability qtscript_QImageIOPlugin_Capability_values[] = { + QImageIOPlugin::CanRead + , QImageIOPlugin::CanWrite + , QImageIOPlugin::CanReadIncremental +}; + +static const char * const qtscript_QImageIOPlugin_Capability_keys[] = { + "CanRead" + , "CanWrite" + , "CanReadIncremental" +}; + +static QString qtscript_QImageIOPlugin_Capability_toStringHelper(QImageIOPlugin::Capability value) +{ + for (int i = 0; i < 3; ++i) { + if (qtscript_QImageIOPlugin_Capability_values[i] == value) + return QString::fromLatin1(qtscript_QImageIOPlugin_Capability_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QImageIOPlugin_Capability_toScriptValue(QScriptEngine *engine, const QImageIOPlugin::Capability &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QImageIOPlugin")); + return clazz.property(qtscript_QImageIOPlugin_Capability_toStringHelper(value)); +} + +static void qtscript_QImageIOPlugin_Capability_fromScriptValue(const QScriptValue &value, QImageIOPlugin::Capability &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QImageIOPlugin_Capability(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 3; ++i) { + if (qtscript_QImageIOPlugin_Capability_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Capability(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QImageIOPlugin_Capability_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QImageIOPlugin::Capability value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QImageIOPlugin_Capability_toString(QScriptContext *context, QScriptEngine *engine) +{ + QImageIOPlugin::Capability value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QImageIOPlugin_Capability_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QImageIOPlugin_Capability_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QImageIOPlugin_Capability, + qtscript_QImageIOPlugin_Capability_valueOf, qtscript_QImageIOPlugin_Capability_toString); + qScriptRegisterMetaType(engine, qtscript_QImageIOPlugin_Capability_toScriptValue, + qtscript_QImageIOPlugin_Capability_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QImageIOPlugin_Capability_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QImageIOPlugin_Capability_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QImageIOPlugin::Capabilities +// + +static QScriptValue qtscript_QImageIOPlugin_Capabilities_toScriptValue(QScriptEngine *engine, const QImageIOPlugin::Capabilities &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QImageIOPlugin_Capabilities_fromScriptValue(const QScriptValue &value, QImageIOPlugin::Capabilities &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QImageIOPlugin_Capabilities(QScriptContext *context, QScriptEngine *engine) +{ + QImageIOPlugin::Capabilities result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("Capabilities(): argument %0 is not of type Capability").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QImageIOPlugin_Capabilities_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QImageIOPlugin::Capabilities value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QImageIOPlugin_Capabilities_toString(QScriptContext *context, QScriptEngine *engine) +{ + QImageIOPlugin::Capabilities value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 3; ++i) { + if ((value & qtscript_QImageIOPlugin_Capability_values[i]) == qtscript_QImageIOPlugin_Capability_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QImageIOPlugin_Capability_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QImageIOPlugin_Capabilities_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QImageIOPlugin_Capabilities_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QImageIOPlugin_Capabilities, qtscript_QImageIOPlugin_Capabilities_valueOf, + qtscript_QImageIOPlugin_Capabilities_toString, qtscript_QImageIOPlugin_Capabilities_equals); + qScriptRegisterMetaType(engine, qtscript_QImageIOPlugin_Capabilities_toScriptValue, + qtscript_QImageIOPlugin_Capabilities_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QImageIOPlugin +// + +static QScriptValue qtscript_QImageIOPlugin_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QImageIOPlugin* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QImageIOPlugin.%0(): this object is not a QImageIOPlugin") + .arg(qtscript_QImageIOPlugin_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFlags _q_result = _q_self->capabilities(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImageIOHandler* _q_result = _q_self->create(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QImageIOHandler* _q_result = _q_self->create(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QImageIOPlugin"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QImageIOPlugin_throw_ambiguity_error_helper(context, + qtscript_QImageIOPlugin_function_names[_id+1], + qtscript_QImageIOPlugin_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QImageIOPlugin_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QImageIOPlugin(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QImageIOPlugin* _q_cpp_result = new QtScriptShell_QImageIOPlugin(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QImageIOPlugin*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QImageIOPlugin* _q_cpp_result = new QtScriptShell_QImageIOPlugin(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QImageIOPlugin*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QImageIOPlugin_throw_ambiguity_error_helper(context, + qtscript_QImageIOPlugin_function_names[_id], + qtscript_QImageIOPlugin_function_signatures[_id]); +} + +static QScriptValue qtscript_QImageIOPlugin_toScriptValue(QScriptEngine *engine, QImageIOPlugin* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QImageIOPlugin_fromScriptValue(const QScriptValue &value, QImageIOPlugin* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QImageIOPlugin_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QImageIOPlugin*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QImageIOPlugin_prototype_call, qtscript_QImageIOPlugin_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QImageIOPlugin_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QImageIOPlugin_toScriptValue, + qtscript_QImageIOPlugin_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QImageIOPlugin_static_call, proto, qtscript_QImageIOPlugin_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Capability"), + qtscript_create_QImageIOPlugin_Capability_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Capabilities"), + qtscript_create_QImageIOPlugin_Capabilities_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImageReader.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImageReader.cpp new file mode 100644 index 00000000..5fbf1468 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImageReader.cpp @@ -0,0 +1,800 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QImageReader_function_names[] = { + "QImageReader" + // static + , "imageFormat" + , "supportedImageFormats" + , "supportedMimeTypes" + , "tr" + , "trUtf8" + // prototype + , "autoDetectImageFormat" + , "autoTransform" + , "backgroundColor" + , "canRead" + , "clipRect" + , "currentImageNumber" + , "currentImageRect" + , "decideFormatFromContent" + , "device" + , "error" + , "errorString" + , "fileName" + , "format" + , "gamma" + , "imageCount" + , "imageFormat" + , "jumpToImage" + , "jumpToNextImage" + , "loopCount" + , "nextImageDelay" + , "quality" + , "read" + , "scaledClipRect" + , "scaledSize" + , "setAutoDetectImageFormat" + , "setAutoTransform" + , "setBackgroundColor" + , "setClipRect" + , "setDecideFormatFromContent" + , "setDevice" + , "setFileName" + , "setFormat" + , "setGamma" + , "setQuality" + , "setScaledClipRect" + , "setScaledSize" + , "size" + , "subType" + , "supportedSubTypes" + , "supportsAnimation" + , "supportsOption" + , "text" + , "textKeys" + , "toString" +}; + +static const char * const qtscript_QImageReader_function_signatures[] = { + "\nQIODevice device, QByteArray format\nString fileName, QByteArray format" + // static + , "QIODevice device\nString fileName" + , "" + , "" + , "char sourceText, char disambiguation, int n" + , "char sourceText, char disambiguation, int n" + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "int imageNumber" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "bool enabled" + , "bool enabled" + , "QColor color" + , "QRect rect" + , "bool ignored" + , "QIODevice device" + , "String fileName" + , "QByteArray format" + , "float gamma" + , "int quality" + , "QRect rect" + , "QSize size" + , "" + , "" + , "" + , "" + , "ImageOption option" + , "String key" + , "" +"" +}; + +static const int qtscript_QImageReader_function_lengths[] = { + 2 + // static + , 1 + , 0 + , 0 + , 3 + , 3 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QImageReader_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QImageReader::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QImageReader*) +Q_DECLARE_METATYPE(QImageReader::ImageReaderError) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QImage::Format) +Q_DECLARE_METATYPE(QImageIOHandler::ImageOption) +Q_DECLARE_METATYPE(const char*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QImageReader::ImageReaderError +// + +static const QImageReader::ImageReaderError qtscript_QImageReader_ImageReaderError_values[] = { + QImageReader::UnknownError + , QImageReader::FileNotFoundError + , QImageReader::DeviceError + , QImageReader::UnsupportedFormatError + , QImageReader::InvalidDataError +}; + +static const char * const qtscript_QImageReader_ImageReaderError_keys[] = { + "UnknownError" + , "FileNotFoundError" + , "DeviceError" + , "UnsupportedFormatError" + , "InvalidDataError" +}; + +static QString qtscript_QImageReader_ImageReaderError_toStringHelper(QImageReader::ImageReaderError value) +{ + if ((value >= QImageReader::UnknownError) && (value <= QImageReader::InvalidDataError)) + return qtscript_QImageReader_ImageReaderError_keys[static_cast(value)-static_cast(QImageReader::UnknownError)]; + return QString(); +} + +static QScriptValue qtscript_QImageReader_ImageReaderError_toScriptValue(QScriptEngine *engine, const QImageReader::ImageReaderError &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QImageReader")); + return clazz.property(qtscript_QImageReader_ImageReaderError_toStringHelper(value)); +} + +static void qtscript_QImageReader_ImageReaderError_fromScriptValue(const QScriptValue &value, QImageReader::ImageReaderError &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QImageReader_ImageReaderError(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QImageReader::UnknownError) && (arg <= QImageReader::InvalidDataError)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ImageReaderError(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QImageReader_ImageReaderError_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QImageReader::ImageReaderError value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QImageReader_ImageReaderError_toString(QScriptContext *context, QScriptEngine *engine) +{ + QImageReader::ImageReaderError value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QImageReader_ImageReaderError_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QImageReader_ImageReaderError_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QImageReader_ImageReaderError, + qtscript_QImageReader_ImageReaderError_valueOf, qtscript_QImageReader_ImageReaderError_toString); + qScriptRegisterMetaType(engine, qtscript_QImageReader_ImageReaderError_toScriptValue, + qtscript_QImageReader_ImageReaderError_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QImageReader_ImageReaderError_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QImageReader_ImageReaderError_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QImageReader +// + +static QScriptValue qtscript_QImageReader_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 43; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QImageReader* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QImageReader.%0(): this object is not a QImageReader") + .arg(qtscript_QImageReader_function_names[_id+6])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->autoDetectImageFormat(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->autoTransform(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QColor _q_result = _q_self->backgroundColor(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->canRead(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->clipRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->currentImageNumber(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->currentImageRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->decideFormatFromContent(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QIODevice* _q_result = _q_self->device(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QImageReader::ImageReaderError _q_result = _q_self->error(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->fileName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->format(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + float _q_result = _q_self->gamma(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + int _q_result = _q_self->imageCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QImage::Format _q_result = _q_self->imageFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->jumpToImage(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->jumpToNextImage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + int _q_result = _q_self->loopCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + int _q_result = _q_self->nextImageDelay(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + int _q_result = _q_self->quality(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + QImage _q_result = _q_self->read(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->scaledClipRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->scaledSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setAutoDetectImageFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setAutoTransform(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBackgroundColor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setClipRect(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setDecideFormatFromContent(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 1) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDevice(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setFileName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setGamma(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setQuality(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScaledClipRect(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScaledSize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->size(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 37: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->subType(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 38: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->supportedSubTypes(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->supportsAnimation(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 40: + if (context->argumentCount() == 1) { + QImageIOHandler::ImageOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->supportsOption(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 41: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = _q_self->text(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 42: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->textKeys(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 43: { + QString result = QString::fromLatin1("QImageReader"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QImageReader_throw_ambiguity_error_helper(context, + qtscript_QImageReader_function_names[_id+6], + qtscript_QImageReader_function_signatures[_id+6]); +} + +static QScriptValue qtscript_QImageReader_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QImageReader(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QImageReader* _q_cpp_result = new QImageReader(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImageReader* _q_cpp_result = new QImageReader(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QImageReader* _q_cpp_result = new QImageReader(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QImageReader* _q_cpp_result = new QImageReader(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QImageReader* _q_cpp_result = new QImageReader(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_result = QImageReader::imageFormat(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_result = QImageReader::imageFormat(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 2: + if (context->argumentCount() == 0) { + QList _q_result = QImageReader::supportedImageFormats(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QList _q_result = QImageReader::supportedMimeTypes(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = QImageReader::tr(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = QImageReader::tr(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QString _q_result = QImageReader::tr(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = QImageReader::trUtf8(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = QImageReader::trUtf8(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QString _q_result = QImageReader::trUtf8(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QImageReader_throw_ambiguity_error_helper(context, + qtscript_QImageReader_function_names[_id], + qtscript_QImageReader_function_signatures[_id]); +} + +QScriptValue qtscript_create_QImageReader_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QImageReader*)0)); + for (int i = 0; i < 44; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QImageReader_prototype_call, qtscript_QImageReader_function_lengths[i+6]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QImageReader_function_names[i+6]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QImageReader_static_call, proto, qtscript_QImageReader_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QImageReader_static_call, + qtscript_QImageReader_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QImageReader_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("ImageReaderError"), + qtscript_create_QImageReader_ImageReaderError_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImageWriter.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImageWriter.cpp new file mode 100644 index 00000000..2c8b08bd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QImageWriter.cpp @@ -0,0 +1,580 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QImageWriter_function_names[] = { + "QImageWriter" + // static + , "supportedImageFormats" + , "supportedMimeTypes" + , "tr" + , "trUtf8" + // prototype + , "canWrite" + , "compression" + , "device" + , "error" + , "errorString" + , "fileName" + , "format" + , "gamma" + , "optimizedWrite" + , "progressiveScanWrite" + , "quality" + , "setCompression" + , "setDevice" + , "setFileName" + , "setFormat" + , "setGamma" + , "setOptimizedWrite" + , "setProgressiveScanWrite" + , "setQuality" + , "setSubType" + , "setText" + , "subType" + , "supportedSubTypes" + , "supportsOption" + , "write" + , "toString" +}; + +static const char * const qtscript_QImageWriter_function_signatures[] = { + "\nQIODevice device, QByteArray format\nString fileName, QByteArray format" + // static + , "" + , "" + , "char sourceText, char disambiguation, int n" + , "char sourceText, char disambiguation, int n" + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "int compression" + , "QIODevice device" + , "String fileName" + , "QByteArray format" + , "float gamma" + , "bool optimize" + , "bool progressive" + , "int quality" + , "QByteArray type" + , "String key, String text" + , "" + , "" + , "ImageOption option" + , "QImage image" +"" +}; + +static const int qtscript_QImageWriter_function_lengths[] = { + 2 + // static + , 0 + , 0 + , 3 + , 3 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 0 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QImageWriter_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QImageWriter::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QImageWriter*) +Q_DECLARE_METATYPE(QImageWriter::ImageWriterError) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QImageIOHandler::ImageOption) +Q_DECLARE_METATYPE(const char*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QImageWriter::ImageWriterError +// + +static const QImageWriter::ImageWriterError qtscript_QImageWriter_ImageWriterError_values[] = { + QImageWriter::UnknownError + , QImageWriter::DeviceError + , QImageWriter::UnsupportedFormatError +}; + +static const char * const qtscript_QImageWriter_ImageWriterError_keys[] = { + "UnknownError" + , "DeviceError" + , "UnsupportedFormatError" +}; + +static QString qtscript_QImageWriter_ImageWriterError_toStringHelper(QImageWriter::ImageWriterError value) +{ + if ((value >= QImageWriter::UnknownError) && (value <= QImageWriter::UnsupportedFormatError)) + return qtscript_QImageWriter_ImageWriterError_keys[static_cast(value)-static_cast(QImageWriter::UnknownError)]; + return QString(); +} + +static QScriptValue qtscript_QImageWriter_ImageWriterError_toScriptValue(QScriptEngine *engine, const QImageWriter::ImageWriterError &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QImageWriter")); + return clazz.property(qtscript_QImageWriter_ImageWriterError_toStringHelper(value)); +} + +static void qtscript_QImageWriter_ImageWriterError_fromScriptValue(const QScriptValue &value, QImageWriter::ImageWriterError &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QImageWriter_ImageWriterError(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QImageWriter::UnknownError) && (arg <= QImageWriter::UnsupportedFormatError)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ImageWriterError(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QImageWriter_ImageWriterError_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QImageWriter::ImageWriterError value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QImageWriter_ImageWriterError_toString(QScriptContext *context, QScriptEngine *engine) +{ + QImageWriter::ImageWriterError value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QImageWriter_ImageWriterError_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QImageWriter_ImageWriterError_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QImageWriter_ImageWriterError, + qtscript_QImageWriter_ImageWriterError_valueOf, qtscript_QImageWriter_ImageWriterError_toString); + qScriptRegisterMetaType(engine, qtscript_QImageWriter_ImageWriterError_toScriptValue, + qtscript_QImageWriter_ImageWriterError_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QImageWriter_ImageWriterError_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QImageWriter_ImageWriterError_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QImageWriter +// + +static QScriptValue qtscript_QImageWriter_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 25; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QImageWriter* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QImageWriter.%0(): this object is not a QImageWriter") + .arg(qtscript_QImageWriter_function_names[_id+5])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->canWrite(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->compression(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QIODevice* _q_result = _q_self->device(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QImageWriter::ImageWriterError _q_result = _q_self->error(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->fileName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->format(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + float _q_result = _q_self->gamma(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->optimizedWrite(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->progressiveScanWrite(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + int _q_result = _q_self->quality(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setCompression(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDevice(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setFileName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setGamma(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setOptimizedWrite(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setProgressiveScanWrite(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setQuality(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSubType(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->subType(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->supportedSubTypes(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QImageIOHandler::ImageOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->supportsOption(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->write(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: { + QString result = QString::fromLatin1("QImageWriter"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QImageWriter_throw_ambiguity_error_helper(context, + qtscript_QImageWriter_function_names[_id+5], + qtscript_QImageWriter_function_signatures[_id+5]); +} + +static QScriptValue qtscript_QImageWriter_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QImageWriter(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QImageWriter* _q_cpp_result = new QImageWriter(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QImageWriter* _q_cpp_result = new QImageWriter(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QImageWriter* _q_cpp_result = new QImageWriter(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QImageWriter* _q_cpp_result = new QImageWriter(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + case 1: + if (context->argumentCount() == 0) { + QList _q_result = QImageWriter::supportedImageFormats(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QList _q_result = QImageWriter::supportedMimeTypes(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = QImageWriter::tr(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = QImageWriter::tr(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QString _q_result = QImageWriter::tr(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = QImageWriter::trUtf8(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = QImageWriter::trUtf8(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QString _q_result = QImageWriter::trUtf8(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QImageWriter_throw_ambiguity_error_helper(context, + qtscript_QImageWriter_function_names[_id], + qtscript_QImageWriter_function_signatures[_id]); +} + +QScriptValue qtscript_create_QImageWriter_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QImageWriter*)0)); + for (int i = 0; i < 26; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QImageWriter_prototype_call, qtscript_QImageWriter_function_lengths[i+5]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QImageWriter_function_names[i+5]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QImageWriter_static_call, proto, qtscript_QImageWriter_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QImageWriter_static_call, + qtscript_QImageWriter_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QImageWriter_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("ImageWriterError"), + qtscript_create_QImageWriter_ImageWriterError_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QInputEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QInputEvent.cpp new file mode 100644 index 00000000..04bdccfe --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QInputEvent.cpp @@ -0,0 +1,186 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +#include "qtscriptshell_QInputEvent.h" + +static const char * const qtscript_QInputEvent_function_names[] = { + "QInputEvent" + // static + // prototype + , "modifiers" + , "setModifiers" + , "setTimestamp" + , "timestamp" + , "toString" +}; + +static const char * const qtscript_QInputEvent_function_signatures[] = { + "Type type, KeyboardModifiers modifiers" + // static + // prototype + , "" + , "KeyboardModifiers amodifiers" + , "ulong atimestamp" + , "" +"" +}; + +static const int qtscript_QInputEvent_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QInputEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QInputEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QInputEvent*) +Q_DECLARE_METATYPE(QtScriptShell_QInputEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QEvent*) + +// +// QInputEvent +// + +static QScriptValue qtscript_QInputEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QInputEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QInputEvent.%0(): this object is not a QInputEvent") + .arg(qtscript_QInputEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->modifiers(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setModifiers(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + ulong _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTimestamp(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + ulong _q_result = _q_self->timestamp(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QInputEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QInputEvent_throw_ambiguity_error_helper(context, + qtscript_QInputEvent_function_names[_id+1], + qtscript_QInputEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QInputEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QInputEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QInputEvent* _q_cpp_result = new QtScriptShell_QInputEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QInputEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QInputEvent* _q_cpp_result = new QtScriptShell_QInputEvent(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QInputEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QInputEvent_throw_ambiguity_error_helper(context, + qtscript_QInputEvent_function_names[_id], + qtscript_QInputEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QInputEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QInputEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QInputEvent_prototype_call, qtscript_QInputEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QInputEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QInputEvent_static_call, proto, qtscript_QInputEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QIntValidator.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QIntValidator.cpp new file mode 100644 index 00000000..60f9d97f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QIntValidator.cpp @@ -0,0 +1,183 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QIntValidator.h" + +static const char * const qtscript_QIntValidator_function_names[] = { + "QIntValidator" + // static + // prototype + , "setRange" + , "toString" +}; + +static const char * const qtscript_QIntValidator_function_signatures[] = { + "QObject parent\nint bottom, int top, QObject parent" + // static + // prototype + , "int bottom, int top" +"" +}; + +static const int qtscript_QIntValidator_function_lengths[] = { + 3 + // static + // prototype + , 2 + , 0 +}; + +static QScriptValue qtscript_QIntValidator_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QIntValidator::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QIntValidator*) +Q_DECLARE_METATYPE(QtScriptShell_QIntValidator*) +Q_DECLARE_METATYPE(QValidator*) + +// +// QIntValidator +// + +static QScriptValue qtscript_QIntValidator_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QIntValidator* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QIntValidator.%0(): this object is not a QIntValidator") + .arg(qtscript_QIntValidator_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setRange(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: { + QString result = QString::fromLatin1("QIntValidator"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QIntValidator_throw_ambiguity_error_helper(context, + qtscript_QIntValidator_function_names[_id+1], + qtscript_QIntValidator_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QIntValidator_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QIntValidator(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QIntValidator* _q_cpp_result = new QtScriptShell_QIntValidator(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QIntValidator*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QIntValidator* _q_cpp_result = new QtScriptShell_QIntValidator(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QIntValidator*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QIntValidator* _q_cpp_result = new QtScriptShell_QIntValidator(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QIntValidator*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QObject* _q_arg2 = context->argument(2).toQObject(); + QtScriptShell_QIntValidator* _q_cpp_result = new QtScriptShell_QIntValidator(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QIntValidator*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QIntValidator_throw_ambiguity_error_helper(context, + qtscript_QIntValidator_function_names[_id], + qtscript_QIntValidator_function_signatures[_id]); +} + +static QScriptValue qtscript_QIntValidator_toScriptValue(QScriptEngine *engine, QIntValidator* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QIntValidator_fromScriptValue(const QScriptValue &value, QIntValidator* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QIntValidator_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QIntValidator*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QIntValidator_prototype_call, qtscript_QIntValidator_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QIntValidator_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QIntValidator_toScriptValue, + qtscript_QIntValidator_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QIntValidator_static_call, proto, qtscript_QIntValidator_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QKeyEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QKeyEvent.cpp new file mode 100644 index 00000000..fae5487e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QKeyEvent.cpp @@ -0,0 +1,313 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +#include "qtscriptshell_QKeyEvent.h" + +static const char * const qtscript_QKeyEvent_function_names[] = { + "QKeyEvent" + // static + // prototype + , "count" + , "isAutoRepeat" + , "key" + , "matches" + , "nativeModifiers" + , "nativeScanCode" + , "nativeVirtualKey" + , "text" + , "toString" +}; + +static const char * const qtscript_QKeyEvent_function_signatures[] = { + "Type type, int key, KeyboardModifiers modifiers, String text, bool autorep, ushort count\nType type, int key, KeyboardModifiers modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, String text, bool autorep, ushort count" + // static + // prototype + , "" + , "" + , "" + , "StandardKey key" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QKeyEvent_function_lengths[] = { + 9 + // static + // prototype + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QKeyEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QKeyEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QtScriptShell_QKeyEvent*) +Q_DECLARE_METATYPE(QKeySequence::StandardKey) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QInputEvent*) + +// +// QKeyEvent +// + +static QScriptValue qtscript_QKeyEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QKeyEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QKeyEvent.%0(): this object is not a QKeyEvent") + .arg(qtscript_QKeyEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isAutoRepeat(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->key(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QKeySequence::StandardKey _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->matches(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + unsigned int _q_result = _q_self->nativeModifiers(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + unsigned int _q_result = _q_self->nativeScanCode(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + unsigned int _q_result = _q_self->nativeVirtualKey(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->text(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: { + QString result = QString::fromLatin1("QKeyEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QKeyEvent_throw_ambiguity_error_helper(context, + qtscript_QKeyEvent_function_names[_id+1], + qtscript_QKeyEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QKeyEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QKeyEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 3) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QtScriptShell_QKeyEvent* _q_cpp_result = new QtScriptShell_QKeyEvent(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QKeyEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 4) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QString _q_arg3 = context->argument(3).toString(); + QtScriptShell_QKeyEvent* _q_cpp_result = new QtScriptShell_QKeyEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QKeyEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 5) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QString _q_arg3 = context->argument(3).toString(); + bool _q_arg4 = context->argument(4).toBoolean(); + QtScriptShell_QKeyEvent* _q_cpp_result = new QtScriptShell_QKeyEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QKeyEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 6) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && (qMetaTypeId >() == context->argument(2).toVariant().userType()) + && context->argument(3).isString() + && context->argument(4).isBoolean() + && (qMetaTypeId() == context->argument(5).toVariant().userType())) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QString _q_arg3 = context->argument(3).toString(); + bool _q_arg4 = context->argument(4).toBoolean(); + ushort _q_arg5 = qscriptvalue_cast(context->argument(5)); + QtScriptShell_QKeyEvent* _q_cpp_result = new QtScriptShell_QKeyEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QKeyEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && (qMetaTypeId >() == context->argument(2).toVariant().userType()) + && context->argument(3).isNumber() + && context->argument(4).isNumber() + && context->argument(5).isNumber()) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + uint _q_arg3 = context->argument(3).toUInt32(); + uint _q_arg4 = context->argument(4).toUInt32(); + uint _q_arg5 = context->argument(5).toUInt32(); + QtScriptShell_QKeyEvent* _q_cpp_result = new QtScriptShell_QKeyEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QKeyEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 7) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + uint _q_arg3 = context->argument(3).toUInt32(); + uint _q_arg4 = context->argument(4).toUInt32(); + uint _q_arg5 = context->argument(5).toUInt32(); + QString _q_arg6 = context->argument(6).toString(); + QtScriptShell_QKeyEvent* _q_cpp_result = new QtScriptShell_QKeyEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QKeyEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 8) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + uint _q_arg3 = context->argument(3).toUInt32(); + uint _q_arg4 = context->argument(4).toUInt32(); + uint _q_arg5 = context->argument(5).toUInt32(); + QString _q_arg6 = context->argument(6).toString(); + bool _q_arg7 = context->argument(7).toBoolean(); + QtScriptShell_QKeyEvent* _q_cpp_result = new QtScriptShell_QKeyEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QKeyEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 9) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + uint _q_arg3 = context->argument(3).toUInt32(); + uint _q_arg4 = context->argument(4).toUInt32(); + uint _q_arg5 = context->argument(5).toUInt32(); + QString _q_arg6 = context->argument(6).toString(); + bool _q_arg7 = context->argument(7).toBoolean(); + ushort _q_arg8 = qscriptvalue_cast(context->argument(8)); + QtScriptShell_QKeyEvent* _q_cpp_result = new QtScriptShell_QKeyEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7, _q_arg8); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QKeyEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QKeyEvent_throw_ambiguity_error_helper(context, + qtscript_QKeyEvent_function_names[_id], + qtscript_QKeyEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QKeyEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QKeyEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QKeyEvent_prototype_call, qtscript_QKeyEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QKeyEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QKeyEvent_static_call, proto, qtscript_QKeyEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QKeySequence.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QKeySequence.cpp new file mode 100644 index 00000000..019e6ebf --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QKeySequence.cpp @@ -0,0 +1,643 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QKeySequence_function_names[] = { + "QKeySequence" + // static + , "fromString" + , "keyBindings" + , "listFromString" + , "listToString" + , "mnemonic" + // prototype + , "count" + , "isEmpty" + , "matches" + , "equals" + , "operator_less" + , "operator_subscript" + , "swap" + , "toString" +}; + +static const char * const qtscript_QKeySequence_function_signatures[] = { + "\nStandardKey key\nQKeySequence ks\nString key, SequenceFormat format\nint k1, int k2, int k3, int k4" + // static + , "String str, SequenceFormat format" + , "StandardKey key" + , "String str, SequenceFormat format" + , "List list, SequenceFormat format" + , "String text" + // prototype + , "" + , "" + , "QKeySequence seq" + , "QKeySequence other" + , "QKeySequence ks" + , "uint i" + , "QKeySequence other" + , "SequenceFormat format" +}; + +static const int qtscript_QKeySequence_function_lengths[] = { + 4 + // static + , 2 + , 1 + , 2 + , 2 + , 1 + // prototype + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 +}; + +static QScriptValue qtscript_QKeySequence_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QKeySequence::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QKeySequence*) +Q_DECLARE_METATYPE(QKeySequence::SequenceMatch) +Q_DECLARE_METATYPE(QKeySequence::StandardKey) +Q_DECLARE_METATYPE(QKeySequence::SequenceFormat) +Q_DECLARE_METATYPE(QList) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QKeySequence::SequenceMatch +// + +static const QKeySequence::SequenceMatch qtscript_QKeySequence_SequenceMatch_values[] = { + QKeySequence::NoMatch + , QKeySequence::PartialMatch + , QKeySequence::ExactMatch +}; + +static const char * const qtscript_QKeySequence_SequenceMatch_keys[] = { + "NoMatch" + , "PartialMatch" + , "ExactMatch" +}; + +static QString qtscript_QKeySequence_SequenceMatch_toStringHelper(QKeySequence::SequenceMatch value) +{ + if ((value >= QKeySequence::NoMatch) && (value <= QKeySequence::ExactMatch)) + return qtscript_QKeySequence_SequenceMatch_keys[static_cast(value)-static_cast(QKeySequence::NoMatch)]; + return QString(); +} + +static QScriptValue qtscript_QKeySequence_SequenceMatch_toScriptValue(QScriptEngine *engine, const QKeySequence::SequenceMatch &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QKeySequence")); + return clazz.property(qtscript_QKeySequence_SequenceMatch_toStringHelper(value)); +} + +static void qtscript_QKeySequence_SequenceMatch_fromScriptValue(const QScriptValue &value, QKeySequence::SequenceMatch &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QKeySequence_SequenceMatch(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QKeySequence::NoMatch) && (arg <= QKeySequence::ExactMatch)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SequenceMatch(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QKeySequence_SequenceMatch_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QKeySequence::SequenceMatch value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QKeySequence_SequenceMatch_toString(QScriptContext *context, QScriptEngine *engine) +{ + QKeySequence::SequenceMatch value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QKeySequence_SequenceMatch_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QKeySequence_SequenceMatch_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QKeySequence_SequenceMatch, + qtscript_QKeySequence_SequenceMatch_valueOf, qtscript_QKeySequence_SequenceMatch_toString); + qScriptRegisterMetaType(engine, qtscript_QKeySequence_SequenceMatch_toScriptValue, + qtscript_QKeySequence_SequenceMatch_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QKeySequence_SequenceMatch_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QKeySequence_SequenceMatch_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QKeySequence::StandardKey +// + +static const QKeySequence::StandardKey qtscript_QKeySequence_StandardKey_values[] = { + QKeySequence::UnknownKey + , QKeySequence::HelpContents + , QKeySequence::WhatsThis + , QKeySequence::Open + , QKeySequence::Close + , QKeySequence::Save + , QKeySequence::New + , QKeySequence::Delete + , QKeySequence::Cut + , QKeySequence::Copy + , QKeySequence::Paste + , QKeySequence::Undo + , QKeySequence::Redo + , QKeySequence::Back + , QKeySequence::Forward + , QKeySequence::Refresh + , QKeySequence::ZoomIn + , QKeySequence::ZoomOut + , QKeySequence::Print + , QKeySequence::AddTab + , QKeySequence::NextChild + , QKeySequence::PreviousChild + , QKeySequence::Find + , QKeySequence::FindNext + , QKeySequence::FindPrevious + , QKeySequence::Replace + , QKeySequence::SelectAll + , QKeySequence::Bold + , QKeySequence::Italic + , QKeySequence::Underline + , QKeySequence::MoveToNextChar + , QKeySequence::MoveToPreviousChar + , QKeySequence::MoveToNextWord + , QKeySequence::MoveToPreviousWord + , QKeySequence::MoveToNextLine + , QKeySequence::MoveToPreviousLine + , QKeySequence::MoveToNextPage + , QKeySequence::MoveToPreviousPage + , QKeySequence::MoveToStartOfLine + , QKeySequence::MoveToEndOfLine + , QKeySequence::MoveToStartOfBlock + , QKeySequence::MoveToEndOfBlock + , QKeySequence::MoveToStartOfDocument + , QKeySequence::MoveToEndOfDocument + , QKeySequence::SelectNextChar + , QKeySequence::SelectPreviousChar + , QKeySequence::SelectNextWord + , QKeySequence::SelectPreviousWord + , QKeySequence::SelectNextLine + , QKeySequence::SelectPreviousLine + , QKeySequence::SelectNextPage + , QKeySequence::SelectPreviousPage + , QKeySequence::SelectStartOfLine + , QKeySequence::SelectEndOfLine + , QKeySequence::SelectStartOfBlock + , QKeySequence::SelectEndOfBlock + , QKeySequence::SelectStartOfDocument + , QKeySequence::SelectEndOfDocument + , QKeySequence::DeleteStartOfWord + , QKeySequence::DeleteEndOfWord + , QKeySequence::DeleteEndOfLine + , QKeySequence::InsertParagraphSeparator + , QKeySequence::InsertLineSeparator + , QKeySequence::SaveAs + , QKeySequence::Preferences + , QKeySequence::Quit + , QKeySequence::FullScreen + , QKeySequence::Deselect + , QKeySequence::DeleteCompleteLine + , QKeySequence::Backspace + , QKeySequence::Cancel +}; + +static const char * const qtscript_QKeySequence_StandardKey_keys[] = { + "UnknownKey" + , "HelpContents" + , "WhatsThis" + , "Open" + , "Close" + , "Save" + , "New" + , "Delete" + , "Cut" + , "Copy" + , "Paste" + , "Undo" + , "Redo" + , "Back" + , "Forward" + , "Refresh" + , "ZoomIn" + , "ZoomOut" + , "Print" + , "AddTab" + , "NextChild" + , "PreviousChild" + , "Find" + , "FindNext" + , "FindPrevious" + , "Replace" + , "SelectAll" + , "Bold" + , "Italic" + , "Underline" + , "MoveToNextChar" + , "MoveToPreviousChar" + , "MoveToNextWord" + , "MoveToPreviousWord" + , "MoveToNextLine" + , "MoveToPreviousLine" + , "MoveToNextPage" + , "MoveToPreviousPage" + , "MoveToStartOfLine" + , "MoveToEndOfLine" + , "MoveToStartOfBlock" + , "MoveToEndOfBlock" + , "MoveToStartOfDocument" + , "MoveToEndOfDocument" + , "SelectNextChar" + , "SelectPreviousChar" + , "SelectNextWord" + , "SelectPreviousWord" + , "SelectNextLine" + , "SelectPreviousLine" + , "SelectNextPage" + , "SelectPreviousPage" + , "SelectStartOfLine" + , "SelectEndOfLine" + , "SelectStartOfBlock" + , "SelectEndOfBlock" + , "SelectStartOfDocument" + , "SelectEndOfDocument" + , "DeleteStartOfWord" + , "DeleteEndOfWord" + , "DeleteEndOfLine" + , "InsertParagraphSeparator" + , "InsertLineSeparator" + , "SaveAs" + , "Preferences" + , "Quit" + , "FullScreen" + , "Deselect" + , "DeleteCompleteLine" + , "Backspace" + , "Cancel" +}; + +static QString qtscript_QKeySequence_StandardKey_toStringHelper(QKeySequence::StandardKey value) +{ + if ((value >= QKeySequence::UnknownKey) && (value <= QKeySequence::Cancel)) + return qtscript_QKeySequence_StandardKey_keys[static_cast(value)-static_cast(QKeySequence::UnknownKey)]; + return QString(); +} + +static QScriptValue qtscript_QKeySequence_StandardKey_toScriptValue(QScriptEngine *engine, const QKeySequence::StandardKey &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QKeySequence")); + return clazz.property(qtscript_QKeySequence_StandardKey_toStringHelper(value)); +} + +static void qtscript_QKeySequence_StandardKey_fromScriptValue(const QScriptValue &value, QKeySequence::StandardKey &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QKeySequence_StandardKey(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QKeySequence::UnknownKey) && (arg <= QKeySequence::Cancel)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StandardKey(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QKeySequence_StandardKey_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QKeySequence::StandardKey value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QKeySequence_StandardKey_toString(QScriptContext *context, QScriptEngine *engine) +{ + QKeySequence::StandardKey value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QKeySequence_StandardKey_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QKeySequence_StandardKey_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QKeySequence_StandardKey, + qtscript_QKeySequence_StandardKey_valueOf, qtscript_QKeySequence_StandardKey_toString); + qScriptRegisterMetaType(engine, qtscript_QKeySequence_StandardKey_toScriptValue, + qtscript_QKeySequence_StandardKey_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 71; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QKeySequence_StandardKey_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QKeySequence_StandardKey_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QKeySequence +// + +static QScriptValue qtscript_QKeySequence_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QKeySequence* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QKeySequence.%0(): this object is not a QKeySequence") + .arg(qtscript_QKeySequence_function_names[_id+6])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QKeySequence _q_arg0 = qscriptvalue_cast(context->argument(0)); + QKeySequence::SequenceMatch _q_result = _q_self->matches(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QKeySequence _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QKeySequence _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator<(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + int _q_result = _q_self->operator[](_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QKeySequence _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toString(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QKeySequence::SequenceFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QKeySequence_throw_ambiguity_error_helper(context, + qtscript_QKeySequence_function_names[_id+6], + qtscript_QKeySequence_function_signatures[_id+6]); +} + +static QScriptValue qtscript_QKeySequence_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QKeySequence(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QKeySequence _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QKeySequence::StandardKey _q_arg0 = qscriptvalue_cast(context->argument(0)); + QKeySequence _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QKeySequence _q_arg0 = qscriptvalue_cast(context->argument(0)); + QKeySequence _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QKeySequence _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QKeySequence _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QKeySequence::SequenceFormat _q_arg1 = qscriptvalue_cast(context->argument(1)); + QKeySequence _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QKeySequence _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QKeySequence _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QKeySequence _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QKeySequence _q_result = QKeySequence::fromString(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QKeySequence::SequenceFormat _q_arg1 = qscriptvalue_cast(context->argument(1)); + QKeySequence _q_result = QKeySequence::fromString(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QKeySequence::StandardKey _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = QKeySequence::keyBindings(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QList _q_result = QKeySequence::listFromString(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QKeySequence::SequenceFormat _q_arg1 = qscriptvalue_cast(context->argument(1)); + QList _q_result = QKeySequence::listFromString(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QString _q_result = QKeySequence::listToString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QKeySequence::SequenceFormat _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = QKeySequence::listToString(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QKeySequence _q_result = QKeySequence::mnemonic(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QKeySequence_throw_ambiguity_error_helper(context, + qtscript_QKeySequence_function_names[_id], + qtscript_QKeySequence_function_signatures[_id]); +} + +QScriptValue qtscript_create_QKeySequence_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QKeySequence*)0)); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QKeySequence_prototype_call, qtscript_QKeySequence_function_lengths[i+6]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QKeySequence_function_names[i+6]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QKeySequence_static_call, proto, qtscript_QKeySequence_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QKeySequence_static_call, + qtscript_QKeySequence_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QKeySequence_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("SequenceMatch"), + qtscript_create_QKeySequence_SequenceMatch_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StandardKey"), + qtscript_create_QKeySequence_StandardKey_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QLine.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QLine.cpp new file mode 100644 index 00000000..460a82c8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QLine.cpp @@ -0,0 +1,329 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QLine_function_names[] = { + "QLine" + // static + // prototype + , "dx" + , "dy" + , "isNull" + , "equals" + , "p1" + , "p2" + , "setLine" + , "setP1" + , "setP2" + , "setPoints" + , "translate" + , "translated" + , "x1" + , "x2" + , "y1" + , "y2" + , "toString" +}; + +static const char * const qtscript_QLine_function_signatures[] = { + "\nQPoint pt1, QPoint pt2\nint x1, int y1, int x2, int y2" + // static + // prototype + , "" + , "" + , "" + , "QLine d" + , "" + , "" + , "int x1, int y1, int x2, int y2" + , "QPoint p1" + , "QPoint p2" + , "QPoint p1, QPoint p2" + , "QPoint p\nint dx, int dy" + , "QPoint p\nint dx, int dy" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QLine_function_lengths[] = { + 4 + // static + // prototype + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 4 + , 1 + , 1 + , 2 + , 2 + , 2 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QLine_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QLine::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QLine*) + +// +// QLine +// + +static QScriptValue qtscript_QLine_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 16; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QLine* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QLine.%0(): this object is not a QLine") + .arg(qtscript_QLine_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->dx(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->dy(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QLine _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->p1(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->p2(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setLine(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setP1(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setP2(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 2) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setPoints(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->translate(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->translate(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLine _q_result = _q_self->translated(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QLine _q_result = _q_self->translated(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + int _q_result = _q_self->x1(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + int _q_result = _q_self->x2(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + int _q_result = _q_self->y1(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + int _q_result = _q_self->y2(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QLine_throw_ambiguity_error_helper(context, + qtscript_QLine_function_names[_id+1], + qtscript_QLine_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QLine_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QLine(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QLine _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QLine _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QLine _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QLine_throw_ambiguity_error_helper(context, + qtscript_QLine_function_names[_id], + qtscript_QLine_function_signatures[_id]); +} + +QScriptValue qtscript_create_QLine_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QLine*)0)); + for (int i = 0; i < 17; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QLine_prototype_call, qtscript_QLine_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QLine_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QLine_static_call, proto, qtscript_QLine_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QLineF.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QLineF.cpp new file mode 100644 index 00000000..47a2d59d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QLineF.cpp @@ -0,0 +1,551 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QLineF_function_names[] = { + "QLineF" + // static + , "fromPolar" + // prototype + , "angle" + , "angleTo" + , "dx" + , "dy" + , "intersect" + , "isNull" + , "length" + , "normalVector" + , "equals" + , "p1" + , "p2" + , "pointAt" + , "setAngle" + , "setLength" + , "setLine" + , "setP1" + , "setP2" + , "setPoints" + , "toLine" + , "translate" + , "translated" + , "unitVector" + , "x1" + , "x2" + , "y1" + , "y2" + , "toString" +}; + +static const char * const qtscript_QLineF_function_signatures[] = { + "\nQLine line\nQPointF pt1, QPointF pt2\nqreal x1, qreal y1, qreal x2, qreal y2" + // static + , "qreal length, qreal angle" + // prototype + , "\nQLineF l" + , "QLineF l" + , "" + , "" + , "QLineF l, QPointF intersectionPoint" + , "" + , "" + , "" + , "QLineF d" + , "" + , "" + , "qreal t" + , "qreal angle" + , "qreal len" + , "qreal x1, qreal y1, qreal x2, qreal y2" + , "QPointF p1" + , "QPointF p2" + , "QPointF p1, QPointF p2" + , "" + , "QPointF p\nqreal dx, qreal dy" + , "QPointF p\nqreal dx, qreal dy" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QLineF_function_lengths[] = { + 4 + // static + , 2 + // prototype + , 1 + , 1 + , 0 + , 0 + , 2 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 1 + , 1 + , 4 + , 1 + , 1 + , 2 + , 0 + , 2 + , 2 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QLineF_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QLineF::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QLineF*) +Q_DECLARE_METATYPE(QLineF::IntersectType) +Q_DECLARE_METATYPE(QPointF*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QLineF::IntersectType +// + +static const QLineF::IntersectType qtscript_QLineF_IntersectType_values[] = { + QLineF::NoIntersection + , QLineF::BoundedIntersection + , QLineF::UnboundedIntersection +}; + +static const char * const qtscript_QLineF_IntersectType_keys[] = { + "NoIntersection" + , "BoundedIntersection" + , "UnboundedIntersection" +}; + +static QString qtscript_QLineF_IntersectType_toStringHelper(QLineF::IntersectType value) +{ + if ((value >= QLineF::NoIntersection) && (value <= QLineF::UnboundedIntersection)) + return qtscript_QLineF_IntersectType_keys[static_cast(value)-static_cast(QLineF::NoIntersection)]; + return QString(); +} + +static QScriptValue qtscript_QLineF_IntersectType_toScriptValue(QScriptEngine *engine, const QLineF::IntersectType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QLineF")); + return clazz.property(qtscript_QLineF_IntersectType_toStringHelper(value)); +} + +static void qtscript_QLineF_IntersectType_fromScriptValue(const QScriptValue &value, QLineF::IntersectType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QLineF_IntersectType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QLineF::NoIntersection) && (arg <= QLineF::UnboundedIntersection)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("IntersectType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QLineF_IntersectType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QLineF::IntersectType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QLineF_IntersectType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QLineF::IntersectType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QLineF_IntersectType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QLineF_IntersectType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QLineF_IntersectType, + qtscript_QLineF_IntersectType_valueOf, qtscript_QLineF_IntersectType_toString); + qScriptRegisterMetaType(engine, qtscript_QLineF_IntersectType_toScriptValue, + qtscript_QLineF_IntersectType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QLineF_IntersectType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QLineF_IntersectType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QLineF +// + +static QScriptValue qtscript_QLineF_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 26; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QLineF* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QLineF.%0(): this object is not a QLineF") + .arg(qtscript_QLineF_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->angle(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QLineF _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->angle(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QLineF _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->angleTo(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->dx(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->dy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 2) { + QLineF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QLineF::IntersectType _q_result = _q_self->intersect(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->length(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QLineF _q_result = _q_self->normalVector(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QLineF _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->p1(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->p2(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_result = _q_self->pointAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setAngle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLength(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setLine(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setP1(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setP2(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 2) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setPoints(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QLine _q_result = _q_self->toLine(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->translate(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->translate(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLineF _q_result = _q_self->translated(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QLineF _q_result = _q_self->translated(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + QLineF _q_result = _q_self->unitVector(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->x1(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->x2(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->y1(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->y2(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QLineF_throw_ambiguity_error_helper(context, + qtscript_QLineF_function_names[_id+2], + qtscript_QLineF_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QLineF_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QLineF(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QLineF _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QLine _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLineF _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QLineF _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QLineF _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QLineF _q_result = QLineF::fromPolar(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QLineF_throw_ambiguity_error_helper(context, + qtscript_QLineF_function_names[_id], + qtscript_QLineF_function_signatures[_id]); +} + +QScriptValue qtscript_create_QLineF_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QLineF*)0)); + for (int i = 0; i < 27; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QLineF_prototype_call, qtscript_QLineF_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QLineF_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QLineF_static_call, proto, qtscript_QLineF_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QLineF_static_call, + qtscript_QLineF_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QLineF_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("IntersectType"), + qtscript_create_QLineF_IntersectType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QLinearGradient.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QLinearGradient.cpp new file mode 100644 index 00000000..141c7749 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QLinearGradient.cpp @@ -0,0 +1,205 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QLinearGradient_function_names[] = { + "QLinearGradient" + // static + // prototype + , "finalStop" + , "setFinalStop" + , "setStart" + , "start" + , "toString" +}; + +static const char * const qtscript_QLinearGradient_function_signatures[] = { + "\nQPointF start, QPointF finalStop\nqreal xStart, qreal yStart, qreal xFinalStop, qreal yFinalStop" + // static + // prototype + , "" + , "QPointF stop\nqreal x, qreal y" + , "QPointF start\nqreal x, qreal y" + , "" +"" +}; + +static const int qtscript_QLinearGradient_function_lengths[] = { + 4 + // static + // prototype + , 0 + , 2 + , 2 + , 0 + , 0 +}; + +static QScriptValue qtscript_QLinearGradient_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QLinearGradient::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QLinearGradient) +Q_DECLARE_METATYPE(QLinearGradient*) +Q_DECLARE_METATYPE(QGradient*) +Q_DECLARE_METATYPE(QGradient) + +// +// QLinearGradient +// + +static QScriptValue qtscript_QLinearGradient_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QLinearGradient* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QLinearGradient.%0(): this object is not a QLinearGradient") + .arg(qtscript_QLinearGradient_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->finalStop(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFinalStop(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setFinalStop(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStart(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setStart(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->start(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QLinearGradient"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QLinearGradient_throw_ambiguity_error_helper(context, + qtscript_QLinearGradient_function_names[_id+1], + qtscript_QLinearGradient_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QLinearGradient_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QLinearGradient(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QLinearGradient _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QLinearGradient _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QLinearGradient _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QLinearGradient_throw_ambiguity_error_helper(context, + qtscript_QLinearGradient_function_names[_id], + qtscript_QLinearGradient_function_signatures[_id]); +} + +QScriptValue qtscript_create_QLinearGradient_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QLinearGradient*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QLinearGradient_prototype_call, qtscript_QLinearGradient_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QLinearGradient_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QLinearGradient_static_call, proto, qtscript_QLinearGradient_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMatrix.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMatrix.cpp new file mode 100644 index 00000000..226f4ba1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMatrix.cpp @@ -0,0 +1,429 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QMatrix_function_names[] = { + "QMatrix" + // static + // prototype + , "determinant" + , "dx" + , "dy" + , "inverted" + , "isIdentity" + , "isInvertible" + , "m11" + , "m12" + , "m21" + , "m22" + , "map" + , "mapRect" + , "mapToPolygon" + , "equals" + , "operator_multiply" + , "operator_multiply_assign" + , "reset" + , "rotate_private" + , "scale_private" + , "setMatrix" + , "shear_private" + , "translate_private" + , "toString" +}; + +static const char * const qtscript_QMatrix_function_signatures[] = { + "\nQMatrix matrix\nqreal m11, qreal m12, qreal m21, qreal m22, qreal dx, qreal dy" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QLine l\nQLineF l\nQPainterPath p\nQPoint p\nQPointF p\nQPolygon a\nQPolygonF a\nQRegion r" + , "QRect arg__1\nQRectF arg__1" + , "QRect r" + , "QMatrix arg__1" + , "QMatrix o" + , "QMatrix arg__1" + , "" + , "qreal a" + , "qreal sx, qreal sy" + , "qreal m11, qreal m12, qreal m21, qreal m22, qreal dx, qreal dy" + , "qreal sh, qreal sv" + , "qreal dx, qreal dy" +"" +}; + +static const int qtscript_QMatrix_function_lengths[] = { + 6 + // static + // prototype + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 1 + , 2 + , 6 + , 2 + , 2 + , 0 +}; + +static QScriptValue qtscript_QMatrix_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QMatrix::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QMatrix*) +Q_DECLARE_METATYPE(QPainterPath) + +// +// QMatrix +// + +static QScriptValue qtscript_QMatrix_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 22; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QMatrix* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QMatrix.%0(): this object is not a QMatrix") + .arg(qtscript_QMatrix_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->determinant(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->dx(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->dy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QMatrix _q_result = _q_self->inverted(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isIdentity(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isInvertible(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->m11(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->m12(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->m21(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->m22(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QLine _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLine _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QLineF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLineF _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygon _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 11: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->mapRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->mapRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 12: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygon _q_result = _q_self->mapToPolygon(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix _q_result = _q_self->operator*(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + _q_self->reset(); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix& _q_result = _q_self->rotate(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QMatrix& _q_result = _q_self->scale(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 6) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + qreal _q_arg5 = qscriptvalue_cast(context->argument(5)); + _q_self->setMatrix(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QMatrix& _q_result = _q_self->shear(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QMatrix& _q_result = _q_self->translate(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QMatrix_throw_ambiguity_error_helper(context, + qtscript_QMatrix_function_names[_id+1], + qtscript_QMatrix_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QMatrix_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QMatrix(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QMatrix _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 6) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + qreal _q_arg5 = qscriptvalue_cast(context->argument(5)); + QMatrix _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QMatrix_throw_ambiguity_error_helper(context, + qtscript_QMatrix_function_names[_id], + qtscript_QMatrix_function_signatures[_id]); +} + +QScriptValue qtscript_create_QMatrix_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QMatrix*)0)); + for (int i = 0; i < 23; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMatrix_prototype_call, qtscript_QMatrix_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QMatrix_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QMatrix_static_call, proto, qtscript_QMatrix_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMatrix3x3.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMatrix3x3.cpp new file mode 100644 index 00000000..fd77dcd6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMatrix3x3.cpp @@ -0,0 +1,127 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QMatrix3x3.h" + +static const char * const qtscript_QMatrix3x3_function_names[] = { + "QMatrix3x3" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QMatrix3x3_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QMatrix3x3_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QMatrix3x3_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QMatrix3x3::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QMatrix3x3*) +Q_DECLARE_METATYPE(QtScriptShell_QMatrix3x3) +Q_DECLARE_METATYPE(QtScriptShell_QMatrix3x3*) + +// +// QMatrix3x3 +// + +static QScriptValue qtscript_QMatrix3x3_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QMatrix3x3* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QMatrix3x3.%0(): this object is not a QMatrix3x3") + .arg(qtscript_QMatrix3x3_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QMatrix3x3"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QMatrix3x3_throw_ambiguity_error_helper(context, + qtscript_QMatrix3x3_function_names[_id+1], + qtscript_QMatrix3x3_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QMatrix3x3_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QMatrix3x3(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QMatrix3x3 _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QMatrix3x3)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QMatrix3x3_throw_ambiguity_error_helper(context, + qtscript_QMatrix3x3_function_names[_id], + qtscript_QMatrix3x3_function_signatures[_id]); +} + +QScriptValue qtscript_create_QMatrix3x3_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QMatrix3x3*)0)); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QMatrix3x3_static_call, proto, qtscript_QMatrix3x3_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMatrix4x4.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMatrix4x4.cpp new file mode 100644 index 00000000..4770c712 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMatrix4x4.cpp @@ -0,0 +1,714 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QMatrix4x4_function_names[] = { + "QMatrix4x4" + // static + // prototype + , "column" + , "constData" + , "copyDataTo" + , "data" + , "determinant" + , "fill" + , "flipCoordinates" + , "frustum" + , "inverted" + , "isAffine" + , "isIdentity" + , "lookAt" + , "map" + , "mapRect" + , "mapVector" + , "normalMatrix" + , "operator_add_assign" + , "operator_cast_" + , "operator_divide_assign" + , "equals" + , "operator_multiply_assign" + , "operator_subtract_assign" + , "optimize" + , "ortho" + , "perspective" + , "rotate" + , "row" + , "scale" + , "setColumn" + , "setRow" + , "setToIdentity" + , "toAffine" + , "toTransform" + , "translate" + , "transposed" + , "viewport" + , "toString" +}; + +static const char * const qtscript_QMatrix4x4_function_signatures[] = { + "\nQMatrix matrix\nQTransform transform\nfloat values\nfloat values, int cols, int rows\nfloat m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44" + // static + // prototype + , "int index" + , "" + , "float values" + , "" + , "" + , "float value" + , "" + , "float left, float right, float bottom, float top, float nearPlane, float farPlane" + , "bool invertible" + , "" + , "" + , "QVector3D eye, QVector3D center, QVector3D up" + , "QPoint point\nQPointF point\nQVector3D point\nQVector4D point" + , "QRect rect\nQRectF rect" + , "QVector3D vector" + , "" + , "QMatrix4x4 other" + , "int row, int column" + , "float divisor" + , "QMatrix4x4 other" + , "QMatrix4x4 other\nfloat factor" + , "QMatrix4x4 other" + , "" + , "QRect rect\nQRectF rect\nfloat left, float right, float bottom, float top, float nearPlane, float farPlane" + , "float verticalAngle, float aspectRatio, float nearPlane, float farPlane" + , "QQuaternion quaternion\nfloat angle, QVector3D vector\nfloat angle, float x, float y, float z" + , "int index" + , "QVector3D vector\nfloat factor\nfloat x, float y\nfloat x, float y, float z" + , "int index, QVector4D value" + , "int index, QVector4D value" + , "" + , "" + , "\nfloat distanceToPlane" + , "QVector3D vector\nfloat x, float y\nfloat x, float y, float z" + , "" + , "QRectF rect\nfloat left, float bottom, float width, float height, float nearPlane, float farPlane" +"" +}; + +static const int qtscript_QMatrix4x4_function_lengths[] = { + 16 + // static + // prototype + , 1 + , 0 + , 1 + , 0 + , 0 + , 1 + , 0 + , 6 + , 1 + , 0 + , 0 + , 3 + , 1 + , 1 + , 1 + , 0 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 0 + , 6 + , 4 + , 4 + , 1 + , 3 + , 2 + , 2 + , 0 + , 0 + , 1 + , 3 + , 0 + , 6 + , 0 +}; + +static QScriptValue qtscript_QMatrix4x4_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QMatrix4x4::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QMatrix4x4*) +Q_DECLARE_METATYPE(const float*) +Q_DECLARE_METATYPE(float*) +Q_DECLARE_METATYPE(bool*) + +// +// QMatrix4x4 +// + +static QScriptValue qtscript_QMatrix4x4_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 36; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QMatrix4x4* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QMatrix4x4.%0(): this object is not a QMatrix4x4") + .arg(qtscript_QMatrix4x4_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QVector4D _q_result = _q_self->column(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + const float* _q_result = const_cast(_q_self->constData()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + float* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->copyDataTo(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + float* _q_result = _q_self->data(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + double _q_result = _q_self->determinant(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->fill(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 0) { + _q_self->flipCoordinates(); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 6) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + float _q_arg4 = qscriptvalue_cast(context->argument(4)); + float _q_arg5 = qscriptvalue_cast(context->argument(5)); + _q_self->frustum(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QMatrix4x4 _q_result = _q_self->inverted(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + bool* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix4x4 _q_result = _q_self->inverted(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isAffine(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isIdentity(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 3) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVector3D _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->lookAt(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QVector4D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector4D _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 13: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->mapRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->mapRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 14: + if (context->argumentCount() == 1) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_result = _q_self->mapVector(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QMatrix3x3 _q_result = _q_self->normalMatrix(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QMatrix4x4 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix4x4& _q_result = _q_self->operator+=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + float& _q_result = _q_self->operator()(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix4x4& _q_result = _q_self->operator/=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QMatrix4x4 _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QMatrix4x4 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix4x4& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix4x4& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 21: + if (context->argumentCount() == 1) { + QMatrix4x4 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix4x4& _q_result = _q_self->operator-=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + _q_self->optimize(); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->ortho(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->ortho(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 6) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + float _q_arg4 = qscriptvalue_cast(context->argument(4)); + float _q_arg5 = qscriptvalue_cast(context->argument(5)); + _q_self->ortho(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 4) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->perspective(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QQuaternion _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->rotate(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->rotate(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->rotate(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->rotate(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QVector4D _q_result = _q_self->row(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->scale(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber()) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->scale(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->scale(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->scale(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QVector4D _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setColumn(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QVector4D _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setRow(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 0) { + _q_self->setToIdentity(); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 0) { + QMatrix _q_result = _q_self->toAffine(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 0) { + QTransform _q_result = _q_self->toTransform(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform _q_result = _q_self->toTransform(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 1) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->translate(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->translate(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->translate(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 0) { + QMatrix4x4 _q_result = _q_self->transposed(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 35: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->viewport(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->viewport(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + float _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->viewport(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + float _q_arg4 = qscriptvalue_cast(context->argument(4)); + float _q_arg5 = qscriptvalue_cast(context->argument(5)); + _q_self->viewport(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 36: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QMatrix4x4_throw_ambiguity_error_helper(context, + qtscript_QMatrix4x4_function_names[_id+1], + qtscript_QMatrix4x4_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QMatrix4x4_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QMatrix4x4(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QMatrix4x4 _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix4x4 _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix4x4 _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + const float* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix4x4 _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 3) { + const float* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QMatrix4x4 _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 16) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + float _q_arg4 = qscriptvalue_cast(context->argument(4)); + float _q_arg5 = qscriptvalue_cast(context->argument(5)); + float _q_arg6 = qscriptvalue_cast(context->argument(6)); + float _q_arg7 = qscriptvalue_cast(context->argument(7)); + float _q_arg8 = qscriptvalue_cast(context->argument(8)); + float _q_arg9 = qscriptvalue_cast(context->argument(9)); + float _q_arg10 = qscriptvalue_cast(context->argument(10)); + float _q_arg11 = qscriptvalue_cast(context->argument(11)); + float _q_arg12 = qscriptvalue_cast(context->argument(12)); + float _q_arg13 = qscriptvalue_cast(context->argument(13)); + float _q_arg14 = qscriptvalue_cast(context->argument(14)); + float _q_arg15 = qscriptvalue_cast(context->argument(15)); + QMatrix4x4 _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7, _q_arg8, _q_arg9, _q_arg10, _q_arg11, _q_arg12, _q_arg13, _q_arg14, _q_arg15); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QMatrix4x4_throw_ambiguity_error_helper(context, + qtscript_QMatrix4x4_function_names[_id], + qtscript_QMatrix4x4_function_signatures[_id]); +} + +QScriptValue qtscript_create_QMatrix4x4_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QMatrix4x4*)0)); + for (int i = 0; i < 37; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMatrix4x4_prototype_call, qtscript_QMatrix4x4_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QMatrix4x4_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QMatrix4x4_static_call, proto, qtscript_QMatrix4x4_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMouseEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMouseEvent.cpp new file mode 100644 index 00000000..8427bb96 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMouseEvent.cpp @@ -0,0 +1,277 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QMouseEvent.h" + +static const char * const qtscript_QMouseEvent_function_names[] = { + "QMouseEvent" + // static + // prototype + , "button" + , "buttons" + , "globalPos" + , "globalX" + , "globalY" + , "localPos" + , "pos" + , "screenPos" + , "windowPos" + , "x" + , "y" + , "toString" +}; + +static const char * const qtscript_QMouseEvent_function_signatures[] = { + "Type type, QPointF localPos, MouseButton button, MouseButtons buttons, KeyboardModifiers modifiers\nType type, QPointF localPos, QPointF screenPos, MouseButton button, MouseButtons buttons, KeyboardModifiers modifiers\nType type, QPointF localPos, QPointF windowPos, QPointF screenPos, MouseButton button, MouseButtons buttons, KeyboardModifiers modifiers" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QMouseEvent_function_lengths[] = { + 7 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QMouseEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QMouseEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QtScriptShell_QMouseEvent*) +Q_DECLARE_METATYPE(Qt::MouseButton) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QInputEvent*) + +// +// QMouseEvent +// + +static QScriptValue qtscript_QMouseEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 11; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QMouseEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QMouseEvent.%0(): this object is not a QMouseEvent") + .arg(qtscript_QMouseEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + Qt::MouseButton _q_result = _q_self->button(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->buttons(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->globalPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->globalX(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->globalY(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + const QPointF& _q_result = _q_self->localPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + const QPointF& _q_result = _q_self->screenPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + const QPointF& _q_result = _q_self->windowPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->x(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + int _q_result = _q_self->y(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: { + QString result = QString::fromLatin1("QMouseEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QMouseEvent_throw_ambiguity_error_helper(context, + qtscript_QMouseEvent_function_names[_id+1], + qtscript_QMouseEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QMouseEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QMouseEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 5) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::MouseButton _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QFlags _q_arg4 = qscriptvalue_cast >(context->argument(4)); + QtScriptShell_QMouseEvent* _q_cpp_result = new QtScriptShell_QMouseEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QMouseEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 6) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_arg2 = qscriptvalue_cast(context->argument(2)); + Qt::MouseButton _q_arg3 = qscriptvalue_cast(context->argument(3)); + QFlags _q_arg4 = qscriptvalue_cast >(context->argument(4)); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + QtScriptShell_QMouseEvent* _q_cpp_result = new QtScriptShell_QMouseEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QMouseEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 7) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_arg2 = qscriptvalue_cast(context->argument(2)); + QPointF _q_arg3 = qscriptvalue_cast(context->argument(3)); + Qt::MouseButton _q_arg4 = qscriptvalue_cast(context->argument(4)); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + QFlags _q_arg6 = qscriptvalue_cast >(context->argument(6)); + QtScriptShell_QMouseEvent* _q_cpp_result = new QtScriptShell_QMouseEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QMouseEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QMouseEvent_throw_ambiguity_error_helper(context, + qtscript_QMouseEvent_function_names[_id], + qtscript_QMouseEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QMouseEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QMouseEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 12; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMouseEvent_prototype_call, qtscript_QMouseEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QMouseEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QMouseEvent_static_call, proto, qtscript_QMouseEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMoveEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMoveEvent.cpp new file mode 100644 index 00000000..7c5f572a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMoveEvent.cpp @@ -0,0 +1,157 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QMoveEvent.h" + +static const char * const qtscript_QMoveEvent_function_names[] = { + "QMoveEvent" + // static + // prototype + , "oldPos" + , "pos" + , "toString" +}; + +static const char * const qtscript_QMoveEvent_function_signatures[] = { + "QPoint pos, QPoint oldPos" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QMoveEvent_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QMoveEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QMoveEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(QtScriptShell_QMoveEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QMoveEvent +// + +static QScriptValue qtscript_QMoveEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QMoveEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QMoveEvent.%0(): this object is not a QMoveEvent") + .arg(qtscript_QMoveEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + const QPoint& _q_result = _q_self->oldPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + const QPoint& _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QMoveEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QMoveEvent_throw_ambiguity_error_helper(context, + qtscript_QMoveEvent_function_names[_id+1], + qtscript_QMoveEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QMoveEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QMoveEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 2) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QMoveEvent* _q_cpp_result = new QtScriptShell_QMoveEvent(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QMoveEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QMoveEvent_throw_ambiguity_error_helper(context, + qtscript_QMoveEvent_function_names[_id], + qtscript_QMoveEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QMoveEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QMoveEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMoveEvent_prototype_call, qtscript_QMoveEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QMoveEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QMoveEvent_static_call, proto, qtscript_QMoveEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMovie.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMovie.cpp new file mode 100644 index 00000000..ad8b8adc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QMovie.cpp @@ -0,0 +1,529 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QMovie.h" + +static const char * const qtscript_QMovie_function_names[] = { + "QMovie" + // static + , "supportedFormats" + // prototype + , "backgroundColor" + , "currentFrameNumber" + , "currentImage" + , "currentPixmap" + , "device" + , "fileName" + , "format" + , "frameCount" + , "frameRect" + , "isValid" + , "jumpToFrame" + , "loopCount" + , "nextFrameDelay" + , "scaledSize" + , "setBackgroundColor" + , "setDevice" + , "setFileName" + , "setFormat" + , "setScaledSize" + , "state" + , "toString" +}; + +static const char * const qtscript_QMovie_function_signatures[] = { + "QIODevice device, QByteArray format, QObject parent\nQObject parent\nString fileName, QByteArray format, QObject parent" + // static + , "" + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "int frameNumber" + , "" + , "" + , "" + , "QColor color" + , "QIODevice device" + , "String fileName" + , "QByteArray format" + , "QSize size" + , "" +"" +}; + +static const int qtscript_QMovie_function_lengths[] = { + 3 + // static + , 0 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QMovie_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QMovie::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QMovie*) +Q_DECLARE_METATYPE(QtScriptShell_QMovie*) +Q_DECLARE_METATYPE(QMovie::MovieState) +Q_DECLARE_METATYPE(QIODevice*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QMovie::MovieState +// + +static const QMovie::MovieState qtscript_QMovie_MovieState_values[] = { + QMovie::NotRunning + , QMovie::Paused + , QMovie::Running +}; + +static const char * const qtscript_QMovie_MovieState_keys[] = { + "NotRunning" + , "Paused" + , "Running" +}; + +static QString qtscript_QMovie_MovieState_toStringHelper(QMovie::MovieState value) +{ + if ((value >= QMovie::NotRunning) && (value <= QMovie::Running)) + return qtscript_QMovie_MovieState_keys[static_cast(value)-static_cast(QMovie::NotRunning)]; + return QString(); +} + +static QScriptValue qtscript_QMovie_MovieState_toScriptValue(QScriptEngine *engine, const QMovie::MovieState &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QMovie")); + return clazz.property(qtscript_QMovie_MovieState_toStringHelper(value)); +} + +static void qtscript_QMovie_MovieState_fromScriptValue(const QScriptValue &value, QMovie::MovieState &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QMovie_MovieState(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QMovie::NotRunning) && (arg <= QMovie::Running)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("MovieState(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QMovie_MovieState_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QMovie::MovieState value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QMovie_MovieState_toString(QScriptContext *context, QScriptEngine *engine) +{ + QMovie::MovieState value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QMovie_MovieState_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QMovie_MovieState_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QMovie_MovieState, + qtscript_QMovie_MovieState_valueOf, qtscript_QMovie_MovieState_toString); + qScriptRegisterMetaType(engine, qtscript_QMovie_MovieState_toScriptValue, + qtscript_QMovie_MovieState_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QMovie_MovieState_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QMovie_MovieState_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QMovie +// + +static QScriptValue qtscript_QMovie_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 20; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QMovie* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QMovie.%0(): this object is not a QMovie") + .arg(qtscript_QMovie_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QColor _q_result = _q_self->backgroundColor(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->currentFrameNumber(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QImage _q_result = _q_self->currentImage(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QPixmap _q_result = _q_self->currentPixmap(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QIODevice* _q_result = _q_self->device(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->fileName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->format(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->frameCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->frameRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->jumpToFrame(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + int _q_result = _q_self->loopCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + int _q_result = _q_self->nextFrameDelay(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->scaledSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBackgroundColor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDevice(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setFileName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScaledSize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QMovie::MovieState _q_result = _q_self->state(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: { + QString result = QString::fromLatin1("QMovie"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QMovie_throw_ambiguity_error_helper(context, + qtscript_QMovie_function_names[_id+2], + qtscript_QMovie_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QMovie_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QMovie(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QMovie* _q_cpp_result = new QtScriptShell_QMovie(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMovie*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QMovie* _q_cpp_result = new QtScriptShell_QMovie(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMovie*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isQObject()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QMovie* _q_cpp_result = new QtScriptShell_QMovie(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMovie*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QMovie* _q_cpp_result = new QtScriptShell_QMovie(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMovie*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QMovie* _q_cpp_result = new QtScriptShell_QMovie(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMovie*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QMovie* _q_cpp_result = new QtScriptShell_QMovie(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMovie*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && context->argument(2).isQObject()) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QObject* _q_arg2 = context->argument(2).toQObject(); + QtScriptShell_QMovie* _q_cpp_result = new QtScriptShell_QMovie(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMovie*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && context->argument(2).isQObject()) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QObject* _q_arg2 = context->argument(2).toQObject(); + QtScriptShell_QMovie* _q_cpp_result = new QtScriptShell_QMovie(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMovie*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } + break; + + case 1: + if (context->argumentCount() == 0) { + QList _q_result = QMovie::supportedFormats(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QMovie_throw_ambiguity_error_helper(context, + qtscript_QMovie_function_names[_id], + qtscript_QMovie_function_signatures[_id]); +} + +static QScriptValue qtscript_QMovie_toScriptValue(QScriptEngine *engine, QMovie* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QMovie_fromScriptValue(const QScriptValue &value, QMovie* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QMovie_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QMovie*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 21; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMovie_prototype_call, qtscript_QMovie_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QMovie_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QMovie_toScriptValue, + qtscript_QMovie_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QMovie_static_call, proto, qtscript_QMovie_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMovie_static_call, + qtscript_QMovie_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QMovie_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("MovieState"), + qtscript_create_QMovie_MovieState_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPaintEngine.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPaintEngine.cpp new file mode 100644 index 00000000..619e5f26 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPaintEngine.cpp @@ -0,0 +1,1115 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPaintEngine.h" + +static const char * const qtscript_QPaintEngine_function_names[] = { + "QPaintEngine" + // static + // prototype + , "begin" + , "clearDirty" + , "coordinateOffset" + , "drawEllipse" + , "drawImage" + , "drawLines" + , "drawPath" + , "drawPixmap" + , "drawPoints" + , "drawPolygon" + , "drawRects" + , "drawTextItem" + , "drawTiledPixmap" + , "end" + , "hasFeature" + , "isActive" + , "isExtended" + , "paintDevice" + , "painter" + , "setActive" + , "setDirty" + , "setSystemClip" + , "setSystemRect" + , "syncState" + , "systemClip" + , "systemRect" + , "testDirty" + , "type" + , "updateState" + , "toString" +}; + +static const char * const qtscript_QPaintEngine_function_signatures[] = { + "PaintEngineFeatures features" + // static + // prototype + , "QPaintDevice pdev" + , "DirtyFlags df" + , "" + , "QRect r\nQRectF r" + , "QRectF r, QImage pm, QRectF sr, ImageConversionFlags flags" + , "QLine lines, int lineCount\nQLineF lines, int lineCount" + , "QPainterPath path" + , "QRectF r, QPixmap pm, QRectF sr" + , "QPoint points, int pointCount\nQPointF points, int pointCount" + , "QPoint points, int pointCount, PolygonDrawMode mode\nQPointF points, int pointCount, PolygonDrawMode mode" + , "QRect rects, int rectCount\nQRectF rects, int rectCount" + , "QPointF p, QTextItem textItem" + , "QRectF r, QPixmap pixmap, QPointF s" + , "" + , "PaintEngineFeatures feature" + , "" + , "" + , "" + , "" + , "bool newState" + , "DirtyFlags df" + , "QRegion baseClip" + , "QRect rect" + , "" + , "" + , "" + , "DirtyFlags df" + , "" + , "QPaintEngineState state" +"" +}; + +static const int qtscript_QPaintEngine_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 1 + , 0 + , 1 + , 4 + , 2 + , 1 + , 3 + , 2 + , 3 + , 2 + , 2 + , 3 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QPaintEngine_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPaintEngine::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QtScriptShell_QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEngine::PaintEngineFeature) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QPaintEngine::Type) +Q_DECLARE_METATYPE(QPaintEngine::DirtyFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QPaintEngine::PolygonDrawMode) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(const QLine*) +Q_DECLARE_METATYPE(const QLineF*) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(const QPoint*) +Q_DECLARE_METATYPE(const QPointF*) +Q_DECLARE_METATYPE(const QRect*) +Q_DECLARE_METATYPE(const QRectF*) +Q_DECLARE_METATYPE(QTextItem) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QPaintEngineState) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QPaintEngine::PaintEngineFeature +// + +static const QPaintEngine::PaintEngineFeature qtscript_QPaintEngine_PaintEngineFeature_values[] = { + QPaintEngine::AllFeatures + , QPaintEngine::PrimitiveTransform + , QPaintEngine::PatternTransform + , QPaintEngine::PixmapTransform + , QPaintEngine::PatternBrush + , QPaintEngine::LinearGradientFill + , QPaintEngine::RadialGradientFill + , QPaintEngine::ConicalGradientFill + , QPaintEngine::AlphaBlend + , QPaintEngine::PorterDuff + , QPaintEngine::PainterPaths + , QPaintEngine::Antialiasing + , QPaintEngine::BrushStroke + , QPaintEngine::ConstantOpacity + , QPaintEngine::MaskedBrush + , QPaintEngine::PerspectiveTransform + , QPaintEngine::BlendModes + , QPaintEngine::ObjectBoundingModeGradients + , QPaintEngine::RasterOpModes + , QPaintEngine::PaintOutsidePaintEvent +}; + +static const char * const qtscript_QPaintEngine_PaintEngineFeature_keys[] = { + "AllFeatures" + , "PrimitiveTransform" + , "PatternTransform" + , "PixmapTransform" + , "PatternBrush" + , "LinearGradientFill" + , "RadialGradientFill" + , "ConicalGradientFill" + , "AlphaBlend" + , "PorterDuff" + , "PainterPaths" + , "Antialiasing" + , "BrushStroke" + , "ConstantOpacity" + , "MaskedBrush" + , "PerspectiveTransform" + , "BlendModes" + , "ObjectBoundingModeGradients" + , "RasterOpModes" + , "PaintOutsidePaintEvent" +}; + +static QString qtscript_QPaintEngine_PaintEngineFeature_toStringHelper(QPaintEngine::PaintEngineFeature value) +{ + for (int i = 0; i < 20; ++i) { + if (qtscript_QPaintEngine_PaintEngineFeature_values[i] == value) + return QString::fromLatin1(qtscript_QPaintEngine_PaintEngineFeature_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QPaintEngine_PaintEngineFeature_toScriptValue(QScriptEngine *engine, const QPaintEngine::PaintEngineFeature &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPaintEngine")); + return clazz.property(qtscript_QPaintEngine_PaintEngineFeature_toStringHelper(value)); +} + +static void qtscript_QPaintEngine_PaintEngineFeature_fromScriptValue(const QScriptValue &value, QPaintEngine::PaintEngineFeature &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPaintEngine_PaintEngineFeature(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 20; ++i) { + if (qtscript_QPaintEngine_PaintEngineFeature_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("PaintEngineFeature(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPaintEngine_PaintEngineFeature_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPaintEngine::PaintEngineFeature value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPaintEngine_PaintEngineFeature_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPaintEngine::PaintEngineFeature value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPaintEngine_PaintEngineFeature_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPaintEngine_PaintEngineFeature_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPaintEngine_PaintEngineFeature, + qtscript_QPaintEngine_PaintEngineFeature_valueOf, qtscript_QPaintEngine_PaintEngineFeature_toString); + qScriptRegisterMetaType(engine, qtscript_QPaintEngine_PaintEngineFeature_toScriptValue, + qtscript_QPaintEngine_PaintEngineFeature_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 20; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPaintEngine_PaintEngineFeature_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPaintEngine_PaintEngineFeature_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPaintEngine::PaintEngineFeatures +// + +static QScriptValue qtscript_QPaintEngine_PaintEngineFeatures_toScriptValue(QScriptEngine *engine, const QPaintEngine::PaintEngineFeatures &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QPaintEngine_PaintEngineFeatures_fromScriptValue(const QScriptValue &value, QPaintEngine::PaintEngineFeatures &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QPaintEngine_PaintEngineFeatures(QScriptContext *context, QScriptEngine *engine) +{ + QPaintEngine::PaintEngineFeatures result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("PaintEngineFeatures(): argument %0 is not of type PaintEngineFeature").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QPaintEngine_PaintEngineFeatures_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPaintEngine::PaintEngineFeatures value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPaintEngine_PaintEngineFeatures_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPaintEngine::PaintEngineFeatures value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 20; ++i) { + if ((value & qtscript_QPaintEngine_PaintEngineFeature_values[i]) == qtscript_QPaintEngine_PaintEngineFeature_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QPaintEngine_PaintEngineFeature_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QPaintEngine_PaintEngineFeatures_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QPaintEngine_PaintEngineFeatures_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QPaintEngine_PaintEngineFeatures, qtscript_QPaintEngine_PaintEngineFeatures_valueOf, + qtscript_QPaintEngine_PaintEngineFeatures_toString, qtscript_QPaintEngine_PaintEngineFeatures_equals); + qScriptRegisterMetaType(engine, qtscript_QPaintEngine_PaintEngineFeatures_toScriptValue, + qtscript_QPaintEngine_PaintEngineFeatures_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QPaintEngine::Type +// + +static const QPaintEngine::Type qtscript_QPaintEngine_Type_values[] = { + QPaintEngine::X11 + , QPaintEngine::Windows + , QPaintEngine::QuickDraw + , QPaintEngine::CoreGraphics + , QPaintEngine::MacPrinter + , QPaintEngine::QWindowSystem + , QPaintEngine::PostScript + , QPaintEngine::OpenGL + , QPaintEngine::Picture + , QPaintEngine::SVG + , QPaintEngine::Raster + , QPaintEngine::Direct3D + , QPaintEngine::Pdf + , QPaintEngine::OpenVG + , QPaintEngine::OpenGL2 + , QPaintEngine::PaintBuffer + , QPaintEngine::Blitter + , QPaintEngine::Direct2D + , QPaintEngine::User + , QPaintEngine::MaxUser +}; + +static const char * const qtscript_QPaintEngine_Type_keys[] = { + "X11" + , "Windows" + , "QuickDraw" + , "CoreGraphics" + , "MacPrinter" + , "QWindowSystem" + , "PostScript" + , "OpenGL" + , "Picture" + , "SVG" + , "Raster" + , "Direct3D" + , "Pdf" + , "OpenVG" + , "OpenGL2" + , "PaintBuffer" + , "Blitter" + , "Direct2D" + , "User" + , "MaxUser" +}; + +static QString qtscript_QPaintEngine_Type_toStringHelper(QPaintEngine::Type value) +{ + for (int i = 0; i < 20; ++i) { + if (qtscript_QPaintEngine_Type_values[i] == value) + return QString::fromLatin1(qtscript_QPaintEngine_Type_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QPaintEngine_Type_toScriptValue(QScriptEngine *engine, const QPaintEngine::Type &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPaintEngine")); + return clazz.property(qtscript_QPaintEngine_Type_toStringHelper(value)); +} + +static void qtscript_QPaintEngine_Type_fromScriptValue(const QScriptValue &value, QPaintEngine::Type &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPaintEngine_Type(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 20; ++i) { + if (qtscript_QPaintEngine_Type_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Type(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPaintEngine_Type_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPaintEngine::Type value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPaintEngine_Type_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPaintEngine::Type value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPaintEngine_Type_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPaintEngine_Type_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPaintEngine_Type, + qtscript_QPaintEngine_Type_valueOf, qtscript_QPaintEngine_Type_toString); + qScriptRegisterMetaType(engine, qtscript_QPaintEngine_Type_toScriptValue, + qtscript_QPaintEngine_Type_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 20; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPaintEngine_Type_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPaintEngine_Type_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPaintEngine::DirtyFlag +// + +static const QPaintEngine::DirtyFlag qtscript_QPaintEngine_DirtyFlag_values[] = { + QPaintEngine::DirtyPen + , QPaintEngine::DirtyBrush + , QPaintEngine::DirtyBrushOrigin + , QPaintEngine::DirtyFont + , QPaintEngine::DirtyBackground + , QPaintEngine::DirtyBackgroundMode + , QPaintEngine::DirtyTransform + , QPaintEngine::DirtyClipRegion + , QPaintEngine::DirtyClipPath + , QPaintEngine::DirtyHints + , QPaintEngine::DirtyCompositionMode + , QPaintEngine::DirtyClipEnabled + , QPaintEngine::DirtyOpacity + , QPaintEngine::AllDirty +}; + +static const char * const qtscript_QPaintEngine_DirtyFlag_keys[] = { + "DirtyPen" + , "DirtyBrush" + , "DirtyBrushOrigin" + , "DirtyFont" + , "DirtyBackground" + , "DirtyBackgroundMode" + , "DirtyTransform" + , "DirtyClipRegion" + , "DirtyClipPath" + , "DirtyHints" + , "DirtyCompositionMode" + , "DirtyClipEnabled" + , "DirtyOpacity" + , "AllDirty" +}; + +static QString qtscript_QPaintEngine_DirtyFlag_toStringHelper(QPaintEngine::DirtyFlag value) +{ + for (int i = 0; i < 14; ++i) { + if (qtscript_QPaintEngine_DirtyFlag_values[i] == value) + return QString::fromLatin1(qtscript_QPaintEngine_DirtyFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QPaintEngine_DirtyFlag_toScriptValue(QScriptEngine *engine, const QPaintEngine::DirtyFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPaintEngine")); + return clazz.property(qtscript_QPaintEngine_DirtyFlag_toStringHelper(value)); +} + +static void qtscript_QPaintEngine_DirtyFlag_fromScriptValue(const QScriptValue &value, QPaintEngine::DirtyFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPaintEngine_DirtyFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 14; ++i) { + if (qtscript_QPaintEngine_DirtyFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("DirtyFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPaintEngine_DirtyFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPaintEngine::DirtyFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPaintEngine_DirtyFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPaintEngine::DirtyFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPaintEngine_DirtyFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPaintEngine_DirtyFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPaintEngine_DirtyFlag, + qtscript_QPaintEngine_DirtyFlag_valueOf, qtscript_QPaintEngine_DirtyFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QPaintEngine_DirtyFlag_toScriptValue, + qtscript_QPaintEngine_DirtyFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 14; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPaintEngine_DirtyFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPaintEngine_DirtyFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPaintEngine::DirtyFlags +// + +static QScriptValue qtscript_QPaintEngine_DirtyFlags_toScriptValue(QScriptEngine *engine, const QPaintEngine::DirtyFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QPaintEngine_DirtyFlags_fromScriptValue(const QScriptValue &value, QPaintEngine::DirtyFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QPaintEngine_DirtyFlags(QScriptContext *context, QScriptEngine *engine) +{ + QPaintEngine::DirtyFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("DirtyFlags(): argument %0 is not of type DirtyFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QPaintEngine_DirtyFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPaintEngine::DirtyFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPaintEngine_DirtyFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPaintEngine::DirtyFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 14; ++i) { + if ((value & qtscript_QPaintEngine_DirtyFlag_values[i]) == qtscript_QPaintEngine_DirtyFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QPaintEngine_DirtyFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QPaintEngine_DirtyFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QPaintEngine_DirtyFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QPaintEngine_DirtyFlags, qtscript_QPaintEngine_DirtyFlags_valueOf, + qtscript_QPaintEngine_DirtyFlags_toString, qtscript_QPaintEngine_DirtyFlags_equals); + qScriptRegisterMetaType(engine, qtscript_QPaintEngine_DirtyFlags_toScriptValue, + qtscript_QPaintEngine_DirtyFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QPaintEngine::PolygonDrawMode +// + +static const QPaintEngine::PolygonDrawMode qtscript_QPaintEngine_PolygonDrawMode_values[] = { + QPaintEngine::OddEvenMode + , QPaintEngine::WindingMode + , QPaintEngine::ConvexMode + , QPaintEngine::PolylineMode +}; + +static const char * const qtscript_QPaintEngine_PolygonDrawMode_keys[] = { + "OddEvenMode" + , "WindingMode" + , "ConvexMode" + , "PolylineMode" +}; + +static QString qtscript_QPaintEngine_PolygonDrawMode_toStringHelper(QPaintEngine::PolygonDrawMode value) +{ + if ((value >= QPaintEngine::OddEvenMode) && (value <= QPaintEngine::PolylineMode)) + return qtscript_QPaintEngine_PolygonDrawMode_keys[static_cast(value)-static_cast(QPaintEngine::OddEvenMode)]; + return QString(); +} + +static QScriptValue qtscript_QPaintEngine_PolygonDrawMode_toScriptValue(QScriptEngine *engine, const QPaintEngine::PolygonDrawMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPaintEngine")); + return clazz.property(qtscript_QPaintEngine_PolygonDrawMode_toStringHelper(value)); +} + +static void qtscript_QPaintEngine_PolygonDrawMode_fromScriptValue(const QScriptValue &value, QPaintEngine::PolygonDrawMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPaintEngine_PolygonDrawMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPaintEngine::OddEvenMode) && (arg <= QPaintEngine::PolylineMode)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("PolygonDrawMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPaintEngine_PolygonDrawMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPaintEngine::PolygonDrawMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPaintEngine_PolygonDrawMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPaintEngine::PolygonDrawMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPaintEngine_PolygonDrawMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPaintEngine_PolygonDrawMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPaintEngine_PolygonDrawMode, + qtscript_QPaintEngine_PolygonDrawMode_valueOf, qtscript_QPaintEngine_PolygonDrawMode_toString); + qScriptRegisterMetaType(engine, qtscript_QPaintEngine_PolygonDrawMode_toScriptValue, + qtscript_QPaintEngine_PolygonDrawMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPaintEngine_PolygonDrawMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPaintEngine_PolygonDrawMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPaintEngine +// + +static QScriptValue qtscript_QPaintEngine_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 29; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPaintEngine* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPaintEngine.%0(): this object is not a QPaintEngine") + .arg(qtscript_QPaintEngine_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QPaintDevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->begin(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->clearDirty(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->coordinateOffset(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawEllipse(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawEllipse(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 4: + if (context->argumentCount() == 3) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawImage(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + _q_self->drawImage(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + const QLine* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->drawLines(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + const QLineF* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->drawLines(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + break; + + case 6: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawPath(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 3) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawPixmap(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + const QPoint* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->drawPoints(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + const QPointF* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->drawPoints(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + break; + + case 9: + if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber() + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + const QPoint* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QPaintEngine::PolygonDrawMode _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawPolygon(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber() + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + const QPointF* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QPaintEngine::PolygonDrawMode _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawPolygon(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + break; + + case 10: + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + const QRect* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->drawRects(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + const QRectF* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->drawRects(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + break; + + case 11: + if (context->argumentCount() == 2) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextItem _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawTextItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 3) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawTiledPixmap(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->end(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + bool _q_result = _q_self->hasFeature(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isActive(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isExtended(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QPaintDevice* _q_result = _q_self->paintDevice(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QPainter* _q_result = _q_self->painter(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setActive(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setDirty(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSystemClip(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSystemRect(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 0) { + _q_self->syncState(); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 0) { + QRegion _q_result = _q_self->systemClip(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->systemRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + bool _q_result = _q_self->testDirty(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + QPaintEngine::Type _q_result = _q_self->type(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 1) { + QPaintEngineState _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->updateState(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 29: { + QString result = QString::fromLatin1("QPaintEngine"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPaintEngine_throw_ambiguity_error_helper(context, + qtscript_QPaintEngine_function_names[_id+1], + qtscript_QPaintEngine_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPaintEngine_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPaintEngine(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPaintEngine* _q_cpp_result = new QtScriptShell_QPaintEngine(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPaintEngine*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QtScriptShell_QPaintEngine* _q_cpp_result = new QtScriptShell_QPaintEngine(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPaintEngine*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPaintEngine_throw_ambiguity_error_helper(context, + qtscript_QPaintEngine_function_names[_id], + qtscript_QPaintEngine_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPaintEngine_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPaintEngine*)0)); + for (int i = 0; i < 30; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPaintEngine_prototype_call, qtscript_QPaintEngine_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPaintEngine_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPaintEngine_static_call, proto, qtscript_QPaintEngine_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("PaintEngineFeature"), + qtscript_create_QPaintEngine_PaintEngineFeature_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("PaintEngineFeatures"), + qtscript_create_QPaintEngine_PaintEngineFeatures_class(engine)); + ctor.setProperty(QString::fromLatin1("Type"), + qtscript_create_QPaintEngine_Type_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("DirtyFlag"), + qtscript_create_QPaintEngine_DirtyFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("DirtyFlags"), + qtscript_create_QPaintEngine_DirtyFlags_class(engine)); + ctor.setProperty(QString::fromLatin1("PolygonDrawMode"), + qtscript_create_QPaintEngine_PolygonDrawMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPaintEngineState.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPaintEngineState.cpp new file mode 100644 index 00000000..c45261b9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPaintEngineState.cpp @@ -0,0 +1,338 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPaintEngineState.h" + +static const char * const qtscript_QPaintEngineState_function_names[] = { + "QPaintEngineState" + // static + // prototype + , "backgroundBrush" + , "backgroundMode" + , "brush" + , "brushNeedsResolving" + , "brushOrigin" + , "clipOperation" + , "clipPath" + , "clipRegion" + , "compositionMode" + , "font" + , "isClipEnabled" + , "matrix" + , "opacity" + , "painter" + , "pen" + , "penNeedsResolving" + , "renderHints" + , "state" + , "transform" + , "toString" +}; + +static const char * const qtscript_QPaintEngineState_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QPaintEngineState_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPaintEngineState_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPaintEngineState::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPaintEngineState*) +Q_DECLARE_METATYPE(QtScriptShell_QPaintEngineState*) +Q_DECLARE_METATYPE(Qt::BGMode) +Q_DECLARE_METATYPE(Qt::ClipOperation) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QPainter::CompositionMode) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) + +// +// QPaintEngineState +// + +static QScriptValue qtscript_QPaintEngineState_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 19; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPaintEngineState* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPaintEngineState.%0(): this object is not a QPaintEngineState") + .arg(qtscript_QPaintEngineState_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QBrush _q_result = _q_self->backgroundBrush(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + Qt::BGMode _q_result = _q_self->backgroundMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QBrush _q_result = _q_self->brush(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->brushNeedsResolving(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->brushOrigin(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + Qt::ClipOperation _q_result = _q_self->clipOperation(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QPainterPath _q_result = _q_self->clipPath(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QRegion _q_result = _q_self->clipRegion(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QPainter::CompositionMode _q_result = _q_self->compositionMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QFont _q_result = _q_self->font(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isClipEnabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QMatrix _q_result = _q_self->matrix(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->opacity(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QPainter* _q_result = _q_self->painter(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QPen _q_result = _q_self->pen(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->penNeedsResolving(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->renderHints(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->state(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QTransform _q_result = _q_self->transform(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: { + QString result = QString::fromLatin1("QPaintEngineState"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPaintEngineState_throw_ambiguity_error_helper(context, + qtscript_QPaintEngineState_function_names[_id+1], + qtscript_QPaintEngineState_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPaintEngineState_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPaintEngineState(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPaintEngineState* _q_cpp_result = new QtScriptShell_QPaintEngineState(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPaintEngineState*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPaintEngineState_throw_ambiguity_error_helper(context, + qtscript_QPaintEngineState_function_names[_id], + qtscript_QPaintEngineState_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPaintEngineState_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPaintEngineState*)0)); + for (int i = 0; i < 20; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPaintEngineState_prototype_call, qtscript_QPaintEngineState_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPaintEngineState_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPaintEngineState_static_call, proto, qtscript_QPaintEngineState_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPaintEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPaintEvent.cpp new file mode 100644 index 00000000..ac3823fe --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPaintEvent.cpp @@ -0,0 +1,165 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPaintEvent.h" + +static const char * const qtscript_QPaintEvent_function_names[] = { + "QPaintEvent" + // static + // prototype + , "rect" + , "region" + , "toString" +}; + +static const char * const qtscript_QPaintEvent_function_signatures[] = { + "QRect paintRect\nQRegion paintRegion" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QPaintEvent_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPaintEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPaintEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QtScriptShell_QPaintEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QPaintEvent +// + +static QScriptValue qtscript_QPaintEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPaintEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPaintEvent.%0(): this object is not a QPaintEvent") + .arg(qtscript_QPaintEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + const QRect& _q_result = _q_self->rect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + const QRegion& _q_result = _q_self->region(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QPaintEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPaintEvent_throw_ambiguity_error_helper(context, + qtscript_QPaintEvent_function_names[_id+1], + qtscript_QPaintEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPaintEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPaintEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPaintEvent* _q_cpp_result = new QtScriptShell_QPaintEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPaintEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPaintEvent* _q_cpp_result = new QtScriptShell_QPaintEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPaintEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPaintEvent_throw_ambiguity_error_helper(context, + qtscript_QPaintEvent_function_names[_id], + qtscript_QPaintEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPaintEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPaintEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPaintEvent_prototype_call, qtscript_QPaintEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPaintEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPaintEvent_static_call, proto, qtscript_QPaintEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPainter.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPainter.cpp new file mode 100644 index 00000000..8b643d18 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPainter.cpp @@ -0,0 +1,2675 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QPainter_function_names[] = { + "QPainter" + // static + , "redirected" + , "restoreRedirected" + , "setRedirected" + // prototype + , "background" + , "backgroundMode" + , "begin" + , "beginNativePainting" + , "boundingRect" + , "brush" + , "brushOrigin" + , "clipBoundingRect" + , "clipPath" + , "clipRegion" + , "combinedMatrix" + , "combinedTransform" + , "compositionMode" + , "device" + , "deviceMatrix" + , "deviceTransform" + , "drawArc" + , "drawChord" + , "drawConvexPolygon" + , "drawEllipse" + , "drawImage" + , "drawLine" + , "drawLines" + , "drawLinesF" + , "drawLinesFromPoints" + , "drawLinesFromPointsF" + , "drawPath" + , "drawPicture" + , "drawPie" + , "drawPixmap" + , "drawPoint" + , "drawPoints" + , "drawPolygon" + , "drawPolyline" + , "drawRect" + , "drawRects" + , "drawRectsF" + , "drawRoundRect" + , "drawRoundedRect" + , "drawText" + , "drawTextItem" + , "drawTiledPixmap" + , "end" + , "endNativePainting" + , "eraseRect" + , "fillPath" + , "fillRect" + , "font" + , "hasClipping" + , "initFrom" + , "isActive" + , "layoutDirection" + , "opacity" + , "paintEngine" + , "pen" + , "renderHints" + , "resetMatrix" + , "resetTransform" + , "restore" + , "rotate" + , "save" + , "scale" + , "setBackground" + , "setBackgroundMode" + , "setBrush" + , "setBrushOrigin" + , "setClipPath" + , "setClipRect" + , "setClipRegion" + , "setClipping" + , "setCompositionMode" + , "setFont" + , "setLayoutDirection" + , "setOpacity" + , "setPen" + , "setRenderHint" + , "setRenderHints" + , "setTransform" + , "setViewTransformEnabled" + , "setViewport" + , "setWindow" + , "setWorldMatrix" + , "setWorldMatrixEnabled" + , "setWorldTransform" + , "shear" + , "strokePath" + , "testRenderHint" + , "transform" + , "translate" + , "viewTransformEnabled" + , "viewport" + , "window" + , "worldMatrix" + , "worldMatrixEnabled" + , "worldTransform" + , "toString" +}; + +static const char * const qtscript_QPainter_function_signatures[] = { + "" + // static + , "QPaintDevice device, QPoint offset" + , "QPaintDevice device" + , "QPaintDevice device, QPaintDevice replacement, QPoint offset" + // prototype + , "" + , "" + , "QPaintDevice arg__1" + , "" + , "QRect rect, int flags, String text\nQRectF rect, String text, QTextOption o\nQRectF rect, int flags, String text\nint x, int y, int w, int h, int flags, String text" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QRect arg__1, int a, int alen\nQRectF rect, int a, int alen\nint x, int y, int w, int h, int a, int alen" + , "QRect arg__1, int a, int alen\nQRectF rect, int a, int alen\nint x, int y, int w, int h, int a, int alen" + , "QPolygon polygon\nQPolygonF polygon" + , "QPoint center, int rx, int ry\nQPointF center, qreal rx, qreal ry\nQRect r\nQRectF r\nint x, int y, int w, int h" + , "QPoint p, QImage image\nQPoint p, QImage image, QRect sr, ImageConversionFlags flags\nQPointF p, QImage image\nQPointF p, QImage image, QRectF sr, ImageConversionFlags flags\nQRect r, QImage image\nQRect targetRect, QImage image, QRect sourceRect, ImageConversionFlags flags\nQRectF r, QImage image\nQRectF targetRect, QImage image, QRectF sourceRect, ImageConversionFlags flags\nint x, int y, QImage image, int sx, int sy, int sw, int sh, ImageConversionFlags flags" + , "QLine line\nQLineF line\nQPoint p1, QPoint p2\nQPointF p1, QPointF p2\nint x1, int y1, int x2, int y2" + , "List lines" + , "List lines" + , "List pointPairs" + , "List pointPairs" + , "QPainterPath path" + , "QPoint p, QPicture picture\nQPointF p, QPicture picture\nint x, int y, QPicture picture" + , "QRect arg__1, int a, int alen\nQRectF rect, int a, int alen\nint x, int y, int w, int h, int a, int alen" + , "QPoint p, QPixmap pm\nQPoint p, QPixmap pm, QRect sr\nQPointF p, QPixmap pm\nQPointF p, QPixmap pm, QRectF sr\nQRect r, QPixmap pm\nQRect targetRect, QPixmap pixmap, QRect sourceRect\nQRectF targetRect, QPixmap pixmap, QRectF sourceRect\nint x, int y, QPixmap pm\nint x, int y, QPixmap pm, int sx, int sy, int sw, int sh\nint x, int y, int w, int h, QPixmap pm\nint x, int y, int w, int h, QPixmap pm, int sx, int sy, int sw, int sh" + , "QPoint p\nQPointF pt\nint x, int y" + , "QPolygon points\nQPolygonF points" + , "QPolygon polygon, FillRule fillRule\nQPolygonF polygon, FillRule fillRule" + , "QPolygon polygon\nQPolygonF polyline" + , "QRect rect\nQRectF rect\nint x1, int y1, int w, int h" + , "List rectangles" + , "List rectangles" + , "QRect r, int xround, int yround\nQRectF r, int xround, int yround\nint x, int y, int w, int h, int arg__5, int arg__6" + , "QRect rect, qreal xRadius, qreal yRadius, SizeMode mode\nQRectF rect, qreal xRadius, qreal yRadius, SizeMode mode\nint x, int y, int w, int h, qreal xRadius, qreal yRadius, SizeMode mode" + , "QPoint p, String s\nQPointF p, String s\nQRect r, int flags, String text, QRect br\nQRectF r, String text, QTextOption o\nQRectF r, int flags, String text, QRectF br\nint x, int y, String s\nint x, int y, int w, int h, int flags, String text, QRect br" + , "QPoint p, QTextItem ti\nQPointF p, QTextItem ti\nint x, int y, QTextItem ti" + , "QRect arg__1, QPixmap arg__2, QPoint arg__3\nQRectF rect, QPixmap pm, QPointF offset\nint x, int y, int w, int h, QPixmap arg__5, int sx, int sy" + , "" + , "" + , "QRect arg__1\nQRectF arg__1\nint x, int y, int w, int h" + , "QPainterPath path, QBrush brush" + , "QRect arg__1, QBrush arg__2\nQRect arg__1, QColor color\nQRect r, BrushStyle style\nQRect r, GlobalColor c\nQRectF arg__1, QBrush arg__2\nQRectF arg__1, QColor color\nQRectF r, BrushStyle style\nQRectF r, GlobalColor c\nint x, int y, int w, int h, BrushStyle style\nint x, int y, int w, int h, GlobalColor c\nint x, int y, int w, int h, QBrush arg__5\nint x, int y, int w, int h, QColor color" + , "" + , "" + , "QPaintDevice device" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "qreal a" + , "" + , "qreal sx, qreal sy" + , "QBrush bg" + , "BGMode mode" + , "BrushStyle style\nQBrush brush" + , "QPoint arg__1\nQPointF arg__1\nint x, int y" + , "QPainterPath path, ClipOperation op" + , "QRect arg__1, ClipOperation op\nQRectF arg__1, ClipOperation op\nint x, int y, int w, int h, ClipOperation op" + , "QRegion arg__1, ClipOperation op" + , "bool enable" + , "CompositionMode mode" + , "QFont f" + , "LayoutDirection direction" + , "qreal opacity" + , "PenStyle style\nQColor color\nQPen pen" + , "RenderHint hint, bool on" + , "RenderHints hints, bool on" + , "QTransform transform, bool combine" + , "bool enable" + , "QRect viewport\nint x, int y, int w, int h" + , "QRect window\nint x, int y, int w, int h" + , "QMatrix matrix, bool combine" + , "bool enabled" + , "QTransform matrix, bool combine" + , "qreal sh, qreal sv" + , "QPainterPath path, QPen pen" + , "RenderHint hint" + , "" + , "QPoint offset\nQPointF offset\nqreal dx, qreal dy" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QPainter_function_lengths[] = { + 0 + // static + , 2 + , 1 + , 3 + // prototype + , 0 + , 0 + , 1 + , 0 + , 6 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 6 + , 6 + , 1 + , 4 + , 8 + , 4 + , 1 + , 1 + , 1 + , 1 + , 1 + , 3 + , 6 + , 9 + , 2 + , 1 + , 2 + , 1 + , 4 + , 1 + , 1 + , 6 + , 7 + , 7 + , 3 + , 7 + , 0 + , 0 + , 4 + , 2 + , 5 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 2 + , 1 + , 1 + , 1 + , 2 + , 2 + , 5 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 2 + , 2 + , 1 + , 4 + , 4 + , 2 + , 1 + , 2 + , 2 + , 2 + , 1 + , 0 + , 2 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPainter_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPainter::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QPainter::CompositionMode) +Q_DECLARE_METATYPE(QPainter::PixmapFragmentHint) +Q_DECLARE_METATYPE(QPainter::RenderHint) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::BGMode) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QTextOption) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QPicture) +Q_DECLARE_METATYPE(Qt::FillRule) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(Qt::SizeMode) +Q_DECLARE_METATYPE(QRect*) +Q_DECLARE_METATYPE(QRectF*) +Q_DECLARE_METATYPE(QTextItem) +Q_DECLARE_METATYPE(Qt::BrushStyle) +Q_DECLARE_METATYPE(Qt::GlobalColor) +Q_DECLARE_METATYPE(const QPaintDevice*) +Q_DECLARE_METATYPE(Qt::LayoutDirection) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(Qt::ClipOperation) +Q_DECLARE_METATYPE(Qt::PenStyle) +Q_DECLARE_METATYPE(QPoint*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QPainter::CompositionMode +// + +static const QPainter::CompositionMode qtscript_QPainter_CompositionMode_values[] = { + QPainter::CompositionMode_SourceOver + , QPainter::CompositionMode_DestinationOver + , QPainter::CompositionMode_Clear + , QPainter::CompositionMode_Source + , QPainter::CompositionMode_Destination + , QPainter::CompositionMode_SourceIn + , QPainter::CompositionMode_DestinationIn + , QPainter::CompositionMode_SourceOut + , QPainter::CompositionMode_DestinationOut + , QPainter::CompositionMode_SourceAtop + , QPainter::CompositionMode_DestinationAtop + , QPainter::CompositionMode_Xor + , QPainter::CompositionMode_Plus + , QPainter::CompositionMode_Multiply + , QPainter::CompositionMode_Screen + , QPainter::CompositionMode_Overlay + , QPainter::CompositionMode_Darken + , QPainter::CompositionMode_Lighten + , QPainter::CompositionMode_ColorDodge + , QPainter::CompositionMode_ColorBurn + , QPainter::CompositionMode_HardLight + , QPainter::CompositionMode_SoftLight + , QPainter::CompositionMode_Difference + , QPainter::CompositionMode_Exclusion + , QPainter::RasterOp_SourceOrDestination + , QPainter::RasterOp_SourceAndDestination + , QPainter::RasterOp_SourceXorDestination + , QPainter::RasterOp_NotSourceAndNotDestination + , QPainter::RasterOp_NotSourceOrNotDestination + , QPainter::RasterOp_NotSourceXorDestination + , QPainter::RasterOp_NotSource + , QPainter::RasterOp_NotSourceAndDestination + , QPainter::RasterOp_SourceAndNotDestination + , QPainter::RasterOp_NotSourceOrDestination + , QPainter::RasterOp_SourceOrNotDestination + , QPainter::RasterOp_ClearDestination + , QPainter::RasterOp_SetDestination + , QPainter::RasterOp_NotDestination +}; + +static const char * const qtscript_QPainter_CompositionMode_keys[] = { + "CompositionMode_SourceOver" + , "CompositionMode_DestinationOver" + , "CompositionMode_Clear" + , "CompositionMode_Source" + , "CompositionMode_Destination" + , "CompositionMode_SourceIn" + , "CompositionMode_DestinationIn" + , "CompositionMode_SourceOut" + , "CompositionMode_DestinationOut" + , "CompositionMode_SourceAtop" + , "CompositionMode_DestinationAtop" + , "CompositionMode_Xor" + , "CompositionMode_Plus" + , "CompositionMode_Multiply" + , "CompositionMode_Screen" + , "CompositionMode_Overlay" + , "CompositionMode_Darken" + , "CompositionMode_Lighten" + , "CompositionMode_ColorDodge" + , "CompositionMode_ColorBurn" + , "CompositionMode_HardLight" + , "CompositionMode_SoftLight" + , "CompositionMode_Difference" + , "CompositionMode_Exclusion" + , "RasterOp_SourceOrDestination" + , "RasterOp_SourceAndDestination" + , "RasterOp_SourceXorDestination" + , "RasterOp_NotSourceAndNotDestination" + , "RasterOp_NotSourceOrNotDestination" + , "RasterOp_NotSourceXorDestination" + , "RasterOp_NotSource" + , "RasterOp_NotSourceAndDestination" + , "RasterOp_SourceAndNotDestination" + , "RasterOp_NotSourceOrDestination" + , "RasterOp_SourceOrNotDestination" + , "RasterOp_ClearDestination" + , "RasterOp_SetDestination" + , "RasterOp_NotDestination" +}; + +static QString qtscript_QPainter_CompositionMode_toStringHelper(QPainter::CompositionMode value) +{ + if ((value >= QPainter::CompositionMode_SourceOver) && (value <= QPainter::RasterOp_NotDestination)) + return qtscript_QPainter_CompositionMode_keys[static_cast(value)-static_cast(QPainter::CompositionMode_SourceOver)]; + return QString(); +} + +static QScriptValue qtscript_QPainter_CompositionMode_toScriptValue(QScriptEngine *engine, const QPainter::CompositionMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPainter")); + return clazz.property(qtscript_QPainter_CompositionMode_toStringHelper(value)); +} + +static void qtscript_QPainter_CompositionMode_fromScriptValue(const QScriptValue &value, QPainter::CompositionMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPainter_CompositionMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPainter::CompositionMode_SourceOver) && (arg <= QPainter::RasterOp_NotDestination)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("CompositionMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPainter_CompositionMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPainter::CompositionMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPainter_CompositionMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPainter::CompositionMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPainter_CompositionMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPainter_CompositionMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPainter_CompositionMode, + qtscript_QPainter_CompositionMode_valueOf, qtscript_QPainter_CompositionMode_toString); + qScriptRegisterMetaType(engine, qtscript_QPainter_CompositionMode_toScriptValue, + qtscript_QPainter_CompositionMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 38; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPainter_CompositionMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPainter_CompositionMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPainter::PixmapFragmentHint +// + +static const QPainter::PixmapFragmentHint qtscript_QPainter_PixmapFragmentHint_values[] = { + QPainter::OpaqueHint +}; + +static const char * const qtscript_QPainter_PixmapFragmentHint_keys[] = { + "OpaqueHint" +}; + +static QString qtscript_QPainter_PixmapFragmentHint_toStringHelper(QPainter::PixmapFragmentHint value) +{ + if ((value >= QPainter::OpaqueHint) && (value <= QPainter::OpaqueHint)) + return qtscript_QPainter_PixmapFragmentHint_keys[static_cast(value)-static_cast(QPainter::OpaqueHint)]; + return QString(); +} + +static QScriptValue qtscript_QPainter_PixmapFragmentHint_toScriptValue(QScriptEngine *engine, const QPainter::PixmapFragmentHint &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPainter")); + return clazz.property(qtscript_QPainter_PixmapFragmentHint_toStringHelper(value)); +} + +static void qtscript_QPainter_PixmapFragmentHint_fromScriptValue(const QScriptValue &value, QPainter::PixmapFragmentHint &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPainter_PixmapFragmentHint(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPainter::OpaqueHint) && (arg <= QPainter::OpaqueHint)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("PixmapFragmentHint(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPainter_PixmapFragmentHint_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPainter::PixmapFragmentHint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPainter_PixmapFragmentHint_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPainter::PixmapFragmentHint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPainter_PixmapFragmentHint_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPainter_PixmapFragmentHint_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPainter_PixmapFragmentHint, + qtscript_QPainter_PixmapFragmentHint_valueOf, qtscript_QPainter_PixmapFragmentHint_toString); + qScriptRegisterMetaType(engine, qtscript_QPainter_PixmapFragmentHint_toScriptValue, + qtscript_QPainter_PixmapFragmentHint_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPainter_PixmapFragmentHint_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPainter_PixmapFragmentHint_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPainter::RenderHint +// + +static const QPainter::RenderHint qtscript_QPainter_RenderHint_values[] = { + QPainter::Antialiasing + , QPainter::TextAntialiasing + , QPainter::SmoothPixmapTransform + , QPainter::HighQualityAntialiasing + , QPainter::NonCosmeticDefaultPen + , QPainter::Qt4CompatiblePainting +}; + +static const char * const qtscript_QPainter_RenderHint_keys[] = { + "Antialiasing" + , "TextAntialiasing" + , "SmoothPixmapTransform" + , "HighQualityAntialiasing" + , "NonCosmeticDefaultPen" + , "Qt4CompatiblePainting" +}; + +static QString qtscript_QPainter_RenderHint_toStringHelper(QPainter::RenderHint value) +{ + for (int i = 0; i < 6; ++i) { + if (qtscript_QPainter_RenderHint_values[i] == value) + return QString::fromLatin1(qtscript_QPainter_RenderHint_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QPainter_RenderHint_toScriptValue(QScriptEngine *engine, const QPainter::RenderHint &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPainter")); + return clazz.property(qtscript_QPainter_RenderHint_toStringHelper(value)); +} + +static void qtscript_QPainter_RenderHint_fromScriptValue(const QScriptValue &value, QPainter::RenderHint &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPainter_RenderHint(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 6; ++i) { + if (qtscript_QPainter_RenderHint_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("RenderHint(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPainter_RenderHint_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPainter::RenderHint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPainter_RenderHint_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPainter::RenderHint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPainter_RenderHint_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPainter_RenderHint_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPainter_RenderHint, + qtscript_QPainter_RenderHint_valueOf, qtscript_QPainter_RenderHint_toString); + qScriptRegisterMetaType(engine, qtscript_QPainter_RenderHint_toScriptValue, + qtscript_QPainter_RenderHint_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPainter_RenderHint_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPainter_RenderHint_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPainter::RenderHints +// + +static QScriptValue qtscript_QPainter_RenderHints_toScriptValue(QScriptEngine *engine, const QPainter::RenderHints &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QPainter_RenderHints_fromScriptValue(const QScriptValue &value, QPainter::RenderHints &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QPainter_RenderHints(QScriptContext *context, QScriptEngine *engine) +{ + QPainter::RenderHints result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("RenderHints(): argument %0 is not of type RenderHint").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QPainter_RenderHints_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPainter::RenderHints value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPainter_RenderHints_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPainter::RenderHints value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 6; ++i) { + if ((value & qtscript_QPainter_RenderHint_values[i]) == qtscript_QPainter_RenderHint_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QPainter_RenderHint_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QPainter_RenderHints_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QPainter_RenderHints_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QPainter_RenderHints, qtscript_QPainter_RenderHints_valueOf, + qtscript_QPainter_RenderHints_toString, qtscript_QPainter_RenderHints_equals); + qScriptRegisterMetaType(engine, qtscript_QPainter_RenderHints_toScriptValue, + qtscript_QPainter_RenderHints_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QPainter +// + +static QScriptValue qtscript_QPainter_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 95; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPainter* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPainter.%0(): this object is not a QPainter") + .arg(qtscript_QPainter_function_names[_id+4])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->background(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + Qt::BGMode _q_result = _q_self->backgroundMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + + // TEMPLATE - core.convert_pointer_arg_and_check_null - START + QPaintDevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + if (!_q_arg0) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPainter::begin(): failed to convert argument to QPaintDevice*")); + } + // TEMPLATE - core.convert_pointer_arg_and_check_null - END + bool _q_result = _q_self->begin(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->beginNativePainting(); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 2) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QRectF _q_result = _q_self->boundingRect(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isString()) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QString _q_arg2 = context->argument(2).toString(); + QRect _q_result = _q_self->boundingRect(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString() + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QTextOption _q_arg2 = qscriptvalue_cast(context->argument(2)); + QRectF _q_result = _q_self->boundingRect(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isString()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QString _q_arg2 = context->argument(2).toString(); + QRectF _q_result = _q_self->boundingRect(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 6) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + QString _q_arg5 = context->argument(5).toString(); + QRect _q_result = _q_self->boundingRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->brush(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->brushOrigin(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->clipBoundingRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QPainterPath _q_result = _q_self->clipPath(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QRegion _q_result = _q_self->clipRegion(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QMatrix _q_result = _q_self->combinedMatrix(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QTransform _q_result = _q_self->combinedTransform(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QPainter::CompositionMode _q_result = _q_self->compositionMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QPaintDevice* _q_result = _q_self->device(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + const QMatrix& _q_result = _q_self->deviceMatrix(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + const QTransform& _q_result = _q_self->deviceTransform(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->drawArc(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->drawArc(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 6) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + int _q_arg5 = context->argument(5).toInt32(); + _q_self->drawArc(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->drawChord(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->drawChord(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 6) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + int _q_arg5 = context->argument(5).toInt32(); + _q_self->drawChord(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawConvexPolygon(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawConvexPolygon(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 19: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawEllipse(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawEllipse(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->drawEllipse(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawEllipse(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->drawEllipse(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawImage(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawImage(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawImage(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawImage(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRect _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawImage(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawImage(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRect _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawImage(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawImage(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QImage _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawImage(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType()) + && (qMetaTypeId >() == context->argument(3).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRect _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + _q_self->drawImage(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType()) + && (qMetaTypeId >() == context->argument(3).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + _q_self->drawImage(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType()) + && (qMetaTypeId >() == context->argument(3).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRect _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + _q_self->drawImage(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType()) + && (qMetaTypeId >() == context->argument(3).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + _q_self->drawImage(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && (qMetaTypeId() == context->argument(2).toVariant().userType()) + && context->argument(3).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QImage _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->drawImage(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 5) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QImage _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + _q_self->drawImage(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QImage _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + int _q_arg5 = context->argument(5).toInt32(); + _q_self->drawImage(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 7) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QImage _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + int _q_arg5 = context->argument(5).toInt32(); + int _q_arg6 = context->argument(6).toInt32(); + _q_self->drawImage(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 8) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QImage _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + int _q_arg5 = context->argument(5).toInt32(); + int _q_arg6 = context->argument(6).toInt32(); + QFlags _q_arg7 = qscriptvalue_cast >(context->argument(7)); + _q_self->drawImage(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QLine _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawLine(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QLineF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawLine(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawLine(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawLine(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->drawLine(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->drawLines(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->drawLines(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->drawLines(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->drawLines(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawPath(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPicture _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawPicture(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPicture _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawPicture(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QPicture _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawPicture(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->drawPie(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->drawPie(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 6) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + int _q_arg5 = context->argument(5).toInt32(); + _q_self->drawPie(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawPixmap(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawPixmap(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawPixmap(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRect _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawPixmap(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawPixmap(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRect _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawPixmap(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawPixmap(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QPixmap _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawPixmap(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 5) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QPixmap _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->drawPixmap(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 7) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QPixmap _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + int _q_arg5 = context->argument(5).toInt32(); + int _q_arg6 = context->argument(6).toInt32(); + _q_self->drawPixmap(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 9) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QPixmap _q_arg4 = qscriptvalue_cast(context->argument(4)); + int _q_arg5 = context->argument(5).toInt32(); + int _q_arg6 = context->argument(6).toInt32(); + int _q_arg7 = context->argument(7).toInt32(); + int _q_arg8 = context->argument(8).toInt32(); + _q_self->drawPixmap(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7, _q_arg8); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawPoint(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawPoint(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->drawPoint(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawPoints(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawPoints(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 32: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawPolygon(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawPolygon(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::FillRule _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawPolygon(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::FillRule _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawPolygon(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + break; + + case 33: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawPolyline(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawPolyline(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 34: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawRect(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawRect(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->drawRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->drawRects(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->drawRects(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawRoundRect(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawRoundRect(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->drawRoundRect(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->drawRoundRect(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->drawRoundRect(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->drawRoundRect(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->drawRoundRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + _q_self->drawRoundRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + int _q_arg5 = context->argument(5).toInt32(); + _q_self->drawRoundRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawRoundedRect(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawRoundedRect(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType()) + && (qMetaTypeId() == context->argument(3).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + Qt::SizeMode _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->drawRoundedRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType()) + && (qMetaTypeId() == context->argument(3).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + Qt::SizeMode _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->drawRoundedRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 6) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + qreal _q_arg5 = qscriptvalue_cast(context->argument(5)); + _q_self->drawRoundedRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 7) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + qreal _q_arg5 = qscriptvalue_cast(context->argument(5)); + Qt::SizeMode _q_arg6 = qscriptvalue_cast(context->argument(6)); + _q_self->drawRoundedRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + return context->engine()->undefinedValue(); + } + break; + + case 39: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + _q_self->drawText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + _q_self->drawText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + _q_self->drawText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString() + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QTextOption _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawText(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && context->argument(2).isString()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QString _q_arg2 = context->argument(2).toString(); + _q_self->drawText(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isString() + && qscriptvalue_cast(context->argument(3))) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QString _q_arg2 = context->argument(2).toString(); + QRect* _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->drawText(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isString() + && qscriptvalue_cast(context->argument(3))) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QString _q_arg2 = context->argument(2).toString(); + QRectF* _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->drawText(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 7) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + QString _q_arg5 = context->argument(5).toString(); + QRect* _q_arg6 = qscriptvalue_cast(context->argument(6)); + _q_self->drawText(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextItem _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawTextItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextItem _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawTextItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QTextItem _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawTextItem(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawTiledPixmap(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawTiledPixmap(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPoint _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawTiledPixmap(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawTiledPixmap(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 5) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QPixmap _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->drawTiledPixmap(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QPixmap _q_arg4 = qscriptvalue_cast(context->argument(4)); + int _q_arg5 = context->argument(5).toInt32(); + _q_self->drawTiledPixmap(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 7) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QPixmap _q_arg4 = qscriptvalue_cast(context->argument(4)); + int _q_arg5 = context->argument(5).toInt32(); + int _q_arg6 = context->argument(6).toInt32(); + _q_self->drawTiledPixmap(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + return context->engine()->undefinedValue(); + } + break; + + case 42: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->end(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 43: + if (context->argumentCount() == 0) { + _q_self->endNativePainting(); + return context->engine()->undefinedValue(); + } + break; + + case 44: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->eraseRect(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->eraseRect(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->eraseRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 45: + if (context->argumentCount() == 2) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBrush _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->fillPath(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 46: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBrush _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->fillRect(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QColor _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->fillRect(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::BrushStyle _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->fillRect(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::GlobalColor _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->fillRect(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBrush _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->fillRect(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QColor _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->fillRect(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::BrushStyle _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->fillRect(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::GlobalColor _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->fillRect(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 5) { + if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber() + && (qMetaTypeId() == context->argument(4).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + Qt::BrushStyle _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->fillRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber() + && (qMetaTypeId() == context->argument(4).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + Qt::GlobalColor _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->fillRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber() + && (qMetaTypeId() == context->argument(4).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QBrush _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->fillRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber() + && (qMetaTypeId() == context->argument(4).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QColor _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->fillRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + } + break; + + case 47: + if (context->argumentCount() == 0) { + const QFont& _q_result = _q_self->font(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 48: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasClipping(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 49: + if (context->argumentCount() == 1) { + const QPaintDevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->initFrom(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 50: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isActive(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 51: + if (context->argumentCount() == 0) { + Qt::LayoutDirection _q_result = _q_self->layoutDirection(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 52: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->opacity(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 53: + if (context->argumentCount() == 0) { + QPaintEngine* _q_result = _q_self->paintEngine(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 54: + if (context->argumentCount() == 0) { + const QPen& _q_result = _q_self->pen(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 55: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->renderHints(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 56: + if (context->argumentCount() == 0) { + _q_self->resetMatrix(); + return context->engine()->undefinedValue(); + } + break; + + case 57: + if (context->argumentCount() == 0) { + _q_self->resetTransform(); + return context->engine()->undefinedValue(); + } + break; + + case 58: + if (context->argumentCount() == 0) { + _q_self->restore(); + return context->engine()->undefinedValue(); + } + break; + + case 59: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->rotate(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 60: + if (context->argumentCount() == 0) { + _q_self->save(); + return context->engine()->undefinedValue(); + } + break; + + case 61: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->scale(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 62: + if (context->argumentCount() == 1) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBackground(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 63: + if (context->argumentCount() == 1) { + Qt::BGMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBackgroundMode(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 64: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::BrushStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBrush(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBrush(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 65: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBrushOrigin(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBrushOrigin(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setBrushOrigin(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 66: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setClipPath(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ClipOperation _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setClipPath(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 67: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setClipRect(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setClipRect(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ClipOperation _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setClipRect(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ClipOperation _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setClipRect(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setClipRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + Qt::ClipOperation _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->setClipRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + break; + + case 68: + if (context->argumentCount() == 1) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setClipRegion(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ClipOperation _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setClipRegion(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 69: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setClipping(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 70: + if (context->argumentCount() == 1) { + QPainter::CompositionMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCompositionMode(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 71: + if (context->argumentCount() == 1) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFont(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 72: + if (context->argumentCount() == 1) { + Qt::LayoutDirection _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLayoutDirection(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 73: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOpacity(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 74: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::PenStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPen(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPen(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPen _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPen(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 75: + if (context->argumentCount() == 1) { + QPainter::RenderHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRenderHint(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QPainter::RenderHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setRenderHint(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 76: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setRenderHints(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setRenderHints(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 77: + if (context->argumentCount() == 1) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTransform(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setTransform(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 78: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setViewTransformEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 79: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setViewport(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setViewport(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 80: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWindow(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setWindow(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 81: + if (context->argumentCount() == 1) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWorldMatrix(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setWorldMatrix(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 82: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setWorldMatrixEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 83: + if (context->argumentCount() == 1) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWorldTransform(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setWorldTransform(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 84: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->shear(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 85: + if (context->argumentCount() == 2) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPen _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->strokePath(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 86: + if (context->argumentCount() == 1) { + QPainter::RenderHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->testRenderHint(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 87: + if (context->argumentCount() == 0) { + const QTransform& _q_result = _q_self->transform(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 88: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->translate(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->translate(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->translate(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 89: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->viewTransformEnabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 90: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->viewport(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 91: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->window(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 92: + if (context->argumentCount() == 0) { + const QMatrix& _q_result = _q_self->worldMatrix(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 93: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->worldMatrixEnabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 94: + if (context->argumentCount() == 0) { + const QTransform& _q_result = _q_self->worldTransform(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 95: { + QString result = QString::fromLatin1("QPainter"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPainter_throw_ambiguity_error_helper(context, + qtscript_QPainter_function_names[_id+4], + qtscript_QPainter_function_signatures[_id+4]); +} + +static QScriptValue qtscript_QPainter_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPainter(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QPainter* _q_cpp_result = new QPainter(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + const QPaintDevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPaintDevice* _q_result = QPainter::redirected(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + const QPaintDevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainter::restoreRedirected(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 2) { + const QPaintDevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPaintDevice* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPainter::setRedirected(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + const QPaintDevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPaintDevice* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPoint _q_arg2 = qscriptvalue_cast(context->argument(2)); + QPainter::setRedirected(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPainter_throw_ambiguity_error_helper(context, + qtscript_QPainter_function_names[_id], + qtscript_QPainter_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPainter_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPainter*)0)); + for (int i = 0; i < 96; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPainter_prototype_call, qtscript_QPainter_function_lengths[i+4]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPainter_function_names[i+4]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPainter_static_call, proto, qtscript_QPainter_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPainter_static_call, + qtscript_QPainter_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QPainter_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("CompositionMode"), + qtscript_create_QPainter_CompositionMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("PixmapFragmentHint"), + qtscript_create_QPainter_PixmapFragmentHint_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("RenderHint"), + qtscript_create_QPainter_RenderHint_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("RenderHints"), + qtscript_create_QPainter_RenderHints_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPainterPath.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPainterPath.cpp new file mode 100644 index 00000000..5b9b4688 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPainterPath.cpp @@ -0,0 +1,1024 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QPainterPath_function_names[] = { + "QPainterPath" + // static + // prototype + , "addEllipse" + , "addPath" + , "addPolygon" + , "addRect" + , "addRegion" + , "addRoundRect" + , "addRoundedRect" + , "addText" + , "angleAtPercent" + , "arcMoveTo" + , "arcTo" + , "boundingRect" + , "closeSubpath" + , "connectPath" + , "contains" + , "controlPointRect" + , "cubicTo" + , "currentPosition" + , "elementAt" + , "elementCount" + , "fillRule" + , "intersected" + , "intersects" + , "isEmpty" + , "length" + , "lineTo" + , "moveTo" + , "operator_add" + , "operator_add_assign" + , "operator_and" + , "operator_and_assign" + , "equals" + , "operator_or" + , "operator_or_assign" + , "operator_subtract" + , "operator_subtract_assign" + , "percentAtLength" + , "pointAtPercent" + , "quadTo" + , "setElementPositionAt" + , "setFillRule" + , "simplified" + , "slopeAtPercent" + , "subtracted" + , "subtractedInverted" + , "swap" + , "toFillPolygon" + , "toFillPolygons" + , "toReversed" + , "toSubpathPolygons" + , "translate" + , "translated" + , "united" + , "toString" +}; + +static const char * const qtscript_QPainterPath_function_signatures[] = { + "\nQPainterPath other\nQPointF startPoint" + // static + // prototype + , "QPointF center, qreal rx, qreal ry\nQRectF rect\nqreal x, qreal y, qreal w, qreal h" + , "QPainterPath path" + , "QPolygonF polygon" + , "QRectF rect\nqreal x, qreal y, qreal w, qreal h" + , "QRegion region" + , "QRectF rect, int roundness\nQRectF rect, int xRnd, int yRnd\nqreal x, qreal y, qreal w, qreal h, int roundness\nqreal x, qreal y, qreal w, qreal h, int xRnd, int yRnd" + , "QRectF rect, qreal xRadius, qreal yRadius, SizeMode mode\nqreal x, qreal y, qreal w, qreal h, qreal xRadius, qreal yRadius, SizeMode mode" + , "QPointF point, QFont f, String text\nqreal x, qreal y, QFont f, String text" + , "qreal t" + , "QRectF rect, qreal angle\nqreal x, qreal y, qreal w, qreal h, qreal angle" + , "QRectF rect, qreal startAngle, qreal arcLength\nqreal x, qreal y, qreal w, qreal h, qreal startAngle, qreal arcLength" + , "" + , "" + , "QPainterPath path" + , "QPainterPath p\nQPointF pt\nQRectF rect" + , "" + , "QPointF ctrlPt1, QPointF ctrlPt2, QPointF endPt\nqreal ctrlPt1x, qreal ctrlPt1y, qreal ctrlPt2x, qreal ctrlPt2y, qreal endPtx, qreal endPty" + , "" + , "int i" + , "" + , "" + , "QPainterPath r" + , "QPainterPath p\nQRectF rect" + , "" + , "" + , "QPointF p\nqreal x, qreal y" + , "QPointF p\nqreal x, qreal y" + , "QPainterPath other" + , "QPainterPath other" + , "QPainterPath other" + , "QPainterPath other" + , "QPainterPath other" + , "QPainterPath other" + , "QPainterPath other" + , "QPainterPath other" + , "QPainterPath other" + , "qreal t" + , "qreal t" + , "QPointF ctrlPt, QPointF endPt\nqreal ctrlPtx, qreal ctrlPty, qreal endPtx, qreal endPty" + , "int i, qreal x, qreal y" + , "FillRule fillRule" + , "" + , "qreal t" + , "QPainterPath r" + , "QPainterPath r" + , "QPainterPath other" + , "QMatrix matrix\nQTransform matrix" + , "QMatrix matrix\nQTransform matrix" + , "" + , "QMatrix matrix\nQTransform matrix" + , "QPointF offset\nqreal dx, qreal dy" + , "QPointF offset\nqreal dx, qreal dy" + , "QPainterPath r" +"" +}; + +static const int qtscript_QPainterPath_function_lengths[] = { + 1 + // static + // prototype + , 4 + , 1 + , 1 + , 4 + , 1 + , 6 + , 7 + , 4 + , 1 + , 5 + , 6 + , 0 + , 0 + , 1 + , 1 + , 0 + , 6 + , 0 + , 1 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 2 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 4 + , 3 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 1 + , 2 + , 2 + , 1 + , 0 +}; + +static QScriptValue qtscript_QPainterPath_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPainterPath::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QPainterPath*) +Q_DECLARE_METATYPE(QPainterPath::ElementType) +Q_DECLARE_METATYPE(Qt::SizeMode) +Q_DECLARE_METATYPE(QPainterPath::Element) +Q_DECLARE_METATYPE(Qt::FillRule) +Q_DECLARE_METATYPE(QList) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QPainterPath::ElementType +// + +static const QPainterPath::ElementType qtscript_QPainterPath_ElementType_values[] = { + QPainterPath::MoveToElement + , QPainterPath::LineToElement + , QPainterPath::CurveToElement + , QPainterPath::CurveToDataElement +}; + +static const char * const qtscript_QPainterPath_ElementType_keys[] = { + "MoveToElement" + , "LineToElement" + , "CurveToElement" + , "CurveToDataElement" +}; + +static QString qtscript_QPainterPath_ElementType_toStringHelper(QPainterPath::ElementType value) +{ + if ((value >= QPainterPath::MoveToElement) && (value <= QPainterPath::CurveToDataElement)) + return qtscript_QPainterPath_ElementType_keys[static_cast(value)-static_cast(QPainterPath::MoveToElement)]; + return QString(); +} + +static QScriptValue qtscript_QPainterPath_ElementType_toScriptValue(QScriptEngine *engine, const QPainterPath::ElementType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPainterPath")); + return clazz.property(qtscript_QPainterPath_ElementType_toStringHelper(value)); +} + +static void qtscript_QPainterPath_ElementType_fromScriptValue(const QScriptValue &value, QPainterPath::ElementType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPainterPath_ElementType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPainterPath::MoveToElement) && (arg <= QPainterPath::CurveToDataElement)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ElementType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPainterPath_ElementType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPainterPath::ElementType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPainterPath_ElementType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPainterPath::ElementType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPainterPath_ElementType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPainterPath_ElementType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPainterPath_ElementType, + qtscript_QPainterPath_ElementType_valueOf, qtscript_QPainterPath_ElementType_toString); + qScriptRegisterMetaType(engine, qtscript_QPainterPath_ElementType_toScriptValue, + qtscript_QPainterPath_ElementType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPainterPath_ElementType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPainterPath_ElementType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPainterPath +// + +static QScriptValue qtscript_QPainterPath_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 53; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPainterPath* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPainterPath.%0(): this object is not a QPainterPath") + .arg(qtscript_QPainterPath_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addEllipse(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->addEllipse(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->addEllipse(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addPath(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addPolygon(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addRect(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->addRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addRegion(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 2) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->addRoundRect(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->addRoundRect(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + int _q_arg4 = context->argument(4).toInt32(); + _q_self->addRoundRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + int _q_arg4 = context->argument(4).toInt32(); + int _q_arg5 = context->argument(5).toInt32(); + _q_self->addRoundRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 3) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->addRoundedRect(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + Qt::SizeMode _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->addRoundedRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + qreal _q_arg5 = qscriptvalue_cast(context->argument(5)); + _q_self->addRoundedRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 7) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + qreal _q_arg5 = qscriptvalue_cast(context->argument(5)); + Qt::SizeMode _q_arg6 = qscriptvalue_cast(context->argument(6)); + _q_self->addRoundedRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 3) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFont _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + _q_self->addText(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFont _q_arg2 = qscriptvalue_cast(context->argument(2)); + QString _q_arg3 = context->argument(3).toString(); + _q_self->addText(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->angleAtPercent(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 2) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->arcMoveTo(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->arcMoveTo(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 3) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->arcTo(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + qreal _q_arg5 = qscriptvalue_cast(context->argument(5)); + _q_self->arcTo(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->boundingRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + _q_self->closeSubpath(); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->connectPath(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 15: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->controlPointRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 3) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->cubicTo(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + qreal _q_arg5 = qscriptvalue_cast(context->argument(5)); + _q_self->cubicTo(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->currentPosition(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QPainterPath::Element _q_result = _q_self->elementAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + int _q_result = _q_self->elementCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + Qt::FillRule _q_result = _q_self->fillRule(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->intersected(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->intersects(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->intersects(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 23: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->length(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->lineTo(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->lineTo(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveTo(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->moveTo(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->operator+(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath& _q_result = _q_self->operator+=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->operator&(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath& _q_result = _q_self->operator&=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->operator|(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath& _q_result = _q_self->operator|=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 34: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->operator-(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 35: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath& _q_result = _q_self->operator-=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 36: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->percentAtLength(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 37: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_result = _q_self->pointAtPercent(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 38: + if (context->argumentCount() == 2) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->quadTo(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->quadTo(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 39: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setElementPositionAt(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 1) { + Qt::FillRule _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFillRule(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 0) { + QPainterPath _q_result = _q_self->simplified(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 42: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->slopeAtPercent(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 43: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->subtracted(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 44: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->subtractedInverted(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 45: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 46: + if (context->argumentCount() == 0) { + QPolygonF _q_result = _q_self->toFillPolygon(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->toFillPolygon(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->toFillPolygon(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 47: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->toFillPolygons(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->toFillPolygons(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->toFillPolygons(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + } + break; + + case 48: + if (context->argumentCount() == 0) { + QPainterPath _q_result = _q_self->toReversed(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 49: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->toSubpathPolygons(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->toSubpathPolygons(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->toSubpathPolygons(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + } + break; + + case 50: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->translate(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->translate(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 51: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->translated(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPainterPath _q_result = _q_self->translated(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 52: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->united(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 53: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPainterPath_throw_ambiguity_error_helper(context, + qtscript_QPainterPath_function_names[_id+1], + qtscript_QPainterPath_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPainterPath_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPainterPath(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QPainterPath _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPainterPath_throw_ambiguity_error_helper(context, + qtscript_QPainterPath_function_names[_id], + qtscript_QPainterPath_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPainterPath_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPainterPath*)0)); + for (int i = 0; i < 54; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPainterPath_prototype_call, qtscript_QPainterPath_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPainterPath_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPainterPath_static_call, proto, qtscript_QPainterPath_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ElementType"), + qtscript_create_QPainterPath_ElementType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPainterPathStroker.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPainterPathStroker.cpp new file mode 100644 index 00000000..8b38532e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPainterPathStroker.cpp @@ -0,0 +1,305 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QPainterPathStroker_function_names[] = { + "QPainterPathStroker" + // static + // prototype + , "capStyle" + , "createStroke" + , "curveThreshold" + , "dashOffset" + , "dashPattern" + , "joinStyle" + , "miterLimit" + , "setCapStyle" + , "setCurveThreshold" + , "setDashOffset" + , "setDashPattern" + , "setJoinStyle" + , "setMiterLimit" + , "setWidth" + , "width" + , "toString" +}; + +static const char * const qtscript_QPainterPathStroker_function_signatures[] = { + "\nQPen pen" + // static + // prototype + , "" + , "QPainterPath path" + , "" + , "" + , "" + , "" + , "" + , "PenCapStyle style" + , "qreal threshold" + , "qreal offset" + , "PenStyle arg__1\nList dashPattern" + , "PenJoinStyle style" + , "qreal length" + , "qreal width" + , "" +"" +}; + +static const int qtscript_QPainterPathStroker_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPainterPathStroker_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPainterPathStroker::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPainterPathStroker*) +Q_DECLARE_METATYPE(Qt::PenCapStyle) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(Qt::PenJoinStyle) +Q_DECLARE_METATYPE(Qt::PenStyle) + +// +// QPainterPathStroker +// + +static QScriptValue qtscript_QPainterPathStroker_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 15; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPainterPathStroker* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPainterPathStroker.%0(): this object is not a QPainterPathStroker") + .arg(qtscript_QPainterPathStroker_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + Qt::PenCapStyle _q_result = _q_self->capStyle(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->createStroke(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->curveThreshold(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->dashOffset(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QVector _q_result = _q_self->dashPattern(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + Qt::PenJoinStyle _q_result = _q_self->joinStyle(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->miterLimit(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + Qt::PenCapStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCapStyle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCurveThreshold(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDashOffset(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::PenStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDashPattern(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isArray()) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setDashPattern(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 11: + if (context->argumentCount() == 1) { + Qt::PenJoinStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setJoinStyle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMiterLimit(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->width(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: { + QString result = QString::fromLatin1("QPainterPathStroker"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPainterPathStroker_throw_ambiguity_error_helper(context, + qtscript_QPainterPathStroker_function_names[_id+1], + qtscript_QPainterPathStroker_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPainterPathStroker_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPainterPathStroker(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QPainterPathStroker* _q_cpp_result = new QPainterPathStroker(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QPen _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPathStroker* _q_cpp_result = new QPainterPathStroker(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPainterPathStroker_throw_ambiguity_error_helper(context, + qtscript_QPainterPathStroker_function_names[_id], + qtscript_QPainterPathStroker_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPainterPathStroker_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPainterPathStroker*)0)); + for (int i = 0; i < 16; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPainterPathStroker_prototype_call, qtscript_QPainterPathStroker_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPainterPathStroker_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPainterPathStroker_static_call, proto, qtscript_QPainterPathStroker_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPalette.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPalette.cpp new file mode 100644 index 00000000..c22a125c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPalette.cpp @@ -0,0 +1,654 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QPalette_function_names[] = { + "QPalette" + // static + // prototype + , "alternateBase" + , "base" + , "brightText" + , "brush" + , "button" + , "buttonText" + , "cacheKey" + , "color" + , "currentColorGroup" + , "dark" + , "highlight" + , "highlightedText" + , "isBrushSet" + , "isCopyOf" + , "isEqual" + , "light" + , "link" + , "linkVisited" + , "mid" + , "midlight" + , "equals" + , "resolve" + , "setBrush" + , "setColor" + , "setColorGroup" + , "setCurrentColorGroup" + , "shadow" + , "swap" + , "text" + , "toolTipBase" + , "toolTipText" + , "window" + , "windowText" + , "toString" +}; + +static const char * const qtscript_QPalette_function_signatures[] = { + "\nGlobalColor button\nQBrush windowText, QBrush button, QBrush light, QBrush dark, QBrush mid, QBrush text, QBrush bright_text, QBrush base, QBrush window\nQColor button\nQColor button, QColor window\nQPalette palette" + // static + // prototype + , "" + , "" + , "" + , "ColorGroup cg, ColorRole cr\nColorRole cr" + , "" + , "" + , "" + , "ColorGroup cg, ColorRole cr\nColorRole cr" + , "" + , "" + , "" + , "" + , "ColorGroup cg, ColorRole cr" + , "QPalette p" + , "ColorGroup cr1, ColorGroup cr2" + , "" + , "" + , "" + , "" + , "" + , "QPalette p" + , "\nQPalette arg__1\nuint mask" + , "ColorGroup cg, ColorRole cr, QBrush brush\nColorRole cr, QBrush brush" + , "ColorGroup cg, ColorRole cr, QColor color\nColorRole cr, QColor color" + , "ColorGroup cr, QBrush windowText, QBrush button, QBrush light, QBrush dark, QBrush mid, QBrush text, QBrush bright_text, QBrush base, QBrush window" + , "ColorGroup cg" + , "" + , "QPalette other" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QPalette_function_lengths[] = { + 9 + // static + // prototype + , 0 + , 0 + , 0 + , 2 + , 0 + , 0 + , 0 + , 2 + , 0 + , 0 + , 0 + , 0 + , 2 + , 1 + , 2 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 3 + , 3 + , 10 + , 1 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPalette_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPalette::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPalette*) +Q_DECLARE_METATYPE(QPalette::ColorGroup) +Q_DECLARE_METATYPE(QPalette::ColorRole) +Q_DECLARE_METATYPE(Qt::GlobalColor) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QPalette::ColorGroup +// + +static const QPalette::ColorGroup qtscript_QPalette_ColorGroup_values[] = { + QPalette::Active + , QPalette::Disabled + , QPalette::Inactive + , QPalette::NColorGroups + , QPalette::Current + , QPalette::All +}; + +static const char * const qtscript_QPalette_ColorGroup_keys[] = { + "Active" + , "Disabled" + , "Inactive" + , "NColorGroups" + , "Current" + , "All" +}; + +static QString qtscript_QPalette_ColorGroup_toStringHelper(QPalette::ColorGroup value) +{ + if ((value >= QPalette::Active) && (value <= QPalette::All)) + return qtscript_QPalette_ColorGroup_keys[static_cast(value)-static_cast(QPalette::Active)]; + return QString(); +} + +static QScriptValue qtscript_QPalette_ColorGroup_toScriptValue(QScriptEngine *engine, const QPalette::ColorGroup &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPalette")); + return clazz.property(qtscript_QPalette_ColorGroup_toStringHelper(value)); +} + +static void qtscript_QPalette_ColorGroup_fromScriptValue(const QScriptValue &value, QPalette::ColorGroup &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPalette_ColorGroup(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPalette::Active) && (arg <= QPalette::All)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ColorGroup(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPalette_ColorGroup_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPalette::ColorGroup value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPalette_ColorGroup_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPalette::ColorGroup value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPalette_ColorGroup_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPalette_ColorGroup_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPalette_ColorGroup, + qtscript_QPalette_ColorGroup_valueOf, qtscript_QPalette_ColorGroup_toString); + qScriptRegisterMetaType(engine, qtscript_QPalette_ColorGroup_toScriptValue, + qtscript_QPalette_ColorGroup_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPalette_ColorGroup_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPalette_ColorGroup_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPalette +// + +static QScriptValue qtscript_QPalette_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 33; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPalette* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPalette.%0(): this object is not a QPalette") + .arg(qtscript_QPalette_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->alternateBase(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->base(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->brightText(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QPalette::ColorRole _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QBrush& _q_result = _q_self->brush(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QPalette::ColorGroup _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPalette::ColorRole _q_arg1 = qscriptvalue_cast(context->argument(1)); + const QBrush& _q_result = _q_self->brush(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->button(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->buttonText(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->cacheKey(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QPalette::ColorRole _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QColor& _q_result = _q_self->color(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QPalette::ColorGroup _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPalette::ColorRole _q_arg1 = qscriptvalue_cast(context->argument(1)); + const QColor& _q_result = _q_self->color(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QPalette::ColorGroup _q_result = _q_self->currentColorGroup(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->dark(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->highlight(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->highlightedText(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 2) { + QPalette::ColorGroup _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPalette::ColorRole _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->isBrushSet(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QPalette _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isCopyOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 2) { + QPalette::ColorGroup _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPalette::ColorGroup _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->isEqual(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->light(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->link(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->linkVisited(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->mid(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->midlight(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QPalette _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + uint _q_result = _q_self->resolve(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPalette _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPalette _q_result = _q_self->resolve(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + uint _q_arg0 = context->argument(0).toUInt32(); + _q_self->resolve(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 22: + if (context->argumentCount() == 2) { + QPalette::ColorRole _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBrush _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setBrush(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QPalette::ColorGroup _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPalette::ColorRole _q_arg1 = qscriptvalue_cast(context->argument(1)); + QBrush _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setBrush(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 2) { + QPalette::ColorRole _q_arg0 = qscriptvalue_cast(context->argument(0)); + QColor _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setColor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QPalette::ColorGroup _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPalette::ColorRole _q_arg1 = qscriptvalue_cast(context->argument(1)); + QColor _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setColor(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 10) { + QPalette::ColorGroup _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBrush _q_arg1 = qscriptvalue_cast(context->argument(1)); + QBrush _q_arg2 = qscriptvalue_cast(context->argument(2)); + QBrush _q_arg3 = qscriptvalue_cast(context->argument(3)); + QBrush _q_arg4 = qscriptvalue_cast(context->argument(4)); + QBrush _q_arg5 = qscriptvalue_cast(context->argument(5)); + QBrush _q_arg6 = qscriptvalue_cast(context->argument(6)); + QBrush _q_arg7 = qscriptvalue_cast(context->argument(7)); + QBrush _q_arg8 = qscriptvalue_cast(context->argument(8)); + QBrush _q_arg9 = qscriptvalue_cast(context->argument(9)); + _q_self->setColorGroup(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7, _q_arg8, _q_arg9); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QPalette::ColorGroup _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCurrentColorGroup(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->shadow(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 1) { + QPalette _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->text(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->toolTipBase(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->toolTipText(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->window(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 0) { + const QBrush& _q_result = _q_self->windowText(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 33: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPalette_throw_ambiguity_error_helper(context, + qtscript_QPalette_function_names[_id+1], + qtscript_QPalette_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPalette_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPalette(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QPalette _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::GlobalColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPalette _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPalette _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPalette _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPalette _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QColor _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPalette _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 9) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBrush _q_arg1 = qscriptvalue_cast(context->argument(1)); + QBrush _q_arg2 = qscriptvalue_cast(context->argument(2)); + QBrush _q_arg3 = qscriptvalue_cast(context->argument(3)); + QBrush _q_arg4 = qscriptvalue_cast(context->argument(4)); + QBrush _q_arg5 = qscriptvalue_cast(context->argument(5)); + QBrush _q_arg6 = qscriptvalue_cast(context->argument(6)); + QBrush _q_arg7 = qscriptvalue_cast(context->argument(7)); + QBrush _q_arg8 = qscriptvalue_cast(context->argument(8)); + QPalette _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7, _q_arg8); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPalette_throw_ambiguity_error_helper(context, + qtscript_QPalette_function_names[_id], + qtscript_QPalette_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPalette_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPalette*)0)); + for (int i = 0; i < 34; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPalette_prototype_call, qtscript_QPalette_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPalette_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPalette_static_call, proto, qtscript_QPalette_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ColorGroup"), + qtscript_create_QPalette_ColorGroup_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPen.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPen.cpp new file mode 100644 index 00000000..2f06b311 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPen.cpp @@ -0,0 +1,450 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QPen_function_names[] = { + "QPen" + // static + // prototype + , "brush" + , "capStyle" + , "color" + , "dashOffset" + , "dashPattern" + , "isCosmetic" + , "isSolid" + , "joinStyle" + , "miterLimit" + , "equals" + , "setBrush" + , "setCapStyle" + , "setColor" + , "setCosmetic" + , "setDashOffset" + , "setDashPattern" + , "setJoinStyle" + , "setMiterLimit" + , "setStyle" + , "setWidth" + , "setWidthF" + , "style" + , "swap" + , "width" + , "widthF" + , "toString" +}; + +static const char * const qtscript_QPen_function_signatures[] = { + "\nPenStyle arg__1\nQBrush brush, qreal width, PenStyle s, PenCapStyle c, PenJoinStyle j\nQColor color\nQPen pen" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QPen p" + , "QBrush brush" + , "PenCapStyle pcs" + , "QColor color" + , "bool cosmetic" + , "qreal doffset" + , "List pattern" + , "PenJoinStyle pcs" + , "qreal limit" + , "PenStyle arg__1" + , "int width" + , "qreal width" + , "" + , "QPen other" + , "" + , "" +"" +}; + +static const int qtscript_QPen_function_lengths[] = { + 5 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPen_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPen::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPen*) +Q_DECLARE_METATYPE(Qt::PenCapStyle) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(Qt::PenJoinStyle) +Q_DECLARE_METATYPE(Qt::PenStyle) + +// +// QPen +// + +static QScriptValue qtscript_QPen_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 25; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPen* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPen.%0(): this object is not a QPen") + .arg(qtscript_QPen_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QBrush _q_result = _q_self->brush(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + Qt::PenCapStyle _q_result = _q_self->capStyle(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QColor _q_result = _q_self->color(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->dashOffset(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QVector _q_result = _q_self->dashPattern(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isCosmetic(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isSolid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + Qt::PenJoinStyle _q_result = _q_self->joinStyle(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->miterLimit(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QPen _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBrush(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + Qt::PenCapStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCapStyle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setColor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setCosmetic(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDashOffset(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setDashPattern(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + Qt::PenJoinStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setJoinStyle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMiterLimit(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + Qt::PenStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStyle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWidthF(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 0) { + Qt::PenStyle _q_result = _q_self->style(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QPen _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 0) { + int _q_result = _q_self->width(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->widthF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPen_throw_ambiguity_error_helper(context, + qtscript_QPen_function_names[_id+1], + qtscript_QPen_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPen_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPen(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QPen _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::PenStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPen _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPen _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPen _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPen _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPen _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::PenStyle _q_arg2 = qscriptvalue_cast(context->argument(2)); + QPen _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::PenStyle _q_arg2 = qscriptvalue_cast(context->argument(2)); + Qt::PenCapStyle _q_arg3 = qscriptvalue_cast(context->argument(3)); + QPen _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 5) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::PenStyle _q_arg2 = qscriptvalue_cast(context->argument(2)); + Qt::PenCapStyle _q_arg3 = qscriptvalue_cast(context->argument(3)); + Qt::PenJoinStyle _q_arg4 = qscriptvalue_cast(context->argument(4)); + QPen _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPen_throw_ambiguity_error_helper(context, + qtscript_QPen_function_names[_id], + qtscript_QPen_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPen_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPen*)0)); + for (int i = 0; i < 26; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPen_prototype_call, qtscript_QPen_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPen_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPen_static_call, proto, qtscript_QPen_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPicture.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPicture.cpp new file mode 100644 index 00000000..d5ffd2d3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPicture.cpp @@ -0,0 +1,313 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPicture.h" + +static const char * const qtscript_QPicture_function_names[] = { + "QPicture" + // static + // prototype + , "boundingRect" + , "data" + , "isNull" + , "load" + , "play" + , "save" + , "setBoundingRect" + , "size" + , "swap" + , "toString" +}; + +static const char * const qtscript_QPicture_function_signatures[] = { + "QPicture arg__1\nint formatVersion" + // static + // prototype + , "" + , "" + , "" + , "QIODevice dev, char format\nString fileName, char format" + , "QPainter p" + , "QIODevice dev, char format\nString fileName, char format" + , "QRect r" + , "" + , "QPicture other" +"" +}; + +static const int qtscript_QPicture_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 2 + , 1 + , 2 + , 1 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QPicture_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPicture::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPicture) +Q_DECLARE_METATYPE(QPicture*) +Q_DECLARE_METATYPE(QtScriptShell_QPicture) +Q_DECLARE_METATYPE(QtScriptShell_QPicture*) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QPaintDevice*) + +// +// QPicture +// + +static QScriptValue qtscript_QPicture_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 9; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPicture* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPicture.%0(): this object is not a QPicture") + .arg(qtscript_QPicture_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->boundingRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + const char* _q_result = const_cast(_q_self->data()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->load(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->load(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString()) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + bool _q_result = _q_self->load(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + bool _q_result = _q_self->load(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 4: + if (context->argumentCount() == 1) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->play(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->save(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->save(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString()) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + bool _q_result = _q_self->save(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + bool _q_result = _q_self->save(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 6: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBoundingRect(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 0) { + uint _q_result = _q_self->size(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QPicture _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: { + QString result = QString::fromLatin1("QPicture"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPicture_throw_ambiguity_error_helper(context, + qtscript_QPicture_function_names[_id+1], + qtscript_QPicture_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPicture_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPicture(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPicture _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPicture)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPicture _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPicture _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPicture)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QtScriptShell_QPicture _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPicture)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPicture_throw_ambiguity_error_helper(context, + qtscript_QPicture_function_names[_id], + qtscript_QPicture_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPicture_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPicture*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 10; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPicture_prototype_call, qtscript_QPicture_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPicture_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPicture_static_call, proto, qtscript_QPicture_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPictureIO.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPictureIO.cpp new file mode 100644 index 00000000..675d845d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPictureIO.cpp @@ -0,0 +1,419 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QPictureIO_function_names[] = { + "QPictureIO" + // static + , "inputFormats" + , "outputFormats" + , "pictureFormat" + // prototype + , "description" + , "fileName" + , "format_private" + , "gamma" + , "ioDevice" + , "parameters_private" + , "picture" + , "quality" + , "read" + , "setDescription" + , "setFileName" + , "setFormat" + , "setGamma" + , "setIODevice" + , "setParameters" + , "setPicture" + , "setQuality" + , "setStatus" + , "status" + , "write" + , "toString" +}; + +static const char * const qtscript_QPictureIO_function_signatures[] = { + "\nQIODevice ioDevice, char format\nString fileName, char format" + // static + , "" + , "" + , "QIODevice arg__1\nString fileName" + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "String arg__1" + , "String arg__1" + , "char arg__1" + , "float arg__1" + , "QIODevice arg__1" + , "char arg__1" + , "QPicture arg__1" + , "int arg__1" + , "int arg__1" + , "" + , "" +"" +}; + +static const int qtscript_QPictureIO_function_lengths[] = { + 2 + // static + , 0 + , 0 + , 1 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPictureIO_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPictureIO::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPictureIO*) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QPicture) + +// +// QPictureIO +// + +static QScriptValue qtscript_QPictureIO_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 20; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPictureIO* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPictureIO.%0(): this object is not a QPictureIO") + .arg(qtscript_QPictureIO_function_names[_id+4])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->description(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->fileName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + const char* _q_result = const_cast(_q_self->format()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + float _q_result = _q_self->gamma(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QIODevice* _q_result = _q_self->ioDevice(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + const char* _q_result = const_cast(_q_self->parameters()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + const QPicture& _q_result = _q_self->picture(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->quality(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->read(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setDescription(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setFileName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg0 = context->argument(0).toString().toLatin1(); + const char * _q_arg0 = tmp__q_arg0.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + _q_self->setFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setGamma(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setIODevice(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg0 = context->argument(0).toString().toLatin1(); + const char * _q_arg0 = tmp__q_arg0.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + _q_self->setParameters(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QPicture _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPicture(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setQuality(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setStatus(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 0) { + int _q_result = _q_self->status(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->write(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: { + QString result = QString::fromLatin1("QPictureIO"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPictureIO_throw_ambiguity_error_helper(context, + qtscript_QPictureIO_function_names[_id+4], + qtscript_QPictureIO_function_signatures[_id+4]); +} + +static QScriptValue qtscript_QPictureIO_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPictureIO(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QPictureIO* _q_cpp_result = new QPictureIO(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString()) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + QPictureIO* _q_cpp_result = new QPictureIO(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + QPictureIO* _q_cpp_result = new QPictureIO(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + case 1: + if (context->argumentCount() == 0) { + QList _q_result = QPictureIO::inputFormats(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QList _q_result = QPictureIO::outputFormats(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_result = QPictureIO::pictureFormat(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_result = QPictureIO::pictureFormat(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPictureIO_throw_ambiguity_error_helper(context, + qtscript_QPictureIO_function_names[_id], + qtscript_QPictureIO_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPictureIO_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPictureIO*)0)); + for (int i = 0; i < 21; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPictureIO_prototype_call, qtscript_QPictureIO_function_lengths[i+4]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPictureIO_function_names[i+4]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPictureIO_static_call, proto, qtscript_QPictureIO_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPictureIO_static_call, + qtscript_QPictureIO_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QPictureIO_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPixmap.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPixmap.cpp new file mode 100644 index 00000000..067d792c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPixmap.cpp @@ -0,0 +1,896 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPixmap.h" + +static const char * const qtscript_QPixmap_function_names[] = { + "QPixmap" + // static + , "defaultDepth" + , "fromImage" + , "fromImageReader" + , "grabWidget" + , "grabWindow" + , "trueMatrix" + // prototype + , "cacheKey" + , "convertFromImage" + , "copy" + , "createHeuristicMask" + , "createMaskFromColor" + , "fill" + , "hasAlpha" + , "hasAlphaChannel" + , "isNull" + , "isQBitmap" + , "load" + , "loadFromData" + , "mask" + , "rect" + , "save" + , "scaled" + , "scaledToHeight" + , "scaledToWidth" + , "scroll" + , "setDevicePixelRatio" + , "setMask" + , "size" + , "swap" + , "toImage" + , "transformed" + , "toString" +}; + +static const char * const qtscript_QPixmap_function_signatures[] = { + "\nQPixmap arg__1\nQSize arg__1\nString fileName, char format, ImageConversionFlags flags\nchar xpm\nint w, int h" + // static + , "" + , "QImage image, ImageConversionFlags flags" + , "QImageReader imageReader, ImageConversionFlags flags" + , "QObject widget, QRect rect\nQObject widget, int x, int y, int w, int h" + , "WId arg__1, int x, int y, int w, int h" + , "QMatrix m, int w, int h\nQTransform m, int w, int h" + // prototype + , "" + , "QImage img, ImageConversionFlags flags" + , "QRect rect\nint x, int y, int width, int height" + , "bool clipTight" + , "QColor maskColor, MaskMode mode" + , "QColor fillColor\nQPaintDevice device, QPoint ofs\nQPaintDevice device, int xofs, int yofs" + , "" + , "" + , "" + , "" + , "String fileName, char format, ImageConversionFlags flags" + , "QByteArray data, char format, ImageConversionFlags flags" + , "" + , "" + , "QIODevice device, char format, int quality\nString fileName, char format, int quality" + , "QSize s, AspectRatioMode aspectMode, TransformationMode mode\nint w, int h, AspectRatioMode aspectMode, TransformationMode mode" + , "int h, TransformationMode mode" + , "int w, TransformationMode mode" + , "int dx, int dy, QRect rect, QRegion exposed\nint dx, int dy, int x, int y, int width, int height, QRegion exposed" + , "qreal scaleFactor" + , "QBitmap arg__1" + , "" + , "QPixmap other" + , "" + , "QMatrix arg__1, TransformationMode mode\nQTransform arg__1, TransformationMode mode" +"" +}; + +static const int qtscript_QPixmap_function_lengths[] = { + 3 + // static + , 0 + , 2 + , 2 + , 5 + , 5 + , 3 + // prototype + , 0 + , 2 + , 4 + , 1 + , 2 + , 3 + , 0 + , 0 + , 0 + , 0 + , 3 + , 3 + , 0 + , 0 + , 3 + , 4 + , 2 + , 2 + , 7 + , 1 + , 1 + , 0 + , 1 + , 0 + , 2 + , 0 +}; + +static QScriptValue qtscript_QPixmap_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPixmap::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPixmap*) +Q_DECLARE_METATYPE(QtScriptShell_QPixmap) +Q_DECLARE_METATYPE(QtScriptShell_QPixmap*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::MaskMode) +Q_DECLARE_METATYPE(const QPaintDevice*) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(Qt::AspectRatioMode) +Q_DECLARE_METATYPE(Qt::TransformationMode) +Q_DECLARE_METATYPE(QRegion*) +Q_DECLARE_METATYPE(QImageReader*) +Q_DECLARE_METATYPE(WId) +Q_DECLARE_METATYPE(const char**) +Q_DECLARE_METATYPE(QPaintDevice*) + +// +// QPixmap +// + +static QScriptValue qtscript_QPixmap_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 25; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPixmap* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPixmap.%0(): this object is not a QPixmap") + .arg(qtscript_QPixmap_function_names[_id+7])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->cacheKey(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->convertFromImage(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + bool _q_result = _q_self->convertFromImage(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QPixmap _q_result = _q_self->copy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_result = _q_self->copy(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QPixmap _q_result = _q_self->copy(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QBitmap _q_result = _q_self->createHeuristicMask(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + QBitmap _q_result = _q_self->createHeuristicMask(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QBitmap _q_result = _q_self->createMaskFromColor(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::MaskMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QBitmap _q_result = _q_self->createMaskFromColor(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + _q_self->fill(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->fill(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + const QPaintDevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->fill(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + const QPaintDevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->fill(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasAlpha(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasAlphaChannel(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isQBitmap(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->load(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + bool _q_result = _q_self->load(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + bool _q_result = _q_self->load(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->loadFromData(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + bool _q_result = _q_self->loadFromData(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + bool _q_result = _q_self->loadFromData(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QBitmap _q_result = _q_self->mask(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->rect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->save(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->save(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString()) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + bool _q_result = _q_self->save(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + bool _q_result = _q_self->save(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString() + && context->argument(2).isNumber()) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + int _q_arg2 = context->argument(2).toInt32(); + bool _q_result = _q_self->save(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString() + && context->argument(2).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + int _q_arg2 = context->argument(2).toInt32(); + bool _q_result = _q_self->save(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 15: + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_result = _q_self->scaled(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::AspectRatioMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPixmap _q_result = _q_self->scaled(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QPixmap _q_result = _q_self->scaled(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::AspectRatioMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::TransformationMode _q_arg2 = qscriptvalue_cast(context->argument(2)); + QPixmap _q_result = _q_self->scaled(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + Qt::AspectRatioMode _q_arg2 = qscriptvalue_cast(context->argument(2)); + QPixmap _q_result = _q_self->scaled(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + Qt::AspectRatioMode _q_arg2 = qscriptvalue_cast(context->argument(2)); + Qt::TransformationMode _q_arg3 = qscriptvalue_cast(context->argument(3)); + QPixmap _q_result = _q_self->scaled(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QPixmap _q_result = _q_self->scaledToHeight(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::TransformationMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPixmap _q_result = _q_self->scaledToHeight(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QPixmap _q_result = _q_self->scaledToWidth(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::TransformationMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPixmap _q_result = _q_self->scaledToWidth(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QRect _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->scroll(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QRect _q_arg2 = qscriptvalue_cast(context->argument(2)); + QRegion* _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->scroll(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + int _q_arg5 = context->argument(5).toInt32(); + _q_self->scroll(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 7) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + int _q_arg5 = context->argument(5).toInt32(); + QRegion* _q_arg6 = qscriptvalue_cast(context->argument(6)); + _q_self->scroll(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDevicePixelRatio(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QBitmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMask(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->size(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 0) { + QImage _q_result = _q_self->toImage(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::TransformationMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPixmap _q_result = _q_self->transformed(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::TransformationMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPixmap _q_result = _q_self->transformed(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 25: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPixmap_throw_ambiguity_error_helper(context, + qtscript_QPixmap_function_names[_id+7], + qtscript_QPixmap_function_signatures[_id+7]); +} + +static QScriptValue qtscript_QPixmap_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPixmap(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPixmap _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPixmap)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPixmap _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPixmap)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPixmap _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPixmap)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QPixmap _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPixmap)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + const char** _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPixmap _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPixmap)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + QtScriptShell_QPixmap _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPixmap)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QPixmap _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPixmap)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QtScriptShell_QPixmap _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPixmap)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = QPixmap::defaultDepth(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_result = QPixmap::fromImage(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QPixmap _q_result = QPixmap::fromImage(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QImageReader* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_result = QPixmap::fromImageReader(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QImageReader* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QPixmap _q_result = QPixmap::fromImageReader(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QPixmap _q_result = QPixmap::grabWidget(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + if (context->argument(0).isQObject() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QRect _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPixmap _q_result = QPixmap::grabWidget(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isQObject() + && context->argument(1).isNumber()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + int _q_arg1 = context->argument(1).toInt32(); + QPixmap _q_result = QPixmap::grabWidget(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + QObject* _q_arg0 = context->argument(0).toQObject(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QPixmap _q_result = QPixmap::grabWidget(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QObject* _q_arg0 = context->argument(0).toQObject(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QPixmap _q_result = QPixmap::grabWidget(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + QObject* _q_arg0 = context->argument(0).toQObject(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + QPixmap _q_result = QPixmap::grabWidget(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + WId _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_result = QPixmap::grabWindow(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + WId _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QPixmap _q_result = QPixmap::grabWindow(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + WId _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QPixmap _q_result = QPixmap::grabWindow(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + WId _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QPixmap _q_result = QPixmap::grabWindow(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + WId _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + QPixmap _q_result = QPixmap::grabWindow(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QMatrix _q_result = QPixmap::trueMatrix(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QTransform _q_result = QPixmap::trueMatrix(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPixmap_throw_ambiguity_error_helper(context, + qtscript_QPixmap_function_names[_id], + qtscript_QPixmap_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPixmap_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPixmap*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 26; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPixmap_prototype_call, qtscript_QPixmap_function_lengths[i+7]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPixmap_function_names[i+7]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPixmap_static_call, proto, qtscript_QPixmap_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPixmap_static_call, + qtscript_QPixmap_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QPixmap_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPixmapCache.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPixmapCache.cpp new file mode 100644 index 00000000..9033f3ad --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPixmapCache.cpp @@ -0,0 +1,234 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QPixmapCache.h" + +static const char * const qtscript_QPixmapCache_function_names[] = { + "QPixmapCache" + // static + , "cacheLimit" + , "clear" + , "find" + , "insert" + , "remove" + , "replace" + , "setCacheLimit" + // prototype + , "toString" +}; + +static const char * const qtscript_QPixmapCache_function_signatures[] = { + "" + // static + , "" + , "" + , "QPixmapCache_Key key, QPixmap pixmap\nString key, QPixmap pixmap" + , "QPixmap pixmap\nString key, QPixmap pixmap" + , "QPixmapCache_Key key\nString key" + , "QPixmapCache_Key key, QPixmap pixmap" + , "int arg__1" + // prototype +"" +}; + +static const int qtscript_QPixmapCache_function_lengths[] = { + 0 + // static + , 0 + , 0 + , 2 + , 2 + , 1 + , 2 + , 1 + // prototype + , 0 +}; + +static QScriptValue qtscript_QPixmapCache_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPixmapCache::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPixmapCache*) +Q_DECLARE_METATYPE(QtScriptShell_QPixmapCache*) +Q_DECLARE_METATYPE(QPixmapCache::Key) +Q_DECLARE_METATYPE(QPixmap*) + +// +// QPixmapCache +// + +static QScriptValue qtscript_QPixmapCache_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPixmapCache* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPixmapCache.%0(): this object is not a QPixmapCache") + .arg(qtscript_QPixmapCache_function_names[_id+8])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QPixmapCache"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPixmapCache_throw_ambiguity_error_helper(context, + qtscript_QPixmapCache_function_names[_id+8], + qtscript_QPixmapCache_function_signatures[_id+8]); +} + +static QScriptValue qtscript_QPixmapCache_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPixmapCache(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPixmapCache* _q_cpp_result = new QtScriptShell_QPixmapCache(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPixmapCache*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = QPixmapCache::cacheLimit(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QPixmapCache::clear(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QPixmapCache::Key _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap* _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = QPixmapCache::find(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = QPixmapCache::find(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 4: + if (context->argumentCount() == 1) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmapCache::Key _q_result = QPixmapCache::insert(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = QPixmapCache::insert(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPixmapCache::Key _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmapCache::remove(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QPixmapCache::remove(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 6: + if (context->argumentCount() == 2) { + QPixmapCache::Key _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = QPixmapCache::replace(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QPixmapCache::setCacheLimit(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPixmapCache_throw_ambiguity_error_helper(context, + qtscript_QPixmapCache_function_names[_id], + qtscript_QPixmapCache_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPixmapCache_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPixmapCache*)0)); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPixmapCache_static_call, proto, qtscript_QPixmapCache_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPixmapCache_static_call, + qtscript_QPixmapCache_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QPixmapCache_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPixmapCache_Key.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPixmapCache_Key.cpp new file mode 100644 index 00000000..7ea6320e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPixmapCache_Key.cpp @@ -0,0 +1,168 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QPixmapCache_Key_function_names[] = { + "QPixmapCache_Key" + // static + // prototype + , "operator_assign" + , "equals" + , "swap" + , "toString" +}; + +static const char * const qtscript_QPixmapCache_Key_function_signatures[] = { + "\nQPixmapCache_Key other" + // static + // prototype + , "QPixmapCache_Key other" + , "QPixmapCache_Key key" + , "QPixmapCache_Key other" +"" +}; + +static const int qtscript_QPixmapCache_Key_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QPixmapCache_Key_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPixmapCache_Key::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPixmapCache::Key) +Q_DECLARE_METATYPE(QPixmapCache::Key*) + +// +// QPixmapCache_Key +// + +static QScriptValue qtscript_QPixmapCache_Key_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPixmapCache::Key* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPixmapCache_Key.%0(): this object is not a QPixmapCache_Key") + .arg(qtscript_QPixmapCache_Key_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QPixmapCache::Key _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmapCache::Key& _q_result = _q_self->operator=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QPixmapCache::Key _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QPixmapCache::Key _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: { + QString result = QString::fromLatin1("QPixmapCache_Key"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPixmapCache_Key_throw_ambiguity_error_helper(context, + qtscript_QPixmapCache_Key_function_names[_id+1], + qtscript_QPixmapCache_Key_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPixmapCache_Key_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPixmapCache_Key(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QPixmapCache::Key _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QPixmapCache::Key _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmapCache::Key _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPixmapCache_Key_throw_ambiguity_error_helper(context, + qtscript_QPixmapCache_Key_function_names[_id], + qtscript_QPixmapCache_Key_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPixmapCache_Key_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPixmapCache::Key*)0)); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPixmapCache_Key_prototype_call, qtscript_QPixmapCache_Key_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPixmapCache_Key_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPixmapCache_Key_static_call, proto, qtscript_QPixmapCache_Key_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPolygon.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPolygon.cpp new file mode 100644 index 00000000..aec4cbe8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPolygon.cpp @@ -0,0 +1,814 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QPolygon_function_names[] = { + "QPolygon" + // static + , "fromList" + // prototype + , "append" + , "at" + , "boundingRect" + , "capacity" + , "clear" + , "constFirst" + , "constLast" + , "contains" + , "containsPoint" + , "count" + , "empty" + , "endsWith" + , "fill" + , "first" + , "indexOf" + , "intersected" + , "isEmpty" + , "isSharedWith" + , "last" + , "lastIndexOf" + , "length" + , "mid" + , "move" + , "operator_assign" + , "equals" + , "pop_back" + , "pop_front" + , "prepend" + , "push_back" + , "push_front" + , "remove" + , "removeAll" + , "removeAt" + , "removeFirst" + , "removeLast" + , "removeOne" + , "replace" + , "reserve" + , "resize" + , "setSharable" + , "size" + , "squeeze" + , "startsWith" + , "subtracted" + , "swap" + , "takeAt" + , "takeFirst" + , "takeLast" + , "toList" + , "translate" + , "translated" + , "united" + , "value" + , "toString" +}; + +static const char * const qtscript_QPolygon_function_signatures[] = { + "\nQPolygon other\nQRect r, bool closed\nList v\nint size" + // static + , "List list" + // prototype + , "QPoint t\nList l" + , "int i" + , "" + , "" + , "" + , "" + , "" + , "QPoint t" + , "QPoint pt, FillRule fillRule" + , "\nQPoint t" + , "" + , "QPoint t" + , "QPoint t, int size" + , "" + , "QPoint t, int from" + , "QPolygon r" + , "" + , "List other" + , "" + , "QPoint t, int from" + , "" + , "int pos, int len" + , "int from, int to" + , "QPolygon other" + , "List v" + , "" + , "" + , "QPoint t" + , "QPoint t" + , "QPoint t" + , "int i\nint i, int n" + , "QPoint t" + , "int i" + , "" + , "" + , "QPoint t" + , "int i, QPoint t" + , "int size" + , "int size" + , "bool sharable" + , "" + , "" + , "QPoint t" + , "QPolygon r" + , "QPolygon other" + , "int i" + , "" + , "" + , "" + , "QPoint offset\nint dx, int dy" + , "QPoint offset\nint dx, int dy" + , "QPolygon r" + , "int i\nint i, QPoint defaultValue" +"" +}; + +static const int qtscript_QPolygon_function_lengths[] = { + 2 + // static + , 1 + // prototype + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 2 + , 1 + , 0 + , 1 + , 2 + , 0 + , 2 + , 1 + , 0 + , 1 + , 0 + , 2 + , 0 + , 2 + , 2 + , 1 + , 1 + , 0 + , 0 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 0 + , 0 + , 1 + , 2 + , 1 + , 1 + , 1 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 2 + , 2 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QPolygon_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPolygon::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPolygon*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(Qt::FillRule) +Q_DECLARE_METATYPE(QList) + +// +// QPolygon +// + +static QScriptValue qtscript_QPolygon_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 53; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPolygon* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPolygon.%0(): this object is not a QPolygon") + .arg(qtscript_QPolygon_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->append(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isArray()) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->append(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + const QPoint& _q_result = _q_self->at(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->boundingRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->capacity(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + const QPoint& _q_result = _q_self->constFirst(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + const QPoint& _q_result = _q_self->constLast(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 2) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::FillRule _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->containsPoint(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->count(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->empty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->endsWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector& _q_result = _q_self->fill(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QVector& _q_result = _q_self->fill(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + const QPoint& _q_result = _q_self->first(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->indexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->indexOf(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygon _q_result = _q_self->intersected(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + bool _q_result = _q_self->isSharedWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + const QPoint& _q_result = _q_self->last(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->lastIndexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->lastIndexOf(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + int _q_result = _q_self->length(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QVector _q_result = _q_self->mid(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QVector _q_result = _q_self->mid(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->move(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygon& _q_result = _q_self->operator=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + _q_self->pop_back(); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 0) { + _q_self->pop_front(); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->prepend(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->push_back(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->push_front(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->remove(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->remove(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->removeAll(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->removeAt(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 0) { + _q_self->removeFirst(); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 0) { + _q_self->removeLast(); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->removeOne(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 36: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->replace(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->reserve(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->resize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 39: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setSharable(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 0) { + int _q_result = _q_self->size(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 41: + if (context->argumentCount() == 0) { + _q_self->squeeze(); + return context->engine()->undefinedValue(); + } + break; + + case 42: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->startsWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 43: + if (context->argumentCount() == 1) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygon _q_result = _q_self->subtracted(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 44: + if (context->argumentCount() == 1) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 45: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QPoint _q_result = _q_self->takeAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 46: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->takeFirst(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 47: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->takeLast(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 48: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->toList(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 49: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->translate(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->translate(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 50: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygon _q_result = _q_self->translated(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QPolygon _q_result = _q_self->translated(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 51: + if (context->argumentCount() == 1) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygon _q_result = _q_self->united(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 52: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QPoint _q_result = _q_self->value(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPoint _q_result = _q_self->value(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 53: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPolygon_throw_ambiguity_error_helper(context, + qtscript_QPolygon_function_names[_id+2], + qtscript_QPolygon_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QPolygon_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPolygon(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QPolygon _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygon _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygon _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isArray()) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QPolygon _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QPolygon _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + QPolygon _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QVector _q_result = QPolygon::fromList(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPolygon_throw_ambiguity_error_helper(context, + qtscript_QPolygon_function_names[_id], + qtscript_QPolygon_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPolygon_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPolygon*)0)); + for (int i = 0; i < 54; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPolygon_prototype_call, qtscript_QPolygon_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPolygon_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPolygon_static_call, proto, qtscript_QPolygon_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPolygon_static_call, + qtscript_QPolygon_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QPolygon_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPolygonF.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPolygonF.cpp new file mode 100644 index 00000000..71000576 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QPolygonF.cpp @@ -0,0 +1,833 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QPolygonF_function_names[] = { + "QPolygonF" + // static + , "fromList" + // prototype + , "append" + , "at" + , "boundingRect" + , "capacity" + , "clear" + , "constFirst" + , "constLast" + , "contains" + , "containsPoint" + , "count" + , "empty" + , "endsWith" + , "fill" + , "first" + , "indexOf" + , "intersected" + , "isClosed" + , "isEmpty" + , "isSharedWith" + , "last" + , "lastIndexOf" + , "length" + , "mid" + , "move" + , "operator_assign" + , "equals" + , "pop_back" + , "pop_front" + , "prepend" + , "push_back" + , "push_front" + , "remove" + , "removeAll" + , "removeAt" + , "removeFirst" + , "removeLast" + , "removeOne" + , "replace" + , "reserve" + , "resize" + , "setSharable" + , "size" + , "squeeze" + , "startsWith" + , "subtracted" + , "swap" + , "takeAt" + , "takeFirst" + , "takeLast" + , "toList" + , "toPolygon" + , "translate" + , "translated" + , "united" + , "value" + , "toString" +}; + +static const char * const qtscript_QPolygonF_function_signatures[] = { + "\nQPolygon a\nQPolygonF a\nQRectF r\nList v\nint size" + // static + , "List list" + // prototype + , "QPointF t\nList l" + , "int i" + , "" + , "" + , "" + , "" + , "" + , "QPointF t" + , "QPointF pt, FillRule fillRule" + , "\nQPointF t" + , "" + , "QPointF t" + , "QPointF t, int size" + , "" + , "QPointF t, int from" + , "QPolygonF r" + , "" + , "" + , "List other" + , "" + , "QPointF t, int from" + , "" + , "int pos, int len" + , "int from, int to" + , "QPolygonF other" + , "List v" + , "" + , "" + , "QPointF t" + , "QPointF t" + , "QPointF t" + , "int i\nint i, int n" + , "QPointF t" + , "int i" + , "" + , "" + , "QPointF t" + , "int i, QPointF t" + , "int size" + , "int size" + , "bool sharable" + , "" + , "" + , "QPointF t" + , "QPolygonF r" + , "QPolygonF other" + , "int i" + , "" + , "" + , "" + , "" + , "QPointF offset\nqreal dx, qreal dy" + , "QPointF offset\nqreal dx, qreal dy" + , "QPolygonF r" + , "int i\nint i, QPointF defaultValue" +"" +}; + +static const int qtscript_QPolygonF_function_lengths[] = { + 1 + // static + , 1 + // prototype + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 2 + , 1 + , 0 + , 1 + , 2 + , 0 + , 2 + , 1 + , 0 + , 0 + , 1 + , 0 + , 2 + , 0 + , 2 + , 2 + , 1 + , 1 + , 0 + , 0 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 0 + , 0 + , 1 + , 2 + , 1 + , 1 + , 1 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 2 + , 2 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QPolygonF_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPolygonF::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPolygonF*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(Qt::FillRule) +Q_DECLARE_METATYPE(QList) + +// +// QPolygonF +// + +static QScriptValue qtscript_QPolygonF_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 55; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPolygonF* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPolygonF.%0(): this object is not a QPolygonF") + .arg(qtscript_QPolygonF_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->append(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isArray()) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->append(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + const QPointF& _q_result = _q_self->at(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->boundingRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->capacity(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + const QPointF& _q_result = _q_self->constFirst(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + const QPointF& _q_result = _q_self->constLast(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 2) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::FillRule _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->containsPoint(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->count(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->empty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->endsWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector& _q_result = _q_self->fill(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QVector& _q_result = _q_self->fill(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + const QPointF& _q_result = _q_self->first(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->indexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->indexOf(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->intersected(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isClosed(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + bool _q_result = _q_self->isSharedWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + const QPointF& _q_result = _q_self->last(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->lastIndexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->lastIndexOf(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + int _q_result = _q_self->length(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QVector _q_result = _q_self->mid(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QVector _q_result = _q_self->mid(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->move(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF& _q_result = _q_self->operator=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + _q_self->pop_back(); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 0) { + _q_self->pop_front(); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->prepend(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->push_back(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->push_front(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->remove(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->remove(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->removeAll(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->removeAt(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 0) { + _q_self->removeFirst(); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 0) { + _q_self->removeLast(); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->removeOne(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 37: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->replace(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->reserve(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 39: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->resize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setSharable(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 0) { + int _q_result = _q_self->size(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 42: + if (context->argumentCount() == 0) { + _q_self->squeeze(); + return context->engine()->undefinedValue(); + } + break; + + case 43: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->startsWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 44: + if (context->argumentCount() == 1) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->subtracted(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 45: + if (context->argumentCount() == 1) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 46: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QPointF _q_result = _q_self->takeAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 47: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->takeFirst(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 48: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->takeLast(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 49: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->toList(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 50: + if (context->argumentCount() == 0) { + QPolygon _q_result = _q_self->toPolygon(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 51: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->translate(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->translate(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 52: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->translated(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPolygonF _q_result = _q_self->translated(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 53: + if (context->argumentCount() == 1) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->united(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 54: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QPointF _q_result = _q_self->value(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_result = _q_self->value(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 55: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPolygonF_throw_ambiguity_error_helper(context, + qtscript_QPolygonF_function_names[_id+2], + qtscript_QPolygonF_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QPolygonF_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPolygonF(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QPolygonF _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isArray()) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QPolygonF _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QPolygonF _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QVector _q_result = QPolygonF::fromList(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPolygonF_throw_ambiguity_error_helper(context, + qtscript_QPolygonF_function_names[_id], + qtscript_QPolygonF_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPolygonF_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPolygonF*)0)); + for (int i = 0; i < 56; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPolygonF_prototype_call, qtscript_QPolygonF_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPolygonF_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPolygonF_static_call, proto, qtscript_QPolygonF_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPolygonF_static_call, + qtscript_QPolygonF_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QPolygonF_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QQuaternion.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QQuaternion.cpp new file mode 100644 index 00000000..d5ffaeab --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QQuaternion.cpp @@ -0,0 +1,636 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QQuaternion_function_names[] = { + "QQuaternion" + // static + , "dotProduct" + , "fromAxes" + , "fromAxisAndAngle" + , "fromDirection" + , "fromEulerAngles" + , "fromRotationMatrix" + , "nlerp" + , "rotationTo" + , "slerp" + // prototype + , "conjugate" + , "conjugated" + , "getAxes" + , "getAxisAndAngle" + , "getEulerAngles" + , "inverted" + , "isIdentity" + , "isNull" + , "length" + , "lengthSquared" + , "normalize" + , "normalized" + , "operator_add_assign" + , "operator_divide_assign" + , "equals" + , "operator_multiply_assign" + , "operator_subtract_assign" + , "rotatedVector" + , "scalar" + , "setScalar" + , "setVector" + , "setX" + , "setY" + , "setZ" + , "toEulerAngles" + , "toRotationMatrix" + , "toVector4D" + , "vector" + , "x" + , "y" + , "z" + , "toString" +}; + +static const char * const qtscript_QQuaternion_function_signatures[] = { + "\nQVector4D vector\nfloat scalar, QVector3D vector\nfloat scalar, float xpos, float ypos, float zpos" + // static + , "QQuaternion q1, QQuaternion q2" + , "QVector3D xAxis, QVector3D yAxis, QVector3D zAxis" + , "QVector3D axis, float angle\nfloat x, float y, float z, float angle" + , "QVector3D direction, QVector3D up" + , "QVector3D eulerAngles\nfloat pitch, float yaw, float roll" + , "QMatrix3x3 rot3x3" + , "QQuaternion q1, QQuaternion q2, float t" + , "QVector3D from, QVector3D to" + , "QQuaternion q1, QQuaternion q2, float t" + // prototype + , "" + , "" + , "QVector3D xAxis, QVector3D yAxis, QVector3D zAxis" + , "QVector3D axis, float angle\nfloat x, float y, float z, float angle" + , "float pitch, float yaw, float roll" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QQuaternion quaternion" + , "float divisor" + , "QQuaternion q2" + , "QQuaternion quaternion\nfloat factor" + , "QQuaternion quaternion" + , "QVector3D vector" + , "" + , "float scalar" + , "QVector3D vector\nfloat x, float y, float z" + , "float x" + , "float y" + , "float z" + , "" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QQuaternion_function_lengths[] = { + 4 + // static + , 2 + , 3 + , 4 + , 2 + , 3 + , 1 + , 3 + , 2 + , 3 + // prototype + , 0 + , 0 + , 3 + , 4 + , 3 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 1 + , 3 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QQuaternion_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QQuaternion::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QQuaternion*) +Q_DECLARE_METATYPE(QVector3D*) +Q_DECLARE_METATYPE(float*) + +// +// QQuaternion +// + +static QScriptValue qtscript_QQuaternion_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 31; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QQuaternion* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QQuaternion.%0(): this object is not a QQuaternion") + .arg(qtscript_QQuaternion_function_names[_id+10])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QQuaternion _q_result = _q_self->conjugate(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QQuaternion _q_result = _q_self->conjugated(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 3) { + QVector3D* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVector3D* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->getAxes(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 2) { + QVector3D* _q_arg0 = qscriptvalue_cast(context->argument(0)); + float* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->getAxisAndAngle(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + float* _q_arg0 = qscriptvalue_cast(context->argument(0)); + float* _q_arg1 = qscriptvalue_cast(context->argument(1)); + float* _q_arg2 = qscriptvalue_cast(context->argument(2)); + float* _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->getAxisAndAngle(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 3) { + float* _q_arg0 = qscriptvalue_cast(context->argument(0)); + float* _q_arg1 = qscriptvalue_cast(context->argument(1)); + float* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->getEulerAngles(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QQuaternion _q_result = _q_self->inverted(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isIdentity(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + float _q_result = _q_self->length(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + float _q_result = _q_self->lengthSquared(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + _q_self->normalize(); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QQuaternion _q_result = _q_self->normalized(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QQuaternion _q_arg0 = qscriptvalue_cast(context->argument(0)); + QQuaternion& _q_result = _q_self->operator+=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QQuaternion& _q_result = _q_self->operator/=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QQuaternion _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = operator==(*_q_self, _q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QQuaternion _q_arg0 = qscriptvalue_cast(context->argument(0)); + QQuaternion& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QQuaternion& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 16: + if (context->argumentCount() == 1) { + QQuaternion _q_arg0 = qscriptvalue_cast(context->argument(0)); + QQuaternion& _q_result = _q_self->operator-=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_result = _q_self->rotatedVector(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + float _q_result = _q_self->scalar(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScalar(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setVector(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setVector(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setX(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setY(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setZ(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 0) { + QVector3D _q_result = _q_self->toEulerAngles(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + QMatrix3x3 _q_result = _q_self->toRotationMatrix(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + QVector4D _q_result = _q_self->toVector4D(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + QVector3D _q_result = _q_self->vector(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 0) { + float _q_result = _q_self->x(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 0) { + float _q_result = _q_self->y(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 0) { + float _q_result = _q_self->z(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 31: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QQuaternion_throw_ambiguity_error_helper(context, + qtscript_QQuaternion_function_names[_id+10], + qtscript_QQuaternion_function_signatures[_id+10]); +} + +static QScriptValue qtscript_QQuaternion_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QQuaternion(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QQuaternion _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QVector4D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QQuaternion _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + QQuaternion _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + QQuaternion _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + QQuaternion _q_arg0 = qscriptvalue_cast(context->argument(0)); + QQuaternion _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_result = QQuaternion::dotProduct(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 3) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVector3D _q_arg2 = qscriptvalue_cast(context->argument(2)); + QQuaternion _q_result = QQuaternion::fromAxes(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 2) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + QQuaternion _q_result = QQuaternion::fromAxisAndAngle(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + QQuaternion _q_result = QQuaternion::fromAxisAndAngle(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 2) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + QQuaternion _q_result = QQuaternion::fromDirection(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QQuaternion _q_result = QQuaternion::fromEulerAngles(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + QQuaternion _q_result = QQuaternion::fromEulerAngles(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QMatrix3x3 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QQuaternion _q_result = QQuaternion::fromRotationMatrix(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 3) { + QQuaternion _q_arg0 = qscriptvalue_cast(context->argument(0)); + QQuaternion _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + QQuaternion _q_result = QQuaternion::nlerp(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 2) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + QQuaternion _q_result = QQuaternion::rotationTo(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 3) { + QQuaternion _q_arg0 = qscriptvalue_cast(context->argument(0)); + QQuaternion _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + QQuaternion _q_result = QQuaternion::slerp(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QQuaternion_throw_ambiguity_error_helper(context, + qtscript_QQuaternion_function_names[_id], + qtscript_QQuaternion_function_signatures[_id]); +} + +QScriptValue qtscript_create_QQuaternion_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QQuaternion*)0)); + for (int i = 0; i < 32; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QQuaternion_prototype_call, qtscript_QQuaternion_function_lengths[i+10]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QQuaternion_function_names[i+10]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QQuaternion_static_call, proto, qtscript_QQuaternion_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QQuaternion_static_call, + qtscript_QQuaternion_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QQuaternion_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QRadialGradient.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QRadialGradient.cpp new file mode 100644 index 00000000..e77cde1d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QRadialGradient.cpp @@ -0,0 +1,307 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QRadialGradient_function_names[] = { + "QRadialGradient" + // static + // prototype + , "center" + , "centerRadius" + , "focalPoint" + , "focalRadius" + , "radius" + , "setCenter" + , "setCenterRadius" + , "setFocalPoint" + , "setFocalRadius" + , "setRadius" + , "toString" +}; + +static const char * const qtscript_QRadialGradient_function_signatures[] = { + "\nQPointF center, qreal centerRadius, QPointF focalPoint, qreal focalRadius\nQPointF center, qreal radius\nQPointF center, qreal radius, QPointF focalPoint\nqreal cx, qreal cy, qreal centerRadius, qreal fx, qreal fy, qreal focalRadius\nqreal cx, qreal cy, qreal radius\nqreal cx, qreal cy, qreal radius, qreal fx, qreal fy" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "QPointF center\nqreal x, qreal y" + , "qreal radius" + , "QPointF focalPoint\nqreal x, qreal y" + , "qreal radius" + , "qreal radius" +"" +}; + +static const int qtscript_QRadialGradient_function_lengths[] = { + 6 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 2 + , 1 + , 2 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QRadialGradient_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QRadialGradient::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QRadialGradient) +Q_DECLARE_METATYPE(QRadialGradient*) +Q_DECLARE_METATYPE(QGradient*) +Q_DECLARE_METATYPE(QGradient) + +// +// QRadialGradient +// + +static QScriptValue qtscript_QRadialGradient_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 10; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QRadialGradient* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QRadialGradient.%0(): this object is not a QRadialGradient") + .arg(qtscript_QRadialGradient_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->center(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->centerRadius(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->focalPoint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->focalRadius(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->radius(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCenter(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setCenter(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCenterRadius(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFocalPoint(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setFocalPoint(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFocalRadius(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRadius(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: { + QString result = QString::fromLatin1("QRadialGradient"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QRadialGradient_throw_ambiguity_error_helper(context, + qtscript_QRadialGradient_function_names[_id+1], + qtscript_QRadialGradient_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QRadialGradient_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QRadialGradient(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QRadialGradient _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRadialGradient _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_arg2 = qscriptvalue_cast(context->argument(2)); + QRadialGradient _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + QRadialGradient _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 4) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QRadialGradient _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + QRadialGradient _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 6) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + qreal _q_arg5 = qscriptvalue_cast(context->argument(5)); + QRadialGradient _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QRadialGradient_throw_ambiguity_error_helper(context, + qtscript_QRadialGradient_function_names[_id], + qtscript_QRadialGradient_function_signatures[_id]); +} + +QScriptValue qtscript_create_QRadialGradient_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QRadialGradient*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 11; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QRadialGradient_prototype_call, qtscript_QRadialGradient_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QRadialGradient_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QRadialGradient_static_call, proto, qtscript_QRadialGradient_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QRegExpValidator.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QRegExpValidator.cpp new file mode 100644 index 00000000..0c2c4a13 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QRegExpValidator.cpp @@ -0,0 +1,166 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QRegExpValidator.h" + +static const char * const qtscript_QRegExpValidator_function_names[] = { + "QRegExpValidator" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QRegExpValidator_function_signatures[] = { + "QObject parent\nQRegExp rx, QObject parent" + // static + // prototype +"" +}; + +static const int qtscript_QRegExpValidator_function_lengths[] = { + 2 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QRegExpValidator_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QRegExpValidator::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QRegExpValidator*) +Q_DECLARE_METATYPE(QtScriptShell_QRegExpValidator*) +Q_DECLARE_METATYPE(QValidator*) + +// +// QRegExpValidator +// + +static QScriptValue qtscript_QRegExpValidator_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QRegExpValidator* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QRegExpValidator.%0(): this object is not a QRegExpValidator") + .arg(qtscript_QRegExpValidator_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QRegExpValidator"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QRegExpValidator_throw_ambiguity_error_helper(context, + qtscript_QRegExpValidator_function_names[_id+1], + qtscript_QRegExpValidator_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QRegExpValidator_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QRegExpValidator(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QRegExpValidator* _q_cpp_result = new QtScriptShell_QRegExpValidator(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QRegExpValidator*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isQObject()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QRegExpValidator* _q_cpp_result = new QtScriptShell_QRegExpValidator(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QRegExpValidator*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isRegExp()) { + QRegExp _q_arg0 = context->argument(0).toRegExp(); + QtScriptShell_QRegExpValidator* _q_cpp_result = new QtScriptShell_QRegExpValidator(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QRegExpValidator*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QRegExp _q_arg0 = context->argument(0).toRegExp(); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QRegExpValidator* _q_cpp_result = new QtScriptShell_QRegExpValidator(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QRegExpValidator*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QRegExpValidator_throw_ambiguity_error_helper(context, + qtscript_QRegExpValidator_function_names[_id], + qtscript_QRegExpValidator_function_signatures[_id]); +} + +static QScriptValue qtscript_QRegExpValidator_toScriptValue(QScriptEngine *engine, QRegExpValidator* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QRegExpValidator_fromScriptValue(const QScriptValue &value, QRegExpValidator* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QRegExpValidator_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QRegExpValidator*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QRegExpValidator_toScriptValue, + qtscript_QRegExpValidator_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QRegExpValidator_static_call, proto, qtscript_QRegExpValidator_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QRegion.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QRegion.cpp new file mode 100644 index 00000000..704ac59e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QRegion.cpp @@ -0,0 +1,508 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QRegion_function_names[] = { + "QRegion" + // static + // prototype + , "boundingRect" + , "contains" + , "intersected" + , "intersects" + , "isEmpty" + , "isNull" + , "operator_add" + , "operator_and" + , "equals" + , "rectCount" + , "rects" + , "setRects" + , "subtracted" + , "swap" + , "translate" + , "translated" + , "united" + , "xored" + , "toString" +}; + +static const char * const qtscript_QRegion_function_signatures[] = { + "\nQBitmap bitmap\nQPolygon pa, FillRule fillRule\nQRect r, RegionType t\nQRegion region\nint x, int y, int w, int h, RegionType t" + // static + // prototype + , "" + , "QPoint p\nQRect r" + , "QRect r\nQRegion r" + , "QRect r\nQRegion r" + , "" + , "" + , "QRect r" + , "QRect r" + , "QRegion r" + , "" + , "" + , "QRect rect, int num" + , "QRegion r" + , "QRegion other" + , "QPoint p\nint dx, int dy" + , "QPoint p\nint dx, int dy" + , "QRect r\nQRegion r" + , "QRegion r" +"" +}; + +static const int qtscript_QRegion_function_lengths[] = { + 5 + // static + // prototype + , 0 + , 1 + , 1 + , 1 + , 0 + , 0 + , 1 + , 1 + , 1 + , 0 + , 0 + , 2 + , 1 + , 1 + , 2 + , 2 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QRegion_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QRegion::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QRegion*) +Q_DECLARE_METATYPE(QRegion::RegionType) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(const QRect*) +Q_DECLARE_METATYPE(Qt::FillRule) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QRegion::RegionType +// + +static const QRegion::RegionType qtscript_QRegion_RegionType_values[] = { + QRegion::Rectangle + , QRegion::Ellipse +}; + +static const char * const qtscript_QRegion_RegionType_keys[] = { + "Rectangle" + , "Ellipse" +}; + +static QString qtscript_QRegion_RegionType_toStringHelper(QRegion::RegionType value) +{ + if ((value >= QRegion::Rectangle) && (value <= QRegion::Ellipse)) + return qtscript_QRegion_RegionType_keys[static_cast(value)-static_cast(QRegion::Rectangle)]; + return QString(); +} + +static QScriptValue qtscript_QRegion_RegionType_toScriptValue(QScriptEngine *engine, const QRegion::RegionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QRegion")); + return clazz.property(qtscript_QRegion_RegionType_toStringHelper(value)); +} + +static void qtscript_QRegion_RegionType_fromScriptValue(const QScriptValue &value, QRegion::RegionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QRegion_RegionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QRegion::Rectangle) && (arg <= QRegion::Ellipse)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("RegionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QRegion_RegionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QRegion::RegionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QRegion_RegionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QRegion::RegionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QRegion_RegionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QRegion_RegionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QRegion_RegionType, + qtscript_QRegion_RegionType_valueOf, qtscript_QRegion_RegionType_toString); + qScriptRegisterMetaType(engine, qtscript_QRegion_RegionType_toScriptValue, + qtscript_QRegion_RegionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QRegion_RegionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QRegion_RegionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QRegion +// + +static QScriptValue qtscript_QRegion_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 18; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QRegion* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QRegion.%0(): this object is not a QRegion") + .arg(qtscript_QRegion_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->boundingRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 2: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion _q_result = _q_self->intersected(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion _q_result = _q_self->intersected(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 3: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->intersects(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->intersects(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion _q_result = _q_self->operator+(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion _q_result = _q_self->operator&(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->rectCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QVector _q_result = _q_self->rects(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 2) { + const QRect* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setRects(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion _q_result = _q_self->subtracted(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->translate(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->translate(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion _q_result = _q_self->translated(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QRegion _q_result = _q_self->translated(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion _q_result = _q_self->united(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion _q_result = _q_self->united(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 17: + if (context->argumentCount() == 1) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion _q_result = _q_self->xored(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QRegion_throw_ambiguity_error_helper(context, + qtscript_QRegion_function_names[_id+1], + qtscript_QRegion_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QRegion_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QRegion(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QRegion _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QBitmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::FillRule _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRegion _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion::RegionType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRegion _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QRegion _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 5) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QRegion::RegionType _q_arg4 = qscriptvalue_cast(context->argument(4)); + QRegion _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QRegion_throw_ambiguity_error_helper(context, + qtscript_QRegion_function_names[_id], + qtscript_QRegion_function_signatures[_id]); +} + +QScriptValue qtscript_create_QRegion_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QRegion*)0)); + for (int i = 0; i < 19; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QRegion_prototype_call, qtscript_QRegion_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QRegion_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QRegion_static_call, proto, qtscript_QRegion_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("RegionType"), + qtscript_create_QRegion_RegionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QResizeEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QResizeEvent.cpp new file mode 100644 index 00000000..48f42f1c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QResizeEvent.cpp @@ -0,0 +1,157 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QResizeEvent.h" + +static const char * const qtscript_QResizeEvent_function_names[] = { + "QResizeEvent" + // static + // prototype + , "oldSize" + , "size" + , "toString" +}; + +static const char * const qtscript_QResizeEvent_function_signatures[] = { + "QSize size, QSize oldSize" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QResizeEvent_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QResizeEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QResizeEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QtScriptShell_QResizeEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QResizeEvent +// + +static QScriptValue qtscript_QResizeEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QResizeEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QResizeEvent.%0(): this object is not a QResizeEvent") + .arg(qtscript_QResizeEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + const QSize& _q_result = _q_self->oldSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + const QSize& _q_result = _q_self->size(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QResizeEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QResizeEvent_throw_ambiguity_error_helper(context, + qtscript_QResizeEvent_function_names[_id+1], + qtscript_QResizeEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QResizeEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QResizeEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 2) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSize _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QResizeEvent* _q_cpp_result = new QtScriptShell_QResizeEvent(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QResizeEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QResizeEvent_throw_ambiguity_error_helper(context, + qtscript_QResizeEvent_function_names[_id], + qtscript_QResizeEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QResizeEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QResizeEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QResizeEvent_prototype_call, qtscript_QResizeEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QResizeEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QResizeEvent_static_call, proto, qtscript_QResizeEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QShortcutEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QShortcutEvent.cpp new file mode 100644 index 00000000..69212e0a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QShortcutEvent.cpp @@ -0,0 +1,175 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QShortcutEvent.h" + +static const char * const qtscript_QShortcutEvent_function_names[] = { + "QShortcutEvent" + // static + // prototype + , "isAmbiguous" + , "key" + , "shortcutId" + , "toString" +}; + +static const char * const qtscript_QShortcutEvent_function_signatures[] = { + "QKeySequence key, int id, bool ambiguous" + // static + // prototype + , "" + , "" + , "" +"" +}; + +static const int qtscript_QShortcutEvent_function_lengths[] = { + 3 + // static + // prototype + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QShortcutEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QShortcutEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QShortcutEvent*) +Q_DECLARE_METATYPE(QtScriptShell_QShortcutEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QShortcutEvent +// + +static QScriptValue qtscript_QShortcutEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QShortcutEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QShortcutEvent.%0(): this object is not a QShortcutEvent") + .arg(qtscript_QShortcutEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isAmbiguous(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + const QKeySequence& _q_result = _q_self->key(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->shortcutId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: { + QString result = QString::fromLatin1("QShortcutEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QShortcutEvent_throw_ambiguity_error_helper(context, + qtscript_QShortcutEvent_function_names[_id+1], + qtscript_QShortcutEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QShortcutEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QShortcutEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 2) { + QKeySequence _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QShortcutEvent* _q_cpp_result = new QtScriptShell_QShortcutEvent(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QShortcutEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 3) { + QKeySequence _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + bool _q_arg2 = context->argument(2).toBoolean(); + QtScriptShell_QShortcutEvent* _q_cpp_result = new QtScriptShell_QShortcutEvent(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QShortcutEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QShortcutEvent_throw_ambiguity_error_helper(context, + qtscript_QShortcutEvent_function_names[_id], + qtscript_QShortcutEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QShortcutEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QShortcutEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QShortcutEvent_prototype_call, qtscript_QShortcutEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QShortcutEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QShortcutEvent_static_call, proto, qtscript_QShortcutEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QShowEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QShowEvent.cpp new file mode 100644 index 00000000..e6584ef8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QShowEvent.cpp @@ -0,0 +1,124 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QShowEvent_function_names[] = { + "QShowEvent" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QShowEvent_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QShowEvent_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QShowEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QShowEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QShowEvent +// + +static QScriptValue qtscript_QShowEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QShowEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QShowEvent.%0(): this object is not a QShowEvent") + .arg(qtscript_QShowEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QShowEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QShowEvent_throw_ambiguity_error_helper(context, + qtscript_QShowEvent_function_names[_id+1], + qtscript_QShowEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QShowEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QShowEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QShowEvent* _q_cpp_result = new QShowEvent(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QShowEvent_throw_ambiguity_error_helper(context, + qtscript_QShowEvent_function_names[_id], + qtscript_QShowEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QShowEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QShowEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QShowEvent_static_call, proto, qtscript_QShowEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QStatusTipEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QStatusTipEvent.cpp new file mode 100644 index 00000000..378f72a9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QStatusTipEvent.cpp @@ -0,0 +1,141 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QStatusTipEvent_function_names[] = { + "QStatusTipEvent" + // static + // prototype + , "tip" + , "toString" +}; + +static const char * const qtscript_QStatusTipEvent_function_signatures[] = { + "String tip" + // static + // prototype + , "" +"" +}; + +static const int qtscript_QStatusTipEvent_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 +}; + +static QScriptValue qtscript_QStatusTipEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStatusTipEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStatusTipEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QStatusTipEvent +// + +static QScriptValue qtscript_QStatusTipEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStatusTipEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStatusTipEvent.%0(): this object is not a QStatusTipEvent") + .arg(qtscript_QStatusTipEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->tip(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("QStatusTipEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStatusTipEvent_throw_ambiguity_error_helper(context, + qtscript_QStatusTipEvent_function_names[_id+1], + qtscript_QStatusTipEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStatusTipEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStatusTipEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QStatusTipEvent* _q_cpp_result = new QStatusTipEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStatusTipEvent_throw_ambiguity_error_helper(context, + qtscript_QStatusTipEvent_function_names[_id], + qtscript_QStatusTipEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStatusTipEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStatusTipEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStatusTipEvent_prototype_call, qtscript_QStatusTipEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStatusTipEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStatusTipEvent_static_call, proto, qtscript_QStatusTipEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QSyntaxHighlighter.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QSyntaxHighlighter.cpp new file mode 100644 index 00000000..cf371b51 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QSyntaxHighlighter.cpp @@ -0,0 +1,184 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSyntaxHighlighter.h" + +static const char * const qtscript_QSyntaxHighlighter_function_names[] = { + "QSyntaxHighlighter" + // static + // prototype + , "document" + , "setDocument" + , "toString" +}; + +static const char * const qtscript_QSyntaxHighlighter_function_signatures[] = { + "QObject parent\nQTextDocument parent" + // static + // prototype + , "" + , "QTextDocument doc" +"" +}; + +static const int qtscript_QSyntaxHighlighter_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QSyntaxHighlighter_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSyntaxHighlighter::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSyntaxHighlighter*) +Q_DECLARE_METATYPE(QtScriptShell_QSyntaxHighlighter*) +Q_DECLARE_METATYPE(QTextDocument*) + +// +// QSyntaxHighlighter +// + +static QScriptValue qtscript_QSyntaxHighlighter_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSyntaxHighlighter* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSyntaxHighlighter.%0(): this object is not a QSyntaxHighlighter") + .arg(qtscript_QSyntaxHighlighter_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QTextDocument* _q_result = _q_self->document(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QTextDocument* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDocument(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: { + QString result = QString::fromLatin1("QSyntaxHighlighter"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSyntaxHighlighter_throw_ambiguity_error_helper(context, + qtscript_QSyntaxHighlighter_function_names[_id+1], + qtscript_QSyntaxHighlighter_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSyntaxHighlighter_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSyntaxHighlighter(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + if (context->argument(0).isQObject()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QSyntaxHighlighter* _q_cpp_result = new QtScriptShell_QSyntaxHighlighter(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSyntaxHighlighter*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + QTextDocument* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QSyntaxHighlighter* _q_cpp_result = new QtScriptShell_QSyntaxHighlighter(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSyntaxHighlighter*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSyntaxHighlighter_throw_ambiguity_error_helper(context, + qtscript_QSyntaxHighlighter_function_names[_id], + qtscript_QSyntaxHighlighter_function_signatures[_id]); +} + +static QScriptValue qtscript_QSyntaxHighlighter_toScriptValue(QScriptEngine *engine, QSyntaxHighlighter* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSyntaxHighlighter_fromScriptValue(const QScriptValue &value, QSyntaxHighlighter* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSyntaxHighlighter_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSyntaxHighlighter*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSyntaxHighlighter_prototype_call, qtscript_QSyntaxHighlighter_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSyntaxHighlighter_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSyntaxHighlighter_toScriptValue, + qtscript_QSyntaxHighlighter_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSyntaxHighlighter_static_call, proto, qtscript_QSyntaxHighlighter_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTabletEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTabletEvent.cpp new file mode 100644 index 00000000..c1c10fe6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTabletEvent.cpp @@ -0,0 +1,477 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QTabletEvent.h" + +static const char * const qtscript_QTabletEvent_function_names[] = { + "QTabletEvent" + // static + // prototype + , "button" + , "buttons" + , "device" + , "globalPos" + , "globalPosF" + , "globalX" + , "globalY" + , "hiResGlobalX" + , "hiResGlobalY" + , "pointerType" + , "pos" + , "posF" + , "pressure" + , "rotation" + , "tangentialPressure" + , "uniqueId" + , "x" + , "xTilt" + , "y" + , "yTilt" + , "z" + , "toString" +}; + +static const char * const qtscript_QTabletEvent_function_signatures[] = { + "Type t, QPointF pos, QPointF globalPos, int device, int pointerType, qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal rotation, int z, KeyboardModifiers keyState, qint64 uniqueID\nType t, QPointF pos, QPointF globalPos, int device, int pointerType, qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal rotation, int z, KeyboardModifiers keyState, qint64 uniqueID, MouseButton button, MouseButtons buttons" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QTabletEvent_function_lengths[] = { + 15 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTabletEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTabletEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QtScriptShell_QTabletEvent*) +Q_DECLARE_METATYPE(QTabletEvent::TabletDevice) +Q_DECLARE_METATYPE(Qt::MouseButton) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent::PointerType) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QInputEvent*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTabletEvent::TabletDevice +// + +static const QTabletEvent::TabletDevice qtscript_QTabletEvent_TabletDevice_values[] = { + QTabletEvent::NoDevice + , QTabletEvent::Puck + , QTabletEvent::Stylus + , QTabletEvent::Airbrush + , QTabletEvent::FourDMouse + , QTabletEvent::XFreeEraser + , QTabletEvent::RotationStylus +}; + +static const char * const qtscript_QTabletEvent_TabletDevice_keys[] = { + "NoDevice" + , "Puck" + , "Stylus" + , "Airbrush" + , "FourDMouse" + , "XFreeEraser" + , "RotationStylus" +}; + +static QString qtscript_QTabletEvent_TabletDevice_toStringHelper(QTabletEvent::TabletDevice value) +{ + if ((value >= QTabletEvent::NoDevice) && (value <= QTabletEvent::RotationStylus)) + return qtscript_QTabletEvent_TabletDevice_keys[static_cast(value)-static_cast(QTabletEvent::NoDevice)]; + return QString(); +} + +static QScriptValue qtscript_QTabletEvent_TabletDevice_toScriptValue(QScriptEngine *engine, const QTabletEvent::TabletDevice &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTabletEvent")); + return clazz.property(qtscript_QTabletEvent_TabletDevice_toStringHelper(value)); +} + +static void qtscript_QTabletEvent_TabletDevice_fromScriptValue(const QScriptValue &value, QTabletEvent::TabletDevice &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTabletEvent_TabletDevice(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTabletEvent::NoDevice) && (arg <= QTabletEvent::RotationStylus)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("TabletDevice(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTabletEvent_TabletDevice_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTabletEvent::TabletDevice value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTabletEvent_TabletDevice_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTabletEvent::TabletDevice value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTabletEvent_TabletDevice_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTabletEvent_TabletDevice_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTabletEvent_TabletDevice, + qtscript_QTabletEvent_TabletDevice_valueOf, qtscript_QTabletEvent_TabletDevice_toString); + qScriptRegisterMetaType(engine, qtscript_QTabletEvent_TabletDevice_toScriptValue, + qtscript_QTabletEvent_TabletDevice_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 7; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTabletEvent_TabletDevice_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTabletEvent_TabletDevice_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTabletEvent +// + +static QScriptValue qtscript_QTabletEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 21; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTabletEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTabletEvent.%0(): this object is not a QTabletEvent") + .arg(qtscript_QTabletEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + Qt::MouseButton _q_result = _q_self->button(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->buttons(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QTabletEvent::TabletDevice _q_result = _q_self->device(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->globalPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + const QPointF& _q_result = _q_self->globalPosF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->globalX(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = _q_self->globalY(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->hiResGlobalX(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->hiResGlobalY(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QTabletEvent::PointerType _q_result = _q_self->pointerType(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + const QPointF& _q_result = _q_self->posF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->pressure(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->rotation(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->tangentialPressure(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->uniqueId(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + int _q_result = _q_self->x(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + int _q_result = _q_self->xTilt(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + int _q_result = _q_self->y(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + int _q_result = _q_self->yTilt(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + int _q_result = _q_self->z(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: { + QString result = QString::fromLatin1("QTabletEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTabletEvent_throw_ambiguity_error_helper(context, + qtscript_QTabletEvent_function_names[_id+1], + qtscript_QTabletEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTabletEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTabletEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 13) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + qreal _q_arg5 = qscriptvalue_cast(context->argument(5)); + int _q_arg6 = context->argument(6).toInt32(); + int _q_arg7 = context->argument(7).toInt32(); + qreal _q_arg8 = qscriptvalue_cast(context->argument(8)); + qreal _q_arg9 = qscriptvalue_cast(context->argument(9)); + int _q_arg10 = context->argument(10).toInt32(); + QFlags _q_arg11 = qscriptvalue_cast >(context->argument(11)); + qint64 _q_arg12 = qscriptvalue_cast(context->argument(12)); + QtScriptShell_QTabletEvent* _q_cpp_result = new QtScriptShell_QTabletEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7, _q_arg8, _q_arg9, _q_arg10, _q_arg11, _q_arg12); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTabletEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 15) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + qreal _q_arg5 = qscriptvalue_cast(context->argument(5)); + int _q_arg6 = context->argument(6).toInt32(); + int _q_arg7 = context->argument(7).toInt32(); + qreal _q_arg8 = qscriptvalue_cast(context->argument(8)); + qreal _q_arg9 = qscriptvalue_cast(context->argument(9)); + int _q_arg10 = context->argument(10).toInt32(); + QFlags _q_arg11 = qscriptvalue_cast >(context->argument(11)); + qint64 _q_arg12 = qscriptvalue_cast(context->argument(12)); + Qt::MouseButton _q_arg13 = qscriptvalue_cast(context->argument(13)); + QFlags _q_arg14 = qscriptvalue_cast >(context->argument(14)); + QtScriptShell_QTabletEvent* _q_cpp_result = new QtScriptShell_QTabletEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7, _q_arg8, _q_arg9, _q_arg10, _q_arg11, _q_arg12, _q_arg13, _q_arg14); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTabletEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTabletEvent_throw_ambiguity_error_helper(context, + qtscript_QTabletEvent_function_names[_id], + qtscript_QTabletEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTabletEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTabletEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 22; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTabletEvent_prototype_call, qtscript_QTabletEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTabletEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTabletEvent_static_call, proto, qtscript_QTabletEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("TabletDevice"), + qtscript_create_QTabletEvent_TabletDevice_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextBlock.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextBlock.cpp new file mode 100644 index 00000000..cf6fdf40 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextBlock.cpp @@ -0,0 +1,500 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QTextBlock_function_names[] = { + "QTextBlock" + // static + // prototype + , "begin" + , "blockFormat" + , "blockFormatIndex" + , "blockNumber" + , "charFormat" + , "charFormatIndex" + , "clearLayout" + , "contains" + , "document" + , "end" + , "firstLineNumber" + , "fragmentIndex" + , "isValid" + , "isVisible" + , "layout" + , "length" + , "lineCount" + , "next" + , "equals" + , "operator_less" + , "position" + , "previous" + , "revision" + , "setLineCount" + , "setRevision" + , "setUserData" + , "setUserState" + , "setVisible" + , "text" + , "textDirection" + , "textFormats" + , "textList" + , "userData" + , "userState" + , "toString" +}; + +static const char * const qtscript_QTextBlock_function_signatures[] = { + "\nQTextBlock o" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "int position" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QTextBlock o" + , "QTextBlock o" + , "" + , "" + , "" + , "int count" + , "int rev" + , "QTextBlockUserData data" + , "int state" + , "bool visible" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QTextBlock_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextBlock_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextBlock::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextBlock) +Q_DECLARE_METATYPE(QTextBlock*) +Q_DECLARE_METATYPE(QTextBlock::iterator) +Q_DECLARE_METATYPE(QTextBlockFormat) +Q_DECLARE_METATYPE(QTextCharFormat) +Q_DECLARE_METATYPE(const QTextDocument*) +Q_DECLARE_METATYPE(QTextLayout*) +Q_DECLARE_METATYPE(QTextBlockUserData*) +Q_DECLARE_METATYPE(Qt::LayoutDirection) +Q_DECLARE_METATYPE(QTextLayout::FormatRange) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QTextList*) + +// +// QTextBlock +// + +static QScriptValue qtscript_QTextBlock_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 34; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextBlock* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextBlock.%0(): this object is not a QTextBlock") + .arg(qtscript_QTextBlock_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QTextBlock::iterator _q_result = _q_self->begin(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QTextBlockFormat _q_result = _q_self->blockFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->blockFormatIndex(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->blockNumber(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QTextCharFormat _q_result = _q_self->charFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->charFormatIndex(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + _q_self->clearLayout(); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + const QTextDocument* _q_result = const_cast(_q_self->document()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QTextBlock::iterator _q_result = _q_self->end(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + int _q_result = _q_self->firstLineNumber(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + int _q_result = _q_self->fragmentIndex(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isVisible(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QTextLayout* _q_result = _q_self->layout(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + int _q_result = _q_self->length(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + int _q_result = _q_self->lineCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QTextBlock _q_result = _q_self->next(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QTextBlock _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QTextBlock _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator<(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + int _q_result = _q_self->position(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + QTextBlock _q_result = _q_self->previous(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + int _q_result = _q_self->revision(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setLineCount(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setRevision(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QTextBlockUserData* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setUserData(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setUserState(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setVisible(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->text(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 0) { + Qt::LayoutDirection _q_result = _q_self->textDirection(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 0) { + QVector _q_result = _q_self->textFormats(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 0) { + QTextList* _q_result = _q_self->textList(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 0) { + QTextBlockUserData* _q_result = _q_self->userData(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 0) { + int _q_result = _q_self->userState(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 34: { + QString result = QString::fromLatin1("QTextBlock"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextBlock_throw_ambiguity_error_helper(context, + qtscript_QTextBlock_function_names[_id+1], + qtscript_QTextBlock_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextBlock_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextBlock(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QTextBlock _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QTextBlock _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextBlock _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextBlock_throw_ambiguity_error_helper(context, + qtscript_QTextBlock_function_names[_id], + qtscript_QTextBlock_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextBlock_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextBlock*)0)); + for (int i = 0; i < 35; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextBlock_prototype_call, qtscript_QTextBlock_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextBlock_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextBlock_static_call, proto, qtscript_QTextBlock_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextBlockFormat.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextBlockFormat.cpp new file mode 100644 index 00000000..e49c40b2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextBlockFormat.cpp @@ -0,0 +1,484 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextBlockFormat.h" + +static const char * const qtscript_QTextBlockFormat_function_names[] = { + "QTextBlockFormat" + // static + // prototype + , "alignment" + , "bottomMargin" + , "indent" + , "leftMargin" + , "lineHeight" + , "lineHeightType" + , "nonBreakableLines" + , "pageBreakPolicy" + , "rightMargin" + , "setAlignment" + , "setBottomMargin" + , "setIndent" + , "setLeftMargin" + , "setLineHeight" + , "setNonBreakableLines" + , "setPageBreakPolicy" + , "setRightMargin" + , "setTabPositions" + , "setTextIndent" + , "setTopMargin" + , "tabPositions" + , "textIndent" + , "topMargin" + , "toString" +}; + +static const char * const qtscript_QTextBlockFormat_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "" + , "" + , "\nqreal scriptLineHeight, qreal scaling" + , "" + , "" + , "" + , "" + , "Alignment alignment" + , "qreal margin" + , "int indent" + , "qreal margin" + , "qreal height, int heightType" + , "bool b" + , "PageBreakFlags flags" + , "qreal margin" + , "List tabs" + , "qreal aindent" + , "qreal margin" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QTextBlockFormat_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 2 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextBlockFormat_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextBlockFormat::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextBlockFormat) +Q_DECLARE_METATYPE(QTextBlockFormat*) +Q_DECLARE_METATYPE(QtScriptShell_QTextBlockFormat) +Q_DECLARE_METATYPE(QtScriptShell_QTextBlockFormat*) +Q_DECLARE_METATYPE(QTextBlockFormat::LineHeightTypes) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QTextFormat*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTextBlockFormat::LineHeightTypes +// + +static const QTextBlockFormat::LineHeightTypes qtscript_QTextBlockFormat_LineHeightTypes_values[] = { + QTextBlockFormat::SingleHeight + , QTextBlockFormat::ProportionalHeight + , QTextBlockFormat::FixedHeight + , QTextBlockFormat::MinimumHeight + , QTextBlockFormat::LineDistanceHeight +}; + +static const char * const qtscript_QTextBlockFormat_LineHeightTypes_keys[] = { + "SingleHeight" + , "ProportionalHeight" + , "FixedHeight" + , "MinimumHeight" + , "LineDistanceHeight" +}; + +static QString qtscript_QTextBlockFormat_LineHeightTypes_toStringHelper(QTextBlockFormat::LineHeightTypes value) +{ + if ((value >= QTextBlockFormat::SingleHeight) && (value <= QTextBlockFormat::LineDistanceHeight)) + return qtscript_QTextBlockFormat_LineHeightTypes_keys[static_cast(value)-static_cast(QTextBlockFormat::SingleHeight)]; + return QString(); +} + +static QScriptValue qtscript_QTextBlockFormat_LineHeightTypes_toScriptValue(QScriptEngine *engine, const QTextBlockFormat::LineHeightTypes &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextBlockFormat")); + return clazz.property(qtscript_QTextBlockFormat_LineHeightTypes_toStringHelper(value)); +} + +static void qtscript_QTextBlockFormat_LineHeightTypes_fromScriptValue(const QScriptValue &value, QTextBlockFormat::LineHeightTypes &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextBlockFormat_LineHeightTypes(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextBlockFormat::SingleHeight) && (arg <= QTextBlockFormat::LineDistanceHeight)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("LineHeightTypes(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextBlockFormat_LineHeightTypes_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextBlockFormat::LineHeightTypes value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextBlockFormat_LineHeightTypes_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextBlockFormat::LineHeightTypes value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextBlockFormat_LineHeightTypes_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextBlockFormat_LineHeightTypes_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextBlockFormat_LineHeightTypes, + qtscript_QTextBlockFormat_LineHeightTypes_valueOf, qtscript_QTextBlockFormat_LineHeightTypes_toString); + qScriptRegisterMetaType(engine, qtscript_QTextBlockFormat_LineHeightTypes_toScriptValue, + qtscript_QTextBlockFormat_LineHeightTypes_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextBlockFormat_LineHeightTypes_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextBlockFormat_LineHeightTypes_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextBlockFormat +// + +static QScriptValue qtscript_QTextBlockFormat_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 23; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextBlockFormat* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextBlockFormat.%0(): this object is not a QTextBlockFormat") + .arg(qtscript_QTextBlockFormat_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->alignment(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->bottomMargin(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->indent(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->leftMargin(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->lineHeight(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_result = _q_self->lineHeight(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->lineHeightType(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->nonBreakableLines(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->pageBreakPolicy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->rightMargin(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setAlignment(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBottomMargin(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setIndent(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLeftMargin(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setLineHeight(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setNonBreakableLines(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setPageBreakPolicy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRightMargin(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setTabPositions(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTextIndent(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTopMargin(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->tabPositions(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->textIndent(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->topMargin(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: { + QString result = QString::fromLatin1("QTextBlockFormat"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextBlockFormat_throw_ambiguity_error_helper(context, + qtscript_QTextBlockFormat_function_names[_id+1], + qtscript_QTextBlockFormat_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextBlockFormat_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextBlockFormat(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTextBlockFormat _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTextBlockFormat)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextBlockFormat_throw_ambiguity_error_helper(context, + qtscript_QTextBlockFormat_function_names[_id], + qtscript_QTextBlockFormat_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextBlockFormat_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextBlockFormat*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 24; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextBlockFormat_prototype_call, qtscript_QTextBlockFormat_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextBlockFormat_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextBlockFormat_static_call, proto, qtscript_QTextBlockFormat_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("LineHeightTypes"), + qtscript_create_QTextBlockFormat_LineHeightTypes_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextBlockGroup.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextBlockGroup.cpp new file mode 100644 index 00000000..1cccb7b6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextBlockGroup.cpp @@ -0,0 +1,138 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextBlockGroup.h" + +static const char * const qtscript_QTextBlockGroup_function_names[] = { + "QTextBlockGroup" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QTextBlockGroup_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QTextBlockGroup_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QTextBlockGroup_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextBlockGroup::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextBlockGroup*) +Q_DECLARE_METATYPE(QtScriptShell_QTextBlockGroup*) +Q_DECLARE_METATYPE(QTextObject*) + +// +// QTextBlockGroup +// + +static QScriptValue qtscript_QTextBlockGroup_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextBlockGroup* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextBlockGroup.%0(): this object is not a QTextBlockGroup") + .arg(qtscript_QTextBlockGroup_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QTextBlockGroup"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextBlockGroup_throw_ambiguity_error_helper(context, + qtscript_QTextBlockGroup_function_names[_id+1], + qtscript_QTextBlockGroup_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextBlockGroup_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextBlockGroup cannot be constructed")); + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextBlockGroup_throw_ambiguity_error_helper(context, + qtscript_QTextBlockGroup_function_names[_id], + qtscript_QTextBlockGroup_function_signatures[_id]); +} + +static QScriptValue qtscript_QTextBlockGroup_toScriptValue(QScriptEngine *engine, QTextBlockGroup* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTextBlockGroup_fromScriptValue(const QScriptValue &value, QTextBlockGroup* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTextBlockGroup_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextBlockGroup*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QTextBlockGroup_toScriptValue, + qtscript_QTextBlockGroup_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextBlockGroup_static_call, proto, qtscript_QTextBlockGroup_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextBlockUserData.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextBlockUserData.cpp new file mode 100644 index 00000000..d1900b55 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextBlockUserData.cpp @@ -0,0 +1,125 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QTextBlockUserData.h" + +static const char * const qtscript_QTextBlockUserData_function_names[] = { + "QTextBlockUserData" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QTextBlockUserData_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QTextBlockUserData_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QTextBlockUserData_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextBlockUserData::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextBlockUserData*) +Q_DECLARE_METATYPE(QtScriptShell_QTextBlockUserData*) + +// +// QTextBlockUserData +// + +static QScriptValue qtscript_QTextBlockUserData_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextBlockUserData* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextBlockUserData.%0(): this object is not a QTextBlockUserData") + .arg(qtscript_QTextBlockUserData_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QTextBlockUserData"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextBlockUserData_throw_ambiguity_error_helper(context, + qtscript_QTextBlockUserData_function_names[_id+1], + qtscript_QTextBlockUserData_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextBlockUserData_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextBlockUserData(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTextBlockUserData* _q_cpp_result = new QtScriptShell_QTextBlockUserData(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTextBlockUserData*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextBlockUserData_throw_ambiguity_error_helper(context, + qtscript_QTextBlockUserData_function_names[_id], + qtscript_QTextBlockUserData_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextBlockUserData_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextBlockUserData*)0)); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextBlockUserData_static_call, proto, qtscript_QTextBlockUserData_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextCharFormat.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextCharFormat.cpp new file mode 100644 index 00000000..2eeeb8bc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextCharFormat.cpp @@ -0,0 +1,897 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextCharFormat.h" + +static const char * const qtscript_QTextCharFormat_function_names[] = { + "QTextCharFormat" + // static + // prototype + , "anchorHref" + , "anchorNames" + , "font" + , "fontCapitalization" + , "fontFamily" + , "fontFixedPitch" + , "fontItalic" + , "fontKerning" + , "fontLetterSpacing" + , "fontLetterSpacingType" + , "fontOverline" + , "fontPointSize" + , "fontStretch" + , "fontStrikeOut" + , "fontStyleHint" + , "fontStyleStrategy" + , "fontUnderline" + , "fontWeight" + , "fontWordSpacing" + , "isAnchor" + , "setAnchor" + , "setAnchorHref" + , "setAnchorNames" + , "setFont" + , "setFontCapitalization" + , "setFontFamily" + , "setFontFixedPitch" + , "setFontItalic" + , "setFontKerning" + , "setFontLetterSpacing" + , "setFontLetterSpacingType" + , "setFontOverline" + , "setFontPointSize" + , "setFontStretch" + , "setFontStrikeOut" + , "setFontStyleHint" + , "setFontStyleStrategy" + , "setFontUnderline" + , "setFontWeight" + , "setFontWordSpacing" + , "setTableCellColumnSpan" + , "setTableCellRowSpan" + , "setTextOutline" + , "setToolTip" + , "setUnderlineColor" + , "setUnderlineStyle" + , "setVerticalAlignment" + , "tableCellColumnSpan" + , "tableCellRowSpan" + , "textOutline" + , "toolTip" + , "underlineColor" + , "underlineStyle" + , "verticalAlignment" + , "toString" +}; + +static const char * const qtscript_QTextCharFormat_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "bool anchor" + , "String value" + , "List names" + , "QFont font" + , "Capitalization capitalization" + , "String family" + , "bool fixedPitch" + , "bool italic" + , "bool enable" + , "qreal spacing" + , "SpacingType letterSpacingType" + , "bool overline" + , "qreal size" + , "int factor" + , "bool strikeOut" + , "StyleHint hint, StyleStrategy strategy" + , "StyleStrategy strategy" + , "bool underline" + , "int weight" + , "qreal spacing" + , "int tableCellColumnSpan" + , "int tableCellRowSpan" + , "QPen pen" + , "String tip" + , "QColor color" + , "UnderlineStyle style" + , "VerticalAlignment alignment" + , "" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QTextCharFormat_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextCharFormat_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextCharFormat::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextCharFormat) +Q_DECLARE_METATYPE(QTextCharFormat*) +Q_DECLARE_METATYPE(QtScriptShell_QTextCharFormat) +Q_DECLARE_METATYPE(QtScriptShell_QTextCharFormat*) +Q_DECLARE_METATYPE(QTextCharFormat::UnderlineStyle) +Q_DECLARE_METATYPE(QTextCharFormat::VerticalAlignment) +Q_DECLARE_METATYPE(QFont::Capitalization) +Q_DECLARE_METATYPE(QFont::SpacingType) +Q_DECLARE_METATYPE(QFont::StyleHint) +Q_DECLARE_METATYPE(QFont::StyleStrategy) +Q_DECLARE_METATYPE(QTextFormat*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTextCharFormat::UnderlineStyle +// + +static const QTextCharFormat::UnderlineStyle qtscript_QTextCharFormat_UnderlineStyle_values[] = { + QTextCharFormat::NoUnderline + , QTextCharFormat::SingleUnderline + , QTextCharFormat::DashUnderline + , QTextCharFormat::DotLine + , QTextCharFormat::DashDotLine + , QTextCharFormat::DashDotDotLine + , QTextCharFormat::WaveUnderline + , QTextCharFormat::SpellCheckUnderline +}; + +static const char * const qtscript_QTextCharFormat_UnderlineStyle_keys[] = { + "NoUnderline" + , "SingleUnderline" + , "DashUnderline" + , "DotLine" + , "DashDotLine" + , "DashDotDotLine" + , "WaveUnderline" + , "SpellCheckUnderline" +}; + +static QString qtscript_QTextCharFormat_UnderlineStyle_toStringHelper(QTextCharFormat::UnderlineStyle value) +{ + if ((value >= QTextCharFormat::NoUnderline) && (value <= QTextCharFormat::SpellCheckUnderline)) + return qtscript_QTextCharFormat_UnderlineStyle_keys[static_cast(value)-static_cast(QTextCharFormat::NoUnderline)]; + return QString(); +} + +static QScriptValue qtscript_QTextCharFormat_UnderlineStyle_toScriptValue(QScriptEngine *engine, const QTextCharFormat::UnderlineStyle &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextCharFormat")); + return clazz.property(qtscript_QTextCharFormat_UnderlineStyle_toStringHelper(value)); +} + +static void qtscript_QTextCharFormat_UnderlineStyle_fromScriptValue(const QScriptValue &value, QTextCharFormat::UnderlineStyle &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextCharFormat_UnderlineStyle(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextCharFormat::NoUnderline) && (arg <= QTextCharFormat::SpellCheckUnderline)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("UnderlineStyle(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextCharFormat_UnderlineStyle_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextCharFormat::UnderlineStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextCharFormat_UnderlineStyle_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextCharFormat::UnderlineStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextCharFormat_UnderlineStyle_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextCharFormat_UnderlineStyle_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextCharFormat_UnderlineStyle, + qtscript_QTextCharFormat_UnderlineStyle_valueOf, qtscript_QTextCharFormat_UnderlineStyle_toString); + qScriptRegisterMetaType(engine, qtscript_QTextCharFormat_UnderlineStyle_toScriptValue, + qtscript_QTextCharFormat_UnderlineStyle_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 8; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextCharFormat_UnderlineStyle_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextCharFormat_UnderlineStyle_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextCharFormat::VerticalAlignment +// + +static const QTextCharFormat::VerticalAlignment qtscript_QTextCharFormat_VerticalAlignment_values[] = { + QTextCharFormat::AlignNormal + , QTextCharFormat::AlignSuperScript + , QTextCharFormat::AlignSubScript + , QTextCharFormat::AlignMiddle + , QTextCharFormat::AlignTop + , QTextCharFormat::AlignBottom + , QTextCharFormat::AlignBaseline +}; + +static const char * const qtscript_QTextCharFormat_VerticalAlignment_keys[] = { + "AlignNormal" + , "AlignSuperScript" + , "AlignSubScript" + , "AlignMiddle" + , "AlignTop" + , "AlignBottom" + , "AlignBaseline" +}; + +static QString qtscript_QTextCharFormat_VerticalAlignment_toStringHelper(QTextCharFormat::VerticalAlignment value) +{ + if ((value >= QTextCharFormat::AlignNormal) && (value <= QTextCharFormat::AlignBaseline)) + return qtscript_QTextCharFormat_VerticalAlignment_keys[static_cast(value)-static_cast(QTextCharFormat::AlignNormal)]; + return QString(); +} + +static QScriptValue qtscript_QTextCharFormat_VerticalAlignment_toScriptValue(QScriptEngine *engine, const QTextCharFormat::VerticalAlignment &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextCharFormat")); + return clazz.property(qtscript_QTextCharFormat_VerticalAlignment_toStringHelper(value)); +} + +static void qtscript_QTextCharFormat_VerticalAlignment_fromScriptValue(const QScriptValue &value, QTextCharFormat::VerticalAlignment &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextCharFormat_VerticalAlignment(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextCharFormat::AlignNormal) && (arg <= QTextCharFormat::AlignBaseline)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("VerticalAlignment(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextCharFormat_VerticalAlignment_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextCharFormat::VerticalAlignment value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextCharFormat_VerticalAlignment_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextCharFormat::VerticalAlignment value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextCharFormat_VerticalAlignment_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextCharFormat_VerticalAlignment_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextCharFormat_VerticalAlignment, + qtscript_QTextCharFormat_VerticalAlignment_valueOf, qtscript_QTextCharFormat_VerticalAlignment_toString); + qScriptRegisterMetaType(engine, qtscript_QTextCharFormat_VerticalAlignment_toScriptValue, + qtscript_QTextCharFormat_VerticalAlignment_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 7; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextCharFormat_VerticalAlignment_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextCharFormat_VerticalAlignment_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextCharFormat +// + +static QScriptValue qtscript_QTextCharFormat_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 54; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextCharFormat* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextCharFormat.%0(): this object is not a QTextCharFormat") + .arg(qtscript_QTextCharFormat_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->anchorHref(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->anchorNames(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QFont _q_result = _q_self->font(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QFont::Capitalization _q_result = _q_self->fontCapitalization(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->fontFamily(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->fontFixedPitch(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->fontItalic(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->fontKerning(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->fontLetterSpacing(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QFont::SpacingType _q_result = _q_self->fontLetterSpacingType(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->fontOverline(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->fontPointSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + int _q_result = _q_self->fontStretch(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->fontStrikeOut(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QFont::StyleHint _q_result = _q_self->fontStyleHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QFont::StyleStrategy _q_result = _q_self->fontStyleStrategy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->fontUnderline(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + int _q_result = _q_self->fontWeight(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->fontWordSpacing(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isAnchor(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setAnchor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setAnchorHref(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setAnchorNames(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFont(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QFont::Capitalization _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFontCapitalization(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setFontFamily(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setFontFixedPitch(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setFontItalic(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setFontKerning(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFontLetterSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 1) { + QFont::SpacingType _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFontLetterSpacingType(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setFontOverline(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFontPointSize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setFontStretch(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setFontStrikeOut(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + QFont::StyleHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFontStyleHint(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QFont::StyleHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFont::StyleStrategy _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setFontStyleHint(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + QFont::StyleStrategy _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFontStyleStrategy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setFontUnderline(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setFontWeight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 39: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFontWordSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setTableCellColumnSpan(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setTableCellRowSpan(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 42: + if (context->argumentCount() == 1) { + QPen _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTextOutline(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 43: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setToolTip(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 44: + if (context->argumentCount() == 1) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setUnderlineColor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 45: + if (context->argumentCount() == 1) { + QTextCharFormat::UnderlineStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setUnderlineStyle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 46: + if (context->argumentCount() == 1) { + QTextCharFormat::VerticalAlignment _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setVerticalAlignment(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 47: + if (context->argumentCount() == 0) { + int _q_result = _q_self->tableCellColumnSpan(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 48: + if (context->argumentCount() == 0) { + int _q_result = _q_self->tableCellRowSpan(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 49: + if (context->argumentCount() == 0) { + QPen _q_result = _q_self->textOutline(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 50: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toolTip(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 51: + if (context->argumentCount() == 0) { + QColor _q_result = _q_self->underlineColor(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 52: + if (context->argumentCount() == 0) { + QTextCharFormat::UnderlineStyle _q_result = _q_self->underlineStyle(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 53: + if (context->argumentCount() == 0) { + QTextCharFormat::VerticalAlignment _q_result = _q_self->verticalAlignment(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 54: { + QString result = QString::fromLatin1("QTextCharFormat"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextCharFormat_throw_ambiguity_error_helper(context, + qtscript_QTextCharFormat_function_names[_id+1], + qtscript_QTextCharFormat_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextCharFormat_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextCharFormat(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTextCharFormat _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTextCharFormat)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextCharFormat_throw_ambiguity_error_helper(context, + qtscript_QTextCharFormat_function_names[_id], + qtscript_QTextCharFormat_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextCharFormat_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextCharFormat*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 55; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextCharFormat_prototype_call, qtscript_QTextCharFormat_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextCharFormat_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextCharFormat_static_call, proto, qtscript_QTextCharFormat_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("UnderlineStyle"), + qtscript_create_QTextCharFormat_UnderlineStyle_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("VerticalAlignment"), + qtscript_create_QTextCharFormat_VerticalAlignment_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextCursor.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextCursor.cpp new file mode 100644 index 00000000..6782f834 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextCursor.cpp @@ -0,0 +1,1159 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QTextCursor_function_names[] = { + "QTextCursor" + // static + // prototype + , "anchor" + , "atBlockEnd" + , "atBlockStart" + , "atEnd" + , "atStart" + , "beginEditBlock" + , "block" + , "blockCharFormat" + , "blockFormat" + , "blockNumber" + , "charFormat" + , "clearSelection" + , "columnNumber" + , "createList" + , "currentFrame" + , "currentList" + , "currentTable" + , "deleteChar" + , "deletePreviousChar" + , "document" + , "endEditBlock" + , "hasComplexSelection" + , "hasSelection" + , "insertBlock" + , "insertFragment" + , "insertFrame" + , "insertHtml" + , "insertImage" + , "insertList" + , "insertTable" + , "insertText" + , "isCopyOf" + , "isNull" + , "joinPreviousEditBlock" + , "keepPositionOnInsert" + , "mergeBlockCharFormat" + , "mergeBlockFormat" + , "mergeCharFormat" + , "movePosition" + , "equals" + , "operator_less" + , "position" + , "positionInBlock" + , "removeSelectedText" + , "select" + , "selectedTableCells" + , "selectedText" + , "selection" + , "selectionEnd" + , "selectionStart" + , "setBlockCharFormat" + , "setBlockFormat" + , "setCharFormat" + , "setKeepPositionOnInsert" + , "setPosition" + , "setVerticalMovementX" + , "setVisualNavigation" + , "swap" + , "verticalMovementX" + , "visualNavigation" + , "toString" +}; + +static const char * const qtscript_QTextCursor_function_signatures[] = { + "\nQTextDocument document\nQTextFrame frame\nQTextBlock block\nQTextCursor cursor" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "Style style\nQTextListFormat format" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "\nQTextBlockFormat format\nQTextBlockFormat format, QTextCharFormat charFormat" + , "QTextDocumentFragment fragment" + , "QTextFrameFormat format" + , "String html" + , "QImage image, String name\nString name\nQTextImageFormat format\nQTextImageFormat format, Position alignment" + , "Style style\nQTextListFormat format" + , "int rows, int cols\nint rows, int cols, QTextTableFormat format" + , "String text\nString text, QTextCharFormat format" + , "QTextCursor other" + , "" + , "" + , "" + , "QTextCharFormat modifier" + , "QTextBlockFormat modifier" + , "QTextCharFormat modifier" + , "MoveOperation op, MoveMode arg__2, int n" + , "QTextCursor rhs" + , "QTextCursor rhs" + , "" + , "" + , "" + , "SelectionType selection" + , "int firstRow, int numRows, int firstColumn, int numColumns" + , "" + , "" + , "" + , "" + , "QTextCharFormat format" + , "QTextBlockFormat format" + , "QTextCharFormat format" + , "bool b" + , "int pos, MoveMode mode" + , "int x" + , "bool b" + , "QTextCursor other" + , "" + , "" +"" +}; + +static const int qtscript_QTextCursor_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 2 + , 1 + , 1 + , 1 + , 2 + , 1 + , 3 + , 2 + , 1 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 3 + , 1 + , 1 + , 0 + , 0 + , 0 + , 1 + , 4 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextCursor_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextCursor::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextCursor) +Q_DECLARE_METATYPE(QTextCursor*) +Q_DECLARE_METATYPE(QTextCursor::MoveOperation) +Q_DECLARE_METATYPE(QTextCursor::SelectionType) +Q_DECLARE_METATYPE(QTextCursor::MoveMode) +Q_DECLARE_METATYPE(QTextBlock) +Q_DECLARE_METATYPE(QTextCharFormat) +Q_DECLARE_METATYPE(QTextBlockFormat) +Q_DECLARE_METATYPE(QTextListFormat::Style) +Q_DECLARE_METATYPE(QTextList*) +Q_DECLARE_METATYPE(QTextListFormat) +Q_DECLARE_METATYPE(QTextFrame*) +Q_DECLARE_METATYPE(QTextTable*) +Q_DECLARE_METATYPE(QTextDocument*) +Q_DECLARE_METATYPE(QTextDocumentFragment) +Q_DECLARE_METATYPE(QTextFrameFormat) +Q_DECLARE_METATYPE(QTextImageFormat) +Q_DECLARE_METATYPE(QTextFrameFormat::Position) +Q_DECLARE_METATYPE(QTextTableFormat) +Q_DECLARE_METATYPE(int*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTextCursor::MoveOperation +// + +static const QTextCursor::MoveOperation qtscript_QTextCursor_MoveOperation_values[] = { + QTextCursor::NoMove + , QTextCursor::Start + , QTextCursor::Up + , QTextCursor::StartOfLine + , QTextCursor::StartOfBlock + , QTextCursor::StartOfWord + , QTextCursor::PreviousBlock + , QTextCursor::PreviousCharacter + , QTextCursor::PreviousWord + , QTextCursor::Left + , QTextCursor::WordLeft + , QTextCursor::End + , QTextCursor::Down + , QTextCursor::EndOfLine + , QTextCursor::EndOfWord + , QTextCursor::EndOfBlock + , QTextCursor::NextBlock + , QTextCursor::NextCharacter + , QTextCursor::NextWord + , QTextCursor::Right + , QTextCursor::WordRight + , QTextCursor::NextCell + , QTextCursor::PreviousCell + , QTextCursor::NextRow + , QTextCursor::PreviousRow +}; + +static const char * const qtscript_QTextCursor_MoveOperation_keys[] = { + "NoMove" + , "Start" + , "Up" + , "StartOfLine" + , "StartOfBlock" + , "StartOfWord" + , "PreviousBlock" + , "PreviousCharacter" + , "PreviousWord" + , "Left" + , "WordLeft" + , "End" + , "Down" + , "EndOfLine" + , "EndOfWord" + , "EndOfBlock" + , "NextBlock" + , "NextCharacter" + , "NextWord" + , "Right" + , "WordRight" + , "NextCell" + , "PreviousCell" + , "NextRow" + , "PreviousRow" +}; + +static QString qtscript_QTextCursor_MoveOperation_toStringHelper(QTextCursor::MoveOperation value) +{ + if ((value >= QTextCursor::NoMove) && (value <= QTextCursor::PreviousRow)) + return qtscript_QTextCursor_MoveOperation_keys[static_cast(value)-static_cast(QTextCursor::NoMove)]; + return QString(); +} + +static QScriptValue qtscript_QTextCursor_MoveOperation_toScriptValue(QScriptEngine *engine, const QTextCursor::MoveOperation &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextCursor")); + return clazz.property(qtscript_QTextCursor_MoveOperation_toStringHelper(value)); +} + +static void qtscript_QTextCursor_MoveOperation_fromScriptValue(const QScriptValue &value, QTextCursor::MoveOperation &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextCursor_MoveOperation(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextCursor::NoMove) && (arg <= QTextCursor::PreviousRow)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("MoveOperation(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextCursor_MoveOperation_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextCursor::MoveOperation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextCursor_MoveOperation_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextCursor::MoveOperation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextCursor_MoveOperation_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextCursor_MoveOperation_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextCursor_MoveOperation, + qtscript_QTextCursor_MoveOperation_valueOf, qtscript_QTextCursor_MoveOperation_toString); + qScriptRegisterMetaType(engine, qtscript_QTextCursor_MoveOperation_toScriptValue, + qtscript_QTextCursor_MoveOperation_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 25; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextCursor_MoveOperation_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextCursor_MoveOperation_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextCursor::SelectionType +// + +static const QTextCursor::SelectionType qtscript_QTextCursor_SelectionType_values[] = { + QTextCursor::WordUnderCursor + , QTextCursor::LineUnderCursor + , QTextCursor::BlockUnderCursor + , QTextCursor::Document +}; + +static const char * const qtscript_QTextCursor_SelectionType_keys[] = { + "WordUnderCursor" + , "LineUnderCursor" + , "BlockUnderCursor" + , "Document" +}; + +static QString qtscript_QTextCursor_SelectionType_toStringHelper(QTextCursor::SelectionType value) +{ + if ((value >= QTextCursor::WordUnderCursor) && (value <= QTextCursor::Document)) + return qtscript_QTextCursor_SelectionType_keys[static_cast(value)-static_cast(QTextCursor::WordUnderCursor)]; + return QString(); +} + +static QScriptValue qtscript_QTextCursor_SelectionType_toScriptValue(QScriptEngine *engine, const QTextCursor::SelectionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextCursor")); + return clazz.property(qtscript_QTextCursor_SelectionType_toStringHelper(value)); +} + +static void qtscript_QTextCursor_SelectionType_fromScriptValue(const QScriptValue &value, QTextCursor::SelectionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextCursor_SelectionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextCursor::WordUnderCursor) && (arg <= QTextCursor::Document)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SelectionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextCursor_SelectionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextCursor::SelectionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextCursor_SelectionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextCursor::SelectionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextCursor_SelectionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextCursor_SelectionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextCursor_SelectionType, + qtscript_QTextCursor_SelectionType_valueOf, qtscript_QTextCursor_SelectionType_toString); + qScriptRegisterMetaType(engine, qtscript_QTextCursor_SelectionType_toScriptValue, + qtscript_QTextCursor_SelectionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextCursor_SelectionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextCursor_SelectionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextCursor::MoveMode +// + +static const QTextCursor::MoveMode qtscript_QTextCursor_MoveMode_values[] = { + QTextCursor::MoveAnchor + , QTextCursor::KeepAnchor +}; + +static const char * const qtscript_QTextCursor_MoveMode_keys[] = { + "MoveAnchor" + , "KeepAnchor" +}; + +static QString qtscript_QTextCursor_MoveMode_toStringHelper(QTextCursor::MoveMode value) +{ + if ((value >= QTextCursor::MoveAnchor) && (value <= QTextCursor::KeepAnchor)) + return qtscript_QTextCursor_MoveMode_keys[static_cast(value)-static_cast(QTextCursor::MoveAnchor)]; + return QString(); +} + +static QScriptValue qtscript_QTextCursor_MoveMode_toScriptValue(QScriptEngine *engine, const QTextCursor::MoveMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextCursor")); + return clazz.property(qtscript_QTextCursor_MoveMode_toStringHelper(value)); +} + +static void qtscript_QTextCursor_MoveMode_fromScriptValue(const QScriptValue &value, QTextCursor::MoveMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextCursor_MoveMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextCursor::MoveAnchor) && (arg <= QTextCursor::KeepAnchor)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("MoveMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextCursor_MoveMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextCursor::MoveMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextCursor_MoveMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextCursor::MoveMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextCursor_MoveMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextCursor_MoveMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextCursor_MoveMode, + qtscript_QTextCursor_MoveMode_valueOf, qtscript_QTextCursor_MoveMode_toString); + qScriptRegisterMetaType(engine, qtscript_QTextCursor_MoveMode_toScriptValue, + qtscript_QTextCursor_MoveMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextCursor_MoveMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextCursor_MoveMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextCursor +// + +static QScriptValue qtscript_QTextCursor_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 60; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextCursor* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextCursor.%0(): this object is not a QTextCursor") + .arg(qtscript_QTextCursor_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->anchor(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->atBlockEnd(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->atBlockStart(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->atEnd(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->atStart(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + _q_self->beginEditBlock(); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QTextBlock _q_result = _q_self->block(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QTextCharFormat _q_result = _q_self->blockCharFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QTextBlockFormat _q_result = _q_self->blockFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->blockNumber(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QTextCharFormat _q_result = _q_self->charFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + _q_self->clearSelection(); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 0) { + int _q_result = _q_self->columnNumber(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTextListFormat::Style _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextList* _q_result = _q_self->createList(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTextListFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextList* _q_result = _q_self->createList(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 14: + if (context->argumentCount() == 0) { + QTextFrame* _q_result = _q_self->currentFrame(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QTextList* _q_result = _q_self->currentList(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QTextTable* _q_result = _q_self->currentTable(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + _q_self->deleteChar(); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 0) { + _q_self->deletePreviousChar(); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QTextDocument* _q_result = _q_self->document(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + _q_self->endEditBlock(); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasComplexSelection(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasSelection(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + _q_self->insertBlock(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + QTextBlockFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->insertBlock(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QTextBlockFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCharFormat _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertBlock(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QTextDocumentFragment _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->insertFragment(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QTextFrameFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextFrame* _q_result = _q_self->insertFrame(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->insertHtml(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->insertImage(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->insertImage(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTextImageFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->insertImage(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + _q_self->insertImage(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QTextImageFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextFrameFormat::Position _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertImage(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + break; + + case 28: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTextListFormat::Style _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextList* _q_result = _q_self->insertList(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTextListFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextList* _q_result = _q_self->insertList(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 29: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QTextTable* _q_result = _q_self->insertTable(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QTextTableFormat _q_arg2 = qscriptvalue_cast(context->argument(2)); + QTextTable* _q_result = _q_self->insertTable(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->insertText(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QTextCharFormat _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + QTextCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isCopyOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 0) { + _q_self->joinPreviousEditBlock(); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->keepPositionOnInsert(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 35: + if (context->argumentCount() == 1) { + QTextCharFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->mergeBlockCharFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + QTextBlockFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->mergeBlockFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 1) { + QTextCharFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->mergeCharFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 1) { + QTextCursor::MoveOperation _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->movePosition(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QTextCursor::MoveOperation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCursor::MoveMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->movePosition(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QTextCursor::MoveOperation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCursor::MoveMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + bool _q_result = _q_self->movePosition(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 1) { + QTextCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 40: + if (context->argumentCount() == 1) { + QTextCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator<(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 41: + if (context->argumentCount() == 0) { + int _q_result = _q_self->position(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 42: + if (context->argumentCount() == 0) { + int _q_result = _q_self->positionInBlock(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 43: + if (context->argumentCount() == 0) { + _q_self->removeSelectedText(); + return context->engine()->undefinedValue(); + } + break; + + case 44: + if (context->argumentCount() == 1) { + QTextCursor::SelectionType _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->select(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 45: + if (context->argumentCount() == 4) { + int* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->selectedTableCells(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 46: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->selectedText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 47: + if (context->argumentCount() == 0) { + QTextDocumentFragment _q_result = _q_self->selection(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 48: + if (context->argumentCount() == 0) { + int _q_result = _q_self->selectionEnd(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 49: + if (context->argumentCount() == 0) { + int _q_result = _q_self->selectionStart(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 50: + if (context->argumentCount() == 1) { + QTextCharFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBlockCharFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 51: + if (context->argumentCount() == 1) { + QTextBlockFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBlockFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 52: + if (context->argumentCount() == 1) { + QTextCharFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCharFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 53: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setKeepPositionOnInsert(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 54: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setPosition(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QTextCursor::MoveMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setPosition(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 55: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setVerticalMovementX(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 56: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setVisualNavigation(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 57: + if (context->argumentCount() == 1) { + QTextCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 58: + if (context->argumentCount() == 0) { + int _q_result = _q_self->verticalMovementX(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 59: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->visualNavigation(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 60: { + QString result = QString::fromLatin1("QTextCursor"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextCursor_throw_ambiguity_error_helper(context, + qtscript_QTextCursor_function_names[_id+1], + qtscript_QTextCursor_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextCursor_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextCursor(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QTextCursor _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QTextDocument* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCursor _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + QTextFrame* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCursor _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTextBlock _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCursor _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTextCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCursor _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextCursor_throw_ambiguity_error_helper(context, + qtscript_QTextCursor_function_names[_id], + qtscript_QTextCursor_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextCursor_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextCursor*)0)); + for (int i = 0; i < 61; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextCursor_prototype_call, qtscript_QTextCursor_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextCursor_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextCursor_static_call, proto, qtscript_QTextCursor_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("MoveOperation"), + qtscript_create_QTextCursor_MoveOperation_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("SelectionType"), + qtscript_create_QTextCursor_SelectionType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("MoveMode"), + qtscript_create_QTextCursor_MoveMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextDocument.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextDocument.cpp new file mode 100644 index 00000000..4be44578 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextDocument.cpp @@ -0,0 +1,1195 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextDocument.h" + +static const char * const qtscript_QTextDocument_function_names[] = { + "QTextDocument" + // static + // prototype + , "addResource" + , "adjustSize" + , "allFormats" + , "availableRedoSteps" + , "availableUndoSteps" + , "baseUrl" + , "begin" + , "characterAt" + , "characterCount" + , "clear" + , "clearUndoRedoStacks" + , "clone" + , "defaultCursorMoveStyle" + , "defaultTextOption" + , "documentLayout" + , "drawContents" + , "end" + , "find" + , "findBlock" + , "findBlockByLineNumber" + , "findBlockByNumber" + , "firstBlock" + , "frameAt" + , "idealWidth" + , "isEmpty" + , "isRedoAvailable" + , "isUndoAvailable" + , "lastBlock" + , "lineCount" + , "markContentsDirty" + , "metaInformation" + , "object" + , "objectForFormat" + , "pageCount" + , "redo" + , "resource" + , "revision" + , "rootFrame" + , "setBaseUrl" + , "setDefaultCursorMoveStyle" + , "setDefaultTextOption" + , "setDocumentLayout" + , "setHtml" + , "setMetaInformation" + , "setPlainText" + , "toHtml" + , "toPlainText" + , "undo" + , "toString" +}; + +static const char * const qtscript_QTextDocument_function_signatures[] = { + "QObject parent\nString text, QObject parent" + // static + // prototype + , "int type, QUrl name, Object resource" + , "" + , "" + , "" + , "" + , "" + , "" + , "int pos" + , "" + , "" + , "Stacks historyToClear" + , "QObject parent" + , "" + , "" + , "" + , "QPainter painter, QRectF rect" + , "" + , "QRegExp expr, QTextCursor cursor, FindFlags options\nQRegExp expr, int from, FindFlags options\nString subString, QTextCursor cursor, FindFlags options\nString subString, int from, FindFlags options" + , "int pos" + , "int blockNumber" + , "int blockNumber" + , "" + , "int pos" + , "" + , "" + , "" + , "" + , "" + , "" + , "int from, int length" + , "MetaInformation info" + , "int objectIndex" + , "QTextFormat arg__1" + , "" + , "QTextCursor cursor" + , "int type, QUrl name" + , "" + , "" + , "QUrl url" + , "CursorMoveStyle style" + , "QTextOption option" + , "QAbstractTextDocumentLayout layout" + , "String html" + , "MetaInformation info, String arg__2" + , "String text" + , "QByteArray encoding" + , "" + , "QTextCursor cursor" +"" +}; + +static const int qtscript_QTextDocument_function_lengths[] = { + 2 + // static + // prototype + , 3 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 2 + , 0 + , 3 + , 1 + , 1 + , 1 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 2 + , 1 + , 1 + , 1 + , 0 + , 1 + , 2 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QTextDocument_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextDocument::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextDocument*) +Q_DECLARE_METATYPE(QtScriptShell_QTextDocument*) +Q_DECLARE_METATYPE(QTextDocument::MetaInformation) +Q_DECLARE_METATYPE(QTextDocument::FindFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTextDocument::ResourceType) +Q_DECLARE_METATYPE(QTextDocument::Stacks) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QTextBlock) +Q_DECLARE_METATYPE(Qt::CursorMoveStyle) +Q_DECLARE_METATYPE(QTextOption) +Q_DECLARE_METATYPE(QAbstractTextDocumentLayout*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QTextCursor) +Q_DECLARE_METATYPE(QTextFrame*) +Q_DECLARE_METATYPE(QTextObject*) +Q_DECLARE_METATYPE(QTextCursor*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QTextDocument::MetaInformation +// + +static const QTextDocument::MetaInformation qtscript_QTextDocument_MetaInformation_values[] = { + QTextDocument::DocumentTitle + , QTextDocument::DocumentUrl +}; + +static const char * const qtscript_QTextDocument_MetaInformation_keys[] = { + "DocumentTitle" + , "DocumentUrl" +}; + +static QString qtscript_QTextDocument_MetaInformation_toStringHelper(QTextDocument::MetaInformation value) +{ + if ((value >= QTextDocument::DocumentTitle) && (value <= QTextDocument::DocumentUrl)) + return qtscript_QTextDocument_MetaInformation_keys[static_cast(value)-static_cast(QTextDocument::DocumentTitle)]; + return QString(); +} + +static QScriptValue qtscript_QTextDocument_MetaInformation_toScriptValue(QScriptEngine *engine, const QTextDocument::MetaInformation &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextDocument")); + return clazz.property(qtscript_QTextDocument_MetaInformation_toStringHelper(value)); +} + +static void qtscript_QTextDocument_MetaInformation_fromScriptValue(const QScriptValue &value, QTextDocument::MetaInformation &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextDocument_MetaInformation(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextDocument::DocumentTitle) && (arg <= QTextDocument::DocumentUrl)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("MetaInformation(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextDocument_MetaInformation_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextDocument::MetaInformation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextDocument_MetaInformation_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextDocument::MetaInformation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextDocument_MetaInformation_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextDocument_MetaInformation_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextDocument_MetaInformation, + qtscript_QTextDocument_MetaInformation_valueOf, qtscript_QTextDocument_MetaInformation_toString); + qScriptRegisterMetaType(engine, qtscript_QTextDocument_MetaInformation_toScriptValue, + qtscript_QTextDocument_MetaInformation_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextDocument_MetaInformation_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextDocument_MetaInformation_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextDocument::FindFlag +// + +static const QTextDocument::FindFlag qtscript_QTextDocument_FindFlag_values[] = { + QTextDocument::FindBackward + , QTextDocument::FindCaseSensitively + , QTextDocument::FindWholeWords +}; + +static const char * const qtscript_QTextDocument_FindFlag_keys[] = { + "FindBackward" + , "FindCaseSensitively" + , "FindWholeWords" +}; + +static QString qtscript_QTextDocument_FindFlag_toStringHelper(QTextDocument::FindFlag value) +{ + for (int i = 0; i < 3; ++i) { + if (qtscript_QTextDocument_FindFlag_values[i] == value) + return QString::fromLatin1(qtscript_QTextDocument_FindFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QTextDocument_FindFlag_toScriptValue(QScriptEngine *engine, const QTextDocument::FindFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextDocument")); + return clazz.property(qtscript_QTextDocument_FindFlag_toStringHelper(value)); +} + +static void qtscript_QTextDocument_FindFlag_fromScriptValue(const QScriptValue &value, QTextDocument::FindFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextDocument_FindFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 3; ++i) { + if (qtscript_QTextDocument_FindFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("FindFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextDocument_FindFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextDocument::FindFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextDocument_FindFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextDocument::FindFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextDocument_FindFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextDocument_FindFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextDocument_FindFlag, + qtscript_QTextDocument_FindFlag_valueOf, qtscript_QTextDocument_FindFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QTextDocument_FindFlag_toScriptValue, + qtscript_QTextDocument_FindFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextDocument_FindFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextDocument_FindFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextDocument::FindFlags +// + +static QScriptValue qtscript_QTextDocument_FindFlags_toScriptValue(QScriptEngine *engine, const QTextDocument::FindFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QTextDocument_FindFlags_fromScriptValue(const QScriptValue &value, QTextDocument::FindFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QTextDocument_FindFlags(QScriptContext *context, QScriptEngine *engine) +{ + QTextDocument::FindFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("FindFlags(): argument %0 is not of type FindFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QTextDocument_FindFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextDocument::FindFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextDocument_FindFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextDocument::FindFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 3; ++i) { + if ((value & qtscript_QTextDocument_FindFlag_values[i]) == qtscript_QTextDocument_FindFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QTextDocument_FindFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QTextDocument_FindFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QTextDocument_FindFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QTextDocument_FindFlags, qtscript_QTextDocument_FindFlags_valueOf, + qtscript_QTextDocument_FindFlags_toString, qtscript_QTextDocument_FindFlags_equals); + qScriptRegisterMetaType(engine, qtscript_QTextDocument_FindFlags_toScriptValue, + qtscript_QTextDocument_FindFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QTextDocument::ResourceType +// + +static const QTextDocument::ResourceType qtscript_QTextDocument_ResourceType_values[] = { + QTextDocument::HtmlResource + , QTextDocument::ImageResource + , QTextDocument::StyleSheetResource + , QTextDocument::UserResource +}; + +static const char * const qtscript_QTextDocument_ResourceType_keys[] = { + "HtmlResource" + , "ImageResource" + , "StyleSheetResource" + , "UserResource" +}; + +static QString qtscript_QTextDocument_ResourceType_toStringHelper(QTextDocument::ResourceType value) +{ + for (int i = 0; i < 4; ++i) { + if (qtscript_QTextDocument_ResourceType_values[i] == value) + return QString::fromLatin1(qtscript_QTextDocument_ResourceType_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QTextDocument_ResourceType_toScriptValue(QScriptEngine *engine, const QTextDocument::ResourceType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextDocument")); + return clazz.property(qtscript_QTextDocument_ResourceType_toStringHelper(value)); +} + +static void qtscript_QTextDocument_ResourceType_fromScriptValue(const QScriptValue &value, QTextDocument::ResourceType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextDocument_ResourceType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 4; ++i) { + if (qtscript_QTextDocument_ResourceType_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ResourceType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextDocument_ResourceType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextDocument::ResourceType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextDocument_ResourceType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextDocument::ResourceType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextDocument_ResourceType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextDocument_ResourceType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextDocument_ResourceType, + qtscript_QTextDocument_ResourceType_valueOf, qtscript_QTextDocument_ResourceType_toString); + qScriptRegisterMetaType(engine, qtscript_QTextDocument_ResourceType_toScriptValue, + qtscript_QTextDocument_ResourceType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextDocument_ResourceType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextDocument_ResourceType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextDocument::Stacks +// + +static const QTextDocument::Stacks qtscript_QTextDocument_Stacks_values[] = { + QTextDocument::UndoStack + , QTextDocument::RedoStack + , QTextDocument::UndoAndRedoStacks +}; + +static const char * const qtscript_QTextDocument_Stacks_keys[] = { + "UndoStack" + , "RedoStack" + , "UndoAndRedoStacks" +}; + +static QString qtscript_QTextDocument_Stacks_toStringHelper(QTextDocument::Stacks value) +{ + if ((value >= QTextDocument::UndoStack) && (value <= QTextDocument::UndoAndRedoStacks)) + return qtscript_QTextDocument_Stacks_keys[static_cast(value)-static_cast(QTextDocument::UndoStack)]; + return QString(); +} + +static QScriptValue qtscript_QTextDocument_Stacks_toScriptValue(QScriptEngine *engine, const QTextDocument::Stacks &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextDocument")); + return clazz.property(qtscript_QTextDocument_Stacks_toStringHelper(value)); +} + +static void qtscript_QTextDocument_Stacks_fromScriptValue(const QScriptValue &value, QTextDocument::Stacks &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextDocument_Stacks(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextDocument::UndoStack) && (arg <= QTextDocument::UndoAndRedoStacks)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Stacks(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextDocument_Stacks_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextDocument::Stacks value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextDocument_Stacks_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextDocument::Stacks value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextDocument_Stacks_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextDocument_Stacks_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextDocument_Stacks, + qtscript_QTextDocument_Stacks_valueOf, qtscript_QTextDocument_Stacks_toString); + qScriptRegisterMetaType(engine, qtscript_QTextDocument_Stacks_toScriptValue, + qtscript_QTextDocument_Stacks_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextDocument_Stacks_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextDocument_Stacks_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextDocument +// + +static QScriptValue qtscript_QTextDocument_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 48; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextDocument* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextDocument.%0(): this object is not a QTextDocument") + .arg(qtscript_QTextDocument_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + QUrl _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVariant _q_arg2 = context->argument(2).toVariant(); + _q_self->addResource(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->adjustSize(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QVector _q_result = _q_self->allFormats(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->availableRedoSteps(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->availableUndoSteps(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QUrl _q_result = _q_self->baseUrl(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QTextBlock _q_result = _q_self->begin(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QChar _q_result = _q_self->characterAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + int _q_result = _q_self->characterCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 0) { + _q_self->clearUndoRedoStacks(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + QTextDocument::Stacks _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->clearUndoRedoStacks(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QTextDocument* _q_result = _q_self->clone(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QTextDocument* _q_result = _q_self->clone(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + Qt::CursorMoveStyle _q_result = _q_self->defaultCursorMoveStyle(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QTextOption _q_result = _q_self->defaultTextOption(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QAbstractTextDocumentLayout* _q_result = _q_self->documentLayout(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->drawContents(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawContents(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QTextBlock _q_result = _q_self->end(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + if (context->argument(0).isRegExp()) { + QRegExp _q_arg0 = context->argument(0).toRegExp(); + QTextCursor _q_result = _q_self->find(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QTextCursor _q_result = _q_self->find(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (context->argument(0).isRegExp() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRegExp _q_arg0 = context->argument(0).toRegExp(); + QTextCursor _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTextCursor _q_result = _q_self->find(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isRegExp() + && context->argument(1).isNumber()) { + QRegExp _q_arg0 = context->argument(0).toRegExp(); + int _q_arg1 = context->argument(1).toInt32(); + QTextCursor _q_result = _q_self->find(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QTextCursor _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTextCursor _q_result = _q_self->find(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + QTextCursor _q_result = _q_self->find(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + if (context->argument(0).isRegExp() + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId >() == context->argument(2).toVariant().userType())) { + QRegExp _q_arg0 = context->argument(0).toRegExp(); + QTextCursor _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QTextCursor _q_result = _q_self->find(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isRegExp() + && context->argument(1).isNumber() + && (qMetaTypeId >() == context->argument(2).toVariant().userType())) { + QRegExp _q_arg0 = context->argument(0).toRegExp(); + int _q_arg1 = context->argument(1).toInt32(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QTextCursor _q_result = _q_self->find(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId >() == context->argument(2).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QTextCursor _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QTextCursor _q_result = _q_self->find(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isNumber() + && (qMetaTypeId >() == context->argument(2).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QTextCursor _q_result = _q_self->find(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 18: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTextBlock _q_result = _q_self->findBlock(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTextBlock _q_result = _q_self->findBlockByLineNumber(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTextBlock _q_result = _q_self->findBlockByNumber(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + QTextBlock _q_result = _q_self->firstBlock(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTextFrame* _q_result = _q_self->frameAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->idealWidth(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isRedoAvailable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isUndoAvailable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + QTextBlock _q_result = _q_self->lastBlock(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 0) { + int _q_result = _q_self->lineCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->markContentsDirty(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 1) { + QTextDocument::MetaInformation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->metaInformation(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTextObject* _q_result = _q_self->object(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 1) { + QTextFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextObject* _q_result = _q_self->objectForFormat(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 0) { + int _q_result = _q_self->pageCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 34: + if (context->argumentCount() == 1) { + QTextCursor* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->redo(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QUrl _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVariant _q_result = _q_self->resource(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 36: + if (context->argumentCount() == 0) { + int _q_result = _q_self->revision(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 37: + if (context->argumentCount() == 0) { + QTextFrame* _q_result = _q_self->rootFrame(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 38: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBaseUrl(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 39: + if (context->argumentCount() == 1) { + Qt::CursorMoveStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDefaultCursorMoveStyle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 1) { + QTextOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDefaultTextOption(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 1) { + QAbstractTextDocumentLayout* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDocumentLayout(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 42: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setHtml(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 43: + if (context->argumentCount() == 2) { + QTextDocument::MetaInformation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setMetaInformation(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 44: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPlainText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 45: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toHtml(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toHtml(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 46: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toPlainText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 47: + if (context->argumentCount() == 1) { + QTextCursor* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->undo(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 48: { + QString result = QString::fromLatin1("QTextDocument"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextDocument_throw_ambiguity_error_helper(context, + qtscript_QTextDocument_function_names[_id+1], + qtscript_QTextDocument_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextDocument_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextDocument(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTextDocument* _q_cpp_result = new QtScriptShell_QTextDocument(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTextDocument*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isQObject()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QTextDocument* _q_cpp_result = new QtScriptShell_QTextDocument(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTextDocument*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QTextDocument* _q_cpp_result = new QtScriptShell_QTextDocument(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTextDocument*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QTextDocument* _q_cpp_result = new QtScriptShell_QTextDocument(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTextDocument*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextDocument_throw_ambiguity_error_helper(context, + qtscript_QTextDocument_function_names[_id], + qtscript_QTextDocument_function_signatures[_id]); +} + +static QScriptValue qtscript_QTextDocument_toScriptValue(QScriptEngine *engine, QTextDocument* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTextDocument_fromScriptValue(const QScriptValue &value, QTextDocument* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTextDocument_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextDocument*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 49; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextDocument_prototype_call, qtscript_QTextDocument_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextDocument_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTextDocument_toScriptValue, + qtscript_QTextDocument_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextDocument_static_call, proto, qtscript_QTextDocument_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("MetaInformation"), + qtscript_create_QTextDocument_MetaInformation_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("FindFlag"), + qtscript_create_QTextDocument_FindFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("FindFlags"), + qtscript_create_QTextDocument_FindFlags_class(engine)); + ctor.setProperty(QString::fromLatin1("ResourceType"), + qtscript_create_QTextDocument_ResourceType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Stacks"), + qtscript_create_QTextDocument_Stacks_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextDocumentFragment.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextDocumentFragment.cpp new file mode 100644 index 00000000..353c8469 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextDocumentFragment.cpp @@ -0,0 +1,222 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QTextDocumentFragment_function_names[] = { + "QTextDocumentFragment" + // static + , "fromHtml" + , "fromPlainText" + // prototype + , "isEmpty" + , "toHtml" + , "toPlainText" + , "toString" +}; + +static const char * const qtscript_QTextDocumentFragment_function_signatures[] = { + "\nQTextCursor range\nQTextDocument document\nQTextDocumentFragment rhs" + // static + , "String html\nString html, QTextDocument resourceProvider" + , "String plainText" + // prototype + , "" + , "QByteArray encoding" + , "" +"" +}; + +static const int qtscript_QTextDocumentFragment_function_lengths[] = { + 1 + // static + , 2 + , 1 + // prototype + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextDocumentFragment_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextDocumentFragment::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextDocumentFragment) +Q_DECLARE_METATYPE(QTextDocumentFragment*) +Q_DECLARE_METATYPE(const QTextDocument*) +Q_DECLARE_METATYPE(QTextCursor) + +// +// QTextDocumentFragment +// + +static QScriptValue qtscript_QTextDocumentFragment_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextDocumentFragment* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextDocumentFragment.%0(): this object is not a QTextDocumentFragment") + .arg(qtscript_QTextDocumentFragment_function_names[_id+3])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toHtml(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->toHtml(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toPlainText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: { + QString result = QString::fromLatin1("QTextDocumentFragment"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextDocumentFragment_throw_ambiguity_error_helper(context, + qtscript_QTextDocumentFragment_function_names[_id+3], + qtscript_QTextDocumentFragment_function_signatures[_id+3]); +} + +static QScriptValue qtscript_QTextDocumentFragment_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextDocumentFragment(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QTextDocumentFragment _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTextCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextDocumentFragment _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + const QTextDocument* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextDocumentFragment _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTextDocumentFragment _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextDocumentFragment _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QTextDocumentFragment _q_result = QTextDocumentFragment::fromHtml(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + const QTextDocument* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTextDocumentFragment _q_result = QTextDocumentFragment::fromHtml(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QTextDocumentFragment _q_result = QTextDocumentFragment::fromPlainText(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextDocumentFragment_throw_ambiguity_error_helper(context, + qtscript_QTextDocumentFragment_function_names[_id], + qtscript_QTextDocumentFragment_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextDocumentFragment_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextDocumentFragment*)0)); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextDocumentFragment_prototype_call, qtscript_QTextDocumentFragment_function_lengths[i+3]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextDocumentFragment_function_names[i+3]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextDocumentFragment_static_call, proto, qtscript_QTextDocumentFragment_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextDocumentFragment_static_call, + qtscript_QTextDocumentFragment_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QTextDocumentFragment_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextDocumentWriter.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextDocumentWriter.cpp new file mode 100644 index 00000000..025c60a5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextDocumentWriter.cpp @@ -0,0 +1,277 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QTextDocumentWriter_function_names[] = { + "QTextDocumentWriter" + // static + , "supportedDocumentFormats" + // prototype + , "codec" + , "device" + , "fileName" + , "format" + , "setCodec" + , "setDevice" + , "setFileName" + , "setFormat" + , "write" + , "toString" +}; + +static const char * const qtscript_QTextDocumentWriter_function_signatures[] = { + "\nQIODevice device, QByteArray format\nString fileName, QByteArray format" + // static + , "" + // prototype + , "" + , "" + , "" + , "" + , "QTextCodec codec" + , "QIODevice device" + , "String fileName" + , "QByteArray format" + , "QTextDocument document\nQTextDocumentFragment fragment" +"" +}; + +static const int qtscript_QTextDocumentWriter_function_lengths[] = { + 2 + // static + , 0 + // prototype + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QTextDocumentWriter_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextDocumentWriter::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextDocumentWriter*) +Q_DECLARE_METATYPE(QTextCodec*) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(const QTextDocument*) +Q_DECLARE_METATYPE(QTextDocumentFragment) + +// +// QTextDocumentWriter +// + +static QScriptValue qtscript_QTextDocumentWriter_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 9; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextDocumentWriter* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextDocumentWriter.%0(): this object is not a QTextDocumentWriter") + .arg(qtscript_QTextDocumentWriter_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QTextCodec* _q_result = _q_self->codec(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QIODevice* _q_result = _q_self->device(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->fileName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->format(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QTextCodec* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCodec(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDevice(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setFileName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + const QTextDocument* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->write(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTextDocumentFragment _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->write(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 9: { + QString result = QString::fromLatin1("QTextDocumentWriter"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextDocumentWriter_throw_ambiguity_error_helper(context, + qtscript_QTextDocumentWriter_function_names[_id+2], + qtscript_QTextDocumentWriter_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QTextDocumentWriter_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextDocumentWriter(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QTextDocumentWriter* _q_cpp_result = new QTextDocumentWriter(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QTextDocumentWriter* _q_cpp_result = new QTextDocumentWriter(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTextDocumentWriter* _q_cpp_result = new QTextDocumentWriter(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTextDocumentWriter* _q_cpp_result = new QTextDocumentWriter(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + case 1: + if (context->argumentCount() == 0) { + QList _q_result = QTextDocumentWriter::supportedDocumentFormats(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextDocumentWriter_throw_ambiguity_error_helper(context, + qtscript_QTextDocumentWriter_function_names[_id], + qtscript_QTextDocumentWriter_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextDocumentWriter_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextDocumentWriter*)0)); + for (int i = 0; i < 10; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextDocumentWriter_prototype_call, qtscript_QTextDocumentWriter_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextDocumentWriter_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextDocumentWriter_static_call, proto, qtscript_QTextDocumentWriter_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextDocumentWriter_static_call, + qtscript_QTextDocumentWriter_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QTextDocumentWriter_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextFormat.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextFormat.cpp new file mode 100644 index 00000000..c465f260 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextFormat.cpp @@ -0,0 +1,779 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QTextFormat_function_names[] = { + "QTextFormat" + // static + // prototype + , "background" + , "boolProperty" + , "brushProperty" + , "clearBackground" + , "clearForeground" + , "clearProperty" + , "colorProperty" + , "doubleProperty" + , "foreground" + , "hasProperty" + , "intProperty" + , "isBlockFormat" + , "isCharFormat" + , "isEmpty" + , "isFrameFormat" + , "isImageFormat" + , "isListFormat" + , "isTableCellFormat" + , "isTableFormat" + , "isValid" + , "layoutDirection" + , "lengthProperty" + , "lengthVectorProperty" + , "merge" + , "objectIndex" + , "objectType" + , "equals" + , "penProperty" + , "properties" + , "property" + , "propertyCount" + , "setBackground" + , "setForeground" + , "setLayoutDirection" + , "setLengthVectorProperty" + , "setObjectIndex" + , "setObjectType" + , "setProperty" + , "stringProperty" + , "swap" + , "toBlockFormat" + , "toCharFormat" + , "toFrameFormat" + , "toImageFormat" + , "toListFormat" + , "toTableCellFormat" + , "toTableFormat" + , "type" + , "toString" +}; + +static const char * const qtscript_QTextFormat_function_signatures[] = { + "\nQTextFormat rhs\nint type" + // static + // prototype + , "" + , "int propertyId" + , "int propertyId" + , "" + , "" + , "int propertyId" + , "int propertyId" + , "int propertyId" + , "" + , "int propertyId" + , "int propertyId" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "int propertyId" + , "int propertyId" + , "QTextFormat other" + , "" + , "" + , "QTextFormat rhs" + , "int propertyId" + , "" + , "int propertyId" + , "" + , "QBrush brush" + , "QBrush brush" + , "LayoutDirection direction" + , "int propertyId, List lengths" + , "int object" + , "int type" + , "int propertyId, Object value" + , "int propertyId" + , "QTextFormat other" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QTextFormat_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 1 + , 0 + , 0 + , 1 + , 1 + , 1 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 0 + , 0 + , 1 + , 1 + , 0 + , 1 + , 0 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 2 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextFormat_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextFormat::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextFormat*) +Q_DECLARE_METATYPE(QTextFormat::FormatType) +Q_DECLARE_METATYPE(Qt::LayoutDirection) +Q_DECLARE_METATYPE(QVector) +template <> \ +struct QMetaTypeId< QMap > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QMap >("QMap")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(QTextBlockFormat) +Q_DECLARE_METATYPE(QTextCharFormat) +Q_DECLARE_METATYPE(QTextFrameFormat) +Q_DECLARE_METATYPE(QTextImageFormat) +Q_DECLARE_METATYPE(QTextListFormat) +Q_DECLARE_METATYPE(QTextTableCellFormat) +Q_DECLARE_METATYPE(QTextTableFormat) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTextFormat::FormatType +// + +static const QTextFormat::FormatType qtscript_QTextFormat_FormatType_values[] = { + QTextFormat::InvalidFormat + , QTextFormat::BlockFormat + , QTextFormat::CharFormat + , QTextFormat::ListFormat + , QTextFormat::TableFormat + , QTextFormat::FrameFormat + , QTextFormat::UserFormat +}; + +static const char * const qtscript_QTextFormat_FormatType_keys[] = { + "InvalidFormat" + , "BlockFormat" + , "CharFormat" + , "ListFormat" + , "TableFormat" + , "FrameFormat" + , "UserFormat" +}; + +static QString qtscript_QTextFormat_FormatType_toStringHelper(QTextFormat::FormatType value) +{ + for (int i = 0; i < 7; ++i) { + if (qtscript_QTextFormat_FormatType_values[i] == value) + return QString::fromLatin1(qtscript_QTextFormat_FormatType_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QTextFormat_FormatType_toScriptValue(QScriptEngine *engine, const QTextFormat::FormatType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextFormat")); + return clazz.property(qtscript_QTextFormat_FormatType_toStringHelper(value)); +} + +static void qtscript_QTextFormat_FormatType_fromScriptValue(const QScriptValue &value, QTextFormat::FormatType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextFormat_FormatType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 7; ++i) { + if (qtscript_QTextFormat_FormatType_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("FormatType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextFormat_FormatType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextFormat::FormatType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextFormat_FormatType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextFormat::FormatType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextFormat_FormatType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextFormat_FormatType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextFormat_FormatType, + qtscript_QTextFormat_FormatType_valueOf, qtscript_QTextFormat_FormatType_toString); + qScriptRegisterMetaType(engine, qtscript_QTextFormat_FormatType_toScriptValue, + qtscript_QTextFormat_FormatType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 7; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextFormat_FormatType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextFormat_FormatType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextFormat +// + +static QScriptValue qtscript_QTextFormat_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 48; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextFormat* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextFormat.%0(): this object is not a QTextFormat") + .arg(qtscript_QTextFormat_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QBrush _q_result = _q_self->background(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->boolProperty(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QBrush _q_result = _q_self->brushProperty(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->clearBackground(); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + _q_self->clearForeground(); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->clearProperty(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QColor _q_result = _q_self->colorProperty(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_result = _q_self->doubleProperty(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QBrush _q_result = _q_self->foreground(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->hasProperty(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->intProperty(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isBlockFormat(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isCharFormat(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isFrameFormat(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isImageFormat(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isListFormat(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isTableCellFormat(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isTableFormat(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + Qt::LayoutDirection _q_result = _q_self->layoutDirection(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTextLength _q_result = _q_self->lengthProperty(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QVector _q_result = _q_self->lengthVectorProperty(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QTextFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->merge(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 0) { + int _q_result = _q_self->objectIndex(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + int _q_result = _q_self->objectType(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QTextFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QPen _q_result = _q_self->penProperty(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 0) { + QMap _q_result = _q_self->properties(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_result = _q_self->property(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 0) { + int _q_result = _q_self->propertyCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 1) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBackground(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setForeground(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 1) { + Qt::LayoutDirection _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLayoutDirection(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QVector _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + _q_self->setProperty(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setObjectIndex(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setObjectType(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setProperty(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->stringProperty(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 1) { + QTextFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 0) { + QTextBlockFormat _q_result = _q_self->toBlockFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 41: + if (context->argumentCount() == 0) { + QTextCharFormat _q_result = _q_self->toCharFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 42: + if (context->argumentCount() == 0) { + QTextFrameFormat _q_result = _q_self->toFrameFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 43: + if (context->argumentCount() == 0) { + QTextImageFormat _q_result = _q_self->toImageFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 44: + if (context->argumentCount() == 0) { + QTextListFormat _q_result = _q_self->toListFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 45: + if (context->argumentCount() == 0) { + QTextTableCellFormat _q_result = _q_self->toTableCellFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 46: + if (context->argumentCount() == 0) { + QTextTableFormat _q_result = _q_self->toTableFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 47: + if (context->argumentCount() == 0) { + int _q_result = _q_self->type(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 48: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextFormat_throw_ambiguity_error_helper(context, + qtscript_QTextFormat_function_names[_id+1], + qtscript_QTextFormat_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextFormat_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextFormat(): Did you forget to construct with 'new'?")); + } + + if ((context->argumentCount() == 1) && (qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTextFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextFormat _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + + if (context->argumentCount() == 0) { + QTextFormat _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTextFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextFormat _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QTextFormat _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextFormat_throw_ambiguity_error_helper(context, + qtscript_QTextFormat_function_names[_id], + qtscript_QTextFormat_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextFormat_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextFormat*)0)); + for (int i = 0; i < 49; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextFormat_prototype_call, qtscript_QTextFormat_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextFormat_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextFormat_static_call, proto, qtscript_QTextFormat_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("FormatType"), + qtscript_create_QTextFormat_FormatType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextFragment.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextFragment.cpp new file mode 100644 index 00000000..e7340220 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextFragment.cpp @@ -0,0 +1,230 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QTextFragment_function_names[] = { + "QTextFragment" + // static + // prototype + , "charFormat" + , "charFormatIndex" + , "contains" + , "isValid" + , "length" + , "equals" + , "operator_less" + , "position" + , "text" + , "toString" +}; + +static const char * const qtscript_QTextFragment_function_signatures[] = { + "\nQTextFragment o" + // static + // prototype + , "" + , "" + , "int position" + , "" + , "" + , "QTextFragment o" + , "QTextFragment o" + , "" + , "" +"" +}; + +static const int qtscript_QTextFragment_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextFragment_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextFragment::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextFragment) +Q_DECLARE_METATYPE(QTextFragment*) +Q_DECLARE_METATYPE(QTextCharFormat) + +// +// QTextFragment +// + +static QScriptValue qtscript_QTextFragment_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 9; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextFragment* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextFragment.%0(): this object is not a QTextFragment") + .arg(qtscript_QTextFragment_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QTextCharFormat _q_result = _q_self->charFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->charFormatIndex(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->length(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QTextFragment _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QTextFragment _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator<(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->position(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->text(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: { + QString result = QString::fromLatin1("QTextFragment"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextFragment_throw_ambiguity_error_helper(context, + qtscript_QTextFragment_function_names[_id+1], + qtscript_QTextFragment_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextFragment_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextFragment(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QTextFragment _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QTextFragment _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextFragment _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextFragment_throw_ambiguity_error_helper(context, + qtscript_QTextFragment_function_names[_id], + qtscript_QTextFragment_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextFragment_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextFragment*)0)); + for (int i = 0; i < 10; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextFragment_prototype_call, qtscript_QTextFragment_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextFragment_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextFragment_static_call, proto, qtscript_QTextFragment_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextFrame.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextFrame.cpp new file mode 100644 index 00000000..97d9335c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextFrame.cpp @@ -0,0 +1,261 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextFrame.h" + +static const char * const qtscript_QTextFrame_function_names[] = { + "QTextFrame" + // static + // prototype + , "begin" + , "childFrames" + , "end" + , "firstCursorPosition" + , "firstPosition" + , "frameFormat" + , "lastCursorPosition" + , "lastPosition" + , "parentFrame" + , "setFrameFormat" + , "toString" +}; + +static const char * const qtscript_QTextFrame_function_signatures[] = { + "QTextDocument doc" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QTextFrameFormat format" +"" +}; + +static const int qtscript_QTextFrame_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QTextFrame_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextFrame::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextFrame*) +Q_DECLARE_METATYPE(QtScriptShell_QTextFrame*) +Q_DECLARE_METATYPE(QTextFrame::iterator) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QTextCursor) +Q_DECLARE_METATYPE(QTextFrameFormat) +Q_DECLARE_METATYPE(QTextDocument*) +Q_DECLARE_METATYPE(QTextObject*) + +// +// QTextFrame +// + +static QScriptValue qtscript_QTextFrame_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 10; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextFrame* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextFrame.%0(): this object is not a QTextFrame") + .arg(qtscript_QTextFrame_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QTextFrame::iterator _q_result = _q_self->begin(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->childFrames(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QTextFrame::iterator _q_result = _q_self->end(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QTextCursor _q_result = _q_self->firstCursorPosition(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->firstPosition(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QTextFrameFormat _q_result = _q_self->frameFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QTextCursor _q_result = _q_self->lastCursorPosition(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->lastPosition(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QTextFrame* _q_result = _q_self->parentFrame(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QTextFrameFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFrameFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: { + QString result = QString::fromLatin1("QTextFrame"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextFrame_throw_ambiguity_error_helper(context, + qtscript_QTextFrame_function_names[_id+1], + qtscript_QTextFrame_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextFrame_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextFrame(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QTextDocument* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTextFrame* _q_cpp_result = new QtScriptShell_QTextFrame(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTextFrame*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextFrame_throw_ambiguity_error_helper(context, + qtscript_QTextFrame_function_names[_id], + qtscript_QTextFrame_function_signatures[_id]); +} + +static QScriptValue qtscript_QTextFrame_toScriptValue(QScriptEngine *engine, QTextFrame* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTextFrame_fromScriptValue(const QScriptValue &value, QTextFrame* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTextFrame_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextFrame*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 11; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextFrame_prototype_call, qtscript_QTextFrame_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextFrame_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTextFrame_toScriptValue, + qtscript_QTextFrame_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextFrame_static_call, proto, qtscript_QTextFrame_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextFrameFormat.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextFrameFormat.cpp new file mode 100644 index 00000000..c941133b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextFrameFormat.cpp @@ -0,0 +1,601 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextFrameFormat.h" + +static const char * const qtscript_QTextFrameFormat_function_names[] = { + "QTextFrameFormat" + // static + // prototype + , "border" + , "borderBrush" + , "borderStyle" + , "bottomMargin" + , "height" + , "leftMargin" + , "margin" + , "padding" + , "pageBreakPolicy" + , "position" + , "rightMargin" + , "setBorder" + , "setBorderBrush" + , "setBorderStyle" + , "setBottomMargin" + , "setHeight" + , "setLeftMargin" + , "setMargin" + , "setPadding" + , "setPageBreakPolicy" + , "setPosition" + , "setRightMargin" + , "setTopMargin" + , "setWidth" + , "topMargin" + , "width" + , "toString" +}; + +static const char * const qtscript_QTextFrameFormat_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "qreal border" + , "QBrush brush" + , "BorderStyle style" + , "qreal margin" + , "QTextLength height\nqreal height" + , "qreal margin" + , "qreal margin" + , "qreal padding" + , "PageBreakFlags flags" + , "Position f" + , "qreal margin" + , "qreal margin" + , "QTextLength length\nqreal width" + , "" + , "" +"" +}; + +static const int qtscript_QTextFrameFormat_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextFrameFormat_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextFrameFormat::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextFrameFormat) +Q_DECLARE_METATYPE(QTextFrameFormat*) +Q_DECLARE_METATYPE(QtScriptShell_QTextFrameFormat) +Q_DECLARE_METATYPE(QtScriptShell_QTextFrameFormat*) +Q_DECLARE_METATYPE(QTextFrameFormat::BorderStyle) +Q_DECLARE_METATYPE(QTextFrameFormat::Position) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTextFormat*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTextFrameFormat::BorderStyle +// + +static const QTextFrameFormat::BorderStyle qtscript_QTextFrameFormat_BorderStyle_values[] = { + QTextFrameFormat::BorderStyle_None + , QTextFrameFormat::BorderStyle_Dotted + , QTextFrameFormat::BorderStyle_Dashed + , QTextFrameFormat::BorderStyle_Solid + , QTextFrameFormat::BorderStyle_Double + , QTextFrameFormat::BorderStyle_DotDash + , QTextFrameFormat::BorderStyle_DotDotDash + , QTextFrameFormat::BorderStyle_Groove + , QTextFrameFormat::BorderStyle_Ridge + , QTextFrameFormat::BorderStyle_Inset + , QTextFrameFormat::BorderStyle_Outset +}; + +static const char * const qtscript_QTextFrameFormat_BorderStyle_keys[] = { + "BorderStyle_None" + , "BorderStyle_Dotted" + , "BorderStyle_Dashed" + , "BorderStyle_Solid" + , "BorderStyle_Double" + , "BorderStyle_DotDash" + , "BorderStyle_DotDotDash" + , "BorderStyle_Groove" + , "BorderStyle_Ridge" + , "BorderStyle_Inset" + , "BorderStyle_Outset" +}; + +static QString qtscript_QTextFrameFormat_BorderStyle_toStringHelper(QTextFrameFormat::BorderStyle value) +{ + if ((value >= QTextFrameFormat::BorderStyle_None) && (value <= QTextFrameFormat::BorderStyle_Outset)) + return qtscript_QTextFrameFormat_BorderStyle_keys[static_cast(value)-static_cast(QTextFrameFormat::BorderStyle_None)]; + return QString(); +} + +static QScriptValue qtscript_QTextFrameFormat_BorderStyle_toScriptValue(QScriptEngine *engine, const QTextFrameFormat::BorderStyle &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextFrameFormat")); + return clazz.property(qtscript_QTextFrameFormat_BorderStyle_toStringHelper(value)); +} + +static void qtscript_QTextFrameFormat_BorderStyle_fromScriptValue(const QScriptValue &value, QTextFrameFormat::BorderStyle &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextFrameFormat_BorderStyle(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextFrameFormat::BorderStyle_None) && (arg <= QTextFrameFormat::BorderStyle_Outset)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("BorderStyle(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextFrameFormat_BorderStyle_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextFrameFormat::BorderStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextFrameFormat_BorderStyle_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextFrameFormat::BorderStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextFrameFormat_BorderStyle_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextFrameFormat_BorderStyle_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextFrameFormat_BorderStyle, + qtscript_QTextFrameFormat_BorderStyle_valueOf, qtscript_QTextFrameFormat_BorderStyle_toString); + qScriptRegisterMetaType(engine, qtscript_QTextFrameFormat_BorderStyle_toScriptValue, + qtscript_QTextFrameFormat_BorderStyle_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 11; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextFrameFormat_BorderStyle_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextFrameFormat_BorderStyle_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextFrameFormat::Position +// + +static const QTextFrameFormat::Position qtscript_QTextFrameFormat_Position_values[] = { + QTextFrameFormat::InFlow + , QTextFrameFormat::FloatLeft + , QTextFrameFormat::FloatRight +}; + +static const char * const qtscript_QTextFrameFormat_Position_keys[] = { + "InFlow" + , "FloatLeft" + , "FloatRight" +}; + +static QString qtscript_QTextFrameFormat_Position_toStringHelper(QTextFrameFormat::Position value) +{ + if ((value >= QTextFrameFormat::InFlow) && (value <= QTextFrameFormat::FloatRight)) + return qtscript_QTextFrameFormat_Position_keys[static_cast(value)-static_cast(QTextFrameFormat::InFlow)]; + return QString(); +} + +static QScriptValue qtscript_QTextFrameFormat_Position_toScriptValue(QScriptEngine *engine, const QTextFrameFormat::Position &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextFrameFormat")); + return clazz.property(qtscript_QTextFrameFormat_Position_toStringHelper(value)); +} + +static void qtscript_QTextFrameFormat_Position_fromScriptValue(const QScriptValue &value, QTextFrameFormat::Position &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextFrameFormat_Position(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextFrameFormat::InFlow) && (arg <= QTextFrameFormat::FloatRight)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Position(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextFrameFormat_Position_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextFrameFormat::Position value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextFrameFormat_Position_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextFrameFormat::Position value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextFrameFormat_Position_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextFrameFormat_Position_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextFrameFormat_Position, + qtscript_QTextFrameFormat_Position_valueOf, qtscript_QTextFrameFormat_Position_toString); + qScriptRegisterMetaType(engine, qtscript_QTextFrameFormat_Position_toScriptValue, + qtscript_QTextFrameFormat_Position_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextFrameFormat_Position_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextFrameFormat_Position_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextFrameFormat +// + +static QScriptValue qtscript_QTextFrameFormat_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 26; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextFrameFormat* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextFrameFormat.%0(): this object is not a QTextFrameFormat") + .arg(qtscript_QTextFrameFormat_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->border(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QBrush _q_result = _q_self->borderBrush(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QTextFrameFormat::BorderStyle _q_result = _q_self->borderStyle(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->bottomMargin(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QTextLength _q_result = _q_self->height(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->leftMargin(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->margin(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->padding(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->pageBreakPolicy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QTextFrameFormat::Position _q_result = _q_self->position(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->rightMargin(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBorder(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBorderBrush(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QTextFrameFormat::BorderStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBorderStyle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBottomMargin(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTextLength _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setHeight(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setHeight(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 16: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLeftMargin(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMargin(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPadding(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setPageBreakPolicy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QTextFrameFormat::Position _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPosition(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRightMargin(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTopMargin(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTextLength _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWidth(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 24: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->topMargin(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + QTextLength _q_result = _q_self->width(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: { + QString result = QString::fromLatin1("QTextFrameFormat"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextFrameFormat_throw_ambiguity_error_helper(context, + qtscript_QTextFrameFormat_function_names[_id+1], + qtscript_QTextFrameFormat_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextFrameFormat_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextFrameFormat(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTextFrameFormat _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTextFrameFormat)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextFrameFormat_throw_ambiguity_error_helper(context, + qtscript_QTextFrameFormat_function_names[_id], + qtscript_QTextFrameFormat_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextFrameFormat_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextFrameFormat*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 27; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextFrameFormat_prototype_call, qtscript_QTextFrameFormat_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextFrameFormat_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextFrameFormat_static_call, proto, qtscript_QTextFrameFormat_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("BorderStyle"), + qtscript_create_QTextFrameFormat_BorderStyle_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Position"), + qtscript_create_QTextFrameFormat_Position_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextImageFormat.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextImageFormat.cpp new file mode 100644 index 00000000..ea623e3d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextImageFormat.cpp @@ -0,0 +1,206 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextImageFormat.h" + +static const char * const qtscript_QTextImageFormat_function_names[] = { + "QTextImageFormat" + // static + // prototype + , "height" + , "name" + , "setHeight" + , "setName" + , "setWidth" + , "width" + , "toString" +}; + +static const char * const qtscript_QTextImageFormat_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "qreal height" + , "String name" + , "qreal width" + , "" +"" +}; + +static const int qtscript_QTextImageFormat_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextImageFormat_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextImageFormat::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextImageFormat) +Q_DECLARE_METATYPE(QTextImageFormat*) +Q_DECLARE_METATYPE(QtScriptShell_QTextImageFormat) +Q_DECLARE_METATYPE(QtScriptShell_QTextImageFormat*) +Q_DECLARE_METATYPE(QTextCharFormat*) + +// +// QTextImageFormat +// + +static QScriptValue qtscript_QTextImageFormat_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextImageFormat* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextImageFormat.%0(): this object is not a QTextImageFormat") + .arg(qtscript_QTextImageFormat_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->height(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->name(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setHeight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->width(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: { + QString result = QString::fromLatin1("QTextImageFormat"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextImageFormat_throw_ambiguity_error_helper(context, + qtscript_QTextImageFormat_function_names[_id+1], + qtscript_QTextImageFormat_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextImageFormat_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextImageFormat(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTextImageFormat _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTextImageFormat)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextImageFormat_throw_ambiguity_error_helper(context, + qtscript_QTextImageFormat_function_names[_id], + qtscript_QTextImageFormat_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextImageFormat_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextImageFormat*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextImageFormat_prototype_call, qtscript_QTextImageFormat_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextImageFormat_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextImageFormat_static_call, proto, qtscript_QTextImageFormat_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextInlineObject.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextInlineObject.cpp new file mode 100644 index 00000000..9f58f9c8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextInlineObject.cpp @@ -0,0 +1,265 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QTextInlineObject_function_names[] = { + "QTextInlineObject" + // static + // prototype + , "ascent" + , "descent" + , "format" + , "formatIndex" + , "height" + , "isValid" + , "rect" + , "setAscent" + , "setDescent" + , "setWidth" + , "textDirection" + , "textPosition" + , "width" + , "toString" +}; + +static const char * const qtscript_QTextInlineObject_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "qreal a" + , "qreal d" + , "qreal w" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QTextInlineObject_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextInlineObject_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextInlineObject::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextInlineObject) +Q_DECLARE_METATYPE(QTextInlineObject*) +Q_DECLARE_METATYPE(Qt::LayoutDirection) + +// +// QTextInlineObject +// + +static QScriptValue qtscript_QTextInlineObject_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 13; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextInlineObject* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextInlineObject.%0(): this object is not a QTextInlineObject") + .arg(qtscript_QTextInlineObject_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->ascent(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->descent(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QTextFormat _q_result = _q_self->format(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->formatIndex(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->height(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->rect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setAscent(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDescent(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 0) { + Qt::LayoutDirection _q_result = _q_self->textDirection(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + int _q_result = _q_self->textPosition(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->width(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: { + QString result = QString::fromLatin1("QTextInlineObject"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextInlineObject_throw_ambiguity_error_helper(context, + qtscript_QTextInlineObject_function_names[_id+1], + qtscript_QTextInlineObject_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextInlineObject_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextInlineObject(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QTextInlineObject _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextInlineObject_throw_ambiguity_error_helper(context, + qtscript_QTextInlineObject_function_names[_id], + qtscript_QTextInlineObject_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextInlineObject_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextInlineObject*)0)); + for (int i = 0; i < 14; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextInlineObject_prototype_call, qtscript_QTextInlineObject_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextInlineObject_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextInlineObject_static_call, proto, qtscript_QTextInlineObject_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextItem.cpp new file mode 100644 index 00000000..2bc01702 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextItem.cpp @@ -0,0 +1,382 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +#include "qtscriptshell_QTextItem.h" + +static const char * const qtscript_QTextItem_function_names[] = { + "QTextItem" + // static + // prototype + , "ascent" + , "descent" + , "font" + , "renderFlags" + , "text" + , "width" + , "toString" +}; + +static const char * const qtscript_QTextItem_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QTextItem_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextItem*) +Q_DECLARE_METATYPE(QtScriptShell_QTextItem*) +Q_DECLARE_METATYPE(QTextItem::RenderFlag) +Q_DECLARE_METATYPE(QFlags) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QTextItem::RenderFlag +// + +static const QTextItem::RenderFlag qtscript_QTextItem_RenderFlag_values[] = { + QTextItem::Dummy + , QTextItem::RightToLeft + , QTextItem::Overline + , QTextItem::Underline + , QTextItem::StrikeOut +}; + +static const char * const qtscript_QTextItem_RenderFlag_keys[] = { + "Dummy" + , "RightToLeft" + , "Overline" + , "Underline" + , "StrikeOut" +}; + +static QString qtscript_QTextItem_RenderFlag_toStringHelper(QTextItem::RenderFlag value) +{ + for (int i = 0; i < 5; ++i) { + if (qtscript_QTextItem_RenderFlag_values[i] == value) + return QString::fromLatin1(qtscript_QTextItem_RenderFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QTextItem_RenderFlag_toScriptValue(QScriptEngine *engine, const QTextItem::RenderFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextItem")); + return clazz.property(qtscript_QTextItem_RenderFlag_toStringHelper(value)); +} + +static void qtscript_QTextItem_RenderFlag_fromScriptValue(const QScriptValue &value, QTextItem::RenderFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextItem_RenderFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 5; ++i) { + if (qtscript_QTextItem_RenderFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("RenderFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextItem_RenderFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextItem::RenderFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextItem_RenderFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextItem::RenderFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextItem_RenderFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextItem_RenderFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextItem_RenderFlag, + qtscript_QTextItem_RenderFlag_valueOf, qtscript_QTextItem_RenderFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QTextItem_RenderFlag_toScriptValue, + qtscript_QTextItem_RenderFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextItem_RenderFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextItem_RenderFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextItem::RenderFlags +// + +static QScriptValue qtscript_QTextItem_RenderFlags_toScriptValue(QScriptEngine *engine, const QTextItem::RenderFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QTextItem_RenderFlags_fromScriptValue(const QScriptValue &value, QTextItem::RenderFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QTextItem_RenderFlags(QScriptContext *context, QScriptEngine *engine) +{ + QTextItem::RenderFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("RenderFlags(): argument %0 is not of type RenderFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QTextItem_RenderFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextItem::RenderFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextItem_RenderFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextItem::RenderFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 5; ++i) { + if ((value & qtscript_QTextItem_RenderFlag_values[i]) == qtscript_QTextItem_RenderFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QTextItem_RenderFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QTextItem_RenderFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QTextItem_RenderFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QTextItem_RenderFlags, qtscript_QTextItem_RenderFlags_valueOf, + qtscript_QTextItem_RenderFlags_toString, qtscript_QTextItem_RenderFlags_equals); + qScriptRegisterMetaType(engine, qtscript_QTextItem_RenderFlags_toScriptValue, + qtscript_QTextItem_RenderFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QTextItem +// + +static QScriptValue qtscript_QTextItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextItem.%0(): this object is not a QTextItem") + .arg(qtscript_QTextItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->ascent(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->descent(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QFont _q_result = _q_self->font(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->renderFlags(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->text(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->width(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: { + QString result = QString::fromLatin1("QTextItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextItem_throw_ambiguity_error_helper(context, + qtscript_QTextItem_function_names[_id+1], + qtscript_QTextItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTextItem* _q_cpp_result = new QtScriptShell_QTextItem(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTextItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextItem_throw_ambiguity_error_helper(context, + qtscript_QTextItem_function_names[_id], + qtscript_QTextItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextItem*)0)); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextItem_prototype_call, qtscript_QTextItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextItem_static_call, proto, qtscript_QTextItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("RenderFlag"), + qtscript_create_QTextItem_RenderFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("RenderFlags"), + qtscript_create_QTextItem_RenderFlags_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextLayout.cpp new file mode 100644 index 00000000..f2453ba8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextLayout.cpp @@ -0,0 +1,702 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QTextLayout_function_names[] = { + "QTextLayout" + // static + // prototype + , "additionalFormats" + , "beginLayout" + , "boundingRect" + , "cacheEnabled" + , "clearAdditionalFormats" + , "clearFormats" + , "clearLayout" + , "createLine" + , "cursorMoveStyle" + , "draw" + , "drawCursor" + , "endLayout" + , "font" + , "formats" + , "isValidCursorPosition" + , "leftCursorPosition" + , "lineAt" + , "lineCount" + , "lineForTextPosition" + , "maximumWidth" + , "minimumWidth" + , "nextCursorPosition" + , "position" + , "preeditAreaPosition" + , "preeditAreaText" + , "previousCursorPosition" + , "rightCursorPosition" + , "setAdditionalFormats" + , "setCacheEnabled" + , "setCursorMoveStyle" + , "setFlags" + , "setFont" + , "setFormats" + , "setPosition" + , "setPreeditArea" + , "setText" + , "setTextOption" + , "text" + , "textOption" + , "toString" +}; + +static const char * const qtscript_QTextLayout_function_signatures[] = { + "\nString text\nString text, QFont font, QPaintDevice paintdevice\nQTextBlock b" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QPainter p, QPointF pos, List selections, QRectF clip" + , "QPainter p, QPointF pos, int cursorPosition\nQPainter p, QPointF pos, int cursorPosition, int width" + , "" + , "" + , "" + , "int pos" + , "int oldPos" + , "int i" + , "" + , "int pos" + , "" + , "" + , "int oldPos, CursorMode mode" + , "" + , "" + , "" + , "int oldPos, CursorMode mode" + , "int oldPos" + , "List overrides" + , "bool enable" + , "CursorMoveStyle style" + , "int flags" + , "QFont f" + , "List overrides" + , "QPointF p" + , "int position, String text" + , "String string" + , "QTextOption option" + , "" + , "" +"" +}; + +static const int qtscript_QTextLayout_function_lengths[] = { + 3 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 4 + , 4 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 0 + , 1 + , 0 + , 0 + , 2 + , 0 + , 0 + , 0 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextLayout_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextLayout::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextLayout*) +Q_DECLARE_METATYPE(QTextLayout::CursorMode) +Q_DECLARE_METATYPE(QTextLayout::FormatRange) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QTextLine) +Q_DECLARE_METATYPE(Qt::CursorMoveStyle) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QTextOption) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QTextBlock) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTextLayout::CursorMode +// + +static const QTextLayout::CursorMode qtscript_QTextLayout_CursorMode_values[] = { + QTextLayout::SkipCharacters + , QTextLayout::SkipWords +}; + +static const char * const qtscript_QTextLayout_CursorMode_keys[] = { + "SkipCharacters" + , "SkipWords" +}; + +static QString qtscript_QTextLayout_CursorMode_toStringHelper(QTextLayout::CursorMode value) +{ + if ((value >= QTextLayout::SkipCharacters) && (value <= QTextLayout::SkipWords)) + return qtscript_QTextLayout_CursorMode_keys[static_cast(value)-static_cast(QTextLayout::SkipCharacters)]; + return QString(); +} + +static QScriptValue qtscript_QTextLayout_CursorMode_toScriptValue(QScriptEngine *engine, const QTextLayout::CursorMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextLayout")); + return clazz.property(qtscript_QTextLayout_CursorMode_toStringHelper(value)); +} + +static void qtscript_QTextLayout_CursorMode_fromScriptValue(const QScriptValue &value, QTextLayout::CursorMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextLayout_CursorMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextLayout::SkipCharacters) && (arg <= QTextLayout::SkipWords)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("CursorMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextLayout_CursorMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextLayout::CursorMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextLayout_CursorMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextLayout::CursorMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextLayout_CursorMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextLayout_CursorMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextLayout_CursorMode, + qtscript_QTextLayout_CursorMode_valueOf, qtscript_QTextLayout_CursorMode_toString); + qScriptRegisterMetaType(engine, qtscript_QTextLayout_CursorMode_toScriptValue, + qtscript_QTextLayout_CursorMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextLayout_CursorMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextLayout_CursorMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextLayout +// + +static QScriptValue qtscript_QTextLayout_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 39; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextLayout* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextLayout.%0(): this object is not a QTextLayout") + .arg(qtscript_QTextLayout_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->additionalFormats(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->beginLayout(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->boundingRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->cacheEnabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + _q_self->clearAdditionalFormats(); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + _q_self->clearFormats(); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 0) { + _q_self->clearLayout(); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QTextLine _q_result = _q_self->createLine(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + Qt::CursorMoveStyle _q_result = _q_self->cursorMoveStyle(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 3) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVector _q_arg2; + qScriptValueToSequence(context->argument(2), _q_arg2); + _q_self->draw(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVector _q_arg2; + qScriptValueToSequence(context->argument(2), _q_arg2); + QRectF _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->draw(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 3) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->drawCursor(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->drawCursor(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + _q_self->endLayout(); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QFont _q_result = _q_self->font(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QVector _q_result = _q_self->formats(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->isValidCursorPosition(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->leftCursorPosition(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTextLine _q_result = _q_self->lineAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + int _q_result = _q_self->lineCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTextLine _q_result = _q_self->lineForTextPosition(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->maximumWidth(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->minimumWidth(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->nextCursorPosition(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QTextLayout::CursorMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_result = _q_self->nextCursorPosition(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->position(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + int _q_result = _q_self->preeditAreaPosition(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->preeditAreaText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->previousCursorPosition(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QTextLayout::CursorMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_result = _q_self->previousCursorPosition(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->rightCursorPosition(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setAdditionalFormats(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setCacheEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 1) { + Qt::CursorMoveStyle _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCursorMoveStyle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setFlags(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFont(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setFormats(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPosition(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setPreeditArea(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + QTextOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTextOption(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->text(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 38: + if (context->argumentCount() == 0) { + const QTextOption& _q_result = _q_self->textOption(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 39: { + QString result = QString::fromLatin1("QTextLayout"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextLayout_throw_ambiguity_error_helper(context, + qtscript_QTextLayout_function_names[_id+1], + qtscript_QTextLayout_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextLayout_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextLayout(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QTextLayout* _q_cpp_result = new QTextLayout(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QTextLayout* _q_cpp_result = new QTextLayout(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTextBlock _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextLayout* _q_cpp_result = new QTextLayout(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QFont _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTextLayout* _q_cpp_result = new QTextLayout(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QFont _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPaintDevice* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QTextLayout* _q_cpp_result = new QTextLayout(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextLayout_throw_ambiguity_error_helper(context, + qtscript_QTextLayout_function_names[_id], + qtscript_QTextLayout_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextLayout_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextLayout*)0)); + for (int i = 0; i < 40; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextLayout_prototype_call, qtscript_QTextLayout_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextLayout_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextLayout_static_call, proto, qtscript_QTextLayout_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("CursorMode"), + qtscript_create_QTextLayout_CursorMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextLength.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextLength.cpp new file mode 100644 index 00000000..b40dd3b1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextLength.cpp @@ -0,0 +1,265 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QTextLength_function_names[] = { + "QTextLength" + // static + // prototype + , "equals" + , "rawValue" + , "type" + , "value" + , "toString" +}; + +static const char * const qtscript_QTextLength_function_signatures[] = { + "\nType type, qreal value" + // static + // prototype + , "QTextLength other" + , "" + , "" + , "qreal maximumLength" +"" +}; + +static const int qtscript_QTextLength_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QTextLength_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextLength::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextLength*) +Q_DECLARE_METATYPE(QTextLength::Type) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTextLength::Type +// + +static const QTextLength::Type qtscript_QTextLength_Type_values[] = { + QTextLength::VariableLength + , QTextLength::FixedLength + , QTextLength::PercentageLength +}; + +static const char * const qtscript_QTextLength_Type_keys[] = { + "VariableLength" + , "FixedLength" + , "PercentageLength" +}; + +static QString qtscript_QTextLength_Type_toStringHelper(QTextLength::Type value) +{ + if ((value >= QTextLength::VariableLength) && (value <= QTextLength::PercentageLength)) + return qtscript_QTextLength_Type_keys[static_cast(value)-static_cast(QTextLength::VariableLength)]; + return QString(); +} + +static QScriptValue qtscript_QTextLength_Type_toScriptValue(QScriptEngine *engine, const QTextLength::Type &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextLength")); + return clazz.property(qtscript_QTextLength_Type_toStringHelper(value)); +} + +static void qtscript_QTextLength_Type_fromScriptValue(const QScriptValue &value, QTextLength::Type &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextLength_Type(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextLength::VariableLength) && (arg <= QTextLength::PercentageLength)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Type(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextLength_Type_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextLength::Type value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextLength_Type_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextLength::Type value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextLength_Type_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextLength_Type_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextLength_Type, + qtscript_QTextLength_Type_valueOf, qtscript_QTextLength_Type_toString); + qScriptRegisterMetaType(engine, qtscript_QTextLength_Type_toScriptValue, + qtscript_QTextLength_Type_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextLength_Type_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextLength_Type_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextLength +// + +static QScriptValue qtscript_QTextLength_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextLength* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextLength.%0(): this object is not a QTextLength") + .arg(qtscript_QTextLength_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QTextLength _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->rawValue(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QTextLength::Type _q_result = _q_self->type(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->value(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextLength_throw_ambiguity_error_helper(context, + qtscript_QTextLength_function_names[_id+1], + qtscript_QTextLength_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextLength_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextLength(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QTextLength _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QTextLength::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTextLength _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextLength_throw_ambiguity_error_helper(context, + qtscript_QTextLength_function_names[_id], + qtscript_QTextLength_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextLength_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextLength*)0)); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextLength_prototype_call, qtscript_QTextLength_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextLength_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextLength_static_call, proto, qtscript_QTextLength_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Type"), + qtscript_create_QTextLength_Type_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextLine.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextLine.cpp new file mode 100644 index 00000000..fbd26569 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextLine.cpp @@ -0,0 +1,562 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QTextLine_function_names[] = { + "QTextLine" + // static + // prototype + , "ascent" + , "cursorToX" + , "descent" + , "draw" + , "height" + , "horizontalAdvance" + , "isValid" + , "leading" + , "leadingIncluded" + , "lineNumber" + , "naturalTextRect" + , "naturalTextWidth" + , "position" + , "rect" + , "setLeadingIncluded" + , "setLineWidth" + , "setNumColumns" + , "setPosition" + , "textLength" + , "textStart" + , "width" + , "x" + , "xToCursor" + , "y" + , "toString" +}; + +static const char * const qtscript_QTextLine_function_signatures[] = { + "" + // static + // prototype + , "" + , "int cursorPos, Edge edge" + , "" + , "QPainter p, QPointF point, QTextLayout_FormatRange selection" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "bool included" + , "qreal width" + , "int columns\nint columns, qreal alignmentWidth" + , "QPointF pos" + , "" + , "" + , "" + , "" + , "qreal x, CursorPosition arg__2" + , "" +"" +}; + +static const int qtscript_QTextLine_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 2 + , 0 + , 3 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 2 + , 1 + , 0 + , 0 + , 0 + , 0 + , 2 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextLine_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextLine::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextLine) +Q_DECLARE_METATYPE(QTextLine*) +Q_DECLARE_METATYPE(QTextLine::CursorPosition) +Q_DECLARE_METATYPE(QTextLine::Edge) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QTextLayout::FormatRange*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTextLine::CursorPosition +// + +static const QTextLine::CursorPosition qtscript_QTextLine_CursorPosition_values[] = { + QTextLine::CursorBetweenCharacters + , QTextLine::CursorOnCharacter +}; + +static const char * const qtscript_QTextLine_CursorPosition_keys[] = { + "CursorBetweenCharacters" + , "CursorOnCharacter" +}; + +static QString qtscript_QTextLine_CursorPosition_toStringHelper(QTextLine::CursorPosition value) +{ + if ((value >= QTextLine::CursorBetweenCharacters) && (value <= QTextLine::CursorOnCharacter)) + return qtscript_QTextLine_CursorPosition_keys[static_cast(value)-static_cast(QTextLine::CursorBetweenCharacters)]; + return QString(); +} + +static QScriptValue qtscript_QTextLine_CursorPosition_toScriptValue(QScriptEngine *engine, const QTextLine::CursorPosition &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextLine")); + return clazz.property(qtscript_QTextLine_CursorPosition_toStringHelper(value)); +} + +static void qtscript_QTextLine_CursorPosition_fromScriptValue(const QScriptValue &value, QTextLine::CursorPosition &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextLine_CursorPosition(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextLine::CursorBetweenCharacters) && (arg <= QTextLine::CursorOnCharacter)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("CursorPosition(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextLine_CursorPosition_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextLine::CursorPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextLine_CursorPosition_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextLine::CursorPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextLine_CursorPosition_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextLine_CursorPosition_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextLine_CursorPosition, + qtscript_QTextLine_CursorPosition_valueOf, qtscript_QTextLine_CursorPosition_toString); + qScriptRegisterMetaType(engine, qtscript_QTextLine_CursorPosition_toScriptValue, + qtscript_QTextLine_CursorPosition_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextLine_CursorPosition_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextLine_CursorPosition_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextLine::Edge +// + +static const QTextLine::Edge qtscript_QTextLine_Edge_values[] = { + QTextLine::Leading + , QTextLine::Trailing +}; + +static const char * const qtscript_QTextLine_Edge_keys[] = { + "Leading" + , "Trailing" +}; + +static QString qtscript_QTextLine_Edge_toStringHelper(QTextLine::Edge value) +{ + if ((value >= QTextLine::Leading) && (value <= QTextLine::Trailing)) + return qtscript_QTextLine_Edge_keys[static_cast(value)-static_cast(QTextLine::Leading)]; + return QString(); +} + +static QScriptValue qtscript_QTextLine_Edge_toScriptValue(QScriptEngine *engine, const QTextLine::Edge &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextLine")); + return clazz.property(qtscript_QTextLine_Edge_toStringHelper(value)); +} + +static void qtscript_QTextLine_Edge_fromScriptValue(const QScriptValue &value, QTextLine::Edge &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextLine_Edge(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextLine::Leading) && (arg <= QTextLine::Trailing)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Edge(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextLine_Edge_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextLine::Edge value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextLine_Edge_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextLine::Edge value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextLine_Edge_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextLine_Edge_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextLine_Edge, + qtscript_QTextLine_Edge_valueOf, qtscript_QTextLine_Edge_toString); + qScriptRegisterMetaType(engine, qtscript_QTextLine_Edge_toScriptValue, + qtscript_QTextLine_Edge_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextLine_Edge_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextLine_Edge_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextLine +// + +static QScriptValue qtscript_QTextLine_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 24; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextLine* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextLine.%0(): this object is not a QTextLine") + .arg(qtscript_QTextLine_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->ascent(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_result = _q_self->cursorToX(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QTextLine::Edge _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_result = _q_self->cursorToX(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->descent(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 2) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->draw(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + const QTextLayout::FormatRange* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->draw(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->height(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->horizontalAdvance(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->leading(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->leadingIncluded(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->lineNumber(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->naturalTextRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->naturalTextWidth(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->position(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->rect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setLeadingIncluded(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLineWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setNumColumns(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setNumColumns(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPosition(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 0) { + int _q_result = _q_self->textLength(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + int _q_result = _q_self->textStart(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->width(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->x(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->xToCursor(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextLine::CursorPosition _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_result = _q_self->xToCursor(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->y(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: { + QString result = QString::fromLatin1("QTextLine"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextLine_throw_ambiguity_error_helper(context, + qtscript_QTextLine_function_names[_id+1], + qtscript_QTextLine_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextLine_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextLine(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QTextLine _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextLine_throw_ambiguity_error_helper(context, + qtscript_QTextLine_function_names[_id], + qtscript_QTextLine_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextLine_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextLine*)0)); + for (int i = 0; i < 25; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextLine_prototype_call, qtscript_QTextLine_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextLine_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextLine_static_call, proto, qtscript_QTextLine_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("CursorPosition"), + qtscript_create_QTextLine_CursorPosition_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Edge"), + qtscript_create_QTextLine_Edge_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextList.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextList.cpp new file mode 100644 index 00000000..b81b0968 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextList.cpp @@ -0,0 +1,253 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextList.h" + +static const char * const qtscript_QTextList_function_names[] = { + "QTextList" + // static + // prototype + , "add" + , "count" + , "item" + , "itemNumber" + , "itemText" + , "remove" + , "removeItem" + , "setFormat" + , "textListFormat" + , "toString" +}; + +static const char * const qtscript_QTextList_function_signatures[] = { + "QTextDocument doc" + // static + // prototype + , "QTextBlock block" + , "" + , "int i" + , "QTextBlock arg__1" + , "QTextBlock arg__1" + , "QTextBlock arg__1" + , "int i" + , "QTextListFormat format" + , "" +"" +}; + +static const int qtscript_QTextList_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextList_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextList::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextList*) +Q_DECLARE_METATYPE(QtScriptShell_QTextList*) +Q_DECLARE_METATYPE(QTextBlock) +Q_DECLARE_METATYPE(QTextListFormat) +Q_DECLARE_METATYPE(QTextDocument*) +Q_DECLARE_METATYPE(QTextBlockGroup*) + +// +// QTextList +// + +static QScriptValue qtscript_QTextList_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 9; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextList* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextList.%0(): this object is not a QTextList") + .arg(qtscript_QTextList_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QTextBlock _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->add(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTextBlock _q_result = _q_self->item(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QTextBlock _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->itemNumber(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QTextBlock _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->itemText(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QTextBlock _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->remove(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->removeItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QTextListFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QTextListFormat _q_result = _q_self->format(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: { + QString result = QString::fromLatin1("QTextList"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextList_throw_ambiguity_error_helper(context, + qtscript_QTextList_function_names[_id+1], + qtscript_QTextList_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextList_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextList(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QTextDocument* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTextList* _q_cpp_result = new QtScriptShell_QTextList(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTextList*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextList_throw_ambiguity_error_helper(context, + qtscript_QTextList_function_names[_id], + qtscript_QTextList_function_signatures[_id]); +} + +static QScriptValue qtscript_QTextList_toScriptValue(QScriptEngine *engine, QTextList* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTextList_fromScriptValue(const QScriptValue &value, QTextList* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTextList_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextList*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 10; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextList_prototype_call, qtscript_QTextList_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextList_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTextList_toScriptValue, + qtscript_QTextList_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextList_static_call, proto, qtscript_QTextList_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextListFormat.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextListFormat.cpp new file mode 100644 index 00000000..9235c60d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextListFormat.cpp @@ -0,0 +1,323 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextListFormat.h" + +static const char * const qtscript_QTextListFormat_function_names[] = { + "QTextListFormat" + // static + // prototype + , "indent" + , "numberPrefix" + , "numberSuffix" + , "setIndent" + , "setNumberPrefix" + , "setNumberSuffix" + , "setStyle" + , "style" + , "toString" +}; + +static const char * const qtscript_QTextListFormat_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "" + , "int indent" + , "String numberPrefix" + , "String numberSuffix" + , "Style style" + , "" +"" +}; + +static const int qtscript_QTextListFormat_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextListFormat_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextListFormat::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextListFormat) +Q_DECLARE_METATYPE(QTextListFormat*) +Q_DECLARE_METATYPE(QtScriptShell_QTextListFormat) +Q_DECLARE_METATYPE(QtScriptShell_QTextListFormat*) +Q_DECLARE_METATYPE(QTextListFormat::Style) +Q_DECLARE_METATYPE(QTextFormat*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTextListFormat::Style +// + +static const QTextListFormat::Style qtscript_QTextListFormat_Style_values[] = { + QTextListFormat::ListUpperRoman + , QTextListFormat::ListLowerRoman + , QTextListFormat::ListUpperAlpha + , QTextListFormat::ListLowerAlpha + , QTextListFormat::ListDecimal + , QTextListFormat::ListSquare + , QTextListFormat::ListCircle + , QTextListFormat::ListDisc + , QTextListFormat::ListStyleUndefined +}; + +static const char * const qtscript_QTextListFormat_Style_keys[] = { + "ListUpperRoman" + , "ListLowerRoman" + , "ListUpperAlpha" + , "ListLowerAlpha" + , "ListDecimal" + , "ListSquare" + , "ListCircle" + , "ListDisc" + , "ListStyleUndefined" +}; + +static QString qtscript_QTextListFormat_Style_toStringHelper(QTextListFormat::Style value) +{ + if ((value >= QTextListFormat::ListUpperRoman) && (value <= QTextListFormat::ListStyleUndefined)) + return qtscript_QTextListFormat_Style_keys[static_cast(value)-static_cast(QTextListFormat::ListUpperRoman)]; + return QString(); +} + +static QScriptValue qtscript_QTextListFormat_Style_toScriptValue(QScriptEngine *engine, const QTextListFormat::Style &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextListFormat")); + return clazz.property(qtscript_QTextListFormat_Style_toStringHelper(value)); +} + +static void qtscript_QTextListFormat_Style_fromScriptValue(const QScriptValue &value, QTextListFormat::Style &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextListFormat_Style(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextListFormat::ListUpperRoman) && (arg <= QTextListFormat::ListStyleUndefined)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Style(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextListFormat_Style_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextListFormat::Style value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextListFormat_Style_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextListFormat::Style value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextListFormat_Style_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextListFormat_Style_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextListFormat_Style, + qtscript_QTextListFormat_Style_valueOf, qtscript_QTextListFormat_Style_toString); + qScriptRegisterMetaType(engine, qtscript_QTextListFormat_Style_toScriptValue, + qtscript_QTextListFormat_Style_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 9; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextListFormat_Style_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextListFormat_Style_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextListFormat +// + +static QScriptValue qtscript_QTextListFormat_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextListFormat* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextListFormat.%0(): this object is not a QTextListFormat") + .arg(qtscript_QTextListFormat_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->indent(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->numberPrefix(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->numberSuffix(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setIndent(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setNumberPrefix(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setNumberSuffix(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QTextListFormat::Style _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStyle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QTextListFormat::Style _q_result = _q_self->style(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: { + QString result = QString::fromLatin1("QTextListFormat"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextListFormat_throw_ambiguity_error_helper(context, + qtscript_QTextListFormat_function_names[_id+1], + qtscript_QTextListFormat_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextListFormat_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextListFormat(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTextListFormat _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTextListFormat)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextListFormat_throw_ambiguity_error_helper(context, + qtscript_QTextListFormat_function_names[_id], + qtscript_QTextListFormat_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextListFormat_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextListFormat*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextListFormat_prototype_call, qtscript_QTextListFormat_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextListFormat_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextListFormat_static_call, proto, qtscript_QTextListFormat_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Style"), + qtscript_create_QTextListFormat_Style_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextObject.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextObject.cpp new file mode 100644 index 00000000..b77b7324 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextObject.cpp @@ -0,0 +1,184 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextObject.h" + +static const char * const qtscript_QTextObject_function_names[] = { + "QTextObject" + // static + // prototype + , "document" + , "format" + , "formatIndex" + , "objectIndex" + , "toString" +}; + +static const char * const qtscript_QTextObject_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QTextObject_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextObject_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextObject::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextObject*) +Q_DECLARE_METATYPE(QtScriptShell_QTextObject*) +Q_DECLARE_METATYPE(QTextDocument*) + +// +// QTextObject +// + +static QScriptValue qtscript_QTextObject_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextObject* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextObject.%0(): this object is not a QTextObject") + .arg(qtscript_QTextObject_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QTextDocument* _q_result = _q_self->document(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QTextFormat _q_result = _q_self->format(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->formatIndex(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->objectIndex(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QTextObject"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextObject_throw_ambiguity_error_helper(context, + qtscript_QTextObject_function_names[_id+1], + qtscript_QTextObject_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextObject_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextObject cannot be constructed")); + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextObject_throw_ambiguity_error_helper(context, + qtscript_QTextObject_function_names[_id], + qtscript_QTextObject_function_signatures[_id]); +} + +static QScriptValue qtscript_QTextObject_toScriptValue(QScriptEngine *engine, QTextObject* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTextObject_fromScriptValue(const QScriptValue &value, QTextObject* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTextObject_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextObject*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextObject_prototype_call, qtscript_QTextObject_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextObject_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTextObject_toScriptValue, + qtscript_QTextObject_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextObject_static_call, proto, qtscript_QTextObject_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextTable.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextTable.cpp new file mode 100644 index 00000000..9043b8a9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextTable.cpp @@ -0,0 +1,361 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextTable.h" + +static const char * const qtscript_QTextTable_function_names[] = { + "QTextTable" + // static + // prototype + , "appendColumns" + , "appendRows" + , "cellAt" + , "columns" + , "insertColumns" + , "insertRows" + , "mergeCells" + , "removeColumns" + , "removeRows" + , "resize" + , "rowEnd" + , "rowStart" + , "rows" + , "setFormat" + , "splitCell" + , "tableFormat" + , "toString" +}; + +static const char * const qtscript_QTextTable_function_signatures[] = { + "QTextDocument doc" + // static + // prototype + , "int count" + , "int count" + , "QTextCursor c\nint position\nint row, int col" + , "" + , "int pos, int num" + , "int pos, int num" + , "QTextCursor cursor\nint row, int col, int numRows, int numCols" + , "int pos, int num" + , "int pos, int num" + , "int rows, int cols" + , "QTextCursor c" + , "QTextCursor c" + , "" + , "QTextTableFormat format" + , "int row, int col, int numRows, int numCols" + , "" +"" +}; + +static const int qtscript_QTextTable_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 1 + , 2 + , 0 + , 2 + , 2 + , 4 + , 2 + , 2 + , 2 + , 1 + , 1 + , 0 + , 1 + , 4 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextTable_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextTable::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextTable*) +Q_DECLARE_METATYPE(QtScriptShell_QTextTable*) +Q_DECLARE_METATYPE(QTextCursor) +Q_DECLARE_METATYPE(QTextTableCell) +Q_DECLARE_METATYPE(QTextTableFormat) +Q_DECLARE_METATYPE(QTextDocument*) +Q_DECLARE_METATYPE(QTextFrame*) + +// +// QTextTable +// + +static QScriptValue qtscript_QTextTable_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 16; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextTable* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextTable.%0(): this object is not a QTextTable") + .arg(qtscript_QTextTable_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->appendColumns(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->appendRows(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTextCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextTableCell _q_result = _q_self->cellAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QTextTableCell _q_result = _q_self->cellAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QTextTableCell _q_result = _q_self->cellAt(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->columns(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->insertColumns(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->insertRows(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QTextCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->mergeCells(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->mergeCells(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->removeColumns(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->removeRows(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->resize(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QTextCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCursor _q_result = _q_self->rowEnd(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QTextCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCursor _q_result = _q_self->rowStart(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + int _q_result = _q_self->rows(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QTextTableFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->splitCell(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QTextTableFormat _q_result = _q_self->format(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: { + QString result = QString::fromLatin1("QTextTable"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextTable_throw_ambiguity_error_helper(context, + qtscript_QTextTable_function_names[_id+1], + qtscript_QTextTable_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextTable_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextTable(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QTextDocument* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTextTable* _q_cpp_result = new QtScriptShell_QTextTable(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTextTable*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextTable_throw_ambiguity_error_helper(context, + qtscript_QTextTable_function_names[_id], + qtscript_QTextTable_function_signatures[_id]); +} + +static QScriptValue qtscript_QTextTable_toScriptValue(QScriptEngine *engine, QTextTable* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTextTable_fromScriptValue(const QScriptValue &value, QTextTable* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTextTable_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextTable*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 17; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextTable_prototype_call, qtscript_QTextTable_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextTable_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTextTable_toScriptValue, + qtscript_QTextTable_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextTable_static_call, proto, qtscript_QTextTable_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextTableCell.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextTableCell.cpp new file mode 100644 index 00000000..df5ad63d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextTableCell.cpp @@ -0,0 +1,294 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QTextTableCell_function_names[] = { + "QTextTableCell" + // static + // prototype + , "begin" + , "column" + , "columnSpan" + , "end" + , "firstCursorPosition" + , "firstPosition" + , "format" + , "isValid" + , "lastCursorPosition" + , "lastPosition" + , "equals" + , "row" + , "rowSpan" + , "setFormat" + , "tableCellFormatIndex" + , "toString" +}; + +static const char * const qtscript_QTextTableCell_function_signatures[] = { + "\nQTextTableCell o" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QTextTableCell other" + , "" + , "" + , "QTextCharFormat format" + , "" +"" +}; + +static const int qtscript_QTextTableCell_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextTableCell_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextTableCell::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextTableCell) +Q_DECLARE_METATYPE(QTextTableCell*) +Q_DECLARE_METATYPE(QTextFrame::iterator) +Q_DECLARE_METATYPE(QTextCursor) +Q_DECLARE_METATYPE(QTextCharFormat) + +// +// QTextTableCell +// + +static QScriptValue qtscript_QTextTableCell_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 15; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextTableCell* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextTableCell.%0(): this object is not a QTextTableCell") + .arg(qtscript_QTextTableCell_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QTextFrame::iterator _q_result = _q_self->begin(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->column(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->columnSpan(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QTextFrame::iterator _q_result = _q_self->end(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QTextCursor _q_result = _q_self->firstCursorPosition(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->firstPosition(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QTextCharFormat _q_result = _q_self->format(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QTextCursor _q_result = _q_self->lastCursorPosition(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->lastPosition(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QTextTableCell _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + int _q_result = _q_self->row(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + int _q_result = _q_self->rowSpan(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QTextCharFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 0) { + int _q_result = _q_self->tableCellFormatIndex(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: { + QString result = QString::fromLatin1("QTextTableCell"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextTableCell_throw_ambiguity_error_helper(context, + qtscript_QTextTableCell_function_names[_id+1], + qtscript_QTextTableCell_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextTableCell_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextTableCell(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QTextTableCell _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QTextTableCell _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextTableCell _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextTableCell_throw_ambiguity_error_helper(context, + qtscript_QTextTableCell_function_names[_id], + qtscript_QTextTableCell_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextTableCell_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextTableCell*)0)); + for (int i = 0; i < 16; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextTableCell_prototype_call, qtscript_QTextTableCell_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextTableCell_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextTableCell_static_call, proto, qtscript_QTextTableCell_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextTableCellFormat.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextTableCellFormat.cpp new file mode 100644 index 00000000..4b2e9feb --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextTableCellFormat.cpp @@ -0,0 +1,238 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextTableCellFormat.h" + +static const char * const qtscript_QTextTableCellFormat_function_names[] = { + "QTextTableCellFormat" + // static + // prototype + , "bottomPadding" + , "leftPadding" + , "rightPadding" + , "setBottomPadding" + , "setLeftPadding" + , "setPadding" + , "setRightPadding" + , "setTopPadding" + , "topPadding" + , "toString" +}; + +static const char * const qtscript_QTextTableCellFormat_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "" + , "qreal padding" + , "qreal padding" + , "qreal padding" + , "qreal padding" + , "qreal padding" + , "" +"" +}; + +static const int qtscript_QTextTableCellFormat_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextTableCellFormat_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextTableCellFormat::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextTableCellFormat) +Q_DECLARE_METATYPE(QTextTableCellFormat*) +Q_DECLARE_METATYPE(QtScriptShell_QTextTableCellFormat) +Q_DECLARE_METATYPE(QtScriptShell_QTextTableCellFormat*) +Q_DECLARE_METATYPE(QTextCharFormat*) + +// +// QTextTableCellFormat +// + +static QScriptValue qtscript_QTextTableCellFormat_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 9; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextTableCellFormat* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextTableCellFormat.%0(): this object is not a QTextTableCellFormat") + .arg(qtscript_QTextTableCellFormat_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->bottomPadding(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->leftPadding(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->rightPadding(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBottomPadding(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLeftPadding(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPadding(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRightPadding(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTopPadding(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->topPadding(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: { + QString result = QString::fromLatin1("QTextTableCellFormat"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextTableCellFormat_throw_ambiguity_error_helper(context, + qtscript_QTextTableCellFormat_function_names[_id+1], + qtscript_QTextTableCellFormat_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextTableCellFormat_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextTableCellFormat(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTextTableCellFormat _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTextTableCellFormat)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextTableCellFormat_throw_ambiguity_error_helper(context, + qtscript_QTextTableCellFormat_function_names[_id], + qtscript_QTextTableCellFormat_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextTableCellFormat_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextTableCellFormat*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 10; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextTableCellFormat_prototype_call, qtscript_QTextTableCellFormat_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextTableCellFormat_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextTableCellFormat_static_call, proto, qtscript_QTextTableCellFormat_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextTableFormat.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextTableFormat.cpp new file mode 100644 index 00000000..ce56c403 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTextTableFormat.cpp @@ -0,0 +1,280 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextTableFormat.h" + +static const char * const qtscript_QTextTableFormat_function_names[] = { + "QTextTableFormat" + // static + // prototype + , "alignment" + , "cellPadding" + , "cellSpacing" + , "clearColumnWidthConstraints" + , "columnWidthConstraints" + , "columns" + , "headerRowCount" + , "setAlignment" + , "setCellPadding" + , "setCellSpacing" + , "setColumnWidthConstraints" + , "setColumns" + , "setHeaderRowCount" + , "toString" +}; + +static const char * const qtscript_QTextTableFormat_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "Alignment alignment" + , "qreal padding" + , "qreal spacing" + , "List constraints" + , "int columns" + , "int count" +"" +}; + +static const int qtscript_QTextTableFormat_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QTextTableFormat_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextTableFormat::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextTableFormat) +Q_DECLARE_METATYPE(QTextTableFormat*) +Q_DECLARE_METATYPE(QtScriptShell_QTextTableFormat) +Q_DECLARE_METATYPE(QtScriptShell_QTextTableFormat*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QTextFrameFormat*) + +// +// QTextTableFormat +// + +static QScriptValue qtscript_QTextTableFormat_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 13; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextTableFormat* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextTableFormat.%0(): this object is not a QTextTableFormat") + .arg(qtscript_QTextTableFormat_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->alignment(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->cellPadding(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->cellSpacing(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->clearColumnWidthConstraints(); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QVector _q_result = _q_self->columnWidthConstraints(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->columns(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = _q_self->headerRowCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setAlignment(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCellPadding(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCellSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setColumnWidthConstraints(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setColumns(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setHeaderRowCount(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: { + QString result = QString::fromLatin1("QTextTableFormat"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextTableFormat_throw_ambiguity_error_helper(context, + qtscript_QTextTableFormat_function_names[_id+1], + qtscript_QTextTableFormat_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextTableFormat_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextTableFormat(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTextTableFormat _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTextTableFormat)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextTableFormat_throw_ambiguity_error_helper(context, + qtscript_QTextTableFormat_function_names[_id], + qtscript_QTextTableFormat_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextTableFormat_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextTableFormat*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 14; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextTableFormat_prototype_call, qtscript_QTextTableFormat_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextTableFormat_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextTableFormat_static_call, proto, qtscript_QTextTableFormat_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTileRules.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTileRules.cpp new file mode 100644 index 00000000..f3ce1520 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTileRules.cpp @@ -0,0 +1,142 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QTileRules.h" + +static const char * const qtscript_QTileRules_function_names[] = { + "QTileRules" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QTileRules_function_signatures[] = { + "TileRule horizontalRule, TileRule verticalRule\nTileRule rule" + // static + // prototype +"" +}; + +static const int qtscript_QTileRules_function_lengths[] = { + 2 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QTileRules_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTileRules::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTileRules) +Q_DECLARE_METATYPE(QTileRules*) +Q_DECLARE_METATYPE(QtScriptShell_QTileRules) +Q_DECLARE_METATYPE(QtScriptShell_QTileRules*) +Q_DECLARE_METATYPE(Qt::TileRule) + +// +// QTileRules +// + +static QScriptValue qtscript_QTileRules_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTileRules* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTileRules.%0(): this object is not a QTileRules") + .arg(qtscript_QTileRules_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QTileRules"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTileRules_throw_ambiguity_error_helper(context, + qtscript_QTileRules_function_names[_id+1], + qtscript_QTileRules_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTileRules_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTileRules(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTileRules _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTileRules)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + Qt::TileRule _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTileRules _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTileRules)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + Qt::TileRule _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::TileRule _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QTileRules _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTileRules)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTileRules_throw_ambiguity_error_helper(context, + qtscript_QTileRules_function_names[_id], + qtscript_QTileRules_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTileRules_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTileRules*)0)); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTileRules_static_call, proto, qtscript_QTileRules_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QToolBarChangeEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QToolBarChangeEvent.cpp new file mode 100644 index 00000000..b8149446 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QToolBarChangeEvent.cpp @@ -0,0 +1,141 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QToolBarChangeEvent_function_names[] = { + "QToolBarChangeEvent" + // static + // prototype + , "toggle" + , "toString" +}; + +static const char * const qtscript_QToolBarChangeEvent_function_signatures[] = { + "bool t" + // static + // prototype + , "" +"" +}; + +static const int qtscript_QToolBarChangeEvent_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 +}; + +static QScriptValue qtscript_QToolBarChangeEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QToolBarChangeEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QToolBarChangeEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QToolBarChangeEvent +// + +static QScriptValue qtscript_QToolBarChangeEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QToolBarChangeEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QToolBarChangeEvent.%0(): this object is not a QToolBarChangeEvent") + .arg(qtscript_QToolBarChangeEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->toggle(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("QToolBarChangeEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QToolBarChangeEvent_throw_ambiguity_error_helper(context, + qtscript_QToolBarChangeEvent_function_names[_id+1], + qtscript_QToolBarChangeEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QToolBarChangeEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QToolBarChangeEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + QToolBarChangeEvent* _q_cpp_result = new QToolBarChangeEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QToolBarChangeEvent_throw_ambiguity_error_helper(context, + qtscript_QToolBarChangeEvent_function_names[_id], + qtscript_QToolBarChangeEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QToolBarChangeEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QToolBarChangeEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QToolBarChangeEvent_prototype_call, qtscript_QToolBarChangeEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QToolBarChangeEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QToolBarChangeEvent_static_call, proto, qtscript_QToolBarChangeEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTouchEvent_TouchPoint.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTouchEvent_TouchPoint.cpp new file mode 100644 index 00000000..8553b537 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTouchEvent_TouchPoint.cpp @@ -0,0 +1,594 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QTouchEvent_TouchPoint_function_names[] = { + "QTouchEvent_TouchPoint" + // static + // prototype + , "id" + , "lastNormalizedPos" + , "lastPos" + , "lastScenePos" + , "lastScreenPos" + , "normalizedPos" + , "operator_assign" + , "pos" + , "pressure" + , "rawScreenPositions" + , "rect" + , "scenePos" + , "sceneRect" + , "screenPos" + , "screenRect" + , "setId" + , "setLastNormalizedPos" + , "setLastPos" + , "setLastScenePos" + , "setLastScreenPos" + , "setNormalizedPos" + , "setPos" + , "setPressure" + , "setRawScreenPositions" + , "setRect" + , "setScenePos" + , "setSceneRect" + , "setScreenPos" + , "setScreenRect" + , "setStartNormalizedPos" + , "setStartPos" + , "setStartScenePos" + , "setStartScreenPos" + , "setState" + , "setVelocity" + , "startNormalizedPos" + , "startPos" + , "startScenePos" + , "startScreenPos" + , "state" + , "swap" + , "velocity" + , "toString" +}; + +static const char * const qtscript_QTouchEvent_TouchPoint_function_signatures[] = { + "QTouchEvent_TouchPoint other\nint id" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "QTouchEvent_TouchPoint other" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "int id" + , "QPointF lastNormalizedPos" + , "QPointF lastPos" + , "QPointF lastScenePos" + , "QPointF lastScreenPos" + , "QPointF normalizedPos" + , "QPointF pos" + , "qreal pressure" + , "List positions" + , "QRectF rect" + , "QPointF scenePos" + , "QRectF sceneRect" + , "QPointF screenPos" + , "QRectF screenRect" + , "QPointF startNormalizedPos" + , "QPointF startPos" + , "QPointF startScenePos" + , "QPointF startScreenPos" + , "TouchPointStates state" + , "QVector2D v" + , "" + , "" + , "" + , "" + , "" + , "QTouchEvent_TouchPoint other" + , "" +"" +}; + +static const int qtscript_QTouchEvent_TouchPoint_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTouchEvent_TouchPoint_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTouchEvent_TouchPoint::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTouchEvent::TouchPoint) +Q_DECLARE_METATYPE(QTouchEvent::TouchPoint*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::TouchPointState) + +// +// QTouchEvent_TouchPoint +// + +static QScriptValue qtscript_QTouchEvent_TouchPoint_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 42; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTouchEvent::TouchPoint* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTouchEvent_TouchPoint.%0(): this object is not a QTouchEvent_TouchPoint") + .arg(qtscript_QTouchEvent_TouchPoint_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->id(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->lastNormalizedPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->lastPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->lastScenePos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->lastScreenPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->normalizedPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QTouchEvent::TouchPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTouchEvent::TouchPoint& _q_result = _q_self->operator=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->pressure(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QVector _q_result = _q_self->rawScreenPositions(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->rect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->scenePos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->sceneRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->screenPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->screenRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setId(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLastNormalizedPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLastPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLastScenePos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLastScreenPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setNormalizedPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPressure(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setRawScreenPositions(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRect(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScenePos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSceneRect(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScreenPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScreenRect(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStartNormalizedPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStartPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStartScenePos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStartScreenPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setState(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 1) { + QVector2D _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setVelocity(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->startNormalizedPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 36: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->startPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 37: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->startScenePos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 38: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->startScreenPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 0) { + Qt::TouchPointState _q_result = _q_self->state(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 40: + if (context->argumentCount() == 1) { + QTouchEvent::TouchPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 0) { + QVector2D _q_result = _q_self->velocity(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 42: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTouchEvent_TouchPoint_throw_ambiguity_error_helper(context, + qtscript_QTouchEvent_TouchPoint_function_names[_id+1], + qtscript_QTouchEvent_TouchPoint_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTouchEvent_TouchPoint_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTouchEvent_TouchPoint(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QTouchEvent::TouchPoint _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTouchEvent::TouchPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTouchEvent::TouchPoint _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QTouchEvent::TouchPoint _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTouchEvent_TouchPoint_throw_ambiguity_error_helper(context, + qtscript_QTouchEvent_TouchPoint_function_names[_id], + qtscript_QTouchEvent_TouchPoint_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTouchEvent_TouchPoint_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTouchEvent::TouchPoint*)0)); + for (int i = 0; i < 43; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTouchEvent_TouchPoint_prototype_call, qtscript_QTouchEvent_TouchPoint_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTouchEvent_TouchPoint_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTouchEvent_TouchPoint_static_call, proto, qtscript_QTouchEvent_TouchPoint_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTransform.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTransform.cpp new file mode 100644 index 00000000..b3c785e0 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QTransform.cpp @@ -0,0 +1,824 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QTransform_function_names[] = { + "QTransform" + // static + , "fromScale" + , "fromTranslate" + , "quadToQuad" + , "quadToSquare" + , "squareToQuad" + // prototype + , "adjoint" + , "det" + , "determinant" + , "dx" + , "dy" + , "inverted" + , "isAffine" + , "isIdentity" + , "isInvertible" + , "isRotating" + , "isScaling" + , "isTranslating" + , "m11" + , "m12" + , "m13" + , "m21" + , "m22" + , "m23" + , "m31" + , "m32" + , "m33" + , "map" + , "mapRect" + , "mapToPolygon" + , "multiplied" + , "operator_add_assign" + , "operator_divide_assign" + , "equals" + , "operator_multiply_assign" + , "operator_subtract_assign" + , "reset" + , "rotate" + , "rotateRadians" + , "scale" + , "setMatrix" + , "shear" + , "toAffine" + , "translate" + , "transposed" + , "type" + , "toString" +}; + +static const char * const qtscript_QTransform_function_signatures[] = { + "\nQMatrix mtx\nqreal h11, qreal h12, qreal h13, qreal h21, qreal h22, qreal h23, qreal h31, qreal h32, qreal h33\nqreal h11, qreal h12, qreal h21, qreal h22, qreal dx, qreal dy" + // static + , "qreal dx, qreal dy" + , "qreal dx, qreal dy" + , "QPolygonF one, QPolygonF two, QTransform result" + , "QPolygonF quad, QTransform result" + , "QPolygonF square, QTransform result" + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QLine l\nQLineF l\nQPainterPath p\nQPoint p\nQPointF p\nQPolygon a\nQPolygonF a\nQRegion r" + , "QRect arg__1\nQRectF arg__1" + , "QRect r" + , "QTransform o" + , "qreal div" + , "qreal div" + , "QTransform arg__1" + , "QTransform arg__1\nqreal div" + , "qreal div" + , "" + , "qreal a, Axis axis" + , "qreal a, Axis axis" + , "qreal sx, qreal sy" + , "qreal m11, qreal m12, qreal m13, qreal m21, qreal m22, qreal m23, qreal m31, qreal m32, qreal m33" + , "qreal sh, qreal sv" + , "" + , "qreal dx, qreal dy" + , "" + , "" +"" +}; + +static const int qtscript_QTransform_function_lengths[] = { + 9 + // static + , 2 + , 2 + , 3 + , 2 + , 2 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 2 + , 2 + , 2 + , 9 + , 2 + , 0 + , 2 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTransform_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTransform::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTransform*) +Q_DECLARE_METATYPE(QTransform::TransformationType) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(Qt::Axis) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTransform::TransformationType +// + +static const QTransform::TransformationType qtscript_QTransform_TransformationType_values[] = { + QTransform::TxNone + , QTransform::TxTranslate + , QTransform::TxScale + , QTransform::TxRotate + , QTransform::TxShear + , QTransform::TxProject +}; + +static const char * const qtscript_QTransform_TransformationType_keys[] = { + "TxNone" + , "TxTranslate" + , "TxScale" + , "TxRotate" + , "TxShear" + , "TxProject" +}; + +static QString qtscript_QTransform_TransformationType_toStringHelper(QTransform::TransformationType value) +{ + for (int i = 0; i < 6; ++i) { + if (qtscript_QTransform_TransformationType_values[i] == value) + return QString::fromLatin1(qtscript_QTransform_TransformationType_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QTransform_TransformationType_toScriptValue(QScriptEngine *engine, const QTransform::TransformationType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTransform")); + return clazz.property(qtscript_QTransform_TransformationType_toStringHelper(value)); +} + +static void qtscript_QTransform_TransformationType_fromScriptValue(const QScriptValue &value, QTransform::TransformationType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTransform_TransformationType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 6; ++i) { + if (qtscript_QTransform_TransformationType_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("TransformationType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTransform_TransformationType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTransform::TransformationType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTransform_TransformationType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTransform::TransformationType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTransform_TransformationType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTransform_TransformationType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTransform_TransformationType, + qtscript_QTransform_TransformationType_valueOf, qtscript_QTransform_TransformationType_toString); + qScriptRegisterMetaType(engine, qtscript_QTransform_TransformationType_toScriptValue, + qtscript_QTransform_TransformationType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTransform_TransformationType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTransform_TransformationType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTransform +// + +static QScriptValue qtscript_QTransform_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 40; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTransform* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTransform.%0(): this object is not a QTransform") + .arg(qtscript_QTransform_function_names[_id+6])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QTransform _q_result = _q_self->adjoint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->det(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->determinant(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->dx(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->dy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QTransform _q_result = _q_self->inverted(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isAffine(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isIdentity(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isInvertible(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isRotating(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isScaling(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isTranslating(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->m11(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->m12(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->m13(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->m21(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->m22(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->m23(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->m31(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->m32(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->m33(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QLine _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLine _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QLineF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLineF _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygon _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion _q_result = _q_self->map(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 22: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->mapRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->mapRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 23: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygon _q_result = _q_self->mapToPolygon(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform _q_result = _q_self->operator*(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform& _q_result = _q_self->operator+=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform& _q_result = _q_self->operator/=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 1) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 29: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform& _q_result = _q_self->operator-=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 0) { + _q_self->reset(); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform& _q_result = _q_self->rotate(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::Axis _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTransform& _q_result = _q_self->rotate(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform& _q_result = _q_self->rotateRadians(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::Axis _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTransform& _q_result = _q_self->rotateRadians(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTransform& _q_result = _q_self->scale(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 34: + if (context->argumentCount() == 9) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + qreal _q_arg5 = qscriptvalue_cast(context->argument(5)); + qreal _q_arg6 = qscriptvalue_cast(context->argument(6)); + qreal _q_arg7 = qscriptvalue_cast(context->argument(7)); + qreal _q_arg8 = qscriptvalue_cast(context->argument(8)); + _q_self->setMatrix(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7, _q_arg8); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTransform& _q_result = _q_self->shear(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 36: + if (context->argumentCount() == 0) { + const QMatrix& _q_result = _q_self->toAffine(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 37: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTransform& _q_result = _q_self->translate(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 38: + if (context->argumentCount() == 0) { + QTransform _q_result = _q_self->transposed(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 0) { + QTransform::TransformationType _q_result = _q_self->type(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 40: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTransform_throw_ambiguity_error_helper(context, + qtscript_QTransform_function_names[_id+6], + qtscript_QTransform_function_signatures[_id+6]); +} + +static QScriptValue qtscript_QTransform_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTransform(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QTransform _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 6) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + qreal _q_arg5 = qscriptvalue_cast(context->argument(5)); + QTransform _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 8) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + qreal _q_arg5 = qscriptvalue_cast(context->argument(5)); + qreal _q_arg6 = qscriptvalue_cast(context->argument(6)); + qreal _q_arg7 = qscriptvalue_cast(context->argument(7)); + QTransform _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 9) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + qreal _q_arg5 = qscriptvalue_cast(context->argument(5)); + qreal _q_arg6 = qscriptvalue_cast(context->argument(6)); + qreal _q_arg7 = qscriptvalue_cast(context->argument(7)); + qreal _q_arg8 = qscriptvalue_cast(context->argument(8)); + QTransform _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7, _q_arg8); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTransform _q_result = QTransform::fromScale(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTransform _q_result = QTransform::fromTranslate(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 3) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTransform _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = QTransform::quadToQuad(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 2) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = QTransform::quadToSquare(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 2) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = QTransform::squareToQuad(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTransform_throw_ambiguity_error_helper(context, + qtscript_QTransform_function_names[_id], + qtscript_QTransform_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTransform_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTransform*)0)); + for (int i = 0; i < 41; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTransform_prototype_call, qtscript_QTransform_function_lengths[i+6]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTransform_function_names[i+6]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTransform_static_call, proto, qtscript_QTransform_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTransform_static_call, + qtscript_QTransform_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QTransform_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("TransformationType"), + qtscript_create_QTransform_TransformationType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QValidator.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QValidator.cpp new file mode 100644 index 00000000..e251710c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QValidator.cpp @@ -0,0 +1,285 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QValidator.h" + +static const char * const qtscript_QValidator_function_names[] = { + "QValidator" + // static + // prototype + , "fixup" + , "locale" + , "setLocale" + , "validate" + , "toString" +}; + +static const char * const qtscript_QValidator_function_signatures[] = { + "QObject parent" + // static + // prototype + , "String arg__1" + , "" + , "QLocale locale" + , "String arg__1, int arg__2" +"" +}; + +static const int qtscript_QValidator_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QValidator_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QValidator::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QValidator*) +Q_DECLARE_METATYPE(QtScriptShell_QValidator*) +Q_DECLARE_METATYPE(QValidator::State) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QValidator::State +// + +static const QValidator::State qtscript_QValidator_State_values[] = { + QValidator::Invalid + , QValidator::Intermediate + , QValidator::Acceptable +}; + +static const char * const qtscript_QValidator_State_keys[] = { + "Invalid" + , "Intermediate" + , "Acceptable" +}; + +static QString qtscript_QValidator_State_toStringHelper(QValidator::State value) +{ + if ((value >= QValidator::Invalid) && (value <= QValidator::Acceptable)) + return qtscript_QValidator_State_keys[static_cast(value)-static_cast(QValidator::Invalid)]; + return QString(); +} + +static QScriptValue qtscript_QValidator_State_toScriptValue(QScriptEngine *engine, const QValidator::State &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QValidator")); + return clazz.property(qtscript_QValidator_State_toStringHelper(value)); +} + +static void qtscript_QValidator_State_fromScriptValue(const QScriptValue &value, QValidator::State &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QValidator_State(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QValidator::Invalid) && (arg <= QValidator::Acceptable)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("State(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QValidator_State_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QValidator::State value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QValidator_State_toString(QScriptContext *context, QScriptEngine *engine) +{ + QValidator::State value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QValidator_State_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QValidator_State_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QValidator_State, + qtscript_QValidator_State_valueOf, qtscript_QValidator_State_toString); + qScriptRegisterMetaType(engine, qtscript_QValidator_State_toScriptValue, + qtscript_QValidator_State_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QValidator_State_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QValidator_State_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QValidator +// + +static QScriptValue qtscript_QValidator_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QValidator* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QValidator.%0(): this object is not a QValidator") + .arg(qtscript_QValidator_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->fixup(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QLocale _q_result = _q_self->locale(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QLocale _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLocale(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + QValidator::State _q_result = _q_self->validate(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QValidator"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QValidator_throw_ambiguity_error_helper(context, + qtscript_QValidator_function_names[_id+1], + qtscript_QValidator_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QValidator_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QValidator(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QValidator* _q_cpp_result = new QtScriptShell_QValidator(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QValidator*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QValidator* _q_cpp_result = new QtScriptShell_QValidator(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QValidator*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QValidator_throw_ambiguity_error_helper(context, + qtscript_QValidator_function_names[_id], + qtscript_QValidator_function_signatures[_id]); +} + +static QScriptValue qtscript_QValidator_toScriptValue(QScriptEngine *engine, QValidator* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QValidator_fromScriptValue(const QScriptValue &value, QValidator* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QValidator_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QValidator*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QValidator_prototype_call, qtscript_QValidator_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QValidator_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QValidator_toScriptValue, + qtscript_QValidator_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QValidator_static_call, proto, qtscript_QValidator_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("State"), + qtscript_create_QValidator_State_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QVector2D.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QVector2D.cpp new file mode 100644 index 00000000..90ffdc14 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QVector2D.cpp @@ -0,0 +1,420 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QVector2D_function_names[] = { + "QVector2D" + // static + , "dotProduct" + // prototype + , "distanceToLine" + , "distanceToPoint" + , "isNull" + , "length" + , "lengthSquared" + , "normalize" + , "normalized" + , "operator_add_assign" + , "operator_divide_assign" + , "equals" + , "operator_multiply_assign" + , "operator_subscript" + , "operator_subtract_assign" + , "setX" + , "setY" + , "toPoint" + , "toPointF" + , "toVector3D" + , "toVector4D" + , "x" + , "y" + , "toString" +}; + +static const char * const qtscript_QVector2D_function_signatures[] = { + "\nQPoint point\nQPointF point\nQVector3D vector\nQVector4D vector\nfloat xpos, float ypos" + // static + , "QVector2D v1, QVector2D v2" + // prototype + , "QVector2D point, QVector2D direction" + , "QVector2D point" + , "" + , "" + , "" + , "" + , "" + , "QVector2D vector" + , "QVector2D vector\nfloat divisor" + , "QVector2D v2" + , "QVector2D vector\nfloat factor" + , "int i\nint i" + , "QVector2D vector" + , "float x" + , "float y" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QVector2D_function_lengths[] = { + 2 + // static + , 2 + // prototype + , 2 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QVector2D_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QVector2D::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QVector2D*) + +// +// QVector2D +// + +static QScriptValue qtscript_QVector2D_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 21; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QVector2D* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QVector2D.%0(): this object is not a QVector2D") + .arg(qtscript_QVector2D_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QVector2D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector2D _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_result = _q_self->distanceToLine(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QVector2D _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_result = _q_self->distanceToPoint(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + float _q_result = _q_self->length(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + float _q_result = _q_self->lengthSquared(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + _q_self->normalize(); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QVector2D _q_result = _q_self->normalized(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QVector2D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector2D& _q_result = _q_self->operator+=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QVector2D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector2D& _q_result = _q_self->operator/=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector2D& _q_result = _q_self->operator/=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 9: + if (context->argumentCount() == 1) { + QVector2D _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = operator==(*_q_self, _q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QVector2D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector2D& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector2D& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 11: + if (context->argumentCount() == 1) { + if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + float& _q_result = _q_self->operator[](_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + float _q_result = _q_self->operator[](_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 12: + if (context->argumentCount() == 1) { + QVector2D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector2D& _q_result = _q_self->operator-=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setX(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setY(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->toPoint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->toPointF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QVector3D _q_result = _q_self->toVector3D(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QVector4D _q_result = _q_self->toVector4D(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + float _q_result = _q_self->x(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + float _q_result = _q_self->y(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QVector2D_throw_ambiguity_error_helper(context, + qtscript_QVector2D_function_names[_id+2], + qtscript_QVector2D_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QVector2D_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QVector2D(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QVector2D _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector2D _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector2D _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector2D _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QVector4D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector2D _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVector2D _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + QVector2D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector2D _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_result = QVector2D::dotProduct(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QVector2D_throw_ambiguity_error_helper(context, + qtscript_QVector2D_function_names[_id], + qtscript_QVector2D_function_signatures[_id]); +} + +QScriptValue qtscript_create_QVector2D_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QVector2D*)0)); + for (int i = 0; i < 22; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QVector2D_prototype_call, qtscript_QVector2D_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QVector2D_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QVector2D_static_call, proto, qtscript_QVector2D_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QVector2D_static_call, + qtscript_QVector2D_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QVector2D_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QVector3D.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QVector3D.cpp new file mode 100644 index 00000000..fe8b2896 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QVector3D.cpp @@ -0,0 +1,526 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QVector3D_function_names[] = { + "QVector3D" + // static + , "crossProduct" + , "dotProduct" + , "normal" + // prototype + , "distanceToLine" + , "distanceToPlane" + , "distanceToPoint" + , "isNull" + , "length" + , "lengthSquared" + , "normalize" + , "normalized" + , "operator_add_assign" + , "operator_divide_assign" + , "equals" + , "operator_multiply_assign" + , "operator_subscript" + , "operator_subtract_assign" + , "project" + , "setX" + , "setY" + , "setZ" + , "toPoint" + , "toPointF" + , "toVector2D" + , "toVector4D" + , "unproject" + , "x" + , "y" + , "z" + , "toString" +}; + +static const char * const qtscript_QVector3D_function_signatures[] = { + "\nQPoint point\nQPointF point\nQVector2D vector\nQVector2D vector, float zpos\nQVector4D vector\nfloat xpos, float ypos, float zpos" + // static + , "QVector3D v1, QVector3D v2" + , "QVector3D v1, QVector3D v2" + , "QVector3D v1, QVector3D v2\nQVector3D v1, QVector3D v2, QVector3D v3" + // prototype + , "QVector3D point, QVector3D direction" + , "QVector3D plane, QVector3D normal\nQVector3D plane1, QVector3D plane2, QVector3D plane3" + , "QVector3D point" + , "" + , "" + , "" + , "" + , "" + , "QVector3D vector" + , "QVector3D vector\nfloat divisor" + , "QVector3D v2" + , "QVector3D vector\nfloat factor" + , "int i\nint i" + , "QVector3D vector" + , "QMatrix4x4 modelView, QMatrix4x4 projection, QRect viewport" + , "float x" + , "float y" + , "float z" + , "" + , "" + , "" + , "" + , "QMatrix4x4 modelView, QMatrix4x4 projection, QRect viewport" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QVector3D_function_lengths[] = { + 3 + // static + , 2 + , 2 + , 3 + // prototype + , 2 + , 3 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 3 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 3 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QVector3D_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QVector3D::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QVector3D*) + +// +// QVector3D +// + +static QScriptValue qtscript_QVector3D_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 26; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QVector3D* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QVector3D.%0(): this object is not a QVector3D") + .arg(qtscript_QVector3D_function_names[_id+4])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_result = _q_self->distanceToLine(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 2) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_result = _q_self->distanceToPlane(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVector3D _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_result = _q_self->distanceToPlane(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_result = _q_self->distanceToPoint(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + float _q_result = _q_self->length(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + float _q_result = _q_self->lengthSquared(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + _q_self->normalize(); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QVector3D _q_result = _q_self->normalized(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D& _q_result = _q_self->operator+=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D& _q_result = _q_self->operator/=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D& _q_result = _q_self->operator/=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 10: + if (context->argumentCount() == 1) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = operator==(*_q_self, _q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 12: + if (context->argumentCount() == 1) { + if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + float& _q_result = _q_self->operator[](_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + float _q_result = _q_self->operator[](_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 13: + if (context->argumentCount() == 1) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D& _q_result = _q_self->operator-=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 3) { + QMatrix4x4 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix4x4 _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRect _q_arg2 = qscriptvalue_cast(context->argument(2)); + QVector3D _q_result = _q_self->project(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setX(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setY(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setZ(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->toPoint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->toPointF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QVector2D _q_result = _q_self->toVector2D(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + QVector4D _q_result = _q_self->toVector4D(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 3) { + QMatrix4x4 _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix4x4 _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRect _q_arg2 = qscriptvalue_cast(context->argument(2)); + QVector3D _q_result = _q_self->unproject(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + float _q_result = _q_self->x(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + float _q_result = _q_self->y(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + float _q_result = _q_self->z(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QVector3D_throw_ambiguity_error_helper(context, + qtscript_QVector3D_function_names[_id+4], + qtscript_QVector3D_function_signatures[_id+4]); +} + +static QScriptValue qtscript_QVector3D_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QVector3D(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QVector3D _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QVector2D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QVector4D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QVector2D _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVector3D _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + QVector3D _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVector3D _q_result = QVector3D::crossProduct(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 2) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_result = QVector3D::dotProduct(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 2) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVector3D _q_result = QVector3D::normal(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVector3D _q_arg2 = qscriptvalue_cast(context->argument(2)); + QVector3D _q_result = QVector3D::normal(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QVector3D_throw_ambiguity_error_helper(context, + qtscript_QVector3D_function_names[_id], + qtscript_QVector3D_function_signatures[_id]); +} + +QScriptValue qtscript_create_QVector3D_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QVector3D*)0)); + for (int i = 0; i < 27; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QVector3D_prototype_call, qtscript_QVector3D_function_lengths[i+4]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QVector3D_function_names[i+4]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QVector3D_static_call, proto, qtscript_QVector3D_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QVector3D_static_call, + qtscript_QVector3D_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QVector3D_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QVector4D.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QVector4D.cpp new file mode 100644 index 00000000..19e66085 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QVector4D.cpp @@ -0,0 +1,474 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QVector4D_function_names[] = { + "QVector4D" + // static + , "dotProduct" + // prototype + , "isNull" + , "length" + , "lengthSquared" + , "normalize" + , "normalized" + , "operator_add_assign" + , "operator_divide_assign" + , "equals" + , "operator_multiply_assign" + , "operator_subscript" + , "operator_subtract_assign" + , "setW" + , "setX" + , "setY" + , "setZ" + , "toPoint" + , "toPointF" + , "toVector2D" + , "toVector2DAffine" + , "toVector3D" + , "toVector3DAffine" + , "w" + , "x" + , "y" + , "z" + , "toString" +}; + +static const char * const qtscript_QVector4D_function_signatures[] = { + "\nQPoint point\nQPointF point\nQVector2D vector\nQVector2D vector, float zpos, float wpos\nQVector3D vector\nQVector3D vector, float wpos\nfloat xpos, float ypos, float zpos, float wpos" + // static + , "QVector4D v1, QVector4D v2" + // prototype + , "" + , "" + , "" + , "" + , "" + , "QVector4D vector" + , "QVector4D vector\nfloat divisor" + , "QVector4D v2" + , "QVector4D vector\nfloat factor" + , "int i\nint i" + , "QVector4D vector" + , "float w" + , "float x" + , "float y" + , "float z" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QVector4D_function_lengths[] = { + 4 + // static + , 2 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QVector4D_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QVector4D::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QVector4D*) + +// +// QVector4D +// + +static QScriptValue qtscript_QVector4D_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 25; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QVector4D* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QVector4D.%0(): this object is not a QVector4D") + .arg(qtscript_QVector4D_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + float _q_result = _q_self->length(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + float _q_result = _q_self->lengthSquared(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->normalize(); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QVector4D _q_result = _q_self->normalized(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QVector4D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector4D& _q_result = _q_self->operator+=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QVector4D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector4D& _q_result = _q_self->operator/=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector4D& _q_result = _q_self->operator/=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 7: + if (context->argumentCount() == 1) { + QVector4D _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = operator==(*_q_self, _q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QVector4D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector4D& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector4D& _q_result = _q_self->operator*=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 9: + if (context->argumentCount() == 1) { + if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + float& _q_result = _q_self->operator[](_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + float _q_result = _q_self->operator[](_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 10: + if (context->argumentCount() == 1) { + QVector4D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector4D& _q_result = _q_self->operator-=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setW(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setX(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setY(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setZ(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->toPoint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->toPointF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QVector2D _q_result = _q_self->toVector2D(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QVector2D _q_result = _q_self->toVector2DAffine(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QVector3D _q_result = _q_self->toVector3D(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QVector3D _q_result = _q_self->toVector3DAffine(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + float _q_result = _q_self->w(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + float _q_result = _q_self->x(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + float _q_result = _q_self->y(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + float _q_result = _q_self->z(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QVector4D_throw_ambiguity_error_helper(context, + qtscript_QVector4D_function_names[_id+2], + qtscript_QVector4D_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QVector4D_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QVector4D(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QVector4D _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector4D _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector4D _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QVector2D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector4D _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector4D _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QVector3D _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVector4D _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + QVector2D _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + QVector4D _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + float _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + QVector4D _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + QVector4D _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector4D _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_result = QVector4D::dotProduct(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QVector4D_throw_ambiguity_error_helper(context, + qtscript_QVector4D_function_names[_id], + qtscript_QVector4D_function_signatures[_id]); +} + +QScriptValue qtscript_create_QVector4D_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QVector4D*)0)); + for (int i = 0; i < 26; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QVector4D_prototype_call, qtscript_QVector4D_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QVector4D_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QVector4D_static_call, proto, qtscript_QVector4D_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QVector4D_static_call, + qtscript_QVector4D_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QVector4D_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QWhatsThisClickedEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QWhatsThisClickedEvent.cpp new file mode 100644 index 00000000..445ec579 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QWhatsThisClickedEvent.cpp @@ -0,0 +1,141 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QWhatsThisClickedEvent_function_names[] = { + "QWhatsThisClickedEvent" + // static + // prototype + , "href" + , "toString" +}; + +static const char * const qtscript_QWhatsThisClickedEvent_function_signatures[] = { + "String href" + // static + // prototype + , "" +"" +}; + +static const int qtscript_QWhatsThisClickedEvent_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 +}; + +static QScriptValue qtscript_QWhatsThisClickedEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QWhatsThisClickedEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QWhatsThisClickedEvent*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QWhatsThisClickedEvent +// + +static QScriptValue qtscript_QWhatsThisClickedEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QWhatsThisClickedEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QWhatsThisClickedEvent.%0(): this object is not a QWhatsThisClickedEvent") + .arg(qtscript_QWhatsThisClickedEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->href(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("QWhatsThisClickedEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QWhatsThisClickedEvent_throw_ambiguity_error_helper(context, + qtscript_QWhatsThisClickedEvent_function_names[_id+1], + qtscript_QWhatsThisClickedEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QWhatsThisClickedEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QWhatsThisClickedEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QWhatsThisClickedEvent* _q_cpp_result = new QWhatsThisClickedEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QWhatsThisClickedEvent_throw_ambiguity_error_helper(context, + qtscript_QWhatsThisClickedEvent_function_names[_id], + qtscript_QWhatsThisClickedEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QWhatsThisClickedEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QWhatsThisClickedEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QWhatsThisClickedEvent_prototype_call, qtscript_QWhatsThisClickedEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QWhatsThisClickedEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QWhatsThisClickedEvent_static_call, proto, qtscript_QWhatsThisClickedEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QWheelEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QWheelEvent.cpp new file mode 100644 index 00000000..8690289f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QWheelEvent.cpp @@ -0,0 +1,326 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QWheelEvent.h" + +static const char * const qtscript_QWheelEvent_function_names[] = { + "QWheelEvent" + // static + // prototype + , "angleDelta" + , "buttons" + , "delta" + , "globalPos" + , "globalPosF" + , "globalX" + , "globalY" + , "orientation" + , "pixelDelta" + , "pos" + , "posF" + , "x" + , "y" + , "toString" +}; + +static const char * const qtscript_QWheelEvent_function_signatures[] = { + "QPointF pos, QPointF globalPos, QPoint pixelDelta, QPoint angleDelta, int qt4Delta, Orientation qt4Orientation, MouseButtons buttons, KeyboardModifiers modifiers\nQPointF pos, QPointF globalPos, int delta, MouseButtons buttons, KeyboardModifiers modifiers, Orientation orient\nQPointF pos, int delta, MouseButtons buttons, KeyboardModifiers modifiers, Orientation orient" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QWheelEvent_function_lengths[] = { + 8 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QWheelEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QWheelEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QWheelEvent*) +Q_DECLARE_METATYPE(QtScriptShell_QWheelEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QInputEvent*) + +// +// QWheelEvent +// + +static QScriptValue qtscript_QWheelEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 13; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QWheelEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QWheelEvent.%0(): this object is not a QWheelEvent") + .arg(qtscript_QWheelEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->angleDelta(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->buttons(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->delta(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->globalPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + const QPointF& _q_result = _q_self->globalPosF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->globalX(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = _q_self->globalY(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + Qt::Orientation _q_result = _q_self->orientation(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->pixelDelta(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + const QPointF& _q_result = _q_self->posF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + int _q_result = _q_self->x(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + int _q_result = _q_self->y(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: { + QString result = QString::fromLatin1("QWheelEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QWheelEvent_throw_ambiguity_error_helper(context, + qtscript_QWheelEvent_function_names[_id+1], + qtscript_QWheelEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QWheelEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QWheelEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 4) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QtScriptShell_QWheelEvent* _q_cpp_result = new QtScriptShell_QWheelEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QWheelEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 5) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && context->argument(2).isNumber() + && (qMetaTypeId >() == context->argument(3).toVariant().userType()) + && (qMetaTypeId >() == context->argument(4).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QFlags _q_arg4 = qscriptvalue_cast >(context->argument(4)); + QtScriptShell_QWheelEvent* _q_cpp_result = new QtScriptShell_QWheelEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QWheelEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && (qMetaTypeId >() == context->argument(2).toVariant().userType()) + && (qMetaTypeId >() == context->argument(3).toVariant().userType()) + && (qMetaTypeId() == context->argument(4).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + Qt::Orientation _q_arg4 = qscriptvalue_cast(context->argument(4)); + QtScriptShell_QWheelEvent* _q_cpp_result = new QtScriptShell_QWheelEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QWheelEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 6) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QFlags _q_arg4 = qscriptvalue_cast >(context->argument(4)); + Qt::Orientation _q_arg5 = qscriptvalue_cast(context->argument(5)); + QtScriptShell_QWheelEvent* _q_cpp_result = new QtScriptShell_QWheelEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QWheelEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 8) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPoint _q_arg2 = qscriptvalue_cast(context->argument(2)); + QPoint _q_arg3 = qscriptvalue_cast(context->argument(3)); + int _q_arg4 = context->argument(4).toInt32(); + Qt::Orientation _q_arg5 = qscriptvalue_cast(context->argument(5)); + QFlags _q_arg6 = qscriptvalue_cast >(context->argument(6)); + QFlags _q_arg7 = qscriptvalue_cast >(context->argument(7)); + QtScriptShell_QWheelEvent* _q_cpp_result = new QtScriptShell_QWheelEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QWheelEvent*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QWheelEvent_throw_ambiguity_error_helper(context, + qtscript_QWheelEvent_function_names[_id], + qtscript_QWheelEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QWheelEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QWheelEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 14; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QWheelEvent_prototype_call, qtscript_QWheelEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QWheelEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QWheelEvent_static_call, proto, qtscript_QWheelEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QWindowStateChangeEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QWindowStateChangeEvent.cpp new file mode 100644 index 00000000..5c77cf54 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscript_QWindowStateChangeEvent.cpp @@ -0,0 +1,158 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QWindowStateChangeEvent_function_names[] = { + "QWindowStateChangeEvent" + // static + // prototype + , "isOverride" + , "oldState" + , "toString" +}; + +static const char * const qtscript_QWindowStateChangeEvent_function_signatures[] = { + "WindowStates aOldState, bool isOverride" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QWindowStateChangeEvent_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QWindowStateChangeEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QWindowStateChangeEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QWindowStateChangeEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QEvent*) + +// +// QWindowStateChangeEvent +// + +static QScriptValue qtscript_QWindowStateChangeEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QWindowStateChangeEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QWindowStateChangeEvent.%0(): this object is not a QWindowStateChangeEvent") + .arg(qtscript_QWindowStateChangeEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isOverride(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->oldState(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QWindowStateChangeEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QWindowStateChangeEvent_throw_ambiguity_error_helper(context, + qtscript_QWindowStateChangeEvent_function_names[_id+1], + qtscript_QWindowStateChangeEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QWindowStateChangeEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QWindowStateChangeEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QWindowStateChangeEvent* _q_cpp_result = new QWindowStateChangeEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + QWindowStateChangeEvent* _q_cpp_result = new QWindowStateChangeEvent(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QWindowStateChangeEvent_throw_ambiguity_error_helper(context, + qtscript_QWindowStateChangeEvent_function_names[_id], + qtscript_QWindowStateChangeEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QWindowStateChangeEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QWindowStateChangeEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QWindowStateChangeEvent_prototype_call, qtscript_QWindowStateChangeEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QWindowStateChangeEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QWindowStateChangeEvent_static_call, proto, qtscript_QWindowStateChangeEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QBitmap.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QBitmap.cpp new file mode 100644 index 00000000..4d143ae5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QBitmap.cpp @@ -0,0 +1,123 @@ +#include "qtscriptshell_QBitmap.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) + +QtScriptShell_QBitmap::QtScriptShell_QBitmap() + : QBitmap() {} + +QtScriptShell_QBitmap::QtScriptShell_QBitmap(const QPixmap& arg__1) + : QBitmap(arg__1) {} + +QtScriptShell_QBitmap::QtScriptShell_QBitmap(const QSize& arg__1) + : QBitmap(arg__1) {} + +QtScriptShell_QBitmap::QtScriptShell_QBitmap(const QString& fileName, const char* format) + : QBitmap(fileName, format) {} + +QtScriptShell_QBitmap::QtScriptShell_QBitmap(int w, int h) + : QBitmap(w, h) {} + +QtScriptShell_QBitmap::~QtScriptShell_QBitmap() {} + +int QtScriptShell_QBitmap::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QBitmap::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QBitmap::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QBitmap::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +int QtScriptShell_QBitmap::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QBitmap::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QPaintEngine* QtScriptShell_QBitmap::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QBitmap::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QPaintDevice* QtScriptShell_QBitmap::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QBitmap::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +QPainter* QtScriptShell_QBitmap::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QBitmap::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QBitmap.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QBitmap.h new file mode 100644 index 00000000..20ec05a8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QBitmap.h @@ -0,0 +1,29 @@ +#ifndef QTSCRIPTSHELL_QBITMAP_H +#define QTSCRIPTSHELL_QBITMAP_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QBitmap : public QBitmap +{ +public: + QtScriptShell_QBitmap(); + QtScriptShell_QBitmap(const QPixmap& arg__1); + QtScriptShell_QBitmap(const QSize& arg__1); + QtScriptShell_QBitmap(const QString& fileName, const char* format = 0); + QtScriptShell_QBitmap(int w, int h); + ~QtScriptShell_QBitmap(); + + int devType() const; + void initPainter(QPainter* painter) const; + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QPaintEngine* paintEngine() const; + QPaintDevice* redirected(QPoint* offset) const; + QPainter* sharedPainter() const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QBITMAP_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QContextMenuEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QContextMenuEvent.cpp new file mode 100644 index 00000000..7a4bc2ba --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QContextMenuEvent.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QContextMenuEvent.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QContextMenuEvent::QtScriptShell_QContextMenuEvent(QContextMenuEvent::Reason reason, const QPoint& pos) + : QContextMenuEvent(reason, pos) {} + +QtScriptShell_QContextMenuEvent::QtScriptShell_QContextMenuEvent(QContextMenuEvent::Reason reason, const QPoint& pos, const QPoint& globalPos) + : QContextMenuEvent(reason, pos, globalPos) {} + +QtScriptShell_QContextMenuEvent::QtScriptShell_QContextMenuEvent(QContextMenuEvent::Reason reason, const QPoint& pos, const QPoint& globalPos, Qt::KeyboardModifiers modifiers) + : QContextMenuEvent(reason, pos, globalPos, modifiers) {} + +QtScriptShell_QContextMenuEvent::~QtScriptShell_QContextMenuEvent() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QContextMenuEvent.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QContextMenuEvent.h new file mode 100644 index 00000000..5c7168c9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QContextMenuEvent.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QCONTEXTMENUEVENT_H +#define QTSCRIPTSHELL_QCONTEXTMENUEVENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QContextMenuEvent : public QContextMenuEvent +{ +public: + QtScriptShell_QContextMenuEvent(QContextMenuEvent::Reason reason, const QPoint& pos); + QtScriptShell_QContextMenuEvent(QContextMenuEvent::Reason reason, const QPoint& pos, const QPoint& globalPos); + QtScriptShell_QContextMenuEvent(QContextMenuEvent::Reason reason, const QPoint& pos, const QPoint& globalPos, Qt::KeyboardModifiers modifiers); + ~QtScriptShell_QContextMenuEvent(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QCONTEXTMENUEVENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDesktopServices.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDesktopServices.cpp new file mode 100644 index 00000000..93ca2ae3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDesktopServices.cpp @@ -0,0 +1,15 @@ +#include "qtscriptshell_QDesktopServices.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QDesktopServices::QtScriptShell_QDesktopServices() + : QDesktopServices() {} + +QtScriptShell_QDesktopServices::~QtScriptShell_QDesktopServices() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDesktopServices.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDesktopServices.h new file mode 100644 index 00000000..b46829da --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDesktopServices.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QDESKTOPSERVICES_H +#define QTSCRIPTSHELL_QDESKTOPSERVICES_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QDesktopServices : public QDesktopServices +{ +public: + QtScriptShell_QDesktopServices(); + ~QtScriptShell_QDesktopServices(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QDESKTOPSERVICES_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDoubleValidator.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDoubleValidator.cpp new file mode 100644 index 00000000..76f0984f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDoubleValidator.cpp @@ -0,0 +1,142 @@ +#include "qtscriptshell_QDoubleValidator.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QValidator::State) + +QtScriptShell_QDoubleValidator::QtScriptShell_QDoubleValidator(QObject* parent) + : QDoubleValidator(parent) {} + +QtScriptShell_QDoubleValidator::QtScriptShell_QDoubleValidator(double bottom, double top, int decimals, QObject* parent) + : QDoubleValidator(bottom, top, decimals, parent) {} + +QtScriptShell_QDoubleValidator::~QtScriptShell_QDoubleValidator() {} + +void QtScriptShell_QDoubleValidator::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QDoubleValidator::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleValidator::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QDoubleValidator::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDoubleValidator::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QDoubleValidator::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QDoubleValidator::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QDoubleValidator::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QDoubleValidator::fixup(QString& arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("fixup"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fixup") & QScriptValue::QObjectMember)) { + QDoubleValidator::fixup(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QDoubleValidator::setRange(double bottom, double top, int decimals) +{ + QScriptValue _q_function = __qtscript_self.property("setRange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setRange") & QScriptValue::QObjectMember)) { + QDoubleValidator::setRange(bottom, top, decimals); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, bottom) + << qScriptValueFromValue(_q_engine, top) + << qScriptValueFromValue(_q_engine, decimals)); + } +} + +void QtScriptShell_QDoubleValidator::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QDoubleValidator::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QValidator::State QtScriptShell_QDoubleValidator::validate(QString& arg__1, int& arg__2) const +{ + QScriptValue _q_function = __qtscript_self.property("validate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("validate") & QScriptValue::QObjectMember)) { + return QDoubleValidator::validate(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDoubleValidator.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDoubleValidator.h new file mode 100644 index 00000000..f88cd0bd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDoubleValidator.h @@ -0,0 +1,28 @@ +#ifndef QTSCRIPTSHELL_QDOUBLEVALIDATOR_H +#define QTSCRIPTSHELL_QDOUBLEVALIDATOR_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QDoubleValidator : public QDoubleValidator +{ +public: + QtScriptShell_QDoubleValidator(QObject* parent = 0); + QtScriptShell_QDoubleValidator(double bottom, double top, int decimals, QObject* parent = 0); + ~QtScriptShell_QDoubleValidator(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fixup(QString& arg__1) const; + void setRange(double bottom, double top, int decimals = 0); + void timerEvent(QTimerEvent* event); + QValidator::State validate(QString& arg__1, int& arg__2) const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QDOUBLEVALIDATOR_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDrag.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDrag.cpp new file mode 100644 index 00000000..3cbea1a5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDrag.cpp @@ -0,0 +1,97 @@ +#include "qtscriptshell_QDrag.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QDrag::QtScriptShell_QDrag(QObject* dragSource) + : QDrag(dragSource) {} + +QtScriptShell_QDrag::~QtScriptShell_QDrag() {} + +void QtScriptShell_QDrag::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QDrag::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDrag::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QDrag::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDrag::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QDrag::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QDrag::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QDrag::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QDrag::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QDrag::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDrag.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDrag.h new file mode 100644 index 00000000..e2f34253 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDrag.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QDRAG_H +#define QTSCRIPTSHELL_QDRAG_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QDrag : public QDrag +{ +public: + QtScriptShell_QDrag(QObject* dragSource); + ~QtScriptShell_QDrag(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QDRAG_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDragMoveEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDragMoveEvent.cpp new file mode 100644 index 00000000..0571900a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDragMoveEvent.cpp @@ -0,0 +1,18 @@ +#include "qtscriptshell_QDragMoveEvent.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QDragMoveEvent::QtScriptShell_QDragMoveEvent(const QPoint& pos, Qt::DropActions actions, const QMimeData* data, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, QEvent::Type type) + : QDragMoveEvent(pos, actions, data, buttons, modifiers, type) {} + +QtScriptShell_QDragMoveEvent::~QtScriptShell_QDragMoveEvent() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDragMoveEvent.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDragMoveEvent.h new file mode 100644 index 00000000..c180e2c6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDragMoveEvent.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QDRAGMOVEEVENT_H +#define QTSCRIPTSHELL_QDRAGMOVEEVENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QDragMoveEvent : public QDragMoveEvent +{ +public: + QtScriptShell_QDragMoveEvent(const QPoint& pos, Qt::DropActions actions, const QMimeData* data, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, QEvent::Type type = QEvent::DragMove); + ~QtScriptShell_QDragMoveEvent(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QDRAGMOVEEVENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDropEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDropEvent.cpp new file mode 100644 index 00000000..31be72ef --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDropEvent.cpp @@ -0,0 +1,17 @@ +#include "qtscriptshell_QDropEvent.h" + +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QDropEvent::QtScriptShell_QDropEvent(const QPointF& pos, Qt::DropActions actions, const QMimeData* data, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, QEvent::Type type) + : QDropEvent(pos, actions, data, buttons, modifiers, type) {} + +QtScriptShell_QDropEvent::~QtScriptShell_QDropEvent() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDropEvent.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDropEvent.h new file mode 100644 index 00000000..845689a6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QDropEvent.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QDROPEVENT_H +#define QTSCRIPTSHELL_QDROPEVENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QDropEvent : public QDropEvent +{ +public: + QtScriptShell_QDropEvent(const QPointF& pos, Qt::DropActions actions, const QMimeData* data, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, QEvent::Type type = QEvent::Drop); + ~QtScriptShell_QDropEvent(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QDROPEVENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QGuiApplication.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QGuiApplication.cpp new file mode 100644 index 00000000..5cdfc3db --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QGuiApplication.cpp @@ -0,0 +1,116 @@ +#include "qtscriptshell_QGuiApplication.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QGuiApplication::QtScriptShell_QGuiApplication(int& argc, char** argv, int arg__3) + : QGuiApplication(argc, argv, arg__3) {} + +QtScriptShell_QGuiApplication::~QtScriptShell_QGuiApplication() {} + +void QtScriptShell_QGuiApplication::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGuiApplication::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGuiApplication::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGuiApplication::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGuiApplication::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGuiApplication::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QGuiApplication::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGuiApplication::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGuiApplication::notify(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("notify"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("notify") & QScriptValue::QObjectMember)) { + return QGuiApplication::notify(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QGuiApplication::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGuiApplication::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QGuiApplication.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QGuiApplication.h new file mode 100644 index 00000000..4e2cc619 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QGuiApplication.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QGUIAPPLICATION_H +#define QTSCRIPTSHELL_QGUIAPPLICATION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGuiApplication : public QGuiApplication +{ +public: + QtScriptShell_QGuiApplication(int& argc, char** argv, int arg__3 = ApplicationFlags); + ~QtScriptShell_QGuiApplication(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* arg__1); + bool eventFilter(QObject* watched, QEvent* event); + bool notify(QObject* arg__1, QEvent* arg__2); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGUIAPPLICATION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QHoverEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QHoverEvent.cpp new file mode 100644 index 00000000..ccb8271f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QHoverEvent.cpp @@ -0,0 +1,15 @@ +#include "qtscriptshell_QHoverEvent.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QHoverEvent::QtScriptShell_QHoverEvent(QEvent::Type type, const QPointF& pos, const QPointF& oldPos, Qt::KeyboardModifiers modifiers) + : QHoverEvent(type, pos, oldPos, modifiers) {} + +QtScriptShell_QHoverEvent::~QtScriptShell_QHoverEvent() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QHoverEvent.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QHoverEvent.h new file mode 100644 index 00000000..6debcc77 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QHoverEvent.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QHOVEREVENT_H +#define QTSCRIPTSHELL_QHOVEREVENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QHoverEvent : public QHoverEvent +{ +public: + QtScriptShell_QHoverEvent(QEvent::Type type, const QPointF& pos, const QPointF& oldPos, Qt::KeyboardModifiers modifiers = Qt::NoModifier); + ~QtScriptShell_QHoverEvent(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QHOVEREVENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImage.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImage.cpp new file mode 100644 index 00000000..8fcbbe1a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImage.cpp @@ -0,0 +1,121 @@ +#include "qtscriptshell_QImage.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) + +QtScriptShell_QImage::QtScriptShell_QImage() + : QImage() {} + +QtScriptShell_QImage::QtScriptShell_QImage(const QImage& arg__1) + : QImage(arg__1) {} + +QtScriptShell_QImage::QtScriptShell_QImage(const QSize& size, QImage::Format format) + : QImage(size, format) {} + +QtScriptShell_QImage::QtScriptShell_QImage(const QString& fileName, const char* format) + : QImage(fileName, format) {} + +QtScriptShell_QImage::QtScriptShell_QImage(int width, int height, QImage::Format format) + : QImage(width, height, format) {} + +QtScriptShell_QImage::~QtScriptShell_QImage() {} + +int QtScriptShell_QImage::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QImage::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QImage::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QImage::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +int QtScriptShell_QImage::metric(QPaintDevice::PaintDeviceMetric metric) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QImage::metric(metric); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, metric))); + } +} + +QPaintEngine* QtScriptShell_QImage::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QImage::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QPaintDevice* QtScriptShell_QImage::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QImage::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +QPainter* QtScriptShell_QImage::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QImage::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImage.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImage.h new file mode 100644 index 00000000..b38bbb36 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImage.h @@ -0,0 +1,30 @@ +#ifndef QTSCRIPTSHELL_QIMAGE_H +#define QTSCRIPTSHELL_QIMAGE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QImage : public QImage +{ +public: + QtScriptShell_QImage(); + QtScriptShell_QImage(const QImage& arg__1); + QtScriptShell_QImage(const QSize& size, QImage::Format format); + QtScriptShell_QImage(const QString& fileName, const char* format = 0); + QtScriptShell_QImage(const char** xpm); + QtScriptShell_QImage(int width, int height, QImage::Format format); + ~QtScriptShell_QImage(); + + int devType() const; + void initPainter(QPainter* painter) const; + int metric(QPaintDevice::PaintDeviceMetric metric) const; + QPaintEngine* paintEngine() const; + QPaintDevice* redirected(QPoint* offset) const; + QPainter* sharedPainter() const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QIMAGE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImageIOHandler.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImageIOHandler.cpp new file mode 100644 index 00000000..8484c9d3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImageIOHandler.cpp @@ -0,0 +1,183 @@ +#include "qtscriptshell_QImageIOHandler.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QImageIOHandler::ImageOption) +Q_DECLARE_METATYPE(QImage*) + +QtScriptShell_QImageIOHandler::QtScriptShell_QImageIOHandler() + : QImageIOHandler() {} + +QtScriptShell_QImageIOHandler::~QtScriptShell_QImageIOHandler() {} + +bool QtScriptShell_QImageIOHandler::canRead() const +{ + QScriptValue _q_function = __qtscript_self.property("canRead"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canRead") & QScriptValue::QObjectMember)) { + qFatal("QImageIOHandler::canRead() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QImageIOHandler::currentImageNumber() const +{ + QScriptValue _q_function = __qtscript_self.property("currentImageNumber"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("currentImageNumber") & QScriptValue::QObjectMember)) { + return QImageIOHandler::currentImageNumber(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QImageIOHandler::currentImageRect() const +{ + QScriptValue _q_function = __qtscript_self.property("currentImageRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("currentImageRect") & QScriptValue::QObjectMember)) { + return QImageIOHandler::currentImageRect(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QImageIOHandler::imageCount() const +{ + QScriptValue _q_function = __qtscript_self.property("imageCount"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("imageCount") & QScriptValue::QObjectMember)) { + return QImageIOHandler::imageCount(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QImageIOHandler::jumpToImage(int imageNumber) +{ + QScriptValue _q_function = __qtscript_self.property("jumpToImage"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("jumpToImage") & QScriptValue::QObjectMember)) { + return QImageIOHandler::jumpToImage(imageNumber); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, imageNumber))); + } +} + +bool QtScriptShell_QImageIOHandler::jumpToNextImage() +{ + QScriptValue _q_function = __qtscript_self.property("jumpToNextImage"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("jumpToNextImage") & QScriptValue::QObjectMember)) { + return QImageIOHandler::jumpToNextImage(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QImageIOHandler::loopCount() const +{ + QScriptValue _q_function = __qtscript_self.property("loopCount"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("loopCount") & QScriptValue::QObjectMember)) { + return QImageIOHandler::loopCount(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QImageIOHandler::nextImageDelay() const +{ + QScriptValue _q_function = __qtscript_self.property("nextImageDelay"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nextImageDelay") & QScriptValue::QObjectMember)) { + return QImageIOHandler::nextImageDelay(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QVariant QtScriptShell_QImageIOHandler::option(QImageIOHandler::ImageOption option) const +{ + QScriptValue _q_function = __qtscript_self.property("option"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("option") & QScriptValue::QObjectMember)) { + return QImageIOHandler::option(option); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, option))); + } +} + +bool QtScriptShell_QImageIOHandler::read(QImage* image) +{ + QScriptValue _q_function = __qtscript_self.property("read"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("read") & QScriptValue::QObjectMember)) { + qFatal("QImageIOHandler::read() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, image))); + } +} + +void QtScriptShell_QImageIOHandler::setOption(QImageIOHandler::ImageOption option, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("setOption"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setOption") & QScriptValue::QObjectMember)) { + QImageIOHandler::setOption(option, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, value)); + } +} + +bool QtScriptShell_QImageIOHandler::supportsOption(QImageIOHandler::ImageOption option) const +{ + QScriptValue _q_function = __qtscript_self.property("supportsOption"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportsOption") & QScriptValue::QObjectMember)) { + return QImageIOHandler::supportsOption(option); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, option))); + } +} + +bool QtScriptShell_QImageIOHandler::write(const QImage& image) +{ + QScriptValue _q_function = __qtscript_self.property("write"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("write") & QScriptValue::QObjectMember)) { + return QImageIOHandler::write(image); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, image))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImageIOHandler.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImageIOHandler.h new file mode 100644 index 00000000..c7e31757 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImageIOHandler.h @@ -0,0 +1,32 @@ +#ifndef QTSCRIPTSHELL_QIMAGEIOHANDLER_H +#define QTSCRIPTSHELL_QIMAGEIOHANDLER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QImageIOHandler : public QImageIOHandler +{ +public: + QtScriptShell_QImageIOHandler(); + ~QtScriptShell_QImageIOHandler(); + + bool canRead() const; + int currentImageNumber() const; + QRect currentImageRect() const; + int imageCount() const; + bool jumpToImage(int imageNumber); + bool jumpToNextImage(); + int loopCount() const; + int nextImageDelay() const; + QVariant option(QImageIOHandler::ImageOption option) const; + bool read(QImage* image); + void setOption(QImageIOHandler::ImageOption option, const QVariant& value); + bool supportsOption(QImageIOHandler::ImageOption option) const; + bool write(const QImage& image); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QIMAGEIOHANDLER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImageIOPlugin.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImageIOPlugin.cpp new file mode 100644 index 00000000..0769c7fb --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImageIOPlugin.cpp @@ -0,0 +1,126 @@ +#include "qtscriptshell_QImageIOPlugin.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QImageIOHandler*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QImageIOPlugin::QtScriptShell_QImageIOPlugin(QObject* parent) + : QImageIOPlugin(parent) {} + +QtScriptShell_QImageIOPlugin::~QtScriptShell_QImageIOPlugin() {} + +QImageIOPlugin::Capabilities QtScriptShell_QImageIOPlugin::capabilities(QIODevice* device, const QByteArray& format) const +{ + QScriptValue _q_function = __qtscript_self.property("capabilities"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("capabilities") & QScriptValue::QObjectMember)) { + qFatal("QImageIOPlugin::capabilities() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, device) + << qScriptValueFromValue(_q_engine, format))); + } +} + +void QtScriptShell_QImageIOPlugin::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QImageIOPlugin::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QImageIOHandler* QtScriptShell_QImageIOPlugin::create(QIODevice* device, const QByteArray& format) const +{ + QScriptValue _q_function = __qtscript_self.property("create"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("create") & QScriptValue::QObjectMember)) { + qFatal("QImageIOPlugin::create() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, device) + << qScriptValueFromValue(_q_engine, format))); + } +} + +void QtScriptShell_QImageIOPlugin::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QImageIOPlugin::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QImageIOPlugin::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QImageIOPlugin::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QImageIOPlugin::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QImageIOPlugin::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QImageIOPlugin::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QImageIOPlugin::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImageIOPlugin.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImageIOPlugin.h new file mode 100644 index 00000000..40aad87c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QImageIOPlugin.h @@ -0,0 +1,26 @@ +#ifndef QTSCRIPTSHELL_QIMAGEIOPLUGIN_H +#define QTSCRIPTSHELL_QIMAGEIOPLUGIN_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QImageIOPlugin : public QImageIOPlugin +{ +public: + QtScriptShell_QImageIOPlugin(QObject* parent = 0); + ~QtScriptShell_QImageIOPlugin(); + + QImageIOPlugin::Capabilities capabilities(QIODevice* device, const QByteArray& format) const; + void childEvent(QChildEvent* event); + QImageIOHandler* create(QIODevice* device, const QByteArray& format = QByteArray()) const; + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QIMAGEIOPLUGIN_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QInputEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QInputEvent.cpp new file mode 100644 index 00000000..18351b40 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QInputEvent.cpp @@ -0,0 +1,14 @@ +#include "qtscriptshell_QInputEvent.h" + +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QInputEvent::QtScriptShell_QInputEvent(QEvent::Type type, Qt::KeyboardModifiers modifiers) + : QInputEvent(type, modifiers) {} + +QtScriptShell_QInputEvent::~QtScriptShell_QInputEvent() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QInputEvent.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QInputEvent.h new file mode 100644 index 00000000..74991d0f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QInputEvent.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QINPUTEVENT_H +#define QTSCRIPTSHELL_QINPUTEVENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QInputEvent : public QInputEvent +{ +public: + QtScriptShell_QInputEvent(QEvent::Type type, Qt::KeyboardModifiers modifiers = Qt::NoModifier); + ~QtScriptShell_QInputEvent(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QINPUTEVENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QIntValidator.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QIntValidator.cpp new file mode 100644 index 00000000..4452251f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QIntValidator.cpp @@ -0,0 +1,141 @@ +#include "qtscriptshell_QIntValidator.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QValidator::State) + +QtScriptShell_QIntValidator::QtScriptShell_QIntValidator(QObject* parent) + : QIntValidator(parent) {} + +QtScriptShell_QIntValidator::QtScriptShell_QIntValidator(int bottom, int top, QObject* parent) + : QIntValidator(bottom, top, parent) {} + +QtScriptShell_QIntValidator::~QtScriptShell_QIntValidator() {} + +void QtScriptShell_QIntValidator::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QIntValidator::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QIntValidator::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QIntValidator::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QIntValidator::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QIntValidator::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QIntValidator::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QIntValidator::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QIntValidator::fixup(QString& input) const +{ + QScriptValue _q_function = __qtscript_self.property("fixup"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fixup") & QScriptValue::QObjectMember)) { + QIntValidator::fixup(input); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, input)); + } +} + +void QtScriptShell_QIntValidator::setRange(int bottom, int top) +{ + QScriptValue _q_function = __qtscript_self.property("setRange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setRange") & QScriptValue::QObjectMember)) { + QIntValidator::setRange(bottom, top); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, bottom) + << qScriptValueFromValue(_q_engine, top)); + } +} + +void QtScriptShell_QIntValidator::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QIntValidator::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QValidator::State QtScriptShell_QIntValidator::validate(QString& arg__1, int& arg__2) const +{ + QScriptValue _q_function = __qtscript_self.property("validate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("validate") & QScriptValue::QObjectMember)) { + return QIntValidator::validate(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QIntValidator.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QIntValidator.h new file mode 100644 index 00000000..b47bafed --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QIntValidator.h @@ -0,0 +1,28 @@ +#ifndef QTSCRIPTSHELL_QINTVALIDATOR_H +#define QTSCRIPTSHELL_QINTVALIDATOR_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QIntValidator : public QIntValidator +{ +public: + QtScriptShell_QIntValidator(QObject* parent = 0); + QtScriptShell_QIntValidator(int bottom, int top, QObject* parent = 0); + ~QtScriptShell_QIntValidator(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fixup(QString& input) const; + void setRange(int bottom, int top); + void timerEvent(QTimerEvent* event); + QValidator::State validate(QString& arg__1, int& arg__2) const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QINTVALIDATOR_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QKeyEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QKeyEvent.cpp new file mode 100644 index 00000000..09307d37 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QKeyEvent.cpp @@ -0,0 +1,17 @@ +#include "qtscriptshell_QKeyEvent.h" + +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QKeyEvent::QtScriptShell_QKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString& text, bool autorep, ushort count) + : QKeyEvent(type, key, modifiers, text, autorep, count) {} + +QtScriptShell_QKeyEvent::QtScriptShell_QKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, const QString& text, bool autorep, ushort count) + : QKeyEvent(type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count) {} + +QtScriptShell_QKeyEvent::~QtScriptShell_QKeyEvent() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QKeyEvent.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QKeyEvent.h new file mode 100644 index 00000000..fae743ac --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QKeyEvent.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QKEYEVENT_H +#define QTSCRIPTSHELL_QKEYEVENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QKeyEvent : public QKeyEvent +{ +public: + QtScriptShell_QKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString& text = QString(), bool autorep = false, ushort count = 1); + QtScriptShell_QKeyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, unsigned int nativeScanCode, unsigned int nativeVirtualKey, unsigned int nativeModifiers, const QString& text = QString(), bool autorep = false, ushort count = 1); + ~QtScriptShell_QKeyEvent(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QKEYEVENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMatrix3x3.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMatrix3x3.cpp new file mode 100644 index 00000000..b5a3c701 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMatrix3x3.cpp @@ -0,0 +1,13 @@ +#include "qtscriptshell_QMatrix3x3.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QMatrix3x3::QtScriptShell_QMatrix3x3() + : QMatrix3x3() {} + +QtScriptShell_QMatrix3x3::~QtScriptShell_QMatrix3x3() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMatrix3x3.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMatrix3x3.h new file mode 100644 index 00000000..ec80492b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMatrix3x3.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QMATRIX3X3_H +#define QTSCRIPTSHELL_QMATRIX3X3_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QMatrix3x3 : public QMatrix3x3 +{ +public: + QtScriptShell_QMatrix3x3(); + ~QtScriptShell_QMatrix3x3(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QMATRIX3X3_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMouseEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMouseEvent.cpp new file mode 100644 index 00000000..9582998d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMouseEvent.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QMouseEvent.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QMouseEvent::QtScriptShell_QMouseEvent(QEvent::Type type, const QPointF& localPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) + : QMouseEvent(type, localPos, button, buttons, modifiers) {} + +QtScriptShell_QMouseEvent::QtScriptShell_QMouseEvent(QEvent::Type type, const QPointF& localPos, const QPointF& screenPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) + : QMouseEvent(type, localPos, screenPos, button, buttons, modifiers) {} + +QtScriptShell_QMouseEvent::QtScriptShell_QMouseEvent(QEvent::Type type, const QPointF& localPos, const QPointF& windowPos, const QPointF& screenPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) + : QMouseEvent(type, localPos, windowPos, screenPos, button, buttons, modifiers) {} + +QtScriptShell_QMouseEvent::~QtScriptShell_QMouseEvent() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMouseEvent.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMouseEvent.h new file mode 100644 index 00000000..4c24dd06 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMouseEvent.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QMOUSEEVENT_H +#define QTSCRIPTSHELL_QMOUSEEVENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QMouseEvent : public QMouseEvent +{ +public: + QtScriptShell_QMouseEvent(QEvent::Type type, const QPointF& localPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers); + QtScriptShell_QMouseEvent(QEvent::Type type, const QPointF& localPos, const QPointF& screenPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers); + QtScriptShell_QMouseEvent(QEvent::Type type, const QPointF& localPos, const QPointF& windowPos, const QPointF& screenPos, Qt::MouseButton button, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers); + ~QtScriptShell_QMouseEvent(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QMOUSEEVENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMoveEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMoveEvent.cpp new file mode 100644 index 00000000..75c8dc92 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMoveEvent.cpp @@ -0,0 +1,15 @@ +#include "qtscriptshell_QMoveEvent.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QMoveEvent::QtScriptShell_QMoveEvent(const QPoint& pos, const QPoint& oldPos) + : QMoveEvent(pos, oldPos) {} + +QtScriptShell_QMoveEvent::~QtScriptShell_QMoveEvent() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMoveEvent.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMoveEvent.h new file mode 100644 index 00000000..b0719af0 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMoveEvent.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QMOVEEVENT_H +#define QTSCRIPTSHELL_QMOVEEVENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QMoveEvent : public QMoveEvent +{ +public: + QtScriptShell_QMoveEvent(const QPoint& pos, const QPoint& oldPos); + ~QtScriptShell_QMoveEvent(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QMOVEEVENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMovie.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMovie.cpp new file mode 100644 index 00000000..a009029d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMovie.cpp @@ -0,0 +1,109 @@ +#include "qtscriptshell_QMovie.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QMovie::QtScriptShell_QMovie(QIODevice* device, const QByteArray& format, QObject* parent) + : QMovie(device, format, parent) {} + +QtScriptShell_QMovie::QtScriptShell_QMovie(QObject* parent) + : QMovie(parent) {} + +QtScriptShell_QMovie::QtScriptShell_QMovie(const QString& fileName, const QByteArray& format, QObject* parent) + : QMovie(fileName, format, parent) {} + +QtScriptShell_QMovie::~QtScriptShell_QMovie() {} + +void QtScriptShell_QMovie::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QMovie::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMovie::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QMovie::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMovie::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QMovie::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QMovie::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QMovie::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QMovie::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QMovie::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMovie.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMovie.h new file mode 100644 index 00000000..08d2c6c4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QMovie.h @@ -0,0 +1,26 @@ +#ifndef QTSCRIPTSHELL_QMOVIE_H +#define QTSCRIPTSHELL_QMOVIE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QMovie : public QMovie +{ +public: + QtScriptShell_QMovie(QIODevice* device, const QByteArray& format = QByteArray(), QObject* parent = 0); + QtScriptShell_QMovie(QObject* parent = 0); + QtScriptShell_QMovie(const QString& fileName, const QByteArray& format = QByteArray(), QObject* parent = 0); + ~QtScriptShell_QMovie(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QMOVIE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEngine.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEngine.cpp new file mode 100644 index 00000000..447986af --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEngine.cpp @@ -0,0 +1,326 @@ +#include "qtscriptshell_QPaintEngine.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(const QLine*) +Q_DECLARE_METATYPE(const QLineF*) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(const QPoint*) +Q_DECLARE_METATYPE(const QPointF*) +Q_DECLARE_METATYPE(QPaintEngine::PolygonDrawMode) +Q_DECLARE_METATYPE(const QRect*) +Q_DECLARE_METATYPE(const QRectF*) +Q_DECLARE_METATYPE(QTextItem) +Q_DECLARE_METATYPE(QPaintEngine::Type) +Q_DECLARE_METATYPE(QPaintEngineState) + +QtScriptShell_QPaintEngine::QtScriptShell_QPaintEngine(QPaintEngine::PaintEngineFeatures features) + : QPaintEngine(features) {} + +QtScriptShell_QPaintEngine::~QtScriptShell_QPaintEngine() {} + +bool QtScriptShell_QPaintEngine::begin(QPaintDevice* pdev) +{ + QScriptValue _q_function = __qtscript_self.property("begin"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("begin") & QScriptValue::QObjectMember)) { + qFatal("QPaintEngine::begin() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pdev))); + } +} + +QPoint QtScriptShell_QPaintEngine::coordinateOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("coordinateOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("coordinateOffset") & QScriptValue::QObjectMember)) { + return QPaintEngine::coordinateOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPaintEngine::drawEllipse(const QRect& r) +{ + QScriptValue _q_function = __qtscript_self.property("drawEllipse"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawEllipse") & QScriptValue::QObjectMember)) { + QPaintEngine::drawEllipse(r); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, r)); + } +} + +void QtScriptShell_QPaintEngine::drawEllipse(const QRectF& r) +{ + QScriptValue _q_function = __qtscript_self.property("drawEllipse"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawEllipse") & QScriptValue::QObjectMember)) { + QPaintEngine::drawEllipse(r); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, r)); + } +} + +void QtScriptShell_QPaintEngine::drawImage(const QRectF& r, const QImage& pm, const QRectF& sr, Qt::ImageConversionFlags flags) +{ + QScriptValue _q_function = __qtscript_self.property("drawImage"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawImage") & QScriptValue::QObjectMember)) { + QPaintEngine::drawImage(r, pm, sr, flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, r) + << qScriptValueFromValue(_q_engine, pm) + << qScriptValueFromValue(_q_engine, sr) + << qScriptValueFromValue(_q_engine, flags)); + } +} + +void QtScriptShell_QPaintEngine::drawLines(const QLine* lines, int lineCount) +{ + QScriptValue _q_function = __qtscript_self.property("drawLines"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawLines") & QScriptValue::QObjectMember)) { + QPaintEngine::drawLines(lines, lineCount); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(lines)) + << qScriptValueFromValue(_q_engine, lineCount)); + } +} + +void QtScriptShell_QPaintEngine::drawLines(const QLineF* lines, int lineCount) +{ + QScriptValue _q_function = __qtscript_self.property("drawLines"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawLines") & QScriptValue::QObjectMember)) { + QPaintEngine::drawLines(lines, lineCount); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(lines)) + << qScriptValueFromValue(_q_engine, lineCount)); + } +} + +void QtScriptShell_QPaintEngine::drawPath(const QPainterPath& path) +{ + QScriptValue _q_function = __qtscript_self.property("drawPath"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawPath") & QScriptValue::QObjectMember)) { + QPaintEngine::drawPath(path); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, path)); + } +} + +void QtScriptShell_QPaintEngine::drawPixmap(const QRectF& r, const QPixmap& pm, const QRectF& sr) +{ + QScriptValue _q_function = __qtscript_self.property("drawPixmap"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawPixmap") & QScriptValue::QObjectMember)) { + qFatal("QPaintEngine::drawPixmap() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, r) + << qScriptValueFromValue(_q_engine, pm) + << qScriptValueFromValue(_q_engine, sr)); + } +} + +void QtScriptShell_QPaintEngine::drawPoints(const QPoint* points, int pointCount) +{ + QScriptValue _q_function = __qtscript_self.property("drawPoints"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawPoints") & QScriptValue::QObjectMember)) { + QPaintEngine::drawPoints(points, pointCount); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(points)) + << qScriptValueFromValue(_q_engine, pointCount)); + } +} + +void QtScriptShell_QPaintEngine::drawPoints(const QPointF* points, int pointCount) +{ + QScriptValue _q_function = __qtscript_self.property("drawPoints"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawPoints") & QScriptValue::QObjectMember)) { + QPaintEngine::drawPoints(points, pointCount); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(points)) + << qScriptValueFromValue(_q_engine, pointCount)); + } +} + +void QtScriptShell_QPaintEngine::drawPolygon(const QPoint* points, int pointCount, QPaintEngine::PolygonDrawMode mode) +{ + QScriptValue _q_function = __qtscript_self.property("drawPolygon"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawPolygon") & QScriptValue::QObjectMember)) { + QPaintEngine::drawPolygon(points, pointCount, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(points)) + << qScriptValueFromValue(_q_engine, pointCount) + << qScriptValueFromValue(_q_engine, mode)); + } +} + +void QtScriptShell_QPaintEngine::drawPolygon(const QPointF* points, int pointCount, QPaintEngine::PolygonDrawMode mode) +{ + QScriptValue _q_function = __qtscript_self.property("drawPolygon"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawPolygon") & QScriptValue::QObjectMember)) { + QPaintEngine::drawPolygon(points, pointCount, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(points)) + << qScriptValueFromValue(_q_engine, pointCount) + << qScriptValueFromValue(_q_engine, mode)); + } +} + +void QtScriptShell_QPaintEngine::drawRects(const QRect* rects, int rectCount) +{ + QScriptValue _q_function = __qtscript_self.property("drawRects"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawRects") & QScriptValue::QObjectMember)) { + QPaintEngine::drawRects(rects, rectCount); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(rects)) + << qScriptValueFromValue(_q_engine, rectCount)); + } +} + +void QtScriptShell_QPaintEngine::drawRects(const QRectF* rects, int rectCount) +{ + QScriptValue _q_function = __qtscript_self.property("drawRects"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawRects") & QScriptValue::QObjectMember)) { + QPaintEngine::drawRects(rects, rectCount); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(rects)) + << qScriptValueFromValue(_q_engine, rectCount)); + } +} + +void QtScriptShell_QPaintEngine::drawTextItem(const QPointF& p, const QTextItem& textItem) +{ + QScriptValue _q_function = __qtscript_self.property("drawTextItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawTextItem") & QScriptValue::QObjectMember)) { + QPaintEngine::drawTextItem(p, textItem); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, p) + << qScriptValueFromValue(_q_engine, textItem)); + } +} + +void QtScriptShell_QPaintEngine::drawTiledPixmap(const QRectF& r, const QPixmap& pixmap, const QPointF& s) +{ + QScriptValue _q_function = __qtscript_self.property("drawTiledPixmap"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawTiledPixmap") & QScriptValue::QObjectMember)) { + QPaintEngine::drawTiledPixmap(r, pixmap, s); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, r) + << qScriptValueFromValue(_q_engine, pixmap) + << qScriptValueFromValue(_q_engine, s)); + } +} + +bool QtScriptShell_QPaintEngine::end() +{ + QScriptValue _q_function = __qtscript_self.property("end"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("end") & QScriptValue::QObjectMember)) { + qFatal("QPaintEngine::end() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QPaintEngine::Type QtScriptShell_QPaintEngine::type() const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + qFatal("QPaintEngine::type() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPaintEngine::updateState(const QPaintEngineState& state) +{ + QScriptValue _q_function = __qtscript_self.property("updateState"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateState") & QScriptValue::QObjectMember)) { + qFatal("QPaintEngine::updateState() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, state)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEngine.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEngine.h new file mode 100644 index 00000000..8342a68c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEngine.h @@ -0,0 +1,39 @@ +#ifndef QTSCRIPTSHELL_QPAINTENGINE_H +#define QTSCRIPTSHELL_QPAINTENGINE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPaintEngine : public QPaintEngine +{ +public: + QtScriptShell_QPaintEngine(QPaintEngine::PaintEngineFeatures features = PaintEngineFeatures()); + ~QtScriptShell_QPaintEngine(); + + bool begin(QPaintDevice* pdev); + QPoint coordinateOffset() const; + void drawEllipse(const QRect& r); + void drawEllipse(const QRectF& r); + void drawImage(const QRectF& r, const QImage& pm, const QRectF& sr, Qt::ImageConversionFlags flags = Qt::AutoColor); + void drawLines(const QLine* lines, int lineCount); + void drawLines(const QLineF* lines, int lineCount); + void drawPath(const QPainterPath& path); + void drawPixmap(const QRectF& r, const QPixmap& pm, const QRectF& sr); + void drawPoints(const QPoint* points, int pointCount); + void drawPoints(const QPointF* points, int pointCount); + void drawPolygon(const QPoint* points, int pointCount, QPaintEngine::PolygonDrawMode mode); + void drawPolygon(const QPointF* points, int pointCount, QPaintEngine::PolygonDrawMode mode); + void drawRects(const QRect* rects, int rectCount); + void drawRects(const QRectF* rects, int rectCount); + void drawTextItem(const QPointF& p, const QTextItem& textItem); + void drawTiledPixmap(const QRectF& r, const QPixmap& pixmap, const QPointF& s); + bool end(); + QPaintEngine::Type type() const; + void updateState(const QPaintEngineState& state); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPAINTENGINE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEngineState.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEngineState.cpp new file mode 100644 index 00000000..f7cc188b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEngineState.cpp @@ -0,0 +1,23 @@ +#include "qtscriptshell_QPaintEngineState.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QPaintEngineState::QtScriptShell_QPaintEngineState() + : QPaintEngineState() {} + +QtScriptShell_QPaintEngineState::~QtScriptShell_QPaintEngineState() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEngineState.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEngineState.h new file mode 100644 index 00000000..e3403070 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEngineState.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QPAINTENGINESTATE_H +#define QTSCRIPTSHELL_QPAINTENGINESTATE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPaintEngineState : public QPaintEngineState +{ +public: + QtScriptShell_QPaintEngineState(); + ~QtScriptShell_QPaintEngineState(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPAINTENGINESTATE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEvent.cpp new file mode 100644 index 00000000..214fa03d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEvent.cpp @@ -0,0 +1,19 @@ +#include "qtscriptshell_QPaintEvent.h" + +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QPaintEvent::QtScriptShell_QPaintEvent(const QRect& paintRect) + : QPaintEvent(paintRect) {} + +QtScriptShell_QPaintEvent::QtScriptShell_QPaintEvent(const QRegion& paintRegion) + : QPaintEvent(paintRegion) {} + +QtScriptShell_QPaintEvent::~QtScriptShell_QPaintEvent() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEvent.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEvent.h new file mode 100644 index 00000000..1234a2f7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPaintEvent.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QPAINTEVENT_H +#define QTSCRIPTSHELL_QPAINTEVENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPaintEvent : public QPaintEvent +{ +public: + QtScriptShell_QPaintEvent(const QRect& paintRect); + QtScriptShell_QPaintEvent(const QRegion& paintRegion); + ~QtScriptShell_QPaintEvent(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPAINTEVENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPicture.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPicture.cpp new file mode 100644 index 00000000..a2fffdd9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPicture.cpp @@ -0,0 +1,103 @@ +#include "qtscriptshell_QPicture.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) + +QtScriptShell_QPicture::QtScriptShell_QPicture(const QPicture& arg__1) + : QPicture(arg__1) {} + +QtScriptShell_QPicture::QtScriptShell_QPicture(int formatVersion) + : QPicture(formatVersion) {} + +QtScriptShell_QPicture::~QtScriptShell_QPicture() {} + +int QtScriptShell_QPicture::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QPicture::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPicture::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QPicture::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +int QtScriptShell_QPicture::metric(QPaintDevice::PaintDeviceMetric m) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QPicture::metric(m); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, m))); + } +} + +QPaintEngine* QtScriptShell_QPicture::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QPicture::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QPaintDevice* QtScriptShell_QPicture::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QPicture::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +QPainter* QtScriptShell_QPicture::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QPicture::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPicture.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPicture.h new file mode 100644 index 00000000..9ac2dca1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPicture.h @@ -0,0 +1,26 @@ +#ifndef QTSCRIPTSHELL_QPICTURE_H +#define QTSCRIPTSHELL_QPICTURE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPicture : public QPicture +{ +public: + QtScriptShell_QPicture(const QPicture& arg__1); + QtScriptShell_QPicture(int formatVersion = -1); + ~QtScriptShell_QPicture(); + + int devType() const; + void initPainter(QPainter* painter) const; + int metric(QPaintDevice::PaintDeviceMetric m) const; + QPaintEngine* paintEngine() const; + QPaintDevice* redirected(QPoint* offset) const; + QPainter* sharedPainter() const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPICTURE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPixmap.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPixmap.cpp new file mode 100644 index 00000000..a21cf276 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPixmap.cpp @@ -0,0 +1,126 @@ +#include "qtscriptshell_QPixmap.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) + +QtScriptShell_QPixmap::QtScriptShell_QPixmap() + : QPixmap() {} + +QtScriptShell_QPixmap::QtScriptShell_QPixmap(const QPixmap& arg__1) + : QPixmap(arg__1) {} + +QtScriptShell_QPixmap::QtScriptShell_QPixmap(const QSize& arg__1) + : QPixmap(arg__1) {} + +QtScriptShell_QPixmap::QtScriptShell_QPixmap(const QString& fileName, const char* format, Qt::ImageConversionFlags flags) + : QPixmap(fileName, format, flags) {} + +QtScriptShell_QPixmap::QtScriptShell_QPixmap(const char** xpm) + : QPixmap(xpm) {} + +QtScriptShell_QPixmap::QtScriptShell_QPixmap(int w, int h) + : QPixmap(w, h) {} + +QtScriptShell_QPixmap::~QtScriptShell_QPixmap() {} + +int QtScriptShell_QPixmap::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QPixmap::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPixmap::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QPixmap::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +int QtScriptShell_QPixmap::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QPixmap::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QPaintEngine* QtScriptShell_QPixmap::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QPixmap::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QPaintDevice* QtScriptShell_QPixmap::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QPixmap::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +QPainter* QtScriptShell_QPixmap::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QPixmap::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPixmap.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPixmap.h new file mode 100644 index 00000000..c840f528 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPixmap.h @@ -0,0 +1,30 @@ +#ifndef QTSCRIPTSHELL_QPIXMAP_H +#define QTSCRIPTSHELL_QPIXMAP_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPixmap : public QPixmap +{ +public: + QtScriptShell_QPixmap(); + QtScriptShell_QPixmap(const QPixmap& arg__1); + QtScriptShell_QPixmap(const QSize& arg__1); + QtScriptShell_QPixmap(const QString& fileName, const char* format = 0, Qt::ImageConversionFlags flags = Qt::AutoColor); + QtScriptShell_QPixmap(const char** xpm); + QtScriptShell_QPixmap(int w, int h); + ~QtScriptShell_QPixmap(); + + int devType() const; + void initPainter(QPainter* painter) const; + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QPaintEngine* paintEngine() const; + QPaintDevice* redirected(QPoint* offset) const; + QPainter* sharedPainter() const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPIXMAP_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPixmapCache.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPixmapCache.cpp new file mode 100644 index 00000000..74ccee7d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPixmapCache.cpp @@ -0,0 +1,15 @@ +#include "qtscriptshell_QPixmapCache.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QPixmapCache::QtScriptShell_QPixmapCache() + : QPixmapCache() {} + +QtScriptShell_QPixmapCache::~QtScriptShell_QPixmapCache() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPixmapCache.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPixmapCache.h new file mode 100644 index 00000000..47993f2e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QPixmapCache.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QPIXMAPCACHE_H +#define QTSCRIPTSHELL_QPIXMAPCACHE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPixmapCache : public QPixmapCache +{ +public: + QtScriptShell_QPixmapCache(); + ~QtScriptShell_QPixmapCache(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPIXMAPCACHE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QRegExpValidator.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QRegExpValidator.cpp new file mode 100644 index 00000000..a4642c4c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QRegExpValidator.cpp @@ -0,0 +1,127 @@ +#include "qtscriptshell_QRegExpValidator.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QValidator::State) + +QtScriptShell_QRegExpValidator::QtScriptShell_QRegExpValidator(QObject* parent) + : QRegExpValidator(parent) {} + +QtScriptShell_QRegExpValidator::QtScriptShell_QRegExpValidator(const QRegExp& rx, QObject* parent) + : QRegExpValidator(rx, parent) {} + +QtScriptShell_QRegExpValidator::~QtScriptShell_QRegExpValidator() {} + +void QtScriptShell_QRegExpValidator::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QRegExpValidator::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRegExpValidator::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QRegExpValidator::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QRegExpValidator::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QRegExpValidator::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QRegExpValidator::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QRegExpValidator::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QRegExpValidator::fixup(QString& arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("fixup"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fixup") & QScriptValue::QObjectMember)) { + QRegExpValidator::fixup(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QRegExpValidator::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QRegExpValidator::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QValidator::State QtScriptShell_QRegExpValidator::validate(QString& input, int& pos) const +{ + QScriptValue _q_function = __qtscript_self.property("validate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("validate") & QScriptValue::QObjectMember)) { + return QRegExpValidator::validate(input, pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, input) + << qScriptValueFromValue(_q_engine, pos))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QRegExpValidator.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QRegExpValidator.h new file mode 100644 index 00000000..6684f4c9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QRegExpValidator.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QREGEXPVALIDATOR_H +#define QTSCRIPTSHELL_QREGEXPVALIDATOR_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QRegExpValidator : public QRegExpValidator +{ +public: + QtScriptShell_QRegExpValidator(QObject* parent = 0); + QtScriptShell_QRegExpValidator(const QRegExp& rx, QObject* parent = 0); + ~QtScriptShell_QRegExpValidator(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fixup(QString& arg__1) const; + void timerEvent(QTimerEvent* event); + QValidator::State validate(QString& input, int& pos) const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QREGEXPVALIDATOR_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QResizeEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QResizeEvent.cpp new file mode 100644 index 00000000..e76f3fea --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QResizeEvent.cpp @@ -0,0 +1,15 @@ +#include "qtscriptshell_QResizeEvent.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QResizeEvent::QtScriptShell_QResizeEvent(const QSize& size, const QSize& oldSize) + : QResizeEvent(size, oldSize) {} + +QtScriptShell_QResizeEvent::~QtScriptShell_QResizeEvent() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QResizeEvent.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QResizeEvent.h new file mode 100644 index 00000000..dbb63fdd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QResizeEvent.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QRESIZEEVENT_H +#define QTSCRIPTSHELL_QRESIZEEVENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QResizeEvent : public QResizeEvent +{ +public: + QtScriptShell_QResizeEvent(const QSize& size, const QSize& oldSize); + ~QtScriptShell_QResizeEvent(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QRESIZEEVENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QShortcutEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QShortcutEvent.cpp new file mode 100644 index 00000000..ff3d7300 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QShortcutEvent.cpp @@ -0,0 +1,15 @@ +#include "qtscriptshell_QShortcutEvent.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QShortcutEvent::QtScriptShell_QShortcutEvent(const QKeySequence& key, int id, bool ambiguous) + : QShortcutEvent(key, id, ambiguous) {} + +QtScriptShell_QShortcutEvent::~QtScriptShell_QShortcutEvent() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QShortcutEvent.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QShortcutEvent.h new file mode 100644 index 00000000..9db05982 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QShortcutEvent.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QSHORTCUTEVENT_H +#define QTSCRIPTSHELL_QSHORTCUTEVENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QShortcutEvent : public QShortcutEvent +{ +public: + QtScriptShell_QShortcutEvent(const QKeySequence& key, int id, bool ambiguous = false); + ~QtScriptShell_QShortcutEvent(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSHORTCUTEVENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QSyntaxHighlighter.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QSyntaxHighlighter.cpp new file mode 100644 index 00000000..c791436a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QSyntaxHighlighter.cpp @@ -0,0 +1,114 @@ +#include "qtscriptshell_QSyntaxHighlighter.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QSyntaxHighlighter::QtScriptShell_QSyntaxHighlighter(QObject* parent) + : QSyntaxHighlighter(parent) {} + +QtScriptShell_QSyntaxHighlighter::QtScriptShell_QSyntaxHighlighter(QTextDocument* parent) + : QSyntaxHighlighter(parent) {} + +QtScriptShell_QSyntaxHighlighter::~QtScriptShell_QSyntaxHighlighter() {} + +void QtScriptShell_QSyntaxHighlighter::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSyntaxHighlighter::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSyntaxHighlighter::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSyntaxHighlighter::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSyntaxHighlighter::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSyntaxHighlighter::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QSyntaxHighlighter::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSyntaxHighlighter::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSyntaxHighlighter::highlightBlock(const QString& text) +{ + QScriptValue _q_function = __qtscript_self.property("highlightBlock"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("highlightBlock") & QScriptValue::QObjectMember)) { + qFatal("QSyntaxHighlighter::highlightBlock() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, text)); + } +} + +void QtScriptShell_QSyntaxHighlighter::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSyntaxHighlighter::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QSyntaxHighlighter.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QSyntaxHighlighter.h new file mode 100644 index 00000000..271bc3fa --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QSyntaxHighlighter.h @@ -0,0 +1,26 @@ +#ifndef QTSCRIPTSHELL_QSYNTAXHIGHLIGHTER_H +#define QTSCRIPTSHELL_QSYNTAXHIGHLIGHTER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSyntaxHighlighter : public QSyntaxHighlighter +{ +public: + QtScriptShell_QSyntaxHighlighter(QObject* parent); + QtScriptShell_QSyntaxHighlighter(QTextDocument* parent); + ~QtScriptShell_QSyntaxHighlighter(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void highlightBlock(const QString& text); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSYNTAXHIGHLIGHTER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTabletEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTabletEvent.cpp new file mode 100644 index 00000000..90296de8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTabletEvent.cpp @@ -0,0 +1,18 @@ +#include "qtscriptshell_QTabletEvent.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QTabletEvent::QtScriptShell_QTabletEvent(QEvent::Type t, const QPointF& pos, const QPointF& globalPos, int device, int pointerType, qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal rotation, int z, Qt::KeyboardModifiers keyState, qint64 uniqueID) + : QTabletEvent(t, pos, globalPos, device, pointerType, pressure, xTilt, yTilt, tangentialPressure, rotation, z, keyState, uniqueID) {} + +QtScriptShell_QTabletEvent::QtScriptShell_QTabletEvent(QEvent::Type t, const QPointF& pos, const QPointF& globalPos, int device, int pointerType, qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal rotation, int z, Qt::KeyboardModifiers keyState, qint64 uniqueID, Qt::MouseButton button, Qt::MouseButtons buttons) + : QTabletEvent(t, pos, globalPos, device, pointerType, pressure, xTilt, yTilt, tangentialPressure, rotation, z, keyState, uniqueID, button, buttons) {} + +QtScriptShell_QTabletEvent::~QtScriptShell_QTabletEvent() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTabletEvent.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTabletEvent.h new file mode 100644 index 00000000..dfe5e9ee --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTabletEvent.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QTABLETEVENT_H +#define QTSCRIPTSHELL_QTABLETEVENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTabletEvent : public QTabletEvent +{ +public: + QtScriptShell_QTabletEvent(QEvent::Type t, const QPointF& pos, const QPointF& globalPos, int device, int pointerType, qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal rotation, int z, Qt::KeyboardModifiers keyState, qint64 uniqueID); + QtScriptShell_QTabletEvent(QEvent::Type t, const QPointF& pos, const QPointF& globalPos, int device, int pointerType, qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal rotation, int z, Qt::KeyboardModifiers keyState, qint64 uniqueID, Qt::MouseButton button, Qt::MouseButtons buttons); + ~QtScriptShell_QTabletEvent(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTABLETEVENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockFormat.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockFormat.cpp new file mode 100644 index 00000000..70a138ed --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockFormat.cpp @@ -0,0 +1,22 @@ +#include "qtscriptshell_QTextBlockFormat.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QTextBlockFormat::QtScriptShell_QTextBlockFormat() + : QTextBlockFormat() {} + +QtScriptShell_QTextBlockFormat::QtScriptShell_QTextBlockFormat(const QTextFormat& fmt) + : QTextBlockFormat(fmt) {} + +QtScriptShell_QTextBlockFormat::~QtScriptShell_QTextBlockFormat() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockFormat.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockFormat.h new file mode 100644 index 00000000..9a278e09 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockFormat.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QTEXTBLOCKFORMAT_H +#define QTSCRIPTSHELL_QTEXTBLOCKFORMAT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextBlockFormat : public QTextBlockFormat +{ +public: + QtScriptShell_QTextBlockFormat(); + QtScriptShell_QTextBlockFormat(const QTextFormat& fmt); + ~QtScriptShell_QTextBlockFormat(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTBLOCKFORMAT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockGroup.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockGroup.cpp new file mode 100644 index 00000000..ea889ad5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockGroup.cpp @@ -0,0 +1,137 @@ +#include "qtscriptshell_QTextBlockGroup.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QTextBlock) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QTextBlockGroup::QtScriptShell_QTextBlockGroup(QTextDocument* doc) + : QTextBlockGroup(doc) {} + +QtScriptShell_QTextBlockGroup::~QtScriptShell_QTextBlockGroup() {} + +void QtScriptShell_QTextBlockGroup::blockFormatChanged(const QTextBlock& block) +{ + QScriptValue _q_function = __qtscript_self.property("blockFormatChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("blockFormatChanged") & QScriptValue::QObjectMember)) { + QTextBlockGroup::blockFormatChanged(block); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, block)); + } +} + +void QtScriptShell_QTextBlockGroup::blockInserted(const QTextBlock& block) +{ + QScriptValue _q_function = __qtscript_self.property("blockInserted"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("blockInserted") & QScriptValue::QObjectMember)) { + QTextBlockGroup::blockInserted(block); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, block)); + } +} + +void QtScriptShell_QTextBlockGroup::blockRemoved(const QTextBlock& block) +{ + QScriptValue _q_function = __qtscript_self.property("blockRemoved"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("blockRemoved") & QScriptValue::QObjectMember)) { + QTextBlockGroup::blockRemoved(block); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, block)); + } +} + +void QtScriptShell_QTextBlockGroup::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTextBlockGroup::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTextBlockGroup::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTextBlockGroup::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTextBlockGroup::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTextBlockGroup::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTextBlockGroup::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTextBlockGroup::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QTextBlockGroup::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTextBlockGroup::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockGroup.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockGroup.h new file mode 100644 index 00000000..1721444c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockGroup.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QTEXTBLOCKGROUP_H +#define QTSCRIPTSHELL_QTEXTBLOCKGROUP_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextBlockGroup : public QTextBlockGroup +{ +public: + QtScriptShell_QTextBlockGroup(QTextDocument* doc); + ~QtScriptShell_QTextBlockGroup(); + + void blockFormatChanged(const QTextBlock& block); + void blockInserted(const QTextBlock& block); + void blockRemoved(const QTextBlock& block); + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTBLOCKGROUP_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockUserData.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockUserData.cpp new file mode 100644 index 00000000..73f8dec5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockUserData.cpp @@ -0,0 +1,13 @@ +#include "qtscriptshell_QTextBlockUserData.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QTextBlockUserData::QtScriptShell_QTextBlockUserData() + : QTextBlockUserData() {} + +QtScriptShell_QTextBlockUserData::~QtScriptShell_QTextBlockUserData() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockUserData.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockUserData.h new file mode 100644 index 00000000..7d33eb82 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextBlockUserData.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QTEXTBLOCKUSERDATA_H +#define QTSCRIPTSHELL_QTEXTBLOCKUSERDATA_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextBlockUserData : public QTextBlockUserData +{ +public: + QtScriptShell_QTextBlockUserData(); + ~QtScriptShell_QTextBlockUserData(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTBLOCKUSERDATA_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextCharFormat.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextCharFormat.cpp new file mode 100644 index 00000000..3d7a2e26 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextCharFormat.cpp @@ -0,0 +1,23 @@ +#include "qtscriptshell_QTextCharFormat.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QTextCharFormat::QtScriptShell_QTextCharFormat() + : QTextCharFormat() {} + +QtScriptShell_QTextCharFormat::QtScriptShell_QTextCharFormat(const QTextFormat& fmt) + : QTextCharFormat(fmt) {} + +QtScriptShell_QTextCharFormat::~QtScriptShell_QTextCharFormat() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextCharFormat.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextCharFormat.h new file mode 100644 index 00000000..ea7151b1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextCharFormat.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QTEXTCHARFORMAT_H +#define QTSCRIPTSHELL_QTEXTCHARFORMAT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextCharFormat : public QTextCharFormat +{ +public: + QtScriptShell_QTextCharFormat(); + QtScriptShell_QTextCharFormat(const QTextFormat& fmt); + ~QtScriptShell_QTextCharFormat(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTCHARFORMAT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextDocument.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextDocument.cpp new file mode 100644 index 00000000..8c4fd238 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextDocument.cpp @@ -0,0 +1,150 @@ +#include "qtscriptshell_QTextDocument.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QTextObject*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QTextDocument::QtScriptShell_QTextDocument(QObject* parent) + : QTextDocument(parent) {} + +QtScriptShell_QTextDocument::QtScriptShell_QTextDocument(const QString& text, QObject* parent) + : QTextDocument(text, parent) {} + +QtScriptShell_QTextDocument::~QtScriptShell_QTextDocument() {} + +void QtScriptShell_QTextDocument::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTextDocument::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTextDocument::clear() +{ + QScriptValue _q_function = __qtscript_self.property("clear"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clear") & QScriptValue::QObjectMember)) { + QTextDocument::clear(); + } else { + _q_function.call(__qtscript_self); + } +} + +QTextObject* QtScriptShell_QTextDocument::createObject(const QTextFormat& f) +{ + QScriptValue _q_function = __qtscript_self.property("createObject"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createObject") & QScriptValue::QObjectMember)) { + return QTextDocument::createObject(f); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, f))); + } +} + +void QtScriptShell_QTextDocument::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTextDocument::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTextDocument::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTextDocument::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTextDocument::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTextDocument::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QVariant QtScriptShell_QTextDocument::loadResource(int type, const QUrl& name) +{ + QScriptValue _q_function = __qtscript_self.property("loadResource"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("loadResource") & QScriptValue::QObjectMember)) { + return QTextDocument::loadResource(type, name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, type) + << qScriptValueFromValue(_q_engine, name))); + } +} + +void QtScriptShell_QTextDocument::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTextDocument::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextDocument.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextDocument.h new file mode 100644 index 00000000..f315b3e1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextDocument.h @@ -0,0 +1,28 @@ +#ifndef QTSCRIPTSHELL_QTEXTDOCUMENT_H +#define QTSCRIPTSHELL_QTEXTDOCUMENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextDocument : public QTextDocument +{ +public: + QtScriptShell_QTextDocument(QObject* parent = 0); + QtScriptShell_QTextDocument(const QString& text, QObject* parent = 0); + ~QtScriptShell_QTextDocument(); + + void childEvent(QChildEvent* event); + void clear(); + QTextObject* createObject(const QTextFormat& f); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + QVariant loadResource(int type, const QUrl& name); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTDOCUMENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrame.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrame.cpp new file mode 100644 index 00000000..282e18f6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrame.cpp @@ -0,0 +1,97 @@ +#include "qtscriptshell_QTextFrame.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QTextFrame::QtScriptShell_QTextFrame(QTextDocument* doc) + : QTextFrame(doc) {} + +QtScriptShell_QTextFrame::~QtScriptShell_QTextFrame() {} + +void QtScriptShell_QTextFrame::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTextFrame::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTextFrame::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTextFrame::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTextFrame::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTextFrame::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTextFrame::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTextFrame::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QTextFrame::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTextFrame::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrame.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrame.h new file mode 100644 index 00000000..2ff4585f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrame.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QTEXTFRAME_H +#define QTSCRIPTSHELL_QTEXTFRAME_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextFrame : public QTextFrame +{ +public: + QtScriptShell_QTextFrame(QTextDocument* doc); + ~QtScriptShell_QTextFrame(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTFRAME_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrameFormat.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrameFormat.cpp new file mode 100644 index 00000000..cd5a801e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrameFormat.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QTextFrameFormat.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QTextFrameFormat::QtScriptShell_QTextFrameFormat() + : QTextFrameFormat() {} + +QtScriptShell_QTextFrameFormat::QtScriptShell_QTextFrameFormat(const QTextFormat& fmt) + : QTextFrameFormat(fmt) {} + +QtScriptShell_QTextFrameFormat::~QtScriptShell_QTextFrameFormat() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrameFormat.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrameFormat.h new file mode 100644 index 00000000..e62cf59b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextFrameFormat.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QTEXTFRAMEFORMAT_H +#define QTSCRIPTSHELL_QTEXTFRAMEFORMAT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextFrameFormat : public QTextFrameFormat +{ +public: + QtScriptShell_QTextFrameFormat(); + QtScriptShell_QTextFrameFormat(const QTextFormat& fmt); + ~QtScriptShell_QTextFrameFormat(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTFRAMEFORMAT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextImageFormat.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextImageFormat.cpp new file mode 100644 index 00000000..7c4c8887 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextImageFormat.cpp @@ -0,0 +1,23 @@ +#include "qtscriptshell_QTextImageFormat.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QTextImageFormat::QtScriptShell_QTextImageFormat() + : QTextImageFormat() {} + +QtScriptShell_QTextImageFormat::QtScriptShell_QTextImageFormat(const QTextFormat& format) + : QTextImageFormat(format) {} + +QtScriptShell_QTextImageFormat::~QtScriptShell_QTextImageFormat() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextImageFormat.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextImageFormat.h new file mode 100644 index 00000000..6e4f0d7e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextImageFormat.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QTEXTIMAGEFORMAT_H +#define QTSCRIPTSHELL_QTEXTIMAGEFORMAT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextImageFormat : public QTextImageFormat +{ +public: + QtScriptShell_QTextImageFormat(); + QtScriptShell_QTextImageFormat(const QTextFormat& format); + ~QtScriptShell_QTextImageFormat(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTIMAGEFORMAT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextItem.cpp new file mode 100644 index 00000000..1ec4910a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextItem.cpp @@ -0,0 +1,14 @@ +#include "qtscriptshell_QTextItem.h" + +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QTextItem::QtScriptShell_QTextItem() + : QTextItem() {} + +QtScriptShell_QTextItem::~QtScriptShell_QTextItem() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextItem.h new file mode 100644 index 00000000..61b500eb --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextItem.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QTEXTITEM_H +#define QTSCRIPTSHELL_QTEXTITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextItem : public QTextItem +{ +public: + QtScriptShell_QTextItem(); + ~QtScriptShell_QTextItem(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextList.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextList.cpp new file mode 100644 index 00000000..69e95af0 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextList.cpp @@ -0,0 +1,138 @@ +#include "qtscriptshell_QTextList.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QTextBlock) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QTextList::QtScriptShell_QTextList(QTextDocument* doc) + : QTextList(doc) {} + +QtScriptShell_QTextList::~QtScriptShell_QTextList() {} + +void QtScriptShell_QTextList::blockFormatChanged(const QTextBlock& block) +{ + QScriptValue _q_function = __qtscript_self.property("blockFormatChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("blockFormatChanged") & QScriptValue::QObjectMember)) { + QTextList::blockFormatChanged(block); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, block)); + } +} + +void QtScriptShell_QTextList::blockInserted(const QTextBlock& block) +{ + QScriptValue _q_function = __qtscript_self.property("blockInserted"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("blockInserted") & QScriptValue::QObjectMember)) { + QTextList::blockInserted(block); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, block)); + } +} + +void QtScriptShell_QTextList::blockRemoved(const QTextBlock& block) +{ + QScriptValue _q_function = __qtscript_self.property("blockRemoved"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("blockRemoved") & QScriptValue::QObjectMember)) { + QTextList::blockRemoved(block); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, block)); + } +} + +void QtScriptShell_QTextList::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTextList::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTextList::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTextList::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTextList::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTextList::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTextList::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTextList::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QTextList::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTextList::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextList.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextList.h new file mode 100644 index 00000000..f75da780 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextList.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QTEXTLIST_H +#define QTSCRIPTSHELL_QTEXTLIST_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextList : public QTextList +{ +public: + QtScriptShell_QTextList(QTextDocument* doc); + ~QtScriptShell_QTextList(); + + void blockFormatChanged(const QTextBlock& block); + void blockInserted(const QTextBlock& block); + void blockRemoved(const QTextBlock& block); + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTLIST_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextListFormat.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextListFormat.cpp new file mode 100644 index 00000000..fbcdc670 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextListFormat.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QTextListFormat.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QTextListFormat::QtScriptShell_QTextListFormat() + : QTextListFormat() {} + +QtScriptShell_QTextListFormat::QtScriptShell_QTextListFormat(const QTextFormat& fmt) + : QTextListFormat(fmt) {} + +QtScriptShell_QTextListFormat::~QtScriptShell_QTextListFormat() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextListFormat.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextListFormat.h new file mode 100644 index 00000000..97279793 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextListFormat.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QTEXTLISTFORMAT_H +#define QTSCRIPTSHELL_QTEXTLISTFORMAT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextListFormat : public QTextListFormat +{ +public: + QtScriptShell_QTextListFormat(); + QtScriptShell_QTextListFormat(const QTextFormat& fmt); + ~QtScriptShell_QTextListFormat(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTLISTFORMAT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextObject.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextObject.cpp new file mode 100644 index 00000000..0bc81b0d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextObject.cpp @@ -0,0 +1,94 @@ +#include "qtscriptshell_QTextObject.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QTextObject::QtScriptShell_QTextObject(QTextDocument* doc) + : QTextObject(doc) {} + +QtScriptShell_QTextObject::~QtScriptShell_QTextObject() {} + +void QtScriptShell_QTextObject::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTextObject::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTextObject::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTextObject::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTextObject::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTextObject::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTextObject::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTextObject::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QTextObject::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTextObject::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextObject.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextObject.h new file mode 100644 index 00000000..22ff4031 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextObject.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QTEXTOBJECT_H +#define QTSCRIPTSHELL_QTEXTOBJECT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextObject : public QTextObject +{ +public: + QtScriptShell_QTextObject(QTextDocument* doc); + ~QtScriptShell_QTextObject(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTOBJECT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTable.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTable.cpp new file mode 100644 index 00000000..fef3d7e4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTable.cpp @@ -0,0 +1,98 @@ +#include "qtscriptshell_QTextTable.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QTextTable::QtScriptShell_QTextTable(QTextDocument* doc) + : QTextTable(doc) {} + +QtScriptShell_QTextTable::~QtScriptShell_QTextTable() {} + +void QtScriptShell_QTextTable::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTextTable::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTextTable::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTextTable::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTextTable::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTextTable::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTextTable::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTextTable::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QTextTable::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTextTable::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTable.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTable.h new file mode 100644 index 00000000..a2916948 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTable.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QTEXTTABLE_H +#define QTSCRIPTSHELL_QTEXTTABLE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextTable : public QTextTable +{ +public: + QtScriptShell_QTextTable(QTextDocument* doc); + ~QtScriptShell_QTextTable(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTTABLE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTableCellFormat.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTableCellFormat.cpp new file mode 100644 index 00000000..2c2e7c02 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTableCellFormat.cpp @@ -0,0 +1,23 @@ +#include "qtscriptshell_QTextTableCellFormat.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QTextTableCellFormat::QtScriptShell_QTextTableCellFormat() + : QTextTableCellFormat() {} + +QtScriptShell_QTextTableCellFormat::QtScriptShell_QTextTableCellFormat(const QTextFormat& fmt) + : QTextTableCellFormat(fmt) {} + +QtScriptShell_QTextTableCellFormat::~QtScriptShell_QTextTableCellFormat() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTableCellFormat.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTableCellFormat.h new file mode 100644 index 00000000..642a7559 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTableCellFormat.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QTEXTTABLECELLFORMAT_H +#define QTSCRIPTSHELL_QTEXTTABLECELLFORMAT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextTableCellFormat : public QTextTableCellFormat +{ +public: + QtScriptShell_QTextTableCellFormat(); + QtScriptShell_QTextTableCellFormat(const QTextFormat& fmt); + ~QtScriptShell_QTextTableCellFormat(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTTABLECELLFORMAT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTableFormat.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTableFormat.cpp new file mode 100644 index 00000000..fbd30249 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTableFormat.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QTextTableFormat.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QTextTableFormat::QtScriptShell_QTextTableFormat() + : QTextTableFormat() {} + +QtScriptShell_QTextTableFormat::QtScriptShell_QTextTableFormat(const QTextFormat& fmt) + : QTextTableFormat(fmt) {} + +QtScriptShell_QTextTableFormat::~QtScriptShell_QTextTableFormat() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTableFormat.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTableFormat.h new file mode 100644 index 00000000..b1f74df1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTextTableFormat.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QTEXTTABLEFORMAT_H +#define QTSCRIPTSHELL_QTEXTTABLEFORMAT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextTableFormat : public QTextTableFormat +{ +public: + QtScriptShell_QTextTableFormat(); + QtScriptShell_QTextTableFormat(const QTextFormat& fmt); + ~QtScriptShell_QTextTableFormat(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTTABLEFORMAT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTileRules.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTileRules.cpp new file mode 100644 index 00000000..b4eb332b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTileRules.cpp @@ -0,0 +1,16 @@ +#include "qtscriptshell_QTileRules.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QTileRules::QtScriptShell_QTileRules(Qt::TileRule horizontalRule, Qt::TileRule verticalRule) + : QTileRules(horizontalRule, verticalRule) {} + +QtScriptShell_QTileRules::QtScriptShell_QTileRules(Qt::TileRule rule) + : QTileRules(rule) {} + +QtScriptShell_QTileRules::~QtScriptShell_QTileRules() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTileRules.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTileRules.h new file mode 100644 index 00000000..734855c6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QTileRules.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QTILERULES_H +#define QTSCRIPTSHELL_QTILERULES_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTileRules : public QTileRules +{ +public: + QtScriptShell_QTileRules(Qt::TileRule horizontalRule, Qt::TileRule verticalRule); + QtScriptShell_QTileRules(Qt::TileRule rule = Qt::StretchTile); + ~QtScriptShell_QTileRules(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTILERULES_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QValidator.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QValidator.cpp new file mode 100644 index 00000000..6c0671ce --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QValidator.cpp @@ -0,0 +1,123 @@ +#include "qtscriptshell_QValidator.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QValidator::State) + +QtScriptShell_QValidator::QtScriptShell_QValidator(QObject* parent) + : QValidator(parent) {} + +QtScriptShell_QValidator::~QtScriptShell_QValidator() {} + +void QtScriptShell_QValidator::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QValidator::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QValidator::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QValidator::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QValidator::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QValidator::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QValidator::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QValidator::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QValidator::fixup(QString& arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("fixup"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fixup") & QScriptValue::QObjectMember)) { + QValidator::fixup(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QValidator::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QValidator::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QValidator::State QtScriptShell_QValidator::validate(QString& arg__1, int& arg__2) const +{ + QScriptValue _q_function = __qtscript_self.property("validate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("validate") & QScriptValue::QObjectMember)) { + qFatal("QValidator::validate() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QValidator.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QValidator.h new file mode 100644 index 00000000..5a4bd8ff --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QValidator.h @@ -0,0 +1,26 @@ +#ifndef QTSCRIPTSHELL_QVALIDATOR_H +#define QTSCRIPTSHELL_QVALIDATOR_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QValidator : public QValidator +{ +public: + QtScriptShell_QValidator(QObject* parent = 0); + ~QtScriptShell_QValidator(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fixup(QString& arg__1) const; + void timerEvent(QTimerEvent* event); + QValidator::State validate(QString& arg__1, int& arg__2) const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QVALIDATOR_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QWheelEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QWheelEvent.cpp new file mode 100644 index 00000000..40104f15 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QWheelEvent.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QWheelEvent.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QWheelEvent::QtScriptShell_QWheelEvent(const QPointF& pos, const QPointF& globalPos, QPoint pixelDelta, QPoint angleDelta, int qt4Delta, Qt::Orientation qt4Orientation, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) + : QWheelEvent(pos, globalPos, pixelDelta, angleDelta, qt4Delta, qt4Orientation, buttons, modifiers) {} + +QtScriptShell_QWheelEvent::QtScriptShell_QWheelEvent(const QPointF& pos, const QPointF& globalPos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orient) + : QWheelEvent(pos, globalPos, delta, buttons, modifiers, orient) {} + +QtScriptShell_QWheelEvent::QtScriptShell_QWheelEvent(const QPointF& pos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orient) + : QWheelEvent(pos, delta, buttons, modifiers, orient) {} + +QtScriptShell_QWheelEvent::~QtScriptShell_QWheelEvent() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QWheelEvent.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QWheelEvent.h new file mode 100644 index 00000000..e837422f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_gui/qtscriptshell_QWheelEvent.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QWHEELEVENT_H +#define QTSCRIPTSHELL_QWHEELEVENT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QWheelEvent : public QWheelEvent +{ +public: + QtScriptShell_QWheelEvent(const QPointF& pos, const QPointF& globalPos, QPoint pixelDelta, QPoint angleDelta, int qt4Delta, Qt::Orientation qt4Orientation, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers); + QtScriptShell_QWheelEvent(const QPointF& pos, const QPointF& globalPos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orient = Qt::Vertical); + QtScriptShell_QWheelEvent(const QPointF& pos, int delta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::Orientation orient = Qt::Vertical); + ~QtScriptShell_QWheelEvent(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QWHEELEVENT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/com_trolltech_qt_multimedia.pri b/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/com_trolltech_qt_multimedia.pri new file mode 100644 index 00000000..43cfd691 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/com_trolltech_qt_multimedia.pri @@ -0,0 +1,10 @@ +HEADERS += \ + $$PWD/qtscriptshell_QSound.h \ + $$PWD/qtscriptshell_QSoundEffect.h \ + +SOURCES += \ + $$PWD/qtscript_QSound.cpp \ + $$PWD/qtscript_QSoundEffect.cpp \ + $$PWD/qtscriptshell_QSound.cpp \ + $$PWD/qtscriptshell_QSoundEffect.cpp \ + $$PWD/com_trolltech_qt_multimedia_init.cpp diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/com_trolltech_qt_multimedia_init.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/com_trolltech_qt_multimedia_init.cpp new file mode 100644 index 00000000..6e845dbd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/com_trolltech_qt_multimedia_init.cpp @@ -0,0 +1,26 @@ +#include +#include + +QScriptValue qtscript_create_QSound_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSoundEffect_class(QScriptEngine *engine); + +static const char * const qtscript_com_trolltech_qt_multimedia_class_names[] = { + "QSound" + , "QSoundEffect" +}; + +typedef QScriptValue (*QtBindingCreator)(QScriptEngine *engine); +static const QtBindingCreator qtscript_com_trolltech_qt_multimedia_class_functions[] = { + qtscript_create_QSound_class + , qtscript_create_QSoundEffect_class +}; + +void qtscript_initialize_com_trolltech_qt_multimedia_bindings(QScriptValue &extensionObject) +{ + QScriptEngine *engine = extensionObject.engine(); + for (int i = 0; i < 2; ++i) { + extensionObject.setProperty(qtscript_com_trolltech_qt_multimedia_class_names[i], + qtscript_com_trolltech_qt_multimedia_class_functions[i](engine), + QScriptValue::SkipInEnumeration); + } +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscript_QSound.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscript_QSound.cpp new file mode 100644 index 00000000..d9cfaff3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscript_QSound.cpp @@ -0,0 +1,306 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSound.h" + +static const char * const qtscript_QSound_function_names[] = { + "QSound" + // static + , "play" + // prototype + , "fileName" + , "isFinished" + , "loops" + , "loopsRemaining" + , "setLoops" + , "toString" +}; + +static const char * const qtscript_QSound_function_signatures[] = { + "String filename, QObject parent" + // static + , "String filename" + // prototype + , "" + , "" + , "" + , "" + , "int arg__1" +"" +}; + +static const int qtscript_QSound_function_lengths[] = { + 2 + // static + , 1 + // prototype + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QSound_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSound::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSound*) +Q_DECLARE_METATYPE(QtScriptShell_QSound*) +Q_DECLARE_METATYPE(QSound::Loop) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QSound::Loop +// + +static const QSound::Loop qtscript_QSound_Loop_values[] = { + QSound::Infinite +}; + +static const char * const qtscript_QSound_Loop_keys[] = { + "Infinite" +}; + +static QString qtscript_QSound_Loop_toStringHelper(QSound::Loop value) +{ + if ((value >= QSound::Infinite) && (value <= QSound::Infinite)) + return qtscript_QSound_Loop_keys[static_cast(value)-static_cast(QSound::Infinite)]; + return QString(); +} + +static QScriptValue qtscript_QSound_Loop_toScriptValue(QScriptEngine *engine, const QSound::Loop &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSound")); + return clazz.property(qtscript_QSound_Loop_toStringHelper(value)); +} + +static void qtscript_QSound_Loop_fromScriptValue(const QScriptValue &value, QSound::Loop &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSound_Loop(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSound::Infinite) && (arg <= QSound::Infinite)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Loop(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSound_Loop_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSound::Loop value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSound_Loop_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSound::Loop value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSound_Loop_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSound_Loop_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSound_Loop, + qtscript_QSound_Loop_valueOf, qtscript_QSound_Loop_toString); + qScriptRegisterMetaType(engine, qtscript_QSound_Loop_toScriptValue, + qtscript_QSound_Loop_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSound_Loop_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSound_Loop_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSound +// + +static QScriptValue qtscript_QSound_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSound* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSound.%0(): this object is not a QSound") + .arg(qtscript_QSound_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->fileName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isFinished(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->loops(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->loopsRemaining(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setLoops(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: { + QString result = QString::fromLatin1("QSound"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSound_throw_ambiguity_error_helper(context, + qtscript_QSound_function_names[_id+2], + qtscript_QSound_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QSound_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSound(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QSound* _q_cpp_result = new QtScriptShell_QSound(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSound*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QSound* _q_cpp_result = new QtScriptShell_QSound(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSound*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QSound::play(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSound_throw_ambiguity_error_helper(context, + qtscript_QSound_function_names[_id], + qtscript_QSound_function_signatures[_id]); +} + +static QScriptValue qtscript_QSound_toScriptValue(QScriptEngine *engine, QSound* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSound_fromScriptValue(const QScriptValue &value, QSound* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSound_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSound*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSound_prototype_call, qtscript_QSound_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSound_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSound_toScriptValue, + qtscript_QSound_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSound_static_call, proto, qtscript_QSound_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSound_static_call, + qtscript_QSound_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QSound_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("Loop"), + qtscript_create_QSound_Loop_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscript_QSoundEffect.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscript_QSoundEffect.cpp new file mode 100644 index 00000000..cd917660 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscript_QSoundEffect.cpp @@ -0,0 +1,474 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSoundEffect.h" + +static const char * const qtscript_QSoundEffect_function_names[] = { + "QSoundEffect" + // static + , "supportedMimeTypes" + // prototype + , "category" + , "isLoaded" + , "isMuted" + , "isPlaying" + , "loopCount" + , "loopsRemaining" + , "setCategory" + , "setLoopCount" + , "setMuted" + , "setSource" + , "setVolume" + , "source" + , "status" + , "volume" + , "toString" +}; + +static const char * const qtscript_QSoundEffect_function_signatures[] = { + "QObject parent" + // static + , "" + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "String category" + , "int loopCount" + , "bool muted" + , "QUrl url" + , "qreal volume" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QSoundEffect_function_lengths[] = { + 1 + // static + , 0 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QSoundEffect_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSoundEffect::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSoundEffect*) +Q_DECLARE_METATYPE(QtScriptShell_QSoundEffect*) +Q_DECLARE_METATYPE(QSoundEffect::Status) +Q_DECLARE_METATYPE(QSoundEffect::Loop) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QSoundEffect::Status +// + +static const QSoundEffect::Status qtscript_QSoundEffect_Status_values[] = { + QSoundEffect::Null + , QSoundEffect::Loading + , QSoundEffect::Ready + , QSoundEffect::Error +}; + +static const char * const qtscript_QSoundEffect_Status_keys[] = { + "Null" + , "Loading" + , "Ready" + , "Error" +}; + +static QString qtscript_QSoundEffect_Status_toStringHelper(QSoundEffect::Status value) +{ + if ((value >= QSoundEffect::Null) && (value <= QSoundEffect::Error)) + return qtscript_QSoundEffect_Status_keys[static_cast(value)-static_cast(QSoundEffect::Null)]; + return QString(); +} + +static QScriptValue qtscript_QSoundEffect_Status_toScriptValue(QScriptEngine *engine, const QSoundEffect::Status &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSoundEffect")); + return clazz.property(qtscript_QSoundEffect_Status_toStringHelper(value)); +} + +static void qtscript_QSoundEffect_Status_fromScriptValue(const QScriptValue &value, QSoundEffect::Status &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSoundEffect_Status(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSoundEffect::Null) && (arg <= QSoundEffect::Error)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Status(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSoundEffect_Status_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSoundEffect::Status value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSoundEffect_Status_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSoundEffect::Status value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSoundEffect_Status_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSoundEffect_Status_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSoundEffect_Status, + qtscript_QSoundEffect_Status_valueOf, qtscript_QSoundEffect_Status_toString); + qScriptRegisterMetaType(engine, qtscript_QSoundEffect_Status_toScriptValue, + qtscript_QSoundEffect_Status_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSoundEffect_Status_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSoundEffect_Status_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSoundEffect::Loop +// + +static const QSoundEffect::Loop qtscript_QSoundEffect_Loop_values[] = { + QSoundEffect::Infinite +}; + +static const char * const qtscript_QSoundEffect_Loop_keys[] = { + "Infinite" +}; + +static QString qtscript_QSoundEffect_Loop_toStringHelper(QSoundEffect::Loop value) +{ + if ((value >= QSoundEffect::Infinite) && (value <= QSoundEffect::Infinite)) + return qtscript_QSoundEffect_Loop_keys[static_cast(value)-static_cast(QSoundEffect::Infinite)]; + return QString(); +} + +static QScriptValue qtscript_QSoundEffect_Loop_toScriptValue(QScriptEngine *engine, const QSoundEffect::Loop &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSoundEffect")); + return clazz.property(qtscript_QSoundEffect_Loop_toStringHelper(value)); +} + +static void qtscript_QSoundEffect_Loop_fromScriptValue(const QScriptValue &value, QSoundEffect::Loop &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSoundEffect_Loop(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSoundEffect::Infinite) && (arg <= QSoundEffect::Infinite)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Loop(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSoundEffect_Loop_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSoundEffect::Loop value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSoundEffect_Loop_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSoundEffect::Loop value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSoundEffect_Loop_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSoundEffect_Loop_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSoundEffect_Loop, + qtscript_QSoundEffect_Loop_valueOf, qtscript_QSoundEffect_Loop_toString); + qScriptRegisterMetaType(engine, qtscript_QSoundEffect_Loop_toScriptValue, + qtscript_QSoundEffect_Loop_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSoundEffect_Loop_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSoundEffect_Loop_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSoundEffect +// + +static QScriptValue qtscript_QSoundEffect_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 14; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSoundEffect* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSoundEffect.%0(): this object is not a QSoundEffect") + .arg(qtscript_QSoundEffect_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->category(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isLoaded(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isMuted(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isPlaying(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->loopCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->loopsRemaining(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setCategory(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setLoopCount(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setMuted(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSource(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setVolume(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QUrl _q_result = _q_self->source(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QSoundEffect::Status _q_result = _q_self->status(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->volume(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: { + QString result = QString::fromLatin1("QSoundEffect"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSoundEffect_throw_ambiguity_error_helper(context, + qtscript_QSoundEffect_function_names[_id+2], + qtscript_QSoundEffect_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QSoundEffect_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSoundEffect(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSoundEffect* _q_cpp_result = new QtScriptShell_QSoundEffect(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSoundEffect*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QSoundEffect* _q_cpp_result = new QtScriptShell_QSoundEffect(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSoundEffect*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QStringList _q_result = QSoundEffect::supportedMimeTypes(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSoundEffect_throw_ambiguity_error_helper(context, + qtscript_QSoundEffect_function_names[_id], + qtscript_QSoundEffect_function_signatures[_id]); +} + +static QScriptValue qtscript_QSoundEffect_toScriptValue(QScriptEngine *engine, QSoundEffect* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSoundEffect_fromScriptValue(const QScriptValue &value, QSoundEffect* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSoundEffect_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSoundEffect*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 15; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSoundEffect_prototype_call, qtscript_QSoundEffect_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSoundEffect_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSoundEffect_toScriptValue, + qtscript_QSoundEffect_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSoundEffect_static_call, proto, qtscript_QSoundEffect_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSoundEffect_static_call, + qtscript_QSoundEffect_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QSoundEffect_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("Status"), + qtscript_create_QSoundEffect_Status_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Loop"), + qtscript_create_QSoundEffect_Loop_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscriptshell_QSound.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscriptshell_QSound.cpp new file mode 100644 index 00000000..978c5352 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscriptshell_QSound.cpp @@ -0,0 +1,91 @@ +#include "qtscriptshell_QSound.h" + +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QSound::QtScriptShell_QSound(const QString& filename, QObject* parent) + : QSound(filename, parent) {} + +QtScriptShell_QSound::~QtScriptShell_QSound() {} + +void QtScriptShell_QSound::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSound::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSound::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSound::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSound::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSound::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QSound::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSound::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSound::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSound::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscriptshell_QSound.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscriptshell_QSound.h new file mode 100644 index 00000000..db0a8ca2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscriptshell_QSound.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QSOUND_H +#define QTSCRIPTSHELL_QSOUND_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSound : public QSound +{ +public: + QtScriptShell_QSound(const QString& filename, QObject* parent = 0); + ~QtScriptShell_QSound(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSOUND_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscriptshell_QSoundEffect.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscriptshell_QSoundEffect.cpp new file mode 100644 index 00000000..a6e57212 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscriptshell_QSoundEffect.cpp @@ -0,0 +1,94 @@ +#include "qtscriptshell_QSoundEffect.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QSoundEffect::QtScriptShell_QSoundEffect(QObject* parent) + : QSoundEffect(parent) {} + +QtScriptShell_QSoundEffect::~QtScriptShell_QSoundEffect() {} + +void QtScriptShell_QSoundEffect::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSoundEffect::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSoundEffect::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSoundEffect::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSoundEffect::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSoundEffect::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QSoundEffect::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSoundEffect::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSoundEffect::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSoundEffect::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscriptshell_QSoundEffect.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscriptshell_QSoundEffect.h new file mode 100644 index 00000000..cad55d76 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_multimedia/qtscriptshell_QSoundEffect.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QSOUNDEFFECT_H +#define QTSCRIPTSHELL_QSOUNDEFFECT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSoundEffect : public QSoundEffect +{ +public: + QtScriptShell_QSoundEffect(QObject* parent = 0); + ~QtScriptShell_QSoundEffect(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSOUNDEFFECT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/com_trolltech_qt_network.pri b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/com_trolltech_qt_network.pri new file mode 100644 index 00000000..9c00d194 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/com_trolltech_qt_network.pri @@ -0,0 +1,54 @@ +HEADERS += \ + $$PWD/qtscriptshell_QAbstractNetworkCache.h \ + $$PWD/qtscriptshell_QAbstractSocket.h \ + $$PWD/qtscriptshell_QIPv6Address.h \ + $$PWD/qtscriptshell_QLocalServer.h \ + $$PWD/qtscriptshell_QLocalSocket.h \ + $$PWD/qtscriptshell_QNetworkAccessManager.h \ + $$PWD/qtscriptshell_QNetworkCookieJar.h \ + $$PWD/qtscriptshell_QNetworkDiskCache.h \ + $$PWD/qtscriptshell_QNetworkProxyFactory.h \ + $$PWD/qtscriptshell_QNetworkReply.h \ + $$PWD/qtscriptshell_QTcpServer.h \ + $$PWD/qtscriptshell_QTcpSocket.h \ + $$PWD/qtscriptshell_QUdpSocket.h \ + +SOURCES += \ + $$PWD/qtscript_QAbstractNetworkCache.cpp \ + $$PWD/qtscript_QAbstractSocket.cpp \ + $$PWD/qtscript_QAuthenticator.cpp \ + $$PWD/qtscript_QHostAddress.cpp \ + $$PWD/qtscript_QHostInfo.cpp \ + $$PWD/qtscript_QIPv6Address.cpp \ + $$PWD/qtscript_QLocalServer.cpp \ + $$PWD/qtscript_QLocalSocket.cpp \ + $$PWD/qtscript_QNetworkAccessManager.cpp \ + $$PWD/qtscript_QNetworkAddressEntry.cpp \ + $$PWD/qtscript_QNetworkCacheMetaData.cpp \ + $$PWD/qtscript_QNetworkCookie.cpp \ + $$PWD/qtscript_QNetworkCookieJar.cpp \ + $$PWD/qtscript_QNetworkDiskCache.cpp \ + $$PWD/qtscript_QNetworkInterface.cpp \ + $$PWD/qtscript_QNetworkProxy.cpp \ + $$PWD/qtscript_QNetworkProxyFactory.cpp \ + $$PWD/qtscript_QNetworkProxyQuery.cpp \ + $$PWD/qtscript_QNetworkReply.cpp \ + $$PWD/qtscript_QNetworkRequest.cpp \ + $$PWD/qtscript_QSsl.cpp \ + $$PWD/qtscript_QTcpServer.cpp \ + $$PWD/qtscript_QTcpSocket.cpp \ + $$PWD/qtscript_QUdpSocket.cpp \ + $$PWD/qtscriptshell_QAbstractNetworkCache.cpp \ + $$PWD/qtscriptshell_QAbstractSocket.cpp \ + $$PWD/qtscriptshell_QIPv6Address.cpp \ + $$PWD/qtscriptshell_QLocalServer.cpp \ + $$PWD/qtscriptshell_QLocalSocket.cpp \ + $$PWD/qtscriptshell_QNetworkAccessManager.cpp \ + $$PWD/qtscriptshell_QNetworkCookieJar.cpp \ + $$PWD/qtscriptshell_QNetworkDiskCache.cpp \ + $$PWD/qtscriptshell_QNetworkProxyFactory.cpp \ + $$PWD/qtscriptshell_QNetworkReply.cpp \ + $$PWD/qtscriptshell_QTcpServer.cpp \ + $$PWD/qtscriptshell_QTcpSocket.cpp \ + $$PWD/qtscriptshell_QUdpSocket.cpp \ + $$PWD/com_trolltech_qt_network_init.cpp diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/com_trolltech_qt_network_init.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/com_trolltech_qt_network_init.cpp new file mode 100644 index 00000000..23efcfa5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/com_trolltech_qt_network_init.cpp @@ -0,0 +1,92 @@ +#include +#include + +QScriptValue qtscript_create_QHostInfo_class(QScriptEngine *engine); +QScriptValue qtscript_create_QNetworkAddressEntry_class(QScriptEngine *engine); +QScriptValue qtscript_create_QHostAddress_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSsl_class(QScriptEngine *engine); +QScriptValue qtscript_create_QNetworkRequest_class(QScriptEngine *engine); +QScriptValue qtscript_create_QNetworkProxy_class(QScriptEngine *engine); +QScriptValue qtscript_create_QNetworkCacheMetaData_class(QScriptEngine *engine); +QScriptValue qtscript_create_QNetworkProxyFactory_class(QScriptEngine *engine); +QScriptValue qtscript_create_QIPv6Address_class(QScriptEngine *engine); +QScriptValue qtscript_create_QNetworkProxyQuery_class(QScriptEngine *engine); +QScriptValue qtscript_create_QNetworkCookie_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAuthenticator_class(QScriptEngine *engine); +QScriptValue qtscript_create_QNetworkInterface_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAbstractNetworkCache_class(QScriptEngine *engine); +QScriptValue qtscript_create_QNetworkAccessManager_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTcpServer_class(QScriptEngine *engine); +QScriptValue qtscript_create_QNetworkCookieJar_class(QScriptEngine *engine); +QScriptValue qtscript_create_QLocalServer_class(QScriptEngine *engine); +QScriptValue qtscript_create_QNetworkDiskCache_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAbstractSocket_class(QScriptEngine *engine); +QScriptValue qtscript_create_QNetworkReply_class(QScriptEngine *engine); +QScriptValue qtscript_create_QLocalSocket_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTcpSocket_class(QScriptEngine *engine); +QScriptValue qtscript_create_QUdpSocket_class(QScriptEngine *engine); + +static const char * const qtscript_com_trolltech_qt_network_class_names[] = { + "QHostInfo" + , "QNetworkAddressEntry" + , "QHostAddress" + , "QSsl" + , "QNetworkRequest" + , "QNetworkProxy" + , "QNetworkCacheMetaData" + , "QNetworkProxyFactory" + , "QIPv6Address" + , "QNetworkProxyQuery" + , "QNetworkCookie" + , "QAuthenticator" + , "QNetworkInterface" + , "QAbstractNetworkCache" + , "QNetworkAccessManager" + , "QTcpServer" + , "QNetworkCookieJar" + , "QLocalServer" + , "QNetworkDiskCache" + , "QAbstractSocket" + , "QNetworkReply" + , "QLocalSocket" + , "QTcpSocket" + , "QUdpSocket" +}; + +typedef QScriptValue (*QtBindingCreator)(QScriptEngine *engine); +static const QtBindingCreator qtscript_com_trolltech_qt_network_class_functions[] = { + qtscript_create_QHostInfo_class + , qtscript_create_QNetworkAddressEntry_class + , qtscript_create_QHostAddress_class + , qtscript_create_QSsl_class + , qtscript_create_QNetworkRequest_class + , qtscript_create_QNetworkProxy_class + , qtscript_create_QNetworkCacheMetaData_class + , qtscript_create_QNetworkProxyFactory_class + , qtscript_create_QIPv6Address_class + , qtscript_create_QNetworkProxyQuery_class + , qtscript_create_QNetworkCookie_class + , qtscript_create_QAuthenticator_class + , qtscript_create_QNetworkInterface_class + , qtscript_create_QAbstractNetworkCache_class + , qtscript_create_QNetworkAccessManager_class + , qtscript_create_QTcpServer_class + , qtscript_create_QNetworkCookieJar_class + , qtscript_create_QLocalServer_class + , qtscript_create_QNetworkDiskCache_class + , qtscript_create_QAbstractSocket_class + , qtscript_create_QNetworkReply_class + , qtscript_create_QLocalSocket_class + , qtscript_create_QTcpSocket_class + , qtscript_create_QUdpSocket_class +}; + +void qtscript_initialize_com_trolltech_qt_network_bindings(QScriptValue &extensionObject) +{ + QScriptEngine *engine = extensionObject.engine(); + for (int i = 0; i < 24; ++i) { + extensionObject.setProperty(qtscript_com_trolltech_qt_network_class_names[i], + qtscript_com_trolltech_qt_network_class_functions[i](engine), + QScriptValue::SkipInEnumeration); + } +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QAbstractNetworkCache.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QAbstractNetworkCache.cpp new file mode 100644 index 00000000..25188d2b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QAbstractNetworkCache.cpp @@ -0,0 +1,221 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAbstractNetworkCache.h" + +static const char * const qtscript_QAbstractNetworkCache_function_names[] = { + "QAbstractNetworkCache" + // static + // prototype + , "cacheSize" + , "data" + , "insert" + , "metaData" + , "prepare" + , "remove" + , "updateMetaData" + , "toString" +}; + +static const char * const qtscript_QAbstractNetworkCache_function_signatures[] = { + "" + // static + // prototype + , "" + , "QUrl url" + , "QIODevice device" + , "QUrl url" + , "QNetworkCacheMetaData metaData" + , "QUrl url" + , "QNetworkCacheMetaData metaData" +"" +}; + +static const int qtscript_QAbstractNetworkCache_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QAbstractNetworkCache_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAbstractNetworkCache::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAbstractNetworkCache*) +Q_DECLARE_METATYPE(QtScriptShell_QAbstractNetworkCache*) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QNetworkCacheMetaData) + +// +// QAbstractNetworkCache +// + +static QScriptValue qtscript_QAbstractNetworkCache_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 7; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAbstractNetworkCache* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractNetworkCache.%0(): this object is not a QAbstractNetworkCache") + .arg(qtscript_QAbstractNetworkCache_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->cacheSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIODevice* _q_result = _q_self->data(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->insert(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkCacheMetaData _q_result = _q_self->metaData(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QNetworkCacheMetaData _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIODevice* _q_result = _q_self->prepare(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->remove(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QNetworkCacheMetaData _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->updateMetaData(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: { + QString result = QString::fromLatin1("QAbstractNetworkCache"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractNetworkCache_throw_ambiguity_error_helper(context, + qtscript_QAbstractNetworkCache_function_names[_id+1], + qtscript_QAbstractNetworkCache_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAbstractNetworkCache_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractNetworkCache cannot be constructed")); + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractNetworkCache_throw_ambiguity_error_helper(context, + qtscript_QAbstractNetworkCache_function_names[_id], + qtscript_QAbstractNetworkCache_function_signatures[_id]); +} + +static QScriptValue qtscript_QAbstractNetworkCache_toScriptValue(QScriptEngine *engine, QAbstractNetworkCache* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAbstractNetworkCache_fromScriptValue(const QScriptValue &value, QAbstractNetworkCache* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAbstractNetworkCache_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAbstractNetworkCache*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAbstractNetworkCache_prototype_call, qtscript_QAbstractNetworkCache_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAbstractNetworkCache_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QAbstractNetworkCache_toScriptValue, + qtscript_QAbstractNetworkCache_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAbstractNetworkCache_static_call, proto, qtscript_QAbstractNetworkCache_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QAbstractSocket.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QAbstractSocket.cpp new file mode 100644 index 00000000..093e0baa --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QAbstractSocket.cpp @@ -0,0 +1,587 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAbstractSocket.h" + +static const char * const qtscript_QAbstractSocket_function_names[] = { + "QAbstractSocket" + // static + // prototype + , "abort" + , "connectToHost" + , "disconnectFromHost" + , "error" + , "flush" + , "isValid" + , "localAddress" + , "localPort" + , "peerAddress" + , "peerName" + , "peerPort" + , "proxy" + , "readBufferSize" + , "resume" + , "setProxy" + , "setReadBufferSize" + , "setSocketOption" + , "socketOption" + , "socketType" + , "state" + , "waitForConnected" + , "waitForDisconnected" + , "toString" +}; + +static const char * const qtscript_QAbstractSocket_function_signatures[] = { + "SocketType socketType, QObject parent" + // static + // prototype + , "" + , "QHostAddress address, unsigned short port, OpenMode mode\nString hostName, unsigned short port, OpenMode mode, NetworkLayerProtocol protocol" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QNetworkProxy networkProxy" + , "qint64 size" + , "SocketOption option, Object value" + , "SocketOption option" + , "" + , "" + , "int msecs" + , "int msecs" +"" +}; + +static const int qtscript_QAbstractSocket_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 4 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 2 + , 1 + , 0 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QAbstractSocket_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAbstractSocket::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAbstractSocket*) +Q_DECLARE_METATYPE(QtScriptShell_QAbstractSocket*) +Q_DECLARE_METATYPE(QAbstractSocket::PauseMode) +Q_DECLARE_METATYPE(QAbstractSocket::SocketType) +Q_DECLARE_METATYPE(QHostAddress) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAbstractSocket::NetworkLayerProtocol) +Q_DECLARE_METATYPE(QAbstractSocket::SocketOption) +Q_DECLARE_METATYPE(QIODevice*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QAbstractSocket::PauseMode +// + +static const QAbstractSocket::PauseMode qtscript_QAbstractSocket_PauseMode_values[] = { + QAbstractSocket::PauseNever + , QAbstractSocket::PauseOnSslErrors +}; + +static const char * const qtscript_QAbstractSocket_PauseMode_keys[] = { + "PauseNever" + , "PauseOnSslErrors" +}; + +static QString qtscript_QAbstractSocket_PauseMode_toStringHelper(QAbstractSocket::PauseMode value) +{ + if ((value >= QAbstractSocket::PauseNever) && (value <= QAbstractSocket::PauseOnSslErrors)) + return qtscript_QAbstractSocket_PauseMode_keys[static_cast(value)-static_cast(QAbstractSocket::PauseNever)]; + return QString(); +} + +static QScriptValue qtscript_QAbstractSocket_PauseMode_toScriptValue(QScriptEngine *engine, const QAbstractSocket::PauseMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QAbstractSocket")); + return clazz.property(qtscript_QAbstractSocket_PauseMode_toStringHelper(value)); +} + +static void qtscript_QAbstractSocket_PauseMode_fromScriptValue(const QScriptValue &value, QAbstractSocket::PauseMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QAbstractSocket_PauseMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QAbstractSocket::PauseNever) && (arg <= QAbstractSocket::PauseOnSslErrors)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("PauseMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QAbstractSocket_PauseMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractSocket::PauseMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAbstractSocket_PauseMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractSocket::PauseMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QAbstractSocket_PauseMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QAbstractSocket_PauseMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QAbstractSocket_PauseMode, + qtscript_QAbstractSocket_PauseMode_valueOf, qtscript_QAbstractSocket_PauseMode_toString); + qScriptRegisterMetaType(engine, qtscript_QAbstractSocket_PauseMode_toScriptValue, + qtscript_QAbstractSocket_PauseMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QAbstractSocket_PauseMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QAbstractSocket_PauseMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QAbstractSocket::SocketType +// + +static const QAbstractSocket::SocketType qtscript_QAbstractSocket_SocketType_values[] = { + QAbstractSocket::UnknownSocketType + , QAbstractSocket::TcpSocket + , QAbstractSocket::UdpSocket +}; + +static const char * const qtscript_QAbstractSocket_SocketType_keys[] = { + "UnknownSocketType" + , "TcpSocket" + , "UdpSocket" +}; + +static QString qtscript_QAbstractSocket_SocketType_toStringHelper(QAbstractSocket::SocketType value) +{ + if ((value >= QAbstractSocket::UnknownSocketType) && (value <= QAbstractSocket::UdpSocket)) + return qtscript_QAbstractSocket_SocketType_keys[static_cast(value)-static_cast(QAbstractSocket::UnknownSocketType)]; + return QString(); +} + +static QScriptValue qtscript_QAbstractSocket_SocketType_toScriptValue(QScriptEngine *engine, const QAbstractSocket::SocketType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QAbstractSocket")); + return clazz.property(qtscript_QAbstractSocket_SocketType_toStringHelper(value)); +} + +static void qtscript_QAbstractSocket_SocketType_fromScriptValue(const QScriptValue &value, QAbstractSocket::SocketType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QAbstractSocket_SocketType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QAbstractSocket::UnknownSocketType) && (arg <= QAbstractSocket::UdpSocket)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SocketType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QAbstractSocket_SocketType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractSocket::SocketType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAbstractSocket_SocketType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractSocket::SocketType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QAbstractSocket_SocketType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QAbstractSocket_SocketType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QAbstractSocket_SocketType, + qtscript_QAbstractSocket_SocketType_valueOf, qtscript_QAbstractSocket_SocketType_toString); + qScriptRegisterMetaType(engine, qtscript_QAbstractSocket_SocketType_toScriptValue, + qtscript_QAbstractSocket_SocketType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QAbstractSocket_SocketType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QAbstractSocket_SocketType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QAbstractSocket +// + +static QScriptValue qtscript_QAbstractSocket_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 22; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAbstractSocket* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractSocket.%0(): this object is not a QAbstractSocket") + .arg(qtscript_QAbstractSocket_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->abort(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QHostAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + unsigned short _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->connectToHost(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && context->argument(1).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + unsigned short _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->connectToHost(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && (qMetaTypeId >() == context->argument(2).toVariant().userType())) { + QHostAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + unsigned short _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + _q_self->connectToHost(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && context->argument(1).isNumber() + && (qMetaTypeId >() == context->argument(2).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + unsigned short _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + _q_self->connectToHost(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + QString _q_arg0 = context->argument(0).toString(); + unsigned short _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QAbstractSocket::NetworkLayerProtocol _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->connectToHost(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->disconnectFromHost(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QAbstractSocket::SocketError _q_result = _q_self->error(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->flush(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QHostAddress _q_result = _q_self->localAddress(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + unsigned short _q_result = _q_self->localPort(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QHostAddress _q_result = _q_self->peerAddress(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->peerName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + unsigned short _q_result = _q_self->peerPort(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QNetworkProxy _q_result = _q_self->proxy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->readBufferSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + _q_self->resume(); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QNetworkProxy _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setProxy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setReadBufferSize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 2) { + QAbstractSocket::SocketOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setSocketOption(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QAbstractSocket::SocketOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_result = _q_self->socketOption(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QAbstractSocket::SocketType _q_result = _q_self->socketType(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QAbstractSocket::SocketState _q_result = _q_self->state(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->waitForConnected(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->waitForConnected(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->waitForDisconnected(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->waitForDisconnected(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: { + QString result = QString::fromLatin1("QAbstractSocket"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractSocket_throw_ambiguity_error_helper(context, + qtscript_QAbstractSocket_function_names[_id+1], + qtscript_QAbstractSocket_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAbstractSocket_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAbstractSocket(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 2) { + QAbstractSocket::SocketType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QAbstractSocket* _q_cpp_result = new QtScriptShell_QAbstractSocket(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractSocket*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractSocket_throw_ambiguity_error_helper(context, + qtscript_QAbstractSocket_function_names[_id], + qtscript_QAbstractSocket_function_signatures[_id]); +} + +static QScriptValue qtscript_QAbstractSocket_toScriptValue(QScriptEngine *engine, QAbstractSocket* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAbstractSocket_fromScriptValue(const QScriptValue &value, QAbstractSocket* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAbstractSocket_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAbstractSocket*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 23; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAbstractSocket_prototype_call, qtscript_QAbstractSocket_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAbstractSocket_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QAbstractSocket_toScriptValue, + qtscript_QAbstractSocket_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAbstractSocket_static_call, proto, qtscript_QAbstractSocket_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("PauseMode"), + qtscript_create_QAbstractSocket_PauseMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("SocketType"), + qtscript_create_QAbstractSocket_SocketType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QAuthenticator.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QAuthenticator.cpp new file mode 100644 index 00000000..5175143d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QAuthenticator.cpp @@ -0,0 +1,252 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QAuthenticator_function_names[] = { + "QAuthenticator" + // static + // prototype + , "isNull" + , "equals" + , "option" + , "options" + , "password" + , "realm" + , "setOption" + , "setPassword" + , "setRealm" + , "setUser" + , "user" + , "toString" +}; + +static const char * const qtscript_QAuthenticator_function_signatures[] = { + "\nQAuthenticator other" + // static + // prototype + , "" + , "QAuthenticator other" + , "String opt" + , "" + , "" + , "" + , "String opt, Object value" + , "String password" + , "String realm" + , "String user" + , "" +"" +}; + +static const int qtscript_QAuthenticator_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 2 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QAuthenticator_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAuthenticator::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAuthenticator) +Q_DECLARE_METATYPE(QAuthenticator*) + +// +// QAuthenticator +// + +static QScriptValue qtscript_QAuthenticator_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 11; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAuthenticator* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAuthenticator.%0(): this object is not a QAuthenticator") + .arg(qtscript_QAuthenticator_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QAuthenticator _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QVariant _q_result = _q_self->option(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QHash _q_result = _q_self->options(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->password(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->realm(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setOption(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPassword(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setRealm(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setUser(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->user(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: { + QString result = QString::fromLatin1("QAuthenticator"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAuthenticator_throw_ambiguity_error_helper(context, + qtscript_QAuthenticator_function_names[_id+1], + qtscript_QAuthenticator_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAuthenticator_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAuthenticator(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QAuthenticator _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QAuthenticator _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAuthenticator _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAuthenticator_throw_ambiguity_error_helper(context, + qtscript_QAuthenticator_function_names[_id], + qtscript_QAuthenticator_function_signatures[_id]); +} + +QScriptValue qtscript_create_QAuthenticator_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAuthenticator*)0)); + for (int i = 0; i < 12; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAuthenticator_prototype_call, qtscript_QAuthenticator_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAuthenticator_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAuthenticator_static_call, proto, qtscript_QAuthenticator_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QHostAddress.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QHostAddress.cpp new file mode 100644 index 00000000..82a11b29 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QHostAddress.cpp @@ -0,0 +1,459 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QHostAddress_function_names[] = { + "QHostAddress" + // static + , "parseSubnet" + // prototype + , "clear" + , "isInSubnet" + , "isLoopback" + , "isMulticast" + , "isNull" + , "equals" + , "protocol" + , "scopeId" + , "setAddress" + , "setScopeId" + , "swap" + , "toIPv4Address" + , "toIPv6Address" + , "toString" +}; + +static const char * const qtscript_QHostAddress_function_signatures[] = { + "\nSpecialAddress address\nQHostAddress copy\nQIPv6Address ip6Addr\nString address\nunsigned char ip6Addr\nunsigned int ip4Addr" + // static + , "String subnet" + // prototype + , "" + , "QHostAddress subnet, int netmask\nQPair subnet" + , "" + , "" + , "" + , "SpecialAddress address\nQHostAddress address" + , "" + , "" + , "QIPv6Address ip6Addr\nString address\nunsigned char ip6Addr\nunsigned int ip4Addr" + , "String id" + , "QHostAddress other" + , "\nbool ok" + , "" + , "" +}; + +static const int qtscript_QHostAddress_function_lengths[] = { + 1 + // static + , 1 + // prototype + , 0 + , 2 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QHostAddress_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QHostAddress::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QHostAddress) +Q_DECLARE_METATYPE(QHostAddress*) +Q_DECLARE_METATYPE(QHostAddress::SpecialAddress) +template <> \ +struct QMetaTypeId< QPair > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QPair >("QPair")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(QAbstractSocket::NetworkLayerProtocol) +Q_DECLARE_METATYPE(QIPv6Address) +Q_DECLARE_METATYPE(const unsigned char*) +Q_DECLARE_METATYPE(bool*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QHostAddress::SpecialAddress +// + +static const QHostAddress::SpecialAddress qtscript_QHostAddress_SpecialAddress_values[] = { + QHostAddress::Null + , QHostAddress::Broadcast + , QHostAddress::LocalHost + , QHostAddress::LocalHostIPv6 + , QHostAddress::Any + , QHostAddress::AnyIPv6 + , QHostAddress::AnyIPv4 +}; + +static const char * const qtscript_QHostAddress_SpecialAddress_keys[] = { + "Null" + , "Broadcast" + , "LocalHost" + , "LocalHostIPv6" + , "Any" + , "AnyIPv6" + , "AnyIPv4" +}; + +static QString qtscript_QHostAddress_SpecialAddress_toStringHelper(QHostAddress::SpecialAddress value) +{ + if ((value >= QHostAddress::Null) && (value <= QHostAddress::AnyIPv4)) + return qtscript_QHostAddress_SpecialAddress_keys[static_cast(value)-static_cast(QHostAddress::Null)]; + return QString(); +} + +static QScriptValue qtscript_QHostAddress_SpecialAddress_toScriptValue(QScriptEngine *engine, const QHostAddress::SpecialAddress &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QHostAddress")); + return clazz.property(qtscript_QHostAddress_SpecialAddress_toStringHelper(value)); +} + +static void qtscript_QHostAddress_SpecialAddress_fromScriptValue(const QScriptValue &value, QHostAddress::SpecialAddress &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QHostAddress_SpecialAddress(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QHostAddress::Null) && (arg <= QHostAddress::AnyIPv4)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SpecialAddress(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QHostAddress_SpecialAddress_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QHostAddress::SpecialAddress value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QHostAddress_SpecialAddress_toString(QScriptContext *context, QScriptEngine *engine) +{ + QHostAddress::SpecialAddress value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QHostAddress_SpecialAddress_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QHostAddress_SpecialAddress_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QHostAddress_SpecialAddress, + qtscript_QHostAddress_SpecialAddress_valueOf, qtscript_QHostAddress_SpecialAddress_toString); + qScriptRegisterMetaType(engine, qtscript_QHostAddress_SpecialAddress_toScriptValue, + qtscript_QHostAddress_SpecialAddress_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 7; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QHostAddress_SpecialAddress_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QHostAddress_SpecialAddress_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QHostAddress +// + +static QScriptValue qtscript_QHostAddress_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 14; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QHostAddress* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QHostAddress.%0(): this object is not a QHostAddress") + .arg(qtscript_QHostAddress_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QPair _q_arg0 = qscriptvalue_cast >(context->argument(0)); + bool _q_result = _q_self->isInSubnet(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QHostAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + bool _q_result = _q_self->isInSubnet(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isLoopback(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isMulticast(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QHostAddress::SpecialAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QHostAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 6: + if (context->argumentCount() == 0) { + QAbstractSocket::NetworkLayerProtocol _q_result = _q_self->protocol(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->scopeId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QIPv6Address _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setAddress(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->setAddress(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0))) { + const unsigned char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setAddress(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber()) { + uint _q_arg0 = context->argument(0).toUInt32(); + _q_self->setAddress(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 9: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setScopeId(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QHostAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + unsigned int _q_result = _q_self->toIPv4Address(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + bool* _q_arg0 = qscriptvalue_cast(context->argument(0)); + unsigned int _q_result = _q_self->toIPv4Address(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QIPv6Address _q_result = _q_self->toIPv6Address(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QHostAddress_throw_ambiguity_error_helper(context, + qtscript_QHostAddress_function_names[_id+2], + qtscript_QHostAddress_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QHostAddress_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QHostAddress(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QHostAddress _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QHostAddress::SpecialAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + QHostAddress _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QHostAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + QHostAddress _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QIPv6Address _q_arg0 = qscriptvalue_cast(context->argument(0)); + QHostAddress _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QHostAddress _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + const unsigned char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QHostAddress _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isNumber()) { + uint _q_arg0 = context->argument(0).toUInt32(); + QHostAddress _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QPair _q_result = QHostAddress::parseSubnet(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QHostAddress_throw_ambiguity_error_helper(context, + qtscript_QHostAddress_function_names[_id], + qtscript_QHostAddress_function_signatures[_id]); +} + +QScriptValue qtscript_create_QHostAddress_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QHostAddress*)0)); + for (int i = 0; i < 14; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QHostAddress_prototype_call, qtscript_QHostAddress_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QHostAddress_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QHostAddress_static_call, proto, qtscript_QHostAddress_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QHostAddress_static_call, + qtscript_QHostAddress_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QHostAddress_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("SpecialAddress"), + qtscript_create_QHostAddress_SpecialAddress_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QHostInfo.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QHostInfo.cpp new file mode 100644 index 00000000..8f049c13 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QHostInfo.cpp @@ -0,0 +1,404 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QHostInfo_function_names[] = { + "QHostInfo" + // static + , "abortHostLookup" + , "fromName" + , "localDomainName" + , "localHostName" + , "lookupHost" + // prototype + , "addresses" + , "error" + , "errorString" + , "hostName" + , "lookupId" + , "setAddresses" + , "setError" + , "setErrorString" + , "setHostName" + , "setLookupId" + , "toString" +}; + +static const char * const qtscript_QHostInfo_function_signatures[] = { + "QHostInfo d\nint lookupId" + // static + , "int lookupId" + , "String name" + , "" + , "" + , "String name, QObject receiver, char member" + // prototype + , "" + , "" + , "" + , "" + , "" + , "List addresses" + , "HostInfoError error" + , "String errorString" + , "String name" + , "int id" +"" +}; + +static const int qtscript_QHostInfo_function_lengths[] = { + 1 + // static + , 1 + , 1 + , 0 + , 0 + , 3 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QHostInfo_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QHostInfo::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QHostInfo*) +Q_DECLARE_METATYPE(QHostInfo::HostInfoError) +Q_DECLARE_METATYPE(QHostAddress) +Q_DECLARE_METATYPE(QList) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QHostInfo::HostInfoError +// + +static const QHostInfo::HostInfoError qtscript_QHostInfo_HostInfoError_values[] = { + QHostInfo::NoError + , QHostInfo::HostNotFound + , QHostInfo::UnknownError +}; + +static const char * const qtscript_QHostInfo_HostInfoError_keys[] = { + "NoError" + , "HostNotFound" + , "UnknownError" +}; + +static QString qtscript_QHostInfo_HostInfoError_toStringHelper(QHostInfo::HostInfoError value) +{ + if ((value >= QHostInfo::NoError) && (value <= QHostInfo::UnknownError)) + return qtscript_QHostInfo_HostInfoError_keys[static_cast(value)-static_cast(QHostInfo::NoError)]; + return QString(); +} + +static QScriptValue qtscript_QHostInfo_HostInfoError_toScriptValue(QScriptEngine *engine, const QHostInfo::HostInfoError &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QHostInfo")); + return clazz.property(qtscript_QHostInfo_HostInfoError_toStringHelper(value)); +} + +static void qtscript_QHostInfo_HostInfoError_fromScriptValue(const QScriptValue &value, QHostInfo::HostInfoError &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QHostInfo_HostInfoError(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QHostInfo::NoError) && (arg <= QHostInfo::UnknownError)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("HostInfoError(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QHostInfo_HostInfoError_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QHostInfo::HostInfoError value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QHostInfo_HostInfoError_toString(QScriptContext *context, QScriptEngine *engine) +{ + QHostInfo::HostInfoError value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QHostInfo_HostInfoError_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QHostInfo_HostInfoError_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QHostInfo_HostInfoError, + qtscript_QHostInfo_HostInfoError_valueOf, qtscript_QHostInfo_HostInfoError_toString); + qScriptRegisterMetaType(engine, qtscript_QHostInfo_HostInfoError_toScriptValue, + qtscript_QHostInfo_HostInfoError_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QHostInfo_HostInfoError_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QHostInfo_HostInfoError_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QHostInfo +// + +static QScriptValue qtscript_QHostInfo_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 10; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QHostInfo* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QHostInfo.%0(): this object is not a QHostInfo") + .arg(qtscript_QHostInfo_function_names[_id+6])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->addresses(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QHostInfo::HostInfoError _q_result = _q_self->error(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->hostName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->lookupId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setAddresses(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QHostInfo::HostInfoError _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setError(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setErrorString(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setHostName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setLookupId(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: { + QString result = QString::fromLatin1("QHostInfo"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QHostInfo_throw_ambiguity_error_helper(context, + qtscript_QHostInfo_function_names[_id+6], + qtscript_QHostInfo_function_signatures[_id+6]); +} + +static QScriptValue qtscript_QHostInfo_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QHostInfo(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QHostInfo _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QHostInfo _q_arg0 = qscriptvalue_cast(context->argument(0)); + QHostInfo _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QHostInfo _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QHostInfo::abortHostLookup(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QHostInfo _q_result = QHostInfo::fromName(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = QHostInfo::localDomainName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = QHostInfo::localHostName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QObject* _q_arg1 = context->argument(1).toQObject(); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg2 = context->argument(2).toString().toLatin1(); + const char * _q_arg2 = tmp__q_arg2.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + int _q_result = QHostInfo::lookupHost(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QHostInfo_throw_ambiguity_error_helper(context, + qtscript_QHostInfo_function_names[_id], + qtscript_QHostInfo_function_signatures[_id]); +} + +QScriptValue qtscript_create_QHostInfo_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QHostInfo*)0)); + for (int i = 0; i < 11; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QHostInfo_prototype_call, qtscript_QHostInfo_function_lengths[i+6]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QHostInfo_function_names[i+6]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QHostInfo_static_call, proto, qtscript_QHostInfo_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QHostInfo_static_call, + qtscript_QHostInfo_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QHostInfo_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("HostInfoError"), + qtscript_create_QHostInfo_HostInfoError_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QIPv6Address.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QIPv6Address.cpp new file mode 100644 index 00000000..3c93d687 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QIPv6Address.cpp @@ -0,0 +1,128 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QIPv6Address.h" + +static const char * const qtscript_QIPv6Address_function_names[] = { + "QIPv6Address" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QIPv6Address_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QIPv6Address_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QIPv6Address_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QIPv6Address::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QIPv6Address) +Q_DECLARE_METATYPE(QIPv6Address*) +Q_DECLARE_METATYPE(QtScriptShell_QIPv6Address) +Q_DECLARE_METATYPE(QtScriptShell_QIPv6Address*) + +// +// QIPv6Address +// + +static QScriptValue qtscript_QIPv6Address_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QIPv6Address* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QIPv6Address.%0(): this object is not a QIPv6Address") + .arg(qtscript_QIPv6Address_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QIPv6Address"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QIPv6Address_throw_ambiguity_error_helper(context, + qtscript_QIPv6Address_function_names[_id+1], + qtscript_QIPv6Address_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QIPv6Address_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QIPv6Address(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QIPv6Address _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QIPv6Address)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QIPv6Address_throw_ambiguity_error_helper(context, + qtscript_QIPv6Address_function_names[_id], + qtscript_QIPv6Address_function_signatures[_id]); +} + +QScriptValue qtscript_create_QIPv6Address_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QIPv6Address*)0)); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QIPv6Address_static_call, proto, qtscript_QIPv6Address_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QLocalServer.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QLocalServer.cpp new file mode 100644 index 00000000..2fc9db59 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QLocalServer.cpp @@ -0,0 +1,301 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QLocalServer.h" + +static const char * const qtscript_QLocalServer_function_names[] = { + "QLocalServer" + // static + , "removeServer" + // prototype + , "close" + , "errorString" + , "fullServerName" + , "hasPendingConnections" + , "isListening" + , "listen" + , "maxPendingConnections" + , "nextPendingConnection" + , "serverError" + , "serverName" + , "setMaxPendingConnections" + , "waitForNewConnection" + , "toString" +}; + +static const char * const qtscript_QLocalServer_function_signatures[] = { + "QObject parent" + // static + , "String name" + // prototype + , "" + , "" + , "" + , "" + , "" + , "String name" + , "" + , "" + , "" + , "" + , "int numConnections" + , "int msec" +"" +}; + +static const int qtscript_QLocalServer_function_lengths[] = { + 1 + // static + , 1 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QLocalServer_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QLocalServer::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QLocalServer*) +Q_DECLARE_METATYPE(QtScriptShell_QLocalServer*) +Q_DECLARE_METATYPE(QLocalSocket*) + +// +// QLocalServer +// + +static QScriptValue qtscript_QLocalServer_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 12; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QLocalServer* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QLocalServer.%0(): this object is not a QLocalServer") + .arg(qtscript_QLocalServer_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->close(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->fullServerName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasPendingConnections(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isListening(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->listen(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = _q_self->maxPendingConnections(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QLocalSocket* _q_result = _q_self->nextPendingConnection(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QAbstractSocket::SocketError _q_result = _q_self->serverError(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->serverName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setMaxPendingConnections(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->waitForNewConnection(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->waitForNewConnection(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: { + QString result = QString::fromLatin1("QLocalServer"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QLocalServer_throw_ambiguity_error_helper(context, + qtscript_QLocalServer_function_names[_id+2], + qtscript_QLocalServer_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QLocalServer_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QLocalServer(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QLocalServer* _q_cpp_result = new QtScriptShell_QLocalServer(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLocalServer*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QLocalServer* _q_cpp_result = new QtScriptShell_QLocalServer(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLocalServer*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = QLocalServer::removeServer(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QLocalServer_throw_ambiguity_error_helper(context, + qtscript_QLocalServer_function_names[_id], + qtscript_QLocalServer_function_signatures[_id]); +} + +static QScriptValue qtscript_QLocalServer_toScriptValue(QScriptEngine *engine, QLocalServer* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QLocalServer_fromScriptValue(const QScriptValue &value, QLocalServer* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QLocalServer_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QLocalServer*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 13; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QLocalServer_prototype_call, qtscript_QLocalServer_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QLocalServer_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QLocalServer_toScriptValue, + qtscript_QLocalServer_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QLocalServer_static_call, proto, qtscript_QLocalServer_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QLocalServer_static_call, + qtscript_QLocalServer_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QLocalServer_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QLocalSocket.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QLocalSocket.cpp new file mode 100644 index 00000000..98b8dcd7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QLocalSocket.cpp @@ -0,0 +1,501 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QLocalSocket.h" + +static const char * const qtscript_QLocalSocket_function_names[] = { + "QLocalSocket" + // static + // prototype + , "abort" + , "connectToServer" + , "disconnectFromServer" + , "error" + , "flush" + , "fullServerName" + , "isValid" + , "readBufferSize" + , "serverName" + , "setReadBufferSize" + , "setServerName" + , "state" + , "waitForConnected" + , "waitForDisconnected" + , "toString" +}; + +static const char * const qtscript_QLocalSocket_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" + , "OpenMode openMode\nString name, OpenMode openMode" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "qint64 size" + , "String name" + , "" + , "int msecs" + , "int msecs" +"" +}; + +static const int qtscript_QLocalSocket_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 2 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QLocalSocket_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QLocalSocket::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QLocalSocket*) +Q_DECLARE_METATYPE(QtScriptShell_QLocalSocket*) +Q_DECLARE_METATYPE(QLocalSocket::LocalSocketState) +Q_DECLARE_METATYPE(QLocalSocket::LocalSocketError) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QIODevice*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QLocalSocket::LocalSocketState +// + +static const QLocalSocket::LocalSocketState qtscript_QLocalSocket_LocalSocketState_values[] = { + QLocalSocket::UnconnectedState + , QLocalSocket::ConnectingState + , QLocalSocket::ConnectedState + , QLocalSocket::ClosingState +}; + +static const char * const qtscript_QLocalSocket_LocalSocketState_keys[] = { + "UnconnectedState" + , "ConnectingState" + , "ConnectedState" + , "ClosingState" +}; + +static QString qtscript_QLocalSocket_LocalSocketState_toStringHelper(QLocalSocket::LocalSocketState value) +{ + if ((value >= QLocalSocket::UnconnectedState) && (value <= QLocalSocket::ClosingState)) + return qtscript_QLocalSocket_LocalSocketState_keys[static_cast(value)-static_cast(QLocalSocket::UnconnectedState)]; + return QString(); +} + +static QScriptValue qtscript_QLocalSocket_LocalSocketState_toScriptValue(QScriptEngine *engine, const QLocalSocket::LocalSocketState &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QLocalSocket")); + return clazz.property(qtscript_QLocalSocket_LocalSocketState_toStringHelper(value)); +} + +static void qtscript_QLocalSocket_LocalSocketState_fromScriptValue(const QScriptValue &value, QLocalSocket::LocalSocketState &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QLocalSocket_LocalSocketState(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QLocalSocket::UnconnectedState) && (arg <= QLocalSocket::ClosingState)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("LocalSocketState(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QLocalSocket_LocalSocketState_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QLocalSocket::LocalSocketState value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QLocalSocket_LocalSocketState_toString(QScriptContext *context, QScriptEngine *engine) +{ + QLocalSocket::LocalSocketState value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QLocalSocket_LocalSocketState_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QLocalSocket_LocalSocketState_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QLocalSocket_LocalSocketState, + qtscript_QLocalSocket_LocalSocketState_valueOf, qtscript_QLocalSocket_LocalSocketState_toString); + qScriptRegisterMetaType(engine, qtscript_QLocalSocket_LocalSocketState_toScriptValue, + qtscript_QLocalSocket_LocalSocketState_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QLocalSocket_LocalSocketState_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QLocalSocket_LocalSocketState_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QLocalSocket::LocalSocketError +// + +static const QLocalSocket::LocalSocketError qtscript_QLocalSocket_LocalSocketError_values[] = { + QLocalSocket::ConnectionRefusedError + , QLocalSocket::PeerClosedError + , QLocalSocket::ServerNotFoundError + , QLocalSocket::SocketAccessError + , QLocalSocket::SocketResourceError + , QLocalSocket::SocketTimeoutError + , QLocalSocket::DatagramTooLargeError + , QLocalSocket::ConnectionError + , QLocalSocket::UnsupportedSocketOperationError + , QLocalSocket::UnknownSocketError + , QLocalSocket::OperationError +}; + +static const char * const qtscript_QLocalSocket_LocalSocketError_keys[] = { + "ConnectionRefusedError" + , "PeerClosedError" + , "ServerNotFoundError" + , "SocketAccessError" + , "SocketResourceError" + , "SocketTimeoutError" + , "DatagramTooLargeError" + , "ConnectionError" + , "UnsupportedSocketOperationError" + , "UnknownSocketError" + , "OperationError" +}; + +static QString qtscript_QLocalSocket_LocalSocketError_toStringHelper(QLocalSocket::LocalSocketError value) +{ + if ((value >= QLocalSocket::ConnectionRefusedError) && (value <= QLocalSocket::OperationError)) + return qtscript_QLocalSocket_LocalSocketError_keys[static_cast(value)-static_cast(QLocalSocket::ConnectionRefusedError)]; + return QString(); +} + +static QScriptValue qtscript_QLocalSocket_LocalSocketError_toScriptValue(QScriptEngine *engine, const QLocalSocket::LocalSocketError &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QLocalSocket")); + return clazz.property(qtscript_QLocalSocket_LocalSocketError_toStringHelper(value)); +} + +static void qtscript_QLocalSocket_LocalSocketError_fromScriptValue(const QScriptValue &value, QLocalSocket::LocalSocketError &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QLocalSocket_LocalSocketError(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QLocalSocket::ConnectionRefusedError) && (arg <= QLocalSocket::OperationError)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("LocalSocketError(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QLocalSocket_LocalSocketError_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QLocalSocket::LocalSocketError value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QLocalSocket_LocalSocketError_toString(QScriptContext *context, QScriptEngine *engine) +{ + QLocalSocket::LocalSocketError value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QLocalSocket_LocalSocketError_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QLocalSocket_LocalSocketError_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QLocalSocket_LocalSocketError, + qtscript_QLocalSocket_LocalSocketError_valueOf, qtscript_QLocalSocket_LocalSocketError_toString); + qScriptRegisterMetaType(engine, qtscript_QLocalSocket_LocalSocketError_toScriptValue, + qtscript_QLocalSocket_LocalSocketError_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 11; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QLocalSocket_LocalSocketError_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QLocalSocket_LocalSocketError_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QLocalSocket +// + +static QScriptValue qtscript_QLocalSocket_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 14; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QLocalSocket* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QLocalSocket.%0(): this object is not a QLocalSocket") + .arg(qtscript_QLocalSocket_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->abort(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->connectToServer(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->connectToServer(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->connectToServer(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + _q_self->connectToServer(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->disconnectFromServer(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QLocalSocket::LocalSocketError _q_result = _q_self->error(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->flush(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->fullServerName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->readBufferSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->serverName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setReadBufferSize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setServerName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QLocalSocket::LocalSocketState _q_result = _q_self->state(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->waitForConnected(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->waitForConnected(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->waitForDisconnected(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->waitForDisconnected(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: { + QString result = QString::fromLatin1("QLocalSocket"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QLocalSocket_throw_ambiguity_error_helper(context, + qtscript_QLocalSocket_function_names[_id+1], + qtscript_QLocalSocket_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QLocalSocket_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QLocalSocket(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QLocalSocket* _q_cpp_result = new QtScriptShell_QLocalSocket(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLocalSocket*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QLocalSocket* _q_cpp_result = new QtScriptShell_QLocalSocket(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLocalSocket*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QLocalSocket_throw_ambiguity_error_helper(context, + qtscript_QLocalSocket_function_names[_id], + qtscript_QLocalSocket_function_signatures[_id]); +} + +static QScriptValue qtscript_QLocalSocket_toScriptValue(QScriptEngine *engine, QLocalSocket* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QLocalSocket_fromScriptValue(const QScriptValue &value, QLocalSocket* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QLocalSocket_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QLocalSocket*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 15; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QLocalSocket_prototype_call, qtscript_QLocalSocket_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QLocalSocket_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QLocalSocket_toScriptValue, + qtscript_QLocalSocket_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QLocalSocket_static_call, proto, qtscript_QLocalSocket_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("LocalSocketState"), + qtscript_create_QLocalSocket_LocalSocketState_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("LocalSocketError"), + qtscript_create_QLocalSocket_LocalSocketError_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkAccessManager.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkAccessManager.cpp new file mode 100644 index 00000000..8ca58290 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkAccessManager.cpp @@ -0,0 +1,547 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QNetworkAccessManager.h" + +static const char * const qtscript_QNetworkAccessManager_function_names[] = { + "QNetworkAccessManager" + // static + // prototype + , "cache" + , "clearAccessCache" + , "connectToHost" + , "cookieJar" + , "deleteResource" + , "get" + , "head" + , "post" + , "proxy" + , "proxyFactory" + , "put" + , "sendCustomRequest" + , "setCache" + , "setCookieJar" + , "setProxy" + , "setProxyFactory" + , "supportedSchemes" + , "toString" +}; + +static const char * const qtscript_QNetworkAccessManager_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" + , "" + , "String hostName, unsigned short port" + , "" + , "QNetworkRequest request" + , "QNetworkRequest request" + , "QNetworkRequest request" + , "QNetworkRequest request, QIODevice data\nQNetworkRequest request, QByteArray data" + , "" + , "" + , "QNetworkRequest request, QIODevice data\nQNetworkRequest request, QByteArray data" + , "QNetworkRequest request, QByteArray verb, QIODevice data" + , "QAbstractNetworkCache cache" + , "QNetworkCookieJar cookieJar" + , "QNetworkProxy proxy" + , "QNetworkProxyFactory factory" + , "" +"" +}; + +static const int qtscript_QNetworkAccessManager_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 2 + , 0 + , 1 + , 1 + , 1 + , 2 + , 0 + , 0 + , 2 + , 3 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QNetworkAccessManager_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QNetworkAccessManager::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QNetworkAccessManager*) +Q_DECLARE_METATYPE(QtScriptShell_QNetworkAccessManager*) +Q_DECLARE_METATYPE(QNetworkAccessManager::NetworkAccessibility) +Q_DECLARE_METATYPE(QNetworkAccessManager::Operation) +Q_DECLARE_METATYPE(QAbstractNetworkCache*) +Q_DECLARE_METATYPE(QNetworkCookieJar*) +Q_DECLARE_METATYPE(QNetworkReply*) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QNetworkProxyFactory*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QNetworkAccessManager::NetworkAccessibility +// + +static const QNetworkAccessManager::NetworkAccessibility qtscript_QNetworkAccessManager_NetworkAccessibility_values[] = { + QNetworkAccessManager::UnknownAccessibility + , QNetworkAccessManager::NotAccessible + , QNetworkAccessManager::Accessible +}; + +static const char * const qtscript_QNetworkAccessManager_NetworkAccessibility_keys[] = { + "UnknownAccessibility" + , "NotAccessible" + , "Accessible" +}; + +static QString qtscript_QNetworkAccessManager_NetworkAccessibility_toStringHelper(QNetworkAccessManager::NetworkAccessibility value) +{ + if ((value >= QNetworkAccessManager::UnknownAccessibility) && (value <= QNetworkAccessManager::Accessible)) + return qtscript_QNetworkAccessManager_NetworkAccessibility_keys[static_cast(value)-static_cast(QNetworkAccessManager::UnknownAccessibility)]; + return QString(); +} + +static QScriptValue qtscript_QNetworkAccessManager_NetworkAccessibility_toScriptValue(QScriptEngine *engine, const QNetworkAccessManager::NetworkAccessibility &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QNetworkAccessManager")); + return clazz.property(qtscript_QNetworkAccessManager_NetworkAccessibility_toStringHelper(value)); +} + +static void qtscript_QNetworkAccessManager_NetworkAccessibility_fromScriptValue(const QScriptValue &value, QNetworkAccessManager::NetworkAccessibility &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QNetworkAccessManager_NetworkAccessibility(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QNetworkAccessManager::UnknownAccessibility) && (arg <= QNetworkAccessManager::Accessible)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("NetworkAccessibility(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QNetworkAccessManager_NetworkAccessibility_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkAccessManager::NetworkAccessibility value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QNetworkAccessManager_NetworkAccessibility_toString(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkAccessManager::NetworkAccessibility value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QNetworkAccessManager_NetworkAccessibility_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QNetworkAccessManager_NetworkAccessibility_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QNetworkAccessManager_NetworkAccessibility, + qtscript_QNetworkAccessManager_NetworkAccessibility_valueOf, qtscript_QNetworkAccessManager_NetworkAccessibility_toString); + qScriptRegisterMetaType(engine, qtscript_QNetworkAccessManager_NetworkAccessibility_toScriptValue, + qtscript_QNetworkAccessManager_NetworkAccessibility_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QNetworkAccessManager_NetworkAccessibility_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QNetworkAccessManager_NetworkAccessibility_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QNetworkAccessManager::Operation +// + +static const QNetworkAccessManager::Operation qtscript_QNetworkAccessManager_Operation_values[] = { + QNetworkAccessManager::UnknownOperation + , QNetworkAccessManager::HeadOperation + , QNetworkAccessManager::GetOperation + , QNetworkAccessManager::PutOperation + , QNetworkAccessManager::PostOperation + , QNetworkAccessManager::DeleteOperation + , QNetworkAccessManager::CustomOperation +}; + +static const char * const qtscript_QNetworkAccessManager_Operation_keys[] = { + "UnknownOperation" + , "HeadOperation" + , "GetOperation" + , "PutOperation" + , "PostOperation" + , "DeleteOperation" + , "CustomOperation" +}; + +static QString qtscript_QNetworkAccessManager_Operation_toStringHelper(QNetworkAccessManager::Operation value) +{ + if ((value >= QNetworkAccessManager::UnknownOperation) && (value <= QNetworkAccessManager::CustomOperation)) + return qtscript_QNetworkAccessManager_Operation_keys[static_cast(value)-static_cast(QNetworkAccessManager::UnknownOperation)]; + return QString(); +} + +static QScriptValue qtscript_QNetworkAccessManager_Operation_toScriptValue(QScriptEngine *engine, const QNetworkAccessManager::Operation &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QNetworkAccessManager")); + return clazz.property(qtscript_QNetworkAccessManager_Operation_toStringHelper(value)); +} + +static void qtscript_QNetworkAccessManager_Operation_fromScriptValue(const QScriptValue &value, QNetworkAccessManager::Operation &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QNetworkAccessManager_Operation(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QNetworkAccessManager::UnknownOperation) && (arg <= QNetworkAccessManager::CustomOperation)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Operation(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QNetworkAccessManager_Operation_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkAccessManager::Operation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QNetworkAccessManager_Operation_toString(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkAccessManager::Operation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QNetworkAccessManager_Operation_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QNetworkAccessManager_Operation_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QNetworkAccessManager_Operation, + qtscript_QNetworkAccessManager_Operation_valueOf, qtscript_QNetworkAccessManager_Operation_toString); + qScriptRegisterMetaType(engine, qtscript_QNetworkAccessManager_Operation_toScriptValue, + qtscript_QNetworkAccessManager_Operation_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 7; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QNetworkAccessManager_Operation_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QNetworkAccessManager_Operation_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QNetworkAccessManager +// + +static QScriptValue qtscript_QNetworkAccessManager_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 17; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QNetworkAccessManager* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QNetworkAccessManager.%0(): this object is not a QNetworkAccessManager") + .arg(qtscript_QNetworkAccessManager_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QAbstractNetworkCache* _q_result = _q_self->cache(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->clearAccessCache(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->connectToHost(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + unsigned short _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->connectToHost(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QNetworkCookieJar* _q_result = _q_self->cookieJar(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QNetworkRequest _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkReply* _q_result = _q_self->deleteResource(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QNetworkRequest _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkReply* _q_result = _q_self->get(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QNetworkRequest _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkReply* _q_result = _q_self->head(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QNetworkRequest _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIODevice* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QNetworkReply* _q_result = _q_self->post(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QNetworkRequest _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QNetworkReply* _q_result = _q_self->post(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 8: + if (context->argumentCount() == 0) { + QNetworkProxy _q_result = _q_self->proxy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QNetworkProxyFactory* _q_result = _q_self->proxyFactory(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QNetworkRequest _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIODevice* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QNetworkReply* _q_result = _q_self->put(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QNetworkRequest _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QNetworkReply* _q_result = _q_self->put(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 11: + if (context->argumentCount() == 2) { + QNetworkRequest _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QNetworkReply* _q_result = _q_self->sendCustomRequest(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QNetworkRequest _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QIODevice* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QNetworkReply* _q_result = _q_self->sendCustomRequest(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QAbstractNetworkCache* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCache(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QNetworkCookieJar* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCookieJar(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QNetworkProxy _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setProxy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QNetworkProxyFactory* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setProxyFactory(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->supportedSchemes(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 17: { + QString result = QString::fromLatin1("QNetworkAccessManager"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkAccessManager_throw_ambiguity_error_helper(context, + qtscript_QNetworkAccessManager_function_names[_id+1], + qtscript_QNetworkAccessManager_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QNetworkAccessManager_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QNetworkAccessManager(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QNetworkAccessManager* _q_cpp_result = new QtScriptShell_QNetworkAccessManager(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QNetworkAccessManager*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QNetworkAccessManager* _q_cpp_result = new QtScriptShell_QNetworkAccessManager(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QNetworkAccessManager*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkAccessManager_throw_ambiguity_error_helper(context, + qtscript_QNetworkAccessManager_function_names[_id], + qtscript_QNetworkAccessManager_function_signatures[_id]); +} + +static QScriptValue qtscript_QNetworkAccessManager_toScriptValue(QScriptEngine *engine, QNetworkAccessManager* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QNetworkAccessManager_fromScriptValue(const QScriptValue &value, QNetworkAccessManager* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QNetworkAccessManager_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QNetworkAccessManager*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 18; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QNetworkAccessManager_prototype_call, qtscript_QNetworkAccessManager_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QNetworkAccessManager_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QNetworkAccessManager_toScriptValue, + qtscript_QNetworkAccessManager_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QNetworkAccessManager_static_call, proto, qtscript_QNetworkAccessManager_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("NetworkAccessibility"), + qtscript_create_QNetworkAccessManager_NetworkAccessibility_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Operation"), + qtscript_create_QNetworkAccessManager_Operation_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkAddressEntry.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkAddressEntry.cpp new file mode 100644 index 00000000..f0b511ee --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkAddressEntry.cpp @@ -0,0 +1,242 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QNetworkAddressEntry_function_names[] = { + "QNetworkAddressEntry" + // static + // prototype + , "broadcast" + , "ip" + , "netmask" + , "equals" + , "prefixLength" + , "setBroadcast" + , "setIp" + , "setNetmask" + , "setPrefixLength" + , "swap" + , "toString" +}; + +static const char * const qtscript_QNetworkAddressEntry_function_signatures[] = { + "\nQNetworkAddressEntry other" + // static + // prototype + , "" + , "" + , "" + , "QNetworkAddressEntry other" + , "" + , "QHostAddress newBroadcast" + , "QHostAddress newIp" + , "QHostAddress newNetmask" + , "int length" + , "QNetworkAddressEntry other" +"" +}; + +static const int qtscript_QNetworkAddressEntry_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QNetworkAddressEntry_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QNetworkAddressEntry::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QNetworkAddressEntry*) +Q_DECLARE_METATYPE(QHostAddress) + +// +// QNetworkAddressEntry +// + +static QScriptValue qtscript_QNetworkAddressEntry_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 10; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QNetworkAddressEntry* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QNetworkAddressEntry.%0(): this object is not a QNetworkAddressEntry") + .arg(qtscript_QNetworkAddressEntry_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QHostAddress _q_result = _q_self->broadcast(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QHostAddress _q_result = _q_self->ip(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QHostAddress _q_result = _q_self->netmask(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QNetworkAddressEntry _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->prefixLength(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QHostAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBroadcast(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QHostAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setIp(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QHostAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setNetmask(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setPrefixLength(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QNetworkAddressEntry _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: { + QString result = QString::fromLatin1("QNetworkAddressEntry"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkAddressEntry_throw_ambiguity_error_helper(context, + qtscript_QNetworkAddressEntry_function_names[_id+1], + qtscript_QNetworkAddressEntry_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QNetworkAddressEntry_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QNetworkAddressEntry(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QNetworkAddressEntry _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QNetworkAddressEntry _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkAddressEntry _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkAddressEntry_throw_ambiguity_error_helper(context, + qtscript_QNetworkAddressEntry_function_names[_id], + qtscript_QNetworkAddressEntry_function_signatures[_id]); +} + +QScriptValue qtscript_create_QNetworkAddressEntry_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QNetworkAddressEntry*)0)); + for (int i = 0; i < 11; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QNetworkAddressEntry_prototype_call, qtscript_QNetworkAddressEntry_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QNetworkAddressEntry_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QNetworkAddressEntry_static_call, proto, qtscript_QNetworkAddressEntry_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkCacheMetaData.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkCacheMetaData.cpp new file mode 100644 index 00000000..deb3f945 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkCacheMetaData.cpp @@ -0,0 +1,254 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QNetworkCacheMetaData_function_names[] = { + "QNetworkCacheMetaData" + // static + // prototype + , "expirationDate" + , "isValid" + , "lastModified" + , "equals" + , "saveToDisk" + , "setExpirationDate" + , "setLastModified" + , "setSaveToDisk" + , "setUrl" + , "swap" + , "url" + , "toString" +}; + +static const char * const qtscript_QNetworkCacheMetaData_function_signatures[] = { + "\nQNetworkCacheMetaData other" + // static + // prototype + , "" + , "" + , "" + , "QNetworkCacheMetaData other" + , "" + , "QDateTime dateTime" + , "QDateTime dateTime" + , "bool allow" + , "QUrl url" + , "QNetworkCacheMetaData other" + , "" +"" +}; + +static const int qtscript_QNetworkCacheMetaData_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QNetworkCacheMetaData_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QNetworkCacheMetaData::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QNetworkCacheMetaData) +Q_DECLARE_METATYPE(QNetworkCacheMetaData*) + +// +// QNetworkCacheMetaData +// + +static QScriptValue qtscript_QNetworkCacheMetaData_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 11; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QNetworkCacheMetaData* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QNetworkCacheMetaData.%0(): this object is not a QNetworkCacheMetaData") + .arg(qtscript_QNetworkCacheMetaData_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QDateTime _q_result = _q_self->expirationDate(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QDateTime _q_result = _q_self->lastModified(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QNetworkCacheMetaData _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->saveToDisk(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QDateTime _q_arg0 = context->argument(0).toDateTime(); + _q_self->setExpirationDate(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QDateTime _q_arg0 = context->argument(0).toDateTime(); + _q_self->setLastModified(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setSaveToDisk(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setUrl(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QNetworkCacheMetaData _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QUrl _q_result = _q_self->url(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: { + QString result = QString::fromLatin1("QNetworkCacheMetaData"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkCacheMetaData_throw_ambiguity_error_helper(context, + qtscript_QNetworkCacheMetaData_function_names[_id+1], + qtscript_QNetworkCacheMetaData_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QNetworkCacheMetaData_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QNetworkCacheMetaData(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QNetworkCacheMetaData _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QNetworkCacheMetaData _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkCacheMetaData _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkCacheMetaData_throw_ambiguity_error_helper(context, + qtscript_QNetworkCacheMetaData_function_names[_id], + qtscript_QNetworkCacheMetaData_function_signatures[_id]); +} + +QScriptValue qtscript_create_QNetworkCacheMetaData_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QNetworkCacheMetaData*)0)); + for (int i = 0; i < 12; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QNetworkCacheMetaData_prototype_call, qtscript_QNetworkCacheMetaData_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QNetworkCacheMetaData_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QNetworkCacheMetaData_static_call, proto, qtscript_QNetworkCacheMetaData_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkCookie.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkCookie.cpp new file mode 100644 index 00000000..814111ec --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkCookie.cpp @@ -0,0 +1,473 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QNetworkCookie_function_names[] = { + "QNetworkCookie" + // static + , "parseCookies" + // prototype + , "domain" + , "expirationDate" + , "hasSameIdentifier" + , "isHttpOnly" + , "isSecure" + , "isSessionCookie" + , "name" + , "normalize" + , "equals" + , "path" + , "setDomain" + , "setExpirationDate" + , "setHttpOnly" + , "setName" + , "setPath" + , "setSecure" + , "setValue" + , "swap" + , "toRawForm" + , "value" + , "toString" +}; + +static const char * const qtscript_QNetworkCookie_function_signatures[] = { + "QByteArray name, QByteArray value\nQNetworkCookie other" + // static + , "QByteArray cookieString" + // prototype + , "" + , "" + , "QNetworkCookie other" + , "" + , "" + , "" + , "" + , "QUrl url" + , "QNetworkCookie other" + , "" + , "String domain" + , "QDateTime date" + , "bool enable" + , "QByteArray cookieName" + , "String path" + , "bool enable" + , "QByteArray value" + , "QNetworkCookie other" + , "RawForm form" + , "" +"" +}; + +static const int qtscript_QNetworkCookie_function_lengths[] = { + 2 + // static + , 1 + // prototype + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QNetworkCookie_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QNetworkCookie::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QNetworkCookie*) +Q_DECLARE_METATYPE(QNetworkCookie::RawForm) +Q_DECLARE_METATYPE(QList) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QNetworkCookie::RawForm +// + +static const QNetworkCookie::RawForm qtscript_QNetworkCookie_RawForm_values[] = { + QNetworkCookie::NameAndValueOnly + , QNetworkCookie::Full +}; + +static const char * const qtscript_QNetworkCookie_RawForm_keys[] = { + "NameAndValueOnly" + , "Full" +}; + +static QString qtscript_QNetworkCookie_RawForm_toStringHelper(QNetworkCookie::RawForm value) +{ + if ((value >= QNetworkCookie::NameAndValueOnly) && (value <= QNetworkCookie::Full)) + return qtscript_QNetworkCookie_RawForm_keys[static_cast(value)-static_cast(QNetworkCookie::NameAndValueOnly)]; + return QString(); +} + +static QScriptValue qtscript_QNetworkCookie_RawForm_toScriptValue(QScriptEngine *engine, const QNetworkCookie::RawForm &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QNetworkCookie")); + return clazz.property(qtscript_QNetworkCookie_RawForm_toStringHelper(value)); +} + +static void qtscript_QNetworkCookie_RawForm_fromScriptValue(const QScriptValue &value, QNetworkCookie::RawForm &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QNetworkCookie_RawForm(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QNetworkCookie::NameAndValueOnly) && (arg <= QNetworkCookie::Full)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("RawForm(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QNetworkCookie_RawForm_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkCookie::RawForm value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QNetworkCookie_RawForm_toString(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkCookie::RawForm value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QNetworkCookie_RawForm_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QNetworkCookie_RawForm_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QNetworkCookie_RawForm, + qtscript_QNetworkCookie_RawForm_valueOf, qtscript_QNetworkCookie_RawForm_toString); + qScriptRegisterMetaType(engine, qtscript_QNetworkCookie_RawForm_toScriptValue, + qtscript_QNetworkCookie_RawForm_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QNetworkCookie_RawForm_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QNetworkCookie_RawForm_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QNetworkCookie +// + +static QScriptValue qtscript_QNetworkCookie_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 20; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QNetworkCookie* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QNetworkCookie.%0(): this object is not a QNetworkCookie") + .arg(qtscript_QNetworkCookie_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->domain(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QDateTime _q_result = _q_self->expirationDate(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QNetworkCookie _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->hasSameIdentifier(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isHttpOnly(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isSecure(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isSessionCookie(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->name(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->normalize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QNetworkCookie _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->path(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setDomain(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QDateTime _q_arg0 = context->argument(0).toDateTime(); + _q_self->setExpirationDate(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setHttpOnly(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPath(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setSecure(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setValue(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QNetworkCookie _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->toRawForm(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QNetworkCookie::RawForm _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_result = _q_self->toRawForm(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->value(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkCookie_throw_ambiguity_error_helper(context, + qtscript_QNetworkCookie_function_names[_id+2], + qtscript_QNetworkCookie_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QNetworkCookie_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QNetworkCookie(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QNetworkCookie _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkCookie _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QNetworkCookie _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkCookie _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + QNetworkCookie _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = QNetworkCookie::parseCookies(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkCookie_throw_ambiguity_error_helper(context, + qtscript_QNetworkCookie_function_names[_id], + qtscript_QNetworkCookie_function_signatures[_id]); +} + +QScriptValue qtscript_create_QNetworkCookie_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QNetworkCookie*)0)); + for (int i = 0; i < 21; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QNetworkCookie_prototype_call, qtscript_QNetworkCookie_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QNetworkCookie_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QNetworkCookie_static_call, proto, qtscript_QNetworkCookie_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QNetworkCookie_static_call, + qtscript_QNetworkCookie_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QNetworkCookie_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("RawForm"), + qtscript_create_QNetworkCookie_RawForm_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkCookieJar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkCookieJar.cpp new file mode 100644 index 00000000..7d4b625a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkCookieJar.cpp @@ -0,0 +1,214 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QNetworkCookieJar.h" + +static const char * const qtscript_QNetworkCookieJar_function_names[] = { + "QNetworkCookieJar" + // static + // prototype + , "cookiesForUrl" + , "deleteCookie" + , "insertCookie" + , "setCookiesFromUrl" + , "updateCookie" + , "toString" +}; + +static const char * const qtscript_QNetworkCookieJar_function_signatures[] = { + "QObject parent" + // static + // prototype + , "QUrl url" + , "QNetworkCookie cookie" + , "QNetworkCookie cookie" + , "List cookieList, QUrl url" + , "QNetworkCookie cookie" +"" +}; + +static const int qtscript_QNetworkCookieJar_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 1 + , 1 + , 2 + , 1 + , 0 +}; + +static QScriptValue qtscript_QNetworkCookieJar_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QNetworkCookieJar::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QNetworkCookieJar*) +Q_DECLARE_METATYPE(QtScriptShell_QNetworkCookieJar*) +Q_DECLARE_METATYPE(QList) + +// +// QNetworkCookieJar +// + +static QScriptValue qtscript_QNetworkCookieJar_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QNetworkCookieJar* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QNetworkCookieJar.%0(): this object is not a QNetworkCookieJar") + .arg(qtscript_QNetworkCookieJar_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->cookiesForUrl(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QNetworkCookie _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->deleteCookie(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QNetworkCookie _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->insertCookie(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 2) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QUrl _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->setCookiesFromUrl(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QNetworkCookie _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->updateCookie(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: { + QString result = QString::fromLatin1("QNetworkCookieJar"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkCookieJar_throw_ambiguity_error_helper(context, + qtscript_QNetworkCookieJar_function_names[_id+1], + qtscript_QNetworkCookieJar_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QNetworkCookieJar_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QNetworkCookieJar(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QNetworkCookieJar* _q_cpp_result = new QtScriptShell_QNetworkCookieJar(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QNetworkCookieJar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QNetworkCookieJar* _q_cpp_result = new QtScriptShell_QNetworkCookieJar(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QNetworkCookieJar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkCookieJar_throw_ambiguity_error_helper(context, + qtscript_QNetworkCookieJar_function_names[_id], + qtscript_QNetworkCookieJar_function_signatures[_id]); +} + +static QScriptValue qtscript_QNetworkCookieJar_toScriptValue(QScriptEngine *engine, QNetworkCookieJar* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QNetworkCookieJar_fromScriptValue(const QScriptValue &value, QNetworkCookieJar* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QNetworkCookieJar_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QNetworkCookieJar*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QNetworkCookieJar_prototype_call, qtscript_QNetworkCookieJar_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QNetworkCookieJar_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QNetworkCookieJar_toScriptValue, + qtscript_QNetworkCookieJar_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QNetworkCookieJar_static_call, proto, qtscript_QNetworkCookieJar_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkDiskCache.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkDiskCache.cpp new file mode 100644 index 00000000..b541814d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkDiskCache.cpp @@ -0,0 +1,212 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QNetworkDiskCache.h" + +static const char * const qtscript_QNetworkDiskCache_function_names[] = { + "QNetworkDiskCache" + // static + // prototype + , "cacheDirectory" + , "fileMetaData" + , "maximumCacheSize" + , "setCacheDirectory" + , "setMaximumCacheSize" + , "toString" +}; + +static const char * const qtscript_QNetworkDiskCache_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" + , "String fileName" + , "" + , "String cacheDir" + , "qint64 size" +"" +}; + +static const int qtscript_QNetworkDiskCache_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QNetworkDiskCache_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QNetworkDiskCache::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QNetworkDiskCache*) +Q_DECLARE_METATYPE(QtScriptShell_QNetworkDiskCache*) +Q_DECLARE_METATYPE(QNetworkCacheMetaData) +Q_DECLARE_METATYPE(QAbstractNetworkCache*) + +// +// QNetworkDiskCache +// + +static QScriptValue qtscript_QNetworkDiskCache_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QNetworkDiskCache* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QNetworkDiskCache.%0(): this object is not a QNetworkDiskCache") + .arg(qtscript_QNetworkDiskCache_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->cacheDirectory(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QNetworkCacheMetaData _q_result = _q_self->fileMetaData(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->maximumCacheSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setCacheDirectory(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMaximumCacheSize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: { + QString result = QString::fromLatin1("QNetworkDiskCache"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkDiskCache_throw_ambiguity_error_helper(context, + qtscript_QNetworkDiskCache_function_names[_id+1], + qtscript_QNetworkDiskCache_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QNetworkDiskCache_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QNetworkDiskCache(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QNetworkDiskCache* _q_cpp_result = new QtScriptShell_QNetworkDiskCache(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QNetworkDiskCache*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QNetworkDiskCache* _q_cpp_result = new QtScriptShell_QNetworkDiskCache(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QNetworkDiskCache*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkDiskCache_throw_ambiguity_error_helper(context, + qtscript_QNetworkDiskCache_function_names[_id], + qtscript_QNetworkDiskCache_function_signatures[_id]); +} + +static QScriptValue qtscript_QNetworkDiskCache_toScriptValue(QScriptEngine *engine, QNetworkDiskCache* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QNetworkDiskCache_fromScriptValue(const QScriptValue &value, QNetworkDiskCache* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QNetworkDiskCache_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QNetworkDiskCache*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QNetworkDiskCache_prototype_call, qtscript_QNetworkDiskCache_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QNetworkDiskCache_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QNetworkDiskCache_toScriptValue, + qtscript_QNetworkDiskCache_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QNetworkDiskCache_static_call, proto, qtscript_QNetworkDiskCache_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkInterface.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkInterface.cpp new file mode 100644 index 00000000..38c1707b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkInterface.cpp @@ -0,0 +1,464 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QNetworkInterface_function_names[] = { + "QNetworkInterface" + // static + , "allAddresses" + , "allInterfaces" + , "interfaceFromIndex" + , "interfaceFromName" + // prototype + , "addressEntries" + , "flags" + , "hardwareAddress" + , "humanReadableName" + , "index" + , "isValid" + , "name" + , "swap" + , "toString" +}; + +static const char * const qtscript_QNetworkInterface_function_signatures[] = { + "\nQNetworkInterface other" + // static + , "" + , "" + , "int index" + , "String name" + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QNetworkInterface other" +"" +}; + +static const int qtscript_QNetworkInterface_function_lengths[] = { + 1 + // static + , 0 + , 0 + , 1 + , 1 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QNetworkInterface_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QNetworkInterface::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QNetworkInterface*) +Q_DECLARE_METATYPE(QNetworkInterface::InterfaceFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QHostAddress) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QList) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QNetworkInterface::InterfaceFlag +// + +static const QNetworkInterface::InterfaceFlag qtscript_QNetworkInterface_InterfaceFlag_values[] = { + QNetworkInterface::IsUp + , QNetworkInterface::IsRunning + , QNetworkInterface::CanBroadcast + , QNetworkInterface::IsLoopBack + , QNetworkInterface::IsPointToPoint + , QNetworkInterface::CanMulticast +}; + +static const char * const qtscript_QNetworkInterface_InterfaceFlag_keys[] = { + "IsUp" + , "IsRunning" + , "CanBroadcast" + , "IsLoopBack" + , "IsPointToPoint" + , "CanMulticast" +}; + +static QString qtscript_QNetworkInterface_InterfaceFlag_toStringHelper(QNetworkInterface::InterfaceFlag value) +{ + for (int i = 0; i < 6; ++i) { + if (qtscript_QNetworkInterface_InterfaceFlag_values[i] == value) + return QString::fromLatin1(qtscript_QNetworkInterface_InterfaceFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QNetworkInterface_InterfaceFlag_toScriptValue(QScriptEngine *engine, const QNetworkInterface::InterfaceFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QNetworkInterface")); + return clazz.property(qtscript_QNetworkInterface_InterfaceFlag_toStringHelper(value)); +} + +static void qtscript_QNetworkInterface_InterfaceFlag_fromScriptValue(const QScriptValue &value, QNetworkInterface::InterfaceFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QNetworkInterface_InterfaceFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 6; ++i) { + if (qtscript_QNetworkInterface_InterfaceFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("InterfaceFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QNetworkInterface_InterfaceFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkInterface::InterfaceFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QNetworkInterface_InterfaceFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkInterface::InterfaceFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QNetworkInterface_InterfaceFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QNetworkInterface_InterfaceFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QNetworkInterface_InterfaceFlag, + qtscript_QNetworkInterface_InterfaceFlag_valueOf, qtscript_QNetworkInterface_InterfaceFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QNetworkInterface_InterfaceFlag_toScriptValue, + qtscript_QNetworkInterface_InterfaceFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QNetworkInterface_InterfaceFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QNetworkInterface_InterfaceFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QNetworkInterface::InterfaceFlags +// + +static QScriptValue qtscript_QNetworkInterface_InterfaceFlags_toScriptValue(QScriptEngine *engine, const QNetworkInterface::InterfaceFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QNetworkInterface_InterfaceFlags_fromScriptValue(const QScriptValue &value, QNetworkInterface::InterfaceFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QNetworkInterface_InterfaceFlags(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkInterface::InterfaceFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("InterfaceFlags(): argument %0 is not of type InterfaceFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QNetworkInterface_InterfaceFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkInterface::InterfaceFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QNetworkInterface_InterfaceFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkInterface::InterfaceFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 6; ++i) { + if ((value & qtscript_QNetworkInterface_InterfaceFlag_values[i]) == qtscript_QNetworkInterface_InterfaceFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QNetworkInterface_InterfaceFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QNetworkInterface_InterfaceFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QNetworkInterface_InterfaceFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QNetworkInterface_InterfaceFlags, qtscript_QNetworkInterface_InterfaceFlags_valueOf, + qtscript_QNetworkInterface_InterfaceFlags_toString, qtscript_QNetworkInterface_InterfaceFlags_equals); + qScriptRegisterMetaType(engine, qtscript_QNetworkInterface_InterfaceFlags_toScriptValue, + qtscript_QNetworkInterface_InterfaceFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QNetworkInterface +// + +static QScriptValue qtscript_QNetworkInterface_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QNetworkInterface* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QNetworkInterface.%0(): this object is not a QNetworkInterface") + .arg(qtscript_QNetworkInterface_function_names[_id+5])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->addressEntries(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->flags(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->hardwareAddress(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->humanReadableName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->index(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->name(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QNetworkInterface _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkInterface_throw_ambiguity_error_helper(context, + qtscript_QNetworkInterface_function_names[_id+5], + qtscript_QNetworkInterface_function_signatures[_id+5]); +} + +static QScriptValue qtscript_QNetworkInterface_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QNetworkInterface(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QNetworkInterface _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QNetworkInterface _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkInterface _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QList _q_result = QNetworkInterface::allAddresses(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QList _q_result = QNetworkInterface::allInterfaces(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QNetworkInterface _q_result = QNetworkInterface::interfaceFromIndex(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QNetworkInterface _q_result = QNetworkInterface::interfaceFromName(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkInterface_throw_ambiguity_error_helper(context, + qtscript_QNetworkInterface_function_names[_id], + qtscript_QNetworkInterface_function_signatures[_id]); +} + +QScriptValue qtscript_create_QNetworkInterface_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QNetworkInterface*)0)); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QNetworkInterface_prototype_call, qtscript_QNetworkInterface_function_lengths[i+5]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QNetworkInterface_function_names[i+5]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QNetworkInterface_static_call, proto, qtscript_QNetworkInterface_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QNetworkInterface_static_call, + qtscript_QNetworkInterface_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QNetworkInterface_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("InterfaceFlag"), + qtscript_create_QNetworkInterface_InterfaceFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("InterfaceFlags"), + qtscript_create_QNetworkInterface_InterfaceFlags_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkProxy.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkProxy.cpp new file mode 100644 index 00000000..361d9d51 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkProxy.cpp @@ -0,0 +1,707 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QNetworkProxy_function_names[] = { + "QNetworkProxy" + // static + , "applicationProxy" + , "setApplicationProxy" + // prototype + , "capabilities" + , "hasRawHeader" + , "header" + , "hostName" + , "isCachingProxy" + , "isTransparentProxy" + , "equals" + , "password" + , "port" + , "rawHeader" + , "rawHeaderList" + , "setCapabilities" + , "setHeader" + , "setHostName" + , "setPassword" + , "setPort" + , "setRawHeader" + , "setType" + , "setUser" + , "swap" + , "type" + , "user" + , "toString" +}; + +static const char * const qtscript_QNetworkProxy_function_signatures[] = { + "\nProxyType type, String hostName, unsigned short port, String user, String password\nQNetworkProxy other" + // static + , "" + , "QNetworkProxy proxy" + // prototype + , "" + , "QByteArray headerName" + , "KnownHeaders header" + , "" + , "" + , "" + , "QNetworkProxy other" + , "" + , "" + , "QByteArray headerName" + , "" + , "Capabilities capab" + , "KnownHeaders header, Object value" + , "String hostName" + , "String password" + , "unsigned short port" + , "QByteArray headerName, QByteArray value" + , "ProxyType type" + , "String userName" + , "QNetworkProxy other" + , "" + , "" +"" +}; + +static const int qtscript_QNetworkProxy_function_lengths[] = { + 5 + // static + , 0 + , 1 + // prototype + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 0 + , 1 + , 2 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QNetworkProxy_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QNetworkProxy::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QNetworkProxy*) +Q_DECLARE_METATYPE(QNetworkProxy::ProxyType) +Q_DECLARE_METATYPE(QNetworkProxy::Capability) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QNetworkRequest::KnownHeaders) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QNetworkProxy::ProxyType +// + +static const QNetworkProxy::ProxyType qtscript_QNetworkProxy_ProxyType_values[] = { + QNetworkProxy::DefaultProxy + , QNetworkProxy::Socks5Proxy + , QNetworkProxy::NoProxy + , QNetworkProxy::HttpProxy + , QNetworkProxy::HttpCachingProxy + , QNetworkProxy::FtpCachingProxy +}; + +static const char * const qtscript_QNetworkProxy_ProxyType_keys[] = { + "DefaultProxy" + , "Socks5Proxy" + , "NoProxy" + , "HttpProxy" + , "HttpCachingProxy" + , "FtpCachingProxy" +}; + +static QString qtscript_QNetworkProxy_ProxyType_toStringHelper(QNetworkProxy::ProxyType value) +{ + if ((value >= QNetworkProxy::DefaultProxy) && (value <= QNetworkProxy::FtpCachingProxy)) + return qtscript_QNetworkProxy_ProxyType_keys[static_cast(value)-static_cast(QNetworkProxy::DefaultProxy)]; + return QString(); +} + +static QScriptValue qtscript_QNetworkProxy_ProxyType_toScriptValue(QScriptEngine *engine, const QNetworkProxy::ProxyType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QNetworkProxy")); + return clazz.property(qtscript_QNetworkProxy_ProxyType_toStringHelper(value)); +} + +static void qtscript_QNetworkProxy_ProxyType_fromScriptValue(const QScriptValue &value, QNetworkProxy::ProxyType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QNetworkProxy_ProxyType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QNetworkProxy::DefaultProxy) && (arg <= QNetworkProxy::FtpCachingProxy)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ProxyType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QNetworkProxy_ProxyType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkProxy::ProxyType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QNetworkProxy_ProxyType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkProxy::ProxyType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QNetworkProxy_ProxyType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QNetworkProxy_ProxyType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QNetworkProxy_ProxyType, + qtscript_QNetworkProxy_ProxyType_valueOf, qtscript_QNetworkProxy_ProxyType_toString); + qScriptRegisterMetaType(engine, qtscript_QNetworkProxy_ProxyType_toScriptValue, + qtscript_QNetworkProxy_ProxyType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QNetworkProxy_ProxyType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QNetworkProxy_ProxyType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QNetworkProxy::Capability +// + +static const QNetworkProxy::Capability qtscript_QNetworkProxy_Capability_values[] = { + QNetworkProxy::TunnelingCapability + , QNetworkProxy::ListeningCapability + , QNetworkProxy::UdpTunnelingCapability + , QNetworkProxy::CachingCapability + , QNetworkProxy::HostNameLookupCapability +}; + +static const char * const qtscript_QNetworkProxy_Capability_keys[] = { + "TunnelingCapability" + , "ListeningCapability" + , "UdpTunnelingCapability" + , "CachingCapability" + , "HostNameLookupCapability" +}; + +static QString qtscript_QNetworkProxy_Capability_toStringHelper(QNetworkProxy::Capability value) +{ + for (int i = 0; i < 5; ++i) { + if (qtscript_QNetworkProxy_Capability_values[i] == value) + return QString::fromLatin1(qtscript_QNetworkProxy_Capability_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QNetworkProxy_Capability_toScriptValue(QScriptEngine *engine, const QNetworkProxy::Capability &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QNetworkProxy")); + return clazz.property(qtscript_QNetworkProxy_Capability_toStringHelper(value)); +} + +static void qtscript_QNetworkProxy_Capability_fromScriptValue(const QScriptValue &value, QNetworkProxy::Capability &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QNetworkProxy_Capability(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 5; ++i) { + if (qtscript_QNetworkProxy_Capability_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Capability(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QNetworkProxy_Capability_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkProxy::Capability value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QNetworkProxy_Capability_toString(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkProxy::Capability value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QNetworkProxy_Capability_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QNetworkProxy_Capability_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QNetworkProxy_Capability, + qtscript_QNetworkProxy_Capability_valueOf, qtscript_QNetworkProxy_Capability_toString); + qScriptRegisterMetaType(engine, qtscript_QNetworkProxy_Capability_toScriptValue, + qtscript_QNetworkProxy_Capability_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QNetworkProxy_Capability_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QNetworkProxy_Capability_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QNetworkProxy::Capabilities +// + +static QScriptValue qtscript_QNetworkProxy_Capabilities_toScriptValue(QScriptEngine *engine, const QNetworkProxy::Capabilities &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QNetworkProxy_Capabilities_fromScriptValue(const QScriptValue &value, QNetworkProxy::Capabilities &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QNetworkProxy_Capabilities(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkProxy::Capabilities result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("Capabilities(): argument %0 is not of type Capability").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QNetworkProxy_Capabilities_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkProxy::Capabilities value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QNetworkProxy_Capabilities_toString(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkProxy::Capabilities value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 5; ++i) { + if ((value & qtscript_QNetworkProxy_Capability_values[i]) == qtscript_QNetworkProxy_Capability_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QNetworkProxy_Capability_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QNetworkProxy_Capabilities_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QNetworkProxy_Capabilities_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QNetworkProxy_Capabilities, qtscript_QNetworkProxy_Capabilities_valueOf, + qtscript_QNetworkProxy_Capabilities_toString, qtscript_QNetworkProxy_Capabilities_equals); + qScriptRegisterMetaType(engine, qtscript_QNetworkProxy_Capabilities_toScriptValue, + qtscript_QNetworkProxy_Capabilities_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QNetworkProxy +// + +static QScriptValue qtscript_QNetworkProxy_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 22; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QNetworkProxy* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QNetworkProxy.%0(): this object is not a QNetworkProxy") + .arg(qtscript_QNetworkProxy_function_names[_id+3])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->capabilities(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->hasRawHeader(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QNetworkRequest::KnownHeaders _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_result = _q_self->header(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->hostName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isCachingProxy(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isTransparentProxy(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QNetworkProxy _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->password(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + unsigned short _q_result = _q_self->port(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_result = _q_self->rawHeader(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->rawHeaderList(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setCapabilities(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 2) { + QNetworkRequest::KnownHeaders _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setHeader(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setHostName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPassword(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + unsigned short _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPort(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 2) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setRawHeader(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QNetworkProxy::ProxyType _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setType(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setUser(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QNetworkProxy _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QNetworkProxy::ProxyType _q_result = _q_self->type(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->user(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkProxy_throw_ambiguity_error_helper(context, + qtscript_QNetworkProxy_function_names[_id+3], + qtscript_QNetworkProxy_function_signatures[_id+3]); +} + +static QScriptValue qtscript_QNetworkProxy_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QNetworkProxy(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QNetworkProxy _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QNetworkProxy::ProxyType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkProxy _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QNetworkProxy _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkProxy _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QNetworkProxy::ProxyType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QNetworkProxy _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + QNetworkProxy::ProxyType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + unsigned short _q_arg2 = qscriptvalue_cast(context->argument(2)); + QNetworkProxy _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + QNetworkProxy::ProxyType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + unsigned short _q_arg2 = qscriptvalue_cast(context->argument(2)); + QString _q_arg3 = context->argument(3).toString(); + QNetworkProxy _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 5) { + QNetworkProxy::ProxyType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + unsigned short _q_arg2 = qscriptvalue_cast(context->argument(2)); + QString _q_arg3 = context->argument(3).toString(); + QString _q_arg4 = context->argument(4).toString(); + QNetworkProxy _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QNetworkProxy _q_result = QNetworkProxy::applicationProxy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QNetworkProxy _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkProxy::setApplicationProxy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkProxy_throw_ambiguity_error_helper(context, + qtscript_QNetworkProxy_function_names[_id], + qtscript_QNetworkProxy_function_signatures[_id]); +} + +QScriptValue qtscript_create_QNetworkProxy_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QNetworkProxy*)0)); + for (int i = 0; i < 23; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QNetworkProxy_prototype_call, qtscript_QNetworkProxy_function_lengths[i+3]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QNetworkProxy_function_names[i+3]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QNetworkProxy_static_call, proto, qtscript_QNetworkProxy_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QNetworkProxy_static_call, + qtscript_QNetworkProxy_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QNetworkProxy_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("ProxyType"), + qtscript_create_QNetworkProxy_ProxyType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Capability"), + qtscript_create_QNetworkProxy_Capability_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Capabilities"), + qtscript_create_QNetworkProxy_Capabilities_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkProxyFactory.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkProxyFactory.cpp new file mode 100644 index 00000000..98b77d42 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkProxyFactory.cpp @@ -0,0 +1,205 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QNetworkProxyFactory.h" + +static const char * const qtscript_QNetworkProxyFactory_function_names[] = { + "QNetworkProxyFactory" + // static + , "proxyForQuery" + , "setApplicationProxyFactory" + , "setUseSystemConfiguration" + , "systemProxyForQuery" + // prototype + , "queryProxy" + , "toString" +}; + +static const char * const qtscript_QNetworkProxyFactory_function_signatures[] = { + "" + // static + , "QNetworkProxyQuery query" + , "QNetworkProxyFactory factory" + , "bool enable" + , "QNetworkProxyQuery query" + // prototype + , "QNetworkProxyQuery query" +"" +}; + +static const int qtscript_QNetworkProxyFactory_function_lengths[] = { + 0 + // static + , 1 + , 1 + , 1 + , 1 + // prototype + , 1 + , 0 +}; + +static QScriptValue qtscript_QNetworkProxyFactory_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QNetworkProxyFactory::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QNetworkProxyFactory*) +Q_DECLARE_METATYPE(QtScriptShell_QNetworkProxyFactory*) +Q_DECLARE_METATYPE(QNetworkProxyQuery) +Q_DECLARE_METATYPE(QList) + +// +// QNetworkProxyFactory +// + +static QScriptValue qtscript_QNetworkProxyFactory_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QNetworkProxyFactory* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QNetworkProxyFactory.%0(): this object is not a QNetworkProxyFactory") + .arg(qtscript_QNetworkProxyFactory_function_names[_id+5])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->queryProxy(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QNetworkProxyQuery _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->queryProxy(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("QNetworkProxyFactory"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkProxyFactory_throw_ambiguity_error_helper(context, + qtscript_QNetworkProxyFactory_function_names[_id+5], + qtscript_QNetworkProxyFactory_function_signatures[_id+5]); +} + +static QScriptValue qtscript_QNetworkProxyFactory_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QNetworkProxyFactory(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QNetworkProxyFactory* _q_cpp_result = new QtScriptShell_QNetworkProxyFactory(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QNetworkProxyFactory*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QNetworkProxyQuery _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = QNetworkProxyFactory::proxyForQuery(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QNetworkProxyFactory* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkProxyFactory::setApplicationProxyFactory(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + QNetworkProxyFactory::setUseSystemConfiguration(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QList _q_result = QNetworkProxyFactory::systemProxyForQuery(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QNetworkProxyQuery _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = QNetworkProxyFactory::systemProxyForQuery(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkProxyFactory_throw_ambiguity_error_helper(context, + qtscript_QNetworkProxyFactory_function_names[_id], + qtscript_QNetworkProxyFactory_function_signatures[_id]); +} + +QScriptValue qtscript_create_QNetworkProxyFactory_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QNetworkProxyFactory*)0)); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QNetworkProxyFactory_prototype_call, qtscript_QNetworkProxyFactory_function_lengths[i+5]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QNetworkProxyFactory_function_names[i+5]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QNetworkProxyFactory_static_call, proto, qtscript_QNetworkProxyFactory_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QNetworkProxyFactory_static_call, + qtscript_QNetworkProxyFactory_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QNetworkProxyFactory_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkProxyQuery.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkProxyQuery.cpp new file mode 100644 index 00000000..ac05001d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkProxyQuery.cpp @@ -0,0 +1,439 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QNetworkProxyQuery_function_names[] = { + "QNetworkProxyQuery" + // static + // prototype + , "localPort" + , "equals" + , "peerHostName" + , "peerPort" + , "protocolTag" + , "queryType" + , "setLocalPort" + , "setPeerHostName" + , "setPeerPort" + , "setProtocolTag" + , "setQueryType" + , "setUrl" + , "swap" + , "url" + , "toString" +}; + +static const char * const qtscript_QNetworkProxyQuery_function_signatures[] = { + "\nQNetworkProxyQuery other\nString hostname, int port, String protocolTag, QueryType queryType\nQUrl requestUrl, QueryType queryType\nunsigned short bindPort, String protocolTag, QueryType queryType" + // static + // prototype + , "" + , "QNetworkProxyQuery other" + , "" + , "" + , "" + , "" + , "int port" + , "String hostname" + , "int port" + , "String protocolTag" + , "QueryType type" + , "QUrl url" + , "QNetworkProxyQuery other" + , "" +"" +}; + +static const int qtscript_QNetworkProxyQuery_function_lengths[] = { + 4 + // static + // prototype + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QNetworkProxyQuery_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QNetworkProxyQuery::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QNetworkProxyQuery) +Q_DECLARE_METATYPE(QNetworkProxyQuery*) +Q_DECLARE_METATYPE(QNetworkProxyQuery::QueryType) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QNetworkProxyQuery::QueryType +// + +static const QNetworkProxyQuery::QueryType qtscript_QNetworkProxyQuery_QueryType_values[] = { + QNetworkProxyQuery::TcpSocket + , QNetworkProxyQuery::UdpSocket + , QNetworkProxyQuery::TcpServer + , QNetworkProxyQuery::UrlRequest +}; + +static const char * const qtscript_QNetworkProxyQuery_QueryType_keys[] = { + "TcpSocket" + , "UdpSocket" + , "TcpServer" + , "UrlRequest" +}; + +static QString qtscript_QNetworkProxyQuery_QueryType_toStringHelper(QNetworkProxyQuery::QueryType value) +{ + for (int i = 0; i < 4; ++i) { + if (qtscript_QNetworkProxyQuery_QueryType_values[i] == value) + return QString::fromLatin1(qtscript_QNetworkProxyQuery_QueryType_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QNetworkProxyQuery_QueryType_toScriptValue(QScriptEngine *engine, const QNetworkProxyQuery::QueryType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QNetworkProxyQuery")); + return clazz.property(qtscript_QNetworkProxyQuery_QueryType_toStringHelper(value)); +} + +static void qtscript_QNetworkProxyQuery_QueryType_fromScriptValue(const QScriptValue &value, QNetworkProxyQuery::QueryType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QNetworkProxyQuery_QueryType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 4; ++i) { + if (qtscript_QNetworkProxyQuery_QueryType_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("QueryType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QNetworkProxyQuery_QueryType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkProxyQuery::QueryType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QNetworkProxyQuery_QueryType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkProxyQuery::QueryType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QNetworkProxyQuery_QueryType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QNetworkProxyQuery_QueryType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QNetworkProxyQuery_QueryType, + qtscript_QNetworkProxyQuery_QueryType_valueOf, qtscript_QNetworkProxyQuery_QueryType_toString); + qScriptRegisterMetaType(engine, qtscript_QNetworkProxyQuery_QueryType_toScriptValue, + qtscript_QNetworkProxyQuery_QueryType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QNetworkProxyQuery_QueryType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QNetworkProxyQuery_QueryType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QNetworkProxyQuery +// + +static QScriptValue qtscript_QNetworkProxyQuery_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 14; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QNetworkProxyQuery* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QNetworkProxyQuery.%0(): this object is not a QNetworkProxyQuery") + .arg(qtscript_QNetworkProxyQuery_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->localPort(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QNetworkProxyQuery _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->peerHostName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->peerPort(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->protocolTag(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QNetworkProxyQuery::QueryType _q_result = _q_self->queryType(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setLocalPort(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPeerHostName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setPeerPort(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setProtocolTag(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QNetworkProxyQuery::QueryType _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setQueryType(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setUrl(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QNetworkProxyQuery _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QUrl _q_result = _q_self->url(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: { + QString result = QString::fromLatin1("QNetworkProxyQuery"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkProxyQuery_throw_ambiguity_error_helper(context, + qtscript_QNetworkProxyQuery_function_names[_id+1], + qtscript_QNetworkProxyQuery_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QNetworkProxyQuery_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QNetworkProxyQuery(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QNetworkProxyQuery _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QNetworkProxyQuery _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkProxyQuery _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkProxyQuery _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isNumber()) { + unsigned short _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkProxyQuery _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && context->argument(1).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + QNetworkProxyQuery _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkProxyQuery::QueryType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QNetworkProxyQuery _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isNumber() + && context->argument(1).isString()) { + unsigned short _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QNetworkProxyQuery _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 3) { + if (context->argument(0).isString() + && context->argument(1).isNumber() + && context->argument(2).isString()) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + QString _q_arg2 = context->argument(2).toString(); + QNetworkProxyQuery _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isNumber() + && context->argument(1).isString() + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + unsigned short _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QNetworkProxyQuery::QueryType _q_arg2 = qscriptvalue_cast(context->argument(2)); + QNetworkProxyQuery _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 4) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + QString _q_arg2 = context->argument(2).toString(); + QNetworkProxyQuery::QueryType _q_arg3 = qscriptvalue_cast(context->argument(3)); + QNetworkProxyQuery _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkProxyQuery_throw_ambiguity_error_helper(context, + qtscript_QNetworkProxyQuery_function_names[_id], + qtscript_QNetworkProxyQuery_function_signatures[_id]); +} + +QScriptValue qtscript_create_QNetworkProxyQuery_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QNetworkProxyQuery*)0)); + for (int i = 0; i < 15; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QNetworkProxyQuery_prototype_call, qtscript_QNetworkProxyQuery_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QNetworkProxyQuery_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QNetworkProxyQuery_static_call, proto, qtscript_QNetworkProxyQuery_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("QueryType"), + qtscript_create_QNetworkProxyQuery_QueryType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkReply.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkReply.cpp new file mode 100644 index 00000000..483dbf9e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkReply.cpp @@ -0,0 +1,445 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QNetworkReply.h" + +static const char * const qtscript_QNetworkReply_function_names[] = { + "QNetworkReply" + // static + // prototype + , "attribute" + , "error" + , "hasRawHeader" + , "header" + , "isFinished" + , "isRunning" + , "manager" + , "operation" + , "rawHeader" + , "rawHeaderList" + , "readBufferSize" + , "request" + , "setReadBufferSize" + , "url" + , "toString" +}; + +static const char * const qtscript_QNetworkReply_function_signatures[] = { + "" + // static + // prototype + , "Attribute code" + , "" + , "QByteArray headerName" + , "KnownHeaders header" + , "" + , "" + , "" + , "" + , "QByteArray headerName" + , "" + , "" + , "" + , "qint64 size" + , "" +"" +}; + +static const int qtscript_QNetworkReply_function_lengths[] = { + 0 + // static + // prototype + , 1 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QNetworkReply_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QNetworkReply::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QNetworkReply*) +Q_DECLARE_METATYPE(QtScriptShell_QNetworkReply*) +Q_DECLARE_METATYPE(QNetworkRequest::Attribute) +Q_DECLARE_METATYPE(QNetworkRequest::KnownHeaders) +Q_DECLARE_METATYPE(QNetworkAccessManager*) +Q_DECLARE_METATYPE(QNetworkAccessManager::Operation) +Q_DECLARE_METATYPE(QIODevice*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QNetworkReply::NetworkError +// + +static const QNetworkReply::NetworkError qtscript_QNetworkReply_NetworkError_values[] = { + QNetworkReply::NoError + , QNetworkReply::ConnectionRefusedError + , QNetworkReply::RemoteHostClosedError + , QNetworkReply::HostNotFoundError + , QNetworkReply::TimeoutError + , QNetworkReply::OperationCanceledError + , QNetworkReply::SslHandshakeFailedError + , QNetworkReply::TemporaryNetworkFailureError + , QNetworkReply::NetworkSessionFailedError + , QNetworkReply::BackgroundRequestNotAllowedError + , QNetworkReply::TooManyRedirectsError + , QNetworkReply::InsecureRedirectError + , QNetworkReply::UnknownNetworkError + , QNetworkReply::ProxyConnectionRefusedError + , QNetworkReply::ProxyConnectionClosedError + , QNetworkReply::ProxyNotFoundError + , QNetworkReply::ProxyTimeoutError + , QNetworkReply::ProxyAuthenticationRequiredError + , QNetworkReply::UnknownProxyError + , QNetworkReply::ContentAccessDenied + , QNetworkReply::ContentOperationNotPermittedError + , QNetworkReply::ContentNotFoundError + , QNetworkReply::AuthenticationRequiredError + , QNetworkReply::ContentReSendError + , QNetworkReply::ContentConflictError + , QNetworkReply::ContentGoneError + , QNetworkReply::UnknownContentError + , QNetworkReply::ProtocolUnknownError + , QNetworkReply::ProtocolInvalidOperationError + , QNetworkReply::ProtocolFailure + , QNetworkReply::InternalServerError + , QNetworkReply::OperationNotImplementedError + , QNetworkReply::ServiceUnavailableError + , QNetworkReply::UnknownServerError +}; + +static const char * const qtscript_QNetworkReply_NetworkError_keys[] = { + "NoError" + , "ConnectionRefusedError" + , "RemoteHostClosedError" + , "HostNotFoundError" + , "TimeoutError" + , "OperationCanceledError" + , "SslHandshakeFailedError" + , "TemporaryNetworkFailureError" + , "NetworkSessionFailedError" + , "BackgroundRequestNotAllowedError" + , "TooManyRedirectsError" + , "InsecureRedirectError" + , "UnknownNetworkError" + , "ProxyConnectionRefusedError" + , "ProxyConnectionClosedError" + , "ProxyNotFoundError" + , "ProxyTimeoutError" + , "ProxyAuthenticationRequiredError" + , "UnknownProxyError" + , "ContentAccessDenied" + , "ContentOperationNotPermittedError" + , "ContentNotFoundError" + , "AuthenticationRequiredError" + , "ContentReSendError" + , "ContentConflictError" + , "ContentGoneError" + , "UnknownContentError" + , "ProtocolUnknownError" + , "ProtocolInvalidOperationError" + , "ProtocolFailure" + , "InternalServerError" + , "OperationNotImplementedError" + , "ServiceUnavailableError" + , "UnknownServerError" +}; + +static QString qtscript_QNetworkReply_NetworkError_toStringHelper(QNetworkReply::NetworkError value) +{ + for (int i = 0; i < 34; ++i) { + if (qtscript_QNetworkReply_NetworkError_values[i] == value) + return QString::fromLatin1(qtscript_QNetworkReply_NetworkError_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QNetworkReply_NetworkError_toScriptValue(QScriptEngine *engine, const QNetworkReply::NetworkError &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QNetworkReply")); + return clazz.property(qtscript_QNetworkReply_NetworkError_toStringHelper(value)); +} + +static void qtscript_QNetworkReply_NetworkError_fromScriptValue(const QScriptValue &value, QNetworkReply::NetworkError &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QNetworkReply_NetworkError(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 34; ++i) { + if (qtscript_QNetworkReply_NetworkError_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("NetworkError(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QNetworkReply_NetworkError_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkReply::NetworkError value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QNetworkReply_NetworkError_toString(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkReply::NetworkError value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QNetworkReply_NetworkError_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QNetworkReply_NetworkError_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QNetworkReply_NetworkError, + qtscript_QNetworkReply_NetworkError_valueOf, qtscript_QNetworkReply_NetworkError_toString); + qScriptRegisterMetaType(engine, qtscript_QNetworkReply_NetworkError_toScriptValue, + qtscript_QNetworkReply_NetworkError_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 34; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QNetworkReply_NetworkError_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QNetworkReply_NetworkError_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QNetworkReply +// + +static QScriptValue qtscript_QNetworkReply_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 14; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QNetworkReply* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QNetworkReply.%0(): this object is not a QNetworkReply") + .arg(qtscript_QNetworkReply_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QNetworkRequest::Attribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_result = _q_self->attribute(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QNetworkReply::NetworkError _q_result = _q_self->error(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->hasRawHeader(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QNetworkRequest::KnownHeaders _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_result = _q_self->header(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isFinished(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isRunning(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QNetworkAccessManager* _q_result = _q_self->manager(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QNetworkAccessManager::Operation _q_result = _q_self->operation(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_result = _q_self->rawHeader(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->rawHeaderList(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->readBufferSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QNetworkRequest _q_result = _q_self->request(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + qint64 _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setReadBufferSize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QUrl _q_result = _q_self->url(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: { + QString result = QString::fromLatin1("QNetworkReply"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkReply_throw_ambiguity_error_helper(context, + qtscript_QNetworkReply_function_names[_id+1], + qtscript_QNetworkReply_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QNetworkReply_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QNetworkReply cannot be constructed")); + break; + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkReply_throw_ambiguity_error_helper(context, + qtscript_QNetworkReply_function_names[_id], + qtscript_QNetworkReply_function_signatures[_id]); +} + +static QScriptValue qtscript_QNetworkReply_toScriptValue(QScriptEngine *engine, QNetworkReply* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QNetworkReply_fromScriptValue(const QScriptValue &value, QNetworkReply* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QNetworkReply_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QNetworkReply*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 15; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QNetworkReply_prototype_call, qtscript_QNetworkReply_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QNetworkReply_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QNetworkReply_toScriptValue, + qtscript_QNetworkReply_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QNetworkReply_static_call, proto, qtscript_QNetworkReply_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("NetworkError"), + qtscript_create_QNetworkReply_NetworkError_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkRequest.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkRequest.cpp new file mode 100644 index 00000000..6a07a675 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QNetworkRequest.cpp @@ -0,0 +1,783 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QNetworkRequest_function_names[] = { + "QNetworkRequest" + // static + // prototype + , "attribute" + , "hasRawHeader" + , "header" + , "maximumRedirectsAllowed" + , "equals" + , "originatingObject" + , "priority" + , "rawHeader" + , "rawHeaderList" + , "setAttribute" + , "setHeader" + , "setMaximumRedirectsAllowed" + , "setOriginatingObject" + , "setPriority" + , "setRawHeader" + , "setUrl" + , "swap" + , "url" + , "toString" +}; + +static const char * const qtscript_QNetworkRequest_function_signatures[] = { + "QNetworkRequest other\nQUrl url" + // static + // prototype + , "Attribute code, Object defaultValue" + , "QByteArray headerName" + , "KnownHeaders header" + , "" + , "QNetworkRequest other" + , "" + , "" + , "QByteArray headerName" + , "" + , "Attribute code, Object value" + , "KnownHeaders header, Object value" + , "int maximumRedirectsAllowed" + , "QObject object" + , "Priority priority" + , "QByteArray headerName, QByteArray value" + , "QUrl url" + , "QNetworkRequest other" + , "" +"" +}; + +static const int qtscript_QNetworkRequest_function_lengths[] = { + 1 + // static + // prototype + , 2 + , 1 + , 1 + , 0 + , 1 + , 0 + , 0 + , 1 + , 0 + , 2 + , 2 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QNetworkRequest_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QNetworkRequest::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QNetworkRequest*) +Q_DECLARE_METATYPE(QNetworkRequest::LoadControl) +Q_DECLARE_METATYPE(QNetworkRequest::CacheLoadControl) +Q_DECLARE_METATYPE(QNetworkRequest::Attribute) +Q_DECLARE_METATYPE(QNetworkRequest::KnownHeaders) +Q_DECLARE_METATYPE(QNetworkRequest::Priority) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QNetworkRequest::LoadControl +// + +static const QNetworkRequest::LoadControl qtscript_QNetworkRequest_LoadControl_values[] = { + QNetworkRequest::Automatic + , QNetworkRequest::Manual +}; + +static const char * const qtscript_QNetworkRequest_LoadControl_keys[] = { + "Automatic" + , "Manual" +}; + +static QString qtscript_QNetworkRequest_LoadControl_toStringHelper(QNetworkRequest::LoadControl value) +{ + if ((value >= QNetworkRequest::Automatic) && (value <= QNetworkRequest::Manual)) + return qtscript_QNetworkRequest_LoadControl_keys[static_cast(value)-static_cast(QNetworkRequest::Automatic)]; + return QString(); +} + +static QScriptValue qtscript_QNetworkRequest_LoadControl_toScriptValue(QScriptEngine *engine, const QNetworkRequest::LoadControl &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QNetworkRequest")); + return clazz.property(qtscript_QNetworkRequest_LoadControl_toStringHelper(value)); +} + +static void qtscript_QNetworkRequest_LoadControl_fromScriptValue(const QScriptValue &value, QNetworkRequest::LoadControl &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QNetworkRequest_LoadControl(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QNetworkRequest::Automatic) && (arg <= QNetworkRequest::Manual)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("LoadControl(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QNetworkRequest_LoadControl_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkRequest::LoadControl value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QNetworkRequest_LoadControl_toString(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkRequest::LoadControl value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QNetworkRequest_LoadControl_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QNetworkRequest_LoadControl_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QNetworkRequest_LoadControl, + qtscript_QNetworkRequest_LoadControl_valueOf, qtscript_QNetworkRequest_LoadControl_toString); + qScriptRegisterMetaType(engine, qtscript_QNetworkRequest_LoadControl_toScriptValue, + qtscript_QNetworkRequest_LoadControl_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QNetworkRequest_LoadControl_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QNetworkRequest_LoadControl_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QNetworkRequest::CacheLoadControl +// + +static const QNetworkRequest::CacheLoadControl qtscript_QNetworkRequest_CacheLoadControl_values[] = { + QNetworkRequest::AlwaysNetwork + , QNetworkRequest::PreferNetwork + , QNetworkRequest::PreferCache + , QNetworkRequest::AlwaysCache +}; + +static const char * const qtscript_QNetworkRequest_CacheLoadControl_keys[] = { + "AlwaysNetwork" + , "PreferNetwork" + , "PreferCache" + , "AlwaysCache" +}; + +static QString qtscript_QNetworkRequest_CacheLoadControl_toStringHelper(QNetworkRequest::CacheLoadControl value) +{ + if ((value >= QNetworkRequest::AlwaysNetwork) && (value <= QNetworkRequest::AlwaysCache)) + return qtscript_QNetworkRequest_CacheLoadControl_keys[static_cast(value)-static_cast(QNetworkRequest::AlwaysNetwork)]; + return QString(); +} + +static QScriptValue qtscript_QNetworkRequest_CacheLoadControl_toScriptValue(QScriptEngine *engine, const QNetworkRequest::CacheLoadControl &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QNetworkRequest")); + return clazz.property(qtscript_QNetworkRequest_CacheLoadControl_toStringHelper(value)); +} + +static void qtscript_QNetworkRequest_CacheLoadControl_fromScriptValue(const QScriptValue &value, QNetworkRequest::CacheLoadControl &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QNetworkRequest_CacheLoadControl(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QNetworkRequest::AlwaysNetwork) && (arg <= QNetworkRequest::AlwaysCache)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("CacheLoadControl(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QNetworkRequest_CacheLoadControl_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkRequest::CacheLoadControl value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QNetworkRequest_CacheLoadControl_toString(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkRequest::CacheLoadControl value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QNetworkRequest_CacheLoadControl_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QNetworkRequest_CacheLoadControl_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QNetworkRequest_CacheLoadControl, + qtscript_QNetworkRequest_CacheLoadControl_valueOf, qtscript_QNetworkRequest_CacheLoadControl_toString); + qScriptRegisterMetaType(engine, qtscript_QNetworkRequest_CacheLoadControl_toScriptValue, + qtscript_QNetworkRequest_CacheLoadControl_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QNetworkRequest_CacheLoadControl_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QNetworkRequest_CacheLoadControl_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QNetworkRequest::Attribute +// + +static const QNetworkRequest::Attribute qtscript_QNetworkRequest_Attribute_values[] = { + QNetworkRequest::HttpStatusCodeAttribute + , QNetworkRequest::HttpReasonPhraseAttribute + , QNetworkRequest::RedirectionTargetAttribute + , QNetworkRequest::ConnectionEncryptedAttribute + , QNetworkRequest::CacheLoadControlAttribute + , QNetworkRequest::CacheSaveControlAttribute + , QNetworkRequest::SourceIsFromCacheAttribute + , QNetworkRequest::DoNotBufferUploadDataAttribute + , QNetworkRequest::HttpPipeliningAllowedAttribute + , QNetworkRequest::HttpPipeliningWasUsedAttribute + , QNetworkRequest::CustomVerbAttribute + , QNetworkRequest::CookieLoadControlAttribute + , QNetworkRequest::AuthenticationReuseAttribute + , QNetworkRequest::CookieSaveControlAttribute + , QNetworkRequest::MaximumDownloadBufferSizeAttribute + , QNetworkRequest::DownloadBufferAttribute + , QNetworkRequest::SynchronousRequestAttribute + , QNetworkRequest::BackgroundRequestAttribute + , QNetworkRequest::SpdyAllowedAttribute + , QNetworkRequest::SpdyWasUsedAttribute + , QNetworkRequest::EmitAllUploadProgressSignalsAttribute + , QNetworkRequest::FollowRedirectsAttribute + , QNetworkRequest::User + , QNetworkRequest::UserMax +}; + +static const char * const qtscript_QNetworkRequest_Attribute_keys[] = { + "HttpStatusCodeAttribute" + , "HttpReasonPhraseAttribute" + , "RedirectionTargetAttribute" + , "ConnectionEncryptedAttribute" + , "CacheLoadControlAttribute" + , "CacheSaveControlAttribute" + , "SourceIsFromCacheAttribute" + , "DoNotBufferUploadDataAttribute" + , "HttpPipeliningAllowedAttribute" + , "HttpPipeliningWasUsedAttribute" + , "CustomVerbAttribute" + , "CookieLoadControlAttribute" + , "AuthenticationReuseAttribute" + , "CookieSaveControlAttribute" + , "MaximumDownloadBufferSizeAttribute" + , "DownloadBufferAttribute" + , "SynchronousRequestAttribute" + , "BackgroundRequestAttribute" + , "SpdyAllowedAttribute" + , "SpdyWasUsedAttribute" + , "EmitAllUploadProgressSignalsAttribute" + , "FollowRedirectsAttribute" + , "User" + , "UserMax" +}; + +static QString qtscript_QNetworkRequest_Attribute_toStringHelper(QNetworkRequest::Attribute value) +{ + for (int i = 0; i < 24; ++i) { + if (qtscript_QNetworkRequest_Attribute_values[i] == value) + return QString::fromLatin1(qtscript_QNetworkRequest_Attribute_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QNetworkRequest_Attribute_toScriptValue(QScriptEngine *engine, const QNetworkRequest::Attribute &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QNetworkRequest")); + return clazz.property(qtscript_QNetworkRequest_Attribute_toStringHelper(value)); +} + +static void qtscript_QNetworkRequest_Attribute_fromScriptValue(const QScriptValue &value, QNetworkRequest::Attribute &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QNetworkRequest_Attribute(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 24; ++i) { + if (qtscript_QNetworkRequest_Attribute_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Attribute(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QNetworkRequest_Attribute_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkRequest::Attribute value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QNetworkRequest_Attribute_toString(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkRequest::Attribute value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QNetworkRequest_Attribute_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QNetworkRequest_Attribute_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QNetworkRequest_Attribute, + qtscript_QNetworkRequest_Attribute_valueOf, qtscript_QNetworkRequest_Attribute_toString); + qScriptRegisterMetaType(engine, qtscript_QNetworkRequest_Attribute_toScriptValue, + qtscript_QNetworkRequest_Attribute_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 24; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QNetworkRequest_Attribute_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QNetworkRequest_Attribute_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QNetworkRequest::KnownHeaders +// + +static const QNetworkRequest::KnownHeaders qtscript_QNetworkRequest_KnownHeaders_values[] = { + QNetworkRequest::ContentTypeHeader + , QNetworkRequest::ContentLengthHeader + , QNetworkRequest::LocationHeader + , QNetworkRequest::LastModifiedHeader + , QNetworkRequest::CookieHeader + , QNetworkRequest::SetCookieHeader + , QNetworkRequest::ContentDispositionHeader + , QNetworkRequest::UserAgentHeader + , QNetworkRequest::ServerHeader +}; + +static const char * const qtscript_QNetworkRequest_KnownHeaders_keys[] = { + "ContentTypeHeader" + , "ContentLengthHeader" + , "LocationHeader" + , "LastModifiedHeader" + , "CookieHeader" + , "SetCookieHeader" + , "ContentDispositionHeader" + , "UserAgentHeader" + , "ServerHeader" +}; + +static QString qtscript_QNetworkRequest_KnownHeaders_toStringHelper(QNetworkRequest::KnownHeaders value) +{ + if ((value >= QNetworkRequest::ContentTypeHeader) && (value <= QNetworkRequest::ServerHeader)) + return qtscript_QNetworkRequest_KnownHeaders_keys[static_cast(value)-static_cast(QNetworkRequest::ContentTypeHeader)]; + return QString(); +} + +static QScriptValue qtscript_QNetworkRequest_KnownHeaders_toScriptValue(QScriptEngine *engine, const QNetworkRequest::KnownHeaders &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QNetworkRequest")); + return clazz.property(qtscript_QNetworkRequest_KnownHeaders_toStringHelper(value)); +} + +static void qtscript_QNetworkRequest_KnownHeaders_fromScriptValue(const QScriptValue &value, QNetworkRequest::KnownHeaders &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QNetworkRequest_KnownHeaders(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QNetworkRequest::ContentTypeHeader) && (arg <= QNetworkRequest::ServerHeader)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("KnownHeaders(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QNetworkRequest_KnownHeaders_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkRequest::KnownHeaders value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QNetworkRequest_KnownHeaders_toString(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkRequest::KnownHeaders value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QNetworkRequest_KnownHeaders_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QNetworkRequest_KnownHeaders_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QNetworkRequest_KnownHeaders, + qtscript_QNetworkRequest_KnownHeaders_valueOf, qtscript_QNetworkRequest_KnownHeaders_toString); + qScriptRegisterMetaType(engine, qtscript_QNetworkRequest_KnownHeaders_toScriptValue, + qtscript_QNetworkRequest_KnownHeaders_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 9; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QNetworkRequest_KnownHeaders_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QNetworkRequest_KnownHeaders_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QNetworkRequest::Priority +// + +static const QNetworkRequest::Priority qtscript_QNetworkRequest_Priority_values[] = { + QNetworkRequest::HighPriority + , QNetworkRequest::NormalPriority + , QNetworkRequest::LowPriority +}; + +static const char * const qtscript_QNetworkRequest_Priority_keys[] = { + "HighPriority" + , "NormalPriority" + , "LowPriority" +}; + +static QString qtscript_QNetworkRequest_Priority_toStringHelper(QNetworkRequest::Priority value) +{ + for (int i = 0; i < 3; ++i) { + if (qtscript_QNetworkRequest_Priority_values[i] == value) + return QString::fromLatin1(qtscript_QNetworkRequest_Priority_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QNetworkRequest_Priority_toScriptValue(QScriptEngine *engine, const QNetworkRequest::Priority &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QNetworkRequest")); + return clazz.property(qtscript_QNetworkRequest_Priority_toStringHelper(value)); +} + +static void qtscript_QNetworkRequest_Priority_fromScriptValue(const QScriptValue &value, QNetworkRequest::Priority &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QNetworkRequest_Priority(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 3; ++i) { + if (qtscript_QNetworkRequest_Priority_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Priority(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QNetworkRequest_Priority_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkRequest::Priority value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QNetworkRequest_Priority_toString(QScriptContext *context, QScriptEngine *engine) +{ + QNetworkRequest::Priority value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QNetworkRequest_Priority_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QNetworkRequest_Priority_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QNetworkRequest_Priority, + qtscript_QNetworkRequest_Priority_valueOf, qtscript_QNetworkRequest_Priority_toString); + qScriptRegisterMetaType(engine, qtscript_QNetworkRequest_Priority_toScriptValue, + qtscript_QNetworkRequest_Priority_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QNetworkRequest_Priority_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QNetworkRequest_Priority_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QNetworkRequest +// + +static QScriptValue qtscript_QNetworkRequest_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 18; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QNetworkRequest* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QNetworkRequest.%0(): this object is not a QNetworkRequest") + .arg(qtscript_QNetworkRequest_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QNetworkRequest::Attribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_result = _q_self->attribute(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QNetworkRequest::Attribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_arg1 = context->argument(1).toVariant(); + QVariant _q_result = _q_self->attribute(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->hasRawHeader(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QNetworkRequest::KnownHeaders _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_result = _q_self->header(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->maximumRedirectsAllowed(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QNetworkRequest _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QObject* _q_result = _q_self->originatingObject(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QNetworkRequest::Priority _q_result = _q_self->priority(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_result = _q_self->rawHeader(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->rawHeaderList(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 2) { + QNetworkRequest::Attribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setAttribute(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 2) { + QNetworkRequest::KnownHeaders _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setHeader(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setMaximumRedirectsAllowed(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + _q_self->setOriginatingObject(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QNetworkRequest::Priority _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPriority(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 2) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setRawHeader(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setUrl(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QNetworkRequest _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QUrl _q_result = _q_self->url(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: { + QString result = QString::fromLatin1("QNetworkRequest"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkRequest_throw_ambiguity_error_helper(context, + qtscript_QNetworkRequest_function_names[_id+1], + qtscript_QNetworkRequest_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QNetworkRequest_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QNetworkRequest(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QNetworkRequest _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QNetworkRequest _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkRequest _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkRequest _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QNetworkRequest_throw_ambiguity_error_helper(context, + qtscript_QNetworkRequest_function_names[_id], + qtscript_QNetworkRequest_function_signatures[_id]); +} + +QScriptValue qtscript_create_QNetworkRequest_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QNetworkRequest*)0)); + for (int i = 0; i < 19; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QNetworkRequest_prototype_call, qtscript_QNetworkRequest_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QNetworkRequest_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QNetworkRequest_static_call, proto, qtscript_QNetworkRequest_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("LoadControl"), + qtscript_create_QNetworkRequest_LoadControl_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("CacheLoadControl"), + qtscript_create_QNetworkRequest_CacheLoadControl_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Attribute"), + qtscript_create_QNetworkRequest_Attribute_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("KnownHeaders"), + qtscript_create_QNetworkRequest_KnownHeaders_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Priority"), + qtscript_create_QNetworkRequest_Priority_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QSsl.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QSsl.cpp new file mode 100644 index 00000000..0f0b49da --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QSsl.cpp @@ -0,0 +1,395 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include + +static const char * const qtscript_QSsl_function_names[] = { + "QSsl" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QSsl_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QSsl_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QSsl_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSsl::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSsl::EncodingFormat) +Q_DECLARE_METATYPE(QSsl::KeyAlgorithm) +Q_DECLARE_METATYPE(QSsl::SslProtocol) +Q_DECLARE_METATYPE(QSsl::KeyType) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QSsl::EncodingFormat +// + +static const QSsl::EncodingFormat qtscript_QSsl_EncodingFormat_values[] = { + QSsl::Pem + , QSsl::Der +}; + +static const char * const qtscript_QSsl_EncodingFormat_keys[] = { + "Pem" + , "Der" +}; + +static QString qtscript_QSsl_EncodingFormat_toStringHelper(QSsl::EncodingFormat value) +{ + if ((value >= QSsl::Pem) && (value <= QSsl::Der)) + return qtscript_QSsl_EncodingFormat_keys[static_cast(value)-static_cast(QSsl::Pem)]; + return QString(); +} + +static QScriptValue qtscript_QSsl_EncodingFormat_toScriptValue(QScriptEngine *engine, const QSsl::EncodingFormat &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSsl")); + return clazz.property(qtscript_QSsl_EncodingFormat_toStringHelper(value)); +} + +static void qtscript_QSsl_EncodingFormat_fromScriptValue(const QScriptValue &value, QSsl::EncodingFormat &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSsl_EncodingFormat(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSsl::Pem) && (arg <= QSsl::Der)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("EncodingFormat(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSsl_EncodingFormat_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSsl::EncodingFormat value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSsl_EncodingFormat_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSsl::EncodingFormat value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSsl_EncodingFormat_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSsl_EncodingFormat_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSsl_EncodingFormat, + qtscript_QSsl_EncodingFormat_valueOf, qtscript_QSsl_EncodingFormat_toString); + qScriptRegisterMetaType(engine, qtscript_QSsl_EncodingFormat_toScriptValue, + qtscript_QSsl_EncodingFormat_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSsl_EncodingFormat_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSsl_EncodingFormat_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSsl::KeyAlgorithm +// + +static const QSsl::KeyAlgorithm qtscript_QSsl_KeyAlgorithm_values[] = { + QSsl::Opaque + , QSsl::Rsa + , QSsl::Dsa + , QSsl::Ec +}; + +static const char * const qtscript_QSsl_KeyAlgorithm_keys[] = { + "Opaque" + , "Rsa" + , "Dsa" + , "Ec" +}; + +static QString qtscript_QSsl_KeyAlgorithm_toStringHelper(QSsl::KeyAlgorithm value) +{ + if ((value >= QSsl::Opaque) && (value <= QSsl::Ec)) + return qtscript_QSsl_KeyAlgorithm_keys[static_cast(value)-static_cast(QSsl::Opaque)]; + return QString(); +} + +static QScriptValue qtscript_QSsl_KeyAlgorithm_toScriptValue(QScriptEngine *engine, const QSsl::KeyAlgorithm &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSsl")); + return clazz.property(qtscript_QSsl_KeyAlgorithm_toStringHelper(value)); +} + +static void qtscript_QSsl_KeyAlgorithm_fromScriptValue(const QScriptValue &value, QSsl::KeyAlgorithm &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSsl_KeyAlgorithm(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSsl::Opaque) && (arg <= QSsl::Ec)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("KeyAlgorithm(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSsl_KeyAlgorithm_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSsl::KeyAlgorithm value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSsl_KeyAlgorithm_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSsl::KeyAlgorithm value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSsl_KeyAlgorithm_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSsl_KeyAlgorithm_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSsl_KeyAlgorithm, + qtscript_QSsl_KeyAlgorithm_valueOf, qtscript_QSsl_KeyAlgorithm_toString); + qScriptRegisterMetaType(engine, qtscript_QSsl_KeyAlgorithm_toScriptValue, + qtscript_QSsl_KeyAlgorithm_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSsl_KeyAlgorithm_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSsl_KeyAlgorithm_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSsl::SslProtocol +// + +static const QSsl::SslProtocol qtscript_QSsl_SslProtocol_values[] = { + QSsl::UnknownProtocol + , QSsl::SslV3 + , QSsl::SslV2 + , QSsl::TlsV1_0 + , QSsl::TlsV1_1 + , QSsl::TlsV1_2 + , QSsl::AnyProtocol + , QSsl::TlsV1SslV3 + , QSsl::SecureProtocols + , QSsl::TlsV1_0OrLater + , QSsl::TlsV1_1OrLater + , QSsl::TlsV1_2OrLater +}; + +static const char * const qtscript_QSsl_SslProtocol_keys[] = { + "UnknownProtocol" + , "SslV3" + , "SslV2" + , "TlsV1_0" + , "TlsV1_1" + , "TlsV1_2" + , "AnyProtocol" + , "TlsV1SslV3" + , "SecureProtocols" + , "TlsV1_0OrLater" + , "TlsV1_1OrLater" + , "TlsV1_2OrLater" +}; + +static QString qtscript_QSsl_SslProtocol_toStringHelper(QSsl::SslProtocol value) +{ + if ((value >= QSsl::UnknownProtocol) && (value <= QSsl::TlsV1_2OrLater)) + return qtscript_QSsl_SslProtocol_keys[static_cast(value)-static_cast(QSsl::UnknownProtocol)]; + return QString(); +} + +static QScriptValue qtscript_QSsl_SslProtocol_toScriptValue(QScriptEngine *engine, const QSsl::SslProtocol &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSsl")); + return clazz.property(qtscript_QSsl_SslProtocol_toStringHelper(value)); +} + +static void qtscript_QSsl_SslProtocol_fromScriptValue(const QScriptValue &value, QSsl::SslProtocol &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSsl_SslProtocol(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSsl::UnknownProtocol) && (arg <= QSsl::TlsV1_2OrLater)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SslProtocol(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSsl_SslProtocol_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSsl::SslProtocol value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSsl_SslProtocol_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSsl::SslProtocol value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSsl_SslProtocol_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSsl_SslProtocol_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSsl_SslProtocol, + qtscript_QSsl_SslProtocol_valueOf, qtscript_QSsl_SslProtocol_toString); + qScriptRegisterMetaType(engine, qtscript_QSsl_SslProtocol_toScriptValue, + qtscript_QSsl_SslProtocol_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 12; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSsl_SslProtocol_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSsl_SslProtocol_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSsl::KeyType +// + +static const QSsl::KeyType qtscript_QSsl_KeyType_values[] = { + QSsl::PrivateKey + , QSsl::PublicKey +}; + +static const char * const qtscript_QSsl_KeyType_keys[] = { + "PrivateKey" + , "PublicKey" +}; + +static QString qtscript_QSsl_KeyType_toStringHelper(QSsl::KeyType value) +{ + if ((value >= QSsl::PrivateKey) && (value <= QSsl::PublicKey)) + return qtscript_QSsl_KeyType_keys[static_cast(value)-static_cast(QSsl::PrivateKey)]; + return QString(); +} + +static QScriptValue qtscript_QSsl_KeyType_toScriptValue(QScriptEngine *engine, const QSsl::KeyType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSsl")); + return clazz.property(qtscript_QSsl_KeyType_toStringHelper(value)); +} + +static void qtscript_QSsl_KeyType_fromScriptValue(const QScriptValue &value, QSsl::KeyType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSsl_KeyType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSsl::PrivateKey) && (arg <= QSsl::PublicKey)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("KeyType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSsl_KeyType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSsl::KeyType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSsl_KeyType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSsl::KeyType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSsl_KeyType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSsl_KeyType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSsl_KeyType, + qtscript_QSsl_KeyType_valueOf, qtscript_QSsl_KeyType_toString); + qScriptRegisterMetaType(engine, qtscript_QSsl_KeyType_toScriptValue, + qtscript_QSsl_KeyType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSsl_KeyType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSsl_KeyType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSsl +// + +static QScriptValue qtscript_QSsl_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSsl cannot be constructed")); + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSsl_throw_ambiguity_error_helper(context, + qtscript_QSsl_function_names[_id], + qtscript_QSsl_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSsl_class(QScriptEngine *engine) +{ + QScriptValue proto = QScriptValue(); + QScriptValue ctor = engine->newFunction(qtscript_QSsl_static_call, proto, qtscript_QSsl_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("EncodingFormat"), + qtscript_create_QSsl_EncodingFormat_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("KeyAlgorithm"), + qtscript_create_QSsl_KeyAlgorithm_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("SslProtocol"), + qtscript_create_QSsl_SslProtocol_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("KeyType"), + qtscript_create_QSsl_KeyType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QTcpServer.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QTcpServer.cpp new file mode 100644 index 00000000..30ee166d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QTcpServer.cpp @@ -0,0 +1,337 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTcpServer.h" + +static const char * const qtscript_QTcpServer_function_names[] = { + "QTcpServer" + // static + // prototype + , "close" + , "errorString" + , "hasPendingConnections" + , "isListening" + , "listen" + , "maxPendingConnections" + , "nextPendingConnection" + , "pauseAccepting" + , "proxy" + , "resumeAccepting" + , "serverAddress" + , "serverError" + , "serverPort" + , "setMaxPendingConnections" + , "setProxy" + , "waitForNewConnection" + , "toString" +}; + +static const char * const qtscript_QTcpServer_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" + , "" + , "" + , "" + , "QHostAddress address, unsigned short port" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "int numConnections" + , "QNetworkProxy networkProxy" + , "int msec" +"" +}; + +static const int qtscript_QTcpServer_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 2 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QTcpServer_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTcpServer::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTcpServer*) +Q_DECLARE_METATYPE(QtScriptShell_QTcpServer*) +Q_DECLARE_METATYPE(QHostAddress) +Q_DECLARE_METATYPE(QTcpSocket*) + +// +// QTcpServer +// + +static QScriptValue qtscript_QTcpServer_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 16; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTcpServer* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTcpServer.%0(): this object is not a QTcpServer") + .arg(qtscript_QTcpServer_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->close(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasPendingConnections(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isListening(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->listen(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QHostAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->listen(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QHostAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + unsigned short _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->listen(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->maxPendingConnections(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QTcpSocket* _q_result = _q_self->nextPendingConnection(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + _q_self->pauseAccepting(); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QNetworkProxy _q_result = _q_self->proxy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + _q_self->resumeAccepting(); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QHostAddress _q_result = _q_self->serverAddress(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QAbstractSocket::SocketError _q_result = _q_self->serverError(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + unsigned short _q_result = _q_self->serverPort(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setMaxPendingConnections(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QNetworkProxy _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setProxy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->waitForNewConnection(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->waitForNewConnection(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: { + QString result = QString::fromLatin1("QTcpServer"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTcpServer_throw_ambiguity_error_helper(context, + qtscript_QTcpServer_function_names[_id+1], + qtscript_QTcpServer_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTcpServer_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTcpServer(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTcpServer* _q_cpp_result = new QtScriptShell_QTcpServer(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTcpServer*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QTcpServer* _q_cpp_result = new QtScriptShell_QTcpServer(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTcpServer*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTcpServer_throw_ambiguity_error_helper(context, + qtscript_QTcpServer_function_names[_id], + qtscript_QTcpServer_function_signatures[_id]); +} + +static QScriptValue qtscript_QTcpServer_toScriptValue(QScriptEngine *engine, QTcpServer* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTcpServer_fromScriptValue(const QScriptValue &value, QTcpServer* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTcpServer_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTcpServer*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 17; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTcpServer_prototype_call, qtscript_QTcpServer_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTcpServer_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTcpServer_toScriptValue, + qtscript_QTcpServer_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTcpServer_static_call, proto, qtscript_QTcpServer_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QTcpSocket.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QTcpSocket.cpp new file mode 100644 index 00000000..2fc1f602 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QTcpSocket.cpp @@ -0,0 +1,152 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTcpSocket.h" + +static const char * const qtscript_QTcpSocket_function_names[] = { + "QTcpSocket" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QTcpSocket_function_signatures[] = { + "QObject parent" + // static + // prototype +"" +}; + +static const int qtscript_QTcpSocket_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QTcpSocket_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTcpSocket::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTcpSocket*) +Q_DECLARE_METATYPE(QtScriptShell_QTcpSocket*) +Q_DECLARE_METATYPE(QAbstractSocket*) + +// +// QTcpSocket +// + +static QScriptValue qtscript_QTcpSocket_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTcpSocket* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTcpSocket.%0(): this object is not a QTcpSocket") + .arg(qtscript_QTcpSocket_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QTcpSocket"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTcpSocket_throw_ambiguity_error_helper(context, + qtscript_QTcpSocket_function_names[_id+1], + qtscript_QTcpSocket_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTcpSocket_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTcpSocket(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTcpSocket* _q_cpp_result = new QtScriptShell_QTcpSocket(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTcpSocket*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QTcpSocket* _q_cpp_result = new QtScriptShell_QTcpSocket(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTcpSocket*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTcpSocket_throw_ambiguity_error_helper(context, + qtscript_QTcpSocket_function_names[_id], + qtscript_QTcpSocket_function_signatures[_id]); +} + +static QScriptValue qtscript_QTcpSocket_toScriptValue(QScriptEngine *engine, QTcpSocket* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTcpSocket_fromScriptValue(const QScriptValue &value, QTcpSocket* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTcpSocket_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTcpSocket*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QTcpSocket_toScriptValue, + qtscript_QTcpSocket_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTcpSocket_static_call, proto, qtscript_QTcpSocket_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QUdpSocket.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QUdpSocket.cpp new file mode 100644 index 00000000..5b554621 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscript_QUdpSocket.cpp @@ -0,0 +1,278 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QUdpSocket.h" + +static const char * const qtscript_QUdpSocket_function_names[] = { + "QUdpSocket" + // static + // prototype + , "hasPendingDatagrams" + , "joinMulticastGroup" + , "leaveMulticastGroup" + , "multicastInterface" + , "pendingDatagramSize" + , "readDatagram" + , "setMulticastInterface" + , "writeDatagram" + , "toString" +}; + +static const char * const qtscript_QUdpSocket_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" + , "QHostAddress groupAddress\nQHostAddress groupAddress, QNetworkInterface iface" + , "QHostAddress groupAddress\nQHostAddress groupAddress, QNetworkInterface iface" + , "" + , "" + , "char data, qint64 maxlen, QHostAddress host, unsigned short port" + , "QNetworkInterface iface" + , "QByteArray datagram, QHostAddress host, unsigned short port" +"" +}; + +static const int qtscript_QUdpSocket_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 2 + , 2 + , 0 + , 0 + , 4 + , 1 + , 3 + , 0 +}; + +static QScriptValue qtscript_QUdpSocket_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QUdpSocket::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QUdpSocket*) +Q_DECLARE_METATYPE(QtScriptShell_QUdpSocket*) +Q_DECLARE_METATYPE(QHostAddress) +Q_DECLARE_METATYPE(char*) +Q_DECLARE_METATYPE(QHostAddress*) +Q_DECLARE_METATYPE(unsigned short*) +Q_DECLARE_METATYPE(QAbstractSocket*) + +// +// QUdpSocket +// + +static QScriptValue qtscript_QUdpSocket_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QUdpSocket* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QUdpSocket.%0(): this object is not a QUdpSocket") + .arg(qtscript_QUdpSocket_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasPendingDatagrams(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QHostAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->joinMulticastGroup(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QHostAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkInterface _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->joinMulticastGroup(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QHostAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->leaveMulticastGroup(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QHostAddress _q_arg0 = qscriptvalue_cast(context->argument(0)); + QNetworkInterface _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->leaveMulticastGroup(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QNetworkInterface _q_result = _q_self->multicastInterface(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + qint64 _q_result = _q_self->pendingDatagramSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 2) { + char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + qint64 _q_arg1 = qscriptvalue_cast(context->argument(1)); + qint64 _q_result = _q_self->readDatagram(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + qint64 _q_arg1 = qscriptvalue_cast(context->argument(1)); + QHostAddress* _q_arg2 = qscriptvalue_cast(context->argument(2)); + qint64 _q_result = _q_self->readDatagram(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + qint64 _q_arg1 = qscriptvalue_cast(context->argument(1)); + QHostAddress* _q_arg2 = qscriptvalue_cast(context->argument(2)); + unsigned short* _q_arg3 = qscriptvalue_cast(context->argument(3)); + qint64 _q_result = _q_self->readDatagram(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QNetworkInterface _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMulticastInterface(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 3) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QHostAddress _q_arg1 = qscriptvalue_cast(context->argument(1)); + unsigned short _q_arg2 = qscriptvalue_cast(context->argument(2)); + qint64 _q_result = _q_self->writeDatagram(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: { + QString result = QString::fromLatin1("QUdpSocket"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QUdpSocket_throw_ambiguity_error_helper(context, + qtscript_QUdpSocket_function_names[_id+1], + qtscript_QUdpSocket_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QUdpSocket_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QUdpSocket(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QUdpSocket* _q_cpp_result = new QtScriptShell_QUdpSocket(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QUdpSocket*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QUdpSocket* _q_cpp_result = new QtScriptShell_QUdpSocket(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QUdpSocket*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QUdpSocket_throw_ambiguity_error_helper(context, + qtscript_QUdpSocket_function_names[_id], + qtscript_QUdpSocket_function_signatures[_id]); +} + +static QScriptValue qtscript_QUdpSocket_toScriptValue(QScriptEngine *engine, QUdpSocket* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QUdpSocket_fromScriptValue(const QScriptValue &value, QUdpSocket* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QUdpSocket_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QUdpSocket*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QUdpSocket_prototype_call, qtscript_QUdpSocket_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QUdpSocket_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QUdpSocket_toScriptValue, + qtscript_QUdpSocket_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QUdpSocket_static_call, proto, qtscript_QUdpSocket_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QAbstractNetworkCache.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QAbstractNetworkCache.cpp new file mode 100644 index 00000000..b6078b77 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QAbstractNetworkCache.cpp @@ -0,0 +1,202 @@ +#include "qtscriptshell_QAbstractNetworkCache.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QNetworkCacheMetaData) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QAbstractNetworkCache::QtScriptShell_QAbstractNetworkCache(QObject* parent) + : QAbstractNetworkCache(parent) {} + +QtScriptShell_QAbstractNetworkCache::~QtScriptShell_QAbstractNetworkCache() {} + +qint64 QtScriptShell_QAbstractNetworkCache::cacheSize() const +{ + QScriptValue _q_function = __qtscript_self.property("cacheSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("cacheSize") & QScriptValue::QObjectMember)) { + qFatal("QAbstractNetworkCache::cacheSize() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractNetworkCache::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAbstractNetworkCache::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractNetworkCache::clear() +{ + QScriptValue _q_function = __qtscript_self.property("clear"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clear") & QScriptValue::QObjectMember)) { + qFatal("QAbstractNetworkCache::clear() is abstract!"); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QAbstractNetworkCache::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAbstractNetworkCache::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QIODevice* QtScriptShell_QAbstractNetworkCache::data(const QUrl& url) +{ + QScriptValue _q_function = __qtscript_self.property("data"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("data") & QScriptValue::QObjectMember)) { + qFatal("QAbstractNetworkCache::data() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, url))); + } +} + +bool QtScriptShell_QAbstractNetworkCache::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAbstractNetworkCache::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QAbstractNetworkCache::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAbstractNetworkCache::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QAbstractNetworkCache::insert(QIODevice* device) +{ + QScriptValue _q_function = __qtscript_self.property("insert"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insert") & QScriptValue::QObjectMember)) { + qFatal("QAbstractNetworkCache::insert() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, device)); + } +} + +QNetworkCacheMetaData QtScriptShell_QAbstractNetworkCache::metaData(const QUrl& url) +{ + QScriptValue _q_function = __qtscript_self.property("metaData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metaData") & QScriptValue::QObjectMember)) { + qFatal("QAbstractNetworkCache::metaData() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, url))); + } +} + +QIODevice* QtScriptShell_QAbstractNetworkCache::prepare(const QNetworkCacheMetaData& metaData) +{ + QScriptValue _q_function = __qtscript_self.property("prepare"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("prepare") & QScriptValue::QObjectMember)) { + qFatal("QAbstractNetworkCache::prepare() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, metaData))); + } +} + +bool QtScriptShell_QAbstractNetworkCache::remove(const QUrl& url) +{ + QScriptValue _q_function = __qtscript_self.property("remove"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("remove") & QScriptValue::QObjectMember)) { + qFatal("QAbstractNetworkCache::remove() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, url))); + } +} + +void QtScriptShell_QAbstractNetworkCache::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAbstractNetworkCache::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractNetworkCache::updateMetaData(const QNetworkCacheMetaData& metaData) +{ + QScriptValue _q_function = __qtscript_self.property("updateMetaData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateMetaData") & QScriptValue::QObjectMember)) { + qFatal("QAbstractNetworkCache::updateMetaData() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, metaData)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QAbstractNetworkCache.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QAbstractNetworkCache.h new file mode 100644 index 00000000..3a96d71d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QAbstractNetworkCache.h @@ -0,0 +1,32 @@ +#ifndef QTSCRIPTSHELL_QABSTRACTNETWORKCACHE_H +#define QTSCRIPTSHELL_QABSTRACTNETWORKCACHE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAbstractNetworkCache : public QAbstractNetworkCache +{ +public: + QtScriptShell_QAbstractNetworkCache(QObject* parent = 0); + ~QtScriptShell_QAbstractNetworkCache(); + + qint64 cacheSize() const; + void childEvent(QChildEvent* event); + void clear(); + void customEvent(QEvent* event); + QIODevice* data(const QUrl& url); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void insert(QIODevice* device); + QNetworkCacheMetaData metaData(const QUrl& url); + QIODevice* prepare(const QNetworkCacheMetaData& metaData); + bool remove(const QUrl& url); + void timerEvent(QTimerEvent* event); + void updateMetaData(const QNetworkCacheMetaData& metaData); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QABSTRACTNETWORKCACHE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QAbstractSocket.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QAbstractSocket.cpp new file mode 100644 index 00000000..380f1599 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QAbstractSocket.cpp @@ -0,0 +1,427 @@ +#include "qtscriptshell_QAbstractSocket.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QHostAddress) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAbstractSocket::NetworkLayerProtocol) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(char*) +Q_DECLARE_METATYPE(QAbstractSocket::SocketOption) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(const char*) + +QtScriptShell_QAbstractSocket::QtScriptShell_QAbstractSocket(QAbstractSocket::SocketType socketType, QObject* parent) + : QAbstractSocket(socketType, parent) {} + +QtScriptShell_QAbstractSocket::~QtScriptShell_QAbstractSocket() {} + +bool QtScriptShell_QAbstractSocket::atEnd() const +{ + QScriptValue _q_function = __qtscript_self.property("atEnd"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)) { + return QAbstractSocket::atEnd(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QAbstractSocket::bytesAvailable() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesAvailable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesAvailable") & QScriptValue::QObjectMember)) { + return QAbstractSocket::bytesAvailable(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QAbstractSocket::bytesToWrite() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesToWrite"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesToWrite") & QScriptValue::QObjectMember)) { + return QAbstractSocket::bytesToWrite(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QAbstractSocket::canReadLine() const +{ + QScriptValue _q_function = __qtscript_self.property("canReadLine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canReadLine") & QScriptValue::QObjectMember)) { + return QAbstractSocket::canReadLine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractSocket::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAbstractSocket::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSocket::close() +{ + QScriptValue _q_function = __qtscript_self.property("close"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("close") & QScriptValue::QObjectMember)) { + QAbstractSocket::close(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QAbstractSocket::connectToHost(const QHostAddress& address, unsigned short port, QIODevice::OpenMode mode) +{ + QScriptValue _q_function = __qtscript_self.property("connectToHost"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("connectToHost") & QScriptValue::QObjectMember)) { + QAbstractSocket::connectToHost(address, port, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, address) + << qScriptValueFromValue(_q_engine, port) + << qScriptValueFromValue(_q_engine, mode)); + } +} + +void QtScriptShell_QAbstractSocket::connectToHost(const QString& hostName, unsigned short port, QIODevice::OpenMode mode, QAbstractSocket::NetworkLayerProtocol protocol) +{ + QScriptValue _q_function = __qtscript_self.property("connectToHost"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("connectToHost") & QScriptValue::QObjectMember)) { + QAbstractSocket::connectToHost(hostName, port, mode, protocol); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, hostName) + << qScriptValueFromValue(_q_engine, port) + << qScriptValueFromValue(_q_engine, mode) + << qScriptValueFromValue(_q_engine, protocol)); + } +} + +void QtScriptShell_QAbstractSocket::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAbstractSocket::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSocket::disconnectFromHost() +{ + QScriptValue _q_function = __qtscript_self.property("disconnectFromHost"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("disconnectFromHost") & QScriptValue::QObjectMember)) { + QAbstractSocket::disconnectFromHost(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QAbstractSocket::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAbstractSocket::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QAbstractSocket::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAbstractSocket::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QAbstractSocket::isSequential() const +{ + QScriptValue _q_function = __qtscript_self.property("isSequential"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isSequential") & QScriptValue::QObjectMember)) { + return QAbstractSocket::isSequential(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QAbstractSocket::open(QIODevice::OpenMode mode) +{ + QScriptValue _q_function = __qtscript_self.property("open"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("open") & QScriptValue::QObjectMember)) { + return QAbstractSocket::open(mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, mode))); + } +} + +qint64 QtScriptShell_QAbstractSocket::pos() const +{ + QScriptValue _q_function = __qtscript_self.property("pos"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("pos") & QScriptValue::QObjectMember)) { + return QAbstractSocket::pos(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QAbstractSocket::readData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readData") & QScriptValue::QObjectMember)) { + return QAbstractSocket::readData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +qint64 QtScriptShell_QAbstractSocket::readLineData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readLineData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readLineData") & QScriptValue::QObjectMember)) { + return QAbstractSocket::readLineData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +bool QtScriptShell_QAbstractSocket::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + return QAbstractSocket::reset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractSocket::resume() +{ + QScriptValue _q_function = __qtscript_self.property("resume"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resume") & QScriptValue::QObjectMember)) { + QAbstractSocket::resume(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QAbstractSocket::seek(qint64 pos) +{ + QScriptValue _q_function = __qtscript_self.property("seek"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("seek") & QScriptValue::QObjectMember)) { + return QAbstractSocket::seek(pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pos))); + } +} + +void QtScriptShell_QAbstractSocket::setReadBufferSize(qint64 size) +{ + QScriptValue _q_function = __qtscript_self.property("setReadBufferSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setReadBufferSize") & QScriptValue::QObjectMember)) { + QAbstractSocket::setReadBufferSize(size); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, size)); + } +} + +void QtScriptShell_QAbstractSocket::setSocketOption(QAbstractSocket::SocketOption option, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("setSocketOption"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSocketOption") & QScriptValue::QObjectMember)) { + QAbstractSocket::setSocketOption(option, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, value)); + } +} + +qint64 QtScriptShell_QAbstractSocket::size() const +{ + QScriptValue _q_function = __qtscript_self.property("size"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("size") & QScriptValue::QObjectMember)) { + return QAbstractSocket::size(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QVariant QtScriptShell_QAbstractSocket::socketOption(QAbstractSocket::SocketOption option) +{ + QScriptValue _q_function = __qtscript_self.property("socketOption"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("socketOption") & QScriptValue::QObjectMember)) { + return QAbstractSocket::socketOption(option); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, option))); + } +} + +void QtScriptShell_QAbstractSocket::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAbstractSocket::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractSocket::waitForBytesWritten(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForBytesWritten"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForBytesWritten") & QScriptValue::QObjectMember)) { + return QAbstractSocket::waitForBytesWritten(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QAbstractSocket::waitForConnected(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForConnected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForConnected") & QScriptValue::QObjectMember)) { + return QAbstractSocket::waitForConnected(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QAbstractSocket::waitForDisconnected(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForDisconnected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForDisconnected") & QScriptValue::QObjectMember)) { + return QAbstractSocket::waitForDisconnected(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QAbstractSocket::waitForReadyRead(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForReadyRead"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForReadyRead") & QScriptValue::QObjectMember)) { + return QAbstractSocket::waitForReadyRead(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +qint64 QtScriptShell_QAbstractSocket::writeData(const char* data, qint64 len) +{ + QScriptValue _q_function = __qtscript_self.property("writeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("writeData") & QScriptValue::QObjectMember)) { + return QAbstractSocket::writeData(data, len); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, len))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QAbstractSocket.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QAbstractSocket.h new file mode 100644 index 00000000..84cf1127 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QAbstractSocket.h @@ -0,0 +1,49 @@ +#ifndef QTSCRIPTSHELL_QABSTRACTSOCKET_H +#define QTSCRIPTSHELL_QABSTRACTSOCKET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAbstractSocket : public QAbstractSocket +{ +public: + QtScriptShell_QAbstractSocket(QAbstractSocket::SocketType socketType, QObject* parent); + ~QtScriptShell_QAbstractSocket(); + + bool atEnd() const; + qint64 bytesAvailable() const; + qint64 bytesToWrite() const; + bool canReadLine() const; + void childEvent(QChildEvent* event); + void close(); + void connectToHost(const QHostAddress& address, unsigned short port, QIODevice::OpenMode mode = ReadWrite); + void connectToHost(const QString& hostName, unsigned short port, QIODevice::OpenMode mode = ReadWrite, QAbstractSocket::NetworkLayerProtocol protocol = QAbstractSocket::AnyIPProtocol); + void customEvent(QEvent* event); + void disconnectFromHost(); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + bool isSequential() const; + bool open(QIODevice::OpenMode mode); + qint64 pos() const; + qint64 readData(char* data, qint64 maxlen); + qint64 readLineData(char* data, qint64 maxlen); + bool reset(); + void resume(); + bool seek(qint64 pos); + void setReadBufferSize(qint64 size); + void setSocketOption(QAbstractSocket::SocketOption option, const QVariant& value); + qint64 size() const; + QVariant socketOption(QAbstractSocket::SocketOption option); + void timerEvent(QTimerEvent* event); + bool waitForBytesWritten(int msecs = 30000); + bool waitForConnected(int msecs = 30000); + bool waitForDisconnected(int msecs = 30000); + bool waitForReadyRead(int msecs = 30000); + qint64 writeData(const char* data, qint64 len); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QABSTRACTSOCKET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QIPv6Address.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QIPv6Address.cpp new file mode 100644 index 00000000..eb0f26c5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QIPv6Address.cpp @@ -0,0 +1,13 @@ +#include "qtscriptshell_QIPv6Address.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QIPv6Address::QtScriptShell_QIPv6Address() + : QIPv6Address() {} + +QtScriptShell_QIPv6Address::~QtScriptShell_QIPv6Address() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QIPv6Address.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QIPv6Address.h new file mode 100644 index 00000000..25e49450 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QIPv6Address.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QIPV6ADDRESS_H +#define QTSCRIPTSHELL_QIPV6ADDRESS_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QIPv6Address : public QIPv6Address +{ +public: + QtScriptShell_QIPv6Address(); + ~QtScriptShell_QIPv6Address(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QIPV6ADDRESS_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QLocalServer.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QLocalServer.cpp new file mode 100644 index 00000000..983ef1c6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QLocalServer.cpp @@ -0,0 +1,131 @@ +#include "qtscriptshell_QLocalServer.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(quintptr) +Q_DECLARE_METATYPE(QLocalSocket*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QLocalServer::QtScriptShell_QLocalServer(QObject* parent) + : QLocalServer(parent) {} + +QtScriptShell_QLocalServer::~QtScriptShell_QLocalServer() {} + +void QtScriptShell_QLocalServer::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QLocalServer::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLocalServer::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QLocalServer::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QLocalServer::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QLocalServer::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QLocalServer::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QLocalServer::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QLocalServer::hasPendingConnections() const +{ + QScriptValue _q_function = __qtscript_self.property("hasPendingConnections"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasPendingConnections") & QScriptValue::QObjectMember)) { + return QLocalServer::hasPendingConnections(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLocalServer::incomingConnection(quintptr socketDescriptor) +{ + QScriptValue _q_function = __qtscript_self.property("incomingConnection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("incomingConnection") & QScriptValue::QObjectMember)) { + QLocalServer::incomingConnection(socketDescriptor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, socketDescriptor)); + } +} + +QLocalSocket* QtScriptShell_QLocalServer::nextPendingConnection() +{ + QScriptValue _q_function = __qtscript_self.property("nextPendingConnection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nextPendingConnection") & QScriptValue::QObjectMember)) { + return QLocalServer::nextPendingConnection(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLocalServer::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QLocalServer::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QLocalServer.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QLocalServer.h new file mode 100644 index 00000000..7d44fa87 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QLocalServer.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QLOCALSERVER_H +#define QTSCRIPTSHELL_QLOCALSERVER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QLocalServer : public QLocalServer +{ +public: + QtScriptShell_QLocalServer(QObject* parent = 0); + ~QtScriptShell_QLocalServer(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + bool hasPendingConnections() const; + void incomingConnection(quintptr socketDescriptor); + QLocalSocket* nextPendingConnection(); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QLOCALSERVER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QLocalSocket.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QLocalSocket.cpp new file mode 100644 index 00000000..0f65dd12 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QLocalSocket.cpp @@ -0,0 +1,295 @@ +#include "qtscriptshell_QLocalSocket.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(char*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(const char*) + +QtScriptShell_QLocalSocket::QtScriptShell_QLocalSocket(QObject* parent) + : QLocalSocket(parent) {} + +QtScriptShell_QLocalSocket::~QtScriptShell_QLocalSocket() {} + +bool QtScriptShell_QLocalSocket::atEnd() const +{ + QScriptValue _q_function = __qtscript_self.property("atEnd"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)) { + return QLocalSocket::atEnd(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QLocalSocket::bytesAvailable() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesAvailable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesAvailable") & QScriptValue::QObjectMember)) { + return QLocalSocket::bytesAvailable(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QLocalSocket::bytesToWrite() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesToWrite"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesToWrite") & QScriptValue::QObjectMember)) { + return QLocalSocket::bytesToWrite(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QLocalSocket::canReadLine() const +{ + QScriptValue _q_function = __qtscript_self.property("canReadLine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canReadLine") & QScriptValue::QObjectMember)) { + return QLocalSocket::canReadLine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLocalSocket::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QLocalSocket::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLocalSocket::close() +{ + QScriptValue _q_function = __qtscript_self.property("close"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("close") & QScriptValue::QObjectMember)) { + QLocalSocket::close(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QLocalSocket::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QLocalSocket::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QLocalSocket::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QLocalSocket::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QLocalSocket::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QLocalSocket::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QLocalSocket::isSequential() const +{ + QScriptValue _q_function = __qtscript_self.property("isSequential"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isSequential") & QScriptValue::QObjectMember)) { + return QLocalSocket::isSequential(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QLocalSocket::open(QIODevice::OpenMode openMode) +{ + QScriptValue _q_function = __qtscript_self.property("open"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("open") & QScriptValue::QObjectMember)) { + return QLocalSocket::open(openMode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, openMode))); + } +} + +qint64 QtScriptShell_QLocalSocket::pos() const +{ + QScriptValue _q_function = __qtscript_self.property("pos"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("pos") & QScriptValue::QObjectMember)) { + return QLocalSocket::pos(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QLocalSocket::readData(char* arg__1, qint64 arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("readData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readData") & QScriptValue::QObjectMember)) { + return QLocalSocket::readData(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +qint64 QtScriptShell_QLocalSocket::readLineData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readLineData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readLineData") & QScriptValue::QObjectMember)) { + return QLocalSocket::readLineData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +bool QtScriptShell_QLocalSocket::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + return QLocalSocket::reset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QLocalSocket::seek(qint64 pos) +{ + QScriptValue _q_function = __qtscript_self.property("seek"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("seek") & QScriptValue::QObjectMember)) { + return QLocalSocket::seek(pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pos))); + } +} + +qint64 QtScriptShell_QLocalSocket::size() const +{ + QScriptValue _q_function = __qtscript_self.property("size"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("size") & QScriptValue::QObjectMember)) { + return QLocalSocket::size(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLocalSocket::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QLocalSocket::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QLocalSocket::waitForBytesWritten(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForBytesWritten"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForBytesWritten") & QScriptValue::QObjectMember)) { + return QLocalSocket::waitForBytesWritten(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QLocalSocket::waitForReadyRead(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForReadyRead"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForReadyRead") & QScriptValue::QObjectMember)) { + return QLocalSocket::waitForReadyRead(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +qint64 QtScriptShell_QLocalSocket::writeData(const char* arg__1, qint64 arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("writeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("writeData") & QScriptValue::QObjectMember)) { + return QLocalSocket::writeData(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(arg__1)) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QLocalSocket.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QLocalSocket.h new file mode 100644 index 00000000..7459c782 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QLocalSocket.h @@ -0,0 +1,40 @@ +#ifndef QTSCRIPTSHELL_QLOCALSOCKET_H +#define QTSCRIPTSHELL_QLOCALSOCKET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QLocalSocket : public QLocalSocket +{ +public: + QtScriptShell_QLocalSocket(QObject* parent = 0); + ~QtScriptShell_QLocalSocket(); + + bool atEnd() const; + qint64 bytesAvailable() const; + qint64 bytesToWrite() const; + bool canReadLine() const; + void childEvent(QChildEvent* event); + void close(); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + bool isSequential() const; + bool open(QIODevice::OpenMode openMode = ReadWrite); + qint64 pos() const; + qint64 readData(char* arg__1, qint64 arg__2); + qint64 readLineData(char* data, qint64 maxlen); + bool reset(); + bool seek(qint64 pos); + qint64 size() const; + void timerEvent(QTimerEvent* event); + bool waitForBytesWritten(int msecs = 30000); + bool waitForReadyRead(int msecs = 30000); + qint64 writeData(const char* arg__1, qint64 arg__2); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QLOCALSOCKET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkAccessManager.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkAccessManager.cpp new file mode 100644 index 00000000..49d272bf --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkAccessManager.cpp @@ -0,0 +1,118 @@ +#include "qtscriptshell_QNetworkAccessManager.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QNetworkAccessManager::Operation) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QNetworkReply*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QNetworkAccessManager::QtScriptShell_QNetworkAccessManager(QObject* parent) + : QNetworkAccessManager(parent) {} + +QtScriptShell_QNetworkAccessManager::~QtScriptShell_QNetworkAccessManager() {} + +void QtScriptShell_QNetworkAccessManager::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QNetworkAccessManager::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QNetworkReply* QtScriptShell_QNetworkAccessManager::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest& request, QIODevice* outgoingData) +{ + QScriptValue _q_function = __qtscript_self.property("createRequest"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createRequest") & QScriptValue::QObjectMember)) { + return QNetworkAccessManager::createRequest(op, request, outgoingData); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, op) + << qScriptValueFromValue(_q_engine, request) + << qScriptValueFromValue(_q_engine, outgoingData))); + } +} + +void QtScriptShell_QNetworkAccessManager::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QNetworkAccessManager::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QNetworkAccessManager::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QNetworkAccessManager::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QNetworkAccessManager::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QNetworkAccessManager::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QNetworkAccessManager::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QNetworkAccessManager::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkAccessManager.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkAccessManager.h new file mode 100644 index 00000000..c6f080c8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkAccessManager.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QNETWORKACCESSMANAGER_H +#define QTSCRIPTSHELL_QNETWORKACCESSMANAGER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QNetworkAccessManager : public QNetworkAccessManager +{ +public: + QtScriptShell_QNetworkAccessManager(QObject* parent = 0); + ~QtScriptShell_QNetworkAccessManager(); + + void childEvent(QChildEvent* event); + QNetworkReply* createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest& request, QIODevice* outgoingData = 0); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QNETWORKACCESSMANAGER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkCookieJar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkCookieJar.cpp new file mode 100644 index 00000000..f0333e99 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkCookieJar.cpp @@ -0,0 +1,181 @@ +#include "qtscriptshell_QNetworkCookieJar.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QNetworkCookieJar::QtScriptShell_QNetworkCookieJar(QObject* parent) + : QNetworkCookieJar(parent) {} + +QtScriptShell_QNetworkCookieJar::~QtScriptShell_QNetworkCookieJar() {} + +void QtScriptShell_QNetworkCookieJar::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QNetworkCookieJar::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QList QtScriptShell_QNetworkCookieJar::cookiesForUrl(const QUrl& url) const +{ + QScriptValue _q_function = __qtscript_self.property("cookiesForUrl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("cookiesForUrl") & QScriptValue::QObjectMember)) { + return QNetworkCookieJar::cookiesForUrl(url); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, url))); + } +} + +void QtScriptShell_QNetworkCookieJar::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QNetworkCookieJar::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QNetworkCookieJar::deleteCookie(const QNetworkCookie& cookie) +{ + QScriptValue _q_function = __qtscript_self.property("deleteCookie"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("deleteCookie") & QScriptValue::QObjectMember)) { + return QNetworkCookieJar::deleteCookie(cookie); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, cookie))); + } +} + +bool QtScriptShell_QNetworkCookieJar::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QNetworkCookieJar::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QNetworkCookieJar::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QNetworkCookieJar::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QNetworkCookieJar::insertCookie(const QNetworkCookie& cookie) +{ + QScriptValue _q_function = __qtscript_self.property("insertCookie"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertCookie") & QScriptValue::QObjectMember)) { + return QNetworkCookieJar::insertCookie(cookie); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, cookie))); + } +} + +bool QtScriptShell_QNetworkCookieJar::setCookiesFromUrl(const QList& cookieList, const QUrl& url) +{ + QScriptValue _q_function = __qtscript_self.property("setCookiesFromUrl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setCookiesFromUrl") & QScriptValue::QObjectMember)) { + return QNetworkCookieJar::setCookiesFromUrl(cookieList, url); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, cookieList) + << qScriptValueFromValue(_q_engine, url))); + } +} + +void QtScriptShell_QNetworkCookieJar::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QNetworkCookieJar::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QNetworkCookieJar::updateCookie(const QNetworkCookie& cookie) +{ + QScriptValue _q_function = __qtscript_self.property("updateCookie"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateCookie") & QScriptValue::QObjectMember)) { + return QNetworkCookieJar::updateCookie(cookie); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, cookie))); + } +} + +bool QtScriptShell_QNetworkCookieJar::validateCookie(const QNetworkCookie& cookie, const QUrl& url) const +{ + QScriptValue _q_function = __qtscript_self.property("validateCookie"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("validateCookie") & QScriptValue::QObjectMember)) { + return QNetworkCookieJar::validateCookie(cookie, url); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, cookie) + << qScriptValueFromValue(_q_engine, url))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkCookieJar.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkCookieJar.h new file mode 100644 index 00000000..69339481 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkCookieJar.h @@ -0,0 +1,30 @@ +#ifndef QTSCRIPTSHELL_QNETWORKCOOKIEJAR_H +#define QTSCRIPTSHELL_QNETWORKCOOKIEJAR_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QNetworkCookieJar : public QNetworkCookieJar +{ +public: + QtScriptShell_QNetworkCookieJar(QObject* parent = 0); + ~QtScriptShell_QNetworkCookieJar(); + + void childEvent(QChildEvent* event); + QList cookiesForUrl(const QUrl& url) const; + void customEvent(QEvent* event); + bool deleteCookie(const QNetworkCookie& cookie); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + bool insertCookie(const QNetworkCookie& cookie); + bool setCookiesFromUrl(const QList& cookieList, const QUrl& url); + void timerEvent(QTimerEvent* event); + bool updateCookie(const QNetworkCookie& cookie); + bool validateCookie(const QNetworkCookie& cookie, const QUrl& url) const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QNETWORKCOOKIEJAR_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkDiskCache.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkDiskCache.cpp new file mode 100644 index 00000000..5bb28358 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkDiskCache.cpp @@ -0,0 +1,214 @@ +#include "qtscriptshell_QNetworkDiskCache.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QNetworkCacheMetaData) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QNetworkDiskCache::QtScriptShell_QNetworkDiskCache(QObject* parent) + : QNetworkDiskCache(parent) {} + +QtScriptShell_QNetworkDiskCache::~QtScriptShell_QNetworkDiskCache() {} + +qint64 QtScriptShell_QNetworkDiskCache::cacheSize() const +{ + QScriptValue _q_function = __qtscript_self.property("cacheSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("cacheSize") & QScriptValue::QObjectMember)) { + return QNetworkDiskCache::cacheSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QNetworkDiskCache::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QNetworkDiskCache::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QNetworkDiskCache::clear() +{ + QScriptValue _q_function = __qtscript_self.property("clear"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clear") & QScriptValue::QObjectMember)) { + QNetworkDiskCache::clear(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QNetworkDiskCache::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QNetworkDiskCache::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QIODevice* QtScriptShell_QNetworkDiskCache::data(const QUrl& url) +{ + QScriptValue _q_function = __qtscript_self.property("data"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("data") & QScriptValue::QObjectMember)) { + return QNetworkDiskCache::data(url); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, url))); + } +} + +bool QtScriptShell_QNetworkDiskCache::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QNetworkDiskCache::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QNetworkDiskCache::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QNetworkDiskCache::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +qint64 QtScriptShell_QNetworkDiskCache::expire() +{ + QScriptValue _q_function = __qtscript_self.property("expire"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("expire") & QScriptValue::QObjectMember)) { + return QNetworkDiskCache::expire(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QNetworkDiskCache::insert(QIODevice* device) +{ + QScriptValue _q_function = __qtscript_self.property("insert"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insert") & QScriptValue::QObjectMember)) { + QNetworkDiskCache::insert(device); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, device)); + } +} + +QNetworkCacheMetaData QtScriptShell_QNetworkDiskCache::metaData(const QUrl& url) +{ + QScriptValue _q_function = __qtscript_self.property("metaData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metaData") & QScriptValue::QObjectMember)) { + return QNetworkDiskCache::metaData(url); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, url))); + } +} + +QIODevice* QtScriptShell_QNetworkDiskCache::prepare(const QNetworkCacheMetaData& metaData) +{ + QScriptValue _q_function = __qtscript_self.property("prepare"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("prepare") & QScriptValue::QObjectMember)) { + return QNetworkDiskCache::prepare(metaData); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, metaData))); + } +} + +bool QtScriptShell_QNetworkDiskCache::remove(const QUrl& url) +{ + QScriptValue _q_function = __qtscript_self.property("remove"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("remove") & QScriptValue::QObjectMember)) { + return QNetworkDiskCache::remove(url); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, url))); + } +} + +void QtScriptShell_QNetworkDiskCache::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QNetworkDiskCache::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QNetworkDiskCache::updateMetaData(const QNetworkCacheMetaData& metaData) +{ + QScriptValue _q_function = __qtscript_self.property("updateMetaData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateMetaData") & QScriptValue::QObjectMember)) { + QNetworkDiskCache::updateMetaData(metaData); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, metaData)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkDiskCache.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkDiskCache.h new file mode 100644 index 00000000..d347d245 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkDiskCache.h @@ -0,0 +1,33 @@ +#ifndef QTSCRIPTSHELL_QNETWORKDISKCACHE_H +#define QTSCRIPTSHELL_QNETWORKDISKCACHE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QNetworkDiskCache : public QNetworkDiskCache +{ +public: + QtScriptShell_QNetworkDiskCache(QObject* parent = 0); + ~QtScriptShell_QNetworkDiskCache(); + + qint64 cacheSize() const; + void childEvent(QChildEvent* event); + void clear(); + void customEvent(QEvent* event); + QIODevice* data(const QUrl& url); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + qint64 expire(); + void insert(QIODevice* device); + QNetworkCacheMetaData metaData(const QUrl& url); + QIODevice* prepare(const QNetworkCacheMetaData& metaData); + bool remove(const QUrl& url); + void timerEvent(QTimerEvent* event); + void updateMetaData(const QNetworkCacheMetaData& metaData); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QNETWORKDISKCACHE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkProxyFactory.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkProxyFactory.cpp new file mode 100644 index 00000000..063ed178 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkProxyFactory.cpp @@ -0,0 +1,31 @@ +#include "qtscriptshell_QNetworkProxyFactory.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QNetworkProxyQuery) +Q_DECLARE_METATYPE(QList) + +QtScriptShell_QNetworkProxyFactory::QtScriptShell_QNetworkProxyFactory() + : QNetworkProxyFactory() {} + +QtScriptShell_QNetworkProxyFactory::~QtScriptShell_QNetworkProxyFactory() {} + +QList QtScriptShell_QNetworkProxyFactory::queryProxy(const QNetworkProxyQuery& query) +{ + QScriptValue _q_function = __qtscript_self.property("queryProxy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("queryProxy") & QScriptValue::QObjectMember)) { + qFatal("QNetworkProxyFactory::queryProxy() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkProxyFactory.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkProxyFactory.h new file mode 100644 index 00000000..db062c7b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkProxyFactory.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QNETWORKPROXYFACTORY_H +#define QTSCRIPTSHELL_QNETWORKPROXYFACTORY_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QNetworkProxyFactory : public QNetworkProxyFactory +{ +public: + QtScriptShell_QNetworkProxyFactory(); + ~QtScriptShell_QNetworkProxyFactory(); + + QList queryProxy(const QNetworkProxyQuery& query = QNetworkProxyQuery()); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QNETWORKPROXYFACTORY_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkReply.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkReply.cpp new file mode 100644 index 00000000..602bc653 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkReply.cpp @@ -0,0 +1,379 @@ +#include "qtscriptshell_QNetworkReply.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QSslError) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(char*) +Q_DECLARE_METATYPE(QSslConfiguration) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(const char*) + +QtScriptShell_QNetworkReply::QtScriptShell_QNetworkReply(QObject* parent) + : QNetworkReply(parent) {} + +QtScriptShell_QNetworkReply::~QtScriptShell_QNetworkReply() {} + +void QtScriptShell_QNetworkReply::abort() +{ + QScriptValue _q_function = __qtscript_self.property("abort"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("abort") & QScriptValue::QObjectMember)) { + qFatal("QNetworkReply::abort() is abstract!"); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QNetworkReply::atEnd() const +{ + QScriptValue _q_function = __qtscript_self.property("atEnd"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)) { + return QNetworkReply::atEnd(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QNetworkReply::bytesAvailable() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesAvailable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesAvailable") & QScriptValue::QObjectMember)) { + return QNetworkReply::bytesAvailable(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QNetworkReply::bytesToWrite() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesToWrite"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesToWrite") & QScriptValue::QObjectMember)) { + return QNetworkReply::bytesToWrite(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QNetworkReply::canReadLine() const +{ + QScriptValue _q_function = __qtscript_self.property("canReadLine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canReadLine") & QScriptValue::QObjectMember)) { + return QNetworkReply::canReadLine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QNetworkReply::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QNetworkReply::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QNetworkReply::close() +{ + QScriptValue _q_function = __qtscript_self.property("close"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("close") & QScriptValue::QObjectMember)) { + QNetworkReply::close(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QNetworkReply::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QNetworkReply::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QNetworkReply::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QNetworkReply::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QNetworkReply::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QNetworkReply::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QNetworkReply::ignoreSslErrors() +{ + QScriptValue _q_function = __qtscript_self.property("ignoreSslErrors"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("ignoreSslErrors") & QScriptValue::QObjectMember)) { + QNetworkReply::ignoreSslErrors(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QNetworkReply::ignoreSslErrorsImplementation(const QList& arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("ignoreSslErrorsImplementation"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("ignoreSslErrorsImplementation") & QScriptValue::QObjectMember)) { + QNetworkReply::ignoreSslErrorsImplementation(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +bool QtScriptShell_QNetworkReply::isSequential() const +{ + QScriptValue _q_function = __qtscript_self.property("isSequential"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isSequential") & QScriptValue::QObjectMember)) { + return QNetworkReply::isSequential(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QNetworkReply::open(QIODevice::OpenMode mode) +{ + QScriptValue _q_function = __qtscript_self.property("open"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("open") & QScriptValue::QObjectMember)) { + return QNetworkReply::open(mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, mode))); + } +} + +qint64 QtScriptShell_QNetworkReply::pos() const +{ + QScriptValue _q_function = __qtscript_self.property("pos"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("pos") & QScriptValue::QObjectMember)) { + return QNetworkReply::pos(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QNetworkReply::readData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readData") & QScriptValue::QObjectMember)) { + qFatal("QNetworkReply::readData() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +qint64 QtScriptShell_QNetworkReply::readLineData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readLineData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readLineData") & QScriptValue::QObjectMember)) { + return QNetworkReply::readLineData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +bool QtScriptShell_QNetworkReply::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + return QNetworkReply::reset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QNetworkReply::seek(qint64 pos) +{ + QScriptValue _q_function = __qtscript_self.property("seek"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("seek") & QScriptValue::QObjectMember)) { + return QNetworkReply::seek(pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pos))); + } +} + +void QtScriptShell_QNetworkReply::setReadBufferSize(qint64 size) +{ + QScriptValue _q_function = __qtscript_self.property("setReadBufferSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setReadBufferSize") & QScriptValue::QObjectMember)) { + QNetworkReply::setReadBufferSize(size); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, size)); + } +} + +void QtScriptShell_QNetworkReply::setSslConfigurationImplementation(const QSslConfiguration& arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("setSslConfigurationImplementation"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSslConfigurationImplementation") & QScriptValue::QObjectMember)) { + QNetworkReply::setSslConfigurationImplementation(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +qint64 QtScriptShell_QNetworkReply::size() const +{ + QScriptValue _q_function = __qtscript_self.property("size"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("size") & QScriptValue::QObjectMember)) { + return QNetworkReply::size(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QNetworkReply::sslConfigurationImplementation(QSslConfiguration& arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("sslConfigurationImplementation"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sslConfigurationImplementation") & QScriptValue::QObjectMember)) { + QNetworkReply::sslConfigurationImplementation(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QNetworkReply::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QNetworkReply::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QNetworkReply::waitForBytesWritten(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForBytesWritten"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForBytesWritten") & QScriptValue::QObjectMember)) { + return QNetworkReply::waitForBytesWritten(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QNetworkReply::waitForReadyRead(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForReadyRead"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForReadyRead") & QScriptValue::QObjectMember)) { + return QNetworkReply::waitForReadyRead(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +qint64 QtScriptShell_QNetworkReply::writeData(const char* data, qint64 len) +{ + QScriptValue _q_function = __qtscript_self.property("writeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("writeData") & QScriptValue::QObjectMember)) { + return QNetworkReply::writeData(data, len); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, len))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkReply.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkReply.h new file mode 100644 index 00000000..27fc3974 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QNetworkReply.h @@ -0,0 +1,46 @@ +#ifndef QTSCRIPTSHELL_QNETWORKREPLY_H +#define QTSCRIPTSHELL_QNETWORKREPLY_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QNetworkReply : public QNetworkReply +{ +public: + QtScriptShell_QNetworkReply(QObject* parent = 0); + ~QtScriptShell_QNetworkReply(); + + void abort(); + bool atEnd() const; + qint64 bytesAvailable() const; + qint64 bytesToWrite() const; + bool canReadLine() const; + void childEvent(QChildEvent* event); + void close(); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void ignoreSslErrors(); + void ignoreSslErrorsImplementation(const QList& arg__1); + bool isSequential() const; + bool open(QIODevice::OpenMode mode); + qint64 pos() const; + qint64 readData(char* data, qint64 maxlen); + qint64 readLineData(char* data, qint64 maxlen); + bool reset(); + bool seek(qint64 pos); + void setReadBufferSize(qint64 size); + void setSslConfigurationImplementation(const QSslConfiguration& arg__1); + qint64 size() const; + void sslConfigurationImplementation(QSslConfiguration& arg__1) const; + void timerEvent(QTimerEvent* event); + bool waitForBytesWritten(int msecs); + bool waitForReadyRead(int msecs); + qint64 writeData(const char* data, qint64 len); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QNETWORKREPLY_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QTcpServer.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QTcpServer.cpp new file mode 100644 index 00000000..e612d04c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QTcpServer.cpp @@ -0,0 +1,118 @@ +#include "qtscriptshell_QTcpServer.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTcpSocket*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QTcpServer::QtScriptShell_QTcpServer(QObject* parent) + : QTcpServer(parent) {} + +QtScriptShell_QTcpServer::~QtScriptShell_QTcpServer() {} + +void QtScriptShell_QTcpServer::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTcpServer::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTcpServer::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTcpServer::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTcpServer::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTcpServer::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTcpServer::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTcpServer::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTcpServer::hasPendingConnections() const +{ + QScriptValue _q_function = __qtscript_self.property("hasPendingConnections"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasPendingConnections") & QScriptValue::QObjectMember)) { + return QTcpServer::hasPendingConnections(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QTcpSocket* QtScriptShell_QTcpServer::nextPendingConnection() +{ + QScriptValue _q_function = __qtscript_self.property("nextPendingConnection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nextPendingConnection") & QScriptValue::QObjectMember)) { + return QTcpServer::nextPendingConnection(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTcpServer::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTcpServer::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QTcpServer.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QTcpServer.h new file mode 100644 index 00000000..9d206275 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QTcpServer.h @@ -0,0 +1,26 @@ +#ifndef QTSCRIPTSHELL_QTCPSERVER_H +#define QTSCRIPTSHELL_QTCPSERVER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTcpServer : public QTcpServer +{ +public: + QtScriptShell_QTcpServer(QObject* parent = 0); + ~QtScriptShell_QTcpServer(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + bool hasPendingConnections() const; + QTcpSocket* nextPendingConnection(); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTCPSERVER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QTcpSocket.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QTcpSocket.cpp new file mode 100644 index 00000000..b1356cdc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QTcpSocket.cpp @@ -0,0 +1,427 @@ +#include "qtscriptshell_QTcpSocket.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QHostAddress) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAbstractSocket::NetworkLayerProtocol) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(char*) +Q_DECLARE_METATYPE(QAbstractSocket::SocketOption) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(const char*) + +QtScriptShell_QTcpSocket::QtScriptShell_QTcpSocket(QObject* parent) + : QTcpSocket(parent) {} + +QtScriptShell_QTcpSocket::~QtScriptShell_QTcpSocket() {} + +bool QtScriptShell_QTcpSocket::atEnd() const +{ + QScriptValue _q_function = __qtscript_self.property("atEnd"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)) { + return QTcpSocket::atEnd(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QTcpSocket::bytesAvailable() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesAvailable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesAvailable") & QScriptValue::QObjectMember)) { + return QTcpSocket::bytesAvailable(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QTcpSocket::bytesToWrite() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesToWrite"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesToWrite") & QScriptValue::QObjectMember)) { + return QTcpSocket::bytesToWrite(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QTcpSocket::canReadLine() const +{ + QScriptValue _q_function = __qtscript_self.property("canReadLine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canReadLine") & QScriptValue::QObjectMember)) { + return QTcpSocket::canReadLine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTcpSocket::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTcpSocket::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTcpSocket::close() +{ + QScriptValue _q_function = __qtscript_self.property("close"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("close") & QScriptValue::QObjectMember)) { + QTcpSocket::close(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTcpSocket::connectToHost(const QHostAddress& address, unsigned short port, QIODevice::OpenMode mode) +{ + QScriptValue _q_function = __qtscript_self.property("connectToHost"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("connectToHost") & QScriptValue::QObjectMember)) { + QTcpSocket::connectToHost(address, port, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, address) + << qScriptValueFromValue(_q_engine, port) + << qScriptValueFromValue(_q_engine, mode)); + } +} + +void QtScriptShell_QTcpSocket::connectToHost(const QString& hostName, unsigned short port, QIODevice::OpenMode mode, QAbstractSocket::NetworkLayerProtocol protocol) +{ + QScriptValue _q_function = __qtscript_self.property("connectToHost"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("connectToHost") & QScriptValue::QObjectMember)) { + QTcpSocket::connectToHost(hostName, port, mode, protocol); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, hostName) + << qScriptValueFromValue(_q_engine, port) + << qScriptValueFromValue(_q_engine, mode) + << qScriptValueFromValue(_q_engine, protocol)); + } +} + +void QtScriptShell_QTcpSocket::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTcpSocket::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTcpSocket::disconnectFromHost() +{ + QScriptValue _q_function = __qtscript_self.property("disconnectFromHost"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("disconnectFromHost") & QScriptValue::QObjectMember)) { + QTcpSocket::disconnectFromHost(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QTcpSocket::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTcpSocket::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTcpSocket::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTcpSocket::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTcpSocket::isSequential() const +{ + QScriptValue _q_function = __qtscript_self.property("isSequential"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isSequential") & QScriptValue::QObjectMember)) { + return QTcpSocket::isSequential(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QTcpSocket::open(QIODevice::OpenMode mode) +{ + QScriptValue _q_function = __qtscript_self.property("open"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("open") & QScriptValue::QObjectMember)) { + return QTcpSocket::open(mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, mode))); + } +} + +qint64 QtScriptShell_QTcpSocket::pos() const +{ + QScriptValue _q_function = __qtscript_self.property("pos"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("pos") & QScriptValue::QObjectMember)) { + return QTcpSocket::pos(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QTcpSocket::readData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readData") & QScriptValue::QObjectMember)) { + return QTcpSocket::readData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +qint64 QtScriptShell_QTcpSocket::readLineData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readLineData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readLineData") & QScriptValue::QObjectMember)) { + return QTcpSocket::readLineData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +bool QtScriptShell_QTcpSocket::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + return QTcpSocket::reset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTcpSocket::resume() +{ + QScriptValue _q_function = __qtscript_self.property("resume"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resume") & QScriptValue::QObjectMember)) { + QTcpSocket::resume(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QTcpSocket::seek(qint64 pos) +{ + QScriptValue _q_function = __qtscript_self.property("seek"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("seek") & QScriptValue::QObjectMember)) { + return QTcpSocket::seek(pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pos))); + } +} + +void QtScriptShell_QTcpSocket::setReadBufferSize(qint64 size) +{ + QScriptValue _q_function = __qtscript_self.property("setReadBufferSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setReadBufferSize") & QScriptValue::QObjectMember)) { + QTcpSocket::setReadBufferSize(size); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, size)); + } +} + +void QtScriptShell_QTcpSocket::setSocketOption(QAbstractSocket::SocketOption option, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("setSocketOption"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSocketOption") & QScriptValue::QObjectMember)) { + QTcpSocket::setSocketOption(option, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, value)); + } +} + +qint64 QtScriptShell_QTcpSocket::size() const +{ + QScriptValue _q_function = __qtscript_self.property("size"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("size") & QScriptValue::QObjectMember)) { + return QTcpSocket::size(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QVariant QtScriptShell_QTcpSocket::socketOption(QAbstractSocket::SocketOption option) +{ + QScriptValue _q_function = __qtscript_self.property("socketOption"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("socketOption") & QScriptValue::QObjectMember)) { + return QTcpSocket::socketOption(option); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, option))); + } +} + +void QtScriptShell_QTcpSocket::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTcpSocket::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTcpSocket::waitForBytesWritten(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForBytesWritten"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForBytesWritten") & QScriptValue::QObjectMember)) { + return QTcpSocket::waitForBytesWritten(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QTcpSocket::waitForConnected(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForConnected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForConnected") & QScriptValue::QObjectMember)) { + return QTcpSocket::waitForConnected(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QTcpSocket::waitForDisconnected(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForDisconnected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForDisconnected") & QScriptValue::QObjectMember)) { + return QTcpSocket::waitForDisconnected(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QTcpSocket::waitForReadyRead(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForReadyRead"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForReadyRead") & QScriptValue::QObjectMember)) { + return QTcpSocket::waitForReadyRead(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +qint64 QtScriptShell_QTcpSocket::writeData(const char* data, qint64 len) +{ + QScriptValue _q_function = __qtscript_self.property("writeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("writeData") & QScriptValue::QObjectMember)) { + return QTcpSocket::writeData(data, len); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, len))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QTcpSocket.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QTcpSocket.h new file mode 100644 index 00000000..a266ab26 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QTcpSocket.h @@ -0,0 +1,49 @@ +#ifndef QTSCRIPTSHELL_QTCPSOCKET_H +#define QTSCRIPTSHELL_QTCPSOCKET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTcpSocket : public QTcpSocket +{ +public: + QtScriptShell_QTcpSocket(QObject* parent = 0); + ~QtScriptShell_QTcpSocket(); + + bool atEnd() const; + qint64 bytesAvailable() const; + qint64 bytesToWrite() const; + bool canReadLine() const; + void childEvent(QChildEvent* event); + void close(); + void connectToHost(const QHostAddress& address, unsigned short port, QIODevice::OpenMode mode); + void connectToHost(const QString& hostName, unsigned short port, QIODevice::OpenMode mode, QAbstractSocket::NetworkLayerProtocol protocol); + void customEvent(QEvent* event); + void disconnectFromHost(); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + bool isSequential() const; + bool open(QIODevice::OpenMode mode); + qint64 pos() const; + qint64 readData(char* data, qint64 maxlen); + qint64 readLineData(char* data, qint64 maxlen); + bool reset(); + void resume(); + bool seek(qint64 pos); + void setReadBufferSize(qint64 size); + void setSocketOption(QAbstractSocket::SocketOption option, const QVariant& value); + qint64 size() const; + QVariant socketOption(QAbstractSocket::SocketOption option); + void timerEvent(QTimerEvent* event); + bool waitForBytesWritten(int msecs); + bool waitForConnected(int msecs); + bool waitForDisconnected(int msecs); + bool waitForReadyRead(int msecs); + qint64 writeData(const char* data, qint64 len); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTCPSOCKET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QUdpSocket.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QUdpSocket.cpp new file mode 100644 index 00000000..9f25134e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QUdpSocket.cpp @@ -0,0 +1,428 @@ +#include "qtscriptshell_QUdpSocket.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QHostAddress) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAbstractSocket::NetworkLayerProtocol) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(char*) +Q_DECLARE_METATYPE(QAbstractSocket::SocketOption) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(const char*) + +QtScriptShell_QUdpSocket::QtScriptShell_QUdpSocket(QObject* parent) + : QUdpSocket(parent) {} + +QtScriptShell_QUdpSocket::~QtScriptShell_QUdpSocket() {} + +bool QtScriptShell_QUdpSocket::atEnd() const +{ + QScriptValue _q_function = __qtscript_self.property("atEnd"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("atEnd") & QScriptValue::QObjectMember)) { + return QUdpSocket::atEnd(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QUdpSocket::bytesAvailable() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesAvailable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesAvailable") & QScriptValue::QObjectMember)) { + return QUdpSocket::bytesAvailable(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QUdpSocket::bytesToWrite() const +{ + QScriptValue _q_function = __qtscript_self.property("bytesToWrite"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bytesToWrite") & QScriptValue::QObjectMember)) { + return QUdpSocket::bytesToWrite(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QUdpSocket::canReadLine() const +{ + QScriptValue _q_function = __qtscript_self.property("canReadLine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canReadLine") & QScriptValue::QObjectMember)) { + return QUdpSocket::canReadLine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QUdpSocket::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QUdpSocket::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QUdpSocket::close() +{ + QScriptValue _q_function = __qtscript_self.property("close"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("close") & QScriptValue::QObjectMember)) { + QUdpSocket::close(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QUdpSocket::connectToHost(const QHostAddress& address, unsigned short port, QIODevice::OpenMode mode) +{ + QScriptValue _q_function = __qtscript_self.property("connectToHost"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("connectToHost") & QScriptValue::QObjectMember)) { + QUdpSocket::connectToHost(address, port, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, address) + << qScriptValueFromValue(_q_engine, port) + << qScriptValueFromValue(_q_engine, mode)); + } +} + +void QtScriptShell_QUdpSocket::connectToHost(const QString& hostName, unsigned short port, QIODevice::OpenMode mode, QAbstractSocket::NetworkLayerProtocol protocol) +{ + QScriptValue _q_function = __qtscript_self.property("connectToHost"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("connectToHost") & QScriptValue::QObjectMember)) { + QUdpSocket::connectToHost(hostName, port, mode, protocol); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, hostName) + << qScriptValueFromValue(_q_engine, port) + << qScriptValueFromValue(_q_engine, mode) + << qScriptValueFromValue(_q_engine, protocol)); + } +} + +void QtScriptShell_QUdpSocket::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QUdpSocket::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QUdpSocket::disconnectFromHost() +{ + QScriptValue _q_function = __qtscript_self.property("disconnectFromHost"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("disconnectFromHost") & QScriptValue::QObjectMember)) { + QUdpSocket::disconnectFromHost(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QUdpSocket::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QUdpSocket::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QUdpSocket::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QUdpSocket::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QUdpSocket::isSequential() const +{ + QScriptValue _q_function = __qtscript_self.property("isSequential"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isSequential") & QScriptValue::QObjectMember)) { + return QUdpSocket::isSequential(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QUdpSocket::open(QIODevice::OpenMode mode) +{ + QScriptValue _q_function = __qtscript_self.property("open"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("open") & QScriptValue::QObjectMember)) { + return QUdpSocket::open(mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, mode))); + } +} + +qint64 QtScriptShell_QUdpSocket::pos() const +{ + QScriptValue _q_function = __qtscript_self.property("pos"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("pos") & QScriptValue::QObjectMember)) { + return QUdpSocket::pos(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +qint64 QtScriptShell_QUdpSocket::readData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readData") & QScriptValue::QObjectMember)) { + return QUdpSocket::readData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +qint64 QtScriptShell_QUdpSocket::readLineData(char* data, qint64 maxlen) +{ + QScriptValue _q_function = __qtscript_self.property("readLineData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("readLineData") & QScriptValue::QObjectMember)) { + return QUdpSocket::readLineData(data, maxlen); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, maxlen))); + } +} + +bool QtScriptShell_QUdpSocket::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + return QUdpSocket::reset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QUdpSocket::resume() +{ + QScriptValue _q_function = __qtscript_self.property("resume"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resume") & QScriptValue::QObjectMember)) { + QUdpSocket::resume(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QUdpSocket::seek(qint64 pos) +{ + QScriptValue _q_function = __qtscript_self.property("seek"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("seek") & QScriptValue::QObjectMember)) { + return QUdpSocket::seek(pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pos))); + } +} + +void QtScriptShell_QUdpSocket::setReadBufferSize(qint64 size) +{ + QScriptValue _q_function = __qtscript_self.property("setReadBufferSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setReadBufferSize") & QScriptValue::QObjectMember)) { + QUdpSocket::setReadBufferSize(size); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, size)); + } +} + +void QtScriptShell_QUdpSocket::setSocketOption(QAbstractSocket::SocketOption option, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("setSocketOption"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSocketOption") & QScriptValue::QObjectMember)) { + QUdpSocket::setSocketOption(option, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, value)); + } +} + +qint64 QtScriptShell_QUdpSocket::size() const +{ + QScriptValue _q_function = __qtscript_self.property("size"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("size") & QScriptValue::QObjectMember)) { + return QUdpSocket::size(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QVariant QtScriptShell_QUdpSocket::socketOption(QAbstractSocket::SocketOption option) +{ + QScriptValue _q_function = __qtscript_self.property("socketOption"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("socketOption") & QScriptValue::QObjectMember)) { + return QUdpSocket::socketOption(option); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, option))); + } +} + +void QtScriptShell_QUdpSocket::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QUdpSocket::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QUdpSocket::waitForBytesWritten(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForBytesWritten"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForBytesWritten") & QScriptValue::QObjectMember)) { + return QUdpSocket::waitForBytesWritten(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QUdpSocket::waitForConnected(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForConnected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForConnected") & QScriptValue::QObjectMember)) { + return QUdpSocket::waitForConnected(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QUdpSocket::waitForDisconnected(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForDisconnected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForDisconnected") & QScriptValue::QObjectMember)) { + return QUdpSocket::waitForDisconnected(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +bool QtScriptShell_QUdpSocket::waitForReadyRead(int msecs) +{ + QScriptValue _q_function = __qtscript_self.property("waitForReadyRead"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("waitForReadyRead") & QScriptValue::QObjectMember)) { + return QUdpSocket::waitForReadyRead(msecs); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, msecs))); + } +} + +qint64 QtScriptShell_QUdpSocket::writeData(const char* data, qint64 len) +{ + QScriptValue _q_function = __qtscript_self.property("writeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("writeData") & QScriptValue::QObjectMember)) { + return QUdpSocket::writeData(data, len); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, len))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QUdpSocket.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QUdpSocket.h new file mode 100644 index 00000000..21a58614 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_network/qtscriptshell_QUdpSocket.h @@ -0,0 +1,49 @@ +#ifndef QTSCRIPTSHELL_QUDPSOCKET_H +#define QTSCRIPTSHELL_QUDPSOCKET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QUdpSocket : public QUdpSocket +{ +public: + QtScriptShell_QUdpSocket(QObject* parent = 0); + ~QtScriptShell_QUdpSocket(); + + bool atEnd() const; + qint64 bytesAvailable() const; + qint64 bytesToWrite() const; + bool canReadLine() const; + void childEvent(QChildEvent* event); + void close(); + void connectToHost(const QHostAddress& address, unsigned short port, QIODevice::OpenMode mode); + void connectToHost(const QString& hostName, unsigned short port, QIODevice::OpenMode mode, QAbstractSocket::NetworkLayerProtocol protocol); + void customEvent(QEvent* event); + void disconnectFromHost(); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + bool isSequential() const; + bool open(QIODevice::OpenMode mode); + qint64 pos() const; + qint64 readData(char* data, qint64 maxlen); + qint64 readLineData(char* data, qint64 maxlen); + bool reset(); + void resume(); + bool seek(qint64 pos); + void setReadBufferSize(qint64 size); + void setSocketOption(QAbstractSocket::SocketOption option, const QVariant& value); + qint64 size() const; + QVariant socketOption(QAbstractSocket::SocketOption option); + void timerEvent(QTimerEvent* event); + bool waitForBytesWritten(int msecs); + bool waitForConnected(int msecs); + bool waitForDisconnected(int msecs); + bool waitForReadyRead(int msecs); + qint64 writeData(const char* data, qint64 len); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QUDPSOCKET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/com_trolltech_qt_opengl.pri b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/com_trolltech_qt_opengl.pri new file mode 100644 index 00000000..315d02a6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/com_trolltech_qt_opengl.pri @@ -0,0 +1,26 @@ +HEADERS += \ + $$PWD/qtscriptshell_QGLColormap.h \ + $$PWD/qtscriptshell_QGLContext.h \ + $$PWD/qtscriptshell_QGLFramebufferObject.h \ + $$PWD/qtscriptshell_QGLPixelBuffer.h \ + $$PWD/qtscriptshell_QGLShader.h \ + $$PWD/qtscriptshell_QGLShaderProgram.h \ + $$PWD/qtscriptshell_QGLWidget.h \ + +SOURCES += \ + $$PWD/qtscript_QGLColormap.cpp \ + $$PWD/qtscript_QGLContext.cpp \ + $$PWD/qtscript_QGLFramebufferObject.cpp \ + $$PWD/qtscript_QGLFramebufferObjectFormat.cpp \ + $$PWD/qtscript_QGLPixelBuffer.cpp \ + $$PWD/qtscript_QGLShader.cpp \ + $$PWD/qtscript_QGLShaderProgram.cpp \ + $$PWD/qtscript_QGLWidget.cpp \ + $$PWD/qtscriptshell_QGLColormap.cpp \ + $$PWD/qtscriptshell_QGLContext.cpp \ + $$PWD/qtscriptshell_QGLFramebufferObject.cpp \ + $$PWD/qtscriptshell_QGLPixelBuffer.cpp \ + $$PWD/qtscriptshell_QGLShader.cpp \ + $$PWD/qtscriptshell_QGLShaderProgram.cpp \ + $$PWD/qtscriptshell_QGLWidget.cpp \ + $$PWD/com_trolltech_qt_opengl_init.cpp diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/com_trolltech_qt_opengl_init.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/com_trolltech_qt_opengl_init.cpp new file mode 100644 index 00000000..bbb32b0f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/com_trolltech_qt_opengl_init.cpp @@ -0,0 +1,44 @@ +#include +#include + +QScriptValue qtscript_create_QGLColormap_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGLFramebufferObjectFormat_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGLContext_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGLPixelBuffer_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGLShaderProgram_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGLShader_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGLFramebufferObject_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGLWidget_class(QScriptEngine *engine); + +static const char * const qtscript_com_trolltech_qt_opengl_class_names[] = { + "QGLColormap" + , "QGLFramebufferObjectFormat" + , "QGLContext" + , "QGLPixelBuffer" + , "QGLShaderProgram" + , "QGLShader" + , "QGLFramebufferObject" + , "QGLWidget" +}; + +typedef QScriptValue (*QtBindingCreator)(QScriptEngine *engine); +static const QtBindingCreator qtscript_com_trolltech_qt_opengl_class_functions[] = { + qtscript_create_QGLColormap_class + , qtscript_create_QGLFramebufferObjectFormat_class + , qtscript_create_QGLContext_class + , qtscript_create_QGLPixelBuffer_class + , qtscript_create_QGLShaderProgram_class + , qtscript_create_QGLShader_class + , qtscript_create_QGLFramebufferObject_class + , qtscript_create_QGLWidget_class +}; + +void qtscript_initialize_com_trolltech_qt_opengl_bindings(QScriptValue &extensionObject) +{ + QScriptEngine *engine = extensionObject.engine(); + for (int i = 0; i < 8; ++i) { + extensionObject.setProperty(qtscript_com_trolltech_qt_opengl_class_names[i], + qtscript_com_trolltech_qt_opengl_class_functions[i](engine), + QScriptValue::SkipInEnumeration); + } +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLColormap.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLColormap.cpp new file mode 100644 index 00000000..0a904e14 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLColormap.cpp @@ -0,0 +1,247 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QGLColormap.h" + +static const char * const qtscript_QGLColormap_function_names[] = { + "QGLColormap" + // static + // prototype + , "entryColor" + , "entryRgb" + , "find" + , "findNearest" + , "isEmpty" + , "setEntries" + , "setEntry" + , "size" + , "toString" +}; + +static const char * const qtscript_QGLColormap_function_signatures[] = { + "\nQGLColormap arg__1" + // static + // prototype + , "int idx" + , "int idx" + , "unsigned int color" + , "unsigned int color" + , "" + , "int count, unsigned int colors, int base" + , "int idx, QColor color\nint idx, unsigned int color" + , "" +"" +}; + +static const int qtscript_QGLColormap_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 1 + , 1 + , 1 + , 0 + , 3 + , 2 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGLColormap_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGLColormap::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGLColormap) +Q_DECLARE_METATYPE(QGLColormap*) +Q_DECLARE_METATYPE(QtScriptShell_QGLColormap) +Q_DECLARE_METATYPE(QtScriptShell_QGLColormap*) +Q_DECLARE_METATYPE(const unsigned int*) + +// +// QGLColormap +// + +static QScriptValue qtscript_QGLColormap_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGLColormap* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGLColormap.%0(): this object is not a QGLColormap") + .arg(qtscript_QGLColormap_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QColor _q_result = _q_self->entryColor(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + unsigned int _q_result = _q_self->entryRgb(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + int _q_result = _q_self->find(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + int _q_result = _q_self->findNearest(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + const uint* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setEntries(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + const uint* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setEntries(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 2) { + if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QColor _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setEntry(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + uint _q_arg1 = context->argument(1).toUInt32(); + _q_self->setEntry(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->size(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: { + QString result = QString::fromLatin1("QGLColormap"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGLColormap_throw_ambiguity_error_helper(context, + qtscript_QGLColormap_function_names[_id+1], + qtscript_QGLColormap_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGLColormap_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGLColormap(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGLColormap _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLColormap)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QGLColormap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGLColormap _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLColormap)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGLColormap_throw_ambiguity_error_helper(context, + qtscript_QGLColormap_function_names[_id], + qtscript_QGLColormap_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGLColormap_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGLColormap*)0)); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGLColormap_prototype_call, qtscript_QGLColormap_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGLColormap_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGLColormap_static_call, proto, qtscript_QGLColormap_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLContext.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLContext.cpp new file mode 100644 index 00000000..19dbcfeb --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLContext.cpp @@ -0,0 +1,666 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGLContext.h" + +static const char * const qtscript_QGLContext_function_names[] = { + "QGLContext" + // static + , "areSharing" + , "currentContext" + , "setTextureCacheLimit" + , "textureCacheLimit" + // prototype + , "bindTexture" + , "create" + , "deleteTexture" + , "device" + , "doneCurrent" + , "drawTexture" + , "format" + , "isSharing" + , "isValid" + , "makeCurrent" + , "moveToThread" + , "overlayTransparentColor" + , "requestedFormat" + , "reset" + , "setFormat" + , "swapBuffers" + , "toString" +}; + +static const char * const qtscript_QGLContext_function_signatures[] = { + "QGLFormat format\nQGLFormat format, QPaintDevice device" + // static + , "QGLContext context1, QGLContext context2" + , "" + , "int size" + , "" + // prototype + , "QImage image, unsigned int target, int format\nQImage image, unsigned int target, int format, BindOptions options\nQPixmap pixmap, unsigned int target, int format\nQPixmap pixmap, unsigned int target, int format, BindOptions options\nString fileName" + , "QGLContext shareContext" + , "unsigned int tx_id" + , "" + , "" + , "QPointF point, unsigned int textureId, unsigned int textureTarget\nQRectF target, unsigned int textureId, unsigned int textureTarget" + , "" + , "" + , "" + , "" + , "Thread thread" + , "" + , "" + , "" + , "QGLFormat format" + , "" +"" +}; + +static const int qtscript_QGLContext_function_lengths[] = { + 2 + // static + , 2 + , 0 + , 1 + , 0 + // prototype + , 4 + , 1 + , 1 + , 0 + , 0 + , 3 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGLContext_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGLContext::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGLContext*) +Q_DECLARE_METATYPE(QtScriptShell_QGLContext*) +Q_DECLARE_METATYPE(QGLContext::BindOption) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(const QGLContext*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QGLFormat) +Q_DECLARE_METATYPE(QThread*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QGLContext::BindOption +// + +static const QGLContext::BindOption qtscript_QGLContext_BindOption_values[] = { + QGLContext::NoBindOption + , QGLContext::InvertedYBindOption + , QGLContext::MipmapBindOption + , QGLContext::PremultipliedAlphaBindOption + , QGLContext::LinearFilteringBindOption + , QGLContext::DefaultBindOption + , QGLContext::MemoryManagedBindOption + , QGLContext::InternalBindOption + , QGLContext::CanFlipNativePixmapBindOption + , QGLContext::TemporarilyCachedBindOption +}; + +static const char * const qtscript_QGLContext_BindOption_keys[] = { + "NoBindOption" + , "InvertedYBindOption" + , "MipmapBindOption" + , "PremultipliedAlphaBindOption" + , "LinearFilteringBindOption" + , "DefaultBindOption" + , "MemoryManagedBindOption" + , "InternalBindOption" + , "CanFlipNativePixmapBindOption" + , "TemporarilyCachedBindOption" +}; + +static QString qtscript_QGLContext_BindOption_toStringHelper(QGLContext::BindOption value) +{ + for (int i = 0; i < 10; ++i) { + if (qtscript_QGLContext_BindOption_values[i] == value) + return QString::fromLatin1(qtscript_QGLContext_BindOption_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QGLContext_BindOption_toScriptValue(QScriptEngine *engine, const QGLContext::BindOption &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGLContext")); + return clazz.property(qtscript_QGLContext_BindOption_toStringHelper(value)); +} + +static void qtscript_QGLContext_BindOption_fromScriptValue(const QScriptValue &value, QGLContext::BindOption &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGLContext_BindOption(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 10; ++i) { + if (qtscript_QGLContext_BindOption_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("BindOption(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGLContext_BindOption_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGLContext::BindOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGLContext_BindOption_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGLContext::BindOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGLContext_BindOption_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGLContext_BindOption_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGLContext_BindOption, + qtscript_QGLContext_BindOption_valueOf, qtscript_QGLContext_BindOption_toString); + qScriptRegisterMetaType(engine, qtscript_QGLContext_BindOption_toScriptValue, + qtscript_QGLContext_BindOption_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 10; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGLContext_BindOption_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGLContext_BindOption_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGLContext::BindOptions +// + +static QScriptValue qtscript_QGLContext_BindOptions_toScriptValue(QScriptEngine *engine, const QGLContext::BindOptions &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QGLContext_BindOptions_fromScriptValue(const QScriptValue &value, QGLContext::BindOptions &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QGLContext_BindOptions(QScriptContext *context, QScriptEngine *engine) +{ + QGLContext::BindOptions result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("BindOptions(): argument %0 is not of type BindOption").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QGLContext_BindOptions_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGLContext::BindOptions value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGLContext_BindOptions_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGLContext::BindOptions value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 10; ++i) { + if ((value & qtscript_QGLContext_BindOption_values[i]) == qtscript_QGLContext_BindOption_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QGLContext_BindOption_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QGLContext_BindOptions_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QGLContext_BindOptions_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QGLContext_BindOptions, qtscript_QGLContext_BindOptions_valueOf, + qtscript_QGLContext_BindOptions_toString, qtscript_QGLContext_BindOptions_equals); + qScriptRegisterMetaType(engine, qtscript_QGLContext_BindOptions_toScriptValue, + qtscript_QGLContext_BindOptions_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QGLContext +// + +static QScriptValue qtscript_QGLContext_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 16; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGLContext* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGLContext.%0(): this object is not a QGLContext") + .arg(qtscript_QGLContext_function_names[_id+5])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + unsigned int _q_result = _q_self->bindTexture(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + unsigned int _q_result = _q_self->bindTexture(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + unsigned int _q_result = _q_self->bindTexture(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + unsigned int _q_result = _q_self->bindTexture(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + unsigned int _q_result = _q_self->bindTexture(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + int _q_arg2 = context->argument(2).toInt32(); + unsigned int _q_result = _q_self->bindTexture(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + int _q_arg2 = context->argument(2).toInt32(); + unsigned int _q_result = _q_self->bindTexture(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 4) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && (qMetaTypeId >() == context->argument(3).toVariant().userType())) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + unsigned int _q_result = _q_self->bindTexture(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && (qMetaTypeId >() == context->argument(3).toVariant().userType())) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + unsigned int _q_result = _q_self->bindTexture(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->create(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + const QGLContext* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->create(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + _q_self->deleteTexture(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QPaintDevice* _q_result = _q_self->device(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + _q_self->doneCurrent(); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + _q_self->drawTexture(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + _q_self->drawTexture(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + uint _q_arg2 = context->argument(2).toUInt32(); + _q_self->drawTexture(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + uint _q_arg2 = context->argument(2).toUInt32(); + _q_self->drawTexture(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + break; + + case 6: + if (context->argumentCount() == 0) { + QGLFormat _q_result = _q_self->format(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isSharing(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + _q_self->makeCurrent(); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QThread* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveToThread(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QColor _q_result = _q_self->overlayTransparentColor(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QGLFormat _q_result = _q_self->requestedFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + _q_self->reset(); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QGLFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 0) { + _q_self->swapBuffers(); + return context->engine()->undefinedValue(); + } + break; + + case 16: { + QString result = QString::fromLatin1("QGLContext"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGLContext_throw_ambiguity_error_helper(context, + qtscript_QGLContext_function_names[_id+5], + qtscript_QGLContext_function_signatures[_id+5]); +} + +static QScriptValue qtscript_QGLContext_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGLContext(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QGLFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGLContext* _q_cpp_result = new QtScriptShell_QGLContext(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLContext*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QGLFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPaintDevice* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGLContext* _q_cpp_result = new QtScriptShell_QGLContext(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLContext*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + const QGLContext* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QGLContext* _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = QGLContext::areSharing(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + const QGLContext* _q_result = const_cast(QGLContext::currentContext()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QGLContext::setTextureCacheLimit(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = QGLContext::textureCacheLimit(); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGLContext_throw_ambiguity_error_helper(context, + qtscript_QGLContext_function_names[_id], + qtscript_QGLContext_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGLContext_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGLContext*)0)); + for (int i = 0; i < 17; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGLContext_prototype_call, qtscript_QGLContext_function_lengths[i+5]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGLContext_function_names[i+5]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGLContext_static_call, proto, qtscript_QGLContext_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGLContext_static_call, + qtscript_QGLContext_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QGLContext_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("BindOption"), + qtscript_create_QGLContext_BindOption_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("BindOptions"), + qtscript_create_QGLContext_BindOptions_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLFramebufferObject.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLFramebufferObject.cpp new file mode 100644 index 00000000..329e05a7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLFramebufferObject.cpp @@ -0,0 +1,551 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGLFramebufferObject.h" + +static const char * const qtscript_QGLFramebufferObject_function_names[] = { + "QGLFramebufferObject" + // static + , "bindDefault" + , "blitFramebuffer" + , "hasOpenGLFramebufferBlit" + , "hasOpenGLFramebufferObjects" + // prototype + , "attachment" + , "bind" + , "drawTexture" + , "format" + , "handle" + , "isBound" + , "isValid" + , "release" + , "size" + , "texture" + , "toImage" + , "toString" +}; + +static const char * const qtscript_QGLFramebufferObject_function_signatures[] = { + "QSize size, Attachment attachment, unsigned int target, unsigned int internal_format\nQSize size, QGLFramebufferObjectFormat format\nQSize size, unsigned int target\nint width, int height, Attachment attachment, unsigned int target, unsigned int internal_format\nint width, int height, QGLFramebufferObjectFormat format\nint width, int height, unsigned int target" + // static + , "" + , "QGLFramebufferObject target, QRect targetRect, QGLFramebufferObject source, QRect sourceRect, unsigned int buffers, unsigned int filter" + , "" + , "" + // prototype + , "" + , "" + , "QPointF point, unsigned int textureId, unsigned int textureTarget\nQRectF target, unsigned int textureId, unsigned int textureTarget" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QGLFramebufferObject_function_lengths[] = { + 5 + // static + , 0 + , 6 + , 0 + , 0 + // prototype + , 0 + , 0 + , 3 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGLFramebufferObject_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGLFramebufferObject::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGLFramebufferObject*) +Q_DECLARE_METATYPE(QtScriptShell_QGLFramebufferObject*) +Q_DECLARE_METATYPE(QGLFramebufferObject::Attachment) +Q_DECLARE_METATYPE(QGLFramebufferObjectFormat) +Q_DECLARE_METATYPE(QPaintDevice*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QGLFramebufferObject::Attachment +// + +static const QGLFramebufferObject::Attachment qtscript_QGLFramebufferObject_Attachment_values[] = { + QGLFramebufferObject::NoAttachment + , QGLFramebufferObject::CombinedDepthStencil + , QGLFramebufferObject::Depth +}; + +static const char * const qtscript_QGLFramebufferObject_Attachment_keys[] = { + "NoAttachment" + , "CombinedDepthStencil" + , "Depth" +}; + +static QString qtscript_QGLFramebufferObject_Attachment_toStringHelper(QGLFramebufferObject::Attachment value) +{ + if ((value >= QGLFramebufferObject::NoAttachment) && (value <= QGLFramebufferObject::Depth)) + return qtscript_QGLFramebufferObject_Attachment_keys[static_cast(value)-static_cast(QGLFramebufferObject::NoAttachment)]; + return QString(); +} + +static QScriptValue qtscript_QGLFramebufferObject_Attachment_toScriptValue(QScriptEngine *engine, const QGLFramebufferObject::Attachment &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGLFramebufferObject")); + return clazz.property(qtscript_QGLFramebufferObject_Attachment_toStringHelper(value)); +} + +static void qtscript_QGLFramebufferObject_Attachment_fromScriptValue(const QScriptValue &value, QGLFramebufferObject::Attachment &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGLFramebufferObject_Attachment(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QGLFramebufferObject::NoAttachment) && (arg <= QGLFramebufferObject::Depth)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Attachment(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGLFramebufferObject_Attachment_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGLFramebufferObject::Attachment value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGLFramebufferObject_Attachment_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGLFramebufferObject::Attachment value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGLFramebufferObject_Attachment_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGLFramebufferObject_Attachment_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGLFramebufferObject_Attachment, + qtscript_QGLFramebufferObject_Attachment_valueOf, qtscript_QGLFramebufferObject_Attachment_toString); + qScriptRegisterMetaType(engine, qtscript_QGLFramebufferObject_Attachment_toScriptValue, + qtscript_QGLFramebufferObject_Attachment_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGLFramebufferObject_Attachment_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGLFramebufferObject_Attachment_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGLFramebufferObject +// + +static QScriptValue qtscript_QGLFramebufferObject_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 11; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGLFramebufferObject* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGLFramebufferObject.%0(): this object is not a QGLFramebufferObject") + .arg(qtscript_QGLFramebufferObject_function_names[_id+5])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QGLFramebufferObject::Attachment _q_result = _q_self->attachment(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->bind(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + _q_self->drawTexture(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + _q_self->drawTexture(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + uint _q_arg2 = context->argument(2).toUInt32(); + _q_self->drawTexture(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + uint _q_arg2 = context->argument(2).toUInt32(); + _q_self->drawTexture(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + break; + + case 3: + if (context->argumentCount() == 0) { + QGLFramebufferObjectFormat _q_result = _q_self->format(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + unsigned int _q_result = _q_self->handle(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isBound(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->release(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->size(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + unsigned int _q_result = _q_self->texture(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QImage _q_result = _q_self->toImage(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: { + QString result = QString::fromLatin1("QGLFramebufferObject"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGLFramebufferObject_throw_ambiguity_error_helper(context, + qtscript_QGLFramebufferObject_function_names[_id+5], + qtscript_QGLFramebufferObject_function_signatures[_id+5]); +} + +static QScriptValue qtscript_QGLFramebufferObject_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGLFramebufferObject(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGLFramebufferObject* _q_cpp_result = new QtScriptShell_QGLFramebufferObject(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLFramebufferObject*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGLFramebufferObject::Attachment _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGLFramebufferObject* _q_cpp_result = new QtScriptShell_QGLFramebufferObject(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLFramebufferObject*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGLFramebufferObjectFormat _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGLFramebufferObject* _q_cpp_result = new QtScriptShell_QGLFramebufferObject(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLFramebufferObject*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + QtScriptShell_QGLFramebufferObject* _q_cpp_result = new QtScriptShell_QGLFramebufferObject(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLFramebufferObject*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QGLFramebufferObject* _q_cpp_result = new QtScriptShell_QGLFramebufferObject(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLFramebufferObject*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && context->argument(2).isNumber()) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGLFramebufferObject::Attachment _q_arg1 = qscriptvalue_cast(context->argument(1)); + uint _q_arg2 = context->argument(2).toUInt32(); + QtScriptShell_QGLFramebufferObject* _q_cpp_result = new QtScriptShell_QGLFramebufferObject(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLFramebufferObject*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QGLFramebufferObject::Attachment _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QGLFramebufferObject* _q_cpp_result = new QtScriptShell_QGLFramebufferObject(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLFramebufferObject*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QGLFramebufferObjectFormat _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QGLFramebufferObject* _q_cpp_result = new QtScriptShell_QGLFramebufferObject(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLFramebufferObject*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + uint _q_arg2 = context->argument(2).toUInt32(); + QtScriptShell_QGLFramebufferObject* _q_cpp_result = new QtScriptShell_QGLFramebufferObject(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLFramebufferObject*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 4) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && context->argument(2).isNumber() + && context->argument(3).isNumber()) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGLFramebufferObject::Attachment _q_arg1 = qscriptvalue_cast(context->argument(1)); + uint _q_arg2 = context->argument(2).toUInt32(); + uint _q_arg3 = context->argument(3).toUInt32(); + QtScriptShell_QGLFramebufferObject* _q_cpp_result = new QtScriptShell_QGLFramebufferObject(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLFramebufferObject*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && (qMetaTypeId() == context->argument(2).toVariant().userType()) + && context->argument(3).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QGLFramebufferObject::Attachment _q_arg2 = qscriptvalue_cast(context->argument(2)); + uint _q_arg3 = context->argument(3).toUInt32(); + QtScriptShell_QGLFramebufferObject* _q_cpp_result = new QtScriptShell_QGLFramebufferObject(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLFramebufferObject*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 5) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QGLFramebufferObject::Attachment _q_arg2 = qscriptvalue_cast(context->argument(2)); + uint _q_arg3 = context->argument(3).toUInt32(); + uint _q_arg4 = context->argument(4).toUInt32(); + QtScriptShell_QGLFramebufferObject* _q_cpp_result = new QtScriptShell_QGLFramebufferObject(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLFramebufferObject*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = QGLFramebufferObject::bindDefault(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 4) { + QGLFramebufferObject* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_arg1 = qscriptvalue_cast(context->argument(1)); + QGLFramebufferObject* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QRect _q_arg3 = qscriptvalue_cast(context->argument(3)); + QGLFramebufferObject::blitFramebuffer(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + QGLFramebufferObject* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_arg1 = qscriptvalue_cast(context->argument(1)); + QGLFramebufferObject* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QRect _q_arg3 = qscriptvalue_cast(context->argument(3)); + uint _q_arg4 = context->argument(4).toUInt32(); + QGLFramebufferObject::blitFramebuffer(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + QGLFramebufferObject* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_arg1 = qscriptvalue_cast(context->argument(1)); + QGLFramebufferObject* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QRect _q_arg3 = qscriptvalue_cast(context->argument(3)); + uint _q_arg4 = context->argument(4).toUInt32(); + uint _q_arg5 = context->argument(5).toUInt32(); + QGLFramebufferObject::blitFramebuffer(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = QGLFramebufferObject::hasOpenGLFramebufferBlit(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = QGLFramebufferObject::hasOpenGLFramebufferObjects(); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGLFramebufferObject_throw_ambiguity_error_helper(context, + qtscript_QGLFramebufferObject_function_names[_id], + qtscript_QGLFramebufferObject_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGLFramebufferObject_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGLFramebufferObject*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 12; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGLFramebufferObject_prototype_call, qtscript_QGLFramebufferObject_function_lengths[i+5]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGLFramebufferObject_function_names[i+5]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGLFramebufferObject_static_call, proto, qtscript_QGLFramebufferObject_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGLFramebufferObject_static_call, + qtscript_QGLFramebufferObject_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QGLFramebufferObject_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("Attachment"), + qtscript_create_QGLFramebufferObject_Attachment_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLFramebufferObjectFormat.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLFramebufferObjectFormat.cpp new file mode 100644 index 00000000..0722ec6c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLFramebufferObjectFormat.cpp @@ -0,0 +1,263 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QGLFramebufferObjectFormat_function_names[] = { + "QGLFramebufferObjectFormat" + // static + // prototype + , "attachment" + , "internalTextureFormat" + , "mipmap" + , "operator_assign" + , "equals" + , "samples" + , "setAttachment" + , "setInternalTextureFormat" + , "setMipmap" + , "setSamples" + , "setTextureTarget" + , "textureTarget" + , "toString" +}; + +static const char * const qtscript_QGLFramebufferObjectFormat_function_signatures[] = { + "\nQGLFramebufferObjectFormat other" + // static + // prototype + , "" + , "" + , "" + , "QGLFramebufferObjectFormat other" + , "QGLFramebufferObjectFormat other" + , "" + , "Attachment attachment" + , "unsigned int internalTextureFormat" + , "bool enabled" + , "int samples" + , "unsigned int target" + , "" +"" +}; + +static const int qtscript_QGLFramebufferObjectFormat_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGLFramebufferObjectFormat_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGLFramebufferObjectFormat::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGLFramebufferObjectFormat) +Q_DECLARE_METATYPE(QGLFramebufferObjectFormat*) +Q_DECLARE_METATYPE(QGLFramebufferObject::Attachment) + +// +// QGLFramebufferObjectFormat +// + +static QScriptValue qtscript_QGLFramebufferObjectFormat_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 12; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGLFramebufferObjectFormat* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGLFramebufferObjectFormat.%0(): this object is not a QGLFramebufferObjectFormat") + .arg(qtscript_QGLFramebufferObjectFormat_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QGLFramebufferObject::Attachment _q_result = _q_self->attachment(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + unsigned int _q_result = _q_self->internalTextureFormat(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->mipmap(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QGLFramebufferObjectFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGLFramebufferObjectFormat& _q_result = _q_self->operator=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QGLFramebufferObjectFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->samples(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QGLFramebufferObject::Attachment _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setAttachment(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + _q_self->setInternalTextureFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setMipmap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setSamples(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + _q_self->setTextureTarget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + unsigned int _q_result = _q_self->textureTarget(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: { + QString result = QString::fromLatin1("QGLFramebufferObjectFormat"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGLFramebufferObjectFormat_throw_ambiguity_error_helper(context, + qtscript_QGLFramebufferObjectFormat_function_names[_id+1], + qtscript_QGLFramebufferObjectFormat_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGLFramebufferObjectFormat_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGLFramebufferObjectFormat(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QGLFramebufferObjectFormat _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QGLFramebufferObjectFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGLFramebufferObjectFormat _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGLFramebufferObjectFormat_throw_ambiguity_error_helper(context, + qtscript_QGLFramebufferObjectFormat_function_names[_id], + qtscript_QGLFramebufferObjectFormat_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGLFramebufferObjectFormat_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGLFramebufferObjectFormat*)0)); + for (int i = 0; i < 13; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGLFramebufferObjectFormat_prototype_call, qtscript_QGLFramebufferObjectFormat_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGLFramebufferObjectFormat_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGLFramebufferObjectFormat_static_call, proto, qtscript_QGLFramebufferObjectFormat_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLPixelBuffer.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLPixelBuffer.cpp new file mode 100644 index 00000000..3538a9a3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLPixelBuffer.cpp @@ -0,0 +1,424 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGLPixelBuffer.h" + +static const char * const qtscript_QGLPixelBuffer_function_names[] = { + "QGLPixelBuffer" + // static + , "hasOpenGLPbuffers" + // prototype + , "bindTexture" + , "bindToDynamicTexture" + , "context" + , "deleteTexture" + , "doneCurrent" + , "drawTexture" + , "format" + , "generateDynamicTexture" + , "handle" + , "isValid" + , "makeCurrent" + , "releaseFromDynamicTexture" + , "size" + , "toImage" + , "updateDynamicTexture" + , "toString" +}; + +static const char * const qtscript_QGLPixelBuffer_function_signatures[] = { + "QSize size, QGLFormat format, QGLWidget shareWidget\nint width, int height, QGLFormat format, QGLWidget shareWidget" + // static + , "" + // prototype + , "QImage image, unsigned int target\nQPixmap pixmap, unsigned int target\nString fileName" + , "unsigned int texture" + , "" + , "unsigned int texture_id" + , "" + , "QPointF point, unsigned int textureId, unsigned int textureTarget\nQRectF target, unsigned int textureId, unsigned int textureTarget" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "unsigned int texture_id" +"" +}; + +static const int qtscript_QGLPixelBuffer_function_lengths[] = { + 4 + // static + , 0 + // prototype + , 2 + , 1 + , 0 + , 1 + , 0 + , 3 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGLPixelBuffer_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGLPixelBuffer::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGLPixelBuffer*) +Q_DECLARE_METATYPE(QtScriptShell_QGLPixelBuffer*) +Q_DECLARE_METATYPE(QGLContext*) +Q_DECLARE_METATYPE(QGLFormat) +Q_DECLARE_METATYPE(Qt::HANDLE) +Q_DECLARE_METATYPE(QGLWidget*) +Q_DECLARE_METATYPE(QPaintDevice*) + +// +// QGLPixelBuffer +// + +static QScriptValue qtscript_QGLPixelBuffer_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 15; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGLPixelBuffer* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGLPixelBuffer.%0(): this object is not a QGLPixelBuffer") + .arg(qtscript_QGLPixelBuffer_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + unsigned int _q_result = _q_self->bindTexture(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + unsigned int _q_result = _q_self->bindTexture(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + unsigned int _q_result = _q_self->bindTexture(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + unsigned int _q_result = _q_self->bindTexture(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + unsigned int _q_result = _q_self->bindTexture(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + bool _q_result = _q_self->bindToDynamicTexture(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QGLContext* _q_result = _q_self->context(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + _q_self->deleteTexture(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->doneCurrent(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + _q_self->drawTexture(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + _q_self->drawTexture(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + uint _q_arg2 = context->argument(2).toUInt32(); + _q_self->drawTexture(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + uint _q_arg2 = context->argument(2).toUInt32(); + _q_self->drawTexture(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + break; + + case 6: + if (context->argumentCount() == 0) { + QGLFormat _q_result = _q_self->format(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + unsigned int _q_result = _q_self->generateDynamicTexture(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + Qt::HANDLE _q_result = _q_self->handle(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->makeCurrent(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + _q_self->releaseFromDynamicTexture(); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->size(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QImage _q_result = _q_self->toImage(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + _q_self->updateDynamicTexture(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: { + QString result = QString::fromLatin1("QGLPixelBuffer"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGLPixelBuffer_throw_ambiguity_error_helper(context, + qtscript_QGLPixelBuffer_function_names[_id+2], + qtscript_QGLPixelBuffer_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QGLPixelBuffer_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGLPixelBuffer(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGLPixelBuffer* _q_cpp_result = new QtScriptShell_QGLPixelBuffer(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLPixelBuffer*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGLFormat _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGLPixelBuffer* _q_cpp_result = new QtScriptShell_QGLPixelBuffer(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLPixelBuffer*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QGLPixelBuffer* _q_cpp_result = new QtScriptShell_QGLPixelBuffer(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLPixelBuffer*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && qscriptvalue_cast(context->argument(2))) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGLFormat _q_arg1 = qscriptvalue_cast(context->argument(1)); + QGLWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QGLPixelBuffer* _q_cpp_result = new QtScriptShell_QGLPixelBuffer(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLPixelBuffer*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QGLFormat _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QGLPixelBuffer* _q_cpp_result = new QtScriptShell_QGLPixelBuffer(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLPixelBuffer*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QGLFormat _q_arg2 = qscriptvalue_cast(context->argument(2)); + QGLWidget* _q_arg3 = qscriptvalue_cast(context->argument(3)); + QtScriptShell_QGLPixelBuffer* _q_cpp_result = new QtScriptShell_QGLPixelBuffer(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGLPixelBuffer*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = QGLPixelBuffer::hasOpenGLPbuffers(); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGLPixelBuffer_throw_ambiguity_error_helper(context, + qtscript_QGLPixelBuffer_function_names[_id], + qtscript_QGLPixelBuffer_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGLPixelBuffer_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGLPixelBuffer*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 16; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGLPixelBuffer_prototype_call, qtscript_QGLPixelBuffer_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGLPixelBuffer_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGLPixelBuffer_static_call, proto, qtscript_QGLPixelBuffer_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGLPixelBuffer_static_call, + qtscript_QGLPixelBuffer_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QGLPixelBuffer_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLShader.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLShader.cpp new file mode 100644 index 00000000..b24ed937 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLShader.cpp @@ -0,0 +1,470 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGLShader.h" + +static const char * const qtscript_QGLShader_function_names[] = { + "QGLShader" + // static + , "hasOpenGLShaders" + // prototype + , "compileSourceCode" + , "compileSourceFile" + , "isCompiled" + , "log" + , "shaderId" + , "shaderType" + , "sourceCode" + , "toString" +}; + +static const char * const qtscript_QGLShader_function_signatures[] = { + "ShaderType type, QObject parent\nShaderType type, QGLContext context, QObject parent" + // static + , "ShaderType type, QGLContext context" + // prototype + , "QByteArray source\nString source\nchar source" + , "String fileName" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QGLShader_function_lengths[] = { + 3 + // static + , 2 + // prototype + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGLShader_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGLShader::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGLShader*) +Q_DECLARE_METATYPE(QtScriptShell_QGLShader*) +Q_DECLARE_METATYPE(QGLShader::ShaderTypeBit) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(const QGLContext*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QGLShader::ShaderTypeBit +// + +static const QGLShader::ShaderTypeBit qtscript_QGLShader_ShaderTypeBit_values[] = { + QGLShader::Vertex + , QGLShader::Fragment + , QGLShader::Geometry +}; + +static const char * const qtscript_QGLShader_ShaderTypeBit_keys[] = { + "Vertex" + , "Fragment" + , "Geometry" +}; + +static QString qtscript_QGLShader_ShaderTypeBit_toStringHelper(QGLShader::ShaderTypeBit value) +{ + for (int i = 0; i < 3; ++i) { + if (qtscript_QGLShader_ShaderTypeBit_values[i] == value) + return QString::fromLatin1(qtscript_QGLShader_ShaderTypeBit_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QGLShader_ShaderTypeBit_toScriptValue(QScriptEngine *engine, const QGLShader::ShaderTypeBit &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGLShader")); + return clazz.property(qtscript_QGLShader_ShaderTypeBit_toStringHelper(value)); +} + +static void qtscript_QGLShader_ShaderTypeBit_fromScriptValue(const QScriptValue &value, QGLShader::ShaderTypeBit &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGLShader_ShaderTypeBit(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 3; ++i) { + if (qtscript_QGLShader_ShaderTypeBit_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ShaderTypeBit(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGLShader_ShaderTypeBit_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGLShader::ShaderTypeBit value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGLShader_ShaderTypeBit_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGLShader::ShaderTypeBit value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGLShader_ShaderTypeBit_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGLShader_ShaderTypeBit_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGLShader_ShaderTypeBit, + qtscript_QGLShader_ShaderTypeBit_valueOf, qtscript_QGLShader_ShaderTypeBit_toString); + qScriptRegisterMetaType(engine, qtscript_QGLShader_ShaderTypeBit_toScriptValue, + qtscript_QGLShader_ShaderTypeBit_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGLShader_ShaderTypeBit_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGLShader_ShaderTypeBit_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGLShader::ShaderType +// + +static QScriptValue qtscript_QGLShader_ShaderType_toScriptValue(QScriptEngine *engine, const QGLShader::ShaderType &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QGLShader_ShaderType_fromScriptValue(const QScriptValue &value, QGLShader::ShaderType &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QGLShader_ShaderType(QScriptContext *context, QScriptEngine *engine) +{ + QGLShader::ShaderType result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("ShaderType(): argument %0 is not of type ShaderTypeBit").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QGLShader_ShaderType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGLShader::ShaderType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGLShader_ShaderType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGLShader::ShaderType value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 3; ++i) { + if ((value & qtscript_QGLShader_ShaderTypeBit_values[i]) == qtscript_QGLShader_ShaderTypeBit_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QGLShader_ShaderTypeBit_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QGLShader_ShaderType_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QGLShader_ShaderType_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QGLShader_ShaderType, qtscript_QGLShader_ShaderType_valueOf, + qtscript_QGLShader_ShaderType_toString, qtscript_QGLShader_ShaderType_equals); + qScriptRegisterMetaType(engine, qtscript_QGLShader_ShaderType_toScriptValue, + qtscript_QGLShader_ShaderType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QGLShader +// + +static QScriptValue qtscript_QGLShader_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 7; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGLShader* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGLShader.%0(): this object is not a QGLShader") + .arg(qtscript_QGLShader_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->compileSourceCode(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->compileSourceCode(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0))) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->compileSourceCode(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->compileSourceFile(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isCompiled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->log(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + unsigned int _q_result = _q_self->shaderId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->shaderType(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->sourceCode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: { + QString result = QString::fromLatin1("QGLShader"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGLShader_throw_ambiguity_error_helper(context, + qtscript_QGLShader_function_names[_id+2], + qtscript_QGLShader_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QGLShader_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGLShader(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QtScriptShell_QGLShader* _q_cpp_result = new QtScriptShell_QGLShader(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLShader*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId >() == context->argument(0).toVariant().userType()) + && context->argument(1).isQObject()) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QGLShader* _q_cpp_result = new QtScriptShell_QGLShader(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLShader*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const QGLContext* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGLShader* _q_cpp_result = new QtScriptShell_QGLShader(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLShader*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const QGLContext* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QObject* _q_arg2 = context->argument(2).toQObject(); + QtScriptShell_QGLShader* _q_cpp_result = new QtScriptShell_QGLShader(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLShader*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + bool _q_result = QGLShader::hasOpenGLShaders(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const QGLContext* _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = QGLShader::hasOpenGLShaders(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGLShader_throw_ambiguity_error_helper(context, + qtscript_QGLShader_function_names[_id], + qtscript_QGLShader_function_signatures[_id]); +} + +static QScriptValue qtscript_QGLShader_toScriptValue(QScriptEngine *engine, QGLShader* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGLShader_fromScriptValue(const QScriptValue &value, QGLShader* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGLShader_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGLShader*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGLShader_prototype_call, qtscript_QGLShader_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGLShader_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGLShader_toScriptValue, + qtscript_QGLShader_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGLShader_static_call, proto, qtscript_QGLShader_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGLShader_static_call, + qtscript_QGLShader_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QGLShader_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("ShaderTypeBit"), + qtscript_create_QGLShader_ShaderTypeBit_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ShaderType"), + qtscript_create_QGLShader_ShaderType_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLShaderProgram.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLShaderProgram.cpp new file mode 100644 index 00000000..15496f19 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLShaderProgram.cpp @@ -0,0 +1,1378 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGLShaderProgram.h" + +static const char * const qtscript_QGLShaderProgram_function_names[] = { + "QGLShaderProgram" + // static + , "hasOpenGLShaderPrograms" + // prototype + , "addShader" + , "addShaderFromSourceCode" + , "addShaderFromSourceFile" + , "attributeLocation" + , "bind" + , "bindAttributeLocation" + , "disableAttributeArray" + , "enableAttributeArray" + , "geometryInputType" + , "geometryOutputType" + , "geometryOutputVertexCount" + , "isLinked" + , "link" + , "log" + , "maxGeometryOutputVertices" + , "programId" + , "release" + , "removeAllShaders" + , "removeShader" + , "setAttributeArray" + , "setAttributeArray_QVector2D" + , "setAttributeArray_QVector3D" + , "setAttributeArray_QVector4D" + , "setAttributeBuffer" + , "setAttributeValue" + , "setGeometryInputType" + , "setGeometryOutputType" + , "setGeometryOutputVertexCount" + , "setUniformValue" + , "setUniformValueArray" + , "setUniformValueArray_QVector2D" + , "setUniformValueArray_QVector3D" + , "setUniformValueArray_QVector4D" + , "shaders" + , "uniformLocation" + , "toString" +}; + +static const char * const qtscript_QGLShaderProgram_function_signatures[] = { + "QObject parent\nQGLContext context, QObject parent" + // static + , "QGLContext context" + // prototype + , "QGLShader shader" + , "ShaderType type, QByteArray source\nShaderType type, String source\nShaderType type, char source" + , "ShaderType type, String fileName" + , "QByteArray name\nString name\nchar name" + , "" + , "QByteArray name, int location\nString name, int location\nchar name, int location" + , "char name\nint location" + , "char name\nint location" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QGLShader shader" + , "char name, float values, int tupleSize, int stride\nchar name, unsigned int type, void values, int tupleSize, int stride\nint location, float values, int tupleSize, int stride\nint location, unsigned int type, void values, int tupleSize, int stride" + , "char name, QVector2D values, int stride\nint location, QVector2D values, int stride" + , "char name, QVector3D values, int stride\nint location, QVector3D values, int stride" + , "char name, QVector4D values, int stride\nint location, QVector4D values, int stride" + , "char name, unsigned int type, int offset, int tupleSize, int stride\nint location, unsigned int type, int offset, int tupleSize, int stride" + , "char name, QColor value\nchar name, QVector2D value\nchar name, QVector3D value\nchar name, QVector4D value\nchar name, float values, int columns, int rows\nchar name, float value\nchar name, float x, float y\nchar name, float x, float y, float z\nchar name, float x, float y, float z, float w\nint location, QColor value\nint location, QVector2D value\nint location, QVector3D value\nint location, QVector4D value\nint location, float values, int columns, int rows\nint location, float value\nint location, float x, float y\nint location, float x, float y, float z\nint location, float x, float y, float z, float w" + , "unsigned int inputType" + , "unsigned int outputType" + , "int count" + , "char name, QColor color\nchar name, QMatrix3x3 value\nchar name, QMatrix4x4 value\nchar name, QPoint point\nchar name, QPointF point\nchar name, QSize size\nchar name, QSizeF size\nchar name, QTransform value\nchar name, QVector2D value\nchar name, QVector3D value\nchar name, QVector4D value\nchar name, float value\nchar name, float x, float y\nchar name, float x, float y, float z\nchar name, float x, float y, float z, float w\nchar name, int value\nchar name, unsigned int value\nint location, QColor color\nint location, QMatrix3x3 value\nint location, QMatrix4x4 value\nint location, QPoint point\nint location, QPointF point\nint location, QSize size\nint location, QSizeF size\nint location, QTransform value\nint location, QVector2D value\nint location, QVector3D value\nint location, QVector4D value\nint location, float value\nint location, float x, float y\nint location, float x, float y, float z\nint location, float x, float y, float z, float w\nint location, int value\nint location, unsigned int value" + , "char name, QMatrix3x3 values, int count\nchar name, QMatrix4x4 values, int count\nchar name, float values, int count, int tupleSize\nchar name, int values, int count\nchar name, unsigned int values, int count\nint location, QMatrix3x3 values, int count\nint location, QMatrix4x4 values, int count\nint location, float values, int count, int tupleSize\nint location, int values, int count\nint location, unsigned int values, int count" + , "char name, QVector2D values, int count\nint location, QVector2D values, int count" + , "char name, QVector3D values, int count\nint location, QVector3D values, int count" + , "char name, QVector4D values, int count\nint location, QVector4D values, int count" + , "" + , "QByteArray name\nString name\nchar name" +"" +}; + +static const int qtscript_QGLShaderProgram_function_lengths[] = { + 2 + // static + , 1 + // prototype + , 1 + , 2 + , 2 + , 1 + , 0 + , 2 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 5 + , 3 + , 3 + , 3 + , 5 + , 5 + , 1 + , 1 + , 1 + , 5 + , 4 + , 3 + , 3 + , 3 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGLShaderProgram_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGLShaderProgram::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGLShaderProgram*) +Q_DECLARE_METATYPE(QtScriptShell_QGLShaderProgram*) +Q_DECLARE_METATYPE(QGLShader*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(const float*) +Q_DECLARE_METATYPE(const void*) +Q_DECLARE_METATYPE(const QVector2D*) +Q_DECLARE_METATYPE(const QVector3D*) +Q_DECLARE_METATYPE(const QVector4D*) +Q_DECLARE_METATYPE(const QMatrix3x3*) +Q_DECLARE_METATYPE(const QMatrix4x4*) +Q_DECLARE_METATYPE(const int*) +Q_DECLARE_METATYPE(const unsigned int*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(const QGLContext*) + +// +// QGLShaderProgram +// + +static QScriptValue qtscript_QGLShaderProgram_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 35; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGLShaderProgram* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGLShaderProgram.%0(): this object is not a QGLShaderProgram") + .arg(qtscript_QGLShaderProgram_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QGLShader* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->addShader(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 2) { + if ((qMetaTypeId >() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QByteArray _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->addShaderFromSourceCode(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = _q_self->addShaderFromSourceCode(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->addShaderFromSourceCode(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 2: + if (context->argumentCount() == 2) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = _q_self->addShaderFromSourceFile(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->attributeLocation(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + int _q_result = _q_self->attributeLocation(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0))) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->attributeLocation(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->bind(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->bindAttributeLocation(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && context->argument(1).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->bindAttributeLocation(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->bindAttributeLocation(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + break; + + case 6: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->disableAttributeArray(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->disableAttributeArray(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 7: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->enableAttributeArray(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->enableAttributeArray(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 8: + if (context->argumentCount() == 0) { + unsigned int _q_result = _q_self->geometryInputType(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + unsigned int _q_result = _q_self->geometryOutputType(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + int _q_result = _q_self->geometryOutputVertexCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isLinked(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->link(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->log(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + int _q_result = _q_self->maxGeometryOutputVertices(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + unsigned int _q_result = _q_self->programId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + _q_self->release(); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 0) { + _q_self->removeAllShaders(); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QGLShader* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeShader(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const float* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setAttributeArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + const float* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setAttributeArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber() + && context->argument(3).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const float* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setAttributeArray(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber() + && qscriptvalue_cast(context->argument(2)) + && context->argument(3).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + const void* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setAttributeArray(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber() + && context->argument(3).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + const float* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setAttributeArray(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && qscriptvalue_cast(context->argument(2)) + && context->argument(3).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + uint _q_arg1 = context->argument(1).toUInt32(); + const void* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setAttributeArray(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 5) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber() + && qscriptvalue_cast(context->argument(2)) + && context->argument(3).isNumber() + && context->argument(4).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + const void* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + _q_self->setAttributeArray(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && qscriptvalue_cast(context->argument(2)) + && context->argument(3).isNumber() + && context->argument(4).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + uint _q_arg1 = context->argument(1).toUInt32(); + const void* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + _q_self->setAttributeArray(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + } + break; + + case 20: + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1))) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QVector2D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttributeArray(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1))) { + int _q_arg0 = context->argument(0).toInt32(); + const QVector2D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttributeArray(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QVector2D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setAttributeArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + const QVector2D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setAttributeArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + break; + + case 21: + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1))) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QVector3D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttributeArray(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1))) { + int _q_arg0 = context->argument(0).toInt32(); + const QVector3D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttributeArray(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QVector3D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setAttributeArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + const QVector3D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setAttributeArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + break; + + case 22: + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1))) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QVector4D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttributeArray(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1))) { + int _q_arg0 = context->argument(0).toInt32(); + const QVector4D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttributeArray(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QVector4D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setAttributeArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + const QVector4D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setAttributeArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + break; + + case 23: + if (context->argumentCount() == 4) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setAttributeBuffer(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + uint _q_arg1 = context->argument(1).toUInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setAttributeBuffer(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 5) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber() + && context->argument(4).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + _q_self->setAttributeBuffer(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber() + && context->argument(4).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + uint _q_arg1 = context->argument(1).toUInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + _q_self->setAttributeBuffer(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + } + break; + + case 24: + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QColor _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttributeValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector2D _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttributeValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttributeValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector4D _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttributeValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttributeValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QColor _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttributeValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QVector2D _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttributeValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttributeValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QVector4D _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttributeValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttributeValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setAttributeValue(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setAttributeValue(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber() + && context->argument(3).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const float* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setAttributeValue(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setAttributeValue(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber() + && context->argument(3).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + const float* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setAttributeValue(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setAttributeValue(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 5) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber() + && context->argument(4).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + float _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->setAttributeValue(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber() + && context->argument(4).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + float _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->setAttributeValue(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + } + break; + + case 25: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + _q_self->setGeometryInputType(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + _q_self->setGeometryOutputType(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setGeometryOutputVertexCount(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QColor _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix3x3 _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix4x4 _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSize _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizeF _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector2D _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVector4D _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QColor _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QMatrix3x3 _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QMatrix4x4 _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QSize _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QSizeF _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QTransform _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QVector2D _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QVector3D _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QVector4D _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + uint _q_arg1 = context->argument(1).toUInt32(); + _q_self->setUniformValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setUniformValue(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setUniformValue(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setUniformValue(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setUniformValue(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 5) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber() + && context->argument(4).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + float _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->setUniformValue(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isNumber() + && context->argument(4).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + float _q_arg2 = qscriptvalue_cast(context->argument(2)); + float _q_arg3 = qscriptvalue_cast(context->argument(3)); + float _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->setUniformValue(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + } + break; + + case 29: + if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QMatrix3x3* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setUniformValueArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QMatrix4x4* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setUniformValueArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const int* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setUniformValueArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const uint* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setUniformValueArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + const QMatrix3x3* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setUniformValueArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + const QMatrix4x4* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setUniformValueArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + const int* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setUniformValueArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + const uint* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setUniformValueArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber() + && context->argument(3).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const float* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setUniformValueArray(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber() + && context->argument(3).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + const float* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setUniformValueArray(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + } + break; + + case 30: + if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QVector2D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setUniformValueArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + const QVector2D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setUniformValueArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + break; + + case 31: + if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QVector3D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setUniformValueArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + const QVector3D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setUniformValueArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + break; + + case 32: + if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QVector4D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setUniformValueArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + const QVector4D* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setUniformValueArray(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + break; + + case 33: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->shaders(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 34: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->uniformLocation(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + int _q_result = _q_self->uniformLocation(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0))) { + const char* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->uniformLocation(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 35: { + QString result = QString::fromLatin1("QGLShaderProgram"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGLShaderProgram_throw_ambiguity_error_helper(context, + qtscript_QGLShaderProgram_function_names[_id+2], + qtscript_QGLShaderProgram_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QGLShaderProgram_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGLShaderProgram(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGLShaderProgram* _q_cpp_result = new QtScriptShell_QGLShaderProgram(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLShaderProgram*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isQObject()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QGLShaderProgram* _q_cpp_result = new QtScriptShell_QGLShaderProgram(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLShaderProgram*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + const QGLContext* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGLShaderProgram* _q_cpp_result = new QtScriptShell_QGLShaderProgram(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLShaderProgram*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + const QGLContext* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QGLShaderProgram* _q_cpp_result = new QtScriptShell_QGLShaderProgram(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLShaderProgram*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = QGLShaderProgram::hasOpenGLShaderPrograms(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + const QGLContext* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = QGLShaderProgram::hasOpenGLShaderPrograms(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGLShaderProgram_throw_ambiguity_error_helper(context, + qtscript_QGLShaderProgram_function_names[_id], + qtscript_QGLShaderProgram_function_signatures[_id]); +} + +static QScriptValue qtscript_QGLShaderProgram_toScriptValue(QScriptEngine *engine, QGLShaderProgram* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGLShaderProgram_fromScriptValue(const QScriptValue &value, QGLShaderProgram* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGLShaderProgram_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGLShaderProgram*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 36; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGLShaderProgram_prototype_call, qtscript_QGLShaderProgram_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGLShaderProgram_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGLShaderProgram_toScriptValue, + qtscript_QGLShaderProgram_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGLShaderProgram_static_call, proto, qtscript_QGLShaderProgram_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGLShaderProgram_static_call, + qtscript_QGLShaderProgram_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QGLShaderProgram_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLWidget.cpp new file mode 100644 index 00000000..93611a47 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscript_QGLWidget.cpp @@ -0,0 +1,667 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGLWidget.h" + +static const char * const qtscript_QGLWidget_function_names[] = { + "QGLWidget" + // static + , "convertToGLFormat" + // prototype + , "bindTexture" + , "colormap" + , "context" + , "deleteTexture" + , "doneCurrent" + , "doubleBuffer" + , "drawTexture" + , "format" + , "grabFrameBuffer" + , "isSharing" + , "isValid" + , "makeCurrent" + , "makeOverlayCurrent" + , "overlayContext" + , "qglClearColor" + , "qglColor" + , "renderPixmap" + , "renderText" + , "setColormap" + , "swapBuffers" + , "toString" +}; + +static const char * const qtscript_QGLWidget_function_signatures[] = { + "QGLContext context, QWidget parent, QGLWidget shareWidget, WindowFlags f\nQWidget parent, QGLWidget shareWidget, WindowFlags f\nQGLFormat format, QWidget parent, QGLWidget shareWidget, WindowFlags f" + // static + , "QImage img" + // prototype + , "QImage image, unsigned int target, int format\nQImage image, unsigned int target, int format, BindOptions options\nQPixmap pixmap, unsigned int target, int format\nQPixmap pixmap, unsigned int target, int format, BindOptions options\nString fileName" + , "" + , "" + , "unsigned int tx_id" + , "" + , "" + , "QPointF point, unsigned int textureId, unsigned int textureTarget\nQRectF target, unsigned int textureId, unsigned int textureTarget" + , "" + , "bool withAlpha" + , "" + , "" + , "" + , "" + , "" + , "QColor c" + , "QColor c" + , "int w, int h, bool useContext" + , "double x, double y, double z, String str, QFont fnt\nint x, int y, String str, QFont fnt" + , "QGLColormap map" + , "" +"" +}; + +static const int qtscript_QGLWidget_function_lengths[] = { + 4 + // static + , 1 + // prototype + , 4 + , 0 + , 0 + , 1 + , 0 + , 0 + , 3 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 3 + , 5 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGLWidget_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGLWidget::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGLWidget*) +Q_DECLARE_METATYPE(QtScriptShell_QGLWidget*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QGLColormap) +Q_DECLARE_METATYPE(QGLContext*) +Q_DECLARE_METATYPE(QGLFormat) +Q_DECLARE_METATYPE(const QGLContext*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(const QGLWidget*) +Q_DECLARE_METATYPE(QFlags) + +// +// QGLWidget +// + +static QScriptValue qtscript_QGLWidget_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 20; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGLWidget* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGLWidget.%0(): this object is not a QGLWidget") + .arg(qtscript_QGLWidget_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + unsigned int _q_result = _q_self->bindTexture(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + unsigned int _q_result = _q_self->bindTexture(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + unsigned int _q_result = _q_self->bindTexture(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + unsigned int _q_result = _q_self->bindTexture(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + unsigned int _q_result = _q_self->bindTexture(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + int _q_arg2 = context->argument(2).toInt32(); + unsigned int _q_result = _q_self->bindTexture(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + int _q_arg2 = context->argument(2).toInt32(); + unsigned int _q_result = _q_self->bindTexture(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 4) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && (qMetaTypeId >() == context->argument(3).toVariant().userType())) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + unsigned int _q_result = _q_self->bindTexture(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && (qMetaTypeId >() == context->argument(3).toVariant().userType())) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + unsigned int _q_result = _q_self->bindTexture(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 1: + if (context->argumentCount() == 0) { + const QGLColormap& _q_result = _q_self->colormap(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QGLContext* _q_result = _q_self->context(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + uint _q_arg0 = context->argument(0).toUInt32(); + _q_self->deleteTexture(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + _q_self->doneCurrent(); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->doubleBuffer(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + _q_self->drawTexture(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + _q_self->drawTexture(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + uint _q_arg2 = context->argument(2).toUInt32(); + _q_self->drawTexture(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + uint _q_arg1 = context->argument(1).toUInt32(); + uint _q_arg2 = context->argument(2).toUInt32(); + _q_self->drawTexture(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + break; + + case 7: + if (context->argumentCount() == 0) { + QGLFormat _q_result = _q_self->format(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QImage _q_result = _q_self->grabFrameBuffer(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + QImage _q_result = _q_self->grabFrameBuffer(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isSharing(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + _q_self->makeCurrent(); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 0) { + _q_self->makeOverlayCurrent(); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 0) { + const QGLContext* _q_result = const_cast(_q_self->overlayContext()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->qglClearColor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->qglColor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QPixmap _q_result = _q_self->renderPixmap(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QPixmap _q_result = _q_self->renderPixmap(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QPixmap _q_result = _q_self->renderPixmap(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + bool _q_arg2 = context->argument(2).toBoolean(); + QPixmap _q_result = _q_self->renderPixmap(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QString _q_arg2 = context->argument(2).toString(); + _q_self->renderText(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && context->argument(2).isNumber() + && context->argument(3).isString()) { + double _q_arg0 = context->argument(0).toNumber(); + double _q_arg1 = context->argument(1).toNumber(); + double _q_arg2 = context->argument(2).toNumber(); + QString _q_arg3 = context->argument(3).toString(); + _q_self->renderText(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber() + && context->argument(2).isString() + && (qMetaTypeId() == context->argument(3).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QString _q_arg2 = context->argument(2).toString(); + QFont _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->renderText(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 5) { + double _q_arg0 = context->argument(0).toNumber(); + double _q_arg1 = context->argument(1).toNumber(); + double _q_arg2 = context->argument(2).toNumber(); + QString _q_arg3 = context->argument(3).toString(); + QFont _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->renderText(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QGLColormap _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setColormap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 0) { + _q_self->swapBuffers(); + return context->engine()->undefinedValue(); + } + break; + + case 20: { + QString result = QString::fromLatin1("QGLWidget"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGLWidget_throw_ambiguity_error_helper(context, + qtscript_QGLWidget_function_names[_id+2], + qtscript_QGLWidget_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QGLWidget_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGLWidget(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGLWidget* _q_cpp_result = new QtScriptShell_QGLWidget(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QGLContext* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGLWidget* _q_cpp_result = new QtScriptShell_QGLWidget(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGLWidget* _q_cpp_result = new QtScriptShell_QGLWidget(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QGLFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGLWidget* _q_cpp_result = new QtScriptShell_QGLWidget(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1))) { + QGLContext* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGLWidget* _q_cpp_result = new QtScriptShell_QGLWidget(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QGLWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGLWidget* _q_cpp_result = new QtScriptShell_QGLWidget(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QGLFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGLWidget* _q_cpp_result = new QtScriptShell_QGLWidget(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && qscriptvalue_cast(context->argument(2))) { + QGLContext* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + const QGLWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QGLWidget* _q_cpp_result = new QtScriptShell_QGLWidget(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && (qMetaTypeId >() == context->argument(2).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QGLWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QtScriptShell_QGLWidget* _q_cpp_result = new QtScriptShell_QGLWidget(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1)) + && qscriptvalue_cast(context->argument(2))) { + QGLFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + const QGLWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QGLWidget* _q_cpp_result = new QtScriptShell_QGLWidget(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 4) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && qscriptvalue_cast(context->argument(2)) + && (qMetaTypeId >() == context->argument(3).toVariant().userType())) { + QGLContext* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + const QGLWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QtScriptShell_QGLWidget* _q_cpp_result = new QtScriptShell_QGLWidget(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1)) + && qscriptvalue_cast(context->argument(2)) + && (qMetaTypeId >() == context->argument(3).toVariant().userType())) { + QGLFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + const QGLWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QtScriptShell_QGLWidget* _q_cpp_result = new QtScriptShell_QGLWidget(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGLWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + QImage _q_arg0 = qscriptvalue_cast(context->argument(0)); + QImage _q_result = QGLWidget::convertToGLFormat(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGLWidget_throw_ambiguity_error_helper(context, + qtscript_QGLWidget_function_names[_id], + qtscript_QGLWidget_function_signatures[_id]); +} + +static QScriptValue qtscript_QGLWidget_toScriptValue(QScriptEngine *engine, QGLWidget* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGLWidget_fromScriptValue(const QScriptValue &value, QGLWidget* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGLWidget_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGLWidget*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 21; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGLWidget_prototype_call, qtscript_QGLWidget_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGLWidget_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGLWidget_toScriptValue, + qtscript_QGLWidget_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGLWidget_static_call, proto, qtscript_QGLWidget_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGLWidget_static_call, + qtscript_QGLWidget_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QGLWidget_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLColormap.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLColormap.cpp new file mode 100644 index 00000000..f8825e66 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLColormap.cpp @@ -0,0 +1,18 @@ +#include "qtscriptshell_QGLColormap.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QGLColormap::QtScriptShell_QGLColormap() + : QGLColormap() {} + +QtScriptShell_QGLColormap::QtScriptShell_QGLColormap(const QGLColormap& arg__1) + : QGLColormap(arg__1) {} + +QtScriptShell_QGLColormap::~QtScriptShell_QGLColormap() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLColormap.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLColormap.h new file mode 100644 index 00000000..4e0c636f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLColormap.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QGLCOLORMAP_H +#define QTSCRIPTSHELL_QGLCOLORMAP_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGLColormap : public QGLColormap +{ +public: + QtScriptShell_QGLColormap(); + QtScriptShell_QGLColormap(const QGLColormap& arg__1); + ~QtScriptShell_QGLColormap(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGLCOLORMAP_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLContext.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLContext.cpp new file mode 100644 index 00000000..513b4ed1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLContext.cpp @@ -0,0 +1,85 @@ +#include "qtscriptshell_QGLContext.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QGLContext*) + +QtScriptShell_QGLContext::QtScriptShell_QGLContext(const QGLFormat& format) + : QGLContext(format) {} + +QtScriptShell_QGLContext::QtScriptShell_QGLContext(const QGLFormat& format, QPaintDevice* device) + : QGLContext(format, device) {} + +QtScriptShell_QGLContext::~QtScriptShell_QGLContext() {} + +bool QtScriptShell_QGLContext::chooseContext(const QGLContext* shareContext) +{ + QScriptValue _q_function = __qtscript_self.property("chooseContext"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("chooseContext") & QScriptValue::QObjectMember)) { + return QGLContext::chooseContext(shareContext); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(shareContext)))); + } +} + +bool QtScriptShell_QGLContext::create(const QGLContext* shareContext) +{ + QScriptValue _q_function = __qtscript_self.property("create"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("create") & QScriptValue::QObjectMember)) { + return QGLContext::create(shareContext); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(shareContext)))); + } +} + +void QtScriptShell_QGLContext::doneCurrent() +{ + QScriptValue _q_function = __qtscript_self.property("doneCurrent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("doneCurrent") & QScriptValue::QObjectMember)) { + QGLContext::doneCurrent(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QGLContext::makeCurrent() +{ + QScriptValue _q_function = __qtscript_self.property("makeCurrent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("makeCurrent") & QScriptValue::QObjectMember)) { + QGLContext::makeCurrent(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QGLContext::swapBuffers() const +{ + QScriptValue _q_function = __qtscript_self.property("swapBuffers"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("swapBuffers") & QScriptValue::QObjectMember)) { + QGLContext::swapBuffers(); + } else { + _q_function.call(__qtscript_self); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLContext.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLContext.h new file mode 100644 index 00000000..75bc7378 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLContext.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QGLCONTEXT_H +#define QTSCRIPTSHELL_QGLCONTEXT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGLContext : public QGLContext +{ +public: + QtScriptShell_QGLContext(const QGLFormat& format); + QtScriptShell_QGLContext(const QGLFormat& format, QPaintDevice* device); + ~QtScriptShell_QGLContext(); + + bool chooseContext(const QGLContext* shareContext = 0); + bool create(const QGLContext* shareContext = 0); + void doneCurrent(); + void makeCurrent(); + void swapBuffers() const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGLCONTEXT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLFramebufferObject.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLFramebufferObject.cpp new file mode 100644 index 00000000..0cd8c566 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLFramebufferObject.cpp @@ -0,0 +1,116 @@ +#include "qtscriptshell_QGLFramebufferObject.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) + +QtScriptShell_QGLFramebufferObject::QtScriptShell_QGLFramebufferObject(const QSize& size, QGLFramebufferObject::Attachment attachment, unsigned int target, unsigned int internal_format) + : QGLFramebufferObject(size, attachment, target, internal_format) {} + +QtScriptShell_QGLFramebufferObject::QtScriptShell_QGLFramebufferObject(const QSize& size, const QGLFramebufferObjectFormat& format) + : QGLFramebufferObject(size, format) {} + +QtScriptShell_QGLFramebufferObject::QtScriptShell_QGLFramebufferObject(const QSize& size, unsigned int target) + : QGLFramebufferObject(size, target) {} + +QtScriptShell_QGLFramebufferObject::QtScriptShell_QGLFramebufferObject(int width, int height, QGLFramebufferObject::Attachment attachment, unsigned int target, unsigned int internal_format) + : QGLFramebufferObject(width, height, attachment, target, internal_format) {} + +QtScriptShell_QGLFramebufferObject::QtScriptShell_QGLFramebufferObject(int width, int height, const QGLFramebufferObjectFormat& format) + : QGLFramebufferObject(width, height, format) {} + +QtScriptShell_QGLFramebufferObject::QtScriptShell_QGLFramebufferObject(int width, int height, unsigned int target) + : QGLFramebufferObject(width, height, target) {} + +QtScriptShell_QGLFramebufferObject::~QtScriptShell_QGLFramebufferObject() {} + +int QtScriptShell_QGLFramebufferObject::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QGLFramebufferObject::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGLFramebufferObject::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QGLFramebufferObject::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +int QtScriptShell_QGLFramebufferObject::metric(QPaintDevice::PaintDeviceMetric metric) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QGLFramebufferObject::metric(metric); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, metric))); + } +} + +QPaintEngine* QtScriptShell_QGLFramebufferObject::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QGLFramebufferObject::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QPaintDevice* QtScriptShell_QGLFramebufferObject::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QGLFramebufferObject::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +QPainter* QtScriptShell_QGLFramebufferObject::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QGLFramebufferObject::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLFramebufferObject.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLFramebufferObject.h new file mode 100644 index 00000000..c47e1a25 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLFramebufferObject.h @@ -0,0 +1,30 @@ +#ifndef QTSCRIPTSHELL_QGLFRAMEBUFFEROBJECT_H +#define QTSCRIPTSHELL_QGLFRAMEBUFFEROBJECT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGLFramebufferObject : public QGLFramebufferObject +{ +public: + QtScriptShell_QGLFramebufferObject(const QSize& size, QGLFramebufferObject::Attachment attachment, unsigned int target = 0x0DE1, unsigned int internal_format = 0); + QtScriptShell_QGLFramebufferObject(const QSize& size, const QGLFramebufferObjectFormat& format); + QtScriptShell_QGLFramebufferObject(const QSize& size, unsigned int target = 0x0DE1); + QtScriptShell_QGLFramebufferObject(int width, int height, QGLFramebufferObject::Attachment attachment, unsigned int target = 0x0DE1, unsigned int internal_format = 0); + QtScriptShell_QGLFramebufferObject(int width, int height, const QGLFramebufferObjectFormat& format); + QtScriptShell_QGLFramebufferObject(int width, int height, unsigned int target = 0x0DE1); + ~QtScriptShell_QGLFramebufferObject(); + + int devType() const; + void initPainter(QPainter* painter) const; + int metric(QPaintDevice::PaintDeviceMetric metric) const; + QPaintEngine* paintEngine() const; + QPaintDevice* redirected(QPoint* offset) const; + QPainter* sharedPainter() const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGLFRAMEBUFFEROBJECT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLPixelBuffer.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLPixelBuffer.cpp new file mode 100644 index 00000000..ed25e633 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLPixelBuffer.cpp @@ -0,0 +1,107 @@ +#include "qtscriptshell_QGLPixelBuffer.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) + +QtScriptShell_QGLPixelBuffer::QtScriptShell_QGLPixelBuffer(const QSize& size, const QGLFormat& format, QGLWidget* shareWidget) + : QGLPixelBuffer(size, format, shareWidget) {} + +QtScriptShell_QGLPixelBuffer::QtScriptShell_QGLPixelBuffer(int width, int height, const QGLFormat& format, QGLWidget* shareWidget) + : QGLPixelBuffer(width, height, format, shareWidget) {} + +QtScriptShell_QGLPixelBuffer::~QtScriptShell_QGLPixelBuffer() {} + +int QtScriptShell_QGLPixelBuffer::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QGLPixelBuffer::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGLPixelBuffer::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QGLPixelBuffer::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +int QtScriptShell_QGLPixelBuffer::metric(QPaintDevice::PaintDeviceMetric metric) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QGLPixelBuffer::metric(metric); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, metric))); + } +} + +QPaintEngine* QtScriptShell_QGLPixelBuffer::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QGLPixelBuffer::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QPaintDevice* QtScriptShell_QGLPixelBuffer::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QGLPixelBuffer::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +QPainter* QtScriptShell_QGLPixelBuffer::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QGLPixelBuffer::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLPixelBuffer.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLPixelBuffer.h new file mode 100644 index 00000000..45392f85 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLPixelBuffer.h @@ -0,0 +1,26 @@ +#ifndef QTSCRIPTSHELL_QGLPIXELBUFFER_H +#define QTSCRIPTSHELL_QGLPIXELBUFFER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGLPixelBuffer : public QGLPixelBuffer +{ +public: + QtScriptShell_QGLPixelBuffer(const QSize& size, const QGLFormat& format = QGLFormat::defaultFormat(), QGLWidget* shareWidget = 0); + QtScriptShell_QGLPixelBuffer(int width, int height, const QGLFormat& format = QGLFormat::defaultFormat(), QGLWidget* shareWidget = 0); + ~QtScriptShell_QGLPixelBuffer(); + + int devType() const; + void initPainter(QPainter* painter) const; + int metric(QPaintDevice::PaintDeviceMetric metric) const; + QPaintEngine* paintEngine() const; + QPaintDevice* redirected(QPoint* offset) const; + QPainter* sharedPainter() const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGLPIXELBUFFER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLShader.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLShader.cpp new file mode 100644 index 00000000..8a8383b3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLShader.cpp @@ -0,0 +1,96 @@ +#include "qtscriptshell_QGLShader.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QGLShader::QtScriptShell_QGLShader(QGLShader::ShaderType type, QObject* parent) + : QGLShader(type, parent) {} + +QtScriptShell_QGLShader::QtScriptShell_QGLShader(QGLShader::ShaderType type, const QGLContext* context, QObject* parent) + : QGLShader(type, context, parent) {} + +QtScriptShell_QGLShader::~QtScriptShell_QGLShader() {} + +void QtScriptShell_QGLShader::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGLShader::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLShader::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGLShader::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGLShader::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGLShader::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGLShader::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGLShader::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QGLShader::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGLShader::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLShader.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLShader.h new file mode 100644 index 00000000..9ea05e35 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLShader.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QGLSHADER_H +#define QTSCRIPTSHELL_QGLSHADER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGLShader : public QGLShader +{ +public: + QtScriptShell_QGLShader(QGLShader::ShaderType type, QObject* parent = 0); + QtScriptShell_QGLShader(QGLShader::ShaderType type, const QGLContext* context, QObject* parent = 0); + ~QtScriptShell_QGLShader(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGLSHADER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLShaderProgram.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLShaderProgram.cpp new file mode 100644 index 00000000..e2b68881 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLShaderProgram.cpp @@ -0,0 +1,116 @@ +#include "qtscriptshell_QGLShaderProgram.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QGLShaderProgram::QtScriptShell_QGLShaderProgram(QObject* parent) + : QGLShaderProgram(parent) {} + +QtScriptShell_QGLShaderProgram::QtScriptShell_QGLShaderProgram(const QGLContext* context, QObject* parent) + : QGLShaderProgram(context, parent) {} + +QtScriptShell_QGLShaderProgram::~QtScriptShell_QGLShaderProgram() {} + +void QtScriptShell_QGLShaderProgram::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGLShaderProgram::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLShaderProgram::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGLShaderProgram::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGLShaderProgram::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGLShaderProgram::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGLShaderProgram::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGLShaderProgram::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGLShaderProgram::link() +{ + QScriptValue _q_function = __qtscript_self.property("link"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("link") & QScriptValue::QObjectMember)) { + return QGLShaderProgram::link(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGLShaderProgram::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGLShaderProgram::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLShaderProgram.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLShaderProgram.h new file mode 100644 index 00000000..1d86b2d6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLShaderProgram.h @@ -0,0 +1,26 @@ +#ifndef QTSCRIPTSHELL_QGLSHADERPROGRAM_H +#define QTSCRIPTSHELL_QGLSHADERPROGRAM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGLShaderProgram : public QGLShaderProgram +{ +public: + QtScriptShell_QGLShaderProgram(QObject* parent = 0); + QtScriptShell_QGLShaderProgram(const QGLContext* context, QObject* parent = 0); + ~QtScriptShell_QGLShaderProgram(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + bool link(); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGLSHADERPROGRAM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLWidget.cpp new file mode 100644 index 00000000..42f89789 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLWidget.cpp @@ -0,0 +1,800 @@ +#include "qtscriptshell_QGLWidget.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QGLWidget::QtScriptShell_QGLWidget(QGLContext* context, QWidget* parent, const QGLWidget* shareWidget, Qt::WindowFlags f) + : QGLWidget(context, parent, shareWidget, f) {} + +QtScriptShell_QGLWidget::QtScriptShell_QGLWidget(QWidget* parent, const QGLWidget* shareWidget, Qt::WindowFlags f) + : QGLWidget(parent, shareWidget, f) {} + +QtScriptShell_QGLWidget::QtScriptShell_QGLWidget(const QGLFormat& format, QWidget* parent, const QGLWidget* shareWidget, Qt::WindowFlags f) + : QGLWidget(format, parent, shareWidget, f) {} + +QtScriptShell_QGLWidget::~QtScriptShell_QGLWidget() {} + +void QtScriptShell_QGLWidget::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QGLWidget::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QGLWidget::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QGLWidget::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGLWidget::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QGLWidget::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGLWidget::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGLWidget::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QGLWidget::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QGLWidget::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGLWidget::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGLWidget::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGLWidget::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGLWidget::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGLWidget::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QGLWidget::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGLWidget::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGLWidget::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QGLWidget::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGLWidget::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QGLWidget::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGLWidget::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGLWidget::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QGLWidget::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QGLWidget::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGLWidget::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::glDraw() +{ + QScriptValue _q_function = __qtscript_self.property("glDraw"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("glDraw") & QScriptValue::QObjectMember)) { + QGLWidget::glDraw(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QGLWidget::glInit() +{ + QScriptValue _q_function = __qtscript_self.property("glInit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("glInit") & QScriptValue::QObjectMember)) { + QGLWidget::glInit(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QGLWidget::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QGLWidget::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QGLWidget::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QGLWidget::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QGLWidget::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QGLWidget::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QGLWidget::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QGLWidget::initializeGL() +{ + QScriptValue _q_function = __qtscript_self.property("initializeGL"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initializeGL") & QScriptValue::QObjectMember)) { + QGLWidget::initializeGL(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QGLWidget::initializeOverlayGL() +{ + QScriptValue _q_function = __qtscript_self.property("initializeOverlayGL"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initializeOverlayGL") & QScriptValue::QObjectMember)) { + QGLWidget::initializeOverlayGL(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QGLWidget::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGLWidget::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QGLWidget::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGLWidget::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QGLWidget::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGLWidget::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGLWidget::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QGLWidget::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QGLWidget::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QGLWidget::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QGLWidget::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QGLWidget::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGLWidget::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGLWidget::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGLWidget::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGLWidget::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGLWidget::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QGLWidget::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGLWidget::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QGLWidget::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QGLWidget::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QGLWidget::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGLWidget::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QGLWidget::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QGLWidget::paintGL() +{ + QScriptValue _q_function = __qtscript_self.property("paintGL"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintGL") & QScriptValue::QObjectMember)) { + QGLWidget::paintGL(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QGLWidget::paintOverlayGL() +{ + QScriptValue _q_function = __qtscript_self.property("paintOverlayGL"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintOverlayGL") & QScriptValue::QObjectMember)) { + QGLWidget::paintOverlayGL(); + } else { + _q_function.call(__qtscript_self); + } +} + +QPaintDevice* QtScriptShell_QGLWidget::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QGLWidget::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QGLWidget::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QGLWidget::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QGLWidget::resizeGL(int w, int h) +{ + QScriptValue _q_function = __qtscript_self.property("resizeGL"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeGL") & QScriptValue::QObjectMember)) { + QGLWidget::resizeGL(w, h); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, w) + << qScriptValueFromValue(_q_engine, h)); + } +} + +void QtScriptShell_QGLWidget::resizeOverlayGL(int w, int h) +{ + QScriptValue _q_function = __qtscript_self.property("resizeOverlayGL"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeOverlayGL") & QScriptValue::QObjectMember)) { + QGLWidget::resizeOverlayGL(w, h); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, w) + << qScriptValueFromValue(_q_engine, h)); + } +} + +QPainter* QtScriptShell_QGLWidget::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QGLWidget::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGLWidget::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QGLWidget::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_QGLWidget::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QGLWidget::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGLWidget::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QGLWidget::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGLWidget::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGLWidget::updateGL() +{ + QScriptValue _q_function = __qtscript_self.property("updateGL"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGL") & QScriptValue::QObjectMember)) { + QGLWidget::updateGL(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QGLWidget::updateOverlayGL() +{ + QScriptValue _q_function = __qtscript_self.property("updateOverlayGL"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateOverlayGL") & QScriptValue::QObjectMember)) { + QGLWidget::updateOverlayGL(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QGLWidget::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGLWidget::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLWidget.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLWidget.h new file mode 100644 index 00000000..2430b81e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_opengl/qtscriptshell_QGLWidget.h @@ -0,0 +1,75 @@ +#ifndef QTSCRIPTSHELL_QGLWIDGET_H +#define QTSCRIPTSHELL_QGLWIDGET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGLWidget : public QGLWidget +{ +public: + QtScriptShell_QGLWidget(QGLContext* context, QWidget* parent = 0, const QGLWidget* shareWidget = 0, Qt::WindowFlags f = Qt::WindowFlags()); + QtScriptShell_QGLWidget(QWidget* parent = 0, const QGLWidget* shareWidget = 0, Qt::WindowFlags f = Qt::WindowFlags()); + QtScriptShell_QGLWidget(const QGLFormat& format, QWidget* parent = 0, const QGLWidget* shareWidget = 0, Qt::WindowFlags f = Qt::WindowFlags()); + ~QtScriptShell_QGLWidget(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* arg__1); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + void glDraw(); + void glInit(); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void initializeGL(); + void initializeOverlayGL(); + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + void paintGL(); + void paintOverlayGL(); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* arg__1); + void resizeGL(int w, int h); + void resizeOverlayGL(int w, int h); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void updateGL(); + void updateOverlayGL(); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGLWIDGET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/com_trolltech_qt_printsupport.pri b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/com_trolltech_qt_printsupport.pri new file mode 100644 index 00000000..d0522f1c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/com_trolltech_qt_printsupport.pri @@ -0,0 +1,25 @@ +HEADERS += \ + $$PWD/qtscriptshell_QAbstractPrintDialog.h \ + $$PWD/qtscriptshell_QPageSetupDialog.h \ + $$PWD/qtscriptshell_QPrintDialog.h \ + $$PWD/qtscriptshell_QPrintEngine.h \ + $$PWD/qtscriptshell_QPrintPreviewDialog.h \ + $$PWD/qtscriptshell_QPrintPreviewWidget.h \ + $$PWD/qtscriptshell_QPrinter.h \ + +SOURCES += \ + $$PWD/qtscript_QAbstractPrintDialog.cpp \ + $$PWD/qtscript_QPageSetupDialog.cpp \ + $$PWD/qtscript_QPrintDialog.cpp \ + $$PWD/qtscript_QPrintEngine.cpp \ + $$PWD/qtscript_QPrintPreviewDialog.cpp \ + $$PWD/qtscript_QPrintPreviewWidget.cpp \ + $$PWD/qtscript_QPrinter.cpp \ + $$PWD/qtscriptshell_QAbstractPrintDialog.cpp \ + $$PWD/qtscriptshell_QPageSetupDialog.cpp \ + $$PWD/qtscriptshell_QPrintDialog.cpp \ + $$PWD/qtscriptshell_QPrintEngine.cpp \ + $$PWD/qtscriptshell_QPrintPreviewDialog.cpp \ + $$PWD/qtscriptshell_QPrintPreviewWidget.cpp \ + $$PWD/qtscriptshell_QPrinter.cpp \ + $$PWD/com_trolltech_qt_printsupport_init.cpp diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/com_trolltech_qt_printsupport_init.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/com_trolltech_qt_printsupport_init.cpp new file mode 100644 index 00000000..fd35480a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/com_trolltech_qt_printsupport_init.cpp @@ -0,0 +1,41 @@ +#include +#include + +QScriptValue qtscript_create_QPrintEngine_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPrinter_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPrintPreviewWidget_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAbstractPrintDialog_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPageSetupDialog_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPrintPreviewDialog_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPrintDialog_class(QScriptEngine *engine); + +static const char * const qtscript_com_trolltech_qt_printsupport_class_names[] = { + "QPrintEngine" + , "QPrinter" + , "QPrintPreviewWidget" + , "QAbstractPrintDialog" + , "QPageSetupDialog" + , "QPrintPreviewDialog" + , "QPrintDialog" +}; + +typedef QScriptValue (*QtBindingCreator)(QScriptEngine *engine); +static const QtBindingCreator qtscript_com_trolltech_qt_printsupport_class_functions[] = { + qtscript_create_QPrintEngine_class + , qtscript_create_QPrinter_class + , qtscript_create_QPrintPreviewWidget_class + , qtscript_create_QAbstractPrintDialog_class + , qtscript_create_QPageSetupDialog_class + , qtscript_create_QPrintPreviewDialog_class + , qtscript_create_QPrintDialog_class +}; + +void qtscript_initialize_com_trolltech_qt_printsupport_bindings(QScriptValue &extensionObject) +{ + QScriptEngine *engine = extensionObject.engine(); + for (int i = 0; i < 7; ++i) { + extensionObject.setProperty(qtscript_com_trolltech_qt_printsupport_class_names[i], + qtscript_com_trolltech_qt_printsupport_class_functions[i](engine), + QScriptValue::SkipInEnumeration); + } +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QAbstractPrintDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QAbstractPrintDialog.cpp new file mode 100644 index 00000000..c3104f7c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QAbstractPrintDialog.cpp @@ -0,0 +1,605 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAbstractPrintDialog.h" + +static const char * const qtscript_QAbstractPrintDialog_function_names[] = { + "QAbstractPrintDialog" + // static + // prototype + , "addEnabledOption" + , "enabledOptions" + , "fromPage" + , "isOptionEnabled" + , "maxPage" + , "minPage" + , "printRange" + , "printer" + , "setEnabledOptions" + , "setFromTo" + , "setMinMax" + , "setOptionTabs" + , "setPrintRange" + , "toPage" + , "toString" +}; + +static const char * const qtscript_QAbstractPrintDialog_function_signatures[] = { + "QPrinter printer, QWidget parent" + // static + // prototype + , "PrintDialogOption option" + , "" + , "" + , "PrintDialogOption option" + , "" + , "" + , "" + , "" + , "PrintDialogOptions options" + , "int fromPage, int toPage" + , "int min, int max" + , "List tabs" + , "PrintRange range" + , "" +"" +}; + +static const int qtscript_QAbstractPrintDialog_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 2 + , 2 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QAbstractPrintDialog_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAbstractPrintDialog::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAbstractPrintDialog*) +Q_DECLARE_METATYPE(QtScriptShell_QAbstractPrintDialog*) +Q_DECLARE_METATYPE(QAbstractPrintDialog::PrintDialogOption) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAbstractPrintDialog::PrintRange) +Q_DECLARE_METATYPE(QPrinter*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QDialog*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QAbstractPrintDialog::PrintDialogOption +// + +static const QAbstractPrintDialog::PrintDialogOption qtscript_QAbstractPrintDialog_PrintDialogOption_values[] = { + QAbstractPrintDialog::None + , QAbstractPrintDialog::PrintToFile + , QAbstractPrintDialog::PrintSelection + , QAbstractPrintDialog::PrintPageRange + , QAbstractPrintDialog::PrintShowPageSize + , QAbstractPrintDialog::PrintCollateCopies + , QAbstractPrintDialog::DontUseSheet + , QAbstractPrintDialog::PrintCurrentPage +}; + +static const char * const qtscript_QAbstractPrintDialog_PrintDialogOption_keys[] = { + "None" + , "PrintToFile" + , "PrintSelection" + , "PrintPageRange" + , "PrintShowPageSize" + , "PrintCollateCopies" + , "DontUseSheet" + , "PrintCurrentPage" +}; + +static QString qtscript_QAbstractPrintDialog_PrintDialogOption_toStringHelper(QAbstractPrintDialog::PrintDialogOption value) +{ + for (int i = 0; i < 8; ++i) { + if (qtscript_QAbstractPrintDialog_PrintDialogOption_values[i] == value) + return QString::fromLatin1(qtscript_QAbstractPrintDialog_PrintDialogOption_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QAbstractPrintDialog_PrintDialogOption_toScriptValue(QScriptEngine *engine, const QAbstractPrintDialog::PrintDialogOption &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QAbstractPrintDialog")); + return clazz.property(qtscript_QAbstractPrintDialog_PrintDialogOption_toStringHelper(value)); +} + +static void qtscript_QAbstractPrintDialog_PrintDialogOption_fromScriptValue(const QScriptValue &value, QAbstractPrintDialog::PrintDialogOption &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QAbstractPrintDialog_PrintDialogOption(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 8; ++i) { + if (qtscript_QAbstractPrintDialog_PrintDialogOption_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("PrintDialogOption(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QAbstractPrintDialog_PrintDialogOption_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractPrintDialog::PrintDialogOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAbstractPrintDialog_PrintDialogOption_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractPrintDialog::PrintDialogOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QAbstractPrintDialog_PrintDialogOption_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QAbstractPrintDialog_PrintDialogOption_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QAbstractPrintDialog_PrintDialogOption, + qtscript_QAbstractPrintDialog_PrintDialogOption_valueOf, qtscript_QAbstractPrintDialog_PrintDialogOption_toString); + qScriptRegisterMetaType(engine, qtscript_QAbstractPrintDialog_PrintDialogOption_toScriptValue, + qtscript_QAbstractPrintDialog_PrintDialogOption_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 8; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QAbstractPrintDialog_PrintDialogOption_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QAbstractPrintDialog_PrintDialogOption_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QAbstractPrintDialog::PrintDialogOptions +// + +static QScriptValue qtscript_QAbstractPrintDialog_PrintDialogOptions_toScriptValue(QScriptEngine *engine, const QAbstractPrintDialog::PrintDialogOptions &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QAbstractPrintDialog_PrintDialogOptions_fromScriptValue(const QScriptValue &value, QAbstractPrintDialog::PrintDialogOptions &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QAbstractPrintDialog_PrintDialogOptions(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractPrintDialog::PrintDialogOptions result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("PrintDialogOptions(): argument %0 is not of type PrintDialogOption").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QAbstractPrintDialog_PrintDialogOptions_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractPrintDialog::PrintDialogOptions value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAbstractPrintDialog_PrintDialogOptions_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractPrintDialog::PrintDialogOptions value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 8; ++i) { + if ((value & qtscript_QAbstractPrintDialog_PrintDialogOption_values[i]) == qtscript_QAbstractPrintDialog_PrintDialogOption_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QAbstractPrintDialog_PrintDialogOption_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QAbstractPrintDialog_PrintDialogOptions_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QAbstractPrintDialog_PrintDialogOptions_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QAbstractPrintDialog_PrintDialogOptions, qtscript_QAbstractPrintDialog_PrintDialogOptions_valueOf, + qtscript_QAbstractPrintDialog_PrintDialogOptions_toString, qtscript_QAbstractPrintDialog_PrintDialogOptions_equals); + qScriptRegisterMetaType(engine, qtscript_QAbstractPrintDialog_PrintDialogOptions_toScriptValue, + qtscript_QAbstractPrintDialog_PrintDialogOptions_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QAbstractPrintDialog::PrintRange +// + +static const QAbstractPrintDialog::PrintRange qtscript_QAbstractPrintDialog_PrintRange_values[] = { + QAbstractPrintDialog::AllPages + , QAbstractPrintDialog::Selection + , QAbstractPrintDialog::PageRange + , QAbstractPrintDialog::CurrentPage +}; + +static const char * const qtscript_QAbstractPrintDialog_PrintRange_keys[] = { + "AllPages" + , "Selection" + , "PageRange" + , "CurrentPage" +}; + +static QString qtscript_QAbstractPrintDialog_PrintRange_toStringHelper(QAbstractPrintDialog::PrintRange value) +{ + if ((value >= QAbstractPrintDialog::AllPages) && (value <= QAbstractPrintDialog::CurrentPage)) + return qtscript_QAbstractPrintDialog_PrintRange_keys[static_cast(value)-static_cast(QAbstractPrintDialog::AllPages)]; + return QString(); +} + +static QScriptValue qtscript_QAbstractPrintDialog_PrintRange_toScriptValue(QScriptEngine *engine, const QAbstractPrintDialog::PrintRange &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QAbstractPrintDialog")); + return clazz.property(qtscript_QAbstractPrintDialog_PrintRange_toStringHelper(value)); +} + +static void qtscript_QAbstractPrintDialog_PrintRange_fromScriptValue(const QScriptValue &value, QAbstractPrintDialog::PrintRange &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QAbstractPrintDialog_PrintRange(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QAbstractPrintDialog::AllPages) && (arg <= QAbstractPrintDialog::CurrentPage)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("PrintRange(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QAbstractPrintDialog_PrintRange_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractPrintDialog::PrintRange value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAbstractPrintDialog_PrintRange_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractPrintDialog::PrintRange value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QAbstractPrintDialog_PrintRange_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QAbstractPrintDialog_PrintRange_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QAbstractPrintDialog_PrintRange, + qtscript_QAbstractPrintDialog_PrintRange_valueOf, qtscript_QAbstractPrintDialog_PrintRange_toString); + qScriptRegisterMetaType(engine, qtscript_QAbstractPrintDialog_PrintRange_toScriptValue, + qtscript_QAbstractPrintDialog_PrintRange_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QAbstractPrintDialog_PrintRange_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QAbstractPrintDialog_PrintRange_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QAbstractPrintDialog +// + +static QScriptValue qtscript_QAbstractPrintDialog_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 14; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAbstractPrintDialog* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractPrintDialog.%0(): this object is not a QAbstractPrintDialog") + .arg(qtscript_QAbstractPrintDialog_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QAbstractPrintDialog::PrintDialogOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addEnabledOption(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->enabledOptions(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->fromPage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QAbstractPrintDialog::PrintDialogOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isOptionEnabled(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->maxPage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->minPage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QAbstractPrintDialog::PrintRange _q_result = _q_self->printRange(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QPrinter* _q_result = _q_self->printer(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setEnabledOptions(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setFromTo(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setMinMax(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setOptionTabs(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QAbstractPrintDialog::PrintRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPrintRange(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 0) { + int _q_result = _q_self->toPage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: { + QString result = QString::fromLatin1("QAbstractPrintDialog"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractPrintDialog_throw_ambiguity_error_helper(context, + qtscript_QAbstractPrintDialog_function_names[_id+1], + qtscript_QAbstractPrintDialog_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAbstractPrintDialog_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAbstractPrintDialog(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QPrinter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QAbstractPrintDialog* _q_cpp_result = new QtScriptShell_QAbstractPrintDialog(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractPrintDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QPrinter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QAbstractPrintDialog* _q_cpp_result = new QtScriptShell_QAbstractPrintDialog(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractPrintDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractPrintDialog_throw_ambiguity_error_helper(context, + qtscript_QAbstractPrintDialog_function_names[_id], + qtscript_QAbstractPrintDialog_function_signatures[_id]); +} + +static QScriptValue qtscript_QAbstractPrintDialog_toScriptValue(QScriptEngine *engine, QAbstractPrintDialog* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAbstractPrintDialog_fromScriptValue(const QScriptValue &value, QAbstractPrintDialog* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAbstractPrintDialog_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAbstractPrintDialog*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 15; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAbstractPrintDialog_prototype_call, qtscript_QAbstractPrintDialog_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAbstractPrintDialog_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QAbstractPrintDialog_toScriptValue, + qtscript_QAbstractPrintDialog_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAbstractPrintDialog_static_call, proto, qtscript_QAbstractPrintDialog_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("PrintDialogOption"), + qtscript_create_QAbstractPrintDialog_PrintDialogOption_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("PrintDialogOptions"), + qtscript_create_QAbstractPrintDialog_PrintDialogOptions_class(engine)); + ctor.setProperty(QString::fromLatin1("PrintRange"), + qtscript_create_QAbstractPrintDialog_PrintRange_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPageSetupDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPageSetupDialog.cpp new file mode 100644 index 00000000..6f1fae7c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPageSetupDialog.cpp @@ -0,0 +1,220 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPageSetupDialog.h" + +static const char * const qtscript_QPageSetupDialog_function_names[] = { + "QPageSetupDialog" + // static + // prototype + , "open" + , "printer" + , "toString" +}; + +static const char * const qtscript_QPageSetupDialog_function_signatures[] = { + "QPrinter printer, QWidget parent\nQWidget parent" + // static + // prototype + , "QObject receiver, char member" + , "" +"" +}; + +static const int qtscript_QPageSetupDialog_function_lengths[] = { + 2 + // static + // prototype + , 2 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPageSetupDialog_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPageSetupDialog::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPageSetupDialog*) +Q_DECLARE_METATYPE(QtScriptShell_QPageSetupDialog*) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(QPrinter*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QDialog*) + +// +// QPageSetupDialog +// + +static QScriptValue qtscript_QPageSetupDialog_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPageSetupDialog* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPageSetupDialog.%0(): this object is not a QPageSetupDialog") + .arg(qtscript_QPageSetupDialog_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->open(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QPrinter* _q_result = _q_self->printer(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QPageSetupDialog"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPageSetupDialog_throw_ambiguity_error_helper(context, + qtscript_QPageSetupDialog_function_names[_id+1], + qtscript_QPageSetupDialog_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPageSetupDialog_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPageSetupDialog(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPageSetupDialog* _q_cpp_result = new QtScriptShell_QPageSetupDialog(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPageSetupDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QPrinter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPageSetupDialog* _q_cpp_result = new QtScriptShell_QPageSetupDialog(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPageSetupDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPageSetupDialog* _q_cpp_result = new QtScriptShell_QPageSetupDialog(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPageSetupDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QPrinter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QPageSetupDialog* _q_cpp_result = new QtScriptShell_QPageSetupDialog(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPageSetupDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPageSetupDialog_throw_ambiguity_error_helper(context, + qtscript_QPageSetupDialog_function_names[_id], + qtscript_QPageSetupDialog_function_signatures[_id]); +} + +static QScriptValue qtscript_QPageSetupDialog_toScriptValue(QScriptEngine *engine, QPageSetupDialog* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QPageSetupDialog_fromScriptValue(const QScriptValue &value, QPageSetupDialog* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QPageSetupDialog_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPageSetupDialog*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPageSetupDialog_prototype_call, qtscript_QPageSetupDialog_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPageSetupDialog_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QPageSetupDialog_toScriptValue, + qtscript_QPageSetupDialog_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPageSetupDialog_static_call, proto, qtscript_QPageSetupDialog_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrintDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrintDialog.cpp new file mode 100644 index 00000000..4d7c94e2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrintDialog.cpp @@ -0,0 +1,239 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPrintDialog.h" + +static const char * const qtscript_QPrintDialog_function_names[] = { + "QPrintDialog" + // static + // prototype + , "open" + , "setOption" + , "testOption" + , "toString" +}; + +static const char * const qtscript_QPrintDialog_function_signatures[] = { + "QPrinter printer, QWidget parent\nQWidget parent" + // static + // prototype + , "QObject receiver, char member" + , "PrintDialogOption option, bool on" + , "PrintDialogOption option" +"" +}; + +static const int qtscript_QPrintDialog_function_lengths[] = { + 2 + // static + // prototype + , 2 + , 2 + , 1 + , 0 +}; + +static QScriptValue qtscript_QPrintDialog_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPrintDialog::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPrintDialog*) +Q_DECLARE_METATYPE(QtScriptShell_QPrintDialog*) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(QAbstractPrintDialog::PrintDialogOption) +Q_DECLARE_METATYPE(QPrinter*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractPrintDialog*) + +// +// QPrintDialog +// + +static QScriptValue qtscript_QPrintDialog_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPrintDialog* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPrintDialog.%0(): this object is not a QPrintDialog") + .arg(qtscript_QPrintDialog_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->open(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QAbstractPrintDialog::PrintDialogOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOption(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QAbstractPrintDialog::PrintDialogOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setOption(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QAbstractPrintDialog::PrintDialogOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->testOption(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: { + QString result = QString::fromLatin1("QPrintDialog"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPrintDialog_throw_ambiguity_error_helper(context, + qtscript_QPrintDialog_function_names[_id+1], + qtscript_QPrintDialog_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPrintDialog_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPrintDialog(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPrintDialog* _q_cpp_result = new QtScriptShell_QPrintDialog(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPrintDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QPrinter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPrintDialog* _q_cpp_result = new QtScriptShell_QPrintDialog(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPrintDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPrintDialog* _q_cpp_result = new QtScriptShell_QPrintDialog(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPrintDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QPrinter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QPrintDialog* _q_cpp_result = new QtScriptShell_QPrintDialog(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPrintDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPrintDialog_throw_ambiguity_error_helper(context, + qtscript_QPrintDialog_function_names[_id], + qtscript_QPrintDialog_function_signatures[_id]); +} + +static QScriptValue qtscript_QPrintDialog_toScriptValue(QScriptEngine *engine, QPrintDialog* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QPrintDialog_fromScriptValue(const QScriptValue &value, QPrintDialog* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QPrintDialog_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPrintDialog*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPrintDialog_prototype_call, qtscript_QPrintDialog_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPrintDialog_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QPrintDialog_toScriptValue, + qtscript_QPrintDialog_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPrintDialog_static_call, proto, qtscript_QPrintDialog_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrintEngine.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrintEngine.cpp new file mode 100644 index 00000000..225607a6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrintEngine.cpp @@ -0,0 +1,343 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QPrintEngine.h" + +static const char * const qtscript_QPrintEngine_function_names[] = { + "QPrintEngine" + // static + // prototype + , "abort" + , "metric" + , "newPage" + , "printerState" + , "property" + , "setProperty" + , "toString" +}; + +static const char * const qtscript_QPrintEngine_function_signatures[] = { + "" + // static + // prototype + , "" + , "PaintDeviceMetric arg__1" + , "" + , "" + , "PrintEnginePropertyKey key" + , "PrintEnginePropertyKey key, Object value" +"" +}; + +static const int qtscript_QPrintEngine_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 1 + , 0 + , 0 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QPrintEngine_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPrintEngine::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPrintEngine*) +Q_DECLARE_METATYPE(QtScriptShell_QPrintEngine*) +Q_DECLARE_METATYPE(QPrintEngine::PrintEnginePropertyKey) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QPrinter::PrinterState) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QPrintEngine::PrintEnginePropertyKey +// + +static const QPrintEngine::PrintEnginePropertyKey qtscript_QPrintEngine_PrintEnginePropertyKey_values[] = { + QPrintEngine::PPK_CollateCopies + , QPrintEngine::PPK_ColorMode + , QPrintEngine::PPK_Creator + , QPrintEngine::PPK_DocumentName + , QPrintEngine::PPK_FullPage + , QPrintEngine::PPK_NumberOfCopies + , QPrintEngine::PPK_Orientation + , QPrintEngine::PPK_OutputFileName + , QPrintEngine::PPK_PageOrder + , QPrintEngine::PPK_PageRect + , QPrintEngine::PPK_PageSize + , QPrintEngine::PPK_PaperRect + , QPrintEngine::PPK_PaperSource + , QPrintEngine::PPK_PrinterName + , QPrintEngine::PPK_PrinterProgram + , QPrintEngine::PPK_Resolution + , QPrintEngine::PPK_SelectionOption + , QPrintEngine::PPK_SupportedResolutions + , QPrintEngine::PPK_WindowsPageSize + , QPrintEngine::PPK_FontEmbedding + , QPrintEngine::PPK_Duplex + , QPrintEngine::PPK_PaperSources + , QPrintEngine::PPK_CustomPaperSize + , QPrintEngine::PPK_PageMargins + , QPrintEngine::PPK_CopyCount + , QPrintEngine::PPK_SupportsMultipleCopies + , QPrintEngine::PPK_PaperName + , QPrintEngine::PPK_QPageSize + , QPrintEngine::PPK_QPageMargins + , QPrintEngine::PPK_QPageLayout + , QPrintEngine::PPK_CustomBase +}; + +static const char * const qtscript_QPrintEngine_PrintEnginePropertyKey_keys[] = { + "PPK_CollateCopies" + , "PPK_ColorMode" + , "PPK_Creator" + , "PPK_DocumentName" + , "PPK_FullPage" + , "PPK_NumberOfCopies" + , "PPK_Orientation" + , "PPK_OutputFileName" + , "PPK_PageOrder" + , "PPK_PageRect" + , "PPK_PageSize" + , "PPK_PaperRect" + , "PPK_PaperSource" + , "PPK_PrinterName" + , "PPK_PrinterProgram" + , "PPK_Resolution" + , "PPK_SelectionOption" + , "PPK_SupportedResolutions" + , "PPK_WindowsPageSize" + , "PPK_FontEmbedding" + , "PPK_Duplex" + , "PPK_PaperSources" + , "PPK_CustomPaperSize" + , "PPK_PageMargins" + , "PPK_CopyCount" + , "PPK_SupportsMultipleCopies" + , "PPK_PaperName" + , "PPK_QPageSize" + , "PPK_QPageMargins" + , "PPK_QPageLayout" + , "PPK_CustomBase" +}; + +static QString qtscript_QPrintEngine_PrintEnginePropertyKey_toStringHelper(QPrintEngine::PrintEnginePropertyKey value) +{ + for (int i = 0; i < 31; ++i) { + if (qtscript_QPrintEngine_PrintEnginePropertyKey_values[i] == value) + return QString::fromLatin1(qtscript_QPrintEngine_PrintEnginePropertyKey_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QPrintEngine_PrintEnginePropertyKey_toScriptValue(QScriptEngine *engine, const QPrintEngine::PrintEnginePropertyKey &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPrintEngine")); + return clazz.property(qtscript_QPrintEngine_PrintEnginePropertyKey_toStringHelper(value)); +} + +static void qtscript_QPrintEngine_PrintEnginePropertyKey_fromScriptValue(const QScriptValue &value, QPrintEngine::PrintEnginePropertyKey &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPrintEngine_PrintEnginePropertyKey(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 31; ++i) { + if (qtscript_QPrintEngine_PrintEnginePropertyKey_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("PrintEnginePropertyKey(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPrintEngine_PrintEnginePropertyKey_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPrintEngine::PrintEnginePropertyKey value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPrintEngine_PrintEnginePropertyKey_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPrintEngine::PrintEnginePropertyKey value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPrintEngine_PrintEnginePropertyKey_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPrintEngine_PrintEnginePropertyKey_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPrintEngine_PrintEnginePropertyKey, + qtscript_QPrintEngine_PrintEnginePropertyKey_valueOf, qtscript_QPrintEngine_PrintEnginePropertyKey_toString); + qScriptRegisterMetaType(engine, qtscript_QPrintEngine_PrintEnginePropertyKey_toScriptValue, + qtscript_QPrintEngine_PrintEnginePropertyKey_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 31; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPrintEngine_PrintEnginePropertyKey_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPrintEngine_PrintEnginePropertyKey_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPrintEngine +// + +static QScriptValue qtscript_QPrintEngine_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPrintEngine* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPrintEngine.%0(): this object is not a QPrintEngine") + .arg(qtscript_QPrintEngine_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->abort(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QPaintDevice::PaintDeviceMetric _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->metric(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->newPage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QPrinter::PrinterState _q_result = _q_self->printerState(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QPrintEngine::PrintEnginePropertyKey _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_result = _q_self->property(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 2) { + QPrintEngine::PrintEnginePropertyKey _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setProperty(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 6: { + QString result = QString::fromLatin1("QPrintEngine"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPrintEngine_throw_ambiguity_error_helper(context, + qtscript_QPrintEngine_function_names[_id+1], + qtscript_QPrintEngine_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPrintEngine_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPrintEngine(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPrintEngine* _q_cpp_result = new QtScriptShell_QPrintEngine(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPrintEngine*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPrintEngine_throw_ambiguity_error_helper(context, + qtscript_QPrintEngine_function_names[_id], + qtscript_QPrintEngine_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPrintEngine_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPrintEngine*)0)); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPrintEngine_prototype_call, qtscript_QPrintEngine_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPrintEngine_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPrintEngine_static_call, proto, qtscript_QPrintEngine_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("PrintEnginePropertyKey"), + qtscript_create_QPrintEngine_PrintEnginePropertyKey_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrintPreviewDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrintPreviewDialog.cpp new file mode 100644 index 00000000..e56b4c35 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrintPreviewDialog.cpp @@ -0,0 +1,240 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPrintPreviewDialog.h" + +static const char * const qtscript_QPrintPreviewDialog_function_names[] = { + "QPrintPreviewDialog" + // static + // prototype + , "open" + , "printer" + , "toString" +}; + +static const char * const qtscript_QPrintPreviewDialog_function_signatures[] = { + "QPrinter printer, QWidget parent, WindowFlags flags\nQWidget parent, WindowFlags flags" + // static + // prototype + , "QObject receiver, char member" + , "" +"" +}; + +static const int qtscript_QPrintPreviewDialog_function_lengths[] = { + 3 + // static + // prototype + , 2 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPrintPreviewDialog_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPrintPreviewDialog::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPrintPreviewDialog*) +Q_DECLARE_METATYPE(QtScriptShell_QPrintPreviewDialog*) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(QPrinter*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QDialog*) + +// +// QPrintPreviewDialog +// + +static QScriptValue qtscript_QPrintPreviewDialog_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPrintPreviewDialog* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPrintPreviewDialog.%0(): this object is not a QPrintPreviewDialog") + .arg(qtscript_QPrintPreviewDialog_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->open(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QPrinter* _q_result = _q_self->printer(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QPrintPreviewDialog"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPrintPreviewDialog_throw_ambiguity_error_helper(context, + qtscript_QPrintPreviewDialog_function_names[_id+1], + qtscript_QPrintPreviewDialog_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPrintPreviewDialog_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPrintPreviewDialog(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPrintPreviewDialog* _q_cpp_result = new QtScriptShell_QPrintPreviewDialog(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPrintPreviewDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QPrinter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPrintPreviewDialog* _q_cpp_result = new QtScriptShell_QPrintPreviewDialog(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPrintPreviewDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPrintPreviewDialog* _q_cpp_result = new QtScriptShell_QPrintPreviewDialog(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPrintPreviewDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1))) { + QPrinter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QPrintPreviewDialog* _q_cpp_result = new QtScriptShell_QPrintPreviewDialog(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPrintPreviewDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QPrintPreviewDialog* _q_cpp_result = new QtScriptShell_QPrintPreviewDialog(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPrintPreviewDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + QPrinter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QtScriptShell_QPrintPreviewDialog* _q_cpp_result = new QtScriptShell_QPrintPreviewDialog(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPrintPreviewDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPrintPreviewDialog_throw_ambiguity_error_helper(context, + qtscript_QPrintPreviewDialog_function_names[_id], + qtscript_QPrintPreviewDialog_function_signatures[_id]); +} + +static QScriptValue qtscript_QPrintPreviewDialog_toScriptValue(QScriptEngine *engine, QPrintPreviewDialog* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QPrintPreviewDialog_fromScriptValue(const QScriptValue &value, QPrintPreviewDialog* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QPrintPreviewDialog_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPrintPreviewDialog*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPrintPreviewDialog_prototype_call, qtscript_QPrintPreviewDialog_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPrintPreviewDialog_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QPrintPreviewDialog_toScriptValue, + qtscript_QPrintPreviewDialog_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPrintPreviewDialog_static_call, proto, qtscript_QPrintPreviewDialog_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrintPreviewWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrintPreviewWidget.cpp new file mode 100644 index 00000000..df20d65d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrintPreviewWidget.cpp @@ -0,0 +1,445 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPrintPreviewWidget.h" + +static const char * const qtscript_QPrintPreviewWidget_function_names[] = { + "QPrintPreviewWidget" + // static + // prototype + , "currentPage" + , "orientation" + , "pageCount" + , "setVisible" + , "viewMode" + , "zoomFactor" + , "zoomMode" + , "toString" +}; + +static const char * const qtscript_QPrintPreviewWidget_function_signatures[] = { + "QPrinter printer, QWidget parent, WindowFlags flags\nQWidget parent, WindowFlags flags" + // static + // prototype + , "" + , "" + , "" + , "bool visible" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QPrintPreviewWidget_function_lengths[] = { + 3 + // static + // prototype + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPrintPreviewWidget_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPrintPreviewWidget::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPrintPreviewWidget*) +Q_DECLARE_METATYPE(QtScriptShell_QPrintPreviewWidget*) +Q_DECLARE_METATYPE(QPrintPreviewWidget::ZoomMode) +Q_DECLARE_METATYPE(QPrintPreviewWidget::ViewMode) +Q_DECLARE_METATYPE(QPrinter::Orientation) +Q_DECLARE_METATYPE(QPrinter*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFlags) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QPrintPreviewWidget::ZoomMode +// + +static const QPrintPreviewWidget::ZoomMode qtscript_QPrintPreviewWidget_ZoomMode_values[] = { + QPrintPreviewWidget::CustomZoom + , QPrintPreviewWidget::FitToWidth + , QPrintPreviewWidget::FitInView +}; + +static const char * const qtscript_QPrintPreviewWidget_ZoomMode_keys[] = { + "CustomZoom" + , "FitToWidth" + , "FitInView" +}; + +static QString qtscript_QPrintPreviewWidget_ZoomMode_toStringHelper(QPrintPreviewWidget::ZoomMode value) +{ + if ((value >= QPrintPreviewWidget::CustomZoom) && (value <= QPrintPreviewWidget::FitInView)) + return qtscript_QPrintPreviewWidget_ZoomMode_keys[static_cast(value)-static_cast(QPrintPreviewWidget::CustomZoom)]; + return QString(); +} + +static QScriptValue qtscript_QPrintPreviewWidget_ZoomMode_toScriptValue(QScriptEngine *engine, const QPrintPreviewWidget::ZoomMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPrintPreviewWidget")); + return clazz.property(qtscript_QPrintPreviewWidget_ZoomMode_toStringHelper(value)); +} + +static void qtscript_QPrintPreviewWidget_ZoomMode_fromScriptValue(const QScriptValue &value, QPrintPreviewWidget::ZoomMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPrintPreviewWidget_ZoomMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPrintPreviewWidget::CustomZoom) && (arg <= QPrintPreviewWidget::FitInView)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ZoomMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPrintPreviewWidget_ZoomMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPrintPreviewWidget::ZoomMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPrintPreviewWidget_ZoomMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPrintPreviewWidget::ZoomMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPrintPreviewWidget_ZoomMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPrintPreviewWidget_ZoomMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPrintPreviewWidget_ZoomMode, + qtscript_QPrintPreviewWidget_ZoomMode_valueOf, qtscript_QPrintPreviewWidget_ZoomMode_toString); + qScriptRegisterMetaType(engine, qtscript_QPrintPreviewWidget_ZoomMode_toScriptValue, + qtscript_QPrintPreviewWidget_ZoomMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPrintPreviewWidget_ZoomMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPrintPreviewWidget_ZoomMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPrintPreviewWidget::ViewMode +// + +static const QPrintPreviewWidget::ViewMode qtscript_QPrintPreviewWidget_ViewMode_values[] = { + QPrintPreviewWidget::SinglePageView + , QPrintPreviewWidget::FacingPagesView + , QPrintPreviewWidget::AllPagesView +}; + +static const char * const qtscript_QPrintPreviewWidget_ViewMode_keys[] = { + "SinglePageView" + , "FacingPagesView" + , "AllPagesView" +}; + +static QString qtscript_QPrintPreviewWidget_ViewMode_toStringHelper(QPrintPreviewWidget::ViewMode value) +{ + if ((value >= QPrintPreviewWidget::SinglePageView) && (value <= QPrintPreviewWidget::AllPagesView)) + return qtscript_QPrintPreviewWidget_ViewMode_keys[static_cast(value)-static_cast(QPrintPreviewWidget::SinglePageView)]; + return QString(); +} + +static QScriptValue qtscript_QPrintPreviewWidget_ViewMode_toScriptValue(QScriptEngine *engine, const QPrintPreviewWidget::ViewMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPrintPreviewWidget")); + return clazz.property(qtscript_QPrintPreviewWidget_ViewMode_toStringHelper(value)); +} + +static void qtscript_QPrintPreviewWidget_ViewMode_fromScriptValue(const QScriptValue &value, QPrintPreviewWidget::ViewMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPrintPreviewWidget_ViewMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPrintPreviewWidget::SinglePageView) && (arg <= QPrintPreviewWidget::AllPagesView)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ViewMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPrintPreviewWidget_ViewMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPrintPreviewWidget::ViewMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPrintPreviewWidget_ViewMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPrintPreviewWidget::ViewMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPrintPreviewWidget_ViewMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPrintPreviewWidget_ViewMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPrintPreviewWidget_ViewMode, + qtscript_QPrintPreviewWidget_ViewMode_valueOf, qtscript_QPrintPreviewWidget_ViewMode_toString); + qScriptRegisterMetaType(engine, qtscript_QPrintPreviewWidget_ViewMode_toScriptValue, + qtscript_QPrintPreviewWidget_ViewMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPrintPreviewWidget_ViewMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPrintPreviewWidget_ViewMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPrintPreviewWidget +// + +static QScriptValue qtscript_QPrintPreviewWidget_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 7; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPrintPreviewWidget* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPrintPreviewWidget.%0(): this object is not a QPrintPreviewWidget") + .arg(qtscript_QPrintPreviewWidget_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->currentPage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QPrinter::Orientation _q_result = _q_self->orientation(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->pageCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setVisible(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QPrintPreviewWidget::ViewMode _q_result = _q_self->viewMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->zoomFactor(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QPrintPreviewWidget::ZoomMode _q_result = _q_self->zoomMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: { + QString result = QString::fromLatin1("QPrintPreviewWidget"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPrintPreviewWidget_throw_ambiguity_error_helper(context, + qtscript_QPrintPreviewWidget_function_names[_id+1], + qtscript_QPrintPreviewWidget_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPrintPreviewWidget_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPrintPreviewWidget(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPrintPreviewWidget* _q_cpp_result = new QtScriptShell_QPrintPreviewWidget(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPrintPreviewWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QPrinter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPrintPreviewWidget* _q_cpp_result = new QtScriptShell_QPrintPreviewWidget(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPrintPreviewWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPrintPreviewWidget* _q_cpp_result = new QtScriptShell_QPrintPreviewWidget(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPrintPreviewWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1))) { + QPrinter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QPrintPreviewWidget* _q_cpp_result = new QtScriptShell_QPrintPreviewWidget(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPrintPreviewWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QPrintPreviewWidget* _q_cpp_result = new QtScriptShell_QPrintPreviewWidget(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPrintPreviewWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + QPrinter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QtScriptShell_QPrintPreviewWidget* _q_cpp_result = new QtScriptShell_QPrintPreviewWidget(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPrintPreviewWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPrintPreviewWidget_throw_ambiguity_error_helper(context, + qtscript_QPrintPreviewWidget_function_names[_id], + qtscript_QPrintPreviewWidget_function_signatures[_id]); +} + +static QScriptValue qtscript_QPrintPreviewWidget_toScriptValue(QScriptEngine *engine, QPrintPreviewWidget* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QPrintPreviewWidget_fromScriptValue(const QScriptValue &value, QPrintPreviewWidget* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QPrintPreviewWidget_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPrintPreviewWidget*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPrintPreviewWidget_prototype_call, qtscript_QPrintPreviewWidget_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPrintPreviewWidget_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QPrintPreviewWidget_toScriptValue, + qtscript_QPrintPreviewWidget_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPrintPreviewWidget_static_call, proto, qtscript_QPrintPreviewWidget_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ZoomMode"), + qtscript_create_QPrintPreviewWidget_ZoomMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ViewMode"), + qtscript_create_QPrintPreviewWidget_ViewMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrinter.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrinter.cpp new file mode 100644 index 00000000..822976fc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscript_QPrinter.cpp @@ -0,0 +1,1595 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPrinter.h" + +static const char * const qtscript_QPrinter_function_names[] = { + "QPrinter" + // static + // prototype + , "abort" + , "actualNumCopies" + , "collateCopies" + , "colorMode" + , "copyCount" + , "creator" + , "devType" + , "docName" + , "doubleSidedPrinting" + , "duplex" + , "fontEmbeddingEnabled" + , "fromPage" + , "fullPage" + , "getPageMargins" + , "isValid" + , "newPage" + , "numCopies" + , "orientation" + , "outputFileName" + , "outputFormat" + , "pageOrder" + , "pageRect" + , "paintEngine" + , "paperName" + , "paperRect" + , "paperSize" + , "paperSource" + , "printEngine" + , "printProgram" + , "printRange" + , "printerName" + , "printerState" + , "resolution" + , "setCollateCopies" + , "setColorMode" + , "setCopyCount" + , "setCreator" + , "setDocName" + , "setDoubleSidedPrinting" + , "setDuplex" + , "setFontEmbeddingEnabled" + , "setFromTo" + , "setFullPage" + , "setNumCopies" + , "setOrientation" + , "setOutputFileName" + , "setOutputFormat" + , "setPageMargins" + , "setPageOrder" + , "setPageSizeMM" + , "setPaperName" + , "setPaperSize" + , "setPaperSource" + , "setPrintProgram" + , "setPrintRange" + , "setPrinterName" + , "setResolution" + , "setWinPageSize" + , "supportedResolutions" + , "supportsMultipleCopies" + , "toPage" + , "winPageSize" + , "toString" +}; + +static const char * const qtscript_QPrinter_function_signatures[] = { + "PrinterMode mode\nQPrinterInfo printer, PrinterMode mode" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "qreal left, qreal top, qreal right, qreal bottom, Unit unit" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "\nUnit arg__1" + , "" + , "" + , "\nUnit arg__1" + , "Unit unit" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "bool collate" + , "ColorMode arg__1" + , "int arg__1" + , "String arg__1" + , "String arg__1" + , "bool enable" + , "DuplexMode duplex" + , "bool enable" + , "int fromPage, int toPage" + , "bool arg__1" + , "int arg__1" + , "Orientation arg__1" + , "String arg__1" + , "OutputFormat format" + , "qreal left, qreal top, qreal right, qreal bottom, Unit unit" + , "PageOrder arg__1" + , "QSizeF size" + , "String paperName" + , "QSizeF paperSize, Unit unit" + , "PaperSource arg__1" + , "String arg__1" + , "PrintRange range" + , "String arg__1" + , "int arg__1" + , "int winPageSize" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QPrinter_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 5 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 5 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPrinter_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPrinter::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPrinter*) +Q_DECLARE_METATYPE(QtScriptShell_QPrinter*) +Q_DECLARE_METATYPE(QPrinter::ColorMode) +Q_DECLARE_METATYPE(QPrinter::DuplexMode) +Q_DECLARE_METATYPE(QPrinter::PaperSource) +Q_DECLARE_METATYPE(QPrinter::OutputFormat) +Q_DECLARE_METATYPE(QPrinter::PageOrder) +Q_DECLARE_METATYPE(QPrinter::PrinterState) +Q_DECLARE_METATYPE(QPrinter::PrinterMode) +Q_DECLARE_METATYPE(QPrinter::Orientation) +Q_DECLARE_METATYPE(QPrinter::PrintRange) +Q_DECLARE_METATYPE(QPrinter::Unit) +Q_DECLARE_METATYPE(qreal*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPrintEngine*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QPrinterInfo) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QPrinter::ColorMode +// + +static const QPrinter::ColorMode qtscript_QPrinter_ColorMode_values[] = { + QPrinter::GrayScale + , QPrinter::Color +}; + +static const char * const qtscript_QPrinter_ColorMode_keys[] = { + "GrayScale" + , "Color" +}; + +static QString qtscript_QPrinter_ColorMode_toStringHelper(QPrinter::ColorMode value) +{ + if ((value >= QPrinter::GrayScale) && (value <= QPrinter::Color)) + return qtscript_QPrinter_ColorMode_keys[static_cast(value)-static_cast(QPrinter::GrayScale)]; + return QString(); +} + +static QScriptValue qtscript_QPrinter_ColorMode_toScriptValue(QScriptEngine *engine, const QPrinter::ColorMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPrinter")); + return clazz.property(qtscript_QPrinter_ColorMode_toStringHelper(value)); +} + +static void qtscript_QPrinter_ColorMode_fromScriptValue(const QScriptValue &value, QPrinter::ColorMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPrinter_ColorMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPrinter::GrayScale) && (arg <= QPrinter::Color)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ColorMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPrinter_ColorMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::ColorMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPrinter_ColorMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::ColorMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPrinter_ColorMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPrinter_ColorMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPrinter_ColorMode, + qtscript_QPrinter_ColorMode_valueOf, qtscript_QPrinter_ColorMode_toString); + qScriptRegisterMetaType(engine, qtscript_QPrinter_ColorMode_toScriptValue, + qtscript_QPrinter_ColorMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPrinter_ColorMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPrinter_ColorMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPrinter::DuplexMode +// + +static const QPrinter::DuplexMode qtscript_QPrinter_DuplexMode_values[] = { + QPrinter::DuplexNone + , QPrinter::DuplexAuto + , QPrinter::DuplexLongSide + , QPrinter::DuplexShortSide +}; + +static const char * const qtscript_QPrinter_DuplexMode_keys[] = { + "DuplexNone" + , "DuplexAuto" + , "DuplexLongSide" + , "DuplexShortSide" +}; + +static QString qtscript_QPrinter_DuplexMode_toStringHelper(QPrinter::DuplexMode value) +{ + if ((value >= QPrinter::DuplexNone) && (value <= QPrinter::DuplexShortSide)) + return qtscript_QPrinter_DuplexMode_keys[static_cast(value)-static_cast(QPrinter::DuplexNone)]; + return QString(); +} + +static QScriptValue qtscript_QPrinter_DuplexMode_toScriptValue(QScriptEngine *engine, const QPrinter::DuplexMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPrinter")); + return clazz.property(qtscript_QPrinter_DuplexMode_toStringHelper(value)); +} + +static void qtscript_QPrinter_DuplexMode_fromScriptValue(const QScriptValue &value, QPrinter::DuplexMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPrinter_DuplexMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPrinter::DuplexNone) && (arg <= QPrinter::DuplexShortSide)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("DuplexMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPrinter_DuplexMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::DuplexMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPrinter_DuplexMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::DuplexMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPrinter_DuplexMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPrinter_DuplexMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPrinter_DuplexMode, + qtscript_QPrinter_DuplexMode_valueOf, qtscript_QPrinter_DuplexMode_toString); + qScriptRegisterMetaType(engine, qtscript_QPrinter_DuplexMode_toScriptValue, + qtscript_QPrinter_DuplexMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPrinter_DuplexMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPrinter_DuplexMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPrinter::PaperSource +// + +static const QPrinter::PaperSource qtscript_QPrinter_PaperSource_values[] = { + QPrinter::OnlyOne + , QPrinter::Lower + , QPrinter::Middle + , QPrinter::Manual + , QPrinter::Envelope + , QPrinter::EnvelopeManual + , QPrinter::Auto + , QPrinter::Tractor + , QPrinter::SmallFormat + , QPrinter::LargeFormat + , QPrinter::LargeCapacity + , QPrinter::Cassette + , QPrinter::FormSource + , QPrinter::MaxPageSource + , QPrinter::CustomSource +}; + +static const char * const qtscript_QPrinter_PaperSource_keys[] = { + "OnlyOne" + , "Lower" + , "Middle" + , "Manual" + , "Envelope" + , "EnvelopeManual" + , "Auto" + , "Tractor" + , "SmallFormat" + , "LargeFormat" + , "LargeCapacity" + , "Cassette" + , "FormSource" + , "MaxPageSource" + , "CustomSource" +}; + +static QString qtscript_QPrinter_PaperSource_toStringHelper(QPrinter::PaperSource value) +{ + if ((value >= QPrinter::OnlyOne) && (value <= QPrinter::CustomSource)) + return qtscript_QPrinter_PaperSource_keys[static_cast(value)-static_cast(QPrinter::OnlyOne)]; + return QString(); +} + +static QScriptValue qtscript_QPrinter_PaperSource_toScriptValue(QScriptEngine *engine, const QPrinter::PaperSource &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPrinter")); + return clazz.property(qtscript_QPrinter_PaperSource_toStringHelper(value)); +} + +static void qtscript_QPrinter_PaperSource_fromScriptValue(const QScriptValue &value, QPrinter::PaperSource &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPrinter_PaperSource(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPrinter::OnlyOne) && (arg <= QPrinter::CustomSource)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("PaperSource(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPrinter_PaperSource_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::PaperSource value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPrinter_PaperSource_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::PaperSource value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPrinter_PaperSource_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPrinter_PaperSource_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPrinter_PaperSource, + qtscript_QPrinter_PaperSource_valueOf, qtscript_QPrinter_PaperSource_toString); + qScriptRegisterMetaType(engine, qtscript_QPrinter_PaperSource_toScriptValue, + qtscript_QPrinter_PaperSource_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 15; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPrinter_PaperSource_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPrinter_PaperSource_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPrinter::OutputFormat +// + +static const QPrinter::OutputFormat qtscript_QPrinter_OutputFormat_values[] = { + QPrinter::NativeFormat + , QPrinter::PdfFormat +}; + +static const char * const qtscript_QPrinter_OutputFormat_keys[] = { + "NativeFormat" + , "PdfFormat" +}; + +static QString qtscript_QPrinter_OutputFormat_toStringHelper(QPrinter::OutputFormat value) +{ + if ((value >= QPrinter::NativeFormat) && (value <= QPrinter::PdfFormat)) + return qtscript_QPrinter_OutputFormat_keys[static_cast(value)-static_cast(QPrinter::NativeFormat)]; + return QString(); +} + +static QScriptValue qtscript_QPrinter_OutputFormat_toScriptValue(QScriptEngine *engine, const QPrinter::OutputFormat &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPrinter")); + return clazz.property(qtscript_QPrinter_OutputFormat_toStringHelper(value)); +} + +static void qtscript_QPrinter_OutputFormat_fromScriptValue(const QScriptValue &value, QPrinter::OutputFormat &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPrinter_OutputFormat(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPrinter::NativeFormat) && (arg <= QPrinter::PdfFormat)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("OutputFormat(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPrinter_OutputFormat_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::OutputFormat value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPrinter_OutputFormat_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::OutputFormat value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPrinter_OutputFormat_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPrinter_OutputFormat_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPrinter_OutputFormat, + qtscript_QPrinter_OutputFormat_valueOf, qtscript_QPrinter_OutputFormat_toString); + qScriptRegisterMetaType(engine, qtscript_QPrinter_OutputFormat_toScriptValue, + qtscript_QPrinter_OutputFormat_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPrinter_OutputFormat_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPrinter_OutputFormat_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPrinter::PageOrder +// + +static const QPrinter::PageOrder qtscript_QPrinter_PageOrder_values[] = { + QPrinter::FirstPageFirst + , QPrinter::LastPageFirst +}; + +static const char * const qtscript_QPrinter_PageOrder_keys[] = { + "FirstPageFirst" + , "LastPageFirst" +}; + +static QString qtscript_QPrinter_PageOrder_toStringHelper(QPrinter::PageOrder value) +{ + if ((value >= QPrinter::FirstPageFirst) && (value <= QPrinter::LastPageFirst)) + return qtscript_QPrinter_PageOrder_keys[static_cast(value)-static_cast(QPrinter::FirstPageFirst)]; + return QString(); +} + +static QScriptValue qtscript_QPrinter_PageOrder_toScriptValue(QScriptEngine *engine, const QPrinter::PageOrder &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPrinter")); + return clazz.property(qtscript_QPrinter_PageOrder_toStringHelper(value)); +} + +static void qtscript_QPrinter_PageOrder_fromScriptValue(const QScriptValue &value, QPrinter::PageOrder &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPrinter_PageOrder(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPrinter::FirstPageFirst) && (arg <= QPrinter::LastPageFirst)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("PageOrder(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPrinter_PageOrder_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::PageOrder value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPrinter_PageOrder_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::PageOrder value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPrinter_PageOrder_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPrinter_PageOrder_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPrinter_PageOrder, + qtscript_QPrinter_PageOrder_valueOf, qtscript_QPrinter_PageOrder_toString); + qScriptRegisterMetaType(engine, qtscript_QPrinter_PageOrder_toScriptValue, + qtscript_QPrinter_PageOrder_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPrinter_PageOrder_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPrinter_PageOrder_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPrinter::PrinterState +// + +static const QPrinter::PrinterState qtscript_QPrinter_PrinterState_values[] = { + QPrinter::Idle + , QPrinter::Active + , QPrinter::Aborted + , QPrinter::Error +}; + +static const char * const qtscript_QPrinter_PrinterState_keys[] = { + "Idle" + , "Active" + , "Aborted" + , "Error" +}; + +static QString qtscript_QPrinter_PrinterState_toStringHelper(QPrinter::PrinterState value) +{ + if ((value >= QPrinter::Idle) && (value <= QPrinter::Error)) + return qtscript_QPrinter_PrinterState_keys[static_cast(value)-static_cast(QPrinter::Idle)]; + return QString(); +} + +static QScriptValue qtscript_QPrinter_PrinterState_toScriptValue(QScriptEngine *engine, const QPrinter::PrinterState &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPrinter")); + return clazz.property(qtscript_QPrinter_PrinterState_toStringHelper(value)); +} + +static void qtscript_QPrinter_PrinterState_fromScriptValue(const QScriptValue &value, QPrinter::PrinterState &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPrinter_PrinterState(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPrinter::Idle) && (arg <= QPrinter::Error)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("PrinterState(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPrinter_PrinterState_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::PrinterState value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPrinter_PrinterState_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::PrinterState value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPrinter_PrinterState_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPrinter_PrinterState_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPrinter_PrinterState, + qtscript_QPrinter_PrinterState_valueOf, qtscript_QPrinter_PrinterState_toString); + qScriptRegisterMetaType(engine, qtscript_QPrinter_PrinterState_toScriptValue, + qtscript_QPrinter_PrinterState_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPrinter_PrinterState_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPrinter_PrinterState_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPrinter::PrinterMode +// + +static const QPrinter::PrinterMode qtscript_QPrinter_PrinterMode_values[] = { + QPrinter::ScreenResolution + , QPrinter::PrinterResolution + , QPrinter::HighResolution +}; + +static const char * const qtscript_QPrinter_PrinterMode_keys[] = { + "ScreenResolution" + , "PrinterResolution" + , "HighResolution" +}; + +static QString qtscript_QPrinter_PrinterMode_toStringHelper(QPrinter::PrinterMode value) +{ + if ((value >= QPrinter::ScreenResolution) && (value <= QPrinter::HighResolution)) + return qtscript_QPrinter_PrinterMode_keys[static_cast(value)-static_cast(QPrinter::ScreenResolution)]; + return QString(); +} + +static QScriptValue qtscript_QPrinter_PrinterMode_toScriptValue(QScriptEngine *engine, const QPrinter::PrinterMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPrinter")); + return clazz.property(qtscript_QPrinter_PrinterMode_toStringHelper(value)); +} + +static void qtscript_QPrinter_PrinterMode_fromScriptValue(const QScriptValue &value, QPrinter::PrinterMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPrinter_PrinterMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPrinter::ScreenResolution) && (arg <= QPrinter::HighResolution)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("PrinterMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPrinter_PrinterMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::PrinterMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPrinter_PrinterMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::PrinterMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPrinter_PrinterMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPrinter_PrinterMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPrinter_PrinterMode, + qtscript_QPrinter_PrinterMode_valueOf, qtscript_QPrinter_PrinterMode_toString); + qScriptRegisterMetaType(engine, qtscript_QPrinter_PrinterMode_toScriptValue, + qtscript_QPrinter_PrinterMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPrinter_PrinterMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPrinter_PrinterMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPrinter::Orientation +// + +static const QPrinter::Orientation qtscript_QPrinter_Orientation_values[] = { + QPrinter::Portrait + , QPrinter::Landscape +}; + +static const char * const qtscript_QPrinter_Orientation_keys[] = { + "Portrait" + , "Landscape" +}; + +static QString qtscript_QPrinter_Orientation_toStringHelper(QPrinter::Orientation value) +{ + if ((value >= QPrinter::Portrait) && (value <= QPrinter::Landscape)) + return qtscript_QPrinter_Orientation_keys[static_cast(value)-static_cast(QPrinter::Portrait)]; + return QString(); +} + +static QScriptValue qtscript_QPrinter_Orientation_toScriptValue(QScriptEngine *engine, const QPrinter::Orientation &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPrinter")); + return clazz.property(qtscript_QPrinter_Orientation_toStringHelper(value)); +} + +static void qtscript_QPrinter_Orientation_fromScriptValue(const QScriptValue &value, QPrinter::Orientation &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPrinter_Orientation(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPrinter::Portrait) && (arg <= QPrinter::Landscape)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Orientation(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPrinter_Orientation_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::Orientation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPrinter_Orientation_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::Orientation value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPrinter_Orientation_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPrinter_Orientation_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPrinter_Orientation, + qtscript_QPrinter_Orientation_valueOf, qtscript_QPrinter_Orientation_toString); + qScriptRegisterMetaType(engine, qtscript_QPrinter_Orientation_toScriptValue, + qtscript_QPrinter_Orientation_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPrinter_Orientation_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPrinter_Orientation_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPrinter::PrintRange +// + +static const QPrinter::PrintRange qtscript_QPrinter_PrintRange_values[] = { + QPrinter::AllPages + , QPrinter::Selection + , QPrinter::PageRange + , QPrinter::CurrentPage +}; + +static const char * const qtscript_QPrinter_PrintRange_keys[] = { + "AllPages" + , "Selection" + , "PageRange" + , "CurrentPage" +}; + +static QString qtscript_QPrinter_PrintRange_toStringHelper(QPrinter::PrintRange value) +{ + if ((value >= QPrinter::AllPages) && (value <= QPrinter::CurrentPage)) + return qtscript_QPrinter_PrintRange_keys[static_cast(value)-static_cast(QPrinter::AllPages)]; + return QString(); +} + +static QScriptValue qtscript_QPrinter_PrintRange_toScriptValue(QScriptEngine *engine, const QPrinter::PrintRange &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPrinter")); + return clazz.property(qtscript_QPrinter_PrintRange_toStringHelper(value)); +} + +static void qtscript_QPrinter_PrintRange_fromScriptValue(const QScriptValue &value, QPrinter::PrintRange &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPrinter_PrintRange(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPrinter::AllPages) && (arg <= QPrinter::CurrentPage)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("PrintRange(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPrinter_PrintRange_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::PrintRange value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPrinter_PrintRange_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::PrintRange value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPrinter_PrintRange_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPrinter_PrintRange_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPrinter_PrintRange, + qtscript_QPrinter_PrintRange_valueOf, qtscript_QPrinter_PrintRange_toString); + qScriptRegisterMetaType(engine, qtscript_QPrinter_PrintRange_toScriptValue, + qtscript_QPrinter_PrintRange_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPrinter_PrintRange_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPrinter_PrintRange_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPrinter::Unit +// + +static const QPrinter::Unit qtscript_QPrinter_Unit_values[] = { + QPrinter::Millimeter + , QPrinter::Point + , QPrinter::Inch + , QPrinter::Pica + , QPrinter::Didot + , QPrinter::Cicero + , QPrinter::DevicePixel +}; + +static const char * const qtscript_QPrinter_Unit_keys[] = { + "Millimeter" + , "Point" + , "Inch" + , "Pica" + , "Didot" + , "Cicero" + , "DevicePixel" +}; + +static QString qtscript_QPrinter_Unit_toStringHelper(QPrinter::Unit value) +{ + if ((value >= QPrinter::Millimeter) && (value <= QPrinter::DevicePixel)) + return qtscript_QPrinter_Unit_keys[static_cast(value)-static_cast(QPrinter::Millimeter)]; + return QString(); +} + +static QScriptValue qtscript_QPrinter_Unit_toScriptValue(QScriptEngine *engine, const QPrinter::Unit &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPrinter")); + return clazz.property(qtscript_QPrinter_Unit_toStringHelper(value)); +} + +static void qtscript_QPrinter_Unit_fromScriptValue(const QScriptValue &value, QPrinter::Unit &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPrinter_Unit(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPrinter::Millimeter) && (arg <= QPrinter::DevicePixel)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Unit(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPrinter_Unit_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::Unit value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPrinter_Unit_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPrinter::Unit value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPrinter_Unit_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPrinter_Unit_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPrinter_Unit, + qtscript_QPrinter_Unit_valueOf, qtscript_QPrinter_Unit_toString); + qScriptRegisterMetaType(engine, qtscript_QPrinter_Unit_toScriptValue, + qtscript_QPrinter_Unit_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 7; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPrinter_Unit_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPrinter_Unit_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPrinter +// + +static QScriptValue qtscript_QPrinter_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 62; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPrinter* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPrinter.%0(): this object is not a QPrinter") + .arg(qtscript_QPrinter_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->abort(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->actualNumCopies(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->collateCopies(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QPrinter::ColorMode _q_result = _q_self->colorMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->copyCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->creator(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = _q_self->devType(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->docName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->doubleSidedPrinting(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QPrinter::DuplexMode _q_result = _q_self->duplex(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->fontEmbeddingEnabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + int _q_result = _q_self->fromPage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->fullPage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 5) { + qreal* _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal* _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal* _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal* _q_arg3 = qscriptvalue_cast(context->argument(3)); + QPrinter::Unit _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->getPageMargins(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->newPage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + int _q_result = _q_self->numCopies(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QPrinter::Orientation _q_result = _q_self->orientation(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->outputFileName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QPrinter::OutputFormat _q_result = _q_self->outputFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QPrinter::PageOrder _q_result = _q_self->pageOrder(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->pageRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QPrinter::Unit _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->pageRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + QPaintEngine* _q_result = _q_self->paintEngine(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->paperName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->paperRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QPrinter::Unit _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->paperRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QPrinter::Unit _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizeF _q_result = _q_self->paperSize(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + QPrinter::PaperSource _q_result = _q_self->paperSource(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + QPrintEngine* _q_result = _q_self->printEngine(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->printProgram(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 0) { + QPrinter::PrintRange _q_result = _q_self->printRange(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->printerName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 0) { + QPrinter::PrinterState _q_result = _q_self->printerState(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 0) { + int _q_result = _q_self->resolution(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setCollateCopies(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 1) { + QPrinter::ColorMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setColorMode(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setCopyCount(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setCreator(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setDocName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setDoubleSidedPrinting(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 39: + if (context->argumentCount() == 1) { + QPrinter::DuplexMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDuplex(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setFontEmbeddingEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setFromTo(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 42: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setFullPage(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 43: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setNumCopies(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 44: + if (context->argumentCount() == 1) { + QPrinter::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOrientation(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 45: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setOutputFileName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 46: + if (context->argumentCount() == 1) { + QPrinter::OutputFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOutputFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 47: + if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QPrinter::Unit _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->setPageMargins(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + break; + + case 48: + if (context->argumentCount() == 1) { + QPrinter::PageOrder _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPageOrder(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 49: + if (context->argumentCount() == 1) { + QSizeF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPageSizeMM(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 50: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPaperName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 51: + if (context->argumentCount() == 2) { + QSizeF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPrinter::Unit _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setPaperSize(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 52: + if (context->argumentCount() == 1) { + QPrinter::PaperSource _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPaperSource(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 53: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPrintProgram(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 54: + if (context->argumentCount() == 1) { + QPrinter::PrintRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPrintRange(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 55: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPrinterName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 56: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setResolution(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 57: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setWinPageSize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 58: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->supportedResolutions(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 59: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->supportsMultipleCopies(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 60: + if (context->argumentCount() == 0) { + int _q_result = _q_self->toPage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 61: + if (context->argumentCount() == 0) { + int _q_result = _q_self->winPageSize(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 62: { + QString result = QString::fromLatin1("QPrinter"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPrinter_throw_ambiguity_error_helper(context, + qtscript_QPrinter_function_names[_id+1], + qtscript_QPrinter_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPrinter_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPrinter(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPrinter* _q_cpp_result = new QtScriptShell_QPrinter(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPrinter*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPrinter::PrinterMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPrinter* _q_cpp_result = new QtScriptShell_QPrinter(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPrinter*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPrinterInfo _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPrinter* _q_cpp_result = new QtScriptShell_QPrinter(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPrinter*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QPrinterInfo _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPrinter::PrinterMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QPrinter* _q_cpp_result = new QtScriptShell_QPrinter(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPrinter*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPrinter_throw_ambiguity_error_helper(context, + qtscript_QPrinter_function_names[_id], + qtscript_QPrinter_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPrinter_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPrinter*)0)); + for (int i = 0; i < 63; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPrinter_prototype_call, qtscript_QPrinter_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPrinter_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPrinter_static_call, proto, qtscript_QPrinter_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ColorMode"), + qtscript_create_QPrinter_ColorMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("DuplexMode"), + qtscript_create_QPrinter_DuplexMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("PaperSource"), + qtscript_create_QPrinter_PaperSource_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("OutputFormat"), + qtscript_create_QPrinter_OutputFormat_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("PageOrder"), + qtscript_create_QPrinter_PageOrder_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("PrinterState"), + qtscript_create_QPrinter_PrinterState_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("PrinterMode"), + qtscript_create_QPrinter_PrinterMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Orientation"), + qtscript_create_QPrinter_Orientation_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("PrintRange"), + qtscript_create_QPrinter_PrintRange_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Unit"), + qtscript_create_QPrinter_Unit_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QAbstractPrintDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QAbstractPrintDialog.cpp new file mode 100644 index 00000000..508127fa --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QAbstractPrintDialog.cpp @@ -0,0 +1,708 @@ +#include "qtscriptshell_QAbstractPrintDialog.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QAbstractPrintDialog::QtScriptShell_QAbstractPrintDialog(QPrinter* printer, QWidget* parent) + : QAbstractPrintDialog(printer, parent) {} + +QtScriptShell_QAbstractPrintDialog::~QtScriptShell_QAbstractPrintDialog() {} + +void QtScriptShell_QAbstractPrintDialog::accept() +{ + QScriptValue _q_function = __qtscript_self.property("accept"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("accept") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::accept(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QAbstractPrintDialog::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractPrintDialog::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractPrintDialog::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractPrintDialog::closeEvent(QCloseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::closeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractPrintDialog::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractPrintDialog::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAbstractPrintDialog::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QAbstractPrintDialog::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractPrintDialog::done(int arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("done"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("done") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::done(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractPrintDialog::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractPrintDialog::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractPrintDialog::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractPrintDialog::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractPrintDialog::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractPrintDialog::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAbstractPrintDialog::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QAbstractPrintDialog::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAbstractPrintDialog::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +int QtScriptShell_QAbstractPrintDialog::exec() +{ + QScriptValue _q_function = __qtscript_self.property("exec"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("exec") & QScriptValue::QObjectMember)) { + qFatal("QAbstractPrintDialog::exec() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractPrintDialog::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractPrintDialog::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QAbstractPrintDialog::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QAbstractPrintDialog::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractPrintDialog::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QAbstractPrintDialog::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QAbstractPrintDialog::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QAbstractPrintDialog::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QAbstractPrintDialog::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractPrintDialog::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QAbstractPrintDialog::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QAbstractPrintDialog::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QAbstractPrintDialog::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QAbstractPrintDialog::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractPrintDialog::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractPrintDialog::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAbstractPrintDialog::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QAbstractPrintDialog::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QAbstractPrintDialog::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractPrintDialog::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractPrintDialog::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractPrintDialog::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractPrintDialog::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractPrintDialog::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QAbstractPrintDialog::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +void QtScriptShell_QAbstractPrintDialog::open() +{ + QScriptValue _q_function = __qtscript_self.property("open"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("open") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::open(); + } else { + _q_function.call(__qtscript_self); + } +} + +QPaintEngine* QtScriptShell_QAbstractPrintDialog::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QAbstractPrintDialog::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractPrintDialog::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QAbstractPrintDialog::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QAbstractPrintDialog::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QAbstractPrintDialog::reject() +{ + QScriptValue _q_function = __qtscript_self.property("reject"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reject") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::reject(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QAbstractPrintDialog::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPainter* QtScriptShell_QAbstractPrintDialog::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QAbstractPrintDialog::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractPrintDialog::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractPrintDialog::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractPrintDialog::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractPrintDialog::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QAbstractPrintDialog::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QAbstractPrintDialog.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QAbstractPrintDialog.h new file mode 100644 index 00000000..55069175 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QAbstractPrintDialog.h @@ -0,0 +1,66 @@ +#ifndef QTSCRIPTSHELL_QABSTRACTPRINTDIALOG_H +#define QTSCRIPTSHELL_QABSTRACTPRINTDIALOG_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAbstractPrintDialog : public QAbstractPrintDialog +{ +public: + QtScriptShell_QAbstractPrintDialog(QPrinter* printer, QWidget* parent = 0); + ~QtScriptShell_QAbstractPrintDialog(); + + void accept(); + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* arg__1); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void done(int arg__1); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + int exec(); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + void open(); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void reject(); + void resizeEvent(QResizeEvent* arg__1); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QABSTRACTPRINTDIALOG_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPageSetupDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPageSetupDialog.cpp new file mode 100644 index 00000000..341bc985 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPageSetupDialog.cpp @@ -0,0 +1,700 @@ +#include "qtscriptshell_QPageSetupDialog.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QPageSetupDialog::QtScriptShell_QPageSetupDialog(QPrinter* printer, QWidget* parent) + : QPageSetupDialog(printer, parent) {} + +QtScriptShell_QPageSetupDialog::QtScriptShell_QPageSetupDialog(QWidget* parent) + : QPageSetupDialog(parent) {} + +QtScriptShell_QPageSetupDialog::~QtScriptShell_QPageSetupDialog() {} + +void QtScriptShell_QPageSetupDialog::accept() +{ + QScriptValue _q_function = __qtscript_self.property("accept"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("accept") & QScriptValue::QObjectMember)) { + QPageSetupDialog::accept(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QPageSetupDialog::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPageSetupDialog::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPageSetupDialog::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPageSetupDialog::closeEvent(QCloseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::closeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPageSetupDialog::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPageSetupDialog::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QPageSetupDialog::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QPageSetupDialog::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPageSetupDialog::done(int result) +{ + QScriptValue _q_function = __qtscript_self.property("done"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("done") & QScriptValue::QObjectMember)) { + QPageSetupDialog::done(result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, result)); + } +} + +void QtScriptShell_QPageSetupDialog::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPageSetupDialog::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPageSetupDialog::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPageSetupDialog::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPageSetupDialog::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPageSetupDialog::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QPageSetupDialog::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QPageSetupDialog::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QPageSetupDialog::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +int QtScriptShell_QPageSetupDialog::exec() +{ + QScriptValue _q_function = __qtscript_self.property("exec"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("exec") & QScriptValue::QObjectMember)) { + return QPageSetupDialog::exec(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPageSetupDialog::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPageSetupDialog::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QPageSetupDialog::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QPageSetupDialog::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPageSetupDialog::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QPageSetupDialog::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QPageSetupDialog::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QPageSetupDialog::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QPageSetupDialog::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPageSetupDialog::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QPageSetupDialog::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QPageSetupDialog::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QPageSetupDialog::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QPageSetupDialog::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QPageSetupDialog::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPageSetupDialog::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPageSetupDialog::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QPageSetupDialog::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QPageSetupDialog::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QPageSetupDialog::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPageSetupDialog::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPageSetupDialog::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPageSetupDialog::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPageSetupDialog::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPageSetupDialog::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QPageSetupDialog::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QPageSetupDialog::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QPageSetupDialog::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPageSetupDialog::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QPageSetupDialog::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QPageSetupDialog::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QPageSetupDialog::reject() +{ + QScriptValue _q_function = __qtscript_self.property("reject"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reject") & QScriptValue::QObjectMember)) { + QPageSetupDialog::reject(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QPageSetupDialog::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPainter* QtScriptShell_QPageSetupDialog::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QPageSetupDialog::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPageSetupDialog::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPageSetupDialog::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPageSetupDialog::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPageSetupDialog::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QPageSetupDialog::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPageSetupDialog.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPageSetupDialog.h new file mode 100644 index 00000000..a105d660 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPageSetupDialog.h @@ -0,0 +1,66 @@ +#ifndef QTSCRIPTSHELL_QPAGESETUPDIALOG_H +#define QTSCRIPTSHELL_QPAGESETUPDIALOG_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPageSetupDialog : public QPageSetupDialog +{ +public: + QtScriptShell_QPageSetupDialog(QPrinter* printer, QWidget* parent = 0); + QtScriptShell_QPageSetupDialog(QWidget* parent = 0); + ~QtScriptShell_QPageSetupDialog(); + + void accept(); + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* arg__1); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void done(int result); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + int exec(); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void reject(); + void resizeEvent(QResizeEvent* arg__1); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPAGESETUPDIALOG_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintDialog.cpp new file mode 100644 index 00000000..5dda3bdd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintDialog.cpp @@ -0,0 +1,700 @@ +#include "qtscriptshell_QPrintDialog.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QPrintDialog::QtScriptShell_QPrintDialog(QPrinter* printer, QWidget* parent) + : QPrintDialog(printer, parent) {} + +QtScriptShell_QPrintDialog::QtScriptShell_QPrintDialog(QWidget* parent) + : QPrintDialog(parent) {} + +QtScriptShell_QPrintDialog::~QtScriptShell_QPrintDialog() {} + +void QtScriptShell_QPrintDialog::accept() +{ + QScriptValue _q_function = __qtscript_self.property("accept"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("accept") & QScriptValue::QObjectMember)) { + QPrintDialog::accept(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QPrintDialog::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintDialog::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPrintDialog::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintDialog::closeEvent(QCloseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::closeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPrintDialog::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPrintDialog::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QPrintDialog::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QPrintDialog::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPrintDialog::done(int result) +{ + QScriptValue _q_function = __qtscript_self.property("done"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("done") & QScriptValue::QObjectMember)) { + QPrintDialog::done(result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, result)); + } +} + +void QtScriptShell_QPrintDialog::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintDialog::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintDialog::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintDialog::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintDialog::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPrintDialog::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QPrintDialog::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QPrintDialog::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QPrintDialog::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +int QtScriptShell_QPrintDialog::exec() +{ + QScriptValue _q_function = __qtscript_self.property("exec"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("exec") & QScriptValue::QObjectMember)) { + return QPrintDialog::exec(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPrintDialog::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPrintDialog::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QPrintDialog::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QPrintDialog::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPrintDialog::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QPrintDialog::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QPrintDialog::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QPrintDialog::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QPrintDialog::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintDialog::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QPrintDialog::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QPrintDialog::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QPrintDialog::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QPrintDialog::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QPrintDialog::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPrintDialog::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintDialog::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QPrintDialog::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QPrintDialog::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QPrintDialog::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintDialog::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintDialog::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintDialog::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintDialog::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPrintDialog::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QPrintDialog::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QPrintDialog::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QPrintDialog::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPrintDialog::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QPrintDialog::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QPrintDialog::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QPrintDialog::reject() +{ + QScriptValue _q_function = __qtscript_self.property("reject"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reject") & QScriptValue::QObjectMember)) { + QPrintDialog::reject(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QPrintDialog::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPainter* QtScriptShell_QPrintDialog::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QPrintDialog::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPrintDialog::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPrintDialog::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintDialog::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintDialog::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QPrintDialog::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintDialog.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintDialog.h new file mode 100644 index 00000000..e1efcee5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintDialog.h @@ -0,0 +1,66 @@ +#ifndef QTSCRIPTSHELL_QPRINTDIALOG_H +#define QTSCRIPTSHELL_QPRINTDIALOG_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPrintDialog : public QPrintDialog +{ +public: + QtScriptShell_QPrintDialog(QPrinter* printer, QWidget* parent = 0); + QtScriptShell_QPrintDialog(QWidget* parent = 0); + ~QtScriptShell_QPrintDialog(); + + void accept(); + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* arg__1); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void done(int result); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + int exec(); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void reject(); + void resizeEvent(QResizeEvent* arg__1); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPRINTDIALOG_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintEngine.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintEngine.cpp new file mode 100644 index 00000000..4c91770f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintEngine.cpp @@ -0,0 +1,92 @@ +#include "qtscriptshell_QPrintEngine.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QPrinter::PrinterState) +Q_DECLARE_METATYPE(QPrintEngine::PrintEnginePropertyKey) + +QtScriptShell_QPrintEngine::QtScriptShell_QPrintEngine() + : QPrintEngine() {} + +QtScriptShell_QPrintEngine::~QtScriptShell_QPrintEngine() {} + +bool QtScriptShell_QPrintEngine::abort() +{ + QScriptValue _q_function = __qtscript_self.property("abort"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("abort") & QScriptValue::QObjectMember)) { + qFatal("QPrintEngine::abort() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QPrintEngine::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + qFatal("QPrintEngine::metric() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QPrintEngine::newPage() +{ + QScriptValue _q_function = __qtscript_self.property("newPage"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("newPage") & QScriptValue::QObjectMember)) { + qFatal("QPrintEngine::newPage() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QPrinter::PrinterState QtScriptShell_QPrintEngine::printerState() const +{ + QScriptValue _q_function = __qtscript_self.property("printerState"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("printerState") & QScriptValue::QObjectMember)) { + qFatal("QPrintEngine::printerState() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QVariant QtScriptShell_QPrintEngine::property(QPrintEngine::PrintEnginePropertyKey key) const +{ + QScriptValue _q_function = __qtscript_self.property("property"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("property") & QScriptValue::QObjectMember)) { + qFatal("QPrintEngine::property() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, key))); + } +} + +void QtScriptShell_QPrintEngine::setProperty(QPrintEngine::PrintEnginePropertyKey key, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("setProperty"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setProperty") & QScriptValue::QObjectMember)) { + qFatal("QPrintEngine::setProperty() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, key) + << qScriptValueFromValue(_q_engine, value)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintEngine.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintEngine.h new file mode 100644 index 00000000..139f13f1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintEngine.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QPRINTENGINE_H +#define QTSCRIPTSHELL_QPRINTENGINE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPrintEngine : public QPrintEngine +{ +public: + QtScriptShell_QPrintEngine(); + ~QtScriptShell_QPrintEngine(); + + bool abort(); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + bool newPage(); + QPrinter::PrinterState printerState() const; + QVariant property(QPrintEngine::PrintEnginePropertyKey key) const; + void setProperty(QPrintEngine::PrintEnginePropertyKey key, const QVariant& value); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPRINTENGINE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintPreviewDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintPreviewDialog.cpp new file mode 100644 index 00000000..a0d07b77 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintPreviewDialog.cpp @@ -0,0 +1,700 @@ +#include "qtscriptshell_QPrintPreviewDialog.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QPrintPreviewDialog::QtScriptShell_QPrintPreviewDialog(QPrinter* printer, QWidget* parent, Qt::WindowFlags flags) + : QPrintPreviewDialog(printer, parent, flags) {} + +QtScriptShell_QPrintPreviewDialog::QtScriptShell_QPrintPreviewDialog(QWidget* parent, Qt::WindowFlags flags) + : QPrintPreviewDialog(parent, flags) {} + +QtScriptShell_QPrintPreviewDialog::~QtScriptShell_QPrintPreviewDialog() {} + +void QtScriptShell_QPrintPreviewDialog::accept() +{ + QScriptValue _q_function = __qtscript_self.property("accept"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("accept") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::accept(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QPrintPreviewDialog::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewDialog::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPrintPreviewDialog::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewDialog::closeEvent(QCloseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::closeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPrintPreviewDialog::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPrintPreviewDialog::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QPrintPreviewDialog::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QPrintPreviewDialog::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPrintPreviewDialog::done(int result) +{ + QScriptValue _q_function = __qtscript_self.property("done"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("done") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::done(result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, result)); + } +} + +void QtScriptShell_QPrintPreviewDialog::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewDialog::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewDialog::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewDialog::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewDialog::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPrintPreviewDialog::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QPrintPreviewDialog::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QPrintPreviewDialog::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QPrintPreviewDialog::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +int QtScriptShell_QPrintPreviewDialog::exec() +{ + QScriptValue _q_function = __qtscript_self.property("exec"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("exec") & QScriptValue::QObjectMember)) { + return QPrintPreviewDialog::exec(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPrintPreviewDialog::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPrintPreviewDialog::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QPrintPreviewDialog::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QPrintPreviewDialog::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPrintPreviewDialog::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QPrintPreviewDialog::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QPrintPreviewDialog::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QPrintPreviewDialog::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QPrintPreviewDialog::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewDialog::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QPrintPreviewDialog::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QPrintPreviewDialog::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QPrintPreviewDialog::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QPrintPreviewDialog::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPrintPreviewDialog::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewDialog::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QPrintPreviewDialog::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QPrintPreviewDialog::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QPrintPreviewDialog::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewDialog::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewDialog::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewDialog::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewDialog::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPrintPreviewDialog::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QPrintPreviewDialog::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QPrintPreviewDialog::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QPrintPreviewDialog::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPrintPreviewDialog::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QPrintPreviewDialog::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QPrintPreviewDialog::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QPrintPreviewDialog::reject() +{ + QScriptValue _q_function = __qtscript_self.property("reject"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reject") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::reject(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QPrintPreviewDialog::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPainter* QtScriptShell_QPrintPreviewDialog::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QPrintPreviewDialog::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPrintPreviewDialog::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPrintPreviewDialog::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewDialog::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewDialog::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewDialog::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintPreviewDialog.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintPreviewDialog.h new file mode 100644 index 00000000..f59f0318 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintPreviewDialog.h @@ -0,0 +1,66 @@ +#ifndef QTSCRIPTSHELL_QPRINTPREVIEWDIALOG_H +#define QTSCRIPTSHELL_QPRINTPREVIEWDIALOG_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPrintPreviewDialog : public QPrintPreviewDialog +{ +public: + QtScriptShell_QPrintPreviewDialog(QPrinter* printer, QWidget* parent = 0, Qt::WindowFlags flags = Qt::WindowFlags()); + QtScriptShell_QPrintPreviewDialog(QWidget* parent = 0, Qt::WindowFlags flags = Qt::WindowFlags()); + ~QtScriptShell_QPrintPreviewDialog(); + + void accept(); + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* arg__1); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void done(int result); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + int exec(); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void reject(); + void resizeEvent(QResizeEvent* arg__1); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPRINTPREVIEWDIALOG_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintPreviewWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintPreviewWidget.cpp new file mode 100644 index 00000000..cfef164e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintPreviewWidget.cpp @@ -0,0 +1,674 @@ +#include "qtscriptshell_QPrintPreviewWidget.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QPrintPreviewWidget::QtScriptShell_QPrintPreviewWidget(QPrinter* printer, QWidget* parent, Qt::WindowFlags flags) + : QPrintPreviewWidget(printer, parent, flags) {} + +QtScriptShell_QPrintPreviewWidget::QtScriptShell_QPrintPreviewWidget(QWidget* parent, Qt::WindowFlags flags) + : QPrintPreviewWidget(parent, flags) {} + +QtScriptShell_QPrintPreviewWidget::~QtScriptShell_QPrintPreviewWidget() {} + +void QtScriptShell_QPrintPreviewWidget::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPrintPreviewWidget::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QPrintPreviewWidget::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QPrintPreviewWidget::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPrintPreviewWidget::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPrintPreviewWidget::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QPrintPreviewWidget::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QPrintPreviewWidget::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QPrintPreviewWidget::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QPrintPreviewWidget::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPrintPreviewWidget::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QPrintPreviewWidget::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QPrintPreviewWidget::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPrintPreviewWidget::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QPrintPreviewWidget::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QPrintPreviewWidget::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QPrintPreviewWidget::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QPrintPreviewWidget::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QPrintPreviewWidget::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QPrintPreviewWidget::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QPrintPreviewWidget::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QPrintPreviewWidget::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QPrintPreviewWidget::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QPrintPreviewWidget::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QPrintPreviewWidget::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QPrintPreviewWidget::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPrintPreviewWidget::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPrintPreviewWidget::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QPrintPreviewWidget::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QPrintPreviewWidget::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QPrintPreviewWidget::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPrintPreviewWidget::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QPrintPreviewWidget::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QPrintPreviewWidget::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QPrintPreviewWidget::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QPrintPreviewWidget::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QPrintPreviewWidget::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPrintPreviewWidget::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_QPrintPreviewWidget::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QPrintPreviewWidget::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPrintPreviewWidget::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPrintPreviewWidget::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QPrintPreviewWidget::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintPreviewWidget.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintPreviewWidget.h new file mode 100644 index 00000000..c5ca1e98 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrintPreviewWidget.h @@ -0,0 +1,64 @@ +#ifndef QTSCRIPTSHELL_QPRINTPREVIEWWIDGET_H +#define QTSCRIPTSHELL_QPRINTPREVIEWWIDGET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPrintPreviewWidget : public QPrintPreviewWidget +{ +public: + QtScriptShell_QPrintPreviewWidget(QPrinter* printer, QWidget* parent = 0, Qt::WindowFlags flags = Qt::WindowFlags()); + QtScriptShell_QPrintPreviewWidget(QWidget* parent = 0, Qt::WindowFlags flags = Qt::WindowFlags()); + ~QtScriptShell_QPrintPreviewWidget(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPRINTPREVIEWWIDGET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrinter.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrinter.cpp new file mode 100644 index 00000000..c58b9493 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrinter.cpp @@ -0,0 +1,23 @@ +#include "qtscriptshell_QPrinter.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QPrinter::QtScriptShell_QPrinter(QPrinter::PrinterMode mode) + : QPrinter(mode) {} + +QtScriptShell_QPrinter::QtScriptShell_QPrinter(const QPrinterInfo& printer, QPrinter::PrinterMode mode) + : QPrinter(printer, mode) {} + +QtScriptShell_QPrinter::~QtScriptShell_QPrinter() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrinter.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrinter.h new file mode 100644 index 00000000..a19c2d99 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_printsupport/qtscriptshell_QPrinter.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QPRINTER_H +#define QTSCRIPTSHELL_QPRINTER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPrinter : public QPrinter +{ +public: + QtScriptShell_QPrinter(QPrinter::PrinterMode mode = QPrinter::ScreenResolution); + QtScriptShell_QPrinter(const QPrinterInfo& printer, QPrinter::PrinterMode mode = QPrinter::ScreenResolution); + ~QtScriptShell_QPrinter(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPRINTER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/com_trolltech_qt_sql.pri b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/com_trolltech_qt_sql.pri new file mode 100644 index 00000000..c69ce4ff --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/com_trolltech_qt_sql.pri @@ -0,0 +1,32 @@ +HEADERS += \ + $$PWD/qtscriptshell_QSqlDatabase.h \ + $$PWD/qtscriptshell_QSqlDriver.h \ + $$PWD/qtscriptshell_QSqlDriverCreatorBase.h \ + $$PWD/qtscriptshell_QSqlQueryModel.h \ + $$PWD/qtscriptshell_QSqlRelationalTableModel.h \ + $$PWD/qtscriptshell_QSqlResult.h \ + $$PWD/qtscriptshell_QSqlTableModel.h \ + +SOURCES += \ + $$PWD/qtscript_QSql.cpp \ + $$PWD/qtscript_QSqlDatabase.cpp \ + $$PWD/qtscript_QSqlDriver.cpp \ + $$PWD/qtscript_QSqlDriverCreatorBase.cpp \ + $$PWD/qtscript_QSqlError.cpp \ + $$PWD/qtscript_QSqlField.cpp \ + $$PWD/qtscript_QSqlIndex.cpp \ + $$PWD/qtscript_QSqlQuery.cpp \ + $$PWD/qtscript_QSqlQueryModel.cpp \ + $$PWD/qtscript_QSqlRecord.cpp \ + $$PWD/qtscript_QSqlRelation.cpp \ + $$PWD/qtscript_QSqlRelationalTableModel.cpp \ + $$PWD/qtscript_QSqlResult.cpp \ + $$PWD/qtscript_QSqlTableModel.cpp \ + $$PWD/qtscriptshell_QSqlDatabase.cpp \ + $$PWD/qtscriptshell_QSqlDriver.cpp \ + $$PWD/qtscriptshell_QSqlDriverCreatorBase.cpp \ + $$PWD/qtscriptshell_QSqlQueryModel.cpp \ + $$PWD/qtscriptshell_QSqlRelationalTableModel.cpp \ + $$PWD/qtscriptshell_QSqlResult.cpp \ + $$PWD/qtscriptshell_QSqlTableModel.cpp \ + $$PWD/com_trolltech_qt_sql_init.cpp diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/com_trolltech_qt_sql_init.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/com_trolltech_qt_sql_init.cpp new file mode 100644 index 00000000..b6283aa9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/com_trolltech_qt_sql_init.cpp @@ -0,0 +1,62 @@ +#include +#include + +QScriptValue qtscript_create_QSqlDriverCreatorBase_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSqlDatabase_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSqlRecord_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSqlQuery_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSqlField_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSql_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSqlError_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSqlResult_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSqlRelation_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSqlDriver_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSqlIndex_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSqlQueryModel_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSqlTableModel_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSqlRelationalTableModel_class(QScriptEngine *engine); + +static const char * const qtscript_com_trolltech_qt_sql_class_names[] = { + "QSqlDriverCreatorBase" + , "QSqlDatabase" + , "QSqlRecord" + , "QSqlQuery" + , "QSqlField" + , "QSql" + , "QSqlError" + , "QSqlResult" + , "QSqlRelation" + , "QSqlDriver" + , "QSqlIndex" + , "QSqlQueryModel" + , "QSqlTableModel" + , "QSqlRelationalTableModel" +}; + +typedef QScriptValue (*QtBindingCreator)(QScriptEngine *engine); +static const QtBindingCreator qtscript_com_trolltech_qt_sql_class_functions[] = { + qtscript_create_QSqlDriverCreatorBase_class + , qtscript_create_QSqlDatabase_class + , qtscript_create_QSqlRecord_class + , qtscript_create_QSqlQuery_class + , qtscript_create_QSqlField_class + , qtscript_create_QSql_class + , qtscript_create_QSqlError_class + , qtscript_create_QSqlResult_class + , qtscript_create_QSqlRelation_class + , qtscript_create_QSqlDriver_class + , qtscript_create_QSqlIndex_class + , qtscript_create_QSqlQueryModel_class + , qtscript_create_QSqlTableModel_class + , qtscript_create_QSqlRelationalTableModel_class +}; + +void qtscript_initialize_com_trolltech_qt_sql_bindings(QScriptValue &extensionObject) +{ + QScriptEngine *engine = extensionObject.engine(); + for (int i = 0; i < 14; ++i) { + extensionObject.setProperty(qtscript_com_trolltech_qt_sql_class_names[i], + qtscript_com_trolltech_qt_sql_class_functions[i](engine), + QScriptValue::SkipInEnumeration); + } +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSql.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSql.cpp new file mode 100644 index 00000000..9a135794 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSql.cpp @@ -0,0 +1,487 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include + +static const char * const qtscript_QSql_function_names[] = { + "QSql" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QSql_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QSql_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QSql_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSql::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSql::Location) +Q_DECLARE_METATYPE(QSql::ParamTypeFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QSql::NumericalPrecisionPolicy) +Q_DECLARE_METATYPE(QSql::TableType) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QSql::Location +// + +static const QSql::Location qtscript_QSql_Location_values[] = { + QSql::AfterLastRow + , QSql::BeforeFirstRow +}; + +static const char * const qtscript_QSql_Location_keys[] = { + "AfterLastRow" + , "BeforeFirstRow" +}; + +static QString qtscript_QSql_Location_toStringHelper(QSql::Location value) +{ + if ((value >= QSql::AfterLastRow) && (value <= QSql::BeforeFirstRow)) + return qtscript_QSql_Location_keys[static_cast(value)-static_cast(QSql::AfterLastRow)]; + return QString(); +} + +static QScriptValue qtscript_QSql_Location_toScriptValue(QScriptEngine *engine, const QSql::Location &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSql")); + return clazz.property(qtscript_QSql_Location_toStringHelper(value)); +} + +static void qtscript_QSql_Location_fromScriptValue(const QScriptValue &value, QSql::Location &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSql_Location(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSql::AfterLastRow) && (arg <= QSql::BeforeFirstRow)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Location(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSql_Location_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSql::Location value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSql_Location_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSql::Location value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSql_Location_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSql_Location_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSql_Location, + qtscript_QSql_Location_valueOf, qtscript_QSql_Location_toString); + qScriptRegisterMetaType(engine, qtscript_QSql_Location_toScriptValue, + qtscript_QSql_Location_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSql_Location_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSql_Location_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSql::ParamTypeFlag +// + +static const QSql::ParamTypeFlag qtscript_QSql_ParamTypeFlag_values[] = { + QSql::In + , QSql::Out + , QSql::InOut + , QSql::Binary +}; + +static const char * const qtscript_QSql_ParamTypeFlag_keys[] = { + "In" + , "Out" + , "InOut" + , "Binary" +}; + +static QString qtscript_QSql_ParamTypeFlag_toStringHelper(QSql::ParamTypeFlag value) +{ + if ((value >= QSql::In) && (value <= QSql::Binary)) + return qtscript_QSql_ParamTypeFlag_keys[static_cast(value)-static_cast(QSql::In)]; + return QString(); +} + +static QScriptValue qtscript_QSql_ParamTypeFlag_toScriptValue(QScriptEngine *engine, const QSql::ParamTypeFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSql")); + return clazz.property(qtscript_QSql_ParamTypeFlag_toStringHelper(value)); +} + +static void qtscript_QSql_ParamTypeFlag_fromScriptValue(const QScriptValue &value, QSql::ParamTypeFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSql_ParamTypeFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSql::In) && (arg <= QSql::Binary)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ParamTypeFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSql_ParamTypeFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSql::ParamTypeFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSql_ParamTypeFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSql::ParamTypeFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSql_ParamTypeFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSql_ParamTypeFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSql_ParamTypeFlag, + qtscript_QSql_ParamTypeFlag_valueOf, qtscript_QSql_ParamTypeFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QSql_ParamTypeFlag_toScriptValue, + qtscript_QSql_ParamTypeFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSql_ParamTypeFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSql_ParamTypeFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSql::ParamType +// + +static QScriptValue qtscript_QSql_ParamType_toScriptValue(QScriptEngine *engine, const QSql::ParamType &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QSql_ParamType_fromScriptValue(const QScriptValue &value, QSql::ParamType &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QSql_ParamType(QScriptContext *context, QScriptEngine *engine) +{ + QSql::ParamType result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("ParamType(): argument %0 is not of type ParamTypeFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QSql_ParamType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSql::ParamType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSql_ParamType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSql::ParamType value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 4; ++i) { + if ((value & qtscript_QSql_ParamTypeFlag_values[i]) == qtscript_QSql_ParamTypeFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QSql_ParamTypeFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QSql_ParamType_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QSql_ParamType_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QSql_ParamType, qtscript_QSql_ParamType_valueOf, + qtscript_QSql_ParamType_toString, qtscript_QSql_ParamType_equals); + qScriptRegisterMetaType(engine, qtscript_QSql_ParamType_toScriptValue, + qtscript_QSql_ParamType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QSql::NumericalPrecisionPolicy +// + +static const QSql::NumericalPrecisionPolicy qtscript_QSql_NumericalPrecisionPolicy_values[] = { + QSql::HighPrecision + , QSql::LowPrecisionInt32 + , QSql::LowPrecisionInt64 + , QSql::LowPrecisionDouble +}; + +static const char * const qtscript_QSql_NumericalPrecisionPolicy_keys[] = { + "HighPrecision" + , "LowPrecisionInt32" + , "LowPrecisionInt64" + , "LowPrecisionDouble" +}; + +static QString qtscript_QSql_NumericalPrecisionPolicy_toStringHelper(QSql::NumericalPrecisionPolicy value) +{ + for (int i = 0; i < 4; ++i) { + if (qtscript_QSql_NumericalPrecisionPolicy_values[i] == value) + return QString::fromLatin1(qtscript_QSql_NumericalPrecisionPolicy_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QSql_NumericalPrecisionPolicy_toScriptValue(QScriptEngine *engine, const QSql::NumericalPrecisionPolicy &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSql")); + return clazz.property(qtscript_QSql_NumericalPrecisionPolicy_toStringHelper(value)); +} + +static void qtscript_QSql_NumericalPrecisionPolicy_fromScriptValue(const QScriptValue &value, QSql::NumericalPrecisionPolicy &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSql_NumericalPrecisionPolicy(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 4; ++i) { + if (qtscript_QSql_NumericalPrecisionPolicy_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("NumericalPrecisionPolicy(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSql_NumericalPrecisionPolicy_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSql::NumericalPrecisionPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSql_NumericalPrecisionPolicy_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSql::NumericalPrecisionPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSql_NumericalPrecisionPolicy_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSql_NumericalPrecisionPolicy_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSql_NumericalPrecisionPolicy, + qtscript_QSql_NumericalPrecisionPolicy_valueOf, qtscript_QSql_NumericalPrecisionPolicy_toString); + qScriptRegisterMetaType(engine, qtscript_QSql_NumericalPrecisionPolicy_toScriptValue, + qtscript_QSql_NumericalPrecisionPolicy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSql_NumericalPrecisionPolicy_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSql_NumericalPrecisionPolicy_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSql::TableType +// + +static const QSql::TableType qtscript_QSql_TableType_values[] = { + QSql::Tables + , QSql::SystemTables + , QSql::Views + , QSql::AllTables +}; + +static const char * const qtscript_QSql_TableType_keys[] = { + "Tables" + , "SystemTables" + , "Views" + , "AllTables" +}; + +static QString qtscript_QSql_TableType_toStringHelper(QSql::TableType value) +{ + for (int i = 0; i < 4; ++i) { + if (qtscript_QSql_TableType_values[i] == value) + return QString::fromLatin1(qtscript_QSql_TableType_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QSql_TableType_toScriptValue(QScriptEngine *engine, const QSql::TableType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSql")); + return clazz.property(qtscript_QSql_TableType_toStringHelper(value)); +} + +static void qtscript_QSql_TableType_fromScriptValue(const QScriptValue &value, QSql::TableType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSql_TableType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 4; ++i) { + if (qtscript_QSql_TableType_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("TableType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSql_TableType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSql::TableType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSql_TableType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSql::TableType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSql_TableType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSql_TableType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSql_TableType, + qtscript_QSql_TableType_valueOf, qtscript_QSql_TableType_toString); + qScriptRegisterMetaType(engine, qtscript_QSql_TableType_toScriptValue, + qtscript_QSql_TableType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSql_TableType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSql_TableType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSql +// + +static QScriptValue qtscript_QSql_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSql cannot be constructed")); + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSql_throw_ambiguity_error_helper(context, + qtscript_QSql_function_names[_id], + qtscript_QSql_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSql_class(QScriptEngine *engine) +{ + QScriptValue proto = QScriptValue(); + QScriptValue ctor = engine->newFunction(qtscript_QSql_static_call, proto, qtscript_QSql_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Location"), + qtscript_create_QSql_Location_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ParamTypeFlag"), + qtscript_create_QSql_ParamTypeFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ParamType"), + qtscript_create_QSql_ParamType_class(engine)); + ctor.setProperty(QString::fromLatin1("NumericalPrecisionPolicy"), + qtscript_create_QSql_NumericalPrecisionPolicy_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("TableType"), + qtscript_create_QSql_TableType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlDatabase.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlDatabase.cpp new file mode 100644 index 00000000..ed8428c2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlDatabase.cpp @@ -0,0 +1,614 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSqlDatabase.h" + +static const char * const qtscript_QSqlDatabase_function_names[] = { + "QSqlDatabase" + // static + , "addDatabase" + , "cloneDatabase" + , "connectionNames" + , "contains" + , "database" + , "drivers" + , "isDriverAvailable" + , "registerSqlDriver" + , "removeDatabase" + // prototype + , "close" + , "commit" + , "connectOptions" + , "connectionName" + , "databaseName" + , "driver" + , "driverName" + , "exec" + , "hostName" + , "isOpen" + , "isOpenError" + , "isValid" + , "lastError" + , "numericalPrecisionPolicy" + , "open" + , "password" + , "port" + , "primaryIndex" + , "record" + , "rollback" + , "setConnectOptions" + , "setDatabaseName" + , "setHostName" + , "setNumericalPrecisionPolicy" + , "setPassword" + , "setPort" + , "setUserName" + , "tables" + , "transaction" + , "userName" + , "toString" +}; + +static const char * const qtscript_QSqlDatabase_function_signatures[] = { + "\nQSqlDatabase other" + // static + , "QSqlDriver driver, String connectionName\nString type, String connectionName" + , "QSqlDatabase other, String connectionName" + , "" + , "String connectionName" + , "String connectionName, bool open" + , "" + , "String name" + , "String name, QSqlDriverCreatorBase creator" + , "String connectionName" + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "String query" + , "" + , "" + , "" + , "" + , "" + , "" + , "\nString user, String password" + , "" + , "" + , "String tablename" + , "String tablename" + , "" + , "String options" + , "String name" + , "String host" + , "NumericalPrecisionPolicy precisionPolicy" + , "String password" + , "int p" + , "String name" + , "TableType type" + , "" + , "" +"" +}; + +static const int qtscript_QSqlDatabase_function_lengths[] = { + 1 + // static + , 2 + , 2 + , 0 + , 1 + , 2 + , 0 + , 1 + , 2 + , 1 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 2 + , 0 + , 0 + , 1 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QSqlDatabase_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSqlDatabase::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSqlDatabase) +Q_DECLARE_METATYPE(QSqlDatabase*) +Q_DECLARE_METATYPE(QtScriptShell_QSqlDatabase) +Q_DECLARE_METATYPE(QtScriptShell_QSqlDatabase*) +Q_DECLARE_METATYPE(QSqlDriver*) +Q_DECLARE_METATYPE(QSqlQuery) +Q_DECLARE_METATYPE(QSqlError) +Q_DECLARE_METATYPE(QSql::NumericalPrecisionPolicy) +Q_DECLARE_METATYPE(QSqlIndex) +Q_DECLARE_METATYPE(QSqlRecord) +Q_DECLARE_METATYPE(QSql::TableType) +Q_DECLARE_METATYPE(QSqlDriverCreatorBase*) + +// +// QSqlDatabase +// + +static QScriptValue qtscript_QSqlDatabase_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 30; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSqlDatabase* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSqlDatabase.%0(): this object is not a QSqlDatabase") + .arg(qtscript_QSqlDatabase_function_names[_id+10])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->close(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->commit(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->connectOptions(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->connectionName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->databaseName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QSqlDriver* _q_result = _q_self->driver(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->driverName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QSqlQuery _q_result = _q_self->exec(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QSqlQuery _q_result = _q_self->exec(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->hostName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isOpen(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isOpenError(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QSqlError _q_result = _q_self->lastError(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QSql::NumericalPrecisionPolicy _q_result = _q_self->numericalPrecisionPolicy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->open(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = _q_self->open(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->password(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + int _q_result = _q_self->port(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QSqlIndex _q_result = _q_self->primaryIndex(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QSqlRecord _q_result = _q_self->record(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->rollback(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + _q_self->setConnectOptions(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setConnectOptions(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setDatabaseName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setHostName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QSql::NumericalPrecisionPolicy _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setNumericalPrecisionPolicy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPassword(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setPort(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setUserName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->tables(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QSql::TableType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStringList _q_result = _q_self->tables(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->transaction(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->userName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 30: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSqlDatabase_throw_ambiguity_error_helper(context, + qtscript_QSqlDatabase_function_names[_id+10], + qtscript_QSqlDatabase_function_signatures[_id+10]); +} + +static QScriptValue qtscript_QSqlDatabase_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSqlDatabase(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSqlDatabase _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QSqlDatabase)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QSqlDatabase _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QSqlDatabase _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QSqlDatabase)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString()) { + QSqlDriver* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QSqlDatabase _q_result = QSqlDatabase::addDatabase(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QSqlDatabase _q_result = QSqlDatabase::addDatabase(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 2: + if (context->argumentCount() == 2) { + QSqlDatabase _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QSqlDatabase _q_result = QSqlDatabase::cloneDatabase(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QStringList _q_result = QSqlDatabase::connectionNames(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = QSqlDatabase::contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QSqlDatabase _q_result = QSqlDatabase::database(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_arg1 = context->argument(1).toBoolean(); + QSqlDatabase _q_result = QSqlDatabase::database(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QStringList _q_result = QSqlDatabase::drivers(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = QSqlDatabase::isDriverAvailable(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QSqlDriverCreatorBase* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QSqlDatabase::registerSqlDriver(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QSqlDatabase::removeDatabase(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSqlDatabase_throw_ambiguity_error_helper(context, + qtscript_QSqlDatabase_function_names[_id], + qtscript_QSqlDatabase_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSqlDatabase_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSqlDatabase*)0)); + for (int i = 0; i < 31; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSqlDatabase_prototype_call, qtscript_QSqlDatabase_function_lengths[i+10]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSqlDatabase_function_names[i+10]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSqlDatabase_static_call, proto, qtscript_QSqlDatabase_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSqlDatabase_static_call, + qtscript_QSqlDatabase_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QSqlDatabase_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlDriver.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlDriver.cpp new file mode 100644 index 00000000..7390cc04 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlDriver.cpp @@ -0,0 +1,734 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSqlDriver.h" + +static const char * const qtscript_QSqlDriver_function_names[] = { + "QSqlDriver" + // static + // prototype + , "beginTransaction" + , "close" + , "commitTransaction" + , "createResult" + , "escapeIdentifier" + , "formatValue" + , "handle" + , "hasFeature" + , "isIdentifierEscaped" + , "isOpen" + , "isOpenError" + , "lastError" + , "numericalPrecisionPolicy" + , "open" + , "primaryIndex" + , "record" + , "rollbackTransaction" + , "setNumericalPrecisionPolicy" + , "sqlStatement" + , "stripDelimiters" + , "subscribeToNotification" + , "subscribedToNotifications" + , "tables" + , "unsubscribeFromNotification" + , "toString" +}; + +static const char * const qtscript_QSqlDriver_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" + , "" + , "" + , "" + , "String identifier, IdentifierType type" + , "QSqlField field, bool trimStrings" + , "" + , "DriverFeature f" + , "String identifier, IdentifierType type" + , "" + , "" + , "" + , "" + , "String db, String user, String password, String host, int port, String connOpts" + , "String tableName" + , "String tableName" + , "" + , "NumericalPrecisionPolicy precisionPolicy" + , "StatementType type, String tableName, QSqlRecord rec, bool preparedStatement" + , "String identifier, IdentifierType type" + , "String name" + , "" + , "TableType tableType" + , "String name" +"" +}; + +static const int qtscript_QSqlDriver_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 2 + , 2 + , 0 + , 1 + , 2 + , 0 + , 0 + , 0 + , 0 + , 6 + , 1 + , 1 + , 0 + , 1 + , 4 + , 2 + , 1 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QSqlDriver_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSqlDriver::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSqlDriver*) +Q_DECLARE_METATYPE(QtScriptShell_QSqlDriver*) +Q_DECLARE_METATYPE(QSqlDriver::IdentifierType) +Q_DECLARE_METATYPE(QSqlDriver::DriverFeature) +Q_DECLARE_METATYPE(QSqlDriver::StatementType) +Q_DECLARE_METATYPE(QSqlResult*) +Q_DECLARE_METATYPE(QSqlField) +Q_DECLARE_METATYPE(QSqlError) +Q_DECLARE_METATYPE(QSql::NumericalPrecisionPolicy) +Q_DECLARE_METATYPE(QSqlIndex) +Q_DECLARE_METATYPE(QSqlRecord) +Q_DECLARE_METATYPE(QSql::TableType) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QSqlDriver::IdentifierType +// + +static const QSqlDriver::IdentifierType qtscript_QSqlDriver_IdentifierType_values[] = { + QSqlDriver::FieldName + , QSqlDriver::TableName +}; + +static const char * const qtscript_QSqlDriver_IdentifierType_keys[] = { + "FieldName" + , "TableName" +}; + +static QString qtscript_QSqlDriver_IdentifierType_toStringHelper(QSqlDriver::IdentifierType value) +{ + if ((value >= QSqlDriver::FieldName) && (value <= QSqlDriver::TableName)) + return qtscript_QSqlDriver_IdentifierType_keys[static_cast(value)-static_cast(QSqlDriver::FieldName)]; + return QString(); +} + +static QScriptValue qtscript_QSqlDriver_IdentifierType_toScriptValue(QScriptEngine *engine, const QSqlDriver::IdentifierType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSqlDriver")); + return clazz.property(qtscript_QSqlDriver_IdentifierType_toStringHelper(value)); +} + +static void qtscript_QSqlDriver_IdentifierType_fromScriptValue(const QScriptValue &value, QSqlDriver::IdentifierType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSqlDriver_IdentifierType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSqlDriver::FieldName) && (arg <= QSqlDriver::TableName)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("IdentifierType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSqlDriver_IdentifierType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSqlDriver::IdentifierType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSqlDriver_IdentifierType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSqlDriver::IdentifierType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSqlDriver_IdentifierType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSqlDriver_IdentifierType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSqlDriver_IdentifierType, + qtscript_QSqlDriver_IdentifierType_valueOf, qtscript_QSqlDriver_IdentifierType_toString); + qScriptRegisterMetaType(engine, qtscript_QSqlDriver_IdentifierType_toScriptValue, + qtscript_QSqlDriver_IdentifierType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSqlDriver_IdentifierType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSqlDriver_IdentifierType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSqlDriver::DriverFeature +// + +static const QSqlDriver::DriverFeature qtscript_QSqlDriver_DriverFeature_values[] = { + QSqlDriver::Transactions + , QSqlDriver::QuerySize + , QSqlDriver::BLOB + , QSqlDriver::Unicode + , QSqlDriver::PreparedQueries + , QSqlDriver::NamedPlaceholders + , QSqlDriver::PositionalPlaceholders + , QSqlDriver::LastInsertId + , QSqlDriver::BatchOperations + , QSqlDriver::SimpleLocking + , QSqlDriver::LowPrecisionNumbers + , QSqlDriver::EventNotifications + , QSqlDriver::FinishQuery + , QSqlDriver::MultipleResultSets + , QSqlDriver::CancelQuery +}; + +static const char * const qtscript_QSqlDriver_DriverFeature_keys[] = { + "Transactions" + , "QuerySize" + , "BLOB" + , "Unicode" + , "PreparedQueries" + , "NamedPlaceholders" + , "PositionalPlaceholders" + , "LastInsertId" + , "BatchOperations" + , "SimpleLocking" + , "LowPrecisionNumbers" + , "EventNotifications" + , "FinishQuery" + , "MultipleResultSets" + , "CancelQuery" +}; + +static QString qtscript_QSqlDriver_DriverFeature_toStringHelper(QSqlDriver::DriverFeature value) +{ + if ((value >= QSqlDriver::Transactions) && (value <= QSqlDriver::CancelQuery)) + return qtscript_QSqlDriver_DriverFeature_keys[static_cast(value)-static_cast(QSqlDriver::Transactions)]; + return QString(); +} + +static QScriptValue qtscript_QSqlDriver_DriverFeature_toScriptValue(QScriptEngine *engine, const QSqlDriver::DriverFeature &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSqlDriver")); + return clazz.property(qtscript_QSqlDriver_DriverFeature_toStringHelper(value)); +} + +static void qtscript_QSqlDriver_DriverFeature_fromScriptValue(const QScriptValue &value, QSqlDriver::DriverFeature &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSqlDriver_DriverFeature(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSqlDriver::Transactions) && (arg <= QSqlDriver::CancelQuery)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("DriverFeature(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSqlDriver_DriverFeature_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSqlDriver::DriverFeature value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSqlDriver_DriverFeature_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSqlDriver::DriverFeature value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSqlDriver_DriverFeature_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSqlDriver_DriverFeature_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSqlDriver_DriverFeature, + qtscript_QSqlDriver_DriverFeature_valueOf, qtscript_QSqlDriver_DriverFeature_toString); + qScriptRegisterMetaType(engine, qtscript_QSqlDriver_DriverFeature_toScriptValue, + qtscript_QSqlDriver_DriverFeature_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 15; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSqlDriver_DriverFeature_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSqlDriver_DriverFeature_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSqlDriver::StatementType +// + +static const QSqlDriver::StatementType qtscript_QSqlDriver_StatementType_values[] = { + QSqlDriver::WhereStatement + , QSqlDriver::SelectStatement + , QSqlDriver::UpdateStatement + , QSqlDriver::InsertStatement + , QSqlDriver::DeleteStatement +}; + +static const char * const qtscript_QSqlDriver_StatementType_keys[] = { + "WhereStatement" + , "SelectStatement" + , "UpdateStatement" + , "InsertStatement" + , "DeleteStatement" +}; + +static QString qtscript_QSqlDriver_StatementType_toStringHelper(QSqlDriver::StatementType value) +{ + if ((value >= QSqlDriver::WhereStatement) && (value <= QSqlDriver::DeleteStatement)) + return qtscript_QSqlDriver_StatementType_keys[static_cast(value)-static_cast(QSqlDriver::WhereStatement)]; + return QString(); +} + +static QScriptValue qtscript_QSqlDriver_StatementType_toScriptValue(QScriptEngine *engine, const QSqlDriver::StatementType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSqlDriver")); + return clazz.property(qtscript_QSqlDriver_StatementType_toStringHelper(value)); +} + +static void qtscript_QSqlDriver_StatementType_fromScriptValue(const QScriptValue &value, QSqlDriver::StatementType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSqlDriver_StatementType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSqlDriver::WhereStatement) && (arg <= QSqlDriver::DeleteStatement)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StatementType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSqlDriver_StatementType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSqlDriver::StatementType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSqlDriver_StatementType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSqlDriver::StatementType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSqlDriver_StatementType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSqlDriver_StatementType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSqlDriver_StatementType, + qtscript_QSqlDriver_StatementType_valueOf, qtscript_QSqlDriver_StatementType_toString); + qScriptRegisterMetaType(engine, qtscript_QSqlDriver_StatementType_toScriptValue, + qtscript_QSqlDriver_StatementType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSqlDriver_StatementType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSqlDriver_StatementType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSqlDriver +// + +static QScriptValue qtscript_QSqlDriver_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 24; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSqlDriver* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSqlDriver.%0(): this object is not a QSqlDriver") + .arg(qtscript_QSqlDriver_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->beginTransaction(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->close(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->commitTransaction(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QSqlResult* _q_result = _q_self->createResult(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QSqlDriver::IdentifierType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = _q_self->escapeIdentifier(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QSqlField _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->formatValue(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QSqlField _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + QString _q_result = _q_self->formatValue(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QVariant _q_result = _q_self->handle(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QSqlDriver::DriverFeature _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->hasFeature(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QSqlDriver::IdentifierType _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->isIdentifierEscaped(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isOpen(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isOpenError(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QSqlError _q_result = _q_self->lastError(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QSql::NumericalPrecisionPolicy _q_result = _q_self->numericalPrecisionPolicy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->open(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = _q_self->open(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + bool _q_result = _q_self->open(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + bool _q_result = _q_self->open(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + int _q_arg4 = context->argument(4).toInt32(); + bool _q_result = _q_self->open(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 6) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + int _q_arg4 = context->argument(4).toInt32(); + QString _q_arg5 = context->argument(5).toString(); + bool _q_result = _q_self->open(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QSqlIndex _q_result = _q_self->primaryIndex(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QSqlRecord _q_result = _q_self->record(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->rollbackTransaction(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QSql::NumericalPrecisionPolicy _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setNumericalPrecisionPolicy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 4) { + QSqlDriver::StatementType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QSqlRecord _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_arg3 = context->argument(3).toBoolean(); + QString _q_result = _q_self->sqlStatement(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QSqlDriver::IdentifierType _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = _q_self->stripDelimiters(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->subscribeToNotification(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->subscribedToNotifications(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QSql::TableType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStringList _q_result = _q_self->tables(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->unsubscribeFromNotification(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: { + QString result = QString::fromLatin1("QSqlDriver"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSqlDriver_throw_ambiguity_error_helper(context, + qtscript_QSqlDriver_function_names[_id+1], + qtscript_QSqlDriver_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSqlDriver_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSqlDriver(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSqlDriver* _q_cpp_result = new QtScriptShell_QSqlDriver(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSqlDriver*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QSqlDriver* _q_cpp_result = new QtScriptShell_QSqlDriver(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSqlDriver*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSqlDriver_throw_ambiguity_error_helper(context, + qtscript_QSqlDriver_function_names[_id], + qtscript_QSqlDriver_function_signatures[_id]); +} + +static QScriptValue qtscript_QSqlDriver_toScriptValue(QScriptEngine *engine, QSqlDriver* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSqlDriver_fromScriptValue(const QScriptValue &value, QSqlDriver* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSqlDriver_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSqlDriver*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 25; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSqlDriver_prototype_call, qtscript_QSqlDriver_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSqlDriver_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSqlDriver_toScriptValue, + qtscript_QSqlDriver_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSqlDriver_static_call, proto, qtscript_QSqlDriver_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("IdentifierType"), + qtscript_create_QSqlDriver_IdentifierType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("DriverFeature"), + qtscript_create_QSqlDriver_DriverFeature_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StatementType"), + qtscript_create_QSqlDriver_StatementType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlDriverCreatorBase.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlDriverCreatorBase.cpp new file mode 100644 index 00000000..6cf06402 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlDriverCreatorBase.cpp @@ -0,0 +1,144 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QSqlDriverCreatorBase.h" + +static const char * const qtscript_QSqlDriverCreatorBase_function_names[] = { + "QSqlDriverCreatorBase" + // static + // prototype + , "createObject" + , "toString" +}; + +static const char * const qtscript_QSqlDriverCreatorBase_function_signatures[] = { + "" + // static + // prototype + , "" +"" +}; + +static const int qtscript_QSqlDriverCreatorBase_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 +}; + +static QScriptValue qtscript_QSqlDriverCreatorBase_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSqlDriverCreatorBase::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSqlDriverCreatorBase*) +Q_DECLARE_METATYPE(QtScriptShell_QSqlDriverCreatorBase*) +Q_DECLARE_METATYPE(QSqlDriver*) + +// +// QSqlDriverCreatorBase +// + +static QScriptValue qtscript_QSqlDriverCreatorBase_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSqlDriverCreatorBase* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSqlDriverCreatorBase.%0(): this object is not a QSqlDriverCreatorBase") + .arg(qtscript_QSqlDriverCreatorBase_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QSqlDriver* _q_result = _q_self->createObject(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("QSqlDriverCreatorBase"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSqlDriverCreatorBase_throw_ambiguity_error_helper(context, + qtscript_QSqlDriverCreatorBase_function_names[_id+1], + qtscript_QSqlDriverCreatorBase_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSqlDriverCreatorBase_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSqlDriverCreatorBase(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSqlDriverCreatorBase* _q_cpp_result = new QtScriptShell_QSqlDriverCreatorBase(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QSqlDriverCreatorBase*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSqlDriverCreatorBase_throw_ambiguity_error_helper(context, + qtscript_QSqlDriverCreatorBase_function_names[_id], + qtscript_QSqlDriverCreatorBase_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSqlDriverCreatorBase_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSqlDriverCreatorBase*)0)); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSqlDriverCreatorBase_prototype_call, qtscript_QSqlDriverCreatorBase_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSqlDriverCreatorBase_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSqlDriverCreatorBase_static_call, proto, qtscript_QSqlDriverCreatorBase_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlError.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlError.cpp new file mode 100644 index 00000000..1a893ba1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlError.cpp @@ -0,0 +1,396 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QSqlError_function_names[] = { + "QSqlError" + // static + // prototype + , "databaseText" + , "driverText" + , "isValid" + , "nativeErrorCode" + , "number" + , "equals" + , "setDatabaseText" + , "setDriverText" + , "setNumber" + , "setType" + , "text" + , "type" + , "toString" +}; + +static const char * const qtscript_QSqlError_function_signatures[] = { + "QSqlError other\nString driverText, String databaseText, ErrorType type, String errorCode\nString driverText, String databaseText, ErrorType type, int number" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "QSqlError other" + , "String databaseText" + , "String driverText" + , "int number" + , "ErrorType type" + , "" + , "" +"" +}; + +static const int qtscript_QSqlError_function_lengths[] = { + 4 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QSqlError_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSqlError::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSqlError) +Q_DECLARE_METATYPE(QSqlError*) +Q_DECLARE_METATYPE(QSqlError::ErrorType) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QSqlError::ErrorType +// + +static const QSqlError::ErrorType qtscript_QSqlError_ErrorType_values[] = { + QSqlError::NoError + , QSqlError::ConnectionError + , QSqlError::StatementError + , QSqlError::TransactionError + , QSqlError::UnknownError +}; + +static const char * const qtscript_QSqlError_ErrorType_keys[] = { + "NoError" + , "ConnectionError" + , "StatementError" + , "TransactionError" + , "UnknownError" +}; + +static QString qtscript_QSqlError_ErrorType_toStringHelper(QSqlError::ErrorType value) +{ + if ((value >= QSqlError::NoError) && (value <= QSqlError::UnknownError)) + return qtscript_QSqlError_ErrorType_keys[static_cast(value)-static_cast(QSqlError::NoError)]; + return QString(); +} + +static QScriptValue qtscript_QSqlError_ErrorType_toScriptValue(QScriptEngine *engine, const QSqlError::ErrorType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSqlError")); + return clazz.property(qtscript_QSqlError_ErrorType_toStringHelper(value)); +} + +static void qtscript_QSqlError_ErrorType_fromScriptValue(const QScriptValue &value, QSqlError::ErrorType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSqlError_ErrorType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSqlError::NoError) && (arg <= QSqlError::UnknownError)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ErrorType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSqlError_ErrorType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSqlError::ErrorType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSqlError_ErrorType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSqlError::ErrorType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSqlError_ErrorType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSqlError_ErrorType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSqlError_ErrorType, + qtscript_QSqlError_ErrorType_valueOf, qtscript_QSqlError_ErrorType_toString); + qScriptRegisterMetaType(engine, qtscript_QSqlError_ErrorType_toScriptValue, + qtscript_QSqlError_ErrorType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSqlError_ErrorType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSqlError_ErrorType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSqlError +// + +static QScriptValue qtscript_QSqlError_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 12; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSqlError* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSqlError.%0(): this object is not a QSqlError") + .arg(qtscript_QSqlError_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->databaseText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->driverText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->nativeErrorCode(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->number(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QSqlError _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setDatabaseText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setDriverText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setNumber(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QSqlError::ErrorType _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setType(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->text(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QSqlError::ErrorType _q_result = _q_self->type(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSqlError_throw_ambiguity_error_helper(context, + qtscript_QSqlError_function_names[_id+1], + qtscript_QSqlError_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSqlError_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSqlError(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QSqlError _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QSqlError _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSqlError _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QSqlError _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QSqlError _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QSqlError::ErrorType _q_arg2 = qscriptvalue_cast(context->argument(2)); + QSqlError _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + if (context->argument(0).isString() + && context->argument(1).isString() + && (qMetaTypeId() == context->argument(2).toVariant().userType()) + && context->argument(3).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QSqlError::ErrorType _q_arg2 = qscriptvalue_cast(context->argument(2)); + QString _q_arg3 = context->argument(3).toString(); + QSqlError _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString() + && context->argument(1).isString() + && (qMetaTypeId() == context->argument(2).toVariant().userType()) + && context->argument(3).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QSqlError::ErrorType _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + QSqlError _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSqlError_throw_ambiguity_error_helper(context, + qtscript_QSqlError_function_names[_id], + qtscript_QSqlError_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSqlError_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSqlError*)0)); + for (int i = 0; i < 13; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSqlError_prototype_call, qtscript_QSqlError_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSqlError_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSqlError_static_call, proto, qtscript_QSqlError_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ErrorType"), + qtscript_create_QSqlError_ErrorType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlField.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlField.cpp new file mode 100644 index 00000000..0ff76781 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlField.cpp @@ -0,0 +1,520 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QSqlField_function_names[] = { + "QSqlField" + // static + // prototype + , "clear" + , "defaultValue" + , "isAutoValue" + , "isGenerated" + , "isNull" + , "isReadOnly" + , "isValid" + , "length" + , "name" + , "equals" + , "precision" + , "requiredStatus" + , "setAutoValue" + , "setDefaultValue" + , "setGenerated" + , "setLength" + , "setName" + , "setPrecision" + , "setReadOnly" + , "setRequired" + , "setRequiredStatus" + , "setSqlType" + , "setType" + , "setValue" + , "type" + , "typeID" + , "value" + , "toString" +}; + +static const char * const qtscript_QSqlField_function_signatures[] = { + "QSqlField other\nString fieldName, QVariant::Type type" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QSqlField other" + , "" + , "" + , "bool autoVal" + , "Object value" + , "bool gen" + , "int fieldLength" + , "String name" + , "int precision" + , "bool readOnly" + , "bool required" + , "RequiredStatus status" + , "int type" + , "QVariant::Type type" + , "Object value" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QSqlField_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QSqlField_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSqlField::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSqlField) +Q_DECLARE_METATYPE(QSqlField*) +Q_DECLARE_METATYPE(QSqlField::RequiredStatus) +Q_DECLARE_METATYPE(QVariant::Type) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QSqlField::RequiredStatus +// + +static const QSqlField::RequiredStatus qtscript_QSqlField_RequiredStatus_values[] = { + QSqlField::Unknown + , QSqlField::Optional + , QSqlField::Required +}; + +static const char * const qtscript_QSqlField_RequiredStatus_keys[] = { + "Unknown" + , "Optional" + , "Required" +}; + +static QString qtscript_QSqlField_RequiredStatus_toStringHelper(QSqlField::RequiredStatus value) +{ + if ((value >= QSqlField::Unknown) && (value <= QSqlField::Required)) + return qtscript_QSqlField_RequiredStatus_keys[static_cast(value)-static_cast(QSqlField::Unknown)]; + return QString(); +} + +static QScriptValue qtscript_QSqlField_RequiredStatus_toScriptValue(QScriptEngine *engine, const QSqlField::RequiredStatus &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSqlField")); + return clazz.property(qtscript_QSqlField_RequiredStatus_toStringHelper(value)); +} + +static void qtscript_QSqlField_RequiredStatus_fromScriptValue(const QScriptValue &value, QSqlField::RequiredStatus &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSqlField_RequiredStatus(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSqlField::Unknown) && (arg <= QSqlField::Required)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("RequiredStatus(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSqlField_RequiredStatus_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSqlField::RequiredStatus value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSqlField_RequiredStatus_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSqlField::RequiredStatus value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSqlField_RequiredStatus_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSqlField_RequiredStatus_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSqlField_RequiredStatus, + qtscript_QSqlField_RequiredStatus_valueOf, qtscript_QSqlField_RequiredStatus_toString); + qScriptRegisterMetaType(engine, qtscript_QSqlField_RequiredStatus_toScriptValue, + qtscript_QSqlField_RequiredStatus_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSqlField_RequiredStatus_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSqlField_RequiredStatus_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSqlField +// + +static QScriptValue qtscript_QSqlField_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 27; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSqlField* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSqlField.%0(): this object is not a QSqlField") + .arg(qtscript_QSqlField_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QVariant _q_result = _q_self->defaultValue(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isAutoValue(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isGenerated(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isReadOnly(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->length(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->name(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QSqlField _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + int _q_result = _q_self->precision(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QSqlField::RequiredStatus _q_result = _q_self->requiredStatus(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setAutoValue(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QVariant _q_arg0 = context->argument(0).toVariant(); + _q_self->setDefaultValue(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setGenerated(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setLength(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setPrecision(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setReadOnly(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setRequired(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QSqlField::RequiredStatus _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRequiredStatus(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setSqlType(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QVariant::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setType(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QVariant _q_arg0 = context->argument(0).toVariant(); + _q_self->setValue(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 0) { + QVariant::Type _q_result = _q_self->type(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + int _q_result = _q_self->typeID(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + QVariant _q_result = _q_self->value(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSqlField_throw_ambiguity_error_helper(context, + qtscript_QSqlField_function_names[_id+1], + qtscript_QSqlField_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSqlField_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSqlField(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QSqlField _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QSqlField _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSqlField _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QSqlField _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QVariant::Type _q_arg1 = qscriptvalue_cast(context->argument(1)); + QSqlField _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSqlField_throw_ambiguity_error_helper(context, + qtscript_QSqlField_function_names[_id], + qtscript_QSqlField_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSqlField_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSqlField*)0)); + for (int i = 0; i < 28; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSqlField_prototype_call, qtscript_QSqlField_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSqlField_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSqlField_static_call, proto, qtscript_QSqlField_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("RequiredStatus"), + qtscript_create_QSqlField_RequiredStatus_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlIndex.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlIndex.cpp new file mode 100644 index 00000000..bf13044c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlIndex.cpp @@ -0,0 +1,230 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QSqlIndex_function_names[] = { + "QSqlIndex" + // static + // prototype + , "append" + , "cursorName" + , "isDescending" + , "name" + , "setCursorName" + , "setDescending" + , "setName" + , "toString" +}; + +static const char * const qtscript_QSqlIndex_function_signatures[] = { + "QSqlIndex other\nString cursorName, String name" + // static + // prototype + , "QSqlField field, bool desc" + , "" + , "int i" + , "" + , "String cursorName" + , "int i, bool desc" + , "String name" +"" +}; + +static const int qtscript_QSqlIndex_function_lengths[] = { + 2 + // static + // prototype + , 2 + , 0 + , 1 + , 0 + , 1 + , 2 + , 1 + , 0 +}; + +static QScriptValue qtscript_QSqlIndex_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSqlIndex::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSqlIndex) +Q_DECLARE_METATYPE(QSqlIndex*) +Q_DECLARE_METATYPE(QSqlField) +Q_DECLARE_METATYPE(QSqlRecord*) + +// +// QSqlIndex +// + +static QScriptValue qtscript_QSqlIndex_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 7; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSqlIndex* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSqlIndex.%0(): this object is not a QSqlIndex") + .arg(qtscript_QSqlIndex_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QSqlField _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->append(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->cursorName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->isDescending(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->name(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setCursorName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setDescending(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: { + QString result = QString::fromLatin1("QSqlIndex"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSqlIndex_throw_ambiguity_error_helper(context, + qtscript_QSqlIndex_function_names[_id+1], + qtscript_QSqlIndex_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSqlIndex_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSqlIndex(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QSqlIndex _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QSqlIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSqlIndex _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QSqlIndex _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QSqlIndex _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSqlIndex_throw_ambiguity_error_helper(context, + qtscript_QSqlIndex_function_names[_id], + qtscript_QSqlIndex_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSqlIndex_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSqlIndex*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSqlIndex_prototype_call, qtscript_QSqlIndex_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSqlIndex_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSqlIndex_static_call, proto, qtscript_QSqlIndex_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlQuery.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlQuery.cpp new file mode 100644 index 00000000..e6c48b33 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlQuery.cpp @@ -0,0 +1,677 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QSqlQuery_function_names[] = { + "QSqlQuery" + // static + // prototype + , "addBindValue" + , "at" + , "bindValue" + , "boundValue" + , "boundValues" + , "clear" + , "driver" + , "exec" + , "execBatch" + , "executedQuery" + , "finish" + , "first" + , "isActive" + , "isForwardOnly" + , "isNull" + , "isSelect" + , "isValid" + , "last" + , "lastError" + , "lastInsertId" + , "lastQuery" + , "next" + , "nextResult" + , "numRowsAffected" + , "numericalPrecisionPolicy" + , "prepare" + , "previous" + , "record" + , "result" + , "seek" + , "setForwardOnly" + , "setNumericalPrecisionPolicy" + , "size" + , "value" + , "toString" +}; + +static const char * const qtscript_QSqlQuery_function_signatures[] = { + "QSqlDatabase db\nQSqlResult r\nQSqlQuery other\nString query, QSqlDatabase db" + // static + // prototype + , "Object val, ParamType type" + , "" + , "String placeholder, Object val, ParamType type\nint pos, Object val, ParamType type" + , "String placeholder\nint pos" + , "" + , "" + , "" + , "\nString query" + , "BatchExecutionMode mode" + , "" + , "" + , "" + , "" + , "" + , "String name\nint field" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "String query" + , "" + , "" + , "" + , "int i, bool relative" + , "bool forward" + , "NumericalPrecisionPolicy precisionPolicy" + , "" + , "String name\nint i" +"" +}; + +static const int qtscript_QSqlQuery_function_lengths[] = { + 2 + // static + // prototype + , 2 + , 0 + , 3 + , 1 + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 2 + , 1 + , 1 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QSqlQuery_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSqlQuery::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSqlQuery) +Q_DECLARE_METATYPE(QSqlQuery*) +Q_DECLARE_METATYPE(QSqlQuery::BatchExecutionMode) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(const QSqlDriver*) +Q_DECLARE_METATYPE(QSqlError) +Q_DECLARE_METATYPE(QSql::NumericalPrecisionPolicy) +Q_DECLARE_METATYPE(QSqlRecord) +Q_DECLARE_METATYPE(const QSqlResult*) +Q_DECLARE_METATYPE(QSqlDatabase) +Q_DECLARE_METATYPE(QSqlResult*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QSqlQuery::BatchExecutionMode +// + +static const QSqlQuery::BatchExecutionMode qtscript_QSqlQuery_BatchExecutionMode_values[] = { + QSqlQuery::ValuesAsRows + , QSqlQuery::ValuesAsColumns +}; + +static const char * const qtscript_QSqlQuery_BatchExecutionMode_keys[] = { + "ValuesAsRows" + , "ValuesAsColumns" +}; + +static QString qtscript_QSqlQuery_BatchExecutionMode_toStringHelper(QSqlQuery::BatchExecutionMode value) +{ + if ((value >= QSqlQuery::ValuesAsRows) && (value <= QSqlQuery::ValuesAsColumns)) + return qtscript_QSqlQuery_BatchExecutionMode_keys[static_cast(value)-static_cast(QSqlQuery::ValuesAsRows)]; + return QString(); +} + +static QScriptValue qtscript_QSqlQuery_BatchExecutionMode_toScriptValue(QScriptEngine *engine, const QSqlQuery::BatchExecutionMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSqlQuery")); + return clazz.property(qtscript_QSqlQuery_BatchExecutionMode_toStringHelper(value)); +} + +static void qtscript_QSqlQuery_BatchExecutionMode_fromScriptValue(const QScriptValue &value, QSqlQuery::BatchExecutionMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSqlQuery_BatchExecutionMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSqlQuery::ValuesAsRows) && (arg <= QSqlQuery::ValuesAsColumns)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("BatchExecutionMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSqlQuery_BatchExecutionMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSqlQuery::BatchExecutionMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSqlQuery_BatchExecutionMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSqlQuery::BatchExecutionMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSqlQuery_BatchExecutionMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSqlQuery_BatchExecutionMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSqlQuery_BatchExecutionMode, + qtscript_QSqlQuery_BatchExecutionMode_valueOf, qtscript_QSqlQuery_BatchExecutionMode_toString); + qScriptRegisterMetaType(engine, qtscript_QSqlQuery_BatchExecutionMode_toScriptValue, + qtscript_QSqlQuery_BatchExecutionMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSqlQuery_BatchExecutionMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSqlQuery_BatchExecutionMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSqlQuery +// + +static QScriptValue qtscript_QSqlQuery_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 34; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSqlQuery* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSqlQuery.%0(): this object is not a QSqlQuery") + .arg(qtscript_QSqlQuery_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QVariant _q_arg0 = context->argument(0).toVariant(); + _q_self->addBindValue(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QVariant _q_arg0 = context->argument(0).toVariant(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + _q_self->addBindValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->at(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && true) { + QString _q_arg0 = context->argument(0).toString(); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->bindValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && true) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->bindValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if (context->argument(0).isString() + && true + && (qMetaTypeId >() == context->argument(2).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QVariant _q_arg1 = context->argument(1).toVariant(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + _q_self->bindValue(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && true + && (qMetaTypeId >() == context->argument(2).toVariant().userType())) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_arg1 = context->argument(1).toVariant(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + _q_self->bindValue(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + break; + + case 3: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QVariant _q_result = _q_self->boundValue(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_result = _q_self->boundValue(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 4: + if (context->argumentCount() == 0) { + QMap _q_result = _q_self->boundValues(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 0) { + const QSqlDriver* _q_result = const_cast(_q_self->driver()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->exec(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->exec(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->execBatch(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QSqlQuery::BatchExecutionMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->execBatch(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->executedQuery(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + _q_self->finish(); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->first(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isActive(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isForwardOnly(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->isNull(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->isNull(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 15: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isSelect(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->last(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QSqlError _q_result = _q_self->lastError(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QVariant _q_result = _q_self->lastInsertId(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->lastQuery(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->next(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->nextResult(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + int _q_result = _q_self->numRowsAffected(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + QSql::NumericalPrecisionPolicy _q_result = _q_self->numericalPrecisionPolicy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->prepare(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->previous(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + QSqlRecord _q_result = _q_self->record(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 0) { + const QSqlResult* _q_result = const_cast(_q_self->result()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->seek(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + bool _q_result = _q_self->seek(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setForwardOnly(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + QSql::NumericalPrecisionPolicy _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setNumericalPrecisionPolicy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 0) { + int _q_result = _q_self->size(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QVariant _q_result = _q_self->value(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_result = _q_self->value(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 34: { + QString result = QString::fromLatin1("QSqlQuery"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSqlQuery_throw_ambiguity_error_helper(context, + qtscript_QSqlQuery_function_names[_id+1], + qtscript_QSqlQuery_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSqlQuery_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSqlQuery(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QSqlQuery _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QSqlDatabase _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSqlQuery _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + QSqlResult* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSqlQuery _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QSqlQuery _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSqlQuery _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QSqlQuery _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QSqlDatabase _q_arg1 = qscriptvalue_cast(context->argument(1)); + QSqlQuery _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSqlQuery_throw_ambiguity_error_helper(context, + qtscript_QSqlQuery_function_names[_id], + qtscript_QSqlQuery_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSqlQuery_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSqlQuery*)0)); + for (int i = 0; i < 35; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSqlQuery_prototype_call, qtscript_QSqlQuery_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSqlQuery_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSqlQuery_static_call, proto, qtscript_QSqlQuery_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("BatchExecutionMode"), + qtscript_create_QSqlQuery_BatchExecutionMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlQueryModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlQueryModel.cpp new file mode 100644 index 00000000..90255170 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlQueryModel.cpp @@ -0,0 +1,240 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSqlQueryModel.h" + +static const char * const qtscript_QSqlQueryModel_function_names[] = { + "QSqlQueryModel" + // static + // prototype + , "clear" + , "lastError" + , "query" + , "record" + , "setQuery" + , "toString" +}; + +static const char * const qtscript_QSqlQueryModel_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" + , "" + , "" + , "\nint row" + , "QSqlQuery query\nString query, QSqlDatabase db" +"" +}; + +static const int qtscript_QSqlQueryModel_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QSqlQueryModel_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSqlQueryModel::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSqlQueryModel*) +Q_DECLARE_METATYPE(QtScriptShell_QSqlQueryModel*) +Q_DECLARE_METATYPE(QSqlError) +Q_DECLARE_METATYPE(QSqlQuery) +Q_DECLARE_METATYPE(QSqlRecord) +Q_DECLARE_METATYPE(QSqlDatabase) +Q_DECLARE_METATYPE(QAbstractTableModel*) + +// +// QSqlQueryModel +// + +static QScriptValue qtscript_QSqlQueryModel_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSqlQueryModel* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSqlQueryModel.%0(): this object is not a QSqlQueryModel") + .arg(qtscript_QSqlQueryModel_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QSqlError _q_result = _q_self->lastError(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QSqlQuery _q_result = _q_self->query(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QSqlRecord _q_result = _q_self->record(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QSqlRecord _q_result = _q_self->record(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QSqlQuery _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setQuery(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setQuery(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QSqlDatabase _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setQuery(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 5: { + QString result = QString::fromLatin1("QSqlQueryModel"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSqlQueryModel_throw_ambiguity_error_helper(context, + qtscript_QSqlQueryModel_function_names[_id+1], + qtscript_QSqlQueryModel_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSqlQueryModel_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSqlQueryModel(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSqlQueryModel* _q_cpp_result = new QtScriptShell_QSqlQueryModel(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSqlQueryModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QSqlQueryModel* _q_cpp_result = new QtScriptShell_QSqlQueryModel(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSqlQueryModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSqlQueryModel_throw_ambiguity_error_helper(context, + qtscript_QSqlQueryModel_function_names[_id], + qtscript_QSqlQueryModel_function_signatures[_id]); +} + +static QScriptValue qtscript_QSqlQueryModel_toScriptValue(QScriptEngine *engine, QSqlQueryModel* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSqlQueryModel_fromScriptValue(const QScriptValue &value, QSqlQueryModel* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSqlQueryModel_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSqlQueryModel*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSqlQueryModel_prototype_call, qtscript_QSqlQueryModel_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSqlQueryModel_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSqlQueryModel_toScriptValue, + qtscript_QSqlQueryModel_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSqlQueryModel_static_call, proto, qtscript_QSqlQueryModel_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlRecord.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlRecord.cpp new file mode 100644 index 00000000..85a20ae1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlRecord.cpp @@ -0,0 +1,408 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QSqlRecord_function_names[] = { + "QSqlRecord" + // static + // prototype + , "append" + , "clear" + , "clearValues" + , "contains" + , "count" + , "field" + , "fieldName" + , "indexOf" + , "insert" + , "isEmpty" + , "isGenerated" + , "isNull" + , "keyValues" + , "equals" + , "remove" + , "replace" + , "setGenerated" + , "setNull" + , "setValue" + , "value" + , "toString" +}; + +static const char * const qtscript_QSqlRecord_function_signatures[] = { + "\nQSqlRecord other" + // static + // prototype + , "QSqlField field" + , "" + , "" + , "String name" + , "" + , "String name\nint i" + , "int i" + , "String name" + , "int pos, QSqlField field" + , "" + , "String name\nint i" + , "String name\nint i" + , "QSqlRecord keyFields" + , "QSqlRecord other" + , "int pos" + , "int pos, QSqlField field" + , "String name, bool generated\nint i, bool generated" + , "String name\nint i" + , "String name, Object val\nint i, Object val" + , "String name\nint i" +"" +}; + +static const int qtscript_QSqlRecord_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 0 + , 1 + , 0 + , 1 + , 1 + , 1 + , 2 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 2 + , 1 + , 2 + , 1 + , 0 +}; + +static QScriptValue qtscript_QSqlRecord_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSqlRecord::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSqlRecord) +Q_DECLARE_METATYPE(QSqlRecord*) +Q_DECLARE_METATYPE(QSqlField) + +// +// QSqlRecord +// + +static QScriptValue qtscript_QSqlRecord_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 20; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSqlRecord* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSqlRecord.%0(): this object is not a QSqlRecord") + .arg(qtscript_QSqlRecord_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QSqlField _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->append(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->clearValues(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QSqlField _q_result = _q_self->field(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QSqlField _q_result = _q_self->field(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->fieldName(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + int _q_result = _q_self->indexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QSqlField _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insert(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->isGenerated(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->isGenerated(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 11: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->isNull(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->isNull(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 12: + if (context->argumentCount() == 1) { + QSqlRecord _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSqlRecord _q_result = _q_self->keyValues(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QSqlRecord _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->remove(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QSqlField _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->replace(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && context->argument(1).isBoolean()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setGenerated(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isBoolean()) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setGenerated(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + break; + + case 17: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setNull(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setNull(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 18: + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && true) { + QString _q_arg0 = context->argument(0).toString(); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && true) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setValue(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + break; + + case 19: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QVariant _q_result = _q_self->value(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_result = _q_self->value(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 20: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSqlRecord_throw_ambiguity_error_helper(context, + qtscript_QSqlRecord_function_names[_id+1], + qtscript_QSqlRecord_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSqlRecord_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSqlRecord(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QSqlRecord _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QSqlRecord _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSqlRecord _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSqlRecord_throw_ambiguity_error_helper(context, + qtscript_QSqlRecord_function_names[_id], + qtscript_QSqlRecord_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSqlRecord_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSqlRecord*)0)); + for (int i = 0; i < 21; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSqlRecord_prototype_call, qtscript_QSqlRecord_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSqlRecord_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSqlRecord_static_call, proto, qtscript_QSqlRecord_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlRelation.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlRelation.cpp new file mode 100644 index 00000000..bd119da2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlRelation.cpp @@ -0,0 +1,176 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +static const char * const qtscript_QSqlRelation_function_names[] = { + "QSqlRelation" + // static + // prototype + , "displayColumn" + , "indexColumn" + , "isValid" + , "tableName" + , "toString" +}; + +static const char * const qtscript_QSqlRelation_function_signatures[] = { + "\nString aTableName, String indexCol, String displayCol" + // static + // prototype + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QSqlRelation_function_lengths[] = { + 3 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QSqlRelation_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSqlRelation::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSqlRelation) +Q_DECLARE_METATYPE(QSqlRelation*) + +// +// QSqlRelation +// + +static QScriptValue qtscript_QSqlRelation_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSqlRelation* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSqlRelation.%0(): this object is not a QSqlRelation") + .arg(qtscript_QSqlRelation_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->displayColumn(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->indexColumn(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->tableName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QSqlRelation"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSqlRelation_throw_ambiguity_error_helper(context, + qtscript_QSqlRelation_function_names[_id+1], + qtscript_QSqlRelation_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSqlRelation_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSqlRelation(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QSqlRelation _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QSqlRelation _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSqlRelation_throw_ambiguity_error_helper(context, + qtscript_QSqlRelation_function_names[_id], + qtscript_QSqlRelation_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSqlRelation_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSqlRelation*)0)); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSqlRelation_prototype_call, qtscript_QSqlRelation_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSqlRelation_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSqlRelation_static_call, proto, qtscript_QSqlRelation_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlRelationalTableModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlRelationalTableModel.cpp new file mode 100644 index 00000000..83100ce4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlRelationalTableModel.cpp @@ -0,0 +1,211 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSqlRelationalTableModel.h" + +static const char * const qtscript_QSqlRelationalTableModel_function_names[] = { + "QSqlRelationalTableModel" + // static + // prototype + , "relation" + , "relationModel" + , "setRelation" + , "toString" +}; + +static const char * const qtscript_QSqlRelationalTableModel_function_signatures[] = { + "QObject parent, QSqlDatabase db" + // static + // prototype + , "int column" + , "int column" + , "int column, QSqlRelation relation" +"" +}; + +static const int qtscript_QSqlRelationalTableModel_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QSqlRelationalTableModel_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSqlRelationalTableModel::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSqlRelationalTableModel*) +Q_DECLARE_METATYPE(QtScriptShell_QSqlRelationalTableModel*) +Q_DECLARE_METATYPE(QSqlRelation) +Q_DECLARE_METATYPE(QSqlTableModel*) +Q_DECLARE_METATYPE(QSqlDatabase) + +// +// QSqlRelationalTableModel +// + +static QScriptValue qtscript_QSqlRelationalTableModel_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSqlRelationalTableModel* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSqlRelationalTableModel.%0(): this object is not a QSqlRelationalTableModel") + .arg(qtscript_QSqlRelationalTableModel_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QSqlRelation _q_result = _q_self->relation(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QSqlTableModel* _q_result = _q_self->relationModel(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QSqlRelation _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setRelation(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 3: { + QString result = QString::fromLatin1("QSqlRelationalTableModel"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSqlRelationalTableModel_throw_ambiguity_error_helper(context, + qtscript_QSqlRelationalTableModel_function_names[_id+1], + qtscript_QSqlRelationalTableModel_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSqlRelationalTableModel_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSqlRelationalTableModel(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSqlRelationalTableModel* _q_cpp_result = new QtScriptShell_QSqlRelationalTableModel(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSqlRelationalTableModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QSqlRelationalTableModel* _q_cpp_result = new QtScriptShell_QSqlRelationalTableModel(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSqlRelationalTableModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QSqlDatabase _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QSqlRelationalTableModel* _q_cpp_result = new QtScriptShell_QSqlRelationalTableModel(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSqlRelationalTableModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSqlRelationalTableModel_throw_ambiguity_error_helper(context, + qtscript_QSqlRelationalTableModel_function_names[_id], + qtscript_QSqlRelationalTableModel_function_signatures[_id]); +} + +static QScriptValue qtscript_QSqlRelationalTableModel_toScriptValue(QScriptEngine *engine, QSqlRelationalTableModel* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSqlRelationalTableModel_fromScriptValue(const QScriptValue &value, QSqlRelationalTableModel* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSqlRelationalTableModel_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSqlRelationalTableModel*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSqlRelationalTableModel_prototype_call, qtscript_QSqlRelationalTableModel_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSqlRelationalTableModel_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSqlRelationalTableModel_toScriptValue, + qtscript_QSqlRelationalTableModel_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSqlRelationalTableModel_static_call, proto, qtscript_QSqlRelationalTableModel_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlResult.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlResult.cpp new file mode 100644 index 00000000..ee873603 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlResult.cpp @@ -0,0 +1,144 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSqlResult.h" + +static const char * const qtscript_QSqlResult_function_names[] = { + "QSqlResult" + // static + // prototype + , "handle" + , "toString" +}; + +static const char * const qtscript_QSqlResult_function_signatures[] = { + "" + // static + // prototype + , "" +"" +}; + +static const int qtscript_QSqlResult_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 +}; + +static QScriptValue qtscript_QSqlResult_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSqlResult::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSqlResult*) +Q_DECLARE_METATYPE(QtScriptShell_QSqlResult*) + +// +// QSqlResult +// + +static QScriptValue qtscript_QSqlResult_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSqlResult* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSqlResult.%0(): this object is not a QSqlResult") + .arg(qtscript_QSqlResult_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QVariant _q_result = _q_self->handle(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("QSqlResult"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSqlResult_throw_ambiguity_error_helper(context, + qtscript_QSqlResult_function_names[_id+1], + qtscript_QSqlResult_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSqlResult_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSqlResult cannot be constructed")); + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSqlResult_throw_ambiguity_error_helper(context, + qtscript_QSqlResult_function_names[_id], + qtscript_QSqlResult_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSqlResult_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSqlResult*)0)); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSqlResult_prototype_call, qtscript_QSqlResult_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSqlResult_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSqlResult_static_call, proto, qtscript_QSqlResult_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlTableModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlTableModel.cpp new file mode 100644 index 00000000..2d3f5266 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscript_QSqlTableModel.cpp @@ -0,0 +1,420 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSqlTableModel.h" + +static const char * const qtscript_QSqlTableModel_function_names[] = { + "QSqlTableModel" + // static + // prototype + , "database" + , "editStrategy" + , "fieldIndex" + , "filter" + , "insertRecord" + , "isDirty" + , "primaryKey" + , "revertRow" + , "setEditStrategy" + , "setFilter" + , "setRecord" + , "setSort" + , "setTable" + , "tableName" + , "toString" +}; + +static const char * const qtscript_QSqlTableModel_function_signatures[] = { + "QObject parent, QSqlDatabase db" + // static + // prototype + , "" + , "" + , "String fieldName" + , "" + , "int row, QSqlRecord record" + , "\nQModelIndex index" + , "" + , "int row" + , "EditStrategy strategy" + , "String filter" + , "int row, QSqlRecord record" + , "int column, SortOrder order" + , "String tableName" + , "" +"" +}; + +static const int qtscript_QSqlTableModel_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 1 + , 0 + , 2 + , 1 + , 0 + , 1 + , 1 + , 1 + , 2 + , 2 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QSqlTableModel_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSqlTableModel::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSqlTableModel*) +Q_DECLARE_METATYPE(QtScriptShell_QSqlTableModel*) +Q_DECLARE_METATYPE(QSqlTableModel::EditStrategy) +Q_DECLARE_METATYPE(QSqlDatabase) +Q_DECLARE_METATYPE(QSqlRecord) +Q_DECLARE_METATYPE(QSqlIndex) +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QSqlQueryModel*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QSqlTableModel::EditStrategy +// + +static const QSqlTableModel::EditStrategy qtscript_QSqlTableModel_EditStrategy_values[] = { + QSqlTableModel::OnFieldChange + , QSqlTableModel::OnRowChange + , QSqlTableModel::OnManualSubmit +}; + +static const char * const qtscript_QSqlTableModel_EditStrategy_keys[] = { + "OnFieldChange" + , "OnRowChange" + , "OnManualSubmit" +}; + +static QString qtscript_QSqlTableModel_EditStrategy_toStringHelper(QSqlTableModel::EditStrategy value) +{ + if ((value >= QSqlTableModel::OnFieldChange) && (value <= QSqlTableModel::OnManualSubmit)) + return qtscript_QSqlTableModel_EditStrategy_keys[static_cast(value)-static_cast(QSqlTableModel::OnFieldChange)]; + return QString(); +} + +static QScriptValue qtscript_QSqlTableModel_EditStrategy_toScriptValue(QScriptEngine *engine, const QSqlTableModel::EditStrategy &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSqlTableModel")); + return clazz.property(qtscript_QSqlTableModel_EditStrategy_toStringHelper(value)); +} + +static void qtscript_QSqlTableModel_EditStrategy_fromScriptValue(const QScriptValue &value, QSqlTableModel::EditStrategy &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSqlTableModel_EditStrategy(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSqlTableModel::OnFieldChange) && (arg <= QSqlTableModel::OnManualSubmit)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("EditStrategy(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSqlTableModel_EditStrategy_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSqlTableModel::EditStrategy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSqlTableModel_EditStrategy_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSqlTableModel::EditStrategy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSqlTableModel_EditStrategy_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSqlTableModel_EditStrategy_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSqlTableModel_EditStrategy, + qtscript_QSqlTableModel_EditStrategy_valueOf, qtscript_QSqlTableModel_EditStrategy_toString); + qScriptRegisterMetaType(engine, qtscript_QSqlTableModel_EditStrategy_toScriptValue, + qtscript_QSqlTableModel_EditStrategy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSqlTableModel_EditStrategy_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSqlTableModel_EditStrategy_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSqlTableModel +// + +static QScriptValue qtscript_QSqlTableModel_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 14; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSqlTableModel* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSqlTableModel.%0(): this object is not a QSqlTableModel") + .arg(qtscript_QSqlTableModel_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QSqlDatabase _q_result = _q_self->database(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QSqlTableModel::EditStrategy _q_result = _q_self->editStrategy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + int _q_result = _q_self->fieldIndex(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->filter(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QSqlRecord _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->insertRecord(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isDirty(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isDirty(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QSqlIndex _q_result = _q_self->primaryKey(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->revertRow(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QSqlTableModel::EditStrategy _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setEditStrategy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setFilter(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QSqlRecord _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->setRecord(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::SortOrder _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setSort(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setTable(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->tableName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: { + QString result = QString::fromLatin1("QSqlTableModel"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSqlTableModel_throw_ambiguity_error_helper(context, + qtscript_QSqlTableModel_function_names[_id+1], + qtscript_QSqlTableModel_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSqlTableModel_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSqlTableModel(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSqlTableModel* _q_cpp_result = new QtScriptShell_QSqlTableModel(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSqlTableModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QSqlTableModel* _q_cpp_result = new QtScriptShell_QSqlTableModel(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSqlTableModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QSqlDatabase _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QSqlTableModel* _q_cpp_result = new QtScriptShell_QSqlTableModel(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSqlTableModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSqlTableModel_throw_ambiguity_error_helper(context, + qtscript_QSqlTableModel_function_names[_id], + qtscript_QSqlTableModel_function_signatures[_id]); +} + +static QScriptValue qtscript_QSqlTableModel_toScriptValue(QScriptEngine *engine, QSqlTableModel* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSqlTableModel_fromScriptValue(const QScriptValue &value, QSqlTableModel* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSqlTableModel_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSqlTableModel*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 15; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSqlTableModel_prototype_call, qtscript_QSqlTableModel_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSqlTableModel_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSqlTableModel_toScriptValue, + qtscript_QSqlTableModel_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSqlTableModel_static_call, proto, qtscript_QSqlTableModel_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("EditStrategy"), + qtscript_create_QSqlTableModel_EditStrategy_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDatabase.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDatabase.cpp new file mode 100644 index 00000000..db933566 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDatabase.cpp @@ -0,0 +1,35 @@ +#include "qtscriptshell_QSqlDatabase.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QSqlDatabase::QtScriptShell_QSqlDatabase() + : QSqlDatabase() {} + +QtScriptShell_QSqlDatabase::QtScriptShell_QSqlDatabase(QSqlDriver* driver) + : QSqlDatabase(driver) {} + +QtScriptShell_QSqlDatabase::QtScriptShell_QSqlDatabase(const QSqlDatabase& other) + : QSqlDatabase(other) {} + +QtScriptShell_QSqlDatabase::QtScriptShell_QSqlDatabase(const QString& type) + : QSqlDatabase(type) {} + +QtScriptShell_QSqlDatabase::~QtScriptShell_QSqlDatabase() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDatabase.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDatabase.h new file mode 100644 index 00000000..3fb97088 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDatabase.h @@ -0,0 +1,22 @@ +#ifndef QTSCRIPTSHELL_QSQLDATABASE_H +#define QTSCRIPTSHELL_QSQLDATABASE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSqlDatabase : public QSqlDatabase +{ +public: + QtScriptShell_QSqlDatabase(); + QtScriptShell_QSqlDatabase(QSqlDriver* driver); + QtScriptShell_QSqlDatabase(const QSqlDatabase& other); + QtScriptShell_QSqlDatabase(const QString& type); + ~QtScriptShell_QSqlDatabase(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSQLDATABASE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDriver.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDriver.cpp new file mode 100644 index 00000000..b76d2f5e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDriver.cpp @@ -0,0 +1,434 @@ +#include "qtscriptshell_QSqlDriver.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QSqlResult*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QSqlDriver::IdentifierType) +Q_DECLARE_METATYPE(QSqlField) +Q_DECLARE_METATYPE(QSqlDriver::DriverFeature) +Q_DECLARE_METATYPE(QSqlIndex) +Q_DECLARE_METATYPE(QSqlRecord) +Q_DECLARE_METATYPE(QSqlError) +Q_DECLARE_METATYPE(QSqlDriver::StatementType) +Q_DECLARE_METATYPE(QSql::TableType) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QSqlDriver::QtScriptShell_QSqlDriver(QObject* parent) + : QSqlDriver(parent) {} + +QtScriptShell_QSqlDriver::~QtScriptShell_QSqlDriver() {} + +bool QtScriptShell_QSqlDriver::beginTransaction() +{ + QScriptValue _q_function = __qtscript_self.property("beginTransaction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("beginTransaction") & QScriptValue::QObjectMember)) { + return QSqlDriver::beginTransaction(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlDriver::cancelQuery() +{ + QScriptValue _q_function = __qtscript_self.property("cancelQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("cancelQuery") & QScriptValue::QObjectMember)) { + return QSqlDriver::cancelQuery(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSqlDriver::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSqlDriver::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSqlDriver::close() +{ + QScriptValue _q_function = __qtscript_self.property("close"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("close") & QScriptValue::QObjectMember)) { + qFatal("QSqlDriver::close() is abstract!"); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QSqlDriver::commitTransaction() +{ + QScriptValue _q_function = __qtscript_self.property("commitTransaction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("commitTransaction") & QScriptValue::QObjectMember)) { + return QSqlDriver::commitTransaction(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSqlResult* QtScriptShell_QSqlDriver::createResult() const +{ + QScriptValue _q_function = __qtscript_self.property("createResult"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createResult") & QScriptValue::QObjectMember)) { + qFatal("QSqlDriver::createResult() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSqlDriver::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSqlDriver::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QString QtScriptShell_QSqlDriver::escapeIdentifier(const QString& identifier, QSqlDriver::IdentifierType type) const +{ + QScriptValue _q_function = __qtscript_self.property("escapeIdentifier"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("escapeIdentifier") & QScriptValue::QObjectMember)) { + return QSqlDriver::escapeIdentifier(identifier, type); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, identifier) + << qScriptValueFromValue(_q_engine, type))); + } +} + +bool QtScriptShell_QSqlDriver::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSqlDriver::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QSqlDriver::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSqlDriver::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QString QtScriptShell_QSqlDriver::formatValue(const QSqlField& field, bool trimStrings) const +{ + QScriptValue _q_function = __qtscript_self.property("formatValue"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("formatValue") & QScriptValue::QObjectMember)) { + return QSqlDriver::formatValue(field, trimStrings); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, field) + << qScriptValueFromValue(_q_engine, trimStrings))); + } +} + +QVariant QtScriptShell_QSqlDriver::handle() const +{ + QScriptValue _q_function = __qtscript_self.property("handle"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("handle") & QScriptValue::QObjectMember)) { + return QSqlDriver::handle(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlDriver::hasFeature(QSqlDriver::DriverFeature f) const +{ + QScriptValue _q_function = __qtscript_self.property("hasFeature"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasFeature") & QScriptValue::QObjectMember)) { + qFatal("QSqlDriver::hasFeature() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, f))); + } +} + +bool QtScriptShell_QSqlDriver::isIdentifierEscaped(const QString& identifier, QSqlDriver::IdentifierType type) const +{ + QScriptValue _q_function = __qtscript_self.property("isIdentifierEscaped"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isIdentifierEscaped") & QScriptValue::QObjectMember)) { + return QSqlDriver::isIdentifierEscaped(identifier, type); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, identifier) + << qScriptValueFromValue(_q_engine, type))); + } +} + +bool QtScriptShell_QSqlDriver::isOpen() const +{ + QScriptValue _q_function = __qtscript_self.property("isOpen"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isOpen") & QScriptValue::QObjectMember)) { + return QSqlDriver::isOpen(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlDriver::open(const QString& db, const QString& user, const QString& password, const QString& host, int port, const QString& connOpts) +{ + QScriptValue _q_function = __qtscript_self.property("open"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("open") & QScriptValue::QObjectMember)) { + qFatal("QSqlDriver::open() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, db) + << qScriptValueFromValue(_q_engine, user) + << qScriptValueFromValue(_q_engine, password) + << qScriptValueFromValue(_q_engine, host) + << qScriptValueFromValue(_q_engine, port) + << qScriptValueFromValue(_q_engine, connOpts))); + } +} + +QSqlIndex QtScriptShell_QSqlDriver::primaryIndex(const QString& tableName) const +{ + QScriptValue _q_function = __qtscript_self.property("primaryIndex"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("primaryIndex") & QScriptValue::QObjectMember)) { + return QSqlDriver::primaryIndex(tableName); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, tableName))); + } +} + +QSqlRecord QtScriptShell_QSqlDriver::record(const QString& tableName) const +{ + QScriptValue _q_function = __qtscript_self.property("record"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("record") & QScriptValue::QObjectMember)) { + return QSqlDriver::record(tableName); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, tableName))); + } +} + +bool QtScriptShell_QSqlDriver::rollbackTransaction() +{ + QScriptValue _q_function = __qtscript_self.property("rollbackTransaction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rollbackTransaction") & QScriptValue::QObjectMember)) { + return QSqlDriver::rollbackTransaction(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSqlDriver::setLastError(const QSqlError& e) +{ + QScriptValue _q_function = __qtscript_self.property("setLastError"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setLastError") & QScriptValue::QObjectMember)) { + QSqlDriver::setLastError(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QSqlDriver::setOpen(bool o) +{ + QScriptValue _q_function = __qtscript_self.property("setOpen"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setOpen") & QScriptValue::QObjectMember)) { + QSqlDriver::setOpen(o); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, o)); + } +} + +void QtScriptShell_QSqlDriver::setOpenError(bool e) +{ + QScriptValue _q_function = __qtscript_self.property("setOpenError"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setOpenError") & QScriptValue::QObjectMember)) { + QSqlDriver::setOpenError(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QString QtScriptShell_QSqlDriver::sqlStatement(QSqlDriver::StatementType type, const QString& tableName, const QSqlRecord& rec, bool preparedStatement) const +{ + QScriptValue _q_function = __qtscript_self.property("sqlStatement"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sqlStatement") & QScriptValue::QObjectMember)) { + return QSqlDriver::sqlStatement(type, tableName, rec, preparedStatement); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, type) + << qScriptValueFromValue(_q_engine, tableName) + << qScriptValueFromValue(_q_engine, rec) + << qScriptValueFromValue(_q_engine, preparedStatement))); + } +} + +QString QtScriptShell_QSqlDriver::stripDelimiters(const QString& identifier, QSqlDriver::IdentifierType type) const +{ + QScriptValue _q_function = __qtscript_self.property("stripDelimiters"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("stripDelimiters") & QScriptValue::QObjectMember)) { + return QSqlDriver::stripDelimiters(identifier, type); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, identifier) + << qScriptValueFromValue(_q_engine, type))); + } +} + +bool QtScriptShell_QSqlDriver::subscribeToNotification(const QString& name) +{ + QScriptValue _q_function = __qtscript_self.property("subscribeToNotification"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("subscribeToNotification") & QScriptValue::QObjectMember)) { + return QSqlDriver::subscribeToNotification(name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + +QStringList QtScriptShell_QSqlDriver::subscribedToNotifications() const +{ + QScriptValue _q_function = __qtscript_self.property("subscribedToNotifications"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("subscribedToNotifications") & QScriptValue::QObjectMember)) { + return QSqlDriver::subscribedToNotifications(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QStringList QtScriptShell_QSqlDriver::tables(QSql::TableType tableType) const +{ + QScriptValue _q_function = __qtscript_self.property("tables"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tables") & QScriptValue::QObjectMember)) { + return QSqlDriver::tables(tableType); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, tableType))); + } +} + +void QtScriptShell_QSqlDriver::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSqlDriver::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSqlDriver::unsubscribeFromNotification(const QString& name) +{ + QScriptValue _q_function = __qtscript_self.property("unsubscribeFromNotification"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("unsubscribeFromNotification") & QScriptValue::QObjectMember)) { + return QSqlDriver::unsubscribeFromNotification(name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDriver.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDriver.h new file mode 100644 index 00000000..5f612a82 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDriver.h @@ -0,0 +1,48 @@ +#ifndef QTSCRIPTSHELL_QSQLDRIVER_H +#define QTSCRIPTSHELL_QSQLDRIVER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSqlDriver : public QSqlDriver +{ +public: + QtScriptShell_QSqlDriver(QObject* parent = 0); + ~QtScriptShell_QSqlDriver(); + + bool beginTransaction(); + bool cancelQuery(); + void childEvent(QChildEvent* event); + void close(); + bool commitTransaction(); + QSqlResult* createResult() const; + void customEvent(QEvent* event); + QString escapeIdentifier(const QString& identifier, QSqlDriver::IdentifierType type) const; + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + QString formatValue(const QSqlField& field, bool trimStrings = false) const; + QVariant handle() const; + bool hasFeature(QSqlDriver::DriverFeature f) const; + bool isIdentifierEscaped(const QString& identifier, QSqlDriver::IdentifierType type) const; + bool isOpen() const; + bool open(const QString& db, const QString& user = QString(), const QString& password = QString(), const QString& host = QString(), int port = -1, const QString& connOpts = QString()); + QSqlIndex primaryIndex(const QString& tableName) const; + QSqlRecord record(const QString& tableName) const; + bool rollbackTransaction(); + void setLastError(const QSqlError& e); + void setOpen(bool o); + void setOpenError(bool e); + QString sqlStatement(QSqlDriver::StatementType type, const QString& tableName, const QSqlRecord& rec, bool preparedStatement) const; + QString stripDelimiters(const QString& identifier, QSqlDriver::IdentifierType type) const; + bool subscribeToNotification(const QString& name); + QStringList subscribedToNotifications() const; + QStringList tables(QSql::TableType tableType) const; + void timerEvent(QTimerEvent* event); + bool unsubscribeFromNotification(const QString& name); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSQLDRIVER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDriverCreatorBase.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDriverCreatorBase.cpp new file mode 100644 index 00000000..5c30cc52 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDriverCreatorBase.cpp @@ -0,0 +1,27 @@ +#include "qtscriptshell_QSqlDriverCreatorBase.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QSqlDriver*) + +QtScriptShell_QSqlDriverCreatorBase::QtScriptShell_QSqlDriverCreatorBase() + : QSqlDriverCreatorBase() {} + +QtScriptShell_QSqlDriverCreatorBase::~QtScriptShell_QSqlDriverCreatorBase() {} + +QSqlDriver* QtScriptShell_QSqlDriverCreatorBase::createObject() const +{ + QScriptValue _q_function = __qtscript_self.property("createObject"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createObject") & QScriptValue::QObjectMember)) { + qFatal("QSqlDriverCreatorBase::createObject() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDriverCreatorBase.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDriverCreatorBase.h new file mode 100644 index 00000000..79fea8e5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlDriverCreatorBase.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QSQLDRIVERCREATORBASE_H +#define QTSCRIPTSHELL_QSQLDRIVERCREATORBASE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSqlDriverCreatorBase : public QSqlDriverCreatorBase +{ +public: + QtScriptShell_QSqlDriverCreatorBase(); + ~QtScriptShell_QSqlDriverCreatorBase(); + + QSqlDriver* createObject() const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSQLDRIVERCREATORBASE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlQueryModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlQueryModel.cpp new file mode 100644 index 00000000..a6779d0c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlQueryModel.cpp @@ -0,0 +1,645 @@ +#include "qtscriptshell_QSqlQueryModel.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(Qt::DropAction) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::Orientation) +template <> \ +struct QMetaTypeId< QMap > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QMap >("QMap")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QMimeData*) +template <> \ +struct QMetaTypeId< QHash > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QHash >("QHash")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QSqlQueryModel::QtScriptShell_QSqlQueryModel(QObject* parent) + : QSqlQueryModel(parent) {} + +QtScriptShell_QSqlQueryModel::~QtScriptShell_QSqlQueryModel() {} + +QModelIndex QtScriptShell_QSqlQueryModel::buddy(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("buddy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("buddy") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::buddy(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QSqlQueryModel::canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("canDropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canDropMimeData") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::canDropMimeData(data, action, row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action) + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QSqlQueryModel::canFetchMore(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("canFetchMore"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canFetchMore") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::canFetchMore(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QSqlQueryModel::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSqlQueryModel::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSqlQueryModel::clear() +{ + QScriptValue _q_function = __qtscript_self.property("clear"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clear") & QScriptValue::QObjectMember)) { + QSqlQueryModel::clear(); + } else { + _q_function.call(__qtscript_self); + } +} + +int QtScriptShell_QSqlQueryModel::columnCount(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("columnCount"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("columnCount") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::columnCount(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QSqlQueryModel::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSqlQueryModel::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QSqlQueryModel::data(const QModelIndex& item, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("data"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("data") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::data(item, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, item) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QSqlQueryModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("dropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropMimeData") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::dropMimeData(data, action, row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action) + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QSqlQueryModel::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QSqlQueryModel::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSqlQueryModel::fetchMore(const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("fetchMore"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fetchMore") & QScriptValue::QObjectMember)) { + QSqlQueryModel::fetchMore(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent)); + } +} + +Qt::ItemFlags QtScriptShell_QSqlQueryModel::flags(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("flags"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("flags") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::flags(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QVariant QtScriptShell_QSqlQueryModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("headerData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("headerData") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::headerData(section, orientation, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, section) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, role))); + } +} + +QModelIndex QtScriptShell_QSqlQueryModel::index(int row, int column, const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("index"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("index") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::index(row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +QModelIndex QtScriptShell_QSqlQueryModel::indexInQuery(const QModelIndex& item) const +{ + QScriptValue _q_function = __qtscript_self.property("indexInQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexInQuery") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::indexInQuery(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, item))); + } +} + +bool QtScriptShell_QSqlQueryModel::insertColumns(int column, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("insertColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertColumns") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::insertColumns(column, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QSqlQueryModel::insertRows(int row, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("insertRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertRows") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::insertRows(row, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +QMap QtScriptShell_QSqlQueryModel::itemData(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("itemData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemData") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::itemData(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QList QtScriptShell_QSqlQueryModel::match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const +{ + QScriptValue _q_function = __qtscript_self.property("match"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("match") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::match(start, role, value, hits, flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, role) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, hits) + << qScriptValueFromValue(_q_engine, flags))); + } +} + +QMimeData* QtScriptShell_QSqlQueryModel::mimeData(const QList& indexes) const +{ + QScriptValue _q_function = __qtscript_self.property("mimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeData") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::mimeData(indexes); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, indexes))); + } +} + +QStringList QtScriptShell_QSqlQueryModel::mimeTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("mimeTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeTypes") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::mimeTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlQueryModel::moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) +{ + QScriptValue _q_function = __qtscript_self.property("moveColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveColumns") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceParent) + << qScriptValueFromValue(_q_engine, sourceColumn) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, destinationParent) + << qScriptValueFromValue(_q_engine, destinationChild))); + } +} + +bool QtScriptShell_QSqlQueryModel::moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) +{ + QScriptValue _q_function = __qtscript_self.property("moveRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveRows") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceParent) + << qScriptValueFromValue(_q_engine, sourceRow) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, destinationParent) + << qScriptValueFromValue(_q_engine, destinationChild))); + } +} + +void QtScriptShell_QSqlQueryModel::queryChange() +{ + QScriptValue _q_function = __qtscript_self.property("queryChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("queryChange") & QScriptValue::QObjectMember)) { + QSqlQueryModel::queryChange(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QSqlQueryModel::removeColumns(int column, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("removeColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeColumns") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::removeColumns(column, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QSqlQueryModel::removeRows(int row, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("removeRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeRows") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::removeRows(row, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QSqlQueryModel::revert() +{ + QScriptValue _q_function = __qtscript_self.property("revert"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("revert") & QScriptValue::QObjectMember)) { + QSqlQueryModel::revert(); + } else { + _q_function.call(__qtscript_self); + } +} + +QHash QtScriptShell_QSqlQueryModel::roleNames() const +{ + QScriptValue _q_function = __qtscript_self.property("roleNames"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("roleNames") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::roleNames(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QSqlQueryModel::rowCount(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("rowCount"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowCount") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::rowCount(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QSqlQueryModel::setData(const QModelIndex& index, const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setData") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::setData(index, value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QSqlQueryModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setHeaderData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setHeaderData") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::setHeaderData(section, orientation, value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, section) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QSqlQueryModel::setItemData(const QModelIndex& index, const QMap& roles) +{ + QScriptValue _q_function = __qtscript_self.property("setItemData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setItemData") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::setItemData(index, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, roles))); + } +} + +QModelIndex QtScriptShell_QSqlQueryModel::sibling(int row, int column, const QModelIndex& idx) const +{ + QScriptValue _q_function = __qtscript_self.property("sibling"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sibling") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::sibling(row, column, idx); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, idx))); + } +} + +void QtScriptShell_QSqlQueryModel::sort(int column, Qt::SortOrder order) +{ + QScriptValue _q_function = __qtscript_self.property("sort"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sort") & QScriptValue::QObjectMember)) { + QSqlQueryModel::sort(column, order); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, order)); + } +} + +QSize QtScriptShell_QSqlQueryModel::span(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("span"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("span") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::span(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QSqlQueryModel::submit() +{ + QScriptValue _q_function = __qtscript_self.property("submit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("submit") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::submit(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::DropActions QtScriptShell_QSqlQueryModel::supportedDragActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDragActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDragActions") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::supportedDragActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::DropActions QtScriptShell_QSqlQueryModel::supportedDropActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDropActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDropActions") & QScriptValue::QObjectMember)) { + return QSqlQueryModel::supportedDropActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSqlQueryModel::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSqlQueryModel::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlQueryModel.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlQueryModel.h new file mode 100644 index 00000000..ac7be5c5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlQueryModel.h @@ -0,0 +1,59 @@ +#ifndef QTSCRIPTSHELL_QSQLQUERYMODEL_H +#define QTSCRIPTSHELL_QSQLQUERYMODEL_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSqlQueryModel : public QSqlQueryModel +{ +public: + QtScriptShell_QSqlQueryModel(QObject* parent = 0); + ~QtScriptShell_QSqlQueryModel(); + + QModelIndex buddy(const QModelIndex& index) const; + bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const; + bool canFetchMore(const QModelIndex& parent = QModelIndex()) const; + void childEvent(QChildEvent* event); + void clear(); + int columnCount(const QModelIndex& parent = QModelIndex()) const; + void customEvent(QEvent* event); + QVariant data(const QModelIndex& item, int role = Qt::DisplayRole) const; + bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fetchMore(const QModelIndex& parent = QModelIndex()); + Qt::ItemFlags flags(const QModelIndex& index) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + QModelIndex index(int row, int column, const QModelIndex& parent) const; + QModelIndex indexInQuery(const QModelIndex& item) const; + bool insertColumns(int column, int count, const QModelIndex& parent = QModelIndex()); + bool insertRows(int row, int count, const QModelIndex& parent); + QMap itemData(const QModelIndex& index) const; + QList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const; + QMimeData* mimeData(const QList& indexes) const; + QStringList mimeTypes() const; + bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild); + bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild); + void queryChange(); + bool removeColumns(int column, int count, const QModelIndex& parent = QModelIndex()); + bool removeRows(int row, int count, const QModelIndex& parent); + void revert(); + QHash roleNames() const; + int rowCount(const QModelIndex& parent = QModelIndex()) const; + bool setData(const QModelIndex& index, const QVariant& value, int role); + bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role = Qt::EditRole); + bool setItemData(const QModelIndex& index, const QMap& roles); + QModelIndex sibling(int row, int column, const QModelIndex& idx) const; + void sort(int column, Qt::SortOrder order); + QSize span(const QModelIndex& index) const; + bool submit(); + Qt::DropActions supportedDragActions() const; + Qt::DropActions supportedDropActions() const; + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSQLQUERYMODEL_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlRelationalTableModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlRelationalTableModel.cpp new file mode 100644 index 00000000..4473e452 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlRelationalTableModel.cpp @@ -0,0 +1,839 @@ +#include "qtscriptshell_QSqlRelationalTableModel.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(Qt::DropAction) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(QSqlRecord) +template <> \ +struct QMetaTypeId< QMap > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QMap >("QMap")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QMimeData*) +Q_DECLARE_METATYPE(QSqlTableModel*) +template <> \ +struct QMetaTypeId< QHash > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QHash >("QHash")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(QSqlTableModel::EditStrategy) +Q_DECLARE_METATYPE(QSqlRelation) +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QSqlRelationalTableModel::QtScriptShell_QSqlRelationalTableModel(QObject* parent, QSqlDatabase db) + : QSqlRelationalTableModel(parent, db) {} + +QtScriptShell_QSqlRelationalTableModel::~QtScriptShell_QSqlRelationalTableModel() {} + +QModelIndex QtScriptShell_QSqlRelationalTableModel::buddy(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("buddy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("buddy") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::buddy(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("canDropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canDropMimeData") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::canDropMimeData(data, action, row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action) + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::canFetchMore(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("canFetchMore"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canFetchMore") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::canFetchMore(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QSqlRelationalTableModel::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSqlRelationalTableModel::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSqlRelationalTableModel::clear() +{ + QScriptValue _q_function = __qtscript_self.property("clear"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clear") & QScriptValue::QObjectMember)) { + QSqlRelationalTableModel::clear(); + } else { + _q_function.call(__qtscript_self); + } +} + +int QtScriptShell_QSqlRelationalTableModel::columnCount(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("columnCount"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("columnCount") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::columnCount(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QSqlRelationalTableModel::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSqlRelationalTableModel::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QSqlRelationalTableModel::data(const QModelIndex& item, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("data"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("data") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::data(item, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, item) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::deleteRowFromTable(int row) +{ + QScriptValue _q_function = __qtscript_self.property("deleteRowFromTable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("deleteRowFromTable") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::deleteRowFromTable(row); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row))); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("dropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropMimeData") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::dropMimeData(data, action, row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action) + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSqlRelationalTableModel::fetchMore(const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("fetchMore"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fetchMore") & QScriptValue::QObjectMember)) { + QSqlRelationalTableModel::fetchMore(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent)); + } +} + +Qt::ItemFlags QtScriptShell_QSqlRelationalTableModel::flags(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("flags"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("flags") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::flags(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QVariant QtScriptShell_QSqlRelationalTableModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("headerData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("headerData") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::headerData(section, orientation, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, section) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, role))); + } +} + +QModelIndex QtScriptShell_QSqlRelationalTableModel::index(int row, int column, const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("index"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("index") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::index(row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +QModelIndex QtScriptShell_QSqlRelationalTableModel::indexInQuery(const QModelIndex& item) const +{ + QScriptValue _q_function = __qtscript_self.property("indexInQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexInQuery") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::indexInQuery(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, item))); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::insertColumns(int column, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("insertColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertColumns") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::insertColumns(column, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::insertRowIntoTable(const QSqlRecord& values) +{ + QScriptValue _q_function = __qtscript_self.property("insertRowIntoTable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertRowIntoTable") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::insertRowIntoTable(values); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, values))); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::insertRows(int row, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("insertRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertRows") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::insertRows(row, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +QMap QtScriptShell_QSqlRelationalTableModel::itemData(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("itemData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemData") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::itemData(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QList QtScriptShell_QSqlRelationalTableModel::match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const +{ + QScriptValue _q_function = __qtscript_self.property("match"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("match") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::match(start, role, value, hits, flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, role) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, hits) + << qScriptValueFromValue(_q_engine, flags))); + } +} + +QMimeData* QtScriptShell_QSqlRelationalTableModel::mimeData(const QList& indexes) const +{ + QScriptValue _q_function = __qtscript_self.property("mimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeData") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::mimeData(indexes); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, indexes))); + } +} + +QStringList QtScriptShell_QSqlRelationalTableModel::mimeTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("mimeTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeTypes") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::mimeTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) +{ + QScriptValue _q_function = __qtscript_self.property("moveColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveColumns") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceParent) + << qScriptValueFromValue(_q_engine, sourceColumn) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, destinationParent) + << qScriptValueFromValue(_q_engine, destinationChild))); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) +{ + QScriptValue _q_function = __qtscript_self.property("moveRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveRows") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceParent) + << qScriptValueFromValue(_q_engine, sourceRow) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, destinationParent) + << qScriptValueFromValue(_q_engine, destinationChild))); + } +} + +QString QtScriptShell_QSqlRelationalTableModel::orderByClause() const +{ + QScriptValue _q_function = __qtscript_self.property("orderByClause"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("orderByClause") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::orderByClause(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSqlRelationalTableModel::queryChange() +{ + QScriptValue _q_function = __qtscript_self.property("queryChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("queryChange") & QScriptValue::QObjectMember)) { + QSqlRelationalTableModel::queryChange(); + } else { + _q_function.call(__qtscript_self); + } +} + +QSqlTableModel* QtScriptShell_QSqlRelationalTableModel::relationModel(int column) const +{ + QScriptValue _q_function = __qtscript_self.property("relationModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("relationModel") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::relationModel(column); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column))); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::removeColumns(int column, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("removeColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeColumns") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::removeColumns(column, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::removeRows(int row, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("removeRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeRows") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::removeRows(row, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QSqlRelationalTableModel::revert() +{ + QScriptValue _q_function = __qtscript_self.property("revert"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("revert") & QScriptValue::QObjectMember)) { + QSqlRelationalTableModel::revert(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QSqlRelationalTableModel::revertRow(int row) +{ + QScriptValue _q_function = __qtscript_self.property("revertRow"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("revertRow") & QScriptValue::QObjectMember)) { + QSqlRelationalTableModel::revertRow(row); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row)); + } +} + +QHash QtScriptShell_QSqlRelationalTableModel::roleNames() const +{ + QScriptValue _q_function = __qtscript_self.property("roleNames"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("roleNames") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::roleNames(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QSqlRelationalTableModel::rowCount(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("rowCount"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowCount") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::rowCount(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::select() +{ + QScriptValue _q_function = __qtscript_self.property("select"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("select") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::select(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::selectRow(int row) +{ + QScriptValue _q_function = __qtscript_self.property("selectRow"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectRow") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::selectRow(row); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row))); + } +} + +QString QtScriptShell_QSqlRelationalTableModel::selectStatement() const +{ + QScriptValue _q_function = __qtscript_self.property("selectStatement"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectStatement") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::selectStatement(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::setData(const QModelIndex& item, const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setData") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::setData(item, value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, item) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role))); + } +} + +void QtScriptShell_QSqlRelationalTableModel::setEditStrategy(QSqlTableModel::EditStrategy strategy) +{ + QScriptValue _q_function = __qtscript_self.property("setEditStrategy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setEditStrategy") & QScriptValue::QObjectMember)) { + QSqlRelationalTableModel::setEditStrategy(strategy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, strategy)); + } +} + +void QtScriptShell_QSqlRelationalTableModel::setFilter(const QString& filter) +{ + QScriptValue _q_function = __qtscript_self.property("setFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setFilter") & QScriptValue::QObjectMember)) { + QSqlRelationalTableModel::setFilter(filter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, filter)); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setHeaderData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setHeaderData") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::setHeaderData(section, orientation, value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, section) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::setItemData(const QModelIndex& index, const QMap& roles) +{ + QScriptValue _q_function = __qtscript_self.property("setItemData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setItemData") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::setItemData(index, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, roles))); + } +} + +void QtScriptShell_QSqlRelationalTableModel::setRelation(int column, const QSqlRelation& relation) +{ + QScriptValue _q_function = __qtscript_self.property("setRelation"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setRelation") & QScriptValue::QObjectMember)) { + QSqlRelationalTableModel::setRelation(column, relation); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, relation)); + } +} + +void QtScriptShell_QSqlRelationalTableModel::setSort(int column, Qt::SortOrder order) +{ + QScriptValue _q_function = __qtscript_self.property("setSort"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSort") & QScriptValue::QObjectMember)) { + QSqlRelationalTableModel::setSort(column, order); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, order)); + } +} + +void QtScriptShell_QSqlRelationalTableModel::setTable(const QString& tableName) +{ + QScriptValue _q_function = __qtscript_self.property("setTable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setTable") & QScriptValue::QObjectMember)) { + QSqlRelationalTableModel::setTable(tableName); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, tableName)); + } +} + +QModelIndex QtScriptShell_QSqlRelationalTableModel::sibling(int row, int column, const QModelIndex& idx) const +{ + QScriptValue _q_function = __qtscript_self.property("sibling"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sibling") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::sibling(row, column, idx); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, idx))); + } +} + +void QtScriptShell_QSqlRelationalTableModel::sort(int column, Qt::SortOrder order) +{ + QScriptValue _q_function = __qtscript_self.property("sort"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sort") & QScriptValue::QObjectMember)) { + QSqlRelationalTableModel::sort(column, order); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, order)); + } +} + +QSize QtScriptShell_QSqlRelationalTableModel::span(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("span"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("span") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::span(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::submit() +{ + QScriptValue _q_function = __qtscript_self.property("submit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("submit") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::submit(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::DropActions QtScriptShell_QSqlRelationalTableModel::supportedDragActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDragActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDragActions") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::supportedDragActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::DropActions QtScriptShell_QSqlRelationalTableModel::supportedDropActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDropActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDropActions") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::supportedDropActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSqlRelationalTableModel::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSqlRelationalTableModel::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSqlRelationalTableModel::updateRowInTable(int row, const QSqlRecord& values) +{ + QScriptValue _q_function = __qtscript_self.property("updateRowInTable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateRowInTable") & QScriptValue::QObjectMember)) { + return QSqlRelationalTableModel::updateRowInTable(row, values); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, values))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlRelationalTableModel.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlRelationalTableModel.h new file mode 100644 index 00000000..1dae8cbc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlRelationalTableModel.h @@ -0,0 +1,73 @@ +#ifndef QTSCRIPTSHELL_QSQLRELATIONALTABLEMODEL_H +#define QTSCRIPTSHELL_QSQLRELATIONALTABLEMODEL_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSqlRelationalTableModel : public QSqlRelationalTableModel +{ +public: + QtScriptShell_QSqlRelationalTableModel(QObject* parent = 0, QSqlDatabase db = QSqlDatabase()); + ~QtScriptShell_QSqlRelationalTableModel(); + + QModelIndex buddy(const QModelIndex& index) const; + bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const; + bool canFetchMore(const QModelIndex& parent) const; + void childEvent(QChildEvent* event); + void clear(); + int columnCount(const QModelIndex& parent) const; + void customEvent(QEvent* event); + QVariant data(const QModelIndex& item, int role = Qt::DisplayRole) const; + bool deleteRowFromTable(int row); + bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fetchMore(const QModelIndex& parent); + Qt::ItemFlags flags(const QModelIndex& index) const; + QVariant headerData(int section, Qt::Orientation orientation, int role) const; + QModelIndex index(int row, int column, const QModelIndex& parent) const; + QModelIndex indexInQuery(const QModelIndex& item) const; + bool insertColumns(int column, int count, const QModelIndex& parent); + bool insertRowIntoTable(const QSqlRecord& values); + bool insertRows(int row, int count, const QModelIndex& parent); + QMap itemData(const QModelIndex& index) const; + QList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const; + QMimeData* mimeData(const QList& indexes) const; + QStringList mimeTypes() const; + bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild); + bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild); + QString orderByClause() const; + void queryChange(); + QSqlTableModel* relationModel(int column) const; + bool removeColumns(int column, int count, const QModelIndex& parent = QModelIndex()); + bool removeRows(int row, int count, const QModelIndex& parent); + void revert(); + void revertRow(int row); + QHash roleNames() const; + int rowCount(const QModelIndex& parent) const; + bool select(); + bool selectRow(int row); + QString selectStatement() const; + bool setData(const QModelIndex& item, const QVariant& value, int role = Qt::EditRole); + void setEditStrategy(QSqlTableModel::EditStrategy strategy); + void setFilter(const QString& filter); + bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role); + bool setItemData(const QModelIndex& index, const QMap& roles); + void setRelation(int column, const QSqlRelation& relation); + void setSort(int column, Qt::SortOrder order); + void setTable(const QString& tableName); + QModelIndex sibling(int row, int column, const QModelIndex& idx) const; + void sort(int column, Qt::SortOrder order); + QSize span(const QModelIndex& index) const; + bool submit(); + Qt::DropActions supportedDragActions() const; + Qt::DropActions supportedDropActions() const; + void timerEvent(QTimerEvent* event); + bool updateRowInTable(int row, const QSqlRecord& values); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSQLRELATIONALTABLEMODEL_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlResult.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlResult.cpp new file mode 100644 index 00000000..c2374708 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlResult.cpp @@ -0,0 +1,387 @@ +#include "qtscriptshell_QSqlResult.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QSqlRecord) +Q_DECLARE_METATYPE(QSqlError) +Q_DECLARE_METATYPE(QSql::NumericalPrecisionPolicy) + +QtScriptShell_QSqlResult::QtScriptShell_QSqlResult(const QSqlDriver* db) + : QSqlResult(db) {} + +QtScriptShell_QSqlResult::~QtScriptShell_QSqlResult() {} + +void QtScriptShell_QSqlResult::bindValue(const QString& placeholder, const QVariant& val, QSql::ParamType type) +{ + QScriptValue _q_function = __qtscript_self.property("bindValue"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bindValue") & QScriptValue::QObjectMember)) { + QSqlResult::bindValue(placeholder, val, type); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, placeholder) + << qScriptValueFromValue(_q_engine, val) + << qScriptValueFromValue(_q_engine, type)); + } +} + +void QtScriptShell_QSqlResult::bindValue(int pos, const QVariant& val, QSql::ParamType type) +{ + QScriptValue _q_function = __qtscript_self.property("bindValue"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("bindValue") & QScriptValue::QObjectMember)) { + QSqlResult::bindValue(pos, val, type); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pos) + << qScriptValueFromValue(_q_engine, val) + << qScriptValueFromValue(_q_engine, type)); + } +} + +QVariant QtScriptShell_QSqlResult::data(int i) +{ + QScriptValue _q_function = __qtscript_self.property("data"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("data") & QScriptValue::QObjectMember)) { + qFatal("QSqlResult::data() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, i))); + } +} + +void QtScriptShell_QSqlResult::detachFromResultSet() +{ + QScriptValue _q_function = __qtscript_self.property("detachFromResultSet"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("detachFromResultSet") & QScriptValue::QObjectMember)) { + QSqlResult::detachFromResultSet(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QSqlResult::exec() +{ + QScriptValue _q_function = __qtscript_self.property("exec"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("exec") & QScriptValue::QObjectMember)) { + return QSqlResult::exec(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlResult::execBatch(bool arrayBind) +{ + QScriptValue _q_function = __qtscript_self.property("execBatch"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("execBatch") & QScriptValue::QObjectMember)) { + return QSqlResult::execBatch(arrayBind); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arrayBind))); + } +} + +bool QtScriptShell_QSqlResult::fetch(int i) +{ + QScriptValue _q_function = __qtscript_self.property("fetch"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fetch") & QScriptValue::QObjectMember)) { + qFatal("QSqlResult::fetch() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, i))); + } +} + +bool QtScriptShell_QSqlResult::fetchFirst() +{ + QScriptValue _q_function = __qtscript_self.property("fetchFirst"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fetchFirst") & QScriptValue::QObjectMember)) { + qFatal("QSqlResult::fetchFirst() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlResult::fetchLast() +{ + QScriptValue _q_function = __qtscript_self.property("fetchLast"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fetchLast") & QScriptValue::QObjectMember)) { + qFatal("QSqlResult::fetchLast() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlResult::fetchNext() +{ + QScriptValue _q_function = __qtscript_self.property("fetchNext"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fetchNext") & QScriptValue::QObjectMember)) { + return QSqlResult::fetchNext(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlResult::fetchPrevious() +{ + QScriptValue _q_function = __qtscript_self.property("fetchPrevious"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fetchPrevious") & QScriptValue::QObjectMember)) { + return QSqlResult::fetchPrevious(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QVariant QtScriptShell_QSqlResult::handle() const +{ + QScriptValue _q_function = __qtscript_self.property("handle"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("handle") & QScriptValue::QObjectMember)) { + return QSqlResult::handle(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlResult::isNull(int i) +{ + QScriptValue _q_function = __qtscript_self.property("isNull"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isNull") & QScriptValue::QObjectMember)) { + qFatal("QSqlResult::isNull() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, i))); + } +} + +QVariant QtScriptShell_QSqlResult::lastInsertId() const +{ + QScriptValue _q_function = __qtscript_self.property("lastInsertId"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("lastInsertId") & QScriptValue::QObjectMember)) { + return QSqlResult::lastInsertId(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlResult::nextResult() +{ + QScriptValue _q_function = __qtscript_self.property("nextResult"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nextResult") & QScriptValue::QObjectMember)) { + return QSqlResult::nextResult(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QSqlResult::numRowsAffected() +{ + QScriptValue _q_function = __qtscript_self.property("numRowsAffected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("numRowsAffected") & QScriptValue::QObjectMember)) { + qFatal("QSqlResult::numRowsAffected() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlResult::prepare(const QString& query) +{ + QScriptValue _q_function = __qtscript_self.property("prepare"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("prepare") & QScriptValue::QObjectMember)) { + return QSqlResult::prepare(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +QSqlRecord QtScriptShell_QSqlResult::record() const +{ + QScriptValue _q_function = __qtscript_self.property("record"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("record") & QScriptValue::QObjectMember)) { + return QSqlResult::record(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlResult::reset(const QString& sqlquery) +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + qFatal("QSqlResult::reset() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sqlquery))); + } +} + +bool QtScriptShell_QSqlResult::savePrepare(const QString& sqlquery) +{ + QScriptValue _q_function = __qtscript_self.property("savePrepare"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("savePrepare") & QScriptValue::QObjectMember)) { + return QSqlResult::savePrepare(sqlquery); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sqlquery))); + } +} + +void QtScriptShell_QSqlResult::setActive(bool a) +{ + QScriptValue _q_function = __qtscript_self.property("setActive"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setActive") & QScriptValue::QObjectMember)) { + QSqlResult::setActive(a); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, a)); + } +} + +void QtScriptShell_QSqlResult::setAt(int at) +{ + QScriptValue _q_function = __qtscript_self.property("setAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setAt") & QScriptValue::QObjectMember)) { + QSqlResult::setAt(at); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, at)); + } +} + +void QtScriptShell_QSqlResult::setForwardOnly(bool forward) +{ + QScriptValue _q_function = __qtscript_self.property("setForwardOnly"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setForwardOnly") & QScriptValue::QObjectMember)) { + QSqlResult::setForwardOnly(forward); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, forward)); + } +} + +void QtScriptShell_QSqlResult::setLastError(const QSqlError& e) +{ + QScriptValue _q_function = __qtscript_self.property("setLastError"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setLastError") & QScriptValue::QObjectMember)) { + QSqlResult::setLastError(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QSqlResult::setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy policy) +{ + QScriptValue _q_function = __qtscript_self.property("setNumericalPrecisionPolicy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setNumericalPrecisionPolicy") & QScriptValue::QObjectMember)) { + QSqlResult::setNumericalPrecisionPolicy(policy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, policy)); + } +} + +void QtScriptShell_QSqlResult::setQuery(const QString& query) +{ + QScriptValue _q_function = __qtscript_self.property("setQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setQuery") & QScriptValue::QObjectMember)) { + QSqlResult::setQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query)); + } +} + +void QtScriptShell_QSqlResult::setSelect(bool s) +{ + QScriptValue _q_function = __qtscript_self.property("setSelect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelect") & QScriptValue::QObjectMember)) { + QSqlResult::setSelect(s); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, s)); + } +} + +int QtScriptShell_QSqlResult::size() +{ + QScriptValue _q_function = __qtscript_self.property("size"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("size") & QScriptValue::QObjectMember)) { + qFatal("QSqlResult::size() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlResult.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlResult.h new file mode 100644 index 00000000..3d1877ee --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlResult.h @@ -0,0 +1,47 @@ +#ifndef QTSCRIPTSHELL_QSQLRESULT_H +#define QTSCRIPTSHELL_QSQLRESULT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSqlResult : public QSqlResult +{ +public: + QtScriptShell_QSqlResult(const QSqlDriver* db); + ~QtScriptShell_QSqlResult(); + + void bindValue(const QString& placeholder, const QVariant& val, QSql::ParamType type); + void bindValue(int pos, const QVariant& val, QSql::ParamType type); + QVariant data(int i); + void detachFromResultSet(); + bool exec(); + bool execBatch(bool arrayBind = false); + bool fetch(int i); + bool fetchFirst(); + bool fetchLast(); + bool fetchNext(); + bool fetchPrevious(); + QVariant handle() const; + bool isNull(int i); + QVariant lastInsertId() const; + bool nextResult(); + int numRowsAffected(); + bool prepare(const QString& query); + QSqlRecord record() const; + bool reset(const QString& sqlquery); + bool savePrepare(const QString& sqlquery); + void setActive(bool a); + void setAt(int at); + void setForwardOnly(bool forward); + void setLastError(const QSqlError& e); + void setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy policy); + void setQuery(const QString& query); + void setSelect(bool s); + int size(); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSQLRESULT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlTableModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlTableModel.cpp new file mode 100644 index 00000000..37686ddd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlTableModel.cpp @@ -0,0 +1,807 @@ +#include "qtscriptshell_QSqlTableModel.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(Qt::DropAction) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(QSqlRecord) +template <> \ +struct QMetaTypeId< QMap > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QMap >("QMap")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QMimeData*) +template <> \ +struct QMetaTypeId< QHash > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QHash >("QHash")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(QSqlTableModel::EditStrategy) +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QSqlTableModel::QtScriptShell_QSqlTableModel(QObject* parent, QSqlDatabase db) + : QSqlTableModel(parent, db) {} + +QtScriptShell_QSqlTableModel::~QtScriptShell_QSqlTableModel() {} + +QModelIndex QtScriptShell_QSqlTableModel::buddy(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("buddy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("buddy") & QScriptValue::QObjectMember)) { + return QSqlTableModel::buddy(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QSqlTableModel::canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("canDropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canDropMimeData") & QScriptValue::QObjectMember)) { + return QSqlTableModel::canDropMimeData(data, action, row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action) + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QSqlTableModel::canFetchMore(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("canFetchMore"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canFetchMore") & QScriptValue::QObjectMember)) { + return QSqlTableModel::canFetchMore(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QSqlTableModel::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSqlTableModel::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSqlTableModel::clear() +{ + QScriptValue _q_function = __qtscript_self.property("clear"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clear") & QScriptValue::QObjectMember)) { + QSqlTableModel::clear(); + } else { + _q_function.call(__qtscript_self); + } +} + +int QtScriptShell_QSqlTableModel::columnCount(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("columnCount"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("columnCount") & QScriptValue::QObjectMember)) { + return QSqlTableModel::columnCount(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QSqlTableModel::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSqlTableModel::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QSqlTableModel::data(const QModelIndex& idx, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("data"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("data") & QScriptValue::QObjectMember)) { + return QSqlTableModel::data(idx, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, idx) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QSqlTableModel::deleteRowFromTable(int row) +{ + QScriptValue _q_function = __qtscript_self.property("deleteRowFromTable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("deleteRowFromTable") & QScriptValue::QObjectMember)) { + return QSqlTableModel::deleteRowFromTable(row); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row))); + } +} + +bool QtScriptShell_QSqlTableModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("dropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropMimeData") & QScriptValue::QObjectMember)) { + return QSqlTableModel::dropMimeData(data, action, row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action) + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QSqlTableModel::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSqlTableModel::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QSqlTableModel::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSqlTableModel::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSqlTableModel::fetchMore(const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("fetchMore"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fetchMore") & QScriptValue::QObjectMember)) { + QSqlTableModel::fetchMore(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent)); + } +} + +Qt::ItemFlags QtScriptShell_QSqlTableModel::flags(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("flags"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("flags") & QScriptValue::QObjectMember)) { + return QSqlTableModel::flags(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QVariant QtScriptShell_QSqlTableModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("headerData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("headerData") & QScriptValue::QObjectMember)) { + return QSqlTableModel::headerData(section, orientation, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, section) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, role))); + } +} + +QModelIndex QtScriptShell_QSqlTableModel::index(int row, int column, const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("index"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("index") & QScriptValue::QObjectMember)) { + return QSqlTableModel::index(row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +QModelIndex QtScriptShell_QSqlTableModel::indexInQuery(const QModelIndex& item) const +{ + QScriptValue _q_function = __qtscript_self.property("indexInQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexInQuery") & QScriptValue::QObjectMember)) { + return QSqlTableModel::indexInQuery(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, item))); + } +} + +bool QtScriptShell_QSqlTableModel::insertColumns(int column, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("insertColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertColumns") & QScriptValue::QObjectMember)) { + return QSqlTableModel::insertColumns(column, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QSqlTableModel::insertRowIntoTable(const QSqlRecord& values) +{ + QScriptValue _q_function = __qtscript_self.property("insertRowIntoTable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertRowIntoTable") & QScriptValue::QObjectMember)) { + return QSqlTableModel::insertRowIntoTable(values); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, values))); + } +} + +bool QtScriptShell_QSqlTableModel::insertRows(int row, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("insertRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertRows") & QScriptValue::QObjectMember)) { + return QSqlTableModel::insertRows(row, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +QMap QtScriptShell_QSqlTableModel::itemData(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("itemData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemData") & QScriptValue::QObjectMember)) { + return QSqlTableModel::itemData(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QList QtScriptShell_QSqlTableModel::match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const +{ + QScriptValue _q_function = __qtscript_self.property("match"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("match") & QScriptValue::QObjectMember)) { + return QSqlTableModel::match(start, role, value, hits, flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, role) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, hits) + << qScriptValueFromValue(_q_engine, flags))); + } +} + +QMimeData* QtScriptShell_QSqlTableModel::mimeData(const QList& indexes) const +{ + QScriptValue _q_function = __qtscript_self.property("mimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeData") & QScriptValue::QObjectMember)) { + return QSqlTableModel::mimeData(indexes); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, indexes))); + } +} + +QStringList QtScriptShell_QSqlTableModel::mimeTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("mimeTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeTypes") & QScriptValue::QObjectMember)) { + return QSqlTableModel::mimeTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlTableModel::moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) +{ + QScriptValue _q_function = __qtscript_self.property("moveColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveColumns") & QScriptValue::QObjectMember)) { + return QSqlTableModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceParent) + << qScriptValueFromValue(_q_engine, sourceColumn) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, destinationParent) + << qScriptValueFromValue(_q_engine, destinationChild))); + } +} + +bool QtScriptShell_QSqlTableModel::moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) +{ + QScriptValue _q_function = __qtscript_self.property("moveRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveRows") & QScriptValue::QObjectMember)) { + return QSqlTableModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceParent) + << qScriptValueFromValue(_q_engine, sourceRow) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, destinationParent) + << qScriptValueFromValue(_q_engine, destinationChild))); + } +} + +QString QtScriptShell_QSqlTableModel::orderByClause() const +{ + QScriptValue _q_function = __qtscript_self.property("orderByClause"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("orderByClause") & QScriptValue::QObjectMember)) { + return QSqlTableModel::orderByClause(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSqlTableModel::queryChange() +{ + QScriptValue _q_function = __qtscript_self.property("queryChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("queryChange") & QScriptValue::QObjectMember)) { + QSqlTableModel::queryChange(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QSqlTableModel::removeColumns(int column, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("removeColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeColumns") & QScriptValue::QObjectMember)) { + return QSqlTableModel::removeColumns(column, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QSqlTableModel::removeRows(int row, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("removeRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeRows") & QScriptValue::QObjectMember)) { + return QSqlTableModel::removeRows(row, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QSqlTableModel::revert() +{ + QScriptValue _q_function = __qtscript_self.property("revert"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("revert") & QScriptValue::QObjectMember)) { + QSqlTableModel::revert(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QSqlTableModel::revertRow(int row) +{ + QScriptValue _q_function = __qtscript_self.property("revertRow"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("revertRow") & QScriptValue::QObjectMember)) { + QSqlTableModel::revertRow(row); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row)); + } +} + +QHash QtScriptShell_QSqlTableModel::roleNames() const +{ + QScriptValue _q_function = __qtscript_self.property("roleNames"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("roleNames") & QScriptValue::QObjectMember)) { + return QSqlTableModel::roleNames(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QSqlTableModel::rowCount(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("rowCount"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowCount") & QScriptValue::QObjectMember)) { + return QSqlTableModel::rowCount(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QSqlTableModel::select() +{ + QScriptValue _q_function = __qtscript_self.property("select"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("select") & QScriptValue::QObjectMember)) { + return QSqlTableModel::select(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlTableModel::selectRow(int row) +{ + QScriptValue _q_function = __qtscript_self.property("selectRow"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectRow") & QScriptValue::QObjectMember)) { + return QSqlTableModel::selectRow(row); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row))); + } +} + +QString QtScriptShell_QSqlTableModel::selectStatement() const +{ + QScriptValue _q_function = __qtscript_self.property("selectStatement"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectStatement") & QScriptValue::QObjectMember)) { + return QSqlTableModel::selectStatement(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSqlTableModel::setData(const QModelIndex& index, const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setData") & QScriptValue::QObjectMember)) { + return QSqlTableModel::setData(index, value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role))); + } +} + +void QtScriptShell_QSqlTableModel::setEditStrategy(QSqlTableModel::EditStrategy strategy) +{ + QScriptValue _q_function = __qtscript_self.property("setEditStrategy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setEditStrategy") & QScriptValue::QObjectMember)) { + QSqlTableModel::setEditStrategy(strategy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, strategy)); + } +} + +void QtScriptShell_QSqlTableModel::setFilter(const QString& filter) +{ + QScriptValue _q_function = __qtscript_self.property("setFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setFilter") & QScriptValue::QObjectMember)) { + QSqlTableModel::setFilter(filter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, filter)); + } +} + +bool QtScriptShell_QSqlTableModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setHeaderData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setHeaderData") & QScriptValue::QObjectMember)) { + return QSqlTableModel::setHeaderData(section, orientation, value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, section) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QSqlTableModel::setItemData(const QModelIndex& index, const QMap& roles) +{ + QScriptValue _q_function = __qtscript_self.property("setItemData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setItemData") & QScriptValue::QObjectMember)) { + return QSqlTableModel::setItemData(index, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, roles))); + } +} + +void QtScriptShell_QSqlTableModel::setSort(int column, Qt::SortOrder order) +{ + QScriptValue _q_function = __qtscript_self.property("setSort"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSort") & QScriptValue::QObjectMember)) { + QSqlTableModel::setSort(column, order); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, order)); + } +} + +void QtScriptShell_QSqlTableModel::setTable(const QString& tableName) +{ + QScriptValue _q_function = __qtscript_self.property("setTable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setTable") & QScriptValue::QObjectMember)) { + QSqlTableModel::setTable(tableName); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, tableName)); + } +} + +QModelIndex QtScriptShell_QSqlTableModel::sibling(int row, int column, const QModelIndex& idx) const +{ + QScriptValue _q_function = __qtscript_self.property("sibling"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sibling") & QScriptValue::QObjectMember)) { + return QSqlTableModel::sibling(row, column, idx); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, idx))); + } +} + +void QtScriptShell_QSqlTableModel::sort(int column, Qt::SortOrder order) +{ + QScriptValue _q_function = __qtscript_self.property("sort"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sort") & QScriptValue::QObjectMember)) { + QSqlTableModel::sort(column, order); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, order)); + } +} + +QSize QtScriptShell_QSqlTableModel::span(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("span"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("span") & QScriptValue::QObjectMember)) { + return QSqlTableModel::span(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QSqlTableModel::submit() +{ + QScriptValue _q_function = __qtscript_self.property("submit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("submit") & QScriptValue::QObjectMember)) { + return QSqlTableModel::submit(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::DropActions QtScriptShell_QSqlTableModel::supportedDragActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDragActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDragActions") & QScriptValue::QObjectMember)) { + return QSqlTableModel::supportedDragActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::DropActions QtScriptShell_QSqlTableModel::supportedDropActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDropActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDropActions") & QScriptValue::QObjectMember)) { + return QSqlTableModel::supportedDropActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSqlTableModel::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSqlTableModel::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSqlTableModel::updateRowInTable(int row, const QSqlRecord& values) +{ + QScriptValue _q_function = __qtscript_self.property("updateRowInTable"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateRowInTable") & QScriptValue::QObjectMember)) { + return QSqlTableModel::updateRowInTable(row, values); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, values))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlTableModel.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlTableModel.h new file mode 100644 index 00000000..1eec3334 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_sql/qtscriptshell_QSqlTableModel.h @@ -0,0 +1,71 @@ +#ifndef QTSCRIPTSHELL_QSQLTABLEMODEL_H +#define QTSCRIPTSHELL_QSQLTABLEMODEL_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSqlTableModel : public QSqlTableModel +{ +public: + QtScriptShell_QSqlTableModel(QObject* parent = 0, QSqlDatabase db = QSqlDatabase()); + ~QtScriptShell_QSqlTableModel(); + + QModelIndex buddy(const QModelIndex& index) const; + bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const; + bool canFetchMore(const QModelIndex& parent) const; + void childEvent(QChildEvent* event); + void clear(); + int columnCount(const QModelIndex& parent) const; + void customEvent(QEvent* event); + QVariant data(const QModelIndex& idx, int role = Qt::DisplayRole) const; + bool deleteRowFromTable(int row); + bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fetchMore(const QModelIndex& parent); + Qt::ItemFlags flags(const QModelIndex& index) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + QModelIndex index(int row, int column, const QModelIndex& parent) const; + QModelIndex indexInQuery(const QModelIndex& item) const; + bool insertColumns(int column, int count, const QModelIndex& parent); + bool insertRowIntoTable(const QSqlRecord& values); + bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex()); + QMap itemData(const QModelIndex& index) const; + QList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const; + QMimeData* mimeData(const QList& indexes) const; + QStringList mimeTypes() const; + bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild); + bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild); + QString orderByClause() const; + void queryChange(); + bool removeColumns(int column, int count, const QModelIndex& parent = QModelIndex()); + bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()); + void revert(); + void revertRow(int row); + QHash roleNames() const; + int rowCount(const QModelIndex& parent = QModelIndex()) const; + bool select(); + bool selectRow(int row); + QString selectStatement() const; + bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); + void setEditStrategy(QSqlTableModel::EditStrategy strategy); + void setFilter(const QString& filter); + bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role); + bool setItemData(const QModelIndex& index, const QMap& roles); + void setSort(int column, Qt::SortOrder order); + void setTable(const QString& tableName); + QModelIndex sibling(int row, int column, const QModelIndex& idx) const; + void sort(int column, Qt::SortOrder order); + QSize span(const QModelIndex& index) const; + bool submit(); + Qt::DropActions supportedDragActions() const; + Qt::DropActions supportedDropActions() const; + void timerEvent(QTimerEvent* event); + bool updateRowInTable(int row, const QSqlRecord& values); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSQLTABLEMODEL_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/com_trolltech_qt_uitools.pri b/src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/com_trolltech_qt_uitools.pri new file mode 100644 index 00000000..d75473f2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/com_trolltech_qt_uitools.pri @@ -0,0 +1,7 @@ +HEADERS += \ + $$PWD/qtscriptshell_QUiLoader.h \ + +SOURCES += \ + $$PWD/qtscript_QUiLoader.cpp \ + $$PWD/qtscriptshell_QUiLoader.cpp \ + $$PWD/com_trolltech_qt_uitools_init.cpp diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/com_trolltech_qt_uitools_init.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/com_trolltech_qt_uitools_init.cpp new file mode 100644 index 00000000..2f4e89ec --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/com_trolltech_qt_uitools_init.cpp @@ -0,0 +1,23 @@ +#include +#include + +QScriptValue qtscript_create_QUiLoader_class(QScriptEngine *engine); + +static const char * const qtscript_com_trolltech_qt_uitools_class_names[] = { + "QUiLoader" +}; + +typedef QScriptValue (*QtBindingCreator)(QScriptEngine *engine); +static const QtBindingCreator qtscript_com_trolltech_qt_uitools_class_functions[] = { + qtscript_create_QUiLoader_class +}; + +void qtscript_initialize_com_trolltech_qt_uitools_bindings(QScriptValue &extensionObject) +{ + QScriptEngine *engine = extensionObject.engine(); + for (int i = 0; i < 1; ++i) { + extensionObject.setProperty(qtscript_com_trolltech_qt_uitools_class_names[i], + qtscript_com_trolltech_qt_uitools_class_functions[i](engine), + QScriptValue::SkipInEnumeration); + } +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/qtscript_QUiLoader.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/qtscript_QUiLoader.cpp new file mode 100644 index 00000000..b4a2db05 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/qtscript_QUiLoader.cpp @@ -0,0 +1,399 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QUiLoader.h" + +static const char * const qtscript_QUiLoader_function_names[] = { + "QUiLoader" + // static + // prototype + , "addPluginPath" + , "availableLayouts" + , "availableWidgets" + , "clearPluginPaths" + , "createAction" + , "createActionGroup" + , "createLayout" + , "createWidget" + , "errorString" + , "isLanguageChangeEnabled" + , "isTranslationEnabled" + , "load" + , "pluginPaths" + , "setLanguageChangeEnabled" + , "setTranslationEnabled" + , "setWorkingDirectory" + , "workingDirectory" + , "toString" +}; + +static const char * const qtscript_QUiLoader_function_signatures[] = { + "QObject parent" + // static + // prototype + , "String path" + , "" + , "" + , "" + , "QObject parent, String name" + , "QObject parent, String name" + , "String className, QObject parent, String name" + , "String className, QWidget parent, String name" + , "" + , "" + , "" + , "QIODevice device, QWidget parentWidget" + , "" + , "bool enabled" + , "bool enabled" + , "QDir dir" + , "" +"" +}; + +static const int qtscript_QUiLoader_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 0 + , 0 + , 2 + , 2 + , 3 + , 3 + , 0 + , 0 + , 0 + , 2 + , 0 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QUiLoader_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QUiLoader::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QUiLoader*) +Q_DECLARE_METATYPE(QtScriptShell_QUiLoader*) +Q_DECLARE_METATYPE(QAction*) +Q_DECLARE_METATYPE(QActionGroup*) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QDir) + +// +// QUiLoader +// + +static QScriptValue qtscript_QUiLoader_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 17; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QUiLoader* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QUiLoader.%0(): this object is not a QUiLoader") + .arg(qtscript_QUiLoader_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->addPluginPath(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->availableLayouts(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->availableWidgets(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->clearPluginPaths(); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QAction* _q_result = _q_self->createAction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QAction* _q_result = _q_self->createAction(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QString _q_arg1 = context->argument(1).toString(); + QAction* _q_result = _q_self->createAction(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QActionGroup* _q_result = _q_self->createActionGroup(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QActionGroup* _q_result = _q_self->createActionGroup(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QString _q_arg1 = context->argument(1).toString(); + QActionGroup* _q_result = _q_self->createActionGroup(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QLayout* _q_result = _q_self->createLayout(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QObject* _q_arg1 = context->argument(1).toQObject(); + QLayout* _q_result = _q_self->createLayout(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QObject* _q_arg1 = context->argument(1).toQObject(); + QString _q_arg2 = context->argument(2).toString(); + QLayout* _q_result = _q_self->createLayout(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_result = _q_self->createWidget(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QWidget* _q_result = _q_self->createWidget(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + QWidget* _q_result = _q_self->createWidget(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isLanguageChangeEnabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isTranslationEnabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_result = _q_self->load(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QWidget* _q_result = _q_self->load(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->pluginPaths(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setLanguageChangeEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setTranslationEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QDir _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWorkingDirectory(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QDir _q_result = _q_self->workingDirectory(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: { + QString result = QString::fromLatin1("QUiLoader"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QUiLoader_throw_ambiguity_error_helper(context, + qtscript_QUiLoader_function_names[_id+1], + qtscript_QUiLoader_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QUiLoader_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QUiLoader(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QUiLoader* _q_cpp_result = new QtScriptShell_QUiLoader(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QUiLoader*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QUiLoader* _q_cpp_result = new QtScriptShell_QUiLoader(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QUiLoader*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QUiLoader_throw_ambiguity_error_helper(context, + qtscript_QUiLoader_function_names[_id], + qtscript_QUiLoader_function_signatures[_id]); +} + +static QScriptValue qtscript_QUiLoader_toScriptValue(QScriptEngine *engine, QUiLoader* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QUiLoader_fromScriptValue(const QScriptValue &value, QUiLoader* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QUiLoader_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QUiLoader*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 18; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QUiLoader_prototype_call, qtscript_QUiLoader_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QUiLoader_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QUiLoader_toScriptValue, + qtscript_QUiLoader_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QUiLoader_static_call, proto, qtscript_QUiLoader_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/qtscriptshell_QUiLoader.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/qtscriptshell_QUiLoader.cpp new file mode 100644 index 00000000..ec9b8f66 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/qtscriptshell_QUiLoader.cpp @@ -0,0 +1,166 @@ +#include "qtscriptshell_QUiLoader.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QAction*) +Q_DECLARE_METATYPE(QActionGroup*) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QUiLoader::QtScriptShell_QUiLoader(QObject* parent) + : QUiLoader(parent) {} + +QtScriptShell_QUiLoader::~QtScriptShell_QUiLoader() {} + +void QtScriptShell_QUiLoader::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QUiLoader::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QAction* QtScriptShell_QUiLoader::createAction(QObject* parent, const QString& name) +{ + QScriptValue _q_function = __qtscript_self.property("createAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createAction") & QScriptValue::QObjectMember)) { + return QUiLoader::createAction(parent, name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, name))); + } +} + +QActionGroup* QtScriptShell_QUiLoader::createActionGroup(QObject* parent, const QString& name) +{ + QScriptValue _q_function = __qtscript_self.property("createActionGroup"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createActionGroup") & QScriptValue::QObjectMember)) { + return QUiLoader::createActionGroup(parent, name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, name))); + } +} + +QLayout* QtScriptShell_QUiLoader::createLayout(const QString& className, QObject* parent, const QString& name) +{ + QScriptValue _q_function = __qtscript_self.property("createLayout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createLayout") & QScriptValue::QObjectMember)) { + return QUiLoader::createLayout(className, parent, name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, className) + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, name))); + } +} + +QWidget* QtScriptShell_QUiLoader::createWidget(const QString& className, QWidget* parent, const QString& name) +{ + QScriptValue _q_function = __qtscript_self.property("createWidget"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createWidget") & QScriptValue::QObjectMember)) { + return QUiLoader::createWidget(className, parent, name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, className) + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, name))); + } +} + +void QtScriptShell_QUiLoader::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QUiLoader::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QUiLoader::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QUiLoader::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QUiLoader::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QUiLoader::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QUiLoader::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QUiLoader::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/qtscriptshell_QUiLoader.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/qtscriptshell_QUiLoader.h new file mode 100644 index 00000000..0da856c7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_uitools/qtscriptshell_QUiLoader.h @@ -0,0 +1,28 @@ +#ifndef QTSCRIPTSHELL_QUILOADER_H +#define QTSCRIPTSHELL_QUILOADER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QUiLoader : public QUiLoader +{ +public: + QtScriptShell_QUiLoader(QObject* parent = 0); + ~QtScriptShell_QUiLoader(); + + void childEvent(QChildEvent* event); + QAction* createAction(QObject* parent = 0, const QString& name = QString()); + QActionGroup* createActionGroup(QObject* parent = 0, const QString& name = QString()); + QLayout* createLayout(const QString& className, QObject* parent = 0, const QString& name = QString()); + QWidget* createWidget(const QString& className, QWidget* parent = 0, const QString& name = QString()); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QUILOADER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/com_trolltech_qt_widgets.pri b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/com_trolltech_qt_widgets.pri new file mode 100644 index 00000000..2c7eb02a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/com_trolltech_qt_widgets.pri @@ -0,0 +1,551 @@ +HEADERS += \ + $$PWD/qtscriptshell_QAbstractButton.h \ + $$PWD/qtscriptshell_QAbstractGraphicsShapeItem.h \ + $$PWD/qtscriptshell_QAbstractItemDelegate.h \ + $$PWD/qtscriptshell_QAbstractItemView.h \ + $$PWD/qtscriptshell_QAbstractScrollArea.h \ + $$PWD/qtscriptshell_QAbstractSlider.h \ + $$PWD/qtscriptshell_QAbstractSpinBox.h \ + $$PWD/qtscriptshell_QAction.h \ + $$PWD/qtscriptshell_QActionGroup.h \ + $$PWD/qtscriptshell_QApplication.h \ + $$PWD/qtscriptshell_QBoxLayout.h \ + $$PWD/qtscriptshell_QButtonGroup.h \ + $$PWD/qtscriptshell_QCalendarWidget.h \ + $$PWD/qtscriptshell_QCheckBox.h \ + $$PWD/qtscriptshell_QColorDialog.h \ + $$PWD/qtscriptshell_QColumnView.h \ + $$PWD/qtscriptshell_QComboBox.h \ + $$PWD/qtscriptshell_QCommandLinkButton.h \ + $$PWD/qtscriptshell_QCommonStyle.h \ + $$PWD/qtscriptshell_QCompleter.h \ + $$PWD/qtscriptshell_QDataWidgetMapper.h \ + $$PWD/qtscriptshell_QDateEdit.h \ + $$PWD/qtscriptshell_QDateTimeEdit.h \ + $$PWD/qtscriptshell_QDesktopWidget.h \ + $$PWD/qtscriptshell_QDial.h \ + $$PWD/qtscriptshell_QDialog.h \ + $$PWD/qtscriptshell_QDialogButtonBox.h \ + $$PWD/qtscriptshell_QDockWidget.h \ + $$PWD/qtscriptshell_QDoubleSpinBox.h \ + $$PWD/qtscriptshell_QErrorMessage.h \ + $$PWD/qtscriptshell_QFileDialog.h \ + $$PWD/qtscriptshell_QFileIconProvider.h \ + $$PWD/qtscriptshell_QFocusFrame.h \ + $$PWD/qtscriptshell_QFontComboBox.h \ + $$PWD/qtscriptshell_QFontDialog.h \ + $$PWD/qtscriptshell_QFormLayout.h \ + $$PWD/qtscriptshell_QFrame.h \ + $$PWD/qtscriptshell_QGesture.h \ + $$PWD/qtscriptshell_QGraphicsAnchorLayout.h \ + $$PWD/qtscriptshell_QGraphicsBlurEffect.h \ + $$PWD/qtscriptshell_QGraphicsColorizeEffect.h \ + $$PWD/qtscriptshell_QGraphicsDropShadowEffect.h \ + $$PWD/qtscriptshell_QGraphicsEffect.h \ + $$PWD/qtscriptshell_QGraphicsEllipseItem.h \ + $$PWD/qtscriptshell_QGraphicsGridLayout.h \ + $$PWD/qtscriptshell_QGraphicsItem.h \ + $$PWD/qtscriptshell_QGraphicsItemAnimation.h \ + $$PWD/qtscriptshell_QGraphicsItemGroup.h \ + $$PWD/qtscriptshell_QGraphicsLayout.h \ + $$PWD/qtscriptshell_QGraphicsLayoutItem.h \ + $$PWD/qtscriptshell_QGraphicsLineItem.h \ + $$PWD/qtscriptshell_QGraphicsLinearLayout.h \ + $$PWD/qtscriptshell_QGraphicsObject.h \ + $$PWD/qtscriptshell_QGraphicsOpacityEffect.h \ + $$PWD/qtscriptshell_QGraphicsPathItem.h \ + $$PWD/qtscriptshell_QGraphicsPixmapItem.h \ + $$PWD/qtscriptshell_QGraphicsPolygonItem.h \ + $$PWD/qtscriptshell_QGraphicsProxyWidget.h \ + $$PWD/qtscriptshell_QGraphicsRectItem.h \ + $$PWD/qtscriptshell_QGraphicsRotation.h \ + $$PWD/qtscriptshell_QGraphicsScale.h \ + $$PWD/qtscriptshell_QGraphicsScene.h \ + $$PWD/qtscriptshell_QGraphicsSimpleTextItem.h \ + $$PWD/qtscriptshell_QGraphicsTextItem.h \ + $$PWD/qtscriptshell_QGraphicsTransform.h \ + $$PWD/qtscriptshell_QGraphicsView.h \ + $$PWD/qtscriptshell_QGraphicsWidget.h \ + $$PWD/qtscriptshell_QGridLayout.h \ + $$PWD/qtscriptshell_QGroupBox.h \ + $$PWD/qtscriptshell_QHBoxLayout.h \ + $$PWD/qtscriptshell_QHeaderView.h \ + $$PWD/qtscriptshell_QInputDialog.h \ + $$PWD/qtscriptshell_QItemDelegate.h \ + $$PWD/qtscriptshell_QItemEditorCreatorBase.h \ + $$PWD/qtscriptshell_QItemEditorFactory.h \ + $$PWD/qtscriptshell_QItemSelectionModel.h \ + $$PWD/qtscriptshell_QKeyEventTransition.h \ + $$PWD/qtscriptshell_QLCDNumber.h \ + $$PWD/qtscriptshell_QLabel.h \ + $$PWD/qtscriptshell_QLayout.h \ + $$PWD/qtscriptshell_QLayoutItem.h \ + $$PWD/qtscriptshell_QLineEdit.h \ + $$PWD/qtscriptshell_QListView.h \ + $$PWD/qtscriptshell_QListWidget.h \ + $$PWD/qtscriptshell_QListWidgetItem.h \ + $$PWD/qtscriptshell_QMainWindow.h \ + $$PWD/qtscriptshell_QMdiArea.h \ + $$PWD/qtscriptshell_QMdiSubWindow.h \ + $$PWD/qtscriptshell_QMenu.h \ + $$PWD/qtscriptshell_QMenuBar.h \ + $$PWD/qtscriptshell_QMessageBox.h \ + $$PWD/qtscriptshell_QMouseEventTransition.h \ + $$PWD/qtscriptshell_QPaintDevice.h \ + $$PWD/qtscriptshell_QPanGesture.h \ + $$PWD/qtscriptshell_QPictureFormatPlugin.h \ + $$PWD/qtscriptshell_QPlainTextDocumentLayout.h \ + $$PWD/qtscriptshell_QPlainTextEdit.h \ + $$PWD/qtscriptshell_QProgressBar.h \ + $$PWD/qtscriptshell_QProgressDialog.h \ + $$PWD/qtscriptshell_QPushButton.h \ + $$PWD/qtscriptshell_QRadioButton.h \ + $$PWD/qtscriptshell_QRubberBand.h \ + $$PWD/qtscriptshell_QScrollArea.h \ + $$PWD/qtscriptshell_QScrollBar.h \ + $$PWD/qtscriptshell_QShortcut.h \ + $$PWD/qtscriptshell_QSizeGrip.h \ + $$PWD/qtscriptshell_QSlider.h \ + $$PWD/qtscriptshell_QSpacerItem.h \ + $$PWD/qtscriptshell_QSpinBox.h \ + $$PWD/qtscriptshell_QSplashScreen.h \ + $$PWD/qtscriptshell_QSplitter.h \ + $$PWD/qtscriptshell_QSplitterHandle.h \ + $$PWD/qtscriptshell_QStackedLayout.h \ + $$PWD/qtscriptshell_QStackedWidget.h \ + $$PWD/qtscriptshell_QStandardItem.h \ + $$PWD/qtscriptshell_QStandardItemModel.h \ + $$PWD/qtscriptshell_QStatusBar.h \ + $$PWD/qtscriptshell_QStringListModel.h \ + $$PWD/qtscriptshell_QStyle.h \ + $$PWD/qtscriptshell_QStyleFactory.h \ + $$PWD/qtscriptshell_QStyleHintReturn.h \ + $$PWD/qtscriptshell_QStyleHintReturnMask.h \ + $$PWD/qtscriptshell_QStyleHintReturnVariant.h \ + $$PWD/qtscriptshell_QStyleOption.h \ + $$PWD/qtscriptshell_QStyleOptionButton.h \ + $$PWD/qtscriptshell_QStyleOptionComboBox.h \ + $$PWD/qtscriptshell_QStyleOptionComplex.h \ + $$PWD/qtscriptshell_QStyleOptionDockWidget.h \ + $$PWD/qtscriptshell_QStyleOptionFocusRect.h \ + $$PWD/qtscriptshell_QStyleOptionFrame.h \ + $$PWD/qtscriptshell_QStyleOptionGraphicsItem.h \ + $$PWD/qtscriptshell_QStyleOptionGroupBox.h \ + $$PWD/qtscriptshell_QStyleOptionHeader.h \ + $$PWD/qtscriptshell_QStyleOptionMenuItem.h \ + $$PWD/qtscriptshell_QStyleOptionProgressBar.h \ + $$PWD/qtscriptshell_QStyleOptionRubberBand.h \ + $$PWD/qtscriptshell_QStyleOptionSizeGrip.h \ + $$PWD/qtscriptshell_QStyleOptionSlider.h \ + $$PWD/qtscriptshell_QStyleOptionSpinBox.h \ + $$PWD/qtscriptshell_QStyleOptionTab.h \ + $$PWD/qtscriptshell_QStyleOptionTabBarBase.h \ + $$PWD/qtscriptshell_QStyleOptionTabWidgetFrame.h \ + $$PWD/qtscriptshell_QStyleOptionTitleBar.h \ + $$PWD/qtscriptshell_QStyleOptionToolBar.h \ + $$PWD/qtscriptshell_QStyleOptionToolBox.h \ + $$PWD/qtscriptshell_QStyleOptionToolButton.h \ + $$PWD/qtscriptshell_QStyleOptionViewItem.h \ + $$PWD/qtscriptshell_QStylePlugin.h \ + $$PWD/qtscriptshell_QStyledItemDelegate.h \ + $$PWD/qtscriptshell_QSwipeGesture.h \ + $$PWD/qtscriptshell_QSystemTrayIcon.h \ + $$PWD/qtscriptshell_QTabBar.h \ + $$PWD/qtscriptshell_QTabWidget.h \ + $$PWD/qtscriptshell_QTableView.h \ + $$PWD/qtscriptshell_QTableWidget.h \ + $$PWD/qtscriptshell_QTableWidgetItem.h \ + $$PWD/qtscriptshell_QTextBrowser.h \ + $$PWD/qtscriptshell_QTextEdit.h \ + $$PWD/qtscriptshell_QTextEdit_ExtraSelection.h \ + $$PWD/qtscriptshell_QTimeEdit.h \ + $$PWD/qtscriptshell_QToolBar.h \ + $$PWD/qtscriptshell_QToolBox.h \ + $$PWD/qtscriptshell_QToolButton.h \ + $$PWD/qtscriptshell_QTreeView.h \ + $$PWD/qtscriptshell_QTreeWidget.h \ + $$PWD/qtscriptshell_QTreeWidgetItem.h \ + $$PWD/qtscriptshell_QUndoCommand.h \ + $$PWD/qtscriptshell_QUndoGroup.h \ + $$PWD/qtscriptshell_QUndoStack.h \ + $$PWD/qtscriptshell_QUndoView.h \ + $$PWD/qtscriptshell_QVBoxLayout.h \ + $$PWD/qtscriptshell_QWidget.h \ + $$PWD/qtscriptshell_QWidgetAction.h \ + $$PWD/qtscriptshell_QWidgetItem.h \ + $$PWD/qtscriptshell_QWizard.h \ + $$PWD/qtscriptshell_QWizardPage.h \ + +SOURCES += \ + $$PWD/qtscript_QAbstractButton.cpp \ + $$PWD/qtscript_QAbstractGraphicsShapeItem.cpp \ + $$PWD/qtscript_QAbstractItemDelegate.cpp \ + $$PWD/qtscript_QAbstractItemView.cpp \ + $$PWD/qtscript_QAbstractScrollArea.cpp \ + $$PWD/qtscript_QAbstractSlider.cpp \ + $$PWD/qtscript_QAbstractSpinBox.cpp \ + $$PWD/qtscript_QAction.cpp \ + $$PWD/qtscript_QActionGroup.cpp \ + $$PWD/qtscript_QApplication.cpp \ + $$PWD/qtscript_QBoxLayout.cpp \ + $$PWD/qtscript_QButtonGroup.cpp \ + $$PWD/qtscript_QCalendarWidget.cpp \ + $$PWD/qtscript_QCheckBox.cpp \ + $$PWD/qtscript_QColorDialog.cpp \ + $$PWD/qtscript_QColumnView.cpp \ + $$PWD/qtscript_QComboBox.cpp \ + $$PWD/qtscript_QCommandLinkButton.cpp \ + $$PWD/qtscript_QCommonStyle.cpp \ + $$PWD/qtscript_QCompleter.cpp \ + $$PWD/qtscript_QDataWidgetMapper.cpp \ + $$PWD/qtscript_QDateEdit.cpp \ + $$PWD/qtscript_QDateTimeEdit.cpp \ + $$PWD/qtscript_QDesktopWidget.cpp \ + $$PWD/qtscript_QDial.cpp \ + $$PWD/qtscript_QDialog.cpp \ + $$PWD/qtscript_QDialogButtonBox.cpp \ + $$PWD/qtscript_QDockWidget.cpp \ + $$PWD/qtscript_QDoubleSpinBox.cpp \ + $$PWD/qtscript_QErrorMessage.cpp \ + $$PWD/qtscript_QFileDialog.cpp \ + $$PWD/qtscript_QFileIconProvider.cpp \ + $$PWD/qtscript_QFocusFrame.cpp \ + $$PWD/qtscript_QFontComboBox.cpp \ + $$PWD/qtscript_QFontDialog.cpp \ + $$PWD/qtscript_QFormLayout.cpp \ + $$PWD/qtscript_QFrame.cpp \ + $$PWD/qtscript_QGesture.cpp \ + $$PWD/qtscript_QGraphicsAnchor.cpp \ + $$PWD/qtscript_QGraphicsAnchorLayout.cpp \ + $$PWD/qtscript_QGraphicsBlurEffect.cpp \ + $$PWD/qtscript_QGraphicsColorizeEffect.cpp \ + $$PWD/qtscript_QGraphicsDropShadowEffect.cpp \ + $$PWD/qtscript_QGraphicsEffect.cpp \ + $$PWD/qtscript_QGraphicsEllipseItem.cpp \ + $$PWD/qtscript_QGraphicsGridLayout.cpp \ + $$PWD/qtscript_QGraphicsItem.cpp \ + $$PWD/qtscript_QGraphicsItemAnimation.cpp \ + $$PWD/qtscript_QGraphicsItemGroup.cpp \ + $$PWD/qtscript_QGraphicsLayout.cpp \ + $$PWD/qtscript_QGraphicsLayoutItem.cpp \ + $$PWD/qtscript_QGraphicsLineItem.cpp \ + $$PWD/qtscript_QGraphicsLinearLayout.cpp \ + $$PWD/qtscript_QGraphicsObject.cpp \ + $$PWD/qtscript_QGraphicsOpacityEffect.cpp \ + $$PWD/qtscript_QGraphicsPathItem.cpp \ + $$PWD/qtscript_QGraphicsPixmapItem.cpp \ + $$PWD/qtscript_QGraphicsPolygonItem.cpp \ + $$PWD/qtscript_QGraphicsProxyWidget.cpp \ + $$PWD/qtscript_QGraphicsRectItem.cpp \ + $$PWD/qtscript_QGraphicsRotation.cpp \ + $$PWD/qtscript_QGraphicsScale.cpp \ + $$PWD/qtscript_QGraphicsScene.cpp \ + $$PWD/qtscript_QGraphicsSceneContextMenuEvent.cpp \ + $$PWD/qtscript_QGraphicsSceneDragDropEvent.cpp \ + $$PWD/qtscript_QGraphicsSceneEvent.cpp \ + $$PWD/qtscript_QGraphicsSceneHelpEvent.cpp \ + $$PWD/qtscript_QGraphicsSceneHoverEvent.cpp \ + $$PWD/qtscript_QGraphicsSceneMouseEvent.cpp \ + $$PWD/qtscript_QGraphicsSceneMoveEvent.cpp \ + $$PWD/qtscript_QGraphicsSceneResizeEvent.cpp \ + $$PWD/qtscript_QGraphicsSceneWheelEvent.cpp \ + $$PWD/qtscript_QGraphicsSimpleTextItem.cpp \ + $$PWD/qtscript_QGraphicsTextItem.cpp \ + $$PWD/qtscript_QGraphicsTransform.cpp \ + $$PWD/qtscript_QGraphicsView.cpp \ + $$PWD/qtscript_QGraphicsWidget.cpp \ + $$PWD/qtscript_QGridLayout.cpp \ + $$PWD/qtscript_QGroupBox.cpp \ + $$PWD/qtscript_QHBoxLayout.cpp \ + $$PWD/qtscript_QHeaderView.cpp \ + $$PWD/qtscript_QInputDialog.cpp \ + $$PWD/qtscript_QItemDelegate.cpp \ + $$PWD/qtscript_QItemEditorCreatorBase.cpp \ + $$PWD/qtscript_QItemEditorFactory.cpp \ + $$PWD/qtscript_QItemSelection.cpp \ + $$PWD/qtscript_QItemSelectionModel.cpp \ + $$PWD/qtscript_QItemSelectionRange.cpp \ + $$PWD/qtscript_QKeyEventTransition.cpp \ + $$PWD/qtscript_QLCDNumber.cpp \ + $$PWD/qtscript_QLabel.cpp \ + $$PWD/qtscript_QLayout.cpp \ + $$PWD/qtscript_QLayoutItem.cpp \ + $$PWD/qtscript_QLineEdit.cpp \ + $$PWD/qtscript_QListView.cpp \ + $$PWD/qtscript_QListWidget.cpp \ + $$PWD/qtscript_QListWidgetItem.cpp \ + $$PWD/qtscript_QMainWindow.cpp \ + $$PWD/qtscript_QMdiArea.cpp \ + $$PWD/qtscript_QMdiSubWindow.cpp \ + $$PWD/qtscript_QMenu.cpp \ + $$PWD/qtscript_QMenuBar.cpp \ + $$PWD/qtscript_QMessageBox.cpp \ + $$PWD/qtscript_QMouseEventTransition.cpp \ + $$PWD/qtscript_QPaintDevice.cpp \ + $$PWD/qtscript_QPanGesture.cpp \ + $$PWD/qtscript_QPictureFormatPlugin.cpp \ + $$PWD/qtscript_QPlainTextDocumentLayout.cpp \ + $$PWD/qtscript_QPlainTextEdit.cpp \ + $$PWD/qtscript_QProgressBar.cpp \ + $$PWD/qtscript_QProgressDialog.cpp \ + $$PWD/qtscript_QPushButton.cpp \ + $$PWD/qtscript_QRadioButton.cpp \ + $$PWD/qtscript_QRubberBand.cpp \ + $$PWD/qtscript_QScrollArea.cpp \ + $$PWD/qtscript_QScrollBar.cpp \ + $$PWD/qtscript_QSessionManager.cpp \ + $$PWD/qtscript_QShortcut.cpp \ + $$PWD/qtscript_QSizeGrip.cpp \ + $$PWD/qtscript_QSizePolicy.cpp \ + $$PWD/qtscript_QSlider.cpp \ + $$PWD/qtscript_QSpacerItem.cpp \ + $$PWD/qtscript_QSpinBox.cpp \ + $$PWD/qtscript_QSplashScreen.cpp \ + $$PWD/qtscript_QSplitter.cpp \ + $$PWD/qtscript_QSplitterHandle.cpp \ + $$PWD/qtscript_QStackedLayout.cpp \ + $$PWD/qtscript_QStackedWidget.cpp \ + $$PWD/qtscript_QStandardItem.cpp \ + $$PWD/qtscript_QStandardItemModel.cpp \ + $$PWD/qtscript_QStatusBar.cpp \ + $$PWD/qtscript_QStringListModel.cpp \ + $$PWD/qtscript_QStyle.cpp \ + $$PWD/qtscript_QStyleFactory.cpp \ + $$PWD/qtscript_QStyleHintReturn.cpp \ + $$PWD/qtscript_QStyleHintReturnMask.cpp \ + $$PWD/qtscript_QStyleHintReturnVariant.cpp \ + $$PWD/qtscript_QStyleOption.cpp \ + $$PWD/qtscript_QStyleOptionButton.cpp \ + $$PWD/qtscript_QStyleOptionComboBox.cpp \ + $$PWD/qtscript_QStyleOptionComplex.cpp \ + $$PWD/qtscript_QStyleOptionDockWidget.cpp \ + $$PWD/qtscript_QStyleOptionFocusRect.cpp \ + $$PWD/qtscript_QStyleOptionFrame.cpp \ + $$PWD/qtscript_QStyleOptionGraphicsItem.cpp \ + $$PWD/qtscript_QStyleOptionGroupBox.cpp \ + $$PWD/qtscript_QStyleOptionHeader.cpp \ + $$PWD/qtscript_QStyleOptionMenuItem.cpp \ + $$PWD/qtscript_QStyleOptionProgressBar.cpp \ + $$PWD/qtscript_QStyleOptionRubberBand.cpp \ + $$PWD/qtscript_QStyleOptionSizeGrip.cpp \ + $$PWD/qtscript_QStyleOptionSlider.cpp \ + $$PWD/qtscript_QStyleOptionSpinBox.cpp \ + $$PWD/qtscript_QStyleOptionTab.cpp \ + $$PWD/qtscript_QStyleOptionTabBarBase.cpp \ + $$PWD/qtscript_QStyleOptionTabWidgetFrame.cpp \ + $$PWD/qtscript_QStyleOptionTitleBar.cpp \ + $$PWD/qtscript_QStyleOptionToolBar.cpp \ + $$PWD/qtscript_QStyleOptionToolBox.cpp \ + $$PWD/qtscript_QStyleOptionToolButton.cpp \ + $$PWD/qtscript_QStyleOptionViewItem.cpp \ + $$PWD/qtscript_QStylePainter.cpp \ + $$PWD/qtscript_QStylePlugin.cpp \ + $$PWD/qtscript_QStyledItemDelegate.cpp \ + $$PWD/qtscript_QSwipeGesture.cpp \ + $$PWD/qtscript_QSystemTrayIcon.cpp \ + $$PWD/qtscript_QTabBar.cpp \ + $$PWD/qtscript_QTabWidget.cpp \ + $$PWD/qtscript_QTableView.cpp \ + $$PWD/qtscript_QTableWidget.cpp \ + $$PWD/qtscript_QTableWidgetItem.cpp \ + $$PWD/qtscript_QTableWidgetSelectionRange.cpp \ + $$PWD/qtscript_QTextBrowser.cpp \ + $$PWD/qtscript_QTextEdit.cpp \ + $$PWD/qtscript_QTextEdit_ExtraSelection.cpp \ + $$PWD/qtscript_QTimeEdit.cpp \ + $$PWD/qtscript_QToolBar.cpp \ + $$PWD/qtscript_QToolBox.cpp \ + $$PWD/qtscript_QToolButton.cpp \ + $$PWD/qtscript_QToolTip.cpp \ + $$PWD/qtscript_QTouchEvent.cpp \ + $$PWD/qtscript_QTreeView.cpp \ + $$PWD/qtscript_QTreeWidget.cpp \ + $$PWD/qtscript_QTreeWidgetItem.cpp \ + $$PWD/qtscript_QUndoCommand.cpp \ + $$PWD/qtscript_QUndoGroup.cpp \ + $$PWD/qtscript_QUndoStack.cpp \ + $$PWD/qtscript_QUndoView.cpp \ + $$PWD/qtscript_QVBoxLayout.cpp \ + $$PWD/qtscript_QWhatsThis.cpp \ + $$PWD/qtscript_QWidget.cpp \ + $$PWD/qtscript_QWidgetAction.cpp \ + $$PWD/qtscript_QWidgetItem.cpp \ + $$PWD/qtscript_QWizard.cpp \ + $$PWD/qtscript_QWizardPage.cpp \ + $$PWD/qtscriptshell_QAbstractButton.cpp \ + $$PWD/qtscriptshell_QAbstractGraphicsShapeItem.cpp \ + $$PWD/qtscriptshell_QAbstractItemDelegate.cpp \ + $$PWD/qtscriptshell_QAbstractItemView.cpp \ + $$PWD/qtscriptshell_QAbstractScrollArea.cpp \ + $$PWD/qtscriptshell_QAbstractSlider.cpp \ + $$PWD/qtscriptshell_QAbstractSpinBox.cpp \ + $$PWD/qtscriptshell_QAction.cpp \ + $$PWD/qtscriptshell_QActionGroup.cpp \ + $$PWD/qtscriptshell_QApplication.cpp \ + $$PWD/qtscriptshell_QBoxLayout.cpp \ + $$PWD/qtscriptshell_QButtonGroup.cpp \ + $$PWD/qtscriptshell_QCalendarWidget.cpp \ + $$PWD/qtscriptshell_QCheckBox.cpp \ + $$PWD/qtscriptshell_QColorDialog.cpp \ + $$PWD/qtscriptshell_QColumnView.cpp \ + $$PWD/qtscriptshell_QComboBox.cpp \ + $$PWD/qtscriptshell_QCommandLinkButton.cpp \ + $$PWD/qtscriptshell_QCommonStyle.cpp \ + $$PWD/qtscriptshell_QCompleter.cpp \ + $$PWD/qtscriptshell_QDataWidgetMapper.cpp \ + $$PWD/qtscriptshell_QDateEdit.cpp \ + $$PWD/qtscriptshell_QDateTimeEdit.cpp \ + $$PWD/qtscriptshell_QDesktopWidget.cpp \ + $$PWD/qtscriptshell_QDial.cpp \ + $$PWD/qtscriptshell_QDialog.cpp \ + $$PWD/qtscriptshell_QDialogButtonBox.cpp \ + $$PWD/qtscriptshell_QDockWidget.cpp \ + $$PWD/qtscriptshell_QDoubleSpinBox.cpp \ + $$PWD/qtscriptshell_QErrorMessage.cpp \ + $$PWD/qtscriptshell_QFileDialog.cpp \ + $$PWD/qtscriptshell_QFileIconProvider.cpp \ + $$PWD/qtscriptshell_QFocusFrame.cpp \ + $$PWD/qtscriptshell_QFontComboBox.cpp \ + $$PWD/qtscriptshell_QFontDialog.cpp \ + $$PWD/qtscriptshell_QFormLayout.cpp \ + $$PWD/qtscriptshell_QFrame.cpp \ + $$PWD/qtscriptshell_QGesture.cpp \ + $$PWD/qtscriptshell_QGraphicsAnchorLayout.cpp \ + $$PWD/qtscriptshell_QGraphicsBlurEffect.cpp \ + $$PWD/qtscriptshell_QGraphicsColorizeEffect.cpp \ + $$PWD/qtscriptshell_QGraphicsDropShadowEffect.cpp \ + $$PWD/qtscriptshell_QGraphicsEffect.cpp \ + $$PWD/qtscriptshell_QGraphicsEllipseItem.cpp \ + $$PWD/qtscriptshell_QGraphicsGridLayout.cpp \ + $$PWD/qtscriptshell_QGraphicsItem.cpp \ + $$PWD/qtscriptshell_QGraphicsItemAnimation.cpp \ + $$PWD/qtscriptshell_QGraphicsItemGroup.cpp \ + $$PWD/qtscriptshell_QGraphicsLayout.cpp \ + $$PWD/qtscriptshell_QGraphicsLayoutItem.cpp \ + $$PWD/qtscriptshell_QGraphicsLineItem.cpp \ + $$PWD/qtscriptshell_QGraphicsLinearLayout.cpp \ + $$PWD/qtscriptshell_QGraphicsObject.cpp \ + $$PWD/qtscriptshell_QGraphicsOpacityEffect.cpp \ + $$PWD/qtscriptshell_QGraphicsPathItem.cpp \ + $$PWD/qtscriptshell_QGraphicsPixmapItem.cpp \ + $$PWD/qtscriptshell_QGraphicsPolygonItem.cpp \ + $$PWD/qtscriptshell_QGraphicsProxyWidget.cpp \ + $$PWD/qtscriptshell_QGraphicsRectItem.cpp \ + $$PWD/qtscriptshell_QGraphicsRotation.cpp \ + $$PWD/qtscriptshell_QGraphicsScale.cpp \ + $$PWD/qtscriptshell_QGraphicsScene.cpp \ + $$PWD/qtscriptshell_QGraphicsSimpleTextItem.cpp \ + $$PWD/qtscriptshell_QGraphicsTextItem.cpp \ + $$PWD/qtscriptshell_QGraphicsTransform.cpp \ + $$PWD/qtscriptshell_QGraphicsView.cpp \ + $$PWD/qtscriptshell_QGraphicsWidget.cpp \ + $$PWD/qtscriptshell_QGridLayout.cpp \ + $$PWD/qtscriptshell_QGroupBox.cpp \ + $$PWD/qtscriptshell_QHBoxLayout.cpp \ + $$PWD/qtscriptshell_QHeaderView.cpp \ + $$PWD/qtscriptshell_QInputDialog.cpp \ + $$PWD/qtscriptshell_QItemDelegate.cpp \ + $$PWD/qtscriptshell_QItemEditorCreatorBase.cpp \ + $$PWD/qtscriptshell_QItemEditorFactory.cpp \ + $$PWD/qtscriptshell_QItemSelectionModel.cpp \ + $$PWD/qtscriptshell_QKeyEventTransition.cpp \ + $$PWD/qtscriptshell_QLCDNumber.cpp \ + $$PWD/qtscriptshell_QLabel.cpp \ + $$PWD/qtscriptshell_QLayout.cpp \ + $$PWD/qtscriptshell_QLayoutItem.cpp \ + $$PWD/qtscriptshell_QLineEdit.cpp \ + $$PWD/qtscriptshell_QListView.cpp \ + $$PWD/qtscriptshell_QListWidget.cpp \ + $$PWD/qtscriptshell_QListWidgetItem.cpp \ + $$PWD/qtscriptshell_QMainWindow.cpp \ + $$PWD/qtscriptshell_QMdiArea.cpp \ + $$PWD/qtscriptshell_QMdiSubWindow.cpp \ + $$PWD/qtscriptshell_QMenu.cpp \ + $$PWD/qtscriptshell_QMenuBar.cpp \ + $$PWD/qtscriptshell_QMessageBox.cpp \ + $$PWD/qtscriptshell_QMouseEventTransition.cpp \ + $$PWD/qtscriptshell_QPaintDevice.cpp \ + $$PWD/qtscriptshell_QPanGesture.cpp \ + $$PWD/qtscriptshell_QPictureFormatPlugin.cpp \ + $$PWD/qtscriptshell_QPlainTextDocumentLayout.cpp \ + $$PWD/qtscriptshell_QPlainTextEdit.cpp \ + $$PWD/qtscriptshell_QProgressBar.cpp \ + $$PWD/qtscriptshell_QProgressDialog.cpp \ + $$PWD/qtscriptshell_QPushButton.cpp \ + $$PWD/qtscriptshell_QRadioButton.cpp \ + $$PWD/qtscriptshell_QRubberBand.cpp \ + $$PWD/qtscriptshell_QScrollArea.cpp \ + $$PWD/qtscriptshell_QScrollBar.cpp \ + $$PWD/qtscriptshell_QShortcut.cpp \ + $$PWD/qtscriptshell_QSizeGrip.cpp \ + $$PWD/qtscriptshell_QSlider.cpp \ + $$PWD/qtscriptshell_QSpacerItem.cpp \ + $$PWD/qtscriptshell_QSpinBox.cpp \ + $$PWD/qtscriptshell_QSplashScreen.cpp \ + $$PWD/qtscriptshell_QSplitter.cpp \ + $$PWD/qtscriptshell_QSplitterHandle.cpp \ + $$PWD/qtscriptshell_QStackedLayout.cpp \ + $$PWD/qtscriptshell_QStackedWidget.cpp \ + $$PWD/qtscriptshell_QStandardItem.cpp \ + $$PWD/qtscriptshell_QStandardItemModel.cpp \ + $$PWD/qtscriptshell_QStatusBar.cpp \ + $$PWD/qtscriptshell_QStringListModel.cpp \ + $$PWD/qtscriptshell_QStyle.cpp \ + $$PWD/qtscriptshell_QStyleFactory.cpp \ + $$PWD/qtscriptshell_QStyleHintReturn.cpp \ + $$PWD/qtscriptshell_QStyleHintReturnMask.cpp \ + $$PWD/qtscriptshell_QStyleHintReturnVariant.cpp \ + $$PWD/qtscriptshell_QStyleOption.cpp \ + $$PWD/qtscriptshell_QStyleOptionButton.cpp \ + $$PWD/qtscriptshell_QStyleOptionComboBox.cpp \ + $$PWD/qtscriptshell_QStyleOptionComplex.cpp \ + $$PWD/qtscriptshell_QStyleOptionDockWidget.cpp \ + $$PWD/qtscriptshell_QStyleOptionFocusRect.cpp \ + $$PWD/qtscriptshell_QStyleOptionFrame.cpp \ + $$PWD/qtscriptshell_QStyleOptionGraphicsItem.cpp \ + $$PWD/qtscriptshell_QStyleOptionGroupBox.cpp \ + $$PWD/qtscriptshell_QStyleOptionHeader.cpp \ + $$PWD/qtscriptshell_QStyleOptionMenuItem.cpp \ + $$PWD/qtscriptshell_QStyleOptionProgressBar.cpp \ + $$PWD/qtscriptshell_QStyleOptionRubberBand.cpp \ + $$PWD/qtscriptshell_QStyleOptionSizeGrip.cpp \ + $$PWD/qtscriptshell_QStyleOptionSlider.cpp \ + $$PWD/qtscriptshell_QStyleOptionSpinBox.cpp \ + $$PWD/qtscriptshell_QStyleOptionTab.cpp \ + $$PWD/qtscriptshell_QStyleOptionTabBarBase.cpp \ + $$PWD/qtscriptshell_QStyleOptionTabWidgetFrame.cpp \ + $$PWD/qtscriptshell_QStyleOptionTitleBar.cpp \ + $$PWD/qtscriptshell_QStyleOptionToolBar.cpp \ + $$PWD/qtscriptshell_QStyleOptionToolBox.cpp \ + $$PWD/qtscriptshell_QStyleOptionToolButton.cpp \ + $$PWD/qtscriptshell_QStyleOptionViewItem.cpp \ + $$PWD/qtscriptshell_QStylePlugin.cpp \ + $$PWD/qtscriptshell_QStyledItemDelegate.cpp \ + $$PWD/qtscriptshell_QSwipeGesture.cpp \ + $$PWD/qtscriptshell_QSystemTrayIcon.cpp \ + $$PWD/qtscriptshell_QTabBar.cpp \ + $$PWD/qtscriptshell_QTabWidget.cpp \ + $$PWD/qtscriptshell_QTableView.cpp \ + $$PWD/qtscriptshell_QTableWidget.cpp \ + $$PWD/qtscriptshell_QTableWidgetItem.cpp \ + $$PWD/qtscriptshell_QTextBrowser.cpp \ + $$PWD/qtscriptshell_QTextEdit.cpp \ + $$PWD/qtscriptshell_QTextEdit_ExtraSelection.cpp \ + $$PWD/qtscriptshell_QTimeEdit.cpp \ + $$PWD/qtscriptshell_QToolBar.cpp \ + $$PWD/qtscriptshell_QToolBox.cpp \ + $$PWD/qtscriptshell_QToolButton.cpp \ + $$PWD/qtscriptshell_QTreeView.cpp \ + $$PWD/qtscriptshell_QTreeWidget.cpp \ + $$PWD/qtscriptshell_QTreeWidgetItem.cpp \ + $$PWD/qtscriptshell_QUndoCommand.cpp \ + $$PWD/qtscriptshell_QUndoGroup.cpp \ + $$PWD/qtscriptshell_QUndoStack.cpp \ + $$PWD/qtscriptshell_QUndoView.cpp \ + $$PWD/qtscriptshell_QVBoxLayout.cpp \ + $$PWD/qtscriptshell_QWidget.cpp \ + $$PWD/qtscriptshell_QWidgetAction.cpp \ + $$PWD/qtscriptshell_QWidgetItem.cpp \ + $$PWD/qtscriptshell_QWizard.cpp \ + $$PWD/qtscriptshell_QWizardPage.cpp \ + $$PWD/com_trolltech_qt_widgets_init.cpp diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/com_trolltech_qt_widgets_init.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/com_trolltech_qt_widgets_init.cpp new file mode 100644 index 00000000..da058f6f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/com_trolltech_qt_widgets_init.cpp @@ -0,0 +1,605 @@ +#include +#include + +QScriptValue qtscript_create_QWhatsThis_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTableWidgetSelectionRange_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFileIconProvider_class(QScriptEngine *engine); +QScriptValue qtscript_create_QUndoCommand_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTreeWidgetItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsLayoutItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QItemEditorCreatorBase_class(QScriptEngine *engine); +QScriptValue qtscript_create_QToolTip_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOption_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPlainTextDocumentLayout_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPaintDevice_class(QScriptEngine *engine); +QScriptValue qtscript_create_QLayoutItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextEdit_ExtraSelection_class(QScriptEngine *engine); +QScriptValue qtscript_create_QItemSelection_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTableWidgetItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleFactory_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStandardItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QListWidgetItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QItemSelectionRange_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleHintReturn_class(QScriptEngine *engine); +QScriptValue qtscript_create_QItemEditorFactory_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSizePolicy_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionGraphicsItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionTabBarBase_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionTabWidgetFrame_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionDockWidget_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionToolBar_class(QScriptEngine *engine); +QScriptValue qtscript_create_QUndoStack_class(QScriptEngine *engine); +QScriptValue qtscript_create_QUndoGroup_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAbstractItemDelegate_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleHintReturnVariant_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleHintReturnMask_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionFrame_class(QScriptEngine *engine); +QScriptValue qtscript_create_QLayout_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsPixmapItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionViewItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsScene_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsItemGroup_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionHeader_class(QScriptEngine *engine); +QScriptValue qtscript_create_QShortcut_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPictureFormatPlugin_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDataWidgetMapper_class(QScriptEngine *engine); +QScriptValue qtscript_create_QCompleter_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAction_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsTransform_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionProgressBar_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAbstractGraphicsShapeItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionComplex_class(QScriptEngine *engine); +QScriptValue qtscript_create_QActionGroup_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionButton_class(QScriptEngine *engine); +QScriptValue qtscript_create_QItemSelectionModel_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyle_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionFocusRect_class(QScriptEngine *engine); +QScriptValue qtscript_create_QWidgetItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSystemTrayIcon_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionMenuItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsLayout_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsAnchor_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsItemAnimation_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionToolBox_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsSceneEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStylePlugin_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionRubberBand_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStylePainter_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionTab_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsLineItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QButtonGroup_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsObject_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSessionManager_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSpacerItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGesture_class(QScriptEngine *engine); +QScriptValue qtscript_create_QWidget_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsEffect_class(QScriptEngine *engine); +QScriptValue qtscript_create_QMenu_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsRectItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QToolBar_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSwipeGesture_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionToolButton_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsPolygonItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QProgressBar_class(QScriptEngine *engine); +QScriptValue qtscript_create_QRubberBand_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSplitterHandle_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTouchEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionComboBox_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsDropShadowEffect_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionSpinBox_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDockWidget_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsSceneMouseEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDialogButtonBox_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionSizeGrip_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsPathItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsSceneMoveEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsScale_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGridLayout_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsSceneContextMenuEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsGridLayout_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsRotation_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFormLayout_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsSimpleTextItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QItemDelegate_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsLinearLayout_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsSceneDragDropEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPanGesture_class(QScriptEngine *engine); +QScriptValue qtscript_create_QWidgetAction_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDialog_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsEllipseItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsSceneHoverEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyledItemDelegate_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStatusBar_class(QScriptEngine *engine); +QScriptValue qtscript_create_QBoxLayout_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsColorizeEffect_class(QScriptEngine *engine); +QScriptValue qtscript_create_QMainWindow_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGroupBox_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsOpacityEffect_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionGroupBox_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsBlurEffect_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStandardItemModel_class(QScriptEngine *engine); +QScriptValue qtscript_create_QMenuBar_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsSceneWheelEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSizeGrip_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDesktopWidget_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsAnchorLayout_class(QScriptEngine *engine); +QScriptValue qtscript_create_QMdiSubWindow_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionSlider_class(QScriptEngine *engine); +QScriptValue qtscript_create_QCalendarWidget_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAbstractSpinBox_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAbstractButton_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsWidget_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFrame_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTabWidget_class(QScriptEngine *engine); +QScriptValue qtscript_create_QComboBox_class(QScriptEngine *engine); +QScriptValue qtscript_create_QWizardPage_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsTextItem_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStackedLayout_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSplashScreen_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTabBar_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsSceneHelpEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QCommonStyle_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAbstractSlider_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFocusFrame_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStyleOptionTitleBar_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsSceneResizeEvent_class(QScriptEngine *engine); +QScriptValue qtscript_create_QLineEdit_class(QScriptEngine *engine); +QScriptValue qtscript_create_QInputDialog_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDateTimeEdit_class(QScriptEngine *engine); +QScriptValue qtscript_create_QLCDNumber_class(QScriptEngine *engine); +QScriptValue qtscript_create_QMessageBox_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAbstractScrollArea_class(QScriptEngine *engine); +QScriptValue qtscript_create_QCheckBox_class(QScriptEngine *engine); +QScriptValue qtscript_create_QMouseEventTransition_class(QScriptEngine *engine); +QScriptValue qtscript_create_QScrollBar_class(QScriptEngine *engine); +QScriptValue qtscript_create_QProgressDialog_class(QScriptEngine *engine); +QScriptValue qtscript_create_QWizard_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSlider_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFontDialog_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFileDialog_class(QScriptEngine *engine); +QScriptValue qtscript_create_QToolButton_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStackedWidget_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSpinBox_class(QScriptEngine *engine); +QScriptValue qtscript_create_QSplitter_class(QScriptEngine *engine); +QScriptValue qtscript_create_QApplication_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPushButton_class(QScriptEngine *engine); +QScriptValue qtscript_create_QVBoxLayout_class(QScriptEngine *engine); +QScriptValue qtscript_create_QKeyEventTransition_class(QScriptEngine *engine); +QScriptValue qtscript_create_QColorDialog_class(QScriptEngine *engine); +QScriptValue qtscript_create_QErrorMessage_class(QScriptEngine *engine); +QScriptValue qtscript_create_QRadioButton_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDoubleSpinBox_class(QScriptEngine *engine); +QScriptValue qtscript_create_QStringListModel_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsProxyWidget_class(QScriptEngine *engine); +QScriptValue qtscript_create_QHBoxLayout_class(QScriptEngine *engine); +QScriptValue qtscript_create_QToolBox_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDial_class(QScriptEngine *engine); +QScriptValue qtscript_create_QFontComboBox_class(QScriptEngine *engine); +QScriptValue qtscript_create_QLabel_class(QScriptEngine *engine); +QScriptValue qtscript_create_QGraphicsView_class(QScriptEngine *engine); +QScriptValue qtscript_create_QPlainTextEdit_class(QScriptEngine *engine); +QScriptValue qtscript_create_QCommandLinkButton_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTimeEdit_class(QScriptEngine *engine); +QScriptValue qtscript_create_QScrollArea_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextEdit_class(QScriptEngine *engine); +QScriptValue qtscript_create_QMdiArea_class(QScriptEngine *engine); +QScriptValue qtscript_create_QAbstractItemView_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDateEdit_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTableView_class(QScriptEngine *engine); +QScriptValue qtscript_create_QHeaderView_class(QScriptEngine *engine); +QScriptValue qtscript_create_QListView_class(QScriptEngine *engine); +QScriptValue qtscript_create_QColumnView_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTextBrowser_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTreeView_class(QScriptEngine *engine); +QScriptValue qtscript_create_QUndoView_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTableWidget_class(QScriptEngine *engine); +QScriptValue qtscript_create_QListWidget_class(QScriptEngine *engine); +QScriptValue qtscript_create_QTreeWidget_class(QScriptEngine *engine); + +static const char * const qtscript_com_trolltech_qt_widgets_class_names[] = { + "QWhatsThis" + , "QTableWidgetSelectionRange" + , "QFileIconProvider" + , "QUndoCommand" + , "QTreeWidgetItem" + , "QGraphicsLayoutItem" + , "QItemEditorCreatorBase" + , "QToolTip" + , "QStyleOption" + , "QPlainTextDocumentLayout" + , "QPaintDevice" + , "QLayoutItem" + , "QTextEdit_ExtraSelection" + , "QItemSelection" + , "QTableWidgetItem" + , "QStyleFactory" + , "QStandardItem" + , "QListWidgetItem" + , "QGraphicsItem" + , "QItemSelectionRange" + , "QStyleHintReturn" + , "QItemEditorFactory" + , "QSizePolicy" + , "QStyleOptionGraphicsItem" + , "QStyleOptionTabBarBase" + , "QStyleOptionTabWidgetFrame" + , "QStyleOptionDockWidget" + , "QStyleOptionToolBar" + , "QUndoStack" + , "QUndoGroup" + , "QAbstractItemDelegate" + , "QStyleHintReturnVariant" + , "QStyleHintReturnMask" + , "QStyleOptionFrame" + , "QLayout" + , "QGraphicsPixmapItem" + , "QStyleOptionViewItem" + , "QGraphicsScene" + , "QGraphicsItemGroup" + , "QStyleOptionHeader" + , "QShortcut" + , "QPictureFormatPlugin" + , "QDataWidgetMapper" + , "QCompleter" + , "QAction" + , "QGraphicsTransform" + , "QStyleOptionProgressBar" + , "QAbstractGraphicsShapeItem" + , "QStyleOptionComplex" + , "QActionGroup" + , "QStyleOptionButton" + , "QItemSelectionModel" + , "QStyle" + , "QStyleOptionFocusRect" + , "QWidgetItem" + , "QSystemTrayIcon" + , "QStyleOptionMenuItem" + , "QGraphicsLayout" + , "QGraphicsAnchor" + , "QGraphicsItemAnimation" + , "QStyleOptionToolBox" + , "QGraphicsSceneEvent" + , "QStylePlugin" + , "QStyleOptionRubberBand" + , "QStylePainter" + , "QStyleOptionTab" + , "QGraphicsLineItem" + , "QButtonGroup" + , "QGraphicsObject" + , "QSessionManager" + , "QSpacerItem" + , "QGesture" + , "QWidget" + , "QGraphicsEffect" + , "QMenu" + , "QGraphicsRectItem" + , "QToolBar" + , "QSwipeGesture" + , "QStyleOptionToolButton" + , "QGraphicsPolygonItem" + , "QProgressBar" + , "QRubberBand" + , "QSplitterHandle" + , "QTouchEvent" + , "QStyleOptionComboBox" + , "QGraphicsDropShadowEffect" + , "QStyleOptionSpinBox" + , "QDockWidget" + , "QGraphicsSceneMouseEvent" + , "QDialogButtonBox" + , "QStyleOptionSizeGrip" + , "QGraphicsPathItem" + , "QGraphicsSceneMoveEvent" + , "QGraphicsScale" + , "QGridLayout" + , "QGraphicsSceneContextMenuEvent" + , "QGraphicsGridLayout" + , "QGraphicsRotation" + , "QFormLayout" + , "QGraphicsSimpleTextItem" + , "QItemDelegate" + , "QGraphicsLinearLayout" + , "QGraphicsSceneDragDropEvent" + , "QPanGesture" + , "QWidgetAction" + , "QDialog" + , "QGraphicsEllipseItem" + , "QGraphicsSceneHoverEvent" + , "QStyledItemDelegate" + , "QStatusBar" + , "QBoxLayout" + , "QGraphicsColorizeEffect" + , "QMainWindow" + , "QGroupBox" + , "QGraphicsOpacityEffect" + , "QStyleOptionGroupBox" + , "QGraphicsBlurEffect" + , "QStandardItemModel" + , "QMenuBar" + , "QGraphicsSceneWheelEvent" + , "QSizeGrip" + , "QDesktopWidget" + , "QGraphicsAnchorLayout" + , "QMdiSubWindow" + , "QStyleOptionSlider" + , "QCalendarWidget" + , "QAbstractSpinBox" + , "QAbstractButton" + , "QGraphicsWidget" + , "QFrame" + , "QTabWidget" + , "QComboBox" + , "QWizardPage" + , "QGraphicsTextItem" + , "QStackedLayout" + , "QSplashScreen" + , "QTabBar" + , "QGraphicsSceneHelpEvent" + , "QCommonStyle" + , "QAbstractSlider" + , "QFocusFrame" + , "QStyleOptionTitleBar" + , "QGraphicsSceneResizeEvent" + , "QLineEdit" + , "QInputDialog" + , "QDateTimeEdit" + , "QLCDNumber" + , "QMessageBox" + , "QAbstractScrollArea" + , "QCheckBox" + , "QMouseEventTransition" + , "QScrollBar" + , "QProgressDialog" + , "QWizard" + , "QSlider" + , "QFontDialog" + , "QFileDialog" + , "QToolButton" + , "QStackedWidget" + , "QSpinBox" + , "QSplitter" + , "QApplication" + , "QPushButton" + , "QVBoxLayout" + , "QKeyEventTransition" + , "QColorDialog" + , "QErrorMessage" + , "QRadioButton" + , "QDoubleSpinBox" + , "QStringListModel" + , "QGraphicsProxyWidget" + , "QHBoxLayout" + , "QToolBox" + , "QDial" + , "QFontComboBox" + , "QLabel" + , "QGraphicsView" + , "QPlainTextEdit" + , "QCommandLinkButton" + , "QTimeEdit" + , "QScrollArea" + , "QTextEdit" + , "QMdiArea" + , "QAbstractItemView" + , "QDateEdit" + , "QTableView" + , "QHeaderView" + , "QListView" + , "QColumnView" + , "QTextBrowser" + , "QTreeView" + , "QUndoView" + , "QTableWidget" + , "QListWidget" + , "QTreeWidget" +}; + +typedef QScriptValue (*QtBindingCreator)(QScriptEngine *engine); +static const QtBindingCreator qtscript_com_trolltech_qt_widgets_class_functions[] = { + qtscript_create_QWhatsThis_class + , qtscript_create_QTableWidgetSelectionRange_class + , qtscript_create_QFileIconProvider_class + , qtscript_create_QUndoCommand_class + , qtscript_create_QTreeWidgetItem_class + , qtscript_create_QGraphicsLayoutItem_class + , qtscript_create_QItemEditorCreatorBase_class + , qtscript_create_QToolTip_class + , qtscript_create_QStyleOption_class + , qtscript_create_QPlainTextDocumentLayout_class + , qtscript_create_QPaintDevice_class + , qtscript_create_QLayoutItem_class + , qtscript_create_QTextEdit_ExtraSelection_class + , qtscript_create_QItemSelection_class + , qtscript_create_QTableWidgetItem_class + , qtscript_create_QStyleFactory_class + , qtscript_create_QStandardItem_class + , qtscript_create_QListWidgetItem_class + , qtscript_create_QGraphicsItem_class + , qtscript_create_QItemSelectionRange_class + , qtscript_create_QStyleHintReturn_class + , qtscript_create_QItemEditorFactory_class + , qtscript_create_QSizePolicy_class + , qtscript_create_QStyleOptionGraphicsItem_class + , qtscript_create_QStyleOptionTabBarBase_class + , qtscript_create_QStyleOptionTabWidgetFrame_class + , qtscript_create_QStyleOptionDockWidget_class + , qtscript_create_QStyleOptionToolBar_class + , qtscript_create_QUndoStack_class + , qtscript_create_QUndoGroup_class + , qtscript_create_QAbstractItemDelegate_class + , qtscript_create_QStyleHintReturnVariant_class + , qtscript_create_QStyleHintReturnMask_class + , qtscript_create_QStyleOptionFrame_class + , qtscript_create_QLayout_class + , qtscript_create_QGraphicsPixmapItem_class + , qtscript_create_QStyleOptionViewItem_class + , qtscript_create_QGraphicsScene_class + , qtscript_create_QGraphicsItemGroup_class + , qtscript_create_QStyleOptionHeader_class + , qtscript_create_QShortcut_class + , qtscript_create_QPictureFormatPlugin_class + , qtscript_create_QDataWidgetMapper_class + , qtscript_create_QCompleter_class + , qtscript_create_QAction_class + , qtscript_create_QGraphicsTransform_class + , qtscript_create_QStyleOptionProgressBar_class + , qtscript_create_QAbstractGraphicsShapeItem_class + , qtscript_create_QStyleOptionComplex_class + , qtscript_create_QActionGroup_class + , qtscript_create_QStyleOptionButton_class + , qtscript_create_QItemSelectionModel_class + , qtscript_create_QStyle_class + , qtscript_create_QStyleOptionFocusRect_class + , qtscript_create_QWidgetItem_class + , qtscript_create_QSystemTrayIcon_class + , qtscript_create_QStyleOptionMenuItem_class + , qtscript_create_QGraphicsLayout_class + , qtscript_create_QGraphicsAnchor_class + , qtscript_create_QGraphicsItemAnimation_class + , qtscript_create_QStyleOptionToolBox_class + , qtscript_create_QGraphicsSceneEvent_class + , qtscript_create_QStylePlugin_class + , qtscript_create_QStyleOptionRubberBand_class + , qtscript_create_QStylePainter_class + , qtscript_create_QStyleOptionTab_class + , qtscript_create_QGraphicsLineItem_class + , qtscript_create_QButtonGroup_class + , qtscript_create_QGraphicsObject_class + , qtscript_create_QSessionManager_class + , qtscript_create_QSpacerItem_class + , qtscript_create_QGesture_class + , qtscript_create_QWidget_class + , qtscript_create_QGraphicsEffect_class + , qtscript_create_QMenu_class + , qtscript_create_QGraphicsRectItem_class + , qtscript_create_QToolBar_class + , qtscript_create_QSwipeGesture_class + , qtscript_create_QStyleOptionToolButton_class + , qtscript_create_QGraphicsPolygonItem_class + , qtscript_create_QProgressBar_class + , qtscript_create_QRubberBand_class + , qtscript_create_QSplitterHandle_class + , qtscript_create_QTouchEvent_class + , qtscript_create_QStyleOptionComboBox_class + , qtscript_create_QGraphicsDropShadowEffect_class + , qtscript_create_QStyleOptionSpinBox_class + , qtscript_create_QDockWidget_class + , qtscript_create_QGraphicsSceneMouseEvent_class + , qtscript_create_QDialogButtonBox_class + , qtscript_create_QStyleOptionSizeGrip_class + , qtscript_create_QGraphicsPathItem_class + , qtscript_create_QGraphicsSceneMoveEvent_class + , qtscript_create_QGraphicsScale_class + , qtscript_create_QGridLayout_class + , qtscript_create_QGraphicsSceneContextMenuEvent_class + , qtscript_create_QGraphicsGridLayout_class + , qtscript_create_QGraphicsRotation_class + , qtscript_create_QFormLayout_class + , qtscript_create_QGraphicsSimpleTextItem_class + , qtscript_create_QItemDelegate_class + , qtscript_create_QGraphicsLinearLayout_class + , qtscript_create_QGraphicsSceneDragDropEvent_class + , qtscript_create_QPanGesture_class + , qtscript_create_QWidgetAction_class + , qtscript_create_QDialog_class + , qtscript_create_QGraphicsEllipseItem_class + , qtscript_create_QGraphicsSceneHoverEvent_class + , qtscript_create_QStyledItemDelegate_class + , qtscript_create_QStatusBar_class + , qtscript_create_QBoxLayout_class + , qtscript_create_QGraphicsColorizeEffect_class + , qtscript_create_QMainWindow_class + , qtscript_create_QGroupBox_class + , qtscript_create_QGraphicsOpacityEffect_class + , qtscript_create_QStyleOptionGroupBox_class + , qtscript_create_QGraphicsBlurEffect_class + , qtscript_create_QStandardItemModel_class + , qtscript_create_QMenuBar_class + , qtscript_create_QGraphicsSceneWheelEvent_class + , qtscript_create_QSizeGrip_class + , qtscript_create_QDesktopWidget_class + , qtscript_create_QGraphicsAnchorLayout_class + , qtscript_create_QMdiSubWindow_class + , qtscript_create_QStyleOptionSlider_class + , qtscript_create_QCalendarWidget_class + , qtscript_create_QAbstractSpinBox_class + , qtscript_create_QAbstractButton_class + , qtscript_create_QGraphicsWidget_class + , qtscript_create_QFrame_class + , qtscript_create_QTabWidget_class + , qtscript_create_QComboBox_class + , qtscript_create_QWizardPage_class + , qtscript_create_QGraphicsTextItem_class + , qtscript_create_QStackedLayout_class + , qtscript_create_QSplashScreen_class + , qtscript_create_QTabBar_class + , qtscript_create_QGraphicsSceneHelpEvent_class + , qtscript_create_QCommonStyle_class + , qtscript_create_QAbstractSlider_class + , qtscript_create_QFocusFrame_class + , qtscript_create_QStyleOptionTitleBar_class + , qtscript_create_QGraphicsSceneResizeEvent_class + , qtscript_create_QLineEdit_class + , qtscript_create_QInputDialog_class + , qtscript_create_QDateTimeEdit_class + , qtscript_create_QLCDNumber_class + , qtscript_create_QMessageBox_class + , qtscript_create_QAbstractScrollArea_class + , qtscript_create_QCheckBox_class + , qtscript_create_QMouseEventTransition_class + , qtscript_create_QScrollBar_class + , qtscript_create_QProgressDialog_class + , qtscript_create_QWizard_class + , qtscript_create_QSlider_class + , qtscript_create_QFontDialog_class + , qtscript_create_QFileDialog_class + , qtscript_create_QToolButton_class + , qtscript_create_QStackedWidget_class + , qtscript_create_QSpinBox_class + , qtscript_create_QSplitter_class + , qtscript_create_QApplication_class + , qtscript_create_QPushButton_class + , qtscript_create_QVBoxLayout_class + , qtscript_create_QKeyEventTransition_class + , qtscript_create_QColorDialog_class + , qtscript_create_QErrorMessage_class + , qtscript_create_QRadioButton_class + , qtscript_create_QDoubleSpinBox_class + , qtscript_create_QStringListModel_class + , qtscript_create_QGraphicsProxyWidget_class + , qtscript_create_QHBoxLayout_class + , qtscript_create_QToolBox_class + , qtscript_create_QDial_class + , qtscript_create_QFontComboBox_class + , qtscript_create_QLabel_class + , qtscript_create_QGraphicsView_class + , qtscript_create_QPlainTextEdit_class + , qtscript_create_QCommandLinkButton_class + , qtscript_create_QTimeEdit_class + , qtscript_create_QScrollArea_class + , qtscript_create_QTextEdit_class + , qtscript_create_QMdiArea_class + , qtscript_create_QAbstractItemView_class + , qtscript_create_QDateEdit_class + , qtscript_create_QTableView_class + , qtscript_create_QHeaderView_class + , qtscript_create_QListView_class + , qtscript_create_QColumnView_class + , qtscript_create_QTextBrowser_class + , qtscript_create_QTreeView_class + , qtscript_create_QUndoView_class + , qtscript_create_QTableWidget_class + , qtscript_create_QListWidget_class + , qtscript_create_QTreeWidget_class +}; + +void qtscript_initialize_com_trolltech_qt_widgets_bindings(QScriptValue &extensionObject) +{ + QScriptEngine *engine = extensionObject.engine(); + for (int i = 0; i < 195; ++i) { + extensionObject.setProperty(qtscript_com_trolltech_qt_widgets_class_names[i], + qtscript_com_trolltech_qt_widgets_class_functions[i](engine), + QScriptValue::SkipInEnumeration); + } +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractButton.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractButton.cpp new file mode 100644 index 00000000..fe7ee84f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractButton.cpp @@ -0,0 +1,191 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAbstractButton.h" + +static const char * const qtscript_QAbstractButton_function_names[] = { + "QAbstractButton" + // static + // prototype + , "group" + , "toString" +}; + +static const char * const qtscript_QAbstractButton_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "" +"" +}; + +static const int qtscript_QAbstractButton_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 +}; + +static QScriptValue qtscript_QAbstractButton_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAbstractButton::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAbstractButton*) +Q_DECLARE_METATYPE(QtScriptShell_QAbstractButton*) +Q_DECLARE_METATYPE(QButtonGroup*) +Q_DECLARE_METATYPE(QWidget*) + +// +// QAbstractButton +// + +static QScriptValue qtscript_QAbstractButton_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAbstractButton* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractButton.%0(): this object is not a QAbstractButton") + .arg(qtscript_QAbstractButton_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QButtonGroup* _q_result = _q_self->group(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("QAbstractButton"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractButton_throw_ambiguity_error_helper(context, + qtscript_QAbstractButton_function_names[_id+1], + qtscript_QAbstractButton_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAbstractButton_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAbstractButton(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QAbstractButton* _q_cpp_result = new QtScriptShell_QAbstractButton(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QAbstractButton* _q_cpp_result = new QtScriptShell_QAbstractButton(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractButton_throw_ambiguity_error_helper(context, + qtscript_QAbstractButton_function_names[_id], + qtscript_QAbstractButton_function_signatures[_id]); +} + +static QScriptValue qtscript_QAbstractButton_toScriptValue(QScriptEngine *engine, QAbstractButton* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAbstractButton_fromScriptValue(const QScriptValue &value, QAbstractButton* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAbstractButton_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAbstractButton*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAbstractButton_prototype_call, qtscript_QAbstractButton_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAbstractButton_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QAbstractButton_toScriptValue, + qtscript_QAbstractButton_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAbstractButton_static_call, proto, qtscript_QAbstractButton_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractGraphicsShapeItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractGraphicsShapeItem.cpp new file mode 100644 index 00000000..7c6654fd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractGraphicsShapeItem.cpp @@ -0,0 +1,202 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAbstractGraphicsShapeItem.h" + +static const char * const qtscript_QAbstractGraphicsShapeItem_function_names[] = { + "QAbstractGraphicsShapeItem" + // static + // prototype + , "brush" + , "pen" + , "setBrush" + , "setPen" + , "toString" +}; + +static const char * const qtscript_QAbstractGraphicsShapeItem_function_signatures[] = { + "QGraphicsItem parent" + // static + // prototype + , "" + , "" + , "QBrush brush" + , "QPen pen" +"" +}; + +static const int qtscript_QAbstractGraphicsShapeItem_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QAbstractGraphicsShapeItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAbstractGraphicsShapeItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAbstractGraphicsShapeItem*) +Q_DECLARE_METATYPE(QtScriptShell_QAbstractGraphicsShapeItem*) + +// +// QAbstractGraphicsShapeItem +// + +static QScriptValue qtscript_QAbstractGraphicsShapeItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAbstractGraphicsShapeItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractGraphicsShapeItem.%0(): this object is not a QAbstractGraphicsShapeItem") + .arg(qtscript_QAbstractGraphicsShapeItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QBrush _q_result = _q_self->brush(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QPen _q_result = _q_self->pen(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBrush(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QPen _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPen(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: { + QString result = QString::fromLatin1("QAbstractGraphicsShapeItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractGraphicsShapeItem_throw_ambiguity_error_helper(context, + qtscript_QAbstractGraphicsShapeItem_function_names[_id+1], + qtscript_QAbstractGraphicsShapeItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAbstractGraphicsShapeItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAbstractGraphicsShapeItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QAbstractGraphicsShapeItem* _q_cpp_result = new QtScriptShell_QAbstractGraphicsShapeItem(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QAbstractGraphicsShapeItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QAbstractGraphicsShapeItem* _q_cpp_result = new QtScriptShell_QAbstractGraphicsShapeItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QAbstractGraphicsShapeItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractGraphicsShapeItem_throw_ambiguity_error_helper(context, + qtscript_QAbstractGraphicsShapeItem_function_names[_id], + qtscript_QAbstractGraphicsShapeItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QAbstractGraphicsShapeItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAbstractGraphicsShapeItem*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAbstractGraphicsShapeItem_prototype_call, qtscript_QAbstractGraphicsShapeItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAbstractGraphicsShapeItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAbstractGraphicsShapeItem_static_call, proto, qtscript_QAbstractGraphicsShapeItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractItemDelegate.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractItemDelegate.cpp new file mode 100644 index 00000000..a8343c3b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractItemDelegate.cpp @@ -0,0 +1,385 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAbstractItemDelegate.h" + +static const char * const qtscript_QAbstractItemDelegate_function_names[] = { + "QAbstractItemDelegate" + // static + // prototype + , "createEditor" + , "destroyEditor" + , "editorEvent" + , "helpEvent" + , "paint" + , "paintingRoles" + , "setEditorData" + , "setModelData" + , "sizeHint" + , "updateEditorGeometry" + , "toString" +}; + +static const char * const qtscript_QAbstractItemDelegate_function_signatures[] = { + "QObject parent" + // static + // prototype + , "QWidget parent, QStyleOptionViewItem option, QModelIndex index" + , "QWidget editor, QModelIndex index" + , "QEvent event, QAbstractItemModel model, QStyleOptionViewItem option, QModelIndex index" + , "QHelpEvent event, QAbstractItemView view, QStyleOptionViewItem option, QModelIndex index" + , "QPainter painter, QStyleOptionViewItem option, QModelIndex index" + , "" + , "QWidget editor, QModelIndex index" + , "QWidget editor, QAbstractItemModel model, QModelIndex index" + , "QStyleOptionViewItem option, QModelIndex index" + , "QWidget editor, QStyleOptionViewItem option, QModelIndex index" +"" +}; + +static const int qtscript_QAbstractItemDelegate_function_lengths[] = { + 1 + // static + // prototype + , 3 + , 2 + , 4 + , 4 + , 3 + , 0 + , 2 + , 3 + , 2 + , 3 + , 0 +}; + +static QScriptValue qtscript_QAbstractItemDelegate_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAbstractItemDelegate::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAbstractItemDelegate*) +Q_DECLARE_METATYPE(QtScriptShell_QAbstractItemDelegate*) +Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QStyleOptionViewItem) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QAbstractItemModel*) +Q_DECLARE_METATYPE(QHelpEvent*) +Q_DECLARE_METATYPE(QAbstractItemView*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QVector) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QAbstractItemDelegate::EndEditHint +// + +static const QAbstractItemDelegate::EndEditHint qtscript_QAbstractItemDelegate_EndEditHint_values[] = { + QAbstractItemDelegate::NoHint + , QAbstractItemDelegate::EditNextItem + , QAbstractItemDelegate::EditPreviousItem + , QAbstractItemDelegate::SubmitModelCache + , QAbstractItemDelegate::RevertModelCache +}; + +static const char * const qtscript_QAbstractItemDelegate_EndEditHint_keys[] = { + "NoHint" + , "EditNextItem" + , "EditPreviousItem" + , "SubmitModelCache" + , "RevertModelCache" +}; + +static QString qtscript_QAbstractItemDelegate_EndEditHint_toStringHelper(QAbstractItemDelegate::EndEditHint value) +{ + if ((value >= QAbstractItemDelegate::NoHint) && (value <= QAbstractItemDelegate::RevertModelCache)) + return qtscript_QAbstractItemDelegate_EndEditHint_keys[static_cast(value)-static_cast(QAbstractItemDelegate::NoHint)]; + return QString(); +} + +static QScriptValue qtscript_QAbstractItemDelegate_EndEditHint_toScriptValue(QScriptEngine *engine, const QAbstractItemDelegate::EndEditHint &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QAbstractItemDelegate")); + return clazz.property(qtscript_QAbstractItemDelegate_EndEditHint_toStringHelper(value)); +} + +static void qtscript_QAbstractItemDelegate_EndEditHint_fromScriptValue(const QScriptValue &value, QAbstractItemDelegate::EndEditHint &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QAbstractItemDelegate_EndEditHint(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QAbstractItemDelegate::NoHint) && (arg <= QAbstractItemDelegate::RevertModelCache)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("EndEditHint(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QAbstractItemDelegate_EndEditHint_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractItemDelegate::EndEditHint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAbstractItemDelegate_EndEditHint_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractItemDelegate::EndEditHint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QAbstractItemDelegate_EndEditHint_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QAbstractItemDelegate_EndEditHint_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QAbstractItemDelegate_EndEditHint, + qtscript_QAbstractItemDelegate_EndEditHint_valueOf, qtscript_QAbstractItemDelegate_EndEditHint_toString); + qScriptRegisterMetaType(engine, qtscript_QAbstractItemDelegate_EndEditHint_toScriptValue, + qtscript_QAbstractItemDelegate_EndEditHint_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QAbstractItemDelegate_EndEditHint_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QAbstractItemDelegate_EndEditHint_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QAbstractItemDelegate +// + +static QScriptValue qtscript_QAbstractItemDelegate_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 10; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAbstractItemDelegate* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractItemDelegate.%0(): this object is not a QAbstractItemDelegate") + .arg(qtscript_QAbstractItemDelegate_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStyleOptionViewItem _q_arg1 = qscriptvalue_cast(context->argument(1)); + QModelIndex _q_arg2 = qscriptvalue_cast(context->argument(2)); + QWidget* _q_result = _q_self->createEditor(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QModelIndex _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->destroyEditor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 4) { + QEvent* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAbstractItemModel* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QStyleOptionViewItem _q_arg2 = qscriptvalue_cast(context->argument(2)); + QModelIndex _q_arg3 = qscriptvalue_cast(context->argument(3)); + bool _q_result = _q_self->editorEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 4) { + QHelpEvent* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAbstractItemView* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QStyleOptionViewItem _q_arg2 = qscriptvalue_cast(context->argument(2)); + QModelIndex _q_arg3 = qscriptvalue_cast(context->argument(3)); + bool _q_result = _q_self->helpEvent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 3) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStyleOptionViewItem _q_arg1 = qscriptvalue_cast(context->argument(1)); + QModelIndex _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->paint(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QVector _q_result = _q_self->paintingRoles(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QModelIndex _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setEditorData(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAbstractItemModel* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QModelIndex _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setModelData(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 2) { + QStyleOptionViewItem _q_arg0 = qscriptvalue_cast(context->argument(0)); + QModelIndex _q_arg1 = qscriptvalue_cast(context->argument(1)); + QSize _q_result = _q_self->sizeHint(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStyleOptionViewItem _q_arg1 = qscriptvalue_cast(context->argument(1)); + QModelIndex _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->updateEditorGeometry(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 10: { + QString result = QString::fromLatin1("QAbstractItemDelegate"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractItemDelegate_throw_ambiguity_error_helper(context, + qtscript_QAbstractItemDelegate_function_names[_id+1], + qtscript_QAbstractItemDelegate_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAbstractItemDelegate_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAbstractItemDelegate(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QAbstractItemDelegate* _q_cpp_result = new QtScriptShell_QAbstractItemDelegate(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractItemDelegate*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QAbstractItemDelegate* _q_cpp_result = new QtScriptShell_QAbstractItemDelegate(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractItemDelegate*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractItemDelegate_throw_ambiguity_error_helper(context, + qtscript_QAbstractItemDelegate_function_names[_id], + qtscript_QAbstractItemDelegate_function_signatures[_id]); +} + +static QScriptValue qtscript_QAbstractItemDelegate_toScriptValue(QScriptEngine *engine, QAbstractItemDelegate* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAbstractItemDelegate_fromScriptValue(const QScriptValue &value, QAbstractItemDelegate* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAbstractItemDelegate_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAbstractItemDelegate*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 11; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAbstractItemDelegate_prototype_call, qtscript_QAbstractItemDelegate_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAbstractItemDelegate_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QAbstractItemDelegate_toScriptValue, + qtscript_QAbstractItemDelegate_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAbstractItemDelegate_static_call, proto, qtscript_QAbstractItemDelegate_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("EndEditHint"), + qtscript_create_QAbstractItemDelegate_EndEditHint_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractItemView.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractItemView.cpp new file mode 100644 index 00000000..a1cde857 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractItemView.cpp @@ -0,0 +1,688 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAbstractItemView.h" + +static const char * const qtscript_QAbstractItemView_function_names[] = { + "QAbstractItemView" + // static + // prototype + , "closePersistentEditor" + , "currentIndex" + , "indexAt" + , "indexWidget" + , "itemDelegate" + , "itemDelegateForColumn" + , "itemDelegateForRow" + , "keyboardSearch" + , "model" + , "openPersistentEditor" + , "rootIndex" + , "scrollTo" + , "selectionModel" + , "setIndexWidget" + , "setItemDelegate" + , "setItemDelegateForColumn" + , "setItemDelegateForRow" + , "setModel" + , "setSelectionModel" + , "sizeHintForColumn" + , "sizeHintForIndex" + , "sizeHintForRow" + , "visualRect" + , "toString" +}; + +static const char * const qtscript_QAbstractItemView_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "QModelIndex index" + , "" + , "QPoint point" + , "QModelIndex index" + , "\nQModelIndex index" + , "int column" + , "int row" + , "String search" + , "" + , "QModelIndex index" + , "" + , "QModelIndex index, ScrollHint hint" + , "" + , "QModelIndex index, QWidget widget" + , "QAbstractItemDelegate delegate" + , "int column, QAbstractItemDelegate delegate" + , "int row, QAbstractItemDelegate delegate" + , "QAbstractItemModel model" + , "QItemSelectionModel selectionModel" + , "int column" + , "QModelIndex index" + , "int row" + , "QModelIndex index" +"" +}; + +static const int qtscript_QAbstractItemView_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 1 + , 0 + , 2 + , 0 + , 2 + , 1 + , 2 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QAbstractItemView_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAbstractItemView::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAbstractItemView*) +Q_DECLARE_METATYPE(QtScriptShell_QAbstractItemView*) +Q_DECLARE_METATYPE(QAbstractItemView::ScrollMode) +Q_DECLARE_METATYPE(QAbstractItemView::DragDropMode) +Q_DECLARE_METATYPE(QAbstractItemView::SelectionMode) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemDelegate*) +Q_DECLARE_METATYPE(QAbstractItemModel*) +Q_DECLARE_METATYPE(QAbstractItemView::ScrollHint) +Q_DECLARE_METATYPE(QItemSelectionModel*) +Q_DECLARE_METATYPE(QAbstractScrollArea*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QAbstractItemView::ScrollMode +// + +static const QAbstractItemView::ScrollMode qtscript_QAbstractItemView_ScrollMode_values[] = { + QAbstractItemView::ScrollPerItem + , QAbstractItemView::ScrollPerPixel +}; + +static const char * const qtscript_QAbstractItemView_ScrollMode_keys[] = { + "ScrollPerItem" + , "ScrollPerPixel" +}; + +static QString qtscript_QAbstractItemView_ScrollMode_toStringHelper(QAbstractItemView::ScrollMode value) +{ + if ((value >= QAbstractItemView::ScrollPerItem) && (value <= QAbstractItemView::ScrollPerPixel)) + return qtscript_QAbstractItemView_ScrollMode_keys[static_cast(value)-static_cast(QAbstractItemView::ScrollPerItem)]; + return QString(); +} + +static QScriptValue qtscript_QAbstractItemView_ScrollMode_toScriptValue(QScriptEngine *engine, const QAbstractItemView::ScrollMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QAbstractItemView")); + return clazz.property(qtscript_QAbstractItemView_ScrollMode_toStringHelper(value)); +} + +static void qtscript_QAbstractItemView_ScrollMode_fromScriptValue(const QScriptValue &value, QAbstractItemView::ScrollMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QAbstractItemView_ScrollMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QAbstractItemView::ScrollPerItem) && (arg <= QAbstractItemView::ScrollPerPixel)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ScrollMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QAbstractItemView_ScrollMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractItemView::ScrollMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAbstractItemView_ScrollMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractItemView::ScrollMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QAbstractItemView_ScrollMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QAbstractItemView_ScrollMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QAbstractItemView_ScrollMode, + qtscript_QAbstractItemView_ScrollMode_valueOf, qtscript_QAbstractItemView_ScrollMode_toString); + qScriptRegisterMetaType(engine, qtscript_QAbstractItemView_ScrollMode_toScriptValue, + qtscript_QAbstractItemView_ScrollMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QAbstractItemView_ScrollMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QAbstractItemView_ScrollMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QAbstractItemView::DragDropMode +// + +static const QAbstractItemView::DragDropMode qtscript_QAbstractItemView_DragDropMode_values[] = { + QAbstractItemView::NoDragDrop + , QAbstractItemView::DragOnly + , QAbstractItemView::DropOnly + , QAbstractItemView::DragDrop + , QAbstractItemView::InternalMove +}; + +static const char * const qtscript_QAbstractItemView_DragDropMode_keys[] = { + "NoDragDrop" + , "DragOnly" + , "DropOnly" + , "DragDrop" + , "InternalMove" +}; + +static QString qtscript_QAbstractItemView_DragDropMode_toStringHelper(QAbstractItemView::DragDropMode value) +{ + if ((value >= QAbstractItemView::NoDragDrop) && (value <= QAbstractItemView::InternalMove)) + return qtscript_QAbstractItemView_DragDropMode_keys[static_cast(value)-static_cast(QAbstractItemView::NoDragDrop)]; + return QString(); +} + +static QScriptValue qtscript_QAbstractItemView_DragDropMode_toScriptValue(QScriptEngine *engine, const QAbstractItemView::DragDropMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QAbstractItemView")); + return clazz.property(qtscript_QAbstractItemView_DragDropMode_toStringHelper(value)); +} + +static void qtscript_QAbstractItemView_DragDropMode_fromScriptValue(const QScriptValue &value, QAbstractItemView::DragDropMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QAbstractItemView_DragDropMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QAbstractItemView::NoDragDrop) && (arg <= QAbstractItemView::InternalMove)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("DragDropMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QAbstractItemView_DragDropMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractItemView::DragDropMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAbstractItemView_DragDropMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractItemView::DragDropMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QAbstractItemView_DragDropMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QAbstractItemView_DragDropMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QAbstractItemView_DragDropMode, + qtscript_QAbstractItemView_DragDropMode_valueOf, qtscript_QAbstractItemView_DragDropMode_toString); + qScriptRegisterMetaType(engine, qtscript_QAbstractItemView_DragDropMode_toScriptValue, + qtscript_QAbstractItemView_DragDropMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QAbstractItemView_DragDropMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QAbstractItemView_DragDropMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QAbstractItemView::SelectionMode +// + +static const QAbstractItemView::SelectionMode qtscript_QAbstractItemView_SelectionMode_values[] = { + QAbstractItemView::NoSelection + , QAbstractItemView::SingleSelection + , QAbstractItemView::MultiSelection + , QAbstractItemView::ExtendedSelection + , QAbstractItemView::ContiguousSelection +}; + +static const char * const qtscript_QAbstractItemView_SelectionMode_keys[] = { + "NoSelection" + , "SingleSelection" + , "MultiSelection" + , "ExtendedSelection" + , "ContiguousSelection" +}; + +static QString qtscript_QAbstractItemView_SelectionMode_toStringHelper(QAbstractItemView::SelectionMode value) +{ + if ((value >= QAbstractItemView::NoSelection) && (value <= QAbstractItemView::ContiguousSelection)) + return qtscript_QAbstractItemView_SelectionMode_keys[static_cast(value)-static_cast(QAbstractItemView::NoSelection)]; + return QString(); +} + +static QScriptValue qtscript_QAbstractItemView_SelectionMode_toScriptValue(QScriptEngine *engine, const QAbstractItemView::SelectionMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QAbstractItemView")); + return clazz.property(qtscript_QAbstractItemView_SelectionMode_toStringHelper(value)); +} + +static void qtscript_QAbstractItemView_SelectionMode_fromScriptValue(const QScriptValue &value, QAbstractItemView::SelectionMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QAbstractItemView_SelectionMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QAbstractItemView::NoSelection) && (arg <= QAbstractItemView::ContiguousSelection)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SelectionMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QAbstractItemView_SelectionMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractItemView::SelectionMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAbstractItemView_SelectionMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractItemView::SelectionMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QAbstractItemView_SelectionMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QAbstractItemView_SelectionMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QAbstractItemView_SelectionMode, + qtscript_QAbstractItemView_SelectionMode_valueOf, qtscript_QAbstractItemView_SelectionMode_toString); + qScriptRegisterMetaType(engine, qtscript_QAbstractItemView_SelectionMode_toScriptValue, + qtscript_QAbstractItemView_SelectionMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QAbstractItemView_SelectionMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QAbstractItemView_SelectionMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QAbstractItemView +// + +static QScriptValue qtscript_QAbstractItemView_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 23; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAbstractItemView* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractItemView.%0(): this object is not a QAbstractItemView") + .arg(qtscript_QAbstractItemView_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->closePersistentEditor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QModelIndex _q_result = _q_self->currentIndex(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QModelIndex _q_result = _q_self->indexAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_result = _q_self->indexWidget(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QAbstractItemDelegate* _q_result = _q_self->itemDelegate(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAbstractItemDelegate* _q_result = _q_self->itemDelegate(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QAbstractItemDelegate* _q_result = _q_self->itemDelegateForColumn(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QAbstractItemDelegate* _q_result = _q_self->itemDelegateForRow(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->keyboardSearch(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QAbstractItemModel* _q_result = _q_self->model(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->openPersistentEditor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QModelIndex _q_result = _q_self->rootIndex(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->scrollTo(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAbstractItemView::ScrollHint _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->scrollTo(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QItemSelectionModel* _q_result = _q_self->selectionModel(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 2) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setIndexWidget(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QAbstractItemDelegate* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setItemDelegate(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QAbstractItemDelegate* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setItemDelegateForColumn(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QAbstractItemDelegate* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setItemDelegateForRow(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QAbstractItemModel* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setModel(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QItemSelectionModel* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSelectionModel(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->sizeHintForColumn(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSize _q_result = _q_self->sizeHintForIndex(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->sizeHintForRow(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->visualRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: { + QString result = QString::fromLatin1("QAbstractItemView"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractItemView_throw_ambiguity_error_helper(context, + qtscript_QAbstractItemView_function_names[_id+1], + qtscript_QAbstractItemView_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAbstractItemView_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAbstractItemView(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QAbstractItemView* _q_cpp_result = new QtScriptShell_QAbstractItemView(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractItemView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QAbstractItemView* _q_cpp_result = new QtScriptShell_QAbstractItemView(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractItemView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractItemView_throw_ambiguity_error_helper(context, + qtscript_QAbstractItemView_function_names[_id], + qtscript_QAbstractItemView_function_signatures[_id]); +} + +static QScriptValue qtscript_QAbstractItemView_toScriptValue(QScriptEngine *engine, QAbstractItemView* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAbstractItemView_fromScriptValue(const QScriptValue &value, QAbstractItemView* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAbstractItemView_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAbstractItemView*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 24; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAbstractItemView_prototype_call, qtscript_QAbstractItemView_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAbstractItemView_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QAbstractItemView_toScriptValue, + qtscript_QAbstractItemView_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAbstractItemView_static_call, proto, qtscript_QAbstractItemView_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ScrollMode"), + qtscript_create_QAbstractItemView_ScrollMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("DragDropMode"), + qtscript_create_QAbstractItemView_DragDropMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("SelectionMode"), + qtscript_create_QAbstractItemView_SelectionMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractScrollArea.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractScrollArea.cpp new file mode 100644 index 00000000..0647e19d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractScrollArea.cpp @@ -0,0 +1,323 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAbstractScrollArea.h" + +static const char * const qtscript_QAbstractScrollArea_function_names[] = { + "QAbstractScrollArea" + // static + // prototype + , "addScrollBarWidget" + , "cornerWidget" + , "horizontalScrollBar" + , "maximumViewportSize" + , "minimumSizeHint" + , "scrollBarWidgets" + , "setCornerWidget" + , "setHorizontalScrollBar" + , "setVerticalScrollBar" + , "setViewport" + , "setupViewport" + , "verticalScrollBar" + , "viewport" + , "toString" +}; + +static const char * const qtscript_QAbstractScrollArea_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "QWidget widget, Alignment alignment" + , "" + , "" + , "" + , "" + , "Alignment alignment" + , "QWidget widget" + , "QScrollBar scrollbar" + , "QScrollBar scrollbar" + , "QWidget widget" + , "QWidget viewport" + , "" + , "" +"" +}; + +static const int qtscript_QAbstractScrollArea_function_lengths[] = { + 1 + // static + // prototype + , 2 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QAbstractScrollArea_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAbstractScrollArea::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAbstractScrollArea*) +Q_DECLARE_METATYPE(QtScriptShell_QAbstractScrollArea*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QScrollBar*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QFrame*) + +// +// QAbstractScrollArea +// + +static QScriptValue qtscript_QAbstractScrollArea_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 13; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAbstractScrollArea* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractScrollArea.%0(): this object is not a QAbstractScrollArea") + .arg(qtscript_QAbstractScrollArea_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + _q_self->addScrollBarWidget(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->cornerWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QScrollBar* _q_result = _q_self->horizontalScrollBar(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->maximumViewportSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QList _q_result = _q_self->scrollBarWidgets(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCornerWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QScrollBar* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setHorizontalScrollBar(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QScrollBar* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setVerticalScrollBar(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setViewport(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setupViewport(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QScrollBar* _q_result = _q_self->verticalScrollBar(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->viewport(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: { + QString result = QString::fromLatin1("QAbstractScrollArea"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractScrollArea_throw_ambiguity_error_helper(context, + qtscript_QAbstractScrollArea_function_names[_id+1], + qtscript_QAbstractScrollArea_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAbstractScrollArea_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAbstractScrollArea(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QAbstractScrollArea* _q_cpp_result = new QtScriptShell_QAbstractScrollArea(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractScrollArea*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QAbstractScrollArea* _q_cpp_result = new QtScriptShell_QAbstractScrollArea(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractScrollArea*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractScrollArea_throw_ambiguity_error_helper(context, + qtscript_QAbstractScrollArea_function_names[_id], + qtscript_QAbstractScrollArea_function_signatures[_id]); +} + +static QScriptValue qtscript_QAbstractScrollArea_toScriptValue(QScriptEngine *engine, QAbstractScrollArea* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAbstractScrollArea_fromScriptValue(const QScriptValue &value, QAbstractScrollArea* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAbstractScrollArea_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAbstractScrollArea*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 14; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAbstractScrollArea_prototype_call, qtscript_QAbstractScrollArea_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAbstractScrollArea_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QAbstractScrollArea_toScriptValue, + qtscript_QAbstractScrollArea_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAbstractScrollArea_static_call, proto, qtscript_QAbstractScrollArea_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractSlider.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractSlider.cpp new file mode 100644 index 00000000..bc00d6ef --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractSlider.cpp @@ -0,0 +1,286 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAbstractSlider.h" + +static const char * const qtscript_QAbstractSlider_function_names[] = { + "QAbstractSlider" + // static + // prototype + , "triggerAction" + , "toString" +}; + +static const char * const qtscript_QAbstractSlider_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "SliderAction action" +"" +}; + +static const int qtscript_QAbstractSlider_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 +}; + +static QScriptValue qtscript_QAbstractSlider_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAbstractSlider::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAbstractSlider*) +Q_DECLARE_METATYPE(QtScriptShell_QAbstractSlider*) +Q_DECLARE_METATYPE(QAbstractSlider::SliderAction) +Q_DECLARE_METATYPE(QWidget*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QAbstractSlider::SliderAction +// + +static const QAbstractSlider::SliderAction qtscript_QAbstractSlider_SliderAction_values[] = { + QAbstractSlider::SliderNoAction + , QAbstractSlider::SliderSingleStepAdd + , QAbstractSlider::SliderSingleStepSub + , QAbstractSlider::SliderPageStepAdd + , QAbstractSlider::SliderPageStepSub + , QAbstractSlider::SliderToMinimum + , QAbstractSlider::SliderToMaximum + , QAbstractSlider::SliderMove +}; + +static const char * const qtscript_QAbstractSlider_SliderAction_keys[] = { + "SliderNoAction" + , "SliderSingleStepAdd" + , "SliderSingleStepSub" + , "SliderPageStepAdd" + , "SliderPageStepSub" + , "SliderToMinimum" + , "SliderToMaximum" + , "SliderMove" +}; + +static QString qtscript_QAbstractSlider_SliderAction_toStringHelper(QAbstractSlider::SliderAction value) +{ + if ((value >= QAbstractSlider::SliderNoAction) && (value <= QAbstractSlider::SliderMove)) + return qtscript_QAbstractSlider_SliderAction_keys[static_cast(value)-static_cast(QAbstractSlider::SliderNoAction)]; + return QString(); +} + +static QScriptValue qtscript_QAbstractSlider_SliderAction_toScriptValue(QScriptEngine *engine, const QAbstractSlider::SliderAction &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QAbstractSlider")); + return clazz.property(qtscript_QAbstractSlider_SliderAction_toStringHelper(value)); +} + +static void qtscript_QAbstractSlider_SliderAction_fromScriptValue(const QScriptValue &value, QAbstractSlider::SliderAction &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QAbstractSlider_SliderAction(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QAbstractSlider::SliderNoAction) && (arg <= QAbstractSlider::SliderMove)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SliderAction(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QAbstractSlider_SliderAction_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractSlider::SliderAction value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAbstractSlider_SliderAction_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractSlider::SliderAction value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QAbstractSlider_SliderAction_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QAbstractSlider_SliderAction_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QAbstractSlider_SliderAction, + qtscript_QAbstractSlider_SliderAction_valueOf, qtscript_QAbstractSlider_SliderAction_toString); + qScriptRegisterMetaType(engine, qtscript_QAbstractSlider_SliderAction_toScriptValue, + qtscript_QAbstractSlider_SliderAction_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 8; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QAbstractSlider_SliderAction_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QAbstractSlider_SliderAction_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QAbstractSlider +// + +static QScriptValue qtscript_QAbstractSlider_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAbstractSlider* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractSlider.%0(): this object is not a QAbstractSlider") + .arg(qtscript_QAbstractSlider_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QAbstractSlider::SliderAction _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->triggerAction(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: { + QString result = QString::fromLatin1("QAbstractSlider"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractSlider_throw_ambiguity_error_helper(context, + qtscript_QAbstractSlider_function_names[_id+1], + qtscript_QAbstractSlider_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAbstractSlider_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAbstractSlider(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QAbstractSlider* _q_cpp_result = new QtScriptShell_QAbstractSlider(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractSlider*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QAbstractSlider* _q_cpp_result = new QtScriptShell_QAbstractSlider(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractSlider*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractSlider_throw_ambiguity_error_helper(context, + qtscript_QAbstractSlider_function_names[_id], + qtscript_QAbstractSlider_function_signatures[_id]); +} + +static QScriptValue qtscript_QAbstractSlider_toScriptValue(QScriptEngine *engine, QAbstractSlider* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAbstractSlider_fromScriptValue(const QScriptValue &value, QAbstractSlider* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAbstractSlider_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAbstractSlider*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAbstractSlider_prototype_call, qtscript_QAbstractSlider_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAbstractSlider_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QAbstractSlider_toScriptValue, + qtscript_QAbstractSlider_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAbstractSlider_static_call, proto, qtscript_QAbstractSlider_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("SliderAction"), + qtscript_create_QAbstractSlider_SliderAction_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractSpinBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractSpinBox.cpp new file mode 100644 index 00000000..78fa9c35 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAbstractSpinBox.cpp @@ -0,0 +1,570 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAbstractSpinBox.h" + +static const char * const qtscript_QAbstractSpinBox_function_names[] = { + "QAbstractSpinBox" + // static + // prototype + , "fixup" + , "interpretText" + , "minimumSizeHint" + , "sizeHint" + , "stepBy" + , "validate" + , "toString" +}; + +static const char * const qtscript_QAbstractSpinBox_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "String input" + , "" + , "" + , "" + , "int steps" + , "String input, int pos" +"" +}; + +static const int qtscript_QAbstractSpinBox_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 0 + , 0 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QAbstractSpinBox_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAbstractSpinBox::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAbstractSpinBox*) +Q_DECLARE_METATYPE(QtScriptShell_QAbstractSpinBox*) +Q_DECLARE_METATYPE(QAbstractSpinBox::CorrectionMode) +Q_DECLARE_METATYPE(QAbstractSpinBox::ButtonSymbols) +Q_DECLARE_METATYPE(QAbstractSpinBox::StepEnabledFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QValidator::State) +Q_DECLARE_METATYPE(QWidget*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QAbstractSpinBox::CorrectionMode +// + +static const QAbstractSpinBox::CorrectionMode qtscript_QAbstractSpinBox_CorrectionMode_values[] = { + QAbstractSpinBox::CorrectToPreviousValue + , QAbstractSpinBox::CorrectToNearestValue +}; + +static const char * const qtscript_QAbstractSpinBox_CorrectionMode_keys[] = { + "CorrectToPreviousValue" + , "CorrectToNearestValue" +}; + +static QString qtscript_QAbstractSpinBox_CorrectionMode_toStringHelper(QAbstractSpinBox::CorrectionMode value) +{ + if ((value >= QAbstractSpinBox::CorrectToPreviousValue) && (value <= QAbstractSpinBox::CorrectToNearestValue)) + return qtscript_QAbstractSpinBox_CorrectionMode_keys[static_cast(value)-static_cast(QAbstractSpinBox::CorrectToPreviousValue)]; + return QString(); +} + +static QScriptValue qtscript_QAbstractSpinBox_CorrectionMode_toScriptValue(QScriptEngine *engine, const QAbstractSpinBox::CorrectionMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QAbstractSpinBox")); + return clazz.property(qtscript_QAbstractSpinBox_CorrectionMode_toStringHelper(value)); +} + +static void qtscript_QAbstractSpinBox_CorrectionMode_fromScriptValue(const QScriptValue &value, QAbstractSpinBox::CorrectionMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QAbstractSpinBox_CorrectionMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QAbstractSpinBox::CorrectToPreviousValue) && (arg <= QAbstractSpinBox::CorrectToNearestValue)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("CorrectionMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QAbstractSpinBox_CorrectionMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractSpinBox::CorrectionMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAbstractSpinBox_CorrectionMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractSpinBox::CorrectionMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QAbstractSpinBox_CorrectionMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QAbstractSpinBox_CorrectionMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QAbstractSpinBox_CorrectionMode, + qtscript_QAbstractSpinBox_CorrectionMode_valueOf, qtscript_QAbstractSpinBox_CorrectionMode_toString); + qScriptRegisterMetaType(engine, qtscript_QAbstractSpinBox_CorrectionMode_toScriptValue, + qtscript_QAbstractSpinBox_CorrectionMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QAbstractSpinBox_CorrectionMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QAbstractSpinBox_CorrectionMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QAbstractSpinBox::ButtonSymbols +// + +static const QAbstractSpinBox::ButtonSymbols qtscript_QAbstractSpinBox_ButtonSymbols_values[] = { + QAbstractSpinBox::UpDownArrows + , QAbstractSpinBox::PlusMinus + , QAbstractSpinBox::NoButtons +}; + +static const char * const qtscript_QAbstractSpinBox_ButtonSymbols_keys[] = { + "UpDownArrows" + , "PlusMinus" + , "NoButtons" +}; + +static QString qtscript_QAbstractSpinBox_ButtonSymbols_toStringHelper(QAbstractSpinBox::ButtonSymbols value) +{ + if ((value >= QAbstractSpinBox::UpDownArrows) && (value <= QAbstractSpinBox::NoButtons)) + return qtscript_QAbstractSpinBox_ButtonSymbols_keys[static_cast(value)-static_cast(QAbstractSpinBox::UpDownArrows)]; + return QString(); +} + +static QScriptValue qtscript_QAbstractSpinBox_ButtonSymbols_toScriptValue(QScriptEngine *engine, const QAbstractSpinBox::ButtonSymbols &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QAbstractSpinBox")); + return clazz.property(qtscript_QAbstractSpinBox_ButtonSymbols_toStringHelper(value)); +} + +static void qtscript_QAbstractSpinBox_ButtonSymbols_fromScriptValue(const QScriptValue &value, QAbstractSpinBox::ButtonSymbols &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QAbstractSpinBox_ButtonSymbols(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QAbstractSpinBox::UpDownArrows) && (arg <= QAbstractSpinBox::NoButtons)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ButtonSymbols(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QAbstractSpinBox_ButtonSymbols_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractSpinBox::ButtonSymbols value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAbstractSpinBox_ButtonSymbols_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractSpinBox::ButtonSymbols value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QAbstractSpinBox_ButtonSymbols_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QAbstractSpinBox_ButtonSymbols_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QAbstractSpinBox_ButtonSymbols, + qtscript_QAbstractSpinBox_ButtonSymbols_valueOf, qtscript_QAbstractSpinBox_ButtonSymbols_toString); + qScriptRegisterMetaType(engine, qtscript_QAbstractSpinBox_ButtonSymbols_toScriptValue, + qtscript_QAbstractSpinBox_ButtonSymbols_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QAbstractSpinBox_ButtonSymbols_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QAbstractSpinBox_ButtonSymbols_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QAbstractSpinBox::StepEnabledFlag +// + +static const QAbstractSpinBox::StepEnabledFlag qtscript_QAbstractSpinBox_StepEnabledFlag_values[] = { + QAbstractSpinBox::StepNone + , QAbstractSpinBox::StepUpEnabled + , QAbstractSpinBox::StepDownEnabled +}; + +static const char * const qtscript_QAbstractSpinBox_StepEnabledFlag_keys[] = { + "StepNone" + , "StepUpEnabled" + , "StepDownEnabled" +}; + +static QString qtscript_QAbstractSpinBox_StepEnabledFlag_toStringHelper(QAbstractSpinBox::StepEnabledFlag value) +{ + if ((value >= QAbstractSpinBox::StepNone) && (value <= QAbstractSpinBox::StepDownEnabled)) + return qtscript_QAbstractSpinBox_StepEnabledFlag_keys[static_cast(value)-static_cast(QAbstractSpinBox::StepNone)]; + return QString(); +} + +static QScriptValue qtscript_QAbstractSpinBox_StepEnabledFlag_toScriptValue(QScriptEngine *engine, const QAbstractSpinBox::StepEnabledFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QAbstractSpinBox")); + return clazz.property(qtscript_QAbstractSpinBox_StepEnabledFlag_toStringHelper(value)); +} + +static void qtscript_QAbstractSpinBox_StepEnabledFlag_fromScriptValue(const QScriptValue &value, QAbstractSpinBox::StepEnabledFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QAbstractSpinBox_StepEnabledFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QAbstractSpinBox::StepNone) && (arg <= QAbstractSpinBox::StepDownEnabled)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StepEnabledFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QAbstractSpinBox_StepEnabledFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractSpinBox::StepEnabledFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAbstractSpinBox_StepEnabledFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractSpinBox::StepEnabledFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QAbstractSpinBox_StepEnabledFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QAbstractSpinBox_StepEnabledFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QAbstractSpinBox_StepEnabledFlag, + qtscript_QAbstractSpinBox_StepEnabledFlag_valueOf, qtscript_QAbstractSpinBox_StepEnabledFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QAbstractSpinBox_StepEnabledFlag_toScriptValue, + qtscript_QAbstractSpinBox_StepEnabledFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QAbstractSpinBox_StepEnabledFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QAbstractSpinBox_StepEnabledFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QAbstractSpinBox::StepEnabled +// + +static QScriptValue qtscript_QAbstractSpinBox_StepEnabled_toScriptValue(QScriptEngine *engine, const QAbstractSpinBox::StepEnabled &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QAbstractSpinBox_StepEnabled_fromScriptValue(const QScriptValue &value, QAbstractSpinBox::StepEnabled &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QAbstractSpinBox_StepEnabled(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractSpinBox::StepEnabled result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("StepEnabled(): argument %0 is not of type StepEnabledFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QAbstractSpinBox_StepEnabled_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractSpinBox::StepEnabled value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAbstractSpinBox_StepEnabled_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAbstractSpinBox::StepEnabled value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 3; ++i) { + if ((value & qtscript_QAbstractSpinBox_StepEnabledFlag_values[i]) == qtscript_QAbstractSpinBox_StepEnabledFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QAbstractSpinBox_StepEnabledFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QAbstractSpinBox_StepEnabled_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QAbstractSpinBox_StepEnabled_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QAbstractSpinBox_StepEnabled, qtscript_QAbstractSpinBox_StepEnabled_valueOf, + qtscript_QAbstractSpinBox_StepEnabled_toString, qtscript_QAbstractSpinBox_StepEnabled_equals); + qScriptRegisterMetaType(engine, qtscript_QAbstractSpinBox_StepEnabled_toScriptValue, + qtscript_QAbstractSpinBox_StepEnabled_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QAbstractSpinBox +// + +static QScriptValue qtscript_QAbstractSpinBox_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAbstractSpinBox* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAbstractSpinBox.%0(): this object is not a QAbstractSpinBox") + .arg(qtscript_QAbstractSpinBox_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->fixup(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->interpretText(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->stepBy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + QValidator::State _q_result = _q_self->validate(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: { + QString result = QString::fromLatin1("QAbstractSpinBox"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractSpinBox_throw_ambiguity_error_helper(context, + qtscript_QAbstractSpinBox_function_names[_id+1], + qtscript_QAbstractSpinBox_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAbstractSpinBox_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAbstractSpinBox(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QAbstractSpinBox* _q_cpp_result = new QtScriptShell_QAbstractSpinBox(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractSpinBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QAbstractSpinBox* _q_cpp_result = new QtScriptShell_QAbstractSpinBox(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAbstractSpinBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAbstractSpinBox_throw_ambiguity_error_helper(context, + qtscript_QAbstractSpinBox_function_names[_id], + qtscript_QAbstractSpinBox_function_signatures[_id]); +} + +static QScriptValue qtscript_QAbstractSpinBox_toScriptValue(QScriptEngine *engine, QAbstractSpinBox* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAbstractSpinBox_fromScriptValue(const QScriptValue &value, QAbstractSpinBox* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAbstractSpinBox_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAbstractSpinBox*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAbstractSpinBox_prototype_call, qtscript_QAbstractSpinBox_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAbstractSpinBox_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QAbstractSpinBox_toScriptValue, + qtscript_QAbstractSpinBox_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAbstractSpinBox_static_call, proto, qtscript_QAbstractSpinBox_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("CorrectionMode"), + qtscript_create_QAbstractSpinBox_CorrectionMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ButtonSymbols"), + qtscript_create_QAbstractSpinBox_ButtonSymbols_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StepEnabledFlag"), + qtscript_create_QAbstractSpinBox_StepEnabledFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StepEnabled"), + qtscript_create_QAbstractSpinBox_StepEnabled_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAction.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAction.cpp new file mode 100644 index 00000000..d1f4077a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QAction.cpp @@ -0,0 +1,513 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QAction.h" + +static const char * const qtscript_QAction_function_names[] = { + "QAction" + // static + // prototype + , "actionGroup" + , "activate" + , "associatedGraphicsWidgets" + , "associatedWidgets" + , "data" + , "isSeparator" + , "menu" + , "parentWidget" + , "setActionGroup" + , "setData" + , "setMenu" + , "setSeparator" + , "setShortcuts" + , "shortcuts" + , "showStatusText" + , "toString" +}; + +static const char * const qtscript_QAction_function_signatures[] = { + "QObject parent\nQIcon icon, String text, QObject parent\nString text, QObject parent" + // static + // prototype + , "" + , "ActionEvent event" + , "" + , "" + , "" + , "" + , "" + , "" + , "QActionGroup group" + , "Object var" + , "QMenu menu" + , "bool b" + , "StandardKey arg__1\nList shortcuts" + , "" + , "QWidget widget" +"" +}; + +static const int qtscript_QAction_function_lengths[] = { + 3 + // static + // prototype + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QAction_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QAction::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QAction*) +Q_DECLARE_METATYPE(QtScriptShell_QAction*) +Q_DECLARE_METATYPE(QAction::ActionEvent) +Q_DECLARE_METATYPE(QAction::MenuRole) +Q_DECLARE_METATYPE(QActionGroup*) +Q_DECLARE_METATYPE(QGraphicsWidget*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QMenu*) +Q_DECLARE_METATYPE(QKeySequence::StandardKey) +Q_DECLARE_METATYPE(QList) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QAction::ActionEvent +// + +static const QAction::ActionEvent qtscript_QAction_ActionEvent_values[] = { + QAction::Trigger + , QAction::Hover +}; + +static const char * const qtscript_QAction_ActionEvent_keys[] = { + "Trigger" + , "Hover" +}; + +static QString qtscript_QAction_ActionEvent_toStringHelper(QAction::ActionEvent value) +{ + if ((value >= QAction::Trigger) && (value <= QAction::Hover)) + return qtscript_QAction_ActionEvent_keys[static_cast(value)-static_cast(QAction::Trigger)]; + return QString(); +} + +static QScriptValue qtscript_QAction_ActionEvent_toScriptValue(QScriptEngine *engine, const QAction::ActionEvent &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QAction")); + return clazz.property(qtscript_QAction_ActionEvent_toStringHelper(value)); +} + +static void qtscript_QAction_ActionEvent_fromScriptValue(const QScriptValue &value, QAction::ActionEvent &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QAction_ActionEvent(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QAction::Trigger) && (arg <= QAction::Hover)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ActionEvent(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QAction_ActionEvent_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAction::ActionEvent value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAction_ActionEvent_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAction::ActionEvent value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QAction_ActionEvent_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QAction_ActionEvent_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QAction_ActionEvent, + qtscript_QAction_ActionEvent_valueOf, qtscript_QAction_ActionEvent_toString); + qScriptRegisterMetaType(engine, qtscript_QAction_ActionEvent_toScriptValue, + qtscript_QAction_ActionEvent_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QAction_ActionEvent_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QAction_ActionEvent_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QAction::MenuRole +// + +static const QAction::MenuRole qtscript_QAction_MenuRole_values[] = { + QAction::NoRole + , QAction::TextHeuristicRole + , QAction::ApplicationSpecificRole + , QAction::AboutQtRole + , QAction::AboutRole + , QAction::PreferencesRole + , QAction::QuitRole +}; + +static const char * const qtscript_QAction_MenuRole_keys[] = { + "NoRole" + , "TextHeuristicRole" + , "ApplicationSpecificRole" + , "AboutQtRole" + , "AboutRole" + , "PreferencesRole" + , "QuitRole" +}; + +static QString qtscript_QAction_MenuRole_toStringHelper(QAction::MenuRole value) +{ + if ((value >= QAction::NoRole) && (value <= QAction::QuitRole)) + return qtscript_QAction_MenuRole_keys[static_cast(value)-static_cast(QAction::NoRole)]; + return QString(); +} + +static QScriptValue qtscript_QAction_MenuRole_toScriptValue(QScriptEngine *engine, const QAction::MenuRole &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QAction")); + return clazz.property(qtscript_QAction_MenuRole_toStringHelper(value)); +} + +static void qtscript_QAction_MenuRole_fromScriptValue(const QScriptValue &value, QAction::MenuRole &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QAction_MenuRole(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QAction::NoRole) && (arg <= QAction::QuitRole)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("MenuRole(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QAction_MenuRole_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QAction::MenuRole value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QAction_MenuRole_toString(QScriptContext *context, QScriptEngine *engine) +{ + QAction::MenuRole value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QAction_MenuRole_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QAction_MenuRole_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QAction_MenuRole, + qtscript_QAction_MenuRole_valueOf, qtscript_QAction_MenuRole_toString); + qScriptRegisterMetaType(engine, qtscript_QAction_MenuRole_toScriptValue, + qtscript_QAction_MenuRole_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 7; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QAction_MenuRole_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QAction_MenuRole_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QAction +// + +static QScriptValue qtscript_QAction_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 15; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QAction* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QAction.%0(): this object is not a QAction") + .arg(qtscript_QAction_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QActionGroup* _q_result = _q_self->actionGroup(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QAction::ActionEvent _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->activate(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->associatedGraphicsWidgets(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->associatedWidgets(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QVariant _q_result = _q_self->data(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isSeparator(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QMenu* _q_result = _q_self->menu(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->parentWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QActionGroup* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setActionGroup(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QVariant _q_arg0 = context->argument(0).toVariant(); + _q_self->setData(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QMenu* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMenu(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setSeparator(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QKeySequence::StandardKey _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setShortcuts(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isArray()) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setShortcuts(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 13: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->shortcuts(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->showStatusText(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->showStatusText(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: { + QString result; + QDebug d(&result); + d << _q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QAction_throw_ambiguity_error_helper(context, + qtscript_QAction_function_names[_id+1], + qtscript_QAction_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QAction_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QAction(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QAction* _q_cpp_result = new QtScriptShell_QAction(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAction*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QAction* _q_cpp_result = new QtScriptShell_QAction(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAction*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 3) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QObject* _q_arg2 = context->argument(2).toQObject(); + QtScriptShell_QAction* _q_cpp_result = new QtScriptShell_QAction(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QAction*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QAction_throw_ambiguity_error_helper(context, + qtscript_QAction_function_names[_id], + qtscript_QAction_function_signatures[_id]); +} + +static QScriptValue qtscript_QAction_toScriptValue(QScriptEngine *engine, QAction* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QAction_fromScriptValue(const QScriptValue &value, QAction* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QAction_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QAction*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 16; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QAction_prototype_call, qtscript_QAction_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QAction_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QAction_toScriptValue, + qtscript_QAction_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QAction_static_call, proto, qtscript_QAction_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ActionEvent"), + qtscript_create_QAction_ActionEvent_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("MenuRole"), + qtscript_create_QAction_MenuRole_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QActionGroup.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QActionGroup.cpp new file mode 100644 index 00000000..7db6c09e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QActionGroup.cpp @@ -0,0 +1,207 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QActionGroup.h" + +static const char * const qtscript_QActionGroup_function_names[] = { + "QActionGroup" + // static + // prototype + , "actions" + , "addAction" + , "checkedAction" + , "removeAction" + , "toString" +}; + +static const char * const qtscript_QActionGroup_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" + , "QAction a\nQIcon icon, String text\nString text" + , "" + , "QAction a" +"" +}; + +static const int qtscript_QActionGroup_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 2 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QActionGroup_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QActionGroup::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QActionGroup*) +Q_DECLARE_METATYPE(QtScriptShell_QActionGroup*) +Q_DECLARE_METATYPE(QAction*) +Q_DECLARE_METATYPE(QList) + +// +// QActionGroup +// + +static QScriptValue qtscript_QActionGroup_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QActionGroup* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QActionGroup.%0(): this object is not a QActionGroup") + .arg(qtscript_QActionGroup_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->actions(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAction* _q_result = _q_self->addAction(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QAction* _q_result = _q_self->addAction(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QAction* _q_result = _q_self->addAction(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QAction* _q_result = _q_self->checkedAction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeAction(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: { + QString result = QString::fromLatin1("QActionGroup"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QActionGroup_throw_ambiguity_error_helper(context, + qtscript_QActionGroup_function_names[_id+1], + qtscript_QActionGroup_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QActionGroup_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QActionGroup(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QActionGroup* _q_cpp_result = new QtScriptShell_QActionGroup(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QActionGroup*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QActionGroup_throw_ambiguity_error_helper(context, + qtscript_QActionGroup_function_names[_id], + qtscript_QActionGroup_function_signatures[_id]); +} + +static QScriptValue qtscript_QActionGroup_toScriptValue(QScriptEngine *engine, QActionGroup* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QActionGroup_fromScriptValue(const QScriptValue &value, QActionGroup* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QActionGroup_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QActionGroup*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QActionGroup_prototype_call, qtscript_QActionGroup_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QActionGroup_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QActionGroup_toScriptValue, + qtscript_QActionGroup_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QActionGroup_static_call, proto, qtscript_QActionGroup_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QApplication.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QApplication.cpp new file mode 100644 index 00000000..9fe28352 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QApplication.cpp @@ -0,0 +1,527 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QApplication.h" + +static const char * const qtscript_QApplication_function_names[] = { + "QApplication" + // static + , "activeModalWidget" + , "activePopupWidget" + , "activeWindow" + , "alert" + , "allWidgets" + , "beep" + , "colorSpec" + , "desktop" + , "focusWidget" + , "font" + , "isEffectEnabled" + , "palette" + , "setActiveWindow" + , "setColorSpec" + , "setEffectEnabled" + , "setFont" + , "setPalette" + , "setStyle" + , "style" + , "topLevelAt" + , "topLevelWidgets" + , "widgetAt" + // prototype + , "toString" +}; + +static const char * const qtscript_QApplication_function_signatures[] = { + "" + // static + , "" + , "" + , "" + , "QWidget widget, int duration" + , "" + , "" + , "" + , "" + , "" + , "QWidget arg__1" + , "UIEffect arg__1" + , "QWidget arg__1" + , "QWidget act" + , "int arg__1" + , "UIEffect arg__1, bool enable" + , "QFont arg__1, char className" + , "QPalette arg__1, char className" + , "QStyle arg__1\nString arg__1" + , "" + , "QPoint p\nint x, int y" + , "" + , "QPoint p\nint x, int y" + // prototype +"" +}; + +static const int qtscript_QApplication_function_lengths[] = { + 0 + // static + , 0 + , 0 + , 0 + , 2 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 2 + , 2 + , 1 + , 0 + , 2 + , 0 + , 2 + // prototype + , 0 +}; + +static QScriptValue qtscript_QApplication_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QApplication::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QApplication*) +Q_DECLARE_METATYPE(QtScriptShell_QApplication*) +Q_DECLARE_METATYPE(QApplication::ColorSpec) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QDesktopWidget*) +Q_DECLARE_METATYPE(const QWidget*) +Q_DECLARE_METATYPE(Qt::UIEffect) +Q_DECLARE_METATYPE(QStyle*) +Q_DECLARE_METATYPE(QGuiApplication*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QApplication::ColorSpec +// + +static const QApplication::ColorSpec qtscript_QApplication_ColorSpec_values[] = { + QApplication::NormalColor + , QApplication::CustomColor + , QApplication::ManyColor +}; + +static const char * const qtscript_QApplication_ColorSpec_keys[] = { + "NormalColor" + , "CustomColor" + , "ManyColor" +}; + +static QString qtscript_QApplication_ColorSpec_toStringHelper(QApplication::ColorSpec value) +{ + if ((value >= QApplication::NormalColor) && (value <= QApplication::ManyColor)) + return qtscript_QApplication_ColorSpec_keys[static_cast(value)-static_cast(QApplication::NormalColor)]; + return QString(); +} + +static QScriptValue qtscript_QApplication_ColorSpec_toScriptValue(QScriptEngine *engine, const QApplication::ColorSpec &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QApplication")); + return clazz.property(qtscript_QApplication_ColorSpec_toStringHelper(value)); +} + +static void qtscript_QApplication_ColorSpec_fromScriptValue(const QScriptValue &value, QApplication::ColorSpec &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QApplication_ColorSpec(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QApplication::NormalColor) && (arg <= QApplication::ManyColor)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ColorSpec(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QApplication_ColorSpec_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QApplication::ColorSpec value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QApplication_ColorSpec_toString(QScriptContext *context, QScriptEngine *engine) +{ + QApplication::ColorSpec value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QApplication_ColorSpec_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QApplication_ColorSpec_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QApplication_ColorSpec, + qtscript_QApplication_ColorSpec_valueOf, qtscript_QApplication_ColorSpec_toString); + qScriptRegisterMetaType(engine, qtscript_QApplication_ColorSpec_toScriptValue, + qtscript_QApplication_ColorSpec_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QApplication_ColorSpec_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QApplication_ColorSpec_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QApplication +// + +static QScriptValue qtscript_QApplication_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QApplication* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QApplication.%0(): this object is not a QApplication") + .arg(qtscript_QApplication_function_names[_id+23])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QApplication"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QApplication_throw_ambiguity_error_helper(context, + qtscript_QApplication_function_names[_id+23], + qtscript_QApplication_function_signatures[_id+23]); +} + +static QScriptValue qtscript_QApplication_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QApplication cannot be constructed")); + break; + + case 1: + if (context->argumentCount() == 0) { + QWidget* _q_result = QApplication::activeModalWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QWidget* _q_result = QApplication::activePopupWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QWidget* _q_result = QApplication::activeWindow(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QApplication::alert(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QApplication::alert(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QList _q_result = QApplication::allWidgets(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QApplication::beep(); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = QApplication::colorSpec(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QDesktopWidget* _q_result = QApplication::desktop(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QWidget* _q_result = QApplication::focusWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + const QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFont _q_result = QApplication::font(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + Qt::UIEffect _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = QApplication::isEffectEnabled(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + const QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPalette _q_result = QApplication::palette(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QApplication::setActiveWindow(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QApplication::setColorSpec(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + Qt::UIEffect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QApplication::setEffectEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + Qt::UIEffect _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + QApplication::setEffectEnabled(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 2) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + QApplication::setFont(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 2) { + QPalette _q_arg0 = qscriptvalue_cast(context->argument(0)); + + // TEMPLATE - core.convert_string_arg_to_char* - START + QByteArray tmp__q_arg1 = context->argument(1).toString().toLatin1(); + const char * _q_arg1 = tmp__q_arg1.constData(); + // TEMPLATE - core.convert_string_arg_to_char* - END + QApplication::setPalette(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QStyle* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QApplication::setStyle(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QStyle* _q_result = QApplication::setStyle(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 19: + if (context->argumentCount() == 0) { + QStyle* _q_result = QApplication::style(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_result = QApplication::topLevelAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QWidget* _q_result = QApplication::topLevelAt(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + QList _q_result = QApplication::topLevelWidgets(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_result = QApplication::widgetAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QWidget* _q_result = QApplication::widgetAt(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QApplication_throw_ambiguity_error_helper(context, + qtscript_QApplication_function_names[_id], + qtscript_QApplication_function_signatures[_id]); +} + +static QScriptValue qtscript_QApplication_toScriptValue(QScriptEngine *engine, QApplication* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QApplication_fromScriptValue(const QScriptValue &value, QApplication* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QApplication_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QApplication*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QApplication_toScriptValue, + qtscript_QApplication_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QApplication_static_call, proto, qtscript_QApplication_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 22; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QApplication_static_call, + qtscript_QApplication_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QApplication_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("ColorSpec"), + qtscript_create_QApplication_ColorSpec_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QBoxLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QBoxLayout.cpp new file mode 100644 index 00000000..84a108ef --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QBoxLayout.cpp @@ -0,0 +1,518 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QBoxLayout.h" + +static const char * const qtscript_QBoxLayout_function_names[] = { + "QBoxLayout" + // static + // prototype + , "addLayout" + , "addSpacerItem" + , "addSpacing" + , "addStretch" + , "addStrut" + , "addWidget" + , "direction" + , "insertItem" + , "insertLayout" + , "insertSpacerItem" + , "insertSpacing" + , "insertStretch" + , "insertWidget" + , "setDirection" + , "setSpacing" + , "setStretch" + , "setStretchFactor" + , "spacing" + , "stretch" + , "toString" +}; + +static const char * const qtscript_QBoxLayout_function_signatures[] = { + "Direction arg__1, QWidget parent" + // static + // prototype + , "QLayout layout, int stretch" + , "QSpacerItem spacerItem" + , "int size" + , "int stretch" + , "int arg__1" + , "QWidget arg__1, int stretch, Alignment alignment" + , "" + , "int index, QLayoutItem arg__2" + , "int index, QLayout layout, int stretch" + , "int index, QSpacerItem spacerItem" + , "int index, int size" + , "int index, int stretch" + , "int index, QWidget widget, int stretch, Alignment alignment" + , "Direction arg__1" + , "int spacing" + , "int index, int stretch" + , "QLayout l, int stretch\nQWidget w, int stretch" + , "" + , "int index" +"" +}; + +static const int qtscript_QBoxLayout_function_lengths[] = { + 2 + // static + // prototype + , 2 + , 1 + , 1 + , 1 + , 1 + , 3 + , 0 + , 2 + , 3 + , 2 + , 2 + , 2 + , 4 + , 1 + , 1 + , 2 + , 2 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QBoxLayout_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QBoxLayout::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QBoxLayout*) +Q_DECLARE_METATYPE(QtScriptShell_QBoxLayout*) +Q_DECLARE_METATYPE(QBoxLayout::Direction) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QSpacerItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QLayoutItem*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QBoxLayout::Direction +// + +static const QBoxLayout::Direction qtscript_QBoxLayout_Direction_values[] = { + QBoxLayout::LeftToRight + , QBoxLayout::RightToLeft + , QBoxLayout::TopToBottom + , QBoxLayout::BottomToTop +}; + +static const char * const qtscript_QBoxLayout_Direction_keys[] = { + "LeftToRight" + , "RightToLeft" + , "TopToBottom" + , "BottomToTop" +}; + +static QString qtscript_QBoxLayout_Direction_toStringHelper(QBoxLayout::Direction value) +{ + if ((value >= QBoxLayout::LeftToRight) && (value <= QBoxLayout::BottomToTop)) + return qtscript_QBoxLayout_Direction_keys[static_cast(value)-static_cast(QBoxLayout::LeftToRight)]; + return QString(); +} + +static QScriptValue qtscript_QBoxLayout_Direction_toScriptValue(QScriptEngine *engine, const QBoxLayout::Direction &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QBoxLayout")); + return clazz.property(qtscript_QBoxLayout_Direction_toStringHelper(value)); +} + +static void qtscript_QBoxLayout_Direction_fromScriptValue(const QScriptValue &value, QBoxLayout::Direction &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QBoxLayout_Direction(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QBoxLayout::LeftToRight) && (arg <= QBoxLayout::BottomToTop)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Direction(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QBoxLayout_Direction_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QBoxLayout::Direction value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QBoxLayout_Direction_toString(QScriptContext *context, QScriptEngine *engine) +{ + QBoxLayout::Direction value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QBoxLayout_Direction_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QBoxLayout_Direction_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QBoxLayout_Direction, + qtscript_QBoxLayout_Direction_valueOf, qtscript_QBoxLayout_Direction_toString); + qScriptRegisterMetaType(engine, qtscript_QBoxLayout_Direction_toScriptValue, + qtscript_QBoxLayout_Direction_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QBoxLayout_Direction_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QBoxLayout_Direction_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QBoxLayout +// + +static QScriptValue qtscript_QBoxLayout_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 19; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QBoxLayout* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QBoxLayout.%0(): this object is not a QBoxLayout") + .arg(qtscript_QBoxLayout_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QLayout* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addLayout(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QLayout* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->addLayout(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QSpacerItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addSpacerItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->addSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->addStretch(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->addStretch(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->addStrut(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + _q_self->addWidget(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QBoxLayout::Direction _q_result = _q_self->direction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QLayoutItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QLayout* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertLayout(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + QLayout* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->insertLayout(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QSpacerItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertSpacerItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->insertSpacing(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->insertStretch(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->insertStretch(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertWidget(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->insertWidget(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + _q_self->insertWidget(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QBoxLayout::Direction _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDirection(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setStretch(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + QLayout* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + bool _q_result = _q_self->setStretchFactor(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + bool _q_result = _q_self->setStretchFactor(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 17: + if (context->argumentCount() == 0) { + int _q_result = _q_self->spacing(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->stretch(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: { + QString result = QString::fromLatin1("QBoxLayout"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QBoxLayout_throw_ambiguity_error_helper(context, + qtscript_QBoxLayout_function_names[_id+1], + qtscript_QBoxLayout_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QBoxLayout_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QBoxLayout(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QBoxLayout::Direction _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QBoxLayout* _q_cpp_result = new QtScriptShell_QBoxLayout(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QBoxLayout*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QBoxLayout::Direction _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QBoxLayout* _q_cpp_result = new QtScriptShell_QBoxLayout(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QBoxLayout*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QBoxLayout_throw_ambiguity_error_helper(context, + qtscript_QBoxLayout_function_names[_id], + qtscript_QBoxLayout_function_signatures[_id]); +} + +static QScriptValue qtscript_QBoxLayout_toScriptValue(QScriptEngine *engine, QBoxLayout* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QBoxLayout_fromScriptValue(const QScriptValue &value, QBoxLayout* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QBoxLayout_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QBoxLayout*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 20; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QBoxLayout_prototype_call, qtscript_QBoxLayout_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QBoxLayout_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QBoxLayout_toScriptValue, + qtscript_QBoxLayout_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QBoxLayout_static_call, proto, qtscript_QBoxLayout_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Direction"), + qtscript_create_QBoxLayout_Direction_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QButtonGroup.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QButtonGroup.cpp new file mode 100644 index 00000000..7768bf19 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QButtonGroup.cpp @@ -0,0 +1,249 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QButtonGroup.h" + +static const char * const qtscript_QButtonGroup_function_names[] = { + "QButtonGroup" + // static + // prototype + , "addButton" + , "button" + , "buttons" + , "checkedButton" + , "checkedId" + , "id" + , "removeButton" + , "setId" + , "toString" +}; + +static const char * const qtscript_QButtonGroup_function_signatures[] = { + "QObject parent" + // static + // prototype + , "QAbstractButton arg__1, int id" + , "int id" + , "" + , "" + , "" + , "QAbstractButton button" + , "QAbstractButton arg__1" + , "QAbstractButton button, int id" +"" +}; + +static const int qtscript_QButtonGroup_function_lengths[] = { + 1 + // static + // prototype + , 2 + , 1 + , 0 + , 0 + , 0 + , 1 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QButtonGroup_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QButtonGroup::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QButtonGroup*) +Q_DECLARE_METATYPE(QtScriptShell_QButtonGroup*) +Q_DECLARE_METATYPE(QAbstractButton*) +Q_DECLARE_METATYPE(QList) + +// +// QButtonGroup +// + +static QScriptValue qtscript_QButtonGroup_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QButtonGroup* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QButtonGroup.%0(): this object is not a QButtonGroup") + .arg(qtscript_QButtonGroup_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QAbstractButton* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addButton(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QAbstractButton* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->addButton(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QAbstractButton* _q_result = _q_self->button(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->buttons(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QAbstractButton* _q_result = _q_self->checkedButton(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->checkedId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QAbstractButton* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->id(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QAbstractButton* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeButton(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 2) { + QAbstractButton* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setId(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 8: { + QString result = QString::fromLatin1("QButtonGroup"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QButtonGroup_throw_ambiguity_error_helper(context, + qtscript_QButtonGroup_function_names[_id+1], + qtscript_QButtonGroup_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QButtonGroup_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QButtonGroup(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QButtonGroup* _q_cpp_result = new QtScriptShell_QButtonGroup(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QButtonGroup*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QButtonGroup* _q_cpp_result = new QtScriptShell_QButtonGroup(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QButtonGroup*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QButtonGroup_throw_ambiguity_error_helper(context, + qtscript_QButtonGroup_function_names[_id], + qtscript_QButtonGroup_function_signatures[_id]); +} + +static QScriptValue qtscript_QButtonGroup_toScriptValue(QScriptEngine *engine, QButtonGroup* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QButtonGroup_fromScriptValue(const QScriptValue &value, QButtonGroup* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QButtonGroup_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QButtonGroup*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QButtonGroup_prototype_call, qtscript_QButtonGroup_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QButtonGroup_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QButtonGroup_toScriptValue, + qtscript_QButtonGroup_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QButtonGroup_static_call, proto, qtscript_QButtonGroup_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCalendarWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCalendarWidget.cpp new file mode 100644 index 00000000..bfc6a14b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCalendarWidget.cpp @@ -0,0 +1,375 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QCalendarWidget.h" + +static const char * const qtscript_QCalendarWidget_function_names[] = { + "QCalendarWidget" + // static + // prototype + , "dateTextFormat" + , "headerTextFormat" + , "monthShown" + , "setDateTextFormat" + , "setHeaderTextFormat" + , "setWeekdayTextFormat" + , "weekdayTextFormat" + , "yearShown" + , "toString" +}; + +static const char * const qtscript_QCalendarWidget_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "\nQDate date" + , "" + , "" + , "QDate date, QTextCharFormat format" + , "QTextCharFormat format" + , "DayOfWeek dayOfWeek, QTextCharFormat format" + , "DayOfWeek dayOfWeek" + , "" +"" +}; + +static const int qtscript_QCalendarWidget_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 0 + , 2 + , 1 + , 2 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QCalendarWidget_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QCalendarWidget::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QCalendarWidget*) +Q_DECLARE_METATYPE(QtScriptShell_QCalendarWidget*) +Q_DECLARE_METATYPE(QCalendarWidget::HorizontalHeaderFormat) +Q_DECLARE_METATYPE(QTextCharFormat) +template <> \ +struct QMetaTypeId< QMap > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QMap >("QMap")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(Qt::DayOfWeek) +Q_DECLARE_METATYPE(QWidget*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QCalendarWidget::HorizontalHeaderFormat +// + +static const QCalendarWidget::HorizontalHeaderFormat qtscript_QCalendarWidget_HorizontalHeaderFormat_values[] = { + QCalendarWidget::NoHorizontalHeader + , QCalendarWidget::SingleLetterDayNames + , QCalendarWidget::ShortDayNames + , QCalendarWidget::LongDayNames +}; + +static const char * const qtscript_QCalendarWidget_HorizontalHeaderFormat_keys[] = { + "NoHorizontalHeader" + , "SingleLetterDayNames" + , "ShortDayNames" + , "LongDayNames" +}; + +static QString qtscript_QCalendarWidget_HorizontalHeaderFormat_toStringHelper(QCalendarWidget::HorizontalHeaderFormat value) +{ + if ((value >= QCalendarWidget::NoHorizontalHeader) && (value <= QCalendarWidget::LongDayNames)) + return qtscript_QCalendarWidget_HorizontalHeaderFormat_keys[static_cast(value)-static_cast(QCalendarWidget::NoHorizontalHeader)]; + return QString(); +} + +static QScriptValue qtscript_QCalendarWidget_HorizontalHeaderFormat_toScriptValue(QScriptEngine *engine, const QCalendarWidget::HorizontalHeaderFormat &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QCalendarWidget")); + return clazz.property(qtscript_QCalendarWidget_HorizontalHeaderFormat_toStringHelper(value)); +} + +static void qtscript_QCalendarWidget_HorizontalHeaderFormat_fromScriptValue(const QScriptValue &value, QCalendarWidget::HorizontalHeaderFormat &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QCalendarWidget_HorizontalHeaderFormat(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QCalendarWidget::NoHorizontalHeader) && (arg <= QCalendarWidget::LongDayNames)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("HorizontalHeaderFormat(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QCalendarWidget_HorizontalHeaderFormat_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QCalendarWidget::HorizontalHeaderFormat value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QCalendarWidget_HorizontalHeaderFormat_toString(QScriptContext *context, QScriptEngine *engine) +{ + QCalendarWidget::HorizontalHeaderFormat value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QCalendarWidget_HorizontalHeaderFormat_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QCalendarWidget_HorizontalHeaderFormat_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QCalendarWidget_HorizontalHeaderFormat, + qtscript_QCalendarWidget_HorizontalHeaderFormat_valueOf, qtscript_QCalendarWidget_HorizontalHeaderFormat_toString); + qScriptRegisterMetaType(engine, qtscript_QCalendarWidget_HorizontalHeaderFormat_toScriptValue, + qtscript_QCalendarWidget_HorizontalHeaderFormat_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QCalendarWidget_HorizontalHeaderFormat_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QCalendarWidget_HorizontalHeaderFormat_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QCalendarWidget +// + +static QScriptValue qtscript_QCalendarWidget_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QCalendarWidget* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QCalendarWidget.%0(): this object is not a QCalendarWidget") + .arg(qtscript_QCalendarWidget_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QMap _q_result = _q_self->dateTextFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCharFormat _q_result = _q_self->dateTextFormat(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QTextCharFormat _q_result = _q_self->headerTextFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->monthShown(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 2) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCharFormat _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setDateTextFormat(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QTextCharFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setHeaderTextFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 2) { + Qt::DayOfWeek _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCharFormat _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setWeekdayTextFormat(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + Qt::DayOfWeek _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCharFormat _q_result = _q_self->weekdayTextFormat(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->yearShown(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: { + QString result = QString::fromLatin1("QCalendarWidget"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QCalendarWidget_throw_ambiguity_error_helper(context, + qtscript_QCalendarWidget_function_names[_id+1], + qtscript_QCalendarWidget_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QCalendarWidget_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QCalendarWidget(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QCalendarWidget* _q_cpp_result = new QtScriptShell_QCalendarWidget(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCalendarWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QCalendarWidget* _q_cpp_result = new QtScriptShell_QCalendarWidget(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCalendarWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QCalendarWidget_throw_ambiguity_error_helper(context, + qtscript_QCalendarWidget_function_names[_id], + qtscript_QCalendarWidget_function_signatures[_id]); +} + +static QScriptValue qtscript_QCalendarWidget_toScriptValue(QScriptEngine *engine, QCalendarWidget* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QCalendarWidget_fromScriptValue(const QScriptValue &value, QCalendarWidget* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QCalendarWidget_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QCalendarWidget*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QCalendarWidget_prototype_call, qtscript_QCalendarWidget_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QCalendarWidget_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QCalendarWidget_toScriptValue, + qtscript_QCalendarWidget_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QCalendarWidget_static_call, proto, qtscript_QCalendarWidget_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("HorizontalHeaderFormat"), + qtscript_create_QCalendarWidget_HorizontalHeaderFormat_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCheckBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCheckBox.cpp new file mode 100644 index 00000000..c144cd1a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCheckBox.cpp @@ -0,0 +1,239 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QCheckBox.h" + +static const char * const qtscript_QCheckBox_function_names[] = { + "QCheckBox" + // static + // prototype + , "checkState" + , "minimumSizeHint" + , "setCheckState" + , "sizeHint" + , "toString" +}; + +static const char * const qtscript_QCheckBox_function_signatures[] = { + "QWidget parent\nString text, QWidget parent" + // static + // prototype + , "" + , "" + , "CheckState state" + , "" +"" +}; + +static const int qtscript_QCheckBox_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QCheckBox_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QCheckBox::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QCheckBox*) +Q_DECLARE_METATYPE(QtScriptShell_QCheckBox*) +Q_DECLARE_METATYPE(Qt::CheckState) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractButton*) + +// +// QCheckBox +// + +static QScriptValue qtscript_QCheckBox_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QCheckBox* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QCheckBox.%0(): this object is not a QCheckBox") + .arg(qtscript_QCheckBox_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + Qt::CheckState _q_result = _q_self->checkState(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + Qt::CheckState _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCheckState(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QCheckBox"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QCheckBox_throw_ambiguity_error_helper(context, + qtscript_QCheckBox_function_names[_id+1], + qtscript_QCheckBox_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QCheckBox_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QCheckBox(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QCheckBox* _q_cpp_result = new QtScriptShell_QCheckBox(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCheckBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QCheckBox* _q_cpp_result = new QtScriptShell_QCheckBox(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCheckBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QCheckBox* _q_cpp_result = new QtScriptShell_QCheckBox(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCheckBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QCheckBox* _q_cpp_result = new QtScriptShell_QCheckBox(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCheckBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QCheckBox_throw_ambiguity_error_helper(context, + qtscript_QCheckBox_function_names[_id], + qtscript_QCheckBox_function_signatures[_id]); +} + +static QScriptValue qtscript_QCheckBox_toScriptValue(QScriptEngine *engine, QCheckBox* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QCheckBox_fromScriptValue(const QScriptValue &value, QCheckBox* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QCheckBox_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QCheckBox*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QCheckBox_prototype_call, qtscript_QCheckBox_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QCheckBox_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QCheckBox_toScriptValue, + qtscript_QCheckBox_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QCheckBox_static_call, proto, qtscript_QCheckBox_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QColorDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QColorDialog.cpp new file mode 100644 index 00000000..f820f1d2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QColorDialog.cpp @@ -0,0 +1,543 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QColorDialog.h" + +static const char * const qtscript_QColorDialog_function_names[] = { + "QColorDialog" + // static + , "customColor" + , "customCount" + , "getColor" + , "setCustomColor" + , "setStandardColor" + , "standardColor" + // prototype + , "open" + , "selectedColor" + , "setCurrentColor" + , "setOption" + , "testOption" + , "toString" +}; + +static const char * const qtscript_QColorDialog_function_signatures[] = { + "QWidget parent\nQColor initial, QWidget parent" + // static + , "int index" + , "" + , "QColor initial, QWidget parent, String title, ColorDialogOptions options" + , "int index, QColor color" + , "int index, QColor color" + , "int index" + // prototype + , "QObject receiver, char member" + , "" + , "QColor color" + , "ColorDialogOption option, bool on" + , "ColorDialogOption option" +"" +}; + +static const int qtscript_QColorDialog_function_lengths[] = { + 2 + // static + , 1 + , 0 + , 4 + , 2 + , 2 + , 1 + // prototype + , 2 + , 0 + , 1 + , 2 + , 1 + , 0 +}; + +static QScriptValue qtscript_QColorDialog_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QColorDialog::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QColorDialog*) +Q_DECLARE_METATYPE(QtScriptShell_QColorDialog*) +Q_DECLARE_METATYPE(QColorDialog::ColorDialogOption) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QDialog*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QColorDialog::ColorDialogOption +// + +static const QColorDialog::ColorDialogOption qtscript_QColorDialog_ColorDialogOption_values[] = { + QColorDialog::ShowAlphaChannel + , QColorDialog::NoButtons + , QColorDialog::DontUseNativeDialog +}; + +static const char * const qtscript_QColorDialog_ColorDialogOption_keys[] = { + "ShowAlphaChannel" + , "NoButtons" + , "DontUseNativeDialog" +}; + +static QString qtscript_QColorDialog_ColorDialogOption_toStringHelper(QColorDialog::ColorDialogOption value) +{ + for (int i = 0; i < 3; ++i) { + if (qtscript_QColorDialog_ColorDialogOption_values[i] == value) + return QString::fromLatin1(qtscript_QColorDialog_ColorDialogOption_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QColorDialog_ColorDialogOption_toScriptValue(QScriptEngine *engine, const QColorDialog::ColorDialogOption &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QColorDialog")); + return clazz.property(qtscript_QColorDialog_ColorDialogOption_toStringHelper(value)); +} + +static void qtscript_QColorDialog_ColorDialogOption_fromScriptValue(const QScriptValue &value, QColorDialog::ColorDialogOption &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QColorDialog_ColorDialogOption(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 3; ++i) { + if (qtscript_QColorDialog_ColorDialogOption_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ColorDialogOption(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QColorDialog_ColorDialogOption_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QColorDialog::ColorDialogOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QColorDialog_ColorDialogOption_toString(QScriptContext *context, QScriptEngine *engine) +{ + QColorDialog::ColorDialogOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QColorDialog_ColorDialogOption_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QColorDialog_ColorDialogOption_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QColorDialog_ColorDialogOption, + qtscript_QColorDialog_ColorDialogOption_valueOf, qtscript_QColorDialog_ColorDialogOption_toString); + qScriptRegisterMetaType(engine, qtscript_QColorDialog_ColorDialogOption_toScriptValue, + qtscript_QColorDialog_ColorDialogOption_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QColorDialog_ColorDialogOption_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QColorDialog_ColorDialogOption_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QColorDialog::ColorDialogOptions +// + +static QScriptValue qtscript_QColorDialog_ColorDialogOptions_toScriptValue(QScriptEngine *engine, const QColorDialog::ColorDialogOptions &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QColorDialog_ColorDialogOptions_fromScriptValue(const QScriptValue &value, QColorDialog::ColorDialogOptions &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QColorDialog_ColorDialogOptions(QScriptContext *context, QScriptEngine *engine) +{ + QColorDialog::ColorDialogOptions result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("ColorDialogOptions(): argument %0 is not of type ColorDialogOption").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QColorDialog_ColorDialogOptions_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QColorDialog::ColorDialogOptions value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QColorDialog_ColorDialogOptions_toString(QScriptContext *context, QScriptEngine *engine) +{ + QColorDialog::ColorDialogOptions value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 3; ++i) { + if ((value & qtscript_QColorDialog_ColorDialogOption_values[i]) == qtscript_QColorDialog_ColorDialogOption_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QColorDialog_ColorDialogOption_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QColorDialog_ColorDialogOptions_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QColorDialog_ColorDialogOptions_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QColorDialog_ColorDialogOptions, qtscript_QColorDialog_ColorDialogOptions_valueOf, + qtscript_QColorDialog_ColorDialogOptions_toString, qtscript_QColorDialog_ColorDialogOptions_equals); + qScriptRegisterMetaType(engine, qtscript_QColorDialog_ColorDialogOptions_toScriptValue, + qtscript_QColorDialog_ColorDialogOptions_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QColorDialog +// + +static QScriptValue qtscript_QColorDialog_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QColorDialog* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QColorDialog.%0(): this object is not a QColorDialog") + .arg(qtscript_QColorDialog_function_names[_id+7])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->open(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QColor _q_result = _q_self->selectedColor(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCurrentColor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QColorDialog::ColorDialogOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOption(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QColorDialog::ColorDialogOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setOption(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QColorDialog::ColorDialogOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->testOption(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: { + QString result = QString::fromLatin1("QColorDialog"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QColorDialog_throw_ambiguity_error_helper(context, + qtscript_QColorDialog_function_names[_id+7], + qtscript_QColorDialog_function_signatures[_id+7]); +} + +static QScriptValue qtscript_QColorDialog_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QColorDialog(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QColorDialog* _q_cpp_result = new QtScriptShell_QColorDialog(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QColorDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QColorDialog* _q_cpp_result = new QtScriptShell_QColorDialog(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QColorDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QColorDialog* _q_cpp_result = new QtScriptShell_QColorDialog(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QColorDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QColorDialog* _q_cpp_result = new QtScriptShell_QColorDialog(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QColorDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QColor _q_result = QColorDialog::customColor(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = QColorDialog::customCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QColor _q_result = QColorDialog::getColor(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QColor _q_result = QColorDialog::getColor(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QColor _q_result = QColorDialog::getColor(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + QColor _q_result = QColorDialog::getColor(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QColor _q_result = QColorDialog::getColor(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QColor _q_arg1 = qscriptvalue_cast(context->argument(1)); + QColorDialog::setCustomColor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QColor _q_arg1 = qscriptvalue_cast(context->argument(1)); + QColorDialog::setStandardColor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QColor _q_result = QColorDialog::standardColor(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QColorDialog_throw_ambiguity_error_helper(context, + qtscript_QColorDialog_function_names[_id], + qtscript_QColorDialog_function_signatures[_id]); +} + +static QScriptValue qtscript_QColorDialog_toScriptValue(QScriptEngine *engine, QColorDialog* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QColorDialog_fromScriptValue(const QScriptValue &value, QColorDialog* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QColorDialog_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QColorDialog*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QColorDialog_prototype_call, qtscript_QColorDialog_function_lengths[i+7]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QColorDialog_function_names[i+7]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QColorDialog_toScriptValue, + qtscript_QColorDialog_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QColorDialog_static_call, proto, qtscript_QColorDialog_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QColorDialog_static_call, + qtscript_QColorDialog_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QColorDialog_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("ColorDialogOption"), + qtscript_create_QColorDialog_ColorDialogOption_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ColorDialogOptions"), + qtscript_create_QColorDialog_ColorDialogOptions_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QColumnView.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QColumnView.cpp new file mode 100644 index 00000000..6b77f2ff --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QColumnView.cpp @@ -0,0 +1,231 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QColumnView.h" + +static const char * const qtscript_QColumnView_function_names[] = { + "QColumnView" + // static + // prototype + , "columnWidths" + , "previewWidget" + , "setColumnWidths" + , "setPreviewWidget" + , "toString" +}; + +static const char * const qtscript_QColumnView_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "" + , "" + , "List list" + , "QWidget widget" +"" +}; + +static const int qtscript_QColumnView_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QColumnView_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QColumnView::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QColumnView*) +Q_DECLARE_METATYPE(QtScriptShell_QColumnView*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemView*) + +// +// QColumnView +// + +static QScriptValue qtscript_QColumnView_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QColumnView* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QColumnView.%0(): this object is not a QColumnView") + .arg(qtscript_QColumnView_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->columnWidths(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->previewWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setColumnWidths(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPreviewWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: { + QString result = QString::fromLatin1("QColumnView"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QColumnView_throw_ambiguity_error_helper(context, + qtscript_QColumnView_function_names[_id+1], + qtscript_QColumnView_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QColumnView_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QColumnView(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QColumnView* _q_cpp_result = new QtScriptShell_QColumnView(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QColumnView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QColumnView* _q_cpp_result = new QtScriptShell_QColumnView(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QColumnView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QColumnView_throw_ambiguity_error_helper(context, + qtscript_QColumnView_function_names[_id], + qtscript_QColumnView_function_signatures[_id]); +} + +static QScriptValue qtscript_QColumnView_toScriptValue(QScriptEngine *engine, QColumnView* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QColumnView_fromScriptValue(const QScriptValue &value, QColumnView* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QColumnView_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QColumnView*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QColumnView_prototype_call, qtscript_QColumnView_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QColumnView_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QColumnView_toScriptValue, + qtscript_QColumnView_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QColumnView_static_call, proto, qtscript_QColumnView_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QComboBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QComboBox.cpp new file mode 100644 index 00000000..f39da4cc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QComboBox.cpp @@ -0,0 +1,791 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QComboBox.h" + +static const char * const qtscript_QComboBox_function_names[] = { + "QComboBox" + // static + // prototype + , "addItem" + , "addItems" + , "completer" + , "findData" + , "findText" + , "hidePopup" + , "insertItem" + , "insertItems" + , "insertSeparator" + , "itemData" + , "itemDelegate" + , "itemIcon" + , "itemText" + , "lineEdit" + , "minimumSizeHint" + , "model" + , "removeItem" + , "rootModelIndex" + , "setCompleter" + , "setItemData" + , "setItemDelegate" + , "setItemIcon" + , "setItemText" + , "setLineEdit" + , "setModel" + , "setRootModelIndex" + , "setValidator" + , "setView" + , "showPopup" + , "sizeHint" + , "validator" + , "view" + , "toString" +}; + +static const char * const qtscript_QComboBox_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "QIcon icon, String text, Object userData\nString text, Object userData" + , "List texts" + , "" + , "Object data, int role, MatchFlags flags" + , "String text, MatchFlags flags" + , "" + , "int index, QIcon icon, String text, Object userData\nint index, String text, Object userData" + , "int index, List texts" + , "int index" + , "int index, int role" + , "" + , "int index" + , "int index" + , "" + , "" + , "" + , "int index" + , "" + , "QCompleter c" + , "int index, Object value, int role" + , "QAbstractItemDelegate delegate" + , "int index, QIcon icon" + , "int index, String text" + , "QLineEdit edit" + , "QAbstractItemModel model" + , "QModelIndex index" + , "QValidator v" + , "QAbstractItemView itemView" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QComboBox_function_lengths[] = { + 1 + // static + // prototype + , 3 + , 1 + , 0 + , 3 + , 2 + , 0 + , 4 + , 2 + , 1 + , 2 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 3 + , 1 + , 2 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QComboBox_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QComboBox::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QComboBox*) +Q_DECLARE_METATYPE(QtScriptShell_QComboBox*) +Q_DECLARE_METATYPE(QComboBox::SizeAdjustPolicy) +Q_DECLARE_METATYPE(QComboBox::InsertPolicy) +Q_DECLARE_METATYPE(QCompleter*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAbstractItemDelegate*) +Q_DECLARE_METATYPE(QLineEdit*) +Q_DECLARE_METATYPE(QAbstractItemModel*) +Q_DECLARE_METATYPE(const QValidator*) +Q_DECLARE_METATYPE(QAbstractItemView*) +Q_DECLARE_METATYPE(QWidget*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QComboBox::SizeAdjustPolicy +// + +static const QComboBox::SizeAdjustPolicy qtscript_QComboBox_SizeAdjustPolicy_values[] = { + QComboBox::AdjustToContents + , QComboBox::AdjustToContentsOnFirstShow + , QComboBox::AdjustToMinimumContentsLength + , QComboBox::AdjustToMinimumContentsLengthWithIcon +}; + +static const char * const qtscript_QComboBox_SizeAdjustPolicy_keys[] = { + "AdjustToContents" + , "AdjustToContentsOnFirstShow" + , "AdjustToMinimumContentsLength" + , "AdjustToMinimumContentsLengthWithIcon" +}; + +static QString qtscript_QComboBox_SizeAdjustPolicy_toStringHelper(QComboBox::SizeAdjustPolicy value) +{ + if ((value >= QComboBox::AdjustToContents) && (value <= QComboBox::AdjustToMinimumContentsLengthWithIcon)) + return qtscript_QComboBox_SizeAdjustPolicy_keys[static_cast(value)-static_cast(QComboBox::AdjustToContents)]; + return QString(); +} + +static QScriptValue qtscript_QComboBox_SizeAdjustPolicy_toScriptValue(QScriptEngine *engine, const QComboBox::SizeAdjustPolicy &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QComboBox")); + return clazz.property(qtscript_QComboBox_SizeAdjustPolicy_toStringHelper(value)); +} + +static void qtscript_QComboBox_SizeAdjustPolicy_fromScriptValue(const QScriptValue &value, QComboBox::SizeAdjustPolicy &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QComboBox_SizeAdjustPolicy(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QComboBox::AdjustToContents) && (arg <= QComboBox::AdjustToMinimumContentsLengthWithIcon)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SizeAdjustPolicy(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QComboBox_SizeAdjustPolicy_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QComboBox::SizeAdjustPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QComboBox_SizeAdjustPolicy_toString(QScriptContext *context, QScriptEngine *engine) +{ + QComboBox::SizeAdjustPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QComboBox_SizeAdjustPolicy_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QComboBox_SizeAdjustPolicy_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QComboBox_SizeAdjustPolicy, + qtscript_QComboBox_SizeAdjustPolicy_valueOf, qtscript_QComboBox_SizeAdjustPolicy_toString); + qScriptRegisterMetaType(engine, qtscript_QComboBox_SizeAdjustPolicy_toScriptValue, + qtscript_QComboBox_SizeAdjustPolicy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QComboBox_SizeAdjustPolicy_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QComboBox_SizeAdjustPolicy_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QComboBox::InsertPolicy +// + +static const QComboBox::InsertPolicy qtscript_QComboBox_InsertPolicy_values[] = { + QComboBox::NoInsert + , QComboBox::InsertAtTop + , QComboBox::InsertAtCurrent + , QComboBox::InsertAtBottom + , QComboBox::InsertAfterCurrent + , QComboBox::InsertBeforeCurrent + , QComboBox::InsertAlphabetically +}; + +static const char * const qtscript_QComboBox_InsertPolicy_keys[] = { + "NoInsert" + , "InsertAtTop" + , "InsertAtCurrent" + , "InsertAtBottom" + , "InsertAfterCurrent" + , "InsertBeforeCurrent" + , "InsertAlphabetically" +}; + +static QString qtscript_QComboBox_InsertPolicy_toStringHelper(QComboBox::InsertPolicy value) +{ + if ((value >= QComboBox::NoInsert) && (value <= QComboBox::InsertAlphabetically)) + return qtscript_QComboBox_InsertPolicy_keys[static_cast(value)-static_cast(QComboBox::NoInsert)]; + return QString(); +} + +static QScriptValue qtscript_QComboBox_InsertPolicy_toScriptValue(QScriptEngine *engine, const QComboBox::InsertPolicy &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QComboBox")); + return clazz.property(qtscript_QComboBox_InsertPolicy_toStringHelper(value)); +} + +static void qtscript_QComboBox_InsertPolicy_fromScriptValue(const QScriptValue &value, QComboBox::InsertPolicy &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QComboBox_InsertPolicy(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QComboBox::NoInsert) && (arg <= QComboBox::InsertAlphabetically)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("InsertPolicy(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QComboBox_InsertPolicy_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QComboBox::InsertPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QComboBox_InsertPolicy_toString(QScriptContext *context, QScriptEngine *engine) +{ + QComboBox::InsertPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QComboBox_InsertPolicy_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QComboBox_InsertPolicy_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QComboBox_InsertPolicy, + qtscript_QComboBox_InsertPolicy_valueOf, qtscript_QComboBox_InsertPolicy_toString); + qScriptRegisterMetaType(engine, qtscript_QComboBox_InsertPolicy_toScriptValue, + qtscript_QComboBox_InsertPolicy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 7; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QComboBox_InsertPolicy_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QComboBox_InsertPolicy_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QComboBox +// + +static QScriptValue qtscript_QComboBox_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 32; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QComboBox* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QComboBox.%0(): this object is not a QComboBox") + .arg(qtscript_QComboBox_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->addItem(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + _q_self->addItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && true) { + QString _q_arg0 = context->argument(0).toString(); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->addItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QVariant _q_arg2 = context->argument(2).toVariant(); + _q_self->addItem(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->addItems(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QCompleter* _q_result = _q_self->completer(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QVariant _q_arg0 = context->argument(0).toVariant(); + int _q_result = _q_self->findData(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QVariant _q_arg0 = context->argument(0).toVariant(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->findData(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QVariant _q_arg0 = context->argument(0).toVariant(); + int _q_arg1 = context->argument(1).toInt32(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + int _q_result = _q_self->findData(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + int _q_result = _q_self->findText(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + int _q_result = _q_self->findText(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + _q_self->hidePopup(); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->insertItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + if (context->argument(0).isNumber() + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && context->argument(2).isString()) { + int _q_arg0 = context->argument(0).toInt32(); + QIcon _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + _q_self->insertItem(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isString() + && true) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + QVariant _q_arg2 = context->argument(2).toVariant(); + _q_self->insertItem(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + QIcon _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + QVariant _q_arg3 = context->argument(3).toVariant(); + _q_self->insertItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + _q_self->insertItems(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->insertSeparator(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_result = _q_self->itemData(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QVariant _q_result = _q_self->itemData(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QAbstractItemDelegate* _q_result = _q_self->itemDelegate(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QIcon _q_result = _q_self->itemIcon(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->itemText(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QLineEdit* _q_result = _q_self->lineEdit(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QAbstractItemModel* _q_result = _q_self->model(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->removeItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QModelIndex _q_result = _q_self->rootModelIndex(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QCompleter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCompleter(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setItemData(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_arg1 = context->argument(1).toVariant(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setItemData(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QAbstractItemDelegate* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setItemDelegate(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QIcon _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setItemIcon(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setItemText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QLineEdit* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLineEdit(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QAbstractItemModel* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setModel(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRootModelIndex(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + const QValidator* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setValidator(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + QAbstractItemView* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setView(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 0) { + _q_self->showPopup(); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 0) { + const QValidator* _q_result = const_cast(_q_self->validator()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 0) { + QAbstractItemView* _q_result = _q_self->view(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 32: { + QString result = QString::fromLatin1("QComboBox"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QComboBox_throw_ambiguity_error_helper(context, + qtscript_QComboBox_function_names[_id+1], + qtscript_QComboBox_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QComboBox_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QComboBox(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QComboBox* _q_cpp_result = new QtScriptShell_QComboBox(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QComboBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QComboBox* _q_cpp_result = new QtScriptShell_QComboBox(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QComboBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QComboBox_throw_ambiguity_error_helper(context, + qtscript_QComboBox_function_names[_id], + qtscript_QComboBox_function_signatures[_id]); +} + +static QScriptValue qtscript_QComboBox_toScriptValue(QScriptEngine *engine, QComboBox* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QComboBox_fromScriptValue(const QScriptValue &value, QComboBox* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QComboBox_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QComboBox*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 33; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QComboBox_prototype_call, qtscript_QComboBox_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QComboBox_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QComboBox_toScriptValue, + qtscript_QComboBox_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QComboBox_static_call, proto, qtscript_QComboBox_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("SizeAdjustPolicy"), + qtscript_create_QComboBox_SizeAdjustPolicy_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("InsertPolicy"), + qtscript_create_QComboBox_InsertPolicy_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCommandLinkButton.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCommandLinkButton.cpp new file mode 100644 index 00000000..2f00a01e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCommandLinkButton.cpp @@ -0,0 +1,211 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QCommandLinkButton.h" + +static const char * const qtscript_QCommandLinkButton_function_names[] = { + "QCommandLinkButton" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QCommandLinkButton_function_signatures[] = { + "QWidget parent\nString text, QWidget parent\nString text, String description, QWidget parent" + // static + // prototype +"" +}; + +static const int qtscript_QCommandLinkButton_function_lengths[] = { + 3 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QCommandLinkButton_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QCommandLinkButton::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QCommandLinkButton*) +Q_DECLARE_METATYPE(QtScriptShell_QCommandLinkButton*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QPushButton*) + +// +// QCommandLinkButton +// + +static QScriptValue qtscript_QCommandLinkButton_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QCommandLinkButton* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QCommandLinkButton.%0(): this object is not a QCommandLinkButton") + .arg(qtscript_QCommandLinkButton_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QCommandLinkButton"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QCommandLinkButton_throw_ambiguity_error_helper(context, + qtscript_QCommandLinkButton_function_names[_id+1], + qtscript_QCommandLinkButton_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QCommandLinkButton_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QCommandLinkButton(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QCommandLinkButton* _q_cpp_result = new QtScriptShell_QCommandLinkButton(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCommandLinkButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QCommandLinkButton* _q_cpp_result = new QtScriptShell_QCommandLinkButton(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCommandLinkButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QCommandLinkButton* _q_cpp_result = new QtScriptShell_QCommandLinkButton(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCommandLinkButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1))) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QCommandLinkButton* _q_cpp_result = new QtScriptShell_QCommandLinkButton(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCommandLinkButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QtScriptShell_QCommandLinkButton* _q_cpp_result = new QtScriptShell_QCommandLinkButton(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCommandLinkButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QCommandLinkButton* _q_cpp_result = new QtScriptShell_QCommandLinkButton(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCommandLinkButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QCommandLinkButton_throw_ambiguity_error_helper(context, + qtscript_QCommandLinkButton_function_names[_id], + qtscript_QCommandLinkButton_function_signatures[_id]); +} + +static QScriptValue qtscript_QCommandLinkButton_toScriptValue(QScriptEngine *engine, QCommandLinkButton* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QCommandLinkButton_fromScriptValue(const QScriptValue &value, QCommandLinkButton* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QCommandLinkButton_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QCommandLinkButton*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QCommandLinkButton_toScriptValue, + qtscript_QCommandLinkButton_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QCommandLinkButton_static_call, proto, qtscript_QCommandLinkButton_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCommonStyle.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCommonStyle.cpp new file mode 100644 index 00000000..356f976c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCommonStyle.cpp @@ -0,0 +1,154 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QCommonStyle.h" + +static const char * const qtscript_QCommonStyle_function_names[] = { + "QCommonStyle" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QCommonStyle_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QCommonStyle_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QCommonStyle_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QCommonStyle::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QCommonStyle*) +Q_DECLARE_METATYPE(QtScriptShell_QCommonStyle*) +Q_DECLARE_METATYPE(QStyle*) + +// +// QCommonStyle +// + +static QScriptValue qtscript_QCommonStyle_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QCommonStyle* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QCommonStyle.%0(): this object is not a QCommonStyle") + .arg(qtscript_QCommonStyle_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QCommonStyle"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QCommonStyle_throw_ambiguity_error_helper(context, + qtscript_QCommonStyle_function_names[_id+1], + qtscript_QCommonStyle_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QCommonStyle_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QCommonStyle(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QCommonStyle* _q_cpp_result = new QtScriptShell_QCommonStyle(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCommonStyle*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QCommonStyle_throw_ambiguity_error_helper(context, + qtscript_QCommonStyle_function_names[_id], + qtscript_QCommonStyle_function_signatures[_id]); +} + +static QScriptValue qtscript_QCommonStyle_toScriptValue(QScriptEngine *engine, QCommonStyle* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QCommonStyle_fromScriptValue(const QScriptValue &value, QCommonStyle* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QCommonStyle_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QCommonStyle*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QCommonStyle_toScriptValue, + qtscript_QCommonStyle_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QCommonStyle_static_call, proto, qtscript_QCommonStyle_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCompleter.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCompleter.cpp new file mode 100644 index 00000000..b76fa7af --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QCompleter.cpp @@ -0,0 +1,500 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QCompleter.h" + +static const char * const qtscript_QCompleter_function_names[] = { + "QCompleter" + // static + // prototype + , "completionCount" + , "completionModel" + , "currentCompletion" + , "currentIndex" + , "currentRow" + , "model" + , "pathFromIndex" + , "popup" + , "setCurrentRow" + , "setModel" + , "setPopup" + , "setWidget" + , "splitPath" + , "widget" + , "toString" +}; + +static const char * const qtscript_QCompleter_function_signatures[] = { + "QAbstractItemModel model, QObject parent\nQObject parent\nList completions, QObject parent" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "QModelIndex index" + , "" + , "int row" + , "QAbstractItemModel c" + , "QAbstractItemView popup" + , "QWidget widget" + , "String path" + , "" +"" +}; + +static const int qtscript_QCompleter_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QCompleter_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QCompleter::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QCompleter*) +Q_DECLARE_METATYPE(QtScriptShell_QCompleter*) +Q_DECLARE_METATYPE(QCompleter::ModelSorting) +Q_DECLARE_METATYPE(QCompleter::CompletionMode) +Q_DECLARE_METATYPE(QAbstractItemModel*) +Q_DECLARE_METATYPE(QAbstractItemView*) +Q_DECLARE_METATYPE(QWidget*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QCompleter::ModelSorting +// + +static const QCompleter::ModelSorting qtscript_QCompleter_ModelSorting_values[] = { + QCompleter::UnsortedModel + , QCompleter::CaseSensitivelySortedModel + , QCompleter::CaseInsensitivelySortedModel +}; + +static const char * const qtscript_QCompleter_ModelSorting_keys[] = { + "UnsortedModel" + , "CaseSensitivelySortedModel" + , "CaseInsensitivelySortedModel" +}; + +static QString qtscript_QCompleter_ModelSorting_toStringHelper(QCompleter::ModelSorting value) +{ + if ((value >= QCompleter::UnsortedModel) && (value <= QCompleter::CaseInsensitivelySortedModel)) + return qtscript_QCompleter_ModelSorting_keys[static_cast(value)-static_cast(QCompleter::UnsortedModel)]; + return QString(); +} + +static QScriptValue qtscript_QCompleter_ModelSorting_toScriptValue(QScriptEngine *engine, const QCompleter::ModelSorting &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QCompleter")); + return clazz.property(qtscript_QCompleter_ModelSorting_toStringHelper(value)); +} + +static void qtscript_QCompleter_ModelSorting_fromScriptValue(const QScriptValue &value, QCompleter::ModelSorting &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QCompleter_ModelSorting(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QCompleter::UnsortedModel) && (arg <= QCompleter::CaseInsensitivelySortedModel)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ModelSorting(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QCompleter_ModelSorting_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QCompleter::ModelSorting value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QCompleter_ModelSorting_toString(QScriptContext *context, QScriptEngine *engine) +{ + QCompleter::ModelSorting value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QCompleter_ModelSorting_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QCompleter_ModelSorting_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QCompleter_ModelSorting, + qtscript_QCompleter_ModelSorting_valueOf, qtscript_QCompleter_ModelSorting_toString); + qScriptRegisterMetaType(engine, qtscript_QCompleter_ModelSorting_toScriptValue, + qtscript_QCompleter_ModelSorting_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QCompleter_ModelSorting_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QCompleter_ModelSorting_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QCompleter::CompletionMode +// + +static const QCompleter::CompletionMode qtscript_QCompleter_CompletionMode_values[] = { + QCompleter::PopupCompletion + , QCompleter::UnfilteredPopupCompletion + , QCompleter::InlineCompletion +}; + +static const char * const qtscript_QCompleter_CompletionMode_keys[] = { + "PopupCompletion" + , "UnfilteredPopupCompletion" + , "InlineCompletion" +}; + +static QString qtscript_QCompleter_CompletionMode_toStringHelper(QCompleter::CompletionMode value) +{ + if ((value >= QCompleter::PopupCompletion) && (value <= QCompleter::InlineCompletion)) + return qtscript_QCompleter_CompletionMode_keys[static_cast(value)-static_cast(QCompleter::PopupCompletion)]; + return QString(); +} + +static QScriptValue qtscript_QCompleter_CompletionMode_toScriptValue(QScriptEngine *engine, const QCompleter::CompletionMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QCompleter")); + return clazz.property(qtscript_QCompleter_CompletionMode_toStringHelper(value)); +} + +static void qtscript_QCompleter_CompletionMode_fromScriptValue(const QScriptValue &value, QCompleter::CompletionMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QCompleter_CompletionMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QCompleter::PopupCompletion) && (arg <= QCompleter::InlineCompletion)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("CompletionMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QCompleter_CompletionMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QCompleter::CompletionMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QCompleter_CompletionMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QCompleter::CompletionMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QCompleter_CompletionMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QCompleter_CompletionMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QCompleter_CompletionMode, + qtscript_QCompleter_CompletionMode_valueOf, qtscript_QCompleter_CompletionMode_toString); + qScriptRegisterMetaType(engine, qtscript_QCompleter_CompletionMode_toScriptValue, + qtscript_QCompleter_CompletionMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QCompleter_CompletionMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QCompleter_CompletionMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QCompleter +// + +static QScriptValue qtscript_QCompleter_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 14; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QCompleter* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QCompleter.%0(): this object is not a QCompleter") + .arg(qtscript_QCompleter_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->completionCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QAbstractItemModel* _q_result = _q_self->completionModel(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->currentCompletion(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QModelIndex _q_result = _q_self->currentIndex(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->currentRow(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QAbstractItemModel* _q_result = _q_self->model(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->pathFromIndex(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QAbstractItemView* _q_result = _q_self->popup(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->setCurrentRow(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QAbstractItemModel* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setModel(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QAbstractItemView* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPopup(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_result = _q_self->splitPath(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->widget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: { + QString result = QString::fromLatin1("QCompleter"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QCompleter_throw_ambiguity_error_helper(context, + qtscript_QCompleter_function_names[_id+1], + qtscript_QCompleter_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QCompleter_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QCompleter(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QCompleter* _q_cpp_result = new QtScriptShell_QCompleter(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCompleter*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QAbstractItemModel* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QCompleter* _q_cpp_result = new QtScriptShell_QCompleter(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCompleter*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isQObject()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QCompleter* _q_cpp_result = new QtScriptShell_QCompleter(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCompleter*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isArray()) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QtScriptShell_QCompleter* _q_cpp_result = new QtScriptShell_QCompleter(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCompleter*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isQObject()) { + QAbstractItemModel* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QCompleter* _q_cpp_result = new QtScriptShell_QCompleter(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCompleter*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isArray() + && context->argument(1).isQObject()) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QCompleter* _q_cpp_result = new QtScriptShell_QCompleter(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QCompleter*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QCompleter_throw_ambiguity_error_helper(context, + qtscript_QCompleter_function_names[_id], + qtscript_QCompleter_function_signatures[_id]); +} + +static QScriptValue qtscript_QCompleter_toScriptValue(QScriptEngine *engine, QCompleter* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QCompleter_fromScriptValue(const QScriptValue &value, QCompleter* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QCompleter_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QCompleter*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 15; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QCompleter_prototype_call, qtscript_QCompleter_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QCompleter_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QCompleter_toScriptValue, + qtscript_QCompleter_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QCompleter_static_call, proto, qtscript_QCompleter_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ModelSorting"), + qtscript_create_QCompleter_ModelSorting_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("CompletionMode"), + qtscript_create_QCompleter_CompletionMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDataWidgetMapper.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDataWidgetMapper.cpp new file mode 100644 index 00000000..47da1211 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDataWidgetMapper.cpp @@ -0,0 +1,380 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QDataWidgetMapper.h" + +static const char * const qtscript_QDataWidgetMapper_function_names[] = { + "QDataWidgetMapper" + // static + // prototype + , "addMapping" + , "clearMapping" + , "itemDelegate" + , "mappedPropertyName" + , "mappedSection" + , "mappedWidgetAt" + , "model" + , "removeMapping" + , "rootIndex" + , "setItemDelegate" + , "setModel" + , "setRootIndex" + , "toString" +}; + +static const char * const qtscript_QDataWidgetMapper_function_signatures[] = { + "QObject parent" + // static + // prototype + , "QWidget widget, int section\nQWidget widget, int section, QByteArray propertyName" + , "" + , "" + , "QWidget widget" + , "QWidget widget" + , "int section" + , "" + , "QWidget widget" + , "" + , "QAbstractItemDelegate delegate" + , "QAbstractItemModel model" + , "QModelIndex index" +"" +}; + +static const int qtscript_QDataWidgetMapper_function_lengths[] = { + 1 + // static + // prototype + , 3 + , 0 + , 0 + , 1 + , 1 + , 1 + , 0 + , 1 + , 0 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QDataWidgetMapper_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDataWidgetMapper::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDataWidgetMapper*) +Q_DECLARE_METATYPE(QtScriptShell_QDataWidgetMapper*) +Q_DECLARE_METATYPE(QDataWidgetMapper::SubmitPolicy) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemDelegate*) +Q_DECLARE_METATYPE(QAbstractItemModel*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QDataWidgetMapper::SubmitPolicy +// + +static const QDataWidgetMapper::SubmitPolicy qtscript_QDataWidgetMapper_SubmitPolicy_values[] = { + QDataWidgetMapper::AutoSubmit + , QDataWidgetMapper::ManualSubmit +}; + +static const char * const qtscript_QDataWidgetMapper_SubmitPolicy_keys[] = { + "AutoSubmit" + , "ManualSubmit" +}; + +static QString qtscript_QDataWidgetMapper_SubmitPolicy_toStringHelper(QDataWidgetMapper::SubmitPolicy value) +{ + if ((value >= QDataWidgetMapper::AutoSubmit) && (value <= QDataWidgetMapper::ManualSubmit)) + return qtscript_QDataWidgetMapper_SubmitPolicy_keys[static_cast(value)-static_cast(QDataWidgetMapper::AutoSubmit)]; + return QString(); +} + +static QScriptValue qtscript_QDataWidgetMapper_SubmitPolicy_toScriptValue(QScriptEngine *engine, const QDataWidgetMapper::SubmitPolicy &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QDataWidgetMapper")); + return clazz.property(qtscript_QDataWidgetMapper_SubmitPolicy_toStringHelper(value)); +} + +static void qtscript_QDataWidgetMapper_SubmitPolicy_fromScriptValue(const QScriptValue &value, QDataWidgetMapper::SubmitPolicy &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QDataWidgetMapper_SubmitPolicy(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QDataWidgetMapper::AutoSubmit) && (arg <= QDataWidgetMapper::ManualSubmit)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SubmitPolicy(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QDataWidgetMapper_SubmitPolicy_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDataWidgetMapper::SubmitPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDataWidgetMapper_SubmitPolicy_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDataWidgetMapper::SubmitPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QDataWidgetMapper_SubmitPolicy_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QDataWidgetMapper_SubmitPolicy_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QDataWidgetMapper_SubmitPolicy, + qtscript_QDataWidgetMapper_SubmitPolicy_valueOf, qtscript_QDataWidgetMapper_SubmitPolicy_toString); + qScriptRegisterMetaType(engine, qtscript_QDataWidgetMapper_SubmitPolicy_toScriptValue, + qtscript_QDataWidgetMapper_SubmitPolicy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QDataWidgetMapper_SubmitPolicy_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QDataWidgetMapper_SubmitPolicy_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QDataWidgetMapper +// + +static QScriptValue qtscript_QDataWidgetMapper_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 12; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDataWidgetMapper* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDataWidgetMapper.%0(): this object is not a QDataWidgetMapper") + .arg(qtscript_QDataWidgetMapper_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->addMapping(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QByteArray _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->addMapping(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->clearMapping(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QAbstractItemDelegate* _q_result = _q_self->itemDelegate(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QByteArray _q_result = _q_self->mappedPropertyName(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->mappedSection(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_result = _q_self->mappedWidgetAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QAbstractItemModel* _q_result = _q_self->model(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeMapping(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QModelIndex _q_result = _q_self->rootIndex(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QAbstractItemDelegate* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setItemDelegate(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QAbstractItemModel* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setModel(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRootIndex(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: { + QString result = QString::fromLatin1("QDataWidgetMapper"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDataWidgetMapper_throw_ambiguity_error_helper(context, + qtscript_QDataWidgetMapper_function_names[_id+1], + qtscript_QDataWidgetMapper_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDataWidgetMapper_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDataWidgetMapper(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QDataWidgetMapper* _q_cpp_result = new QtScriptShell_QDataWidgetMapper(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDataWidgetMapper*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QDataWidgetMapper* _q_cpp_result = new QtScriptShell_QDataWidgetMapper(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDataWidgetMapper*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDataWidgetMapper_throw_ambiguity_error_helper(context, + qtscript_QDataWidgetMapper_function_names[_id], + qtscript_QDataWidgetMapper_function_signatures[_id]); +} + +static QScriptValue qtscript_QDataWidgetMapper_toScriptValue(QScriptEngine *engine, QDataWidgetMapper* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QDataWidgetMapper_fromScriptValue(const QScriptValue &value, QDataWidgetMapper* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QDataWidgetMapper_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDataWidgetMapper*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 13; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDataWidgetMapper_prototype_call, qtscript_QDataWidgetMapper_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDataWidgetMapper_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QDataWidgetMapper_toScriptValue, + qtscript_QDataWidgetMapper_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDataWidgetMapper_static_call, proto, qtscript_QDataWidgetMapper_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("SubmitPolicy"), + qtscript_create_QDataWidgetMapper_SubmitPolicy_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDateEdit.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDateEdit.cpp new file mode 100644 index 00000000..52a62cdf --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDateEdit.cpp @@ -0,0 +1,193 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QDateEdit.h" + +static const char * const qtscript_QDateEdit_function_names[] = { + "QDateEdit" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QDateEdit_function_signatures[] = { + "QWidget parent\nQDate date, QWidget parent" + // static + // prototype +"" +}; + +static const int qtscript_QDateEdit_function_lengths[] = { + 2 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QDateEdit_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDateEdit::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDateEdit*) +Q_DECLARE_METATYPE(QtScriptShell_QDateEdit*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QDateTimeEdit*) + +// +// QDateEdit +// + +static QScriptValue qtscript_QDateEdit_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDateEdit* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDateEdit.%0(): this object is not a QDateEdit") + .arg(qtscript_QDateEdit_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QDateEdit"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDateEdit_throw_ambiguity_error_helper(context, + qtscript_QDateEdit_function_names[_id+1], + qtscript_QDateEdit_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDateEdit_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDateEdit(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QDateEdit* _q_cpp_result = new QtScriptShell_QDateEdit(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDateEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QDateEdit* _q_cpp_result = new QtScriptShell_QDateEdit(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDateEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QDateEdit* _q_cpp_result = new QtScriptShell_QDateEdit(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDateEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QDateEdit* _q_cpp_result = new QtScriptShell_QDateEdit(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDateEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDateEdit_throw_ambiguity_error_helper(context, + qtscript_QDateEdit_function_names[_id], + qtscript_QDateEdit_function_signatures[_id]); +} + +static QScriptValue qtscript_QDateEdit_toScriptValue(QScriptEngine *engine, QDateEdit* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QDateEdit_fromScriptValue(const QScriptValue &value, QDateEdit* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QDateEdit_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDateEdit*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QDateEdit_toScriptValue, + qtscript_QDateEdit_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDateEdit_static_call, proto, qtscript_QDateEdit_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDateTimeEdit.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDateTimeEdit.cpp new file mode 100644 index 00000000..d0820392 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDateTimeEdit.cpp @@ -0,0 +1,583 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QDateTimeEdit.h" + +static const char * const qtscript_QDateTimeEdit_function_names[] = { + "QDateTimeEdit" + // static + // prototype + , "calendarWidget" + , "clearMaximumDate" + , "clearMaximumDateTime" + , "clearMaximumTime" + , "clearMinimumDate" + , "clearMinimumDateTime" + , "clearMinimumTime" + , "sectionAt" + , "sectionText" + , "setCalendarWidget" + , "setDateRange" + , "setDateTimeRange" + , "setSelectedSection" + , "setTimeRange" + , "toString" +}; + +static const char * const qtscript_QDateTimeEdit_function_signatures[] = { + "QWidget parent\nQDate d, QWidget parent\nQDateTime dt, QWidget parent\nQTime t, QWidget parent" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "int index" + , "Section section" + , "QCalendarWidget calendarWidget" + , "QDate min, QDate max" + , "QDateTime min, QDateTime max" + , "Section section" + , "QTime min, QTime max" +"" +}; + +static const int qtscript_QDateTimeEdit_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 2 + , 2 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QDateTimeEdit_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDateTimeEdit::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDateTimeEdit*) +Q_DECLARE_METATYPE(QtScriptShell_QDateTimeEdit*) +Q_DECLARE_METATYPE(QDateTimeEdit::Section) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QCalendarWidget*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractSpinBox*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QDateTimeEdit::Section +// + +static const QDateTimeEdit::Section qtscript_QDateTimeEdit_Section_values[] = { + QDateTimeEdit::NoSection + , QDateTimeEdit::AmPmSection + , QDateTimeEdit::MSecSection + , QDateTimeEdit::SecondSection + , QDateTimeEdit::MinuteSection + , QDateTimeEdit::HourSection + , QDateTimeEdit::TimeSections_Mask + , QDateTimeEdit::DaySection + , QDateTimeEdit::MonthSection + , QDateTimeEdit::YearSection + , QDateTimeEdit::DateSections_Mask +}; + +static const char * const qtscript_QDateTimeEdit_Section_keys[] = { + "NoSection" + , "AmPmSection" + , "MSecSection" + , "SecondSection" + , "MinuteSection" + , "HourSection" + , "TimeSections_Mask" + , "DaySection" + , "MonthSection" + , "YearSection" + , "DateSections_Mask" +}; + +static QString qtscript_QDateTimeEdit_Section_toStringHelper(QDateTimeEdit::Section value) +{ + for (int i = 0; i < 11; ++i) { + if (qtscript_QDateTimeEdit_Section_values[i] == value) + return QString::fromLatin1(qtscript_QDateTimeEdit_Section_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QDateTimeEdit_Section_toScriptValue(QScriptEngine *engine, const QDateTimeEdit::Section &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QDateTimeEdit")); + return clazz.property(qtscript_QDateTimeEdit_Section_toStringHelper(value)); +} + +static void qtscript_QDateTimeEdit_Section_fromScriptValue(const QScriptValue &value, QDateTimeEdit::Section &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QDateTimeEdit_Section(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 11; ++i) { + if (qtscript_QDateTimeEdit_Section_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Section(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QDateTimeEdit_Section_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDateTimeEdit::Section value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDateTimeEdit_Section_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDateTimeEdit::Section value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QDateTimeEdit_Section_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QDateTimeEdit_Section_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QDateTimeEdit_Section, + qtscript_QDateTimeEdit_Section_valueOf, qtscript_QDateTimeEdit_Section_toString); + qScriptRegisterMetaType(engine, qtscript_QDateTimeEdit_Section_toScriptValue, + qtscript_QDateTimeEdit_Section_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 11; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QDateTimeEdit_Section_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QDateTimeEdit_Section_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QDateTimeEdit::Sections +// + +static QScriptValue qtscript_QDateTimeEdit_Sections_toScriptValue(QScriptEngine *engine, const QDateTimeEdit::Sections &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QDateTimeEdit_Sections_fromScriptValue(const QScriptValue &value, QDateTimeEdit::Sections &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QDateTimeEdit_Sections(QScriptContext *context, QScriptEngine *engine) +{ + QDateTimeEdit::Sections result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("Sections(): argument %0 is not of type Section").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QDateTimeEdit_Sections_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDateTimeEdit::Sections value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDateTimeEdit_Sections_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDateTimeEdit::Sections value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 11; ++i) { + if ((value & qtscript_QDateTimeEdit_Section_values[i]) == qtscript_QDateTimeEdit_Section_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QDateTimeEdit_Section_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QDateTimeEdit_Sections_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QDateTimeEdit_Sections_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QDateTimeEdit_Sections, qtscript_QDateTimeEdit_Sections_valueOf, + qtscript_QDateTimeEdit_Sections_toString, qtscript_QDateTimeEdit_Sections_equals); + qScriptRegisterMetaType(engine, qtscript_QDateTimeEdit_Sections_toScriptValue, + qtscript_QDateTimeEdit_Sections_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QDateTimeEdit +// + +static QScriptValue qtscript_QDateTimeEdit_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 14; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDateTimeEdit* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDateTimeEdit.%0(): this object is not a QDateTimeEdit") + .arg(qtscript_QDateTimeEdit_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QCalendarWidget* _q_result = _q_self->calendarWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->clearMaximumDate(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->clearMaximumDateTime(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->clearMaximumTime(); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + _q_self->clearMinimumDate(); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + _q_self->clearMinimumDateTime(); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 0) { + _q_self->clearMinimumTime(); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QDateTimeEdit::Section _q_result = _q_self->sectionAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QDateTimeEdit::Section _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->sectionText(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QCalendarWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCalendarWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 2) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDate _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setDateRange(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 2) { + QDateTime _q_arg0 = context->argument(0).toDateTime(); + QDateTime _q_arg1 = context->argument(1).toDateTime(); + _q_self->setDateTimeRange(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QDateTimeEdit::Section _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSelectedSection(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 2) { + QTime _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTime _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setTimeRange(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 14: { + QString result = QString::fromLatin1("QDateTimeEdit"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDateTimeEdit_throw_ambiguity_error_helper(context, + qtscript_QDateTimeEdit_function_names[_id+1], + qtscript_QDateTimeEdit_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDateTimeEdit_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDateTimeEdit(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QDateTimeEdit* _q_cpp_result = new QtScriptShell_QDateTimeEdit(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDateTimeEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QDateTimeEdit* _q_cpp_result = new QtScriptShell_QDateTimeEdit(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDateTimeEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QDateTimeEdit* _q_cpp_result = new QtScriptShell_QDateTimeEdit(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDateTimeEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QDateTime _q_arg0 = context->argument(0).toDateTime(); + QtScriptShell_QDateTimeEdit* _q_cpp_result = new QtScriptShell_QDateTimeEdit(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDateTimeEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTime _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QDateTimeEdit* _q_cpp_result = new QtScriptShell_QDateTimeEdit(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDateTimeEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QDate _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QDateTimeEdit* _q_cpp_result = new QtScriptShell_QDateTimeEdit(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDateTimeEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QDateTime _q_arg0 = context->argument(0).toDateTime(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QDateTimeEdit* _q_cpp_result = new QtScriptShell_QDateTimeEdit(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDateTimeEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QTime _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QDateTimeEdit* _q_cpp_result = new QtScriptShell_QDateTimeEdit(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDateTimeEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDateTimeEdit_throw_ambiguity_error_helper(context, + qtscript_QDateTimeEdit_function_names[_id], + qtscript_QDateTimeEdit_function_signatures[_id]); +} + +static QScriptValue qtscript_QDateTimeEdit_toScriptValue(QScriptEngine *engine, QDateTimeEdit* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QDateTimeEdit_fromScriptValue(const QScriptValue &value, QDateTimeEdit* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QDateTimeEdit_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDateTimeEdit*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 15; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDateTimeEdit_prototype_call, qtscript_QDateTimeEdit_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDateTimeEdit_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QDateTimeEdit_toScriptValue, + qtscript_QDateTimeEdit_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDateTimeEdit_static_call, proto, qtscript_QDateTimeEdit_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Section"), + qtscript_create_QDateTimeEdit_Section_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Sections"), + qtscript_create_QDateTimeEdit_Sections_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDesktopWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDesktopWidget.cpp new file mode 100644 index 00000000..115c1f79 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDesktopWidget.cpp @@ -0,0 +1,270 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QDesktopWidget.h" + +static const char * const qtscript_QDesktopWidget_function_names[] = { + "QDesktopWidget" + // static + // prototype + , "availableGeometry" + , "numScreens" + , "screen" + , "screenGeometry" + , "screenNumber" + , "toString" +}; + +static const char * const qtscript_QDesktopWidget_function_signatures[] = { + "" + // static + // prototype + , "QPoint point\nQWidget widget\nint screen" + , "" + , "int screen" + , "QPoint point\nQWidget widget\nint screen" + , "QPoint arg__1\nQWidget widget" +"" +}; + +static const int qtscript_QDesktopWidget_function_lengths[] = { + 0 + // static + // prototype + , 1 + , 0 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QDesktopWidget_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDesktopWidget::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDesktopWidget*) +Q_DECLARE_METATYPE(QtScriptShell_QDesktopWidget*) +Q_DECLARE_METATYPE(const QWidget*) +Q_DECLARE_METATYPE(QWidget*) + +// +// QDesktopWidget +// + +static QScriptValue qtscript_QDesktopWidget_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDesktopWidget* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDesktopWidget.%0(): this object is not a QDesktopWidget") + .arg(qtscript_QDesktopWidget_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + const QRect _q_result = _q_self->availableGeometry(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QRect _q_result = _q_self->availableGeometry(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0))) { + const QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QRect _q_result = _q_self->availableGeometry(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + const QRect _q_result = _q_self->availableGeometry(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->numScreens(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->screen(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_result = _q_self->screen(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + const QRect _q_result = _q_self->screenGeometry(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QRect _q_result = _q_self->screenGeometry(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0))) { + const QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QRect _q_result = _q_self->screenGeometry(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + const QRect _q_result = _q_self->screenGeometry(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->screenNumber(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->screenNumber(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0))) { + const QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->screenNumber(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 5: { + QString result = QString::fromLatin1("QDesktopWidget"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDesktopWidget_throw_ambiguity_error_helper(context, + qtscript_QDesktopWidget_function_names[_id+1], + qtscript_QDesktopWidget_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDesktopWidget_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDesktopWidget(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QDesktopWidget* _q_cpp_result = new QtScriptShell_QDesktopWidget(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDesktopWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDesktopWidget_throw_ambiguity_error_helper(context, + qtscript_QDesktopWidget_function_names[_id], + qtscript_QDesktopWidget_function_signatures[_id]); +} + +static QScriptValue qtscript_QDesktopWidget_toScriptValue(QScriptEngine *engine, QDesktopWidget* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QDesktopWidget_fromScriptValue(const QScriptValue &value, QDesktopWidget* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QDesktopWidget_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDesktopWidget*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDesktopWidget_prototype_call, qtscript_QDesktopWidget_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDesktopWidget_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QDesktopWidget_toScriptValue, + qtscript_QDesktopWidget_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDesktopWidget_static_call, proto, qtscript_QDesktopWidget_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDial.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDial.cpp new file mode 100644 index 00000000..20feb30f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDial.cpp @@ -0,0 +1,212 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QDial.h" + +static const char * const qtscript_QDial_function_names[] = { + "QDial" + // static + // prototype + , "minimumSizeHint" + , "setNotchTarget" + , "sizeHint" + , "toString" +}; + +static const char * const qtscript_QDial_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "" + , "double target" + , "" +"" +}; + +static const int qtscript_QDial_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QDial_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDial::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDial*) +Q_DECLARE_METATYPE(QtScriptShell_QDial*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractSlider*) + +// +// QDial +// + +static QScriptValue qtscript_QDial_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDial* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDial.%0(): this object is not a QDial") + .arg(qtscript_QDial_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + double _q_arg0 = context->argument(0).toNumber(); + _q_self->setNotchTarget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: { + QString result = QString::fromLatin1("QDial"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDial_throw_ambiguity_error_helper(context, + qtscript_QDial_function_names[_id+1], + qtscript_QDial_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDial_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDial(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QDial* _q_cpp_result = new QtScriptShell_QDial(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDial*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QDial* _q_cpp_result = new QtScriptShell_QDial(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDial*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDial_throw_ambiguity_error_helper(context, + qtscript_QDial_function_names[_id], + qtscript_QDial_function_signatures[_id]); +} + +static QScriptValue qtscript_QDial_toScriptValue(QScriptEngine *engine, QDial* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QDial_fromScriptValue(const QScriptValue &value, QDial* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QDial_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDial*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDial_prototype_call, qtscript_QDial_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDial_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QDial_toScriptValue, + qtscript_QDial_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDial_static_call, proto, qtscript_QDial_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDialog.cpp new file mode 100644 index 00000000..8a0d1e67 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDialog.cpp @@ -0,0 +1,323 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QDialog.h" + +static const char * const qtscript_QDialog_function_names[] = { + "QDialog" + // static + // prototype + , "minimumSizeHint" + , "result" + , "setResult" + , "setVisible" + , "sizeHint" + , "toString" +}; + +static const char * const qtscript_QDialog_function_signatures[] = { + "QWidget parent, WindowFlags f" + // static + // prototype + , "" + , "" + , "int r" + , "bool visible" + , "" +"" +}; + +static const int qtscript_QDialog_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QDialog_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDialog::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDialog*) +Q_DECLARE_METATYPE(QtScriptShell_QDialog*) +Q_DECLARE_METATYPE(QDialog::DialogCode) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFlags) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QDialog::DialogCode +// + +static const QDialog::DialogCode qtscript_QDialog_DialogCode_values[] = { + QDialog::Rejected + , QDialog::Accepted +}; + +static const char * const qtscript_QDialog_DialogCode_keys[] = { + "Rejected" + , "Accepted" +}; + +static QString qtscript_QDialog_DialogCode_toStringHelper(QDialog::DialogCode value) +{ + if ((value >= QDialog::Rejected) && (value <= QDialog::Accepted)) + return qtscript_QDialog_DialogCode_keys[static_cast(value)-static_cast(QDialog::Rejected)]; + return QString(); +} + +static QScriptValue qtscript_QDialog_DialogCode_toScriptValue(QScriptEngine *engine, const QDialog::DialogCode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QDialog")); + return clazz.property(qtscript_QDialog_DialogCode_toStringHelper(value)); +} + +static void qtscript_QDialog_DialogCode_fromScriptValue(const QScriptValue &value, QDialog::DialogCode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QDialog_DialogCode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QDialog::Rejected) && (arg <= QDialog::Accepted)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("DialogCode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QDialog_DialogCode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDialog::DialogCode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDialog_DialogCode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDialog::DialogCode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QDialog_DialogCode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QDialog_DialogCode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QDialog_DialogCode, + qtscript_QDialog_DialogCode_valueOf, qtscript_QDialog_DialogCode_toString); + qScriptRegisterMetaType(engine, qtscript_QDialog_DialogCode_toScriptValue, + qtscript_QDialog_DialogCode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QDialog_DialogCode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QDialog_DialogCode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QDialog +// + +static QScriptValue qtscript_QDialog_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDialog* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDialog.%0(): this object is not a QDialog") + .arg(qtscript_QDialog_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->result(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setResult(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setVisible(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: { + QString result = QString::fromLatin1("QDialog"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDialog_throw_ambiguity_error_helper(context, + qtscript_QDialog_function_names[_id+1], + qtscript_QDialog_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDialog_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDialog(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QDialog* _q_cpp_result = new QtScriptShell_QDialog(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QDialog* _q_cpp_result = new QtScriptShell_QDialog(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QDialog* _q_cpp_result = new QtScriptShell_QDialog(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDialog_throw_ambiguity_error_helper(context, + qtscript_QDialog_function_names[_id], + qtscript_QDialog_function_signatures[_id]); +} + +static QScriptValue qtscript_QDialog_toScriptValue(QScriptEngine *engine, QDialog* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QDialog_fromScriptValue(const QScriptValue &value, QDialog* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QDialog_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDialog*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDialog_prototype_call, qtscript_QDialog_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDialog_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QDialog_toScriptValue, + qtscript_QDialog_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDialog_static_call, proto, qtscript_QDialog_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("DialogCode"), + qtscript_create_QDialog_DialogCode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDialogButtonBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDialogButtonBox.cpp new file mode 100644 index 00000000..c736c371 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDialogButtonBox.cpp @@ -0,0 +1,703 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QDialogButtonBox.h" + +static const char * const qtscript_QDialogButtonBox_function_names[] = { + "QDialogButtonBox" + // static + // prototype + , "addButton" + , "button" + , "buttonRole" + , "buttons" + , "clear" + , "removeButton" + , "standardButton" + , "toString" +}; + +static const char * const qtscript_QDialogButtonBox_function_signatures[] = { + "StandardButtons buttons, QWidget parent\nStandardButtons buttons, Orientation orientation, QWidget parent\nQWidget parent\nOrientation orientation, QWidget parent" + // static + // prototype + , "QAbstractButton button, ButtonRole role\nStandardButton button\nString text, ButtonRole role" + , "StandardButton which" + , "QAbstractButton button" + , "" + , "" + , "QAbstractButton button" + , "QAbstractButton button" +"" +}; + +static const int qtscript_QDialogButtonBox_function_lengths[] = { + 3 + // static + // prototype + , 2 + , 1 + , 1 + , 0 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QDialogButtonBox_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDialogButtonBox::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDialogButtonBox*) +Q_DECLARE_METATYPE(QtScriptShell_QDialogButtonBox*) +Q_DECLARE_METATYPE(QDialogButtonBox::ButtonLayout) +Q_DECLARE_METATYPE(QDialogButtonBox::ButtonRole) +Q_DECLARE_METATYPE(QDialogButtonBox::StandardButton) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAbstractButton*) +Q_DECLARE_METATYPE(QPushButton*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(Qt::Orientation) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QDialogButtonBox::ButtonLayout +// + +static const QDialogButtonBox::ButtonLayout qtscript_QDialogButtonBox_ButtonLayout_values[] = { + QDialogButtonBox::WinLayout + , QDialogButtonBox::MacLayout + , QDialogButtonBox::KdeLayout + , QDialogButtonBox::GnomeLayout +}; + +static const char * const qtscript_QDialogButtonBox_ButtonLayout_keys[] = { + "WinLayout" + , "MacLayout" + , "KdeLayout" + , "GnomeLayout" +}; + +static QString qtscript_QDialogButtonBox_ButtonLayout_toStringHelper(QDialogButtonBox::ButtonLayout value) +{ + if ((value >= QDialogButtonBox::WinLayout) && (value <= QDialogButtonBox::GnomeLayout)) + return qtscript_QDialogButtonBox_ButtonLayout_keys[static_cast(value)-static_cast(QDialogButtonBox::WinLayout)]; + return QString(); +} + +static QScriptValue qtscript_QDialogButtonBox_ButtonLayout_toScriptValue(QScriptEngine *engine, const QDialogButtonBox::ButtonLayout &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QDialogButtonBox")); + return clazz.property(qtscript_QDialogButtonBox_ButtonLayout_toStringHelper(value)); +} + +static void qtscript_QDialogButtonBox_ButtonLayout_fromScriptValue(const QScriptValue &value, QDialogButtonBox::ButtonLayout &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QDialogButtonBox_ButtonLayout(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QDialogButtonBox::WinLayout) && (arg <= QDialogButtonBox::GnomeLayout)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ButtonLayout(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QDialogButtonBox_ButtonLayout_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDialogButtonBox::ButtonLayout value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDialogButtonBox_ButtonLayout_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDialogButtonBox::ButtonLayout value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QDialogButtonBox_ButtonLayout_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QDialogButtonBox_ButtonLayout_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QDialogButtonBox_ButtonLayout, + qtscript_QDialogButtonBox_ButtonLayout_valueOf, qtscript_QDialogButtonBox_ButtonLayout_toString); + qScriptRegisterMetaType(engine, qtscript_QDialogButtonBox_ButtonLayout_toScriptValue, + qtscript_QDialogButtonBox_ButtonLayout_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QDialogButtonBox_ButtonLayout_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QDialogButtonBox_ButtonLayout_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QDialogButtonBox::ButtonRole +// + +static const QDialogButtonBox::ButtonRole qtscript_QDialogButtonBox_ButtonRole_values[] = { + QDialogButtonBox::InvalidRole + , QDialogButtonBox::AcceptRole + , QDialogButtonBox::RejectRole + , QDialogButtonBox::DestructiveRole + , QDialogButtonBox::ActionRole + , QDialogButtonBox::HelpRole + , QDialogButtonBox::YesRole + , QDialogButtonBox::NoRole + , QDialogButtonBox::ResetRole + , QDialogButtonBox::ApplyRole + , QDialogButtonBox::NRoles +}; + +static const char * const qtscript_QDialogButtonBox_ButtonRole_keys[] = { + "InvalidRole" + , "AcceptRole" + , "RejectRole" + , "DestructiveRole" + , "ActionRole" + , "HelpRole" + , "YesRole" + , "NoRole" + , "ResetRole" + , "ApplyRole" + , "NRoles" +}; + +static QString qtscript_QDialogButtonBox_ButtonRole_toStringHelper(QDialogButtonBox::ButtonRole value) +{ + if ((value >= QDialogButtonBox::InvalidRole) && (value <= QDialogButtonBox::NRoles)) + return qtscript_QDialogButtonBox_ButtonRole_keys[static_cast(value)-static_cast(QDialogButtonBox::InvalidRole)]; + return QString(); +} + +static QScriptValue qtscript_QDialogButtonBox_ButtonRole_toScriptValue(QScriptEngine *engine, const QDialogButtonBox::ButtonRole &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QDialogButtonBox")); + return clazz.property(qtscript_QDialogButtonBox_ButtonRole_toStringHelper(value)); +} + +static void qtscript_QDialogButtonBox_ButtonRole_fromScriptValue(const QScriptValue &value, QDialogButtonBox::ButtonRole &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QDialogButtonBox_ButtonRole(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QDialogButtonBox::InvalidRole) && (arg <= QDialogButtonBox::NRoles)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ButtonRole(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QDialogButtonBox_ButtonRole_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDialogButtonBox::ButtonRole value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDialogButtonBox_ButtonRole_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDialogButtonBox::ButtonRole value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QDialogButtonBox_ButtonRole_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QDialogButtonBox_ButtonRole_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QDialogButtonBox_ButtonRole, + qtscript_QDialogButtonBox_ButtonRole_valueOf, qtscript_QDialogButtonBox_ButtonRole_toString); + qScriptRegisterMetaType(engine, qtscript_QDialogButtonBox_ButtonRole_toScriptValue, + qtscript_QDialogButtonBox_ButtonRole_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 11; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QDialogButtonBox_ButtonRole_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QDialogButtonBox_ButtonRole_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QDialogButtonBox::StandardButton +// + +static const QDialogButtonBox::StandardButton qtscript_QDialogButtonBox_StandardButton_values[] = { + QDialogButtonBox::NoButton + , QDialogButtonBox::Ok + , QDialogButtonBox::Save + , QDialogButtonBox::SaveAll + , QDialogButtonBox::Open + , QDialogButtonBox::Yes + , QDialogButtonBox::YesToAll + , QDialogButtonBox::No + , QDialogButtonBox::NoToAll + , QDialogButtonBox::Abort + , QDialogButtonBox::Retry + , QDialogButtonBox::Ignore + , QDialogButtonBox::Close + , QDialogButtonBox::Cancel + , QDialogButtonBox::Discard + , QDialogButtonBox::Help + , QDialogButtonBox::Apply + , QDialogButtonBox::Reset + , QDialogButtonBox::RestoreDefaults +}; + +static const char * const qtscript_QDialogButtonBox_StandardButton_keys[] = { + "NoButton" + , "Ok" + , "Save" + , "SaveAll" + , "Open" + , "Yes" + , "YesToAll" + , "No" + , "NoToAll" + , "Abort" + , "Retry" + , "Ignore" + , "Close" + , "Cancel" + , "Discard" + , "Help" + , "Apply" + , "Reset" + , "RestoreDefaults" +}; + +static QString qtscript_QDialogButtonBox_StandardButton_toStringHelper(QDialogButtonBox::StandardButton value) +{ + for (int i = 0; i < 19; ++i) { + if (qtscript_QDialogButtonBox_StandardButton_values[i] == value) + return QString::fromLatin1(qtscript_QDialogButtonBox_StandardButton_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QDialogButtonBox_StandardButton_toScriptValue(QScriptEngine *engine, const QDialogButtonBox::StandardButton &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QDialogButtonBox")); + return clazz.property(qtscript_QDialogButtonBox_StandardButton_toStringHelper(value)); +} + +static void qtscript_QDialogButtonBox_StandardButton_fromScriptValue(const QScriptValue &value, QDialogButtonBox::StandardButton &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QDialogButtonBox_StandardButton(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 19; ++i) { + if (qtscript_QDialogButtonBox_StandardButton_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("StandardButton(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QDialogButtonBox_StandardButton_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDialogButtonBox::StandardButton value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDialogButtonBox_StandardButton_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDialogButtonBox::StandardButton value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QDialogButtonBox_StandardButton_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QDialogButtonBox_StandardButton_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QDialogButtonBox_StandardButton, + qtscript_QDialogButtonBox_StandardButton_valueOf, qtscript_QDialogButtonBox_StandardButton_toString); + qScriptRegisterMetaType(engine, qtscript_QDialogButtonBox_StandardButton_toScriptValue, + qtscript_QDialogButtonBox_StandardButton_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 19; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QDialogButtonBox_StandardButton_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QDialogButtonBox_StandardButton_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QDialogButtonBox::StandardButtons +// + +static QScriptValue qtscript_QDialogButtonBox_StandardButtons_toScriptValue(QScriptEngine *engine, const QDialogButtonBox::StandardButtons &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QDialogButtonBox_StandardButtons_fromScriptValue(const QScriptValue &value, QDialogButtonBox::StandardButtons &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QDialogButtonBox_StandardButtons(QScriptContext *context, QScriptEngine *engine) +{ + QDialogButtonBox::StandardButtons result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("StandardButtons(): argument %0 is not of type StandardButton").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QDialogButtonBox_StandardButtons_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDialogButtonBox::StandardButtons value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDialogButtonBox_StandardButtons_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDialogButtonBox::StandardButtons value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 19; ++i) { + if ((value & qtscript_QDialogButtonBox_StandardButton_values[i]) == qtscript_QDialogButtonBox_StandardButton_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QDialogButtonBox_StandardButton_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QDialogButtonBox_StandardButtons_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QDialogButtonBox_StandardButtons_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QDialogButtonBox_StandardButtons, qtscript_QDialogButtonBox_StandardButtons_valueOf, + qtscript_QDialogButtonBox_StandardButtons_toString, qtscript_QDialogButtonBox_StandardButtons_equals); + qScriptRegisterMetaType(engine, qtscript_QDialogButtonBox_StandardButtons_toScriptValue, + qtscript_QDialogButtonBox_StandardButtons_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QDialogButtonBox +// + +static QScriptValue qtscript_QDialogButtonBox_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 7; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDialogButtonBox* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDialogButtonBox.%0(): this object is not a QDialogButtonBox") + .arg(qtscript_QDialogButtonBox_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QDialogButtonBox::StandardButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPushButton* _q_result = _q_self->addButton(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QAbstractButton* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDialogButtonBox::ButtonRole _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->addButton(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QDialogButtonBox::ButtonRole _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPushButton* _q_result = _q_self->addButton(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + QDialogButtonBox::StandardButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPushButton* _q_result = _q_self->button(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QAbstractButton* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDialogButtonBox::ButtonRole _q_result = _q_self->buttonRole(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->buttons(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QAbstractButton* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeButton(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QAbstractButton* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDialogButtonBox::StandardButton _q_result = _q_self->standardButton(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: { + QString result = QString::fromLatin1("QDialogButtonBox"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDialogButtonBox_throw_ambiguity_error_helper(context, + qtscript_QDialogButtonBox_function_names[_id+1], + qtscript_QDialogButtonBox_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDialogButtonBox_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDialogButtonBox(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QDialogButtonBox* _q_cpp_result = new QtScriptShell_QDialogButtonBox(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDialogButtonBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId >() == context->argument(0).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QtScriptShell_QDialogButtonBox* _q_cpp_result = new QtScriptShell_QDialogButtonBox(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDialogButtonBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QDialogButtonBox* _q_cpp_result = new QtScriptShell_QDialogButtonBox(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDialogButtonBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QDialogButtonBox* _q_cpp_result = new QtScriptShell_QDialogButtonBox(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDialogButtonBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId >() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QDialogButtonBox* _q_cpp_result = new QtScriptShell_QDialogButtonBox(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDialogButtonBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId >() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + Qt::Orientation _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QDialogButtonBox* _q_cpp_result = new QtScriptShell_QDialogButtonBox(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDialogButtonBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QDialogButtonBox* _q_cpp_result = new QtScriptShell_QDialogButtonBox(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDialogButtonBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + Qt::Orientation _q_arg1 = qscriptvalue_cast(context->argument(1)); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QDialogButtonBox* _q_cpp_result = new QtScriptShell_QDialogButtonBox(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDialogButtonBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDialogButtonBox_throw_ambiguity_error_helper(context, + qtscript_QDialogButtonBox_function_names[_id], + qtscript_QDialogButtonBox_function_signatures[_id]); +} + +static QScriptValue qtscript_QDialogButtonBox_toScriptValue(QScriptEngine *engine, QDialogButtonBox* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QDialogButtonBox_fromScriptValue(const QScriptValue &value, QDialogButtonBox* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QDialogButtonBox_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDialogButtonBox*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDialogButtonBox_prototype_call, qtscript_QDialogButtonBox_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDialogButtonBox_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QDialogButtonBox_toScriptValue, + qtscript_QDialogButtonBox_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDialogButtonBox_static_call, proto, qtscript_QDialogButtonBox_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ButtonLayout"), + qtscript_create_QDialogButtonBox_ButtonLayout_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ButtonRole"), + qtscript_create_QDialogButtonBox_ButtonRole_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StandardButton"), + qtscript_create_QDialogButtonBox_StandardButton_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StandardButtons"), + qtscript_create_QDialogButtonBox_StandardButtons_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDockWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDockWidget.cpp new file mode 100644 index 00000000..6b0ada5e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDockWidget.cpp @@ -0,0 +1,498 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QDockWidget.h" + +static const char * const qtscript_QDockWidget_function_names[] = { + "QDockWidget" + // static + // prototype + , "allowedAreas" + , "isAreaAllowed" + , "setAllowedAreas" + , "setTitleBarWidget" + , "setWidget" + , "titleBarWidget" + , "toggleViewAction" + , "widget" + , "toString" +}; + +static const char * const qtscript_QDockWidget_function_signatures[] = { + "QWidget parent, WindowFlags flags\nString title, QWidget parent, WindowFlags flags" + // static + // prototype + , "" + , "DockWidgetArea area" + , "DockWidgetAreas areas" + , "QWidget widget" + , "QWidget widget" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QDockWidget_function_lengths[] = { + 3 + // static + // prototype + , 0 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QDockWidget_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDockWidget::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDockWidget*) +Q_DECLARE_METATYPE(QtScriptShell_QDockWidget*) +Q_DECLARE_METATYPE(QDockWidget::DockWidgetFeature) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::DockWidgetArea) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAction*) +Q_DECLARE_METATYPE(QFlags) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QDockWidget::DockWidgetFeature +// + +static const QDockWidget::DockWidgetFeature qtscript_QDockWidget_DockWidgetFeature_values[] = { + QDockWidget::NoDockWidgetFeatures + , QDockWidget::DockWidgetClosable + , QDockWidget::DockWidgetMovable + , QDockWidget::DockWidgetFloatable + , QDockWidget::AllDockWidgetFeatures + , QDockWidget::DockWidgetVerticalTitleBar + , QDockWidget::DockWidgetFeatureMask + , QDockWidget::Reserved +}; + +static const char * const qtscript_QDockWidget_DockWidgetFeature_keys[] = { + "NoDockWidgetFeatures" + , "DockWidgetClosable" + , "DockWidgetMovable" + , "DockWidgetFloatable" + , "AllDockWidgetFeatures" + , "DockWidgetVerticalTitleBar" + , "DockWidgetFeatureMask" + , "Reserved" +}; + +static QString qtscript_QDockWidget_DockWidgetFeature_toStringHelper(QDockWidget::DockWidgetFeature value) +{ + for (int i = 0; i < 8; ++i) { + if (qtscript_QDockWidget_DockWidgetFeature_values[i] == value) + return QString::fromLatin1(qtscript_QDockWidget_DockWidgetFeature_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QDockWidget_DockWidgetFeature_toScriptValue(QScriptEngine *engine, const QDockWidget::DockWidgetFeature &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QDockWidget")); + return clazz.property(qtscript_QDockWidget_DockWidgetFeature_toStringHelper(value)); +} + +static void qtscript_QDockWidget_DockWidgetFeature_fromScriptValue(const QScriptValue &value, QDockWidget::DockWidgetFeature &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QDockWidget_DockWidgetFeature(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 8; ++i) { + if (qtscript_QDockWidget_DockWidgetFeature_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("DockWidgetFeature(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QDockWidget_DockWidgetFeature_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDockWidget::DockWidgetFeature value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDockWidget_DockWidgetFeature_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDockWidget::DockWidgetFeature value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QDockWidget_DockWidgetFeature_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QDockWidget_DockWidgetFeature_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QDockWidget_DockWidgetFeature, + qtscript_QDockWidget_DockWidgetFeature_valueOf, qtscript_QDockWidget_DockWidgetFeature_toString); + qScriptRegisterMetaType(engine, qtscript_QDockWidget_DockWidgetFeature_toScriptValue, + qtscript_QDockWidget_DockWidgetFeature_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 8; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QDockWidget_DockWidgetFeature_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QDockWidget_DockWidgetFeature_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QDockWidget::DockWidgetFeatures +// + +static QScriptValue qtscript_QDockWidget_DockWidgetFeatures_toScriptValue(QScriptEngine *engine, const QDockWidget::DockWidgetFeatures &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QDockWidget_DockWidgetFeatures_fromScriptValue(const QScriptValue &value, QDockWidget::DockWidgetFeatures &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QDockWidget_DockWidgetFeatures(QScriptContext *context, QScriptEngine *engine) +{ + QDockWidget::DockWidgetFeatures result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("DockWidgetFeatures(): argument %0 is not of type DockWidgetFeature").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QDockWidget_DockWidgetFeatures_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDockWidget::DockWidgetFeatures value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDockWidget_DockWidgetFeatures_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDockWidget::DockWidgetFeatures value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 8; ++i) { + if ((value & qtscript_QDockWidget_DockWidgetFeature_values[i]) == qtscript_QDockWidget_DockWidgetFeature_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QDockWidget_DockWidgetFeature_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QDockWidget_DockWidgetFeatures_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QDockWidget_DockWidgetFeatures_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QDockWidget_DockWidgetFeatures, qtscript_QDockWidget_DockWidgetFeatures_valueOf, + qtscript_QDockWidget_DockWidgetFeatures_toString, qtscript_QDockWidget_DockWidgetFeatures_equals); + qScriptRegisterMetaType(engine, qtscript_QDockWidget_DockWidgetFeatures_toScriptValue, + qtscript_QDockWidget_DockWidgetFeatures_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QDockWidget +// + +static QScriptValue qtscript_QDockWidget_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDockWidget* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDockWidget.%0(): this object is not a QDockWidget") + .arg(qtscript_QDockWidget_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->allowedAreas(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + Qt::DockWidgetArea _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isAreaAllowed(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setAllowedAreas(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTitleBarWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->titleBarWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QAction* _q_result = _q_self->toggleViewAction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->widget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: { + QString result = QString::fromLatin1("QDockWidget"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDockWidget_throw_ambiguity_error_helper(context, + qtscript_QDockWidget_function_names[_id+1], + qtscript_QDockWidget_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDockWidget_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDockWidget(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QDockWidget* _q_cpp_result = new QtScriptShell_QDockWidget(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDockWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QDockWidget* _q_cpp_result = new QtScriptShell_QDockWidget(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDockWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QDockWidget* _q_cpp_result = new QtScriptShell_QDockWidget(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDockWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QDockWidget* _q_cpp_result = new QtScriptShell_QDockWidget(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDockWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1))) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QDockWidget* _q_cpp_result = new QtScriptShell_QDockWidget(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDockWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QtScriptShell_QDockWidget* _q_cpp_result = new QtScriptShell_QDockWidget(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDockWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDockWidget_throw_ambiguity_error_helper(context, + qtscript_QDockWidget_function_names[_id], + qtscript_QDockWidget_function_signatures[_id]); +} + +static QScriptValue qtscript_QDockWidget_toScriptValue(QScriptEngine *engine, QDockWidget* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QDockWidget_fromScriptValue(const QScriptValue &value, QDockWidget* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QDockWidget_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDockWidget*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDockWidget_prototype_call, qtscript_QDockWidget_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDockWidget_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QDockWidget_toScriptValue, + qtscript_QDockWidget_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDockWidget_static_call, proto, qtscript_QDockWidget_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("DockWidgetFeature"), + qtscript_create_QDockWidget_DockWidgetFeature_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("DockWidgetFeatures"), + qtscript_create_QDockWidget_DockWidgetFeatures_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDoubleSpinBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDoubleSpinBox.cpp new file mode 100644 index 00000000..a177e574 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QDoubleSpinBox.cpp @@ -0,0 +1,216 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QDoubleSpinBox.h" + +static const char * const qtscript_QDoubleSpinBox_function_names[] = { + "QDoubleSpinBox" + // static + // prototype + , "setRange" + , "textFromValue" + , "valueFromText" + , "toString" +}; + +static const char * const qtscript_QDoubleSpinBox_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "double min, double max" + , "double val" + , "String text" +"" +}; + +static const int qtscript_QDoubleSpinBox_function_lengths[] = { + 1 + // static + // prototype + , 2 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QDoubleSpinBox_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDoubleSpinBox::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDoubleSpinBox*) +Q_DECLARE_METATYPE(QtScriptShell_QDoubleSpinBox*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractSpinBox*) + +// +// QDoubleSpinBox +// + +static QScriptValue qtscript_QDoubleSpinBox_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDoubleSpinBox* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDoubleSpinBox.%0(): this object is not a QDoubleSpinBox") + .arg(qtscript_QDoubleSpinBox_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + double _q_arg0 = context->argument(0).toNumber(); + double _q_arg1 = context->argument(1).toNumber(); + _q_self->setRange(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + double _q_arg0 = context->argument(0).toNumber(); + QString _q_result = _q_self->textFromValue(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + double _q_result = _q_self->valueFromText(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: { + QString result = QString::fromLatin1("QDoubleSpinBox"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDoubleSpinBox_throw_ambiguity_error_helper(context, + qtscript_QDoubleSpinBox_function_names[_id+1], + qtscript_QDoubleSpinBox_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDoubleSpinBox_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDoubleSpinBox(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QDoubleSpinBox* _q_cpp_result = new QtScriptShell_QDoubleSpinBox(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDoubleSpinBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QDoubleSpinBox* _q_cpp_result = new QtScriptShell_QDoubleSpinBox(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QDoubleSpinBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDoubleSpinBox_throw_ambiguity_error_helper(context, + qtscript_QDoubleSpinBox_function_names[_id], + qtscript_QDoubleSpinBox_function_signatures[_id]); +} + +static QScriptValue qtscript_QDoubleSpinBox_toScriptValue(QScriptEngine *engine, QDoubleSpinBox* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QDoubleSpinBox_fromScriptValue(const QScriptValue &value, QDoubleSpinBox* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QDoubleSpinBox_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDoubleSpinBox*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDoubleSpinBox_prototype_call, qtscript_QDoubleSpinBox_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDoubleSpinBox_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QDoubleSpinBox_toScriptValue, + qtscript_QDoubleSpinBox_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDoubleSpinBox_static_call, proto, qtscript_QDoubleSpinBox_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QErrorMessage.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QErrorMessage.cpp new file mode 100644 index 00000000..1b25035c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QErrorMessage.cpp @@ -0,0 +1,191 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QErrorMessage.h" + +static const char * const qtscript_QErrorMessage_function_names[] = { + "QErrorMessage" + // static + , "qtHandler" + // prototype + , "toString" +}; + +static const char * const qtscript_QErrorMessage_function_signatures[] = { + "QWidget parent" + // static + , "" + // prototype +"" +}; + +static const int qtscript_QErrorMessage_function_lengths[] = { + 1 + // static + , 0 + // prototype + , 0 +}; + +static QScriptValue qtscript_QErrorMessage_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QErrorMessage::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QErrorMessage*) +Q_DECLARE_METATYPE(QtScriptShell_QErrorMessage*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QDialog*) + +// +// QErrorMessage +// + +static QScriptValue qtscript_QErrorMessage_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QErrorMessage* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QErrorMessage.%0(): this object is not a QErrorMessage") + .arg(qtscript_QErrorMessage_function_names[_id+2])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QErrorMessage"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QErrorMessage_throw_ambiguity_error_helper(context, + qtscript_QErrorMessage_function_names[_id+2], + qtscript_QErrorMessage_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QErrorMessage_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QErrorMessage(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QErrorMessage* _q_cpp_result = new QtScriptShell_QErrorMessage(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QErrorMessage*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QErrorMessage* _q_cpp_result = new QtScriptShell_QErrorMessage(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QErrorMessage*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QErrorMessage* _q_result = QErrorMessage::qtHandler(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QErrorMessage_throw_ambiguity_error_helper(context, + qtscript_QErrorMessage_function_names[_id], + qtscript_QErrorMessage_function_signatures[_id]); +} + +static QScriptValue qtscript_QErrorMessage_toScriptValue(QScriptEngine *engine, QErrorMessage* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QErrorMessage_fromScriptValue(const QScriptValue &value, QErrorMessage* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QErrorMessage_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QErrorMessage*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QErrorMessage_toScriptValue, + qtscript_QErrorMessage_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QErrorMessage_static_call, proto, qtscript_QErrorMessage_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QErrorMessage_static_call, + qtscript_QErrorMessage_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QErrorMessage_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFileDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFileDialog.cpp new file mode 100644 index 00000000..f3cc8a72 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFileDialog.cpp @@ -0,0 +1,1186 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QFileDialog.h" + +static const char * const qtscript_QFileDialog_function_names[] = { + "QFileDialog" + // static + , "getExistingDirectory" + , "getExistingDirectoryUrl" + , "getOpenFileName" + , "getOpenFileNames" + , "getOpenFileUrl" + , "getOpenFileUrls" + , "getSaveFileName" + , "getSaveFileUrl" + // prototype + , "directory" + , "directoryUrl" + , "filter" + , "history" + , "iconProvider" + , "isNameFilterDetailsVisible" + , "itemDelegate" + , "labelText" + , "mimeTypeFilters" + , "nameFilters" + , "open" + , "proxyModel" + , "restoreState" + , "saveState" + , "selectFile" + , "selectMimeTypeFilter" + , "selectNameFilter" + , "selectUrl" + , "selectedFiles" + , "selectedNameFilter" + , "selectedUrls" + , "setDirectory" + , "setDirectoryUrl" + , "setFilter" + , "setHistory" + , "setIconProvider" + , "setItemDelegate" + , "setLabelText" + , "setMimeTypeFilters" + , "setNameFilter" + , "setNameFilterDetailsVisible" + , "setNameFilters" + , "setOption" + , "setProxyModel" + , "setSidebarUrls" + , "sidebarUrls" + , "testOption" + , "toString" +}; + +static const char * const qtscript_QFileDialog_function_signatures[] = { + "QWidget parent, WindowFlags f\nQWidget parent, String caption, String directory, String filter" + // static + , "QWidget parent, String caption, String dir, Options options" + , "QWidget parent, String caption, QUrl dir, Options options, List supportedSchemes" + , "QWidget parent, String caption, String dir, String filter, String selectedFilter, Options options" + , "QWidget parent, String caption, String dir, String filter, String selectedFilter, Options options" + , "QWidget parent, String caption, QUrl dir, String filter, String selectedFilter, Options options, List supportedSchemes" + , "QWidget parent, String caption, QUrl dir, String filter, String selectedFilter, Options options, List supportedSchemes" + , "QWidget parent, String caption, String dir, String filter, String selectedFilter, Options options" + , "QWidget parent, String caption, QUrl dir, String filter, String selectedFilter, Options options, List supportedSchemes" + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "DialogLabel label" + , "" + , "" + , "QObject receiver, char member" + , "" + , "QByteArray state" + , "" + , "String filename" + , "String filter" + , "String filter" + , "QUrl url" + , "" + , "" + , "" + , "QDir directory\nString directory" + , "QUrl directory" + , "Filters filters" + , "List paths" + , "QFileIconProvider provider" + , "QAbstractItemDelegate delegate" + , "DialogLabel label, String text" + , "List filters" + , "String filter" + , "bool enabled" + , "List filters" + , "Option option, bool on" + , "QAbstractProxyModel model" + , "List urls" + , "" + , "Option option" +"" +}; + +static const int qtscript_QFileDialog_function_lengths[] = { + 4 + // static + , 4 + , 5 + , 6 + , 6 + , 7 + , 7 + , 6 + , 7 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 2 + , 0 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QFileDialog_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFileDialog::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFileDialog*) +Q_DECLARE_METATYPE(QtScriptShell_QFileDialog*) +Q_DECLARE_METATYPE(QFileDialog::Option) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFileDialog::ViewMode) +Q_DECLARE_METATYPE(QDir) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFileIconProvider*) +Q_DECLARE_METATYPE(QAbstractItemDelegate*) +Q_DECLARE_METATYPE(QFileDialog::DialogLabel) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(QAbstractProxyModel*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QString*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QDialog*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QFileDialog::Option +// + +static const QFileDialog::Option qtscript_QFileDialog_Option_values[] = { + QFileDialog::ShowDirsOnly + , QFileDialog::DontResolveSymlinks + , QFileDialog::DontConfirmOverwrite + , QFileDialog::DontUseSheet + , QFileDialog::DontUseNativeDialog + , QFileDialog::ReadOnly + , QFileDialog::HideNameFilterDetails + , QFileDialog::DontUseCustomDirectoryIcons +}; + +static const char * const qtscript_QFileDialog_Option_keys[] = { + "ShowDirsOnly" + , "DontResolveSymlinks" + , "DontConfirmOverwrite" + , "DontUseSheet" + , "DontUseNativeDialog" + , "ReadOnly" + , "HideNameFilterDetails" + , "DontUseCustomDirectoryIcons" +}; + +static QString qtscript_QFileDialog_Option_toStringHelper(QFileDialog::Option value) +{ + for (int i = 0; i < 8; ++i) { + if (qtscript_QFileDialog_Option_values[i] == value) + return QString::fromLatin1(qtscript_QFileDialog_Option_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QFileDialog_Option_toScriptValue(QScriptEngine *engine, const QFileDialog::Option &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFileDialog")); + return clazz.property(qtscript_QFileDialog_Option_toStringHelper(value)); +} + +static void qtscript_QFileDialog_Option_fromScriptValue(const QScriptValue &value, QFileDialog::Option &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFileDialog_Option(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 8; ++i) { + if (qtscript_QFileDialog_Option_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Option(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFileDialog_Option_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFileDialog::Option value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFileDialog_Option_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFileDialog::Option value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFileDialog_Option_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFileDialog_Option_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFileDialog_Option, + qtscript_QFileDialog_Option_valueOf, qtscript_QFileDialog_Option_toString); + qScriptRegisterMetaType(engine, qtscript_QFileDialog_Option_toScriptValue, + qtscript_QFileDialog_Option_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 8; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFileDialog_Option_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFileDialog_Option_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFileDialog::Options +// + +static QScriptValue qtscript_QFileDialog_Options_toScriptValue(QScriptEngine *engine, const QFileDialog::Options &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QFileDialog_Options_fromScriptValue(const QScriptValue &value, QFileDialog::Options &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QFileDialog_Options(QScriptContext *context, QScriptEngine *engine) +{ + QFileDialog::Options result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("Options(): argument %0 is not of type Option").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QFileDialog_Options_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFileDialog::Options value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFileDialog_Options_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFileDialog::Options value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 8; ++i) { + if ((value & qtscript_QFileDialog_Option_values[i]) == qtscript_QFileDialog_Option_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QFileDialog_Option_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QFileDialog_Options_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QFileDialog_Options_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QFileDialog_Options, qtscript_QFileDialog_Options_valueOf, + qtscript_QFileDialog_Options_toString, qtscript_QFileDialog_Options_equals); + qScriptRegisterMetaType(engine, qtscript_QFileDialog_Options_toScriptValue, + qtscript_QFileDialog_Options_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QFileDialog::ViewMode +// + +static const QFileDialog::ViewMode qtscript_QFileDialog_ViewMode_values[] = { + QFileDialog::Detail + , QFileDialog::List +}; + +static const char * const qtscript_QFileDialog_ViewMode_keys[] = { + "Detail" + , "List" +}; + +static QString qtscript_QFileDialog_ViewMode_toStringHelper(QFileDialog::ViewMode value) +{ + if ((value >= QFileDialog::Detail) && (value <= QFileDialog::List)) + return qtscript_QFileDialog_ViewMode_keys[static_cast(value)-static_cast(QFileDialog::Detail)]; + return QString(); +} + +static QScriptValue qtscript_QFileDialog_ViewMode_toScriptValue(QScriptEngine *engine, const QFileDialog::ViewMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFileDialog")); + return clazz.property(qtscript_QFileDialog_ViewMode_toStringHelper(value)); +} + +static void qtscript_QFileDialog_ViewMode_fromScriptValue(const QScriptValue &value, QFileDialog::ViewMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFileDialog_ViewMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QFileDialog::Detail) && (arg <= QFileDialog::List)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ViewMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFileDialog_ViewMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFileDialog::ViewMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFileDialog_ViewMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFileDialog::ViewMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFileDialog_ViewMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFileDialog_ViewMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFileDialog_ViewMode, + qtscript_QFileDialog_ViewMode_valueOf, qtscript_QFileDialog_ViewMode_toString); + qScriptRegisterMetaType(engine, qtscript_QFileDialog_ViewMode_toScriptValue, + qtscript_QFileDialog_ViewMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFileDialog_ViewMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFileDialog_ViewMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFileDialog +// + +static QScriptValue qtscript_QFileDialog_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 37; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFileDialog* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFileDialog.%0(): this object is not a QFileDialog") + .arg(qtscript_QFileDialog_function_names[_id+9])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QDir _q_result = _q_self->directory(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QUrl _q_result = _q_self->directoryUrl(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->filter(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->history(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QFileIconProvider* _q_result = _q_self->iconProvider(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNameFilterDetailsVisible(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QAbstractItemDelegate* _q_result = _q_self->itemDelegate(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QFileDialog::DialogLabel _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->labelText(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->mimeTypeFilters(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->nameFilters(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->open(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QAbstractProxyModel* _q_result = _q_self->proxyModel(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->restoreState(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->saveState(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->selectFile(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->selectMimeTypeFilter(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->selectNameFilter(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->selectUrl(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->selectedFiles(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->selectedNameFilter(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->selectedUrls(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QDir _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDirectory(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setDirectory(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 22: + if (context->argumentCount() == 1) { + QUrl _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDirectoryUrl(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setFilter(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setHistory(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QFileIconProvider* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setIconProvider(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QAbstractItemDelegate* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setItemDelegate(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 2) { + QFileDialog::DialogLabel _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setLabelText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setMimeTypeFilters(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setNameFilter(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setNameFilterDetailsVisible(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setNameFilters(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + QFileDialog::Option _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOption(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QFileDialog::Option _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setOption(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 1) { + QAbstractProxyModel* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setProxyModel(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setSidebarUrls(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->sidebarUrls(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 36: + if (context->argumentCount() == 1) { + QFileDialog::Option _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->testOption(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 37: { + QString result = QString::fromLatin1("QFileDialog"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFileDialog_throw_ambiguity_error_helper(context, + qtscript_QFileDialog_function_names[_id+9], + qtscript_QFileDialog_function_signatures[_id+9]); +} + +static QScriptValue qtscript_QFileDialog_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFileDialog(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QFileDialog* _q_cpp_result = new QtScriptShell_QFileDialog(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFileDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QFileDialog* _q_cpp_result = new QtScriptShell_QFileDialog(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFileDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QFileDialog* _q_cpp_result = new QtScriptShell_QFileDialog(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFileDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString()) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QtScriptShell_QFileDialog* _q_cpp_result = new QtScriptShell_QFileDialog(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFileDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QtScriptShell_QFileDialog* _q_cpp_result = new QtScriptShell_QFileDialog(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFileDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 4) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + QtScriptShell_QFileDialog* _q_cpp_result = new QtScriptShell_QFileDialog(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFileDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = QFileDialog::getExistingDirectory(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = QFileDialog::getExistingDirectory(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = QFileDialog::getExistingDirectory(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_result = QFileDialog::getExistingDirectory(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QString _q_result = QFileDialog::getExistingDirectory(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 5) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QUrl _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QStringList _q_arg4; + qScriptValueToSequence(context->argument(4), _q_arg4); + QUrl _q_result = QFileDialog::getExistingDirectoryUrl(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = QFileDialog::getOpenFileName(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = QFileDialog::getOpenFileName(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = QFileDialog::getOpenFileName(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_result = QFileDialog::getOpenFileName(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + QString _q_result = QFileDialog::getOpenFileName(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + QString* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QString _q_result = QFileDialog::getOpenFileName(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 6) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + QString* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + QString _q_result = QFileDialog::getOpenFileName(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QStringList _q_result = QFileDialog::getOpenFileNames(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStringList _q_result = QFileDialog::getOpenFileNames(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QStringList _q_result = QFileDialog::getOpenFileNames(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QStringList _q_result = QFileDialog::getOpenFileNames(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + QStringList _q_result = QFileDialog::getOpenFileNames(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + QString* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QStringList _q_result = QFileDialog::getOpenFileNames(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 6) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + QString* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + QStringList _q_result = QFileDialog::getOpenFileNames(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 7) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QUrl _q_arg2 = qscriptvalue_cast(context->argument(2)); + QString _q_arg3 = context->argument(3).toString(); + QString* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + QStringList _q_arg6; + qScriptValueToSequence(context->argument(6), _q_arg6); + QUrl _q_result = QFileDialog::getOpenFileUrl(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 7) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QUrl _q_arg2 = qscriptvalue_cast(context->argument(2)); + QString _q_arg3 = context->argument(3).toString(); + QString* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + QStringList _q_arg6; + qScriptValueToSequence(context->argument(6), _q_arg6); + QList _q_result = QFileDialog::getOpenFileUrls(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QString _q_result = QFileDialog::getSaveFileName(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = QFileDialog::getSaveFileName(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = QFileDialog::getSaveFileName(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_result = QFileDialog::getSaveFileName(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + QString _q_result = QFileDialog::getSaveFileName(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + QString* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QString _q_result = QFileDialog::getSaveFileName(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 6) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + QString* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + QString _q_result = QFileDialog::getSaveFileName(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 7) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QUrl _q_arg2 = qscriptvalue_cast(context->argument(2)); + QString _q_arg3 = context->argument(3).toString(); + QString* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + QStringList _q_arg6; + qScriptValueToSequence(context->argument(6), _q_arg6); + QUrl _q_result = QFileDialog::getSaveFileUrl(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFileDialog_throw_ambiguity_error_helper(context, + qtscript_QFileDialog_function_names[_id], + qtscript_QFileDialog_function_signatures[_id]); +} + +static QScriptValue qtscript_QFileDialog_toScriptValue(QScriptEngine *engine, QFileDialog* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QFileDialog_fromScriptValue(const QScriptValue &value, QFileDialog* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QFileDialog_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFileDialog*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 38; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFileDialog_prototype_call, qtscript_QFileDialog_function_lengths[i+9]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFileDialog_function_names[i+9]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QFileDialog_toScriptValue, + qtscript_QFileDialog_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFileDialog_static_call, proto, qtscript_QFileDialog_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFileDialog_static_call, + qtscript_QFileDialog_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QFileDialog_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("Option"), + qtscript_create_QFileDialog_Option_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Options"), + qtscript_create_QFileDialog_Options_class(engine)); + ctor.setProperty(QString::fromLatin1("ViewMode"), + qtscript_create_QFileDialog_ViewMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFileIconProvider.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFileIconProvider.cpp new file mode 100644 index 00000000..66319d8f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFileIconProvider.cpp @@ -0,0 +1,256 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +#include "qtscriptshell_QFileIconProvider.h" + +static const char * const qtscript_QFileIconProvider_function_names[] = { + "QFileIconProvider" + // static + // prototype + , "icon" + , "type" + , "toString" +}; + +static const char * const qtscript_QFileIconProvider_function_signatures[] = { + "" + // static + // prototype + , "IconType type\nQFileInfo info" + , "QFileInfo info" +"" +}; + +static const int qtscript_QFileIconProvider_function_lengths[] = { + 0 + // static + // prototype + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QFileIconProvider_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFileIconProvider::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFileIconProvider*) +Q_DECLARE_METATYPE(QtScriptShell_QFileIconProvider*) +Q_DECLARE_METATYPE(QFileIconProvider::IconType) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QFileIconProvider::IconType +// + +static const QFileIconProvider::IconType qtscript_QFileIconProvider_IconType_values[] = { + QFileIconProvider::Computer + , QFileIconProvider::Desktop + , QFileIconProvider::Trashcan + , QFileIconProvider::Network + , QFileIconProvider::Drive + , QFileIconProvider::Folder + , QFileIconProvider::File +}; + +static const char * const qtscript_QFileIconProvider_IconType_keys[] = { + "Computer" + , "Desktop" + , "Trashcan" + , "Network" + , "Drive" + , "Folder" + , "File" +}; + +static QString qtscript_QFileIconProvider_IconType_toStringHelper(QFileIconProvider::IconType value) +{ + if ((value >= QFileIconProvider::Computer) && (value <= QFileIconProvider::File)) + return qtscript_QFileIconProvider_IconType_keys[static_cast(value)-static_cast(QFileIconProvider::Computer)]; + return QString(); +} + +static QScriptValue qtscript_QFileIconProvider_IconType_toScriptValue(QScriptEngine *engine, const QFileIconProvider::IconType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFileIconProvider")); + return clazz.property(qtscript_QFileIconProvider_IconType_toStringHelper(value)); +} + +static void qtscript_QFileIconProvider_IconType_fromScriptValue(const QScriptValue &value, QFileIconProvider::IconType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFileIconProvider_IconType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QFileIconProvider::Computer) && (arg <= QFileIconProvider::File)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("IconType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFileIconProvider_IconType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFileIconProvider::IconType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFileIconProvider_IconType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFileIconProvider::IconType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFileIconProvider_IconType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFileIconProvider_IconType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFileIconProvider_IconType, + qtscript_QFileIconProvider_IconType_valueOf, qtscript_QFileIconProvider_IconType_toString); + qScriptRegisterMetaType(engine, qtscript_QFileIconProvider_IconType_toScriptValue, + qtscript_QFileIconProvider_IconType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 7; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFileIconProvider_IconType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFileIconProvider_IconType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFileIconProvider +// + +static QScriptValue qtscript_QFileIconProvider_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFileIconProvider* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFileIconProvider.%0(): this object is not a QFileIconProvider") + .arg(qtscript_QFileIconProvider_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QFileIconProvider::IconType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIcon _q_result = _q_self->icon(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QFileInfo _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIcon _q_result = _q_self->icon(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + QFileInfo _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->type(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QFileIconProvider"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFileIconProvider_throw_ambiguity_error_helper(context, + qtscript_QFileIconProvider_function_names[_id+1], + qtscript_QFileIconProvider_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFileIconProvider_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFileIconProvider(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QFileIconProvider* _q_cpp_result = new QtScriptShell_QFileIconProvider(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QFileIconProvider*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFileIconProvider_throw_ambiguity_error_helper(context, + qtscript_QFileIconProvider_function_names[_id], + qtscript_QFileIconProvider_function_signatures[_id]); +} + +QScriptValue qtscript_create_QFileIconProvider_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFileIconProvider*)0)); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFileIconProvider_prototype_call, qtscript_QFileIconProvider_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFileIconProvider_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFileIconProvider_static_call, proto, qtscript_QFileIconProvider_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("IconType"), + qtscript_create_QFileIconProvider_IconType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFocusFrame.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFocusFrame.cpp new file mode 100644 index 00000000..2221f481 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFocusFrame.cpp @@ -0,0 +1,201 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QFocusFrame.h" + +static const char * const qtscript_QFocusFrame_function_names[] = { + "QFocusFrame" + // static + // prototype + , "setWidget" + , "widget" + , "toString" +}; + +static const char * const qtscript_QFocusFrame_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "QWidget widget" + , "" +"" +}; + +static const int qtscript_QFocusFrame_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QFocusFrame_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFocusFrame::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFocusFrame*) +Q_DECLARE_METATYPE(QtScriptShell_QFocusFrame*) +Q_DECLARE_METATYPE(QWidget*) + +// +// QFocusFrame +// + +static QScriptValue qtscript_QFocusFrame_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFocusFrame* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFocusFrame.%0(): this object is not a QFocusFrame") + .arg(qtscript_QFocusFrame_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->widget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QFocusFrame"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFocusFrame_throw_ambiguity_error_helper(context, + qtscript_QFocusFrame_function_names[_id+1], + qtscript_QFocusFrame_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFocusFrame_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFocusFrame(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QFocusFrame* _q_cpp_result = new QtScriptShell_QFocusFrame(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFocusFrame*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QFocusFrame* _q_cpp_result = new QtScriptShell_QFocusFrame(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFocusFrame*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFocusFrame_throw_ambiguity_error_helper(context, + qtscript_QFocusFrame_function_names[_id], + qtscript_QFocusFrame_function_signatures[_id]); +} + +static QScriptValue qtscript_QFocusFrame_toScriptValue(QScriptEngine *engine, QFocusFrame* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QFocusFrame_fromScriptValue(const QScriptValue &value, QFocusFrame* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QFocusFrame_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFocusFrame*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFocusFrame_prototype_call, qtscript_QFocusFrame_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFocusFrame_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QFocusFrame_toScriptValue, + qtscript_QFocusFrame_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFocusFrame_static_call, proto, qtscript_QFocusFrame_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFontComboBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFontComboBox.cpp new file mode 100644 index 00000000..ef5f02af --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFontComboBox.cpp @@ -0,0 +1,372 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QFontComboBox.h" + +static const char * const qtscript_QFontComboBox_function_names[] = { + "QFontComboBox" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QFontComboBox_function_signatures[] = { + "QWidget parent" + // static + // prototype +"" +}; + +static const int qtscript_QFontComboBox_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QFontComboBox_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFontComboBox::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFontComboBox*) +Q_DECLARE_METATYPE(QtScriptShell_QFontComboBox*) +Q_DECLARE_METATYPE(QFontComboBox::FontFilter) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QComboBox*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QFontComboBox::FontFilter +// + +static const QFontComboBox::FontFilter qtscript_QFontComboBox_FontFilter_values[] = { + QFontComboBox::AllFonts + , QFontComboBox::ScalableFonts + , QFontComboBox::NonScalableFonts + , QFontComboBox::MonospacedFonts + , QFontComboBox::ProportionalFonts +}; + +static const char * const qtscript_QFontComboBox_FontFilter_keys[] = { + "AllFonts" + , "ScalableFonts" + , "NonScalableFonts" + , "MonospacedFonts" + , "ProportionalFonts" +}; + +static QString qtscript_QFontComboBox_FontFilter_toStringHelper(QFontComboBox::FontFilter value) +{ + for (int i = 0; i < 5; ++i) { + if (qtscript_QFontComboBox_FontFilter_values[i] == value) + return QString::fromLatin1(qtscript_QFontComboBox_FontFilter_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QFontComboBox_FontFilter_toScriptValue(QScriptEngine *engine, const QFontComboBox::FontFilter &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFontComboBox")); + return clazz.property(qtscript_QFontComboBox_FontFilter_toStringHelper(value)); +} + +static void qtscript_QFontComboBox_FontFilter_fromScriptValue(const QScriptValue &value, QFontComboBox::FontFilter &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFontComboBox_FontFilter(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 5; ++i) { + if (qtscript_QFontComboBox_FontFilter_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("FontFilter(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFontComboBox_FontFilter_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFontComboBox::FontFilter value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFontComboBox_FontFilter_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFontComboBox::FontFilter value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFontComboBox_FontFilter_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFontComboBox_FontFilter_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFontComboBox_FontFilter, + qtscript_QFontComboBox_FontFilter_valueOf, qtscript_QFontComboBox_FontFilter_toString); + qScriptRegisterMetaType(engine, qtscript_QFontComboBox_FontFilter_toScriptValue, + qtscript_QFontComboBox_FontFilter_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFontComboBox_FontFilter_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFontComboBox_FontFilter_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFontComboBox::FontFilters +// + +static QScriptValue qtscript_QFontComboBox_FontFilters_toScriptValue(QScriptEngine *engine, const QFontComboBox::FontFilters &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QFontComboBox_FontFilters_fromScriptValue(const QScriptValue &value, QFontComboBox::FontFilters &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QFontComboBox_FontFilters(QScriptContext *context, QScriptEngine *engine) +{ + QFontComboBox::FontFilters result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("FontFilters(): argument %0 is not of type FontFilter").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QFontComboBox_FontFilters_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFontComboBox::FontFilters value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFontComboBox_FontFilters_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFontComboBox::FontFilters value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 5; ++i) { + if ((value & qtscript_QFontComboBox_FontFilter_values[i]) == qtscript_QFontComboBox_FontFilter_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QFontComboBox_FontFilter_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QFontComboBox_FontFilters_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QFontComboBox_FontFilters_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QFontComboBox_FontFilters, qtscript_QFontComboBox_FontFilters_valueOf, + qtscript_QFontComboBox_FontFilters_toString, qtscript_QFontComboBox_FontFilters_equals); + qScriptRegisterMetaType(engine, qtscript_QFontComboBox_FontFilters_toScriptValue, + qtscript_QFontComboBox_FontFilters_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QFontComboBox +// + +static QScriptValue qtscript_QFontComboBox_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFontComboBox* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFontComboBox.%0(): this object is not a QFontComboBox") + .arg(qtscript_QFontComboBox_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QFontComboBox"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFontComboBox_throw_ambiguity_error_helper(context, + qtscript_QFontComboBox_function_names[_id+1], + qtscript_QFontComboBox_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFontComboBox_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFontComboBox(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QFontComboBox* _q_cpp_result = new QtScriptShell_QFontComboBox(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFontComboBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QFontComboBox* _q_cpp_result = new QtScriptShell_QFontComboBox(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFontComboBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFontComboBox_throw_ambiguity_error_helper(context, + qtscript_QFontComboBox_function_names[_id], + qtscript_QFontComboBox_function_signatures[_id]); +} + +static QScriptValue qtscript_QFontComboBox_toScriptValue(QScriptEngine *engine, QFontComboBox* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QFontComboBox_fromScriptValue(const QScriptValue &value, QFontComboBox* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QFontComboBox_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFontComboBox*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QFontComboBox_toScriptValue, + qtscript_QFontComboBox_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFontComboBox_static_call, proto, qtscript_QFontComboBox_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("FontFilter"), + qtscript_create_QFontComboBox_FontFilter_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("FontFilters"), + qtscript_create_QFontComboBox_FontFilters_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFontDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFontDialog.cpp new file mode 100644 index 00000000..4486953a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFontDialog.cpp @@ -0,0 +1,520 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QFontDialog.h" + +static const char * const qtscript_QFontDialog_function_names[] = { + "QFontDialog" + // static + , "getFont" + // prototype + , "open" + , "selectedFont" + , "setOption" + , "testOption" + , "toString" +}; + +static const char * const qtscript_QFontDialog_function_signatures[] = { + "QWidget parent\nQFont initial, QWidget parent" + // static + , "QWidget parent\nbool ok, QFont initial, QWidget parent, String title, FontDialogOptions options" + // prototype + , "QObject receiver, char member" + , "" + , "FontDialogOption option, bool on" + , "FontDialogOption option" +"" +}; + +static const int qtscript_QFontDialog_function_lengths[] = { + 2 + // static + , 5 + // prototype + , 2 + , 0 + , 2 + , 1 + , 0 +}; + +static QScriptValue qtscript_QFontDialog_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFontDialog::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFontDialog*) +Q_DECLARE_METATYPE(QtScriptShell_QFontDialog*) +Q_DECLARE_METATYPE(QFontDialog::FontDialogOption) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(bool*) +Q_DECLARE_METATYPE(QDialog*) + + + Q_DECLARE_METATYPE(QScriptValue) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QFontDialog::FontDialogOption +// + +static const QFontDialog::FontDialogOption qtscript_QFontDialog_FontDialogOption_values[] = { + QFontDialog::NoButtons + , QFontDialog::DontUseNativeDialog + , QFontDialog::ScalableFonts + , QFontDialog::NonScalableFonts + , QFontDialog::MonospacedFonts + , QFontDialog::ProportionalFonts +}; + +static const char * const qtscript_QFontDialog_FontDialogOption_keys[] = { + "NoButtons" + , "DontUseNativeDialog" + , "ScalableFonts" + , "NonScalableFonts" + , "MonospacedFonts" + , "ProportionalFonts" +}; + +static QString qtscript_QFontDialog_FontDialogOption_toStringHelper(QFontDialog::FontDialogOption value) +{ + for (int i = 0; i < 6; ++i) { + if (qtscript_QFontDialog_FontDialogOption_values[i] == value) + return QString::fromLatin1(qtscript_QFontDialog_FontDialogOption_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QFontDialog_FontDialogOption_toScriptValue(QScriptEngine *engine, const QFontDialog::FontDialogOption &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFontDialog")); + return clazz.property(qtscript_QFontDialog_FontDialogOption_toStringHelper(value)); +} + +static void qtscript_QFontDialog_FontDialogOption_fromScriptValue(const QScriptValue &value, QFontDialog::FontDialogOption &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFontDialog_FontDialogOption(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 6; ++i) { + if (qtscript_QFontDialog_FontDialogOption_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("FontDialogOption(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFontDialog_FontDialogOption_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFontDialog::FontDialogOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFontDialog_FontDialogOption_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFontDialog::FontDialogOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFontDialog_FontDialogOption_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFontDialog_FontDialogOption_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFontDialog_FontDialogOption, + qtscript_QFontDialog_FontDialogOption_valueOf, qtscript_QFontDialog_FontDialogOption_toString); + qScriptRegisterMetaType(engine, qtscript_QFontDialog_FontDialogOption_toScriptValue, + qtscript_QFontDialog_FontDialogOption_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFontDialog_FontDialogOption_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFontDialog_FontDialogOption_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFontDialog::FontDialogOptions +// + +static QScriptValue qtscript_QFontDialog_FontDialogOptions_toScriptValue(QScriptEngine *engine, const QFontDialog::FontDialogOptions &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QFontDialog_FontDialogOptions_fromScriptValue(const QScriptValue &value, QFontDialog::FontDialogOptions &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QFontDialog_FontDialogOptions(QScriptContext *context, QScriptEngine *engine) +{ + QFontDialog::FontDialogOptions result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("FontDialogOptions(): argument %0 is not of type FontDialogOption").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QFontDialog_FontDialogOptions_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFontDialog::FontDialogOptions value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFontDialog_FontDialogOptions_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFontDialog::FontDialogOptions value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 6; ++i) { + if ((value & qtscript_QFontDialog_FontDialogOption_values[i]) == qtscript_QFontDialog_FontDialogOption_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QFontDialog_FontDialogOption_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QFontDialog_FontDialogOptions_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QFontDialog_FontDialogOptions_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QFontDialog_FontDialogOptions, qtscript_QFontDialog_FontDialogOptions_valueOf, + qtscript_QFontDialog_FontDialogOptions_toString, qtscript_QFontDialog_FontDialogOptions_equals); + qScriptRegisterMetaType(engine, qtscript_QFontDialog_FontDialogOptions_toScriptValue, + qtscript_QFontDialog_FontDialogOptions_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QFontDialog +// + +static QScriptValue qtscript_QFontDialog_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFontDialog* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFontDialog.%0(): this object is not a QFontDialog") + .arg(qtscript_QFontDialog_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->open(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QFont _q_result = _q_self->selectedFont(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QFontDialog::FontDialogOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOption(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QFontDialog::FontDialogOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setOption(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QFontDialog::FontDialogOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->testOption(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QFontDialog"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFontDialog_throw_ambiguity_error_helper(context, + qtscript_QFontDialog_function_names[_id+2], + qtscript_QFontDialog_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QFontDialog_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFontDialog(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QFontDialog* _q_cpp_result = new QtScriptShell_QFontDialog(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFontDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QFontDialog* _q_cpp_result = new QtScriptShell_QFontDialog(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFontDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QFontDialog* _q_cpp_result = new QtScriptShell_QFontDialog(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFontDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QFontDialog* _q_cpp_result = new QtScriptShell_QFontDialog(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFontDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + + // TEMPLATE - core.prepare_removed_bool*_argument - START + bool __ok; + bool *_q_arg0 = &__ok; + // TEMPLATE - core.prepare_removed_bool*_argument - END + QFont _q_result = QFontDialog::getFont(_q_arg0); + + // TEMPLATE - core.convert_to_null_or_wrap - START + QScriptValue _q_convertedResult; + if (!__ok) + _q_convertedResult = context->engine()->nullValue(); + else + _q_convertedResult = qScriptValueFromValue(context->engine(), _q_result); + // TEMPLATE - core.convert_to_null_or_wrap - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + if (context->argumentCount() == 1) { + + // TEMPLATE - core.prepare_removed_bool*_argument - START + bool __ok; + bool *_q_arg0 = &__ok; + // TEMPLATE - core.prepare_removed_bool*_argument - END + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(0)); + QFont _q_result = QFontDialog::getFont(_q_arg0, _q_arg1); + + // TEMPLATE - core.convert_to_null_or_wrap - START + QScriptValue _q_convertedResult; + if (!__ok) + _q_convertedResult = context->engine()->nullValue(); + else + _q_convertedResult = qScriptValueFromValue(context->engine(), _q_result); + // TEMPLATE - core.convert_to_null_or_wrap - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + if (context->argumentCount() == 2) { + bool* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFont _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFont _q_result = QFontDialog::getFont(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + bool* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFont _q_arg1 = qscriptvalue_cast(context->argument(1)); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFont _q_result = QFontDialog::getFont(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + bool* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFont _q_arg1 = qscriptvalue_cast(context->argument(1)); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QString _q_arg3 = context->argument(3).toString(); + QFont _q_result = QFontDialog::getFont(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + bool* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFont _q_arg1 = qscriptvalue_cast(context->argument(1)); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QString _q_arg3 = context->argument(3).toString(); + QFlags _q_arg4 = qscriptvalue_cast >(context->argument(4)); + QFont _q_result = QFontDialog::getFont(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFontDialog_throw_ambiguity_error_helper(context, + qtscript_QFontDialog_function_names[_id], + qtscript_QFontDialog_function_signatures[_id]); +} + +static QScriptValue qtscript_QFontDialog_toScriptValue(QScriptEngine *engine, QFontDialog* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QFontDialog_fromScriptValue(const QScriptValue &value, QFontDialog* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QFontDialog_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFontDialog*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFontDialog_prototype_call, qtscript_QFontDialog_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFontDialog_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QFontDialog_toScriptValue, + qtscript_QFontDialog_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFontDialog_static_call, proto, qtscript_QFontDialog_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFontDialog_static_call, + qtscript_QFontDialog_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QFontDialog_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("FontDialogOption"), + qtscript_create_QFontDialog_FontDialogOption_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("FontDialogOptions"), + qtscript_create_QFontDialog_FontDialogOptions_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFormLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFormLayout.cpp new file mode 100644 index 00000000..07887578 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFormLayout.cpp @@ -0,0 +1,489 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QFormLayout.h" + +static const char * const qtscript_QFormLayout_function_names[] = { + "QFormLayout" + // static + // prototype + , "addRow" + , "getItemPosition" + , "getLayoutPosition" + , "getWidgetPosition" + , "insertRow" + , "itemAt" + , "labelForField" + , "rowCount" + , "setItem_private" + , "setLayout" + , "setSpacing" + , "setWidget" + , "spacing" + , "toString" +}; + +static const char * const qtscript_QFormLayout_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "QLayout layout\nQWidget label, QLayout field\nQWidget label, QWidget field\nQWidget widget\nString labelText, QLayout field\nString labelText, QWidget field" + , "int index, int rowPtr, ItemRole rolePtr" + , "QLayout layout, int rowPtr, ItemRole rolePtr" + , "QWidget widget, int rowPtr, ItemRole rolePtr" + , "int row, QLayout layout\nint row, QWidget label, QLayout field\nint row, QWidget label, QWidget field\nint row, QWidget widget\nint row, String labelText, QLayout field\nint row, String labelText, QWidget field" + , "int row, ItemRole role" + , "QLayout field\nQWidget field" + , "" + , "int row, ItemRole role, QLayoutItem item" + , "int row, ItemRole role, QLayout layout" + , "int arg__1" + , "int row, ItemRole role, QWidget widget" + , "" +"" +}; + +static const int qtscript_QFormLayout_function_lengths[] = { + 1 + // static + // prototype + , 2 + , 3 + , 3 + , 3 + , 3 + , 2 + , 1 + , 0 + , 3 + , 3 + , 1 + , 3 + , 0 + , 0 +}; + +static QScriptValue qtscript_QFormLayout_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFormLayout::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFormLayout*) +Q_DECLARE_METATYPE(QtScriptShell_QFormLayout*) +Q_DECLARE_METATYPE(QFormLayout::FieldGrowthPolicy) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(int*) +Q_DECLARE_METATYPE(QFormLayout::ItemRole*) +Q_DECLARE_METATYPE(QFormLayout::ItemRole) +Q_DECLARE_METATYPE(QLayoutItem*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QFormLayout::FieldGrowthPolicy +// + +static const QFormLayout::FieldGrowthPolicy qtscript_QFormLayout_FieldGrowthPolicy_values[] = { + QFormLayout::FieldsStayAtSizeHint + , QFormLayout::ExpandingFieldsGrow + , QFormLayout::AllNonFixedFieldsGrow +}; + +static const char * const qtscript_QFormLayout_FieldGrowthPolicy_keys[] = { + "FieldsStayAtSizeHint" + , "ExpandingFieldsGrow" + , "AllNonFixedFieldsGrow" +}; + +static QString qtscript_QFormLayout_FieldGrowthPolicy_toStringHelper(QFormLayout::FieldGrowthPolicy value) +{ + if ((value >= QFormLayout::FieldsStayAtSizeHint) && (value <= QFormLayout::AllNonFixedFieldsGrow)) + return qtscript_QFormLayout_FieldGrowthPolicy_keys[static_cast(value)-static_cast(QFormLayout::FieldsStayAtSizeHint)]; + return QString(); +} + +static QScriptValue qtscript_QFormLayout_FieldGrowthPolicy_toScriptValue(QScriptEngine *engine, const QFormLayout::FieldGrowthPolicy &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFormLayout")); + return clazz.property(qtscript_QFormLayout_FieldGrowthPolicy_toStringHelper(value)); +} + +static void qtscript_QFormLayout_FieldGrowthPolicy_fromScriptValue(const QScriptValue &value, QFormLayout::FieldGrowthPolicy &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFormLayout_FieldGrowthPolicy(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QFormLayout::FieldsStayAtSizeHint) && (arg <= QFormLayout::AllNonFixedFieldsGrow)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("FieldGrowthPolicy(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFormLayout_FieldGrowthPolicy_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFormLayout::FieldGrowthPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFormLayout_FieldGrowthPolicy_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFormLayout::FieldGrowthPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFormLayout_FieldGrowthPolicy_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFormLayout_FieldGrowthPolicy_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFormLayout_FieldGrowthPolicy, + qtscript_QFormLayout_FieldGrowthPolicy_valueOf, qtscript_QFormLayout_FieldGrowthPolicy_toString); + qScriptRegisterMetaType(engine, qtscript_QFormLayout_FieldGrowthPolicy_toScriptValue, + qtscript_QFormLayout_FieldGrowthPolicy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFormLayout_FieldGrowthPolicy_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFormLayout_FieldGrowthPolicy_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFormLayout +// + +static QScriptValue qtscript_QFormLayout_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 13; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFormLayout* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFormLayout.%0(): this object is not a QFormLayout") + .arg(qtscript_QFormLayout_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QLayout* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addRow(_q_arg0); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addRow(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QLayout* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->addRow(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->addRow(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1))) { + QString _q_arg0 = context->argument(0).toString(); + QLayout* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->addRow(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1))) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->addRow(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + break; + + case 1: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFormLayout::ItemRole* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->getItemPosition(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 3) { + QLayout* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFormLayout::ItemRole* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->getLayoutPosition(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFormLayout::ItemRole* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->getWidgetPosition(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 2) { + if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1))) { + int _q_arg0 = context->argument(0).toInt32(); + QLayout* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertRow(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1))) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertRow(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1)) + && qscriptvalue_cast(context->argument(2))) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QLayout* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->insertRow(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1)) + && qscriptvalue_cast(context->argument(2))) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->insertRow(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isString() + && qscriptvalue_cast(context->argument(2))) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + QLayout* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->insertRow(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isString() + && qscriptvalue_cast(context->argument(2))) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->insertRow(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + break; + + case 5: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QFormLayout::ItemRole _q_arg1 = qscriptvalue_cast(context->argument(1)); + QLayoutItem* _q_result = _q_self->itemAt(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QLayout* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_result = _q_self->labelForField(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_result = _q_self->labelForField(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->rowCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + QFormLayout::ItemRole _q_arg1 = qscriptvalue_cast(context->argument(1)); + QLayoutItem* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setItem(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + QFormLayout::ItemRole _q_arg1 = qscriptvalue_cast(context->argument(1)); + QLayout* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setLayout(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + QFormLayout::ItemRole _q_arg1 = qscriptvalue_cast(context->argument(1)); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setWidget(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 0) { + int _q_result = _q_self->spacing(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: { + QString result = QString::fromLatin1("QFormLayout"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFormLayout_throw_ambiguity_error_helper(context, + qtscript_QFormLayout_function_names[_id+1], + qtscript_QFormLayout_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFormLayout_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFormLayout(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QFormLayout* _q_cpp_result = new QtScriptShell_QFormLayout(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFormLayout*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QFormLayout* _q_cpp_result = new QtScriptShell_QFormLayout(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFormLayout*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFormLayout_throw_ambiguity_error_helper(context, + qtscript_QFormLayout_function_names[_id], + qtscript_QFormLayout_function_signatures[_id]); +} + +static QScriptValue qtscript_QFormLayout_toScriptValue(QScriptEngine *engine, QFormLayout* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QFormLayout_fromScriptValue(const QScriptValue &value, QFormLayout* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QFormLayout_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFormLayout*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 14; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFormLayout_prototype_call, qtscript_QFormLayout_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFormLayout_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QFormLayout_toScriptValue, + qtscript_QFormLayout_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFormLayout_static_call, proto, qtscript_QFormLayout_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("FieldGrowthPolicy"), + qtscript_create_QFormLayout_FieldGrowthPolicy_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFrame.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFrame.cpp new file mode 100644 index 00000000..0d08b99d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QFrame.cpp @@ -0,0 +1,313 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QFrame.h" + +static const char * const qtscript_QFrame_function_names[] = { + "QFrame" + // static + // prototype + , "frameStyle" + , "setFrameStyle" + , "sizeHint" + , "toString" +}; + +static const char * const qtscript_QFrame_function_signatures[] = { + "QWidget parent, WindowFlags f" + // static + // prototype + , "" + , "int arg__1" + , "" +"" +}; + +static const int qtscript_QFrame_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QFrame_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QFrame::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QFrame*) +Q_DECLARE_METATYPE(QtScriptShell_QFrame*) +Q_DECLARE_METATYPE(QFrame::Shape) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFlags) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QFrame::Shape +// + +static const QFrame::Shape qtscript_QFrame_Shape_values[] = { + QFrame::NoFrame + , QFrame::Box + , QFrame::Panel + , QFrame::WinPanel + , QFrame::HLine + , QFrame::VLine + , QFrame::StyledPanel +}; + +static const char * const qtscript_QFrame_Shape_keys[] = { + "NoFrame" + , "Box" + , "Panel" + , "WinPanel" + , "HLine" + , "VLine" + , "StyledPanel" +}; + +static QString qtscript_QFrame_Shape_toStringHelper(QFrame::Shape value) +{ + if ((value >= QFrame::NoFrame) && (value <= QFrame::StyledPanel)) + return qtscript_QFrame_Shape_keys[static_cast(value)-static_cast(QFrame::NoFrame)]; + return QString(); +} + +static QScriptValue qtscript_QFrame_Shape_toScriptValue(QScriptEngine *engine, const QFrame::Shape &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QFrame")); + return clazz.property(qtscript_QFrame_Shape_toStringHelper(value)); +} + +static void qtscript_QFrame_Shape_fromScriptValue(const QScriptValue &value, QFrame::Shape &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QFrame_Shape(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QFrame::NoFrame) && (arg <= QFrame::StyledPanel)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Shape(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QFrame_Shape_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QFrame::Shape value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QFrame_Shape_toString(QScriptContext *context, QScriptEngine *engine) +{ + QFrame::Shape value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QFrame_Shape_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QFrame_Shape_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QFrame_Shape, + qtscript_QFrame_Shape_valueOf, qtscript_QFrame_Shape_toString); + qScriptRegisterMetaType(engine, qtscript_QFrame_Shape_toScriptValue, + qtscript_QFrame_Shape_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 7; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QFrame_Shape_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QFrame_Shape_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QFrame +// + +static QScriptValue qtscript_QFrame_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QFrame* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QFrame.%0(): this object is not a QFrame") + .arg(qtscript_QFrame_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->frameStyle(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setFrameStyle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: { + QString result = QString::fromLatin1("QFrame"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QFrame_throw_ambiguity_error_helper(context, + qtscript_QFrame_function_names[_id+1], + qtscript_QFrame_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QFrame_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QFrame(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QFrame* _q_cpp_result = new QtScriptShell_QFrame(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFrame*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QFrame* _q_cpp_result = new QtScriptShell_QFrame(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFrame*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QFrame* _q_cpp_result = new QtScriptShell_QFrame(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QFrame*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QFrame_throw_ambiguity_error_helper(context, + qtscript_QFrame_function_names[_id], + qtscript_QFrame_function_signatures[_id]); +} + +static QScriptValue qtscript_QFrame_toScriptValue(QScriptEngine *engine, QFrame* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QFrame_fromScriptValue(const QScriptValue &value, QFrame* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QFrame_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QFrame*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QFrame_prototype_call, qtscript_QFrame_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QFrame_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QFrame_toScriptValue, + qtscript_QFrame_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QFrame_static_call, proto, qtscript_QFrame_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Shape"), + qtscript_create_QFrame_Shape_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGesture.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGesture.cpp new file mode 100644 index 00000000..410c01a1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGesture.cpp @@ -0,0 +1,249 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGesture.h" + +static const char * const qtscript_QGesture_function_names[] = { + "QGesture" + // static + // prototype + , "unsetHotSpot" + , "toString" +}; + +static const char * const qtscript_QGesture_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" +"" +}; + +static const int qtscript_QGesture_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 +}; + +static QScriptValue qtscript_QGesture_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGesture::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGesture*) +Q_DECLARE_METATYPE(QtScriptShell_QGesture*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QGesture::GestureCancelPolicy +// + +static const QGesture::GestureCancelPolicy qtscript_QGesture_GestureCancelPolicy_values[] = { + QGesture::CancelNone + , QGesture::CancelAllInContext +}; + +static const char * const qtscript_QGesture_GestureCancelPolicy_keys[] = { + "CancelNone" + , "CancelAllInContext" +}; + +static QString qtscript_QGesture_GestureCancelPolicy_toStringHelper(QGesture::GestureCancelPolicy value) +{ + if ((value >= QGesture::CancelNone) && (value <= QGesture::CancelAllInContext)) + return qtscript_QGesture_GestureCancelPolicy_keys[static_cast(value)-static_cast(QGesture::CancelNone)]; + return QString(); +} + +static QScriptValue qtscript_QGesture_GestureCancelPolicy_toScriptValue(QScriptEngine *engine, const QGesture::GestureCancelPolicy &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGesture")); + return clazz.property(qtscript_QGesture_GestureCancelPolicy_toStringHelper(value)); +} + +static void qtscript_QGesture_GestureCancelPolicy_fromScriptValue(const QScriptValue &value, QGesture::GestureCancelPolicy &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGesture_GestureCancelPolicy(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QGesture::CancelNone) && (arg <= QGesture::CancelAllInContext)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("GestureCancelPolicy(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGesture_GestureCancelPolicy_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGesture::GestureCancelPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGesture_GestureCancelPolicy_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGesture::GestureCancelPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGesture_GestureCancelPolicy_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGesture_GestureCancelPolicy_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGesture_GestureCancelPolicy, + qtscript_QGesture_GestureCancelPolicy_valueOf, qtscript_QGesture_GestureCancelPolicy_toString); + qScriptRegisterMetaType(engine, qtscript_QGesture_GestureCancelPolicy_toScriptValue, + qtscript_QGesture_GestureCancelPolicy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGesture_GestureCancelPolicy_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGesture_GestureCancelPolicy_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGesture +// + +static QScriptValue qtscript_QGesture_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGesture* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGesture.%0(): this object is not a QGesture") + .arg(qtscript_QGesture_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->unsetHotSpot(); + return context->engine()->undefinedValue(); + } + break; + + case 1: { + QString result; + QDebug d(&result); + d << _q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGesture_throw_ambiguity_error_helper(context, + qtscript_QGesture_function_names[_id+1], + qtscript_QGesture_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGesture_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGesture(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGesture* _q_cpp_result = new QtScriptShell_QGesture(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGesture*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QGesture* _q_cpp_result = new QtScriptShell_QGesture(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGesture*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGesture_throw_ambiguity_error_helper(context, + qtscript_QGesture_function_names[_id], + qtscript_QGesture_function_signatures[_id]); +} + +static QScriptValue qtscript_QGesture_toScriptValue(QScriptEngine *engine, QGesture* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGesture_fromScriptValue(const QScriptValue &value, QGesture* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGesture_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGesture*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGesture_prototype_call, qtscript_QGesture_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGesture_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGesture_toScriptValue, + qtscript_QGesture_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGesture_static_call, proto, qtscript_QGesture_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("GestureCancelPolicy"), + qtscript_create_QGesture_GestureCancelPolicy_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsAnchor.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsAnchor.cpp new file mode 100644 index 00000000..4e627e66 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsAnchor.cpp @@ -0,0 +1,147 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QGraphicsAnchor_function_names[] = { + "QGraphicsAnchor" + // static + // prototype + , "unsetSpacing" + , "toString" +}; + +static const char * const qtscript_QGraphicsAnchor_function_signatures[] = { + "" + // static + // prototype + , "" +"" +}; + +static const int qtscript_QGraphicsAnchor_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 +}; + +static QScriptValue qtscript_QGraphicsAnchor_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsAnchor::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsAnchor*) + +// +// QGraphicsAnchor +// + +static QScriptValue qtscript_QGraphicsAnchor_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsAnchor* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsAnchor.%0(): this object is not a QGraphicsAnchor") + .arg(qtscript_QGraphicsAnchor_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->unsetSpacing(); + return context->engine()->undefinedValue(); + } + break; + + case 1: { + QString result = QString::fromLatin1("QGraphicsAnchor"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsAnchor_throw_ambiguity_error_helper(context, + qtscript_QGraphicsAnchor_function_names[_id+1], + qtscript_QGraphicsAnchor_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsAnchor_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsAnchor cannot be constructed")); + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsAnchor_throw_ambiguity_error_helper(context, + qtscript_QGraphicsAnchor_function_names[_id], + qtscript_QGraphicsAnchor_function_signatures[_id]); +} + +static QScriptValue qtscript_QGraphicsAnchor_toScriptValue(QScriptEngine *engine, QGraphicsAnchor* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGraphicsAnchor_fromScriptValue(const QScriptValue &value, QGraphicsAnchor* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGraphicsAnchor_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsAnchor*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsAnchor_prototype_call, qtscript_QGraphicsAnchor_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsAnchor_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGraphicsAnchor_toScriptValue, + qtscript_QGraphicsAnchor_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsAnchor_static_call, proto, qtscript_QGraphicsAnchor_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsAnchorLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsAnchorLayout.cpp new file mode 100644 index 00000000..159e226c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsAnchorLayout.cpp @@ -0,0 +1,265 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsAnchorLayout.h" + +static const char * const qtscript_QGraphicsAnchorLayout_function_names[] = { + "QGraphicsAnchorLayout" + // static + // prototype + , "addAnchor" + , "addAnchors" + , "addCornerAnchors" + , "anchor" + , "horizontalSpacing" + , "setHorizontalSpacing" + , "setSpacing" + , "setVerticalSpacing" + , "verticalSpacing" + , "toString" +}; + +static const char * const qtscript_QGraphicsAnchorLayout_function_signatures[] = { + "QGraphicsLayoutItem parent" + // static + // prototype + , "QGraphicsLayoutItem firstItem, AnchorPoint firstEdge, QGraphicsLayoutItem secondItem, AnchorPoint secondEdge" + , "QGraphicsLayoutItem firstItem, QGraphicsLayoutItem secondItem, Orientations orientations" + , "QGraphicsLayoutItem firstItem, Corner firstCorner, QGraphicsLayoutItem secondItem, Corner secondCorner" + , "QGraphicsLayoutItem firstItem, AnchorPoint firstEdge, QGraphicsLayoutItem secondItem, AnchorPoint secondEdge" + , "" + , "qreal spacing" + , "qreal spacing" + , "qreal spacing" + , "" +"" +}; + +static const int qtscript_QGraphicsAnchorLayout_function_lengths[] = { + 1 + // static + // prototype + , 4 + , 3 + , 4 + , 4 + , 0 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGraphicsAnchorLayout_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsAnchorLayout::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsAnchorLayout*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsAnchorLayout*) +Q_DECLARE_METATYPE(QGraphicsLayoutItem*) +Q_DECLARE_METATYPE(Qt::AnchorPoint) +Q_DECLARE_METATYPE(QGraphicsAnchor*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::Corner) +Q_DECLARE_METATYPE(QGraphicsLayout*) + +// +// QGraphicsAnchorLayout +// + +static QScriptValue qtscript_QGraphicsAnchorLayout_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 9; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsAnchorLayout* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsAnchorLayout.%0(): this object is not a QGraphicsAnchorLayout") + .arg(qtscript_QGraphicsAnchorLayout_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 4) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::AnchorPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QGraphicsLayoutItem* _q_arg2 = qscriptvalue_cast(context->argument(2)); + Qt::AnchorPoint _q_arg3 = qscriptvalue_cast(context->argument(3)); + QGraphicsAnchor* _q_result = _q_self->addAnchor(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 2) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsLayoutItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->addAnchors(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsLayoutItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + _q_self->addAnchors(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 4) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::Corner _q_arg1 = qscriptvalue_cast(context->argument(1)); + QGraphicsLayoutItem* _q_arg2 = qscriptvalue_cast(context->argument(2)); + Qt::Corner _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->addCornerAnchors(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 4) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::AnchorPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QGraphicsLayoutItem* _q_arg2 = qscriptvalue_cast(context->argument(2)); + Qt::AnchorPoint _q_arg3 = qscriptvalue_cast(context->argument(3)); + QGraphicsAnchor* _q_result = _q_self->anchor(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->horizontalSpacing(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setHorizontalSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setVerticalSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->verticalSpacing(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: { + QString result = QString::fromLatin1("QGraphicsAnchorLayout"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsAnchorLayout_throw_ambiguity_error_helper(context, + qtscript_QGraphicsAnchorLayout_function_names[_id+1], + qtscript_QGraphicsAnchorLayout_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsAnchorLayout_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsAnchorLayout(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsAnchorLayout* _q_cpp_result = new QtScriptShell_QGraphicsAnchorLayout(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsAnchorLayout*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsAnchorLayout* _q_cpp_result = new QtScriptShell_QGraphicsAnchorLayout(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsAnchorLayout*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsAnchorLayout_throw_ambiguity_error_helper(context, + qtscript_QGraphicsAnchorLayout_function_names[_id], + qtscript_QGraphicsAnchorLayout_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsAnchorLayout_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsAnchorLayout*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 10; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsAnchorLayout_prototype_call, qtscript_QGraphicsAnchorLayout_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsAnchorLayout_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsAnchorLayout_static_call, proto, qtscript_QGraphicsAnchorLayout_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsBlurEffect.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsBlurEffect.cpp new file mode 100644 index 00000000..fef87c4a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsBlurEffect.cpp @@ -0,0 +1,335 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsBlurEffect.h" + +static const char * const qtscript_QGraphicsBlurEffect_function_names[] = { + "QGraphicsBlurEffect" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QGraphicsBlurEffect_function_signatures[] = { + "QObject parent" + // static + // prototype +"" +}; + +static const int qtscript_QGraphicsBlurEffect_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QGraphicsBlurEffect_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsBlurEffect::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsBlurEffect*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsBlurEffect*) +Q_DECLARE_METATYPE(QGraphicsBlurEffect::BlurHint) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QGraphicsEffect*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QGraphicsBlurEffect::BlurHint +// + +static const QGraphicsBlurEffect::BlurHint qtscript_QGraphicsBlurEffect_BlurHint_values[] = { + QGraphicsBlurEffect::PerformanceHint + , QGraphicsBlurEffect::QualityHint + , QGraphicsBlurEffect::AnimationHint +}; + +static const char * const qtscript_QGraphicsBlurEffect_BlurHint_keys[] = { + "PerformanceHint" + , "QualityHint" + , "AnimationHint" +}; + +static QString qtscript_QGraphicsBlurEffect_BlurHint_toStringHelper(QGraphicsBlurEffect::BlurHint value) +{ + if ((value >= QGraphicsBlurEffect::PerformanceHint) && (value <= QGraphicsBlurEffect::AnimationHint)) + return qtscript_QGraphicsBlurEffect_BlurHint_keys[static_cast(value)-static_cast(QGraphicsBlurEffect::PerformanceHint)]; + return QString(); +} + +static QScriptValue qtscript_QGraphicsBlurEffect_BlurHint_toScriptValue(QScriptEngine *engine, const QGraphicsBlurEffect::BlurHint &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGraphicsBlurEffect")); + return clazz.property(qtscript_QGraphicsBlurEffect_BlurHint_toStringHelper(value)); +} + +static void qtscript_QGraphicsBlurEffect_BlurHint_fromScriptValue(const QScriptValue &value, QGraphicsBlurEffect::BlurHint &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGraphicsBlurEffect_BlurHint(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QGraphicsBlurEffect::PerformanceHint) && (arg <= QGraphicsBlurEffect::AnimationHint)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("BlurHint(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGraphicsBlurEffect_BlurHint_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsBlurEffect::BlurHint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsBlurEffect_BlurHint_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsBlurEffect::BlurHint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGraphicsBlurEffect_BlurHint_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGraphicsBlurEffect_BlurHint_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGraphicsBlurEffect_BlurHint, + qtscript_QGraphicsBlurEffect_BlurHint_valueOf, qtscript_QGraphicsBlurEffect_BlurHint_toString); + qScriptRegisterMetaType(engine, qtscript_QGraphicsBlurEffect_BlurHint_toScriptValue, + qtscript_QGraphicsBlurEffect_BlurHint_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGraphicsBlurEffect_BlurHint_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGraphicsBlurEffect_BlurHint_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGraphicsBlurEffect::BlurHints +// + +static QScriptValue qtscript_QGraphicsBlurEffect_BlurHints_toScriptValue(QScriptEngine *engine, const QGraphicsBlurEffect::BlurHints &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QGraphicsBlurEffect_BlurHints_fromScriptValue(const QScriptValue &value, QGraphicsBlurEffect::BlurHints &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QGraphicsBlurEffect_BlurHints(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsBlurEffect::BlurHints result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("BlurHints(): argument %0 is not of type BlurHint").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QGraphicsBlurEffect_BlurHints_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsBlurEffect::BlurHints value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsBlurEffect_BlurHints_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsBlurEffect::BlurHints value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 3; ++i) { + if ((value & qtscript_QGraphicsBlurEffect_BlurHint_values[i]) == qtscript_QGraphicsBlurEffect_BlurHint_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QGraphicsBlurEffect_BlurHint_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QGraphicsBlurEffect_BlurHints_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QGraphicsBlurEffect_BlurHints_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QGraphicsBlurEffect_BlurHints, qtscript_QGraphicsBlurEffect_BlurHints_valueOf, + qtscript_QGraphicsBlurEffect_BlurHints_toString, qtscript_QGraphicsBlurEffect_BlurHints_equals); + qScriptRegisterMetaType(engine, qtscript_QGraphicsBlurEffect_BlurHints_toScriptValue, + qtscript_QGraphicsBlurEffect_BlurHints_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QGraphicsBlurEffect +// + +static QScriptValue qtscript_QGraphicsBlurEffect_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsBlurEffect* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsBlurEffect.%0(): this object is not a QGraphicsBlurEffect") + .arg(qtscript_QGraphicsBlurEffect_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QGraphicsBlurEffect"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsBlurEffect_throw_ambiguity_error_helper(context, + qtscript_QGraphicsBlurEffect_function_names[_id+1], + qtscript_QGraphicsBlurEffect_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsBlurEffect_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsBlurEffect(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsBlurEffect* _q_cpp_result = new QtScriptShell_QGraphicsBlurEffect(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsBlurEffect*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QGraphicsBlurEffect* _q_cpp_result = new QtScriptShell_QGraphicsBlurEffect(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsBlurEffect*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsBlurEffect_throw_ambiguity_error_helper(context, + qtscript_QGraphicsBlurEffect_function_names[_id], + qtscript_QGraphicsBlurEffect_function_signatures[_id]); +} + +static QScriptValue qtscript_QGraphicsBlurEffect_toScriptValue(QScriptEngine *engine, QGraphicsBlurEffect* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGraphicsBlurEffect_fromScriptValue(const QScriptValue &value, QGraphicsBlurEffect* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGraphicsBlurEffect_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsBlurEffect*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QGraphicsBlurEffect_toScriptValue, + qtscript_QGraphicsBlurEffect_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsBlurEffect_static_call, proto, qtscript_QGraphicsBlurEffect_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("BlurHint"), + qtscript_create_QGraphicsBlurEffect_BlurHint_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("BlurHints"), + qtscript_create_QGraphicsBlurEffect_BlurHints_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsColorizeEffect.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsColorizeEffect.cpp new file mode 100644 index 00000000..4ba47a61 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsColorizeEffect.cpp @@ -0,0 +1,154 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsColorizeEffect.h" + +static const char * const qtscript_QGraphicsColorizeEffect_function_names[] = { + "QGraphicsColorizeEffect" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QGraphicsColorizeEffect_function_signatures[] = { + "QObject parent" + // static + // prototype +"" +}; + +static const int qtscript_QGraphicsColorizeEffect_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QGraphicsColorizeEffect_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsColorizeEffect::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsColorizeEffect*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsColorizeEffect*) +Q_DECLARE_METATYPE(QGraphicsEffect*) + +// +// QGraphicsColorizeEffect +// + +static QScriptValue qtscript_QGraphicsColorizeEffect_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsColorizeEffect* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsColorizeEffect.%0(): this object is not a QGraphicsColorizeEffect") + .arg(qtscript_QGraphicsColorizeEffect_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QGraphicsColorizeEffect"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsColorizeEffect_throw_ambiguity_error_helper(context, + qtscript_QGraphicsColorizeEffect_function_names[_id+1], + qtscript_QGraphicsColorizeEffect_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsColorizeEffect_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsColorizeEffect(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsColorizeEffect* _q_cpp_result = new QtScriptShell_QGraphicsColorizeEffect(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsColorizeEffect*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QGraphicsColorizeEffect* _q_cpp_result = new QtScriptShell_QGraphicsColorizeEffect(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsColorizeEffect*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsColorizeEffect_throw_ambiguity_error_helper(context, + qtscript_QGraphicsColorizeEffect_function_names[_id], + qtscript_QGraphicsColorizeEffect_function_signatures[_id]); +} + +static QScriptValue qtscript_QGraphicsColorizeEffect_toScriptValue(QScriptEngine *engine, QGraphicsColorizeEffect* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGraphicsColorizeEffect_fromScriptValue(const QScriptValue &value, QGraphicsColorizeEffect* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGraphicsColorizeEffect_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsColorizeEffect*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QGraphicsColorizeEffect_toScriptValue, + qtscript_QGraphicsColorizeEffect_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsColorizeEffect_static_call, proto, qtscript_QGraphicsColorizeEffect_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsDropShadowEffect.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsDropShadowEffect.cpp new file mode 100644 index 00000000..1c0f8dde --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsDropShadowEffect.cpp @@ -0,0 +1,154 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsDropShadowEffect.h" + +static const char * const qtscript_QGraphicsDropShadowEffect_function_names[] = { + "QGraphicsDropShadowEffect" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QGraphicsDropShadowEffect_function_signatures[] = { + "QObject parent" + // static + // prototype +"" +}; + +static const int qtscript_QGraphicsDropShadowEffect_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QGraphicsDropShadowEffect_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsDropShadowEffect::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsDropShadowEffect*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsDropShadowEffect*) +Q_DECLARE_METATYPE(QGraphicsEffect*) + +// +// QGraphicsDropShadowEffect +// + +static QScriptValue qtscript_QGraphicsDropShadowEffect_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsDropShadowEffect* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsDropShadowEffect.%0(): this object is not a QGraphicsDropShadowEffect") + .arg(qtscript_QGraphicsDropShadowEffect_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QGraphicsDropShadowEffect"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsDropShadowEffect_throw_ambiguity_error_helper(context, + qtscript_QGraphicsDropShadowEffect_function_names[_id+1], + qtscript_QGraphicsDropShadowEffect_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsDropShadowEffect_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsDropShadowEffect(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsDropShadowEffect* _q_cpp_result = new QtScriptShell_QGraphicsDropShadowEffect(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsDropShadowEffect*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QGraphicsDropShadowEffect* _q_cpp_result = new QtScriptShell_QGraphicsDropShadowEffect(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsDropShadowEffect*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsDropShadowEffect_throw_ambiguity_error_helper(context, + qtscript_QGraphicsDropShadowEffect_function_names[_id], + qtscript_QGraphicsDropShadowEffect_function_signatures[_id]); +} + +static QScriptValue qtscript_QGraphicsDropShadowEffect_toScriptValue(QScriptEngine *engine, QGraphicsDropShadowEffect* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGraphicsDropShadowEffect_fromScriptValue(const QScriptValue &value, QGraphicsDropShadowEffect* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGraphicsDropShadowEffect_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsDropShadowEffect*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QGraphicsDropShadowEffect_toScriptValue, + qtscript_QGraphicsDropShadowEffect_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsDropShadowEffect_static_call, proto, qtscript_QGraphicsDropShadowEffect_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsEffect.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsEffect.cpp new file mode 100644 index 00000000..1eb11a2f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsEffect.cpp @@ -0,0 +1,439 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsEffect.h" + +static const char * const qtscript_QGraphicsEffect_function_names[] = { + "QGraphicsEffect" + // static + // prototype + , "boundingRect" + , "boundingRectFor" + , "toString" +}; + +static const char * const qtscript_QGraphicsEffect_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" + , "QRectF sourceRect" +"" +}; + +static const int qtscript_QGraphicsEffect_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsEffect_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsEffect::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsEffect*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsEffect*) +Q_DECLARE_METATYPE(QGraphicsEffect::PixmapPadMode) +Q_DECLARE_METATYPE(QGraphicsEffect::ChangeFlag) +Q_DECLARE_METATYPE(QFlags) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QGraphicsEffect::PixmapPadMode +// + +static const QGraphicsEffect::PixmapPadMode qtscript_QGraphicsEffect_PixmapPadMode_values[] = { + QGraphicsEffect::NoPad + , QGraphicsEffect::PadToTransparentBorder + , QGraphicsEffect::PadToEffectiveBoundingRect +}; + +static const char * const qtscript_QGraphicsEffect_PixmapPadMode_keys[] = { + "NoPad" + , "PadToTransparentBorder" + , "PadToEffectiveBoundingRect" +}; + +static QString qtscript_QGraphicsEffect_PixmapPadMode_toStringHelper(QGraphicsEffect::PixmapPadMode value) +{ + if ((value >= QGraphicsEffect::NoPad) && (value <= QGraphicsEffect::PadToEffectiveBoundingRect)) + return qtscript_QGraphicsEffect_PixmapPadMode_keys[static_cast(value)-static_cast(QGraphicsEffect::NoPad)]; + return QString(); +} + +static QScriptValue qtscript_QGraphicsEffect_PixmapPadMode_toScriptValue(QScriptEngine *engine, const QGraphicsEffect::PixmapPadMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGraphicsEffect")); + return clazz.property(qtscript_QGraphicsEffect_PixmapPadMode_toStringHelper(value)); +} + +static void qtscript_QGraphicsEffect_PixmapPadMode_fromScriptValue(const QScriptValue &value, QGraphicsEffect::PixmapPadMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGraphicsEffect_PixmapPadMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QGraphicsEffect::NoPad) && (arg <= QGraphicsEffect::PadToEffectiveBoundingRect)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("PixmapPadMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGraphicsEffect_PixmapPadMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsEffect::PixmapPadMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsEffect_PixmapPadMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsEffect::PixmapPadMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGraphicsEffect_PixmapPadMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGraphicsEffect_PixmapPadMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGraphicsEffect_PixmapPadMode, + qtscript_QGraphicsEffect_PixmapPadMode_valueOf, qtscript_QGraphicsEffect_PixmapPadMode_toString); + qScriptRegisterMetaType(engine, qtscript_QGraphicsEffect_PixmapPadMode_toScriptValue, + qtscript_QGraphicsEffect_PixmapPadMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGraphicsEffect_PixmapPadMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGraphicsEffect_PixmapPadMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGraphicsEffect::ChangeFlag +// + +static const QGraphicsEffect::ChangeFlag qtscript_QGraphicsEffect_ChangeFlag_values[] = { + QGraphicsEffect::SourceAttached + , QGraphicsEffect::SourceDetached + , QGraphicsEffect::SourceBoundingRectChanged + , QGraphicsEffect::SourceInvalidated +}; + +static const char * const qtscript_QGraphicsEffect_ChangeFlag_keys[] = { + "SourceAttached" + , "SourceDetached" + , "SourceBoundingRectChanged" + , "SourceInvalidated" +}; + +static QString qtscript_QGraphicsEffect_ChangeFlag_toStringHelper(QGraphicsEffect::ChangeFlag value) +{ + for (int i = 0; i < 4; ++i) { + if (qtscript_QGraphicsEffect_ChangeFlag_values[i] == value) + return QString::fromLatin1(qtscript_QGraphicsEffect_ChangeFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QGraphicsEffect_ChangeFlag_toScriptValue(QScriptEngine *engine, const QGraphicsEffect::ChangeFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGraphicsEffect")); + return clazz.property(qtscript_QGraphicsEffect_ChangeFlag_toStringHelper(value)); +} + +static void qtscript_QGraphicsEffect_ChangeFlag_fromScriptValue(const QScriptValue &value, QGraphicsEffect::ChangeFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGraphicsEffect_ChangeFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 4; ++i) { + if (qtscript_QGraphicsEffect_ChangeFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ChangeFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGraphicsEffect_ChangeFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsEffect::ChangeFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsEffect_ChangeFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsEffect::ChangeFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGraphicsEffect_ChangeFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGraphicsEffect_ChangeFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGraphicsEffect_ChangeFlag, + qtscript_QGraphicsEffect_ChangeFlag_valueOf, qtscript_QGraphicsEffect_ChangeFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QGraphicsEffect_ChangeFlag_toScriptValue, + qtscript_QGraphicsEffect_ChangeFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGraphicsEffect_ChangeFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGraphicsEffect_ChangeFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGraphicsEffect::ChangeFlags +// + +static QScriptValue qtscript_QGraphicsEffect_ChangeFlags_toScriptValue(QScriptEngine *engine, const QGraphicsEffect::ChangeFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QGraphicsEffect_ChangeFlags_fromScriptValue(const QScriptValue &value, QGraphicsEffect::ChangeFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QGraphicsEffect_ChangeFlags(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsEffect::ChangeFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("ChangeFlags(): argument %0 is not of type ChangeFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QGraphicsEffect_ChangeFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsEffect::ChangeFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsEffect_ChangeFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsEffect::ChangeFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 4; ++i) { + if ((value & qtscript_QGraphicsEffect_ChangeFlag_values[i]) == qtscript_QGraphicsEffect_ChangeFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QGraphicsEffect_ChangeFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QGraphicsEffect_ChangeFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QGraphicsEffect_ChangeFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QGraphicsEffect_ChangeFlags, qtscript_QGraphicsEffect_ChangeFlags_valueOf, + qtscript_QGraphicsEffect_ChangeFlags_toString, qtscript_QGraphicsEffect_ChangeFlags_equals); + qScriptRegisterMetaType(engine, qtscript_QGraphicsEffect_ChangeFlags_toScriptValue, + qtscript_QGraphicsEffect_ChangeFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QGraphicsEffect +// + +static QScriptValue qtscript_QGraphicsEffect_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsEffect* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsEffect.%0(): this object is not a QGraphicsEffect") + .arg(qtscript_QGraphicsEffect_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->boundingRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->boundingRectFor(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QGraphicsEffect"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsEffect_throw_ambiguity_error_helper(context, + qtscript_QGraphicsEffect_function_names[_id+1], + qtscript_QGraphicsEffect_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsEffect_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsEffect(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsEffect* _q_cpp_result = new QtScriptShell_QGraphicsEffect(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsEffect*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QGraphicsEffect* _q_cpp_result = new QtScriptShell_QGraphicsEffect(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsEffect*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsEffect_throw_ambiguity_error_helper(context, + qtscript_QGraphicsEffect_function_names[_id], + qtscript_QGraphicsEffect_function_signatures[_id]); +} + +static QScriptValue qtscript_QGraphicsEffect_toScriptValue(QScriptEngine *engine, QGraphicsEffect* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGraphicsEffect_fromScriptValue(const QScriptValue &value, QGraphicsEffect* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGraphicsEffect_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsEffect*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsEffect_prototype_call, qtscript_QGraphicsEffect_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsEffect_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGraphicsEffect_toScriptValue, + qtscript_QGraphicsEffect_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsEffect_static_call, proto, qtscript_QGraphicsEffect_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("PixmapPadMode"), + qtscript_create_QGraphicsEffect_PixmapPadMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ChangeFlag"), + qtscript_create_QGraphicsEffect_ChangeFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ChangeFlags"), + qtscript_create_QGraphicsEffect_ChangeFlags_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsEllipseItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsEllipseItem.cpp new file mode 100644 index 00000000..0f05f658 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsEllipseItem.cpp @@ -0,0 +1,266 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsEllipseItem.h" + +static const char * const qtscript_QGraphicsEllipseItem_function_names[] = { + "QGraphicsEllipseItem" + // static + // prototype + , "rect" + , "setRect" + , "setSpanAngle" + , "setStartAngle" + , "spanAngle" + , "startAngle" + , "toString" +}; + +static const char * const qtscript_QGraphicsEllipseItem_function_signatures[] = { + "QGraphicsItem parent\nQRectF rect, QGraphicsItem parent\nqreal x, qreal y, qreal w, qreal h, QGraphicsItem parent" + // static + // prototype + , "" + , "QRectF rect\nqreal x, qreal y, qreal w, qreal h" + , "int angle" + , "int angle" + , "" + , "" +"" +}; + +static const int qtscript_QGraphicsEllipseItem_function_lengths[] = { + 5 + // static + // prototype + , 0 + , 4 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGraphicsEllipseItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsEllipseItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsEllipseItem*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsEllipseItem*) +Q_DECLARE_METATYPE(QAbstractGraphicsShapeItem*) + +// +// QGraphicsEllipseItem +// + +static QScriptValue qtscript_QGraphicsEllipseItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsEllipseItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsEllipseItem.%0(): this object is not a QGraphicsEllipseItem") + .arg(qtscript_QGraphicsEllipseItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->rect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRect(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setSpanAngle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setStartAngle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->spanAngle(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->startAngle(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: { + QString result = QString::fromLatin1("QGraphicsEllipseItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsEllipseItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsEllipseItem_function_names[_id+1], + qtscript_QGraphicsEllipseItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsEllipseItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsEllipseItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsEllipseItem* _q_cpp_result = new QtScriptShell_QGraphicsEllipseItem(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsEllipseItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsEllipseItem* _q_cpp_result = new QtScriptShell_QGraphicsEllipseItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsEllipseItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsEllipseItem* _q_cpp_result = new QtScriptShell_QGraphicsEllipseItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsEllipseItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGraphicsEllipseItem* _q_cpp_result = new QtScriptShell_QGraphicsEllipseItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsEllipseItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QtScriptShell_QGraphicsEllipseItem* _q_cpp_result = new QtScriptShell_QGraphicsEllipseItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsEllipseItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QGraphicsItem* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QtScriptShell_QGraphicsEllipseItem* _q_cpp_result = new QtScriptShell_QGraphicsEllipseItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsEllipseItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsEllipseItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsEllipseItem_function_names[_id], + qtscript_QGraphicsEllipseItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsEllipseItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsEllipseItem*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsEllipseItem_prototype_call, qtscript_QGraphicsEllipseItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsEllipseItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsEllipseItem_static_call, proto, qtscript_QGraphicsEllipseItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsGridLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsGridLayout.cpp new file mode 100644 index 00000000..7135be0c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsGridLayout.cpp @@ -0,0 +1,607 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsGridLayout.h" + +static const char * const qtscript_QGraphicsGridLayout_function_names[] = { + "QGraphicsGridLayout" + // static + // prototype + , "addItem" + , "alignment" + , "columnAlignment" + , "columnCount" + , "columnMaximumWidth" + , "columnMinimumWidth" + , "columnPreferredWidth" + , "columnSpacing" + , "columnStretchFactor" + , "horizontalSpacing" + , "itemAt" + , "removeItem" + , "rowAlignment" + , "rowCount" + , "rowMaximumHeight" + , "rowMinimumHeight" + , "rowPreferredHeight" + , "rowSpacing" + , "rowStretchFactor" + , "setAlignment" + , "setColumnAlignment" + , "setColumnFixedWidth" + , "setColumnMaximumWidth" + , "setColumnMinimumWidth" + , "setColumnPreferredWidth" + , "setColumnSpacing" + , "setColumnStretchFactor" + , "setHorizontalSpacing" + , "setRowAlignment" + , "setRowFixedHeight" + , "setRowMaximumHeight" + , "setRowMinimumHeight" + , "setRowPreferredHeight" + , "setRowSpacing" + , "setRowStretchFactor" + , "setSpacing" + , "setVerticalSpacing" + , "verticalSpacing" + , "toString" +}; + +static const char * const qtscript_QGraphicsGridLayout_function_signatures[] = { + "QGraphicsLayoutItem parent" + // static + // prototype + , "QGraphicsLayoutItem item, int row, int column, Alignment alignment\nQGraphicsLayoutItem item, int row, int column, int rowSpan, int columnSpan, Alignment alignment" + , "QGraphicsLayoutItem item" + , "int column" + , "" + , "int column" + , "int column" + , "int column" + , "int column" + , "int column" + , "" + , "int row, int column" + , "QGraphicsLayoutItem item" + , "int row" + , "" + , "int row" + , "int row" + , "int row" + , "int row" + , "int row" + , "QGraphicsLayoutItem item, Alignment alignment" + , "int column, Alignment alignment" + , "int column, qreal width" + , "int column, qreal width" + , "int column, qreal width" + , "int column, qreal width" + , "int column, qreal spacing" + , "int column, int stretch" + , "qreal spacing" + , "int row, Alignment alignment" + , "int row, qreal height" + , "int row, qreal height" + , "int row, qreal height" + , "int row, qreal height" + , "int row, qreal spacing" + , "int row, int stretch" + , "qreal spacing" + , "qreal spacing" + , "" +"" +}; + +static const int qtscript_QGraphicsGridLayout_function_lengths[] = { + 1 + // static + // prototype + , 6 + , 1 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 2 + , 1 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 2 + , 2 + , 2 + , 2 + , 2 + , 2 + , 2 + , 1 + , 2 + , 2 + , 2 + , 2 + , 2 + , 2 + , 2 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGraphicsGridLayout_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsGridLayout::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsGridLayout*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsGridLayout*) +Q_DECLARE_METATYPE(QGraphicsLayoutItem*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QGraphicsLayout*) + +// +// QGraphicsGridLayout +// + +static QScriptValue qtscript_QGraphicsGridLayout_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 38; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsGridLayout* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsGridLayout.%0(): this object is not a QGraphicsGridLayout") + .arg(qtscript_QGraphicsGridLayout_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 3) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->addItem(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + _q_self->addItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + _q_self->addItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + _q_self->addItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_result = _q_self->alignment(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QFlags _q_result = _q_self->columnAlignment(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->columnCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_result = _q_self->columnMaximumWidth(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_result = _q_self->columnMinimumWidth(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_result = _q_self->columnPreferredWidth(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_result = _q_self->columnSpacing(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->columnStretchFactor(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->horizontalSpacing(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QGraphicsLayoutItem* _q_result = _q_self->itemAt(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QFlags _q_result = _q_self->rowAlignment(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + int _q_result = _q_self->rowCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_result = _q_self->rowMaximumHeight(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_result = _q_self->rowMinimumHeight(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_result = _q_self->rowPreferredHeight(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_result = _q_self->rowSpacing(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->rowStretchFactor(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 2) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + _q_self->setAlignment(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + _q_self->setColumnAlignment(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setColumnFixedWidth(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setColumnMaximumWidth(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setColumnMinimumWidth(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setColumnPreferredWidth(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setColumnSpacing(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setColumnStretchFactor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setHorizontalSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + _q_self->setRowAlignment(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setRowFixedHeight(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setRowMaximumHeight(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setRowMinimumHeight(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setRowPreferredHeight(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setRowSpacing(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setRowStretchFactor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setVerticalSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->verticalSpacing(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 38: { + QString result = QString::fromLatin1("QGraphicsGridLayout"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsGridLayout_throw_ambiguity_error_helper(context, + qtscript_QGraphicsGridLayout_function_names[_id+1], + qtscript_QGraphicsGridLayout_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsGridLayout_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsGridLayout(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsGridLayout* _q_cpp_result = new QtScriptShell_QGraphicsGridLayout(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsGridLayout*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsGridLayout* _q_cpp_result = new QtScriptShell_QGraphicsGridLayout(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsGridLayout*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsGridLayout_throw_ambiguity_error_helper(context, + qtscript_QGraphicsGridLayout_function_names[_id], + qtscript_QGraphicsGridLayout_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsGridLayout_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsGridLayout*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 39; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsGridLayout_prototype_call, qtscript_QGraphicsGridLayout_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsGridLayout_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsGridLayout_static_call, proto, qtscript_QGraphicsGridLayout_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsItem.cpp new file mode 100644 index 00000000..48df659d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsItem.cpp @@ -0,0 +1,2501 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsItem.h" + +static const char * const qtscript_QGraphicsItem_function_names[] = { + "QGraphicsItem" + // static + // prototype + , "acceptDrops" + , "acceptHoverEvents" + , "acceptTouchEvents" + , "acceptedMouseButtons" + , "advance" + , "boundingRect" + , "boundingRegion" + , "boundingRegionGranularity" + , "cacheMode" + , "childItems" + , "childrenBoundingRect" + , "clearFocus" + , "clipPath" + , "collidesWithItem" + , "collidesWithPath" + , "collidingItems" + , "commonAncestorItem" + , "contains" + , "cursor" + , "data" + , "deviceTransform" + , "effectiveOpacity" + , "ensureVisible" + , "filtersChildEvents" + , "flags" + , "focusItem" + , "focusProxy" + , "focusScopeItem" + , "grabKeyboard" + , "grabMouse" + , "graphicsEffect" + , "group" + , "handlesChildEvents" + , "hasCursor" + , "hasFocus" + , "hide" + , "inputMethodHints" + , "installSceneEventFilter" + , "isActive" + , "isAncestorOf" + , "isBlockedByModalPanel" + , "isClipped" + , "isEnabled" + , "isObscured" + , "isObscuredBy" + , "isPanel" + , "isSelected" + , "isUnderMouse" + , "isVisible" + , "isVisibleTo" + , "isWidget" + , "isWindow" + , "itemTransform" + , "mapFromItem" + , "mapFromParent" + , "mapFromScene" + , "mapRectFromItem" + , "mapRectFromParent" + , "mapRectFromScene" + , "mapRectToItem" + , "mapRectToParent" + , "mapRectToScene" + , "mapToItem" + , "mapToParent" + , "mapToScene" + , "moveBy" + , "opacity" + , "opaqueArea" + , "paint" + , "panel" + , "panelModality" + , "parentItem" + , "parentObject" + , "parentWidget" + , "pos" + , "removeSceneEventFilter" + , "resetTransform" + , "rotation" + , "scale" + , "scene" + , "sceneBoundingRect" + , "scenePos" + , "sceneTransform" + , "scroll" + , "setAcceptDrops" + , "setAcceptHoverEvents" + , "setAcceptTouchEvents" + , "setAcceptedMouseButtons" + , "setActive" + , "setBoundingRegionGranularity" + , "setCacheMode" + , "setCursor" + , "setData" + , "setEnabled" + , "setFiltersChildEvents" + , "setFlag" + , "setFlags" + , "setFocus" + , "setFocusProxy" + , "setGraphicsEffect" + , "setGroup" + , "setHandlesChildEvents" + , "setInputMethodHints" + , "setOpacity" + , "setPanelModality" + , "setParentItem" + , "setPos" + , "setRotation" + , "setScale" + , "setSelected" + , "setToolTip" + , "setTransform" + , "setTransformOriginPoint" + , "setTransformations" + , "setVisible" + , "setX" + , "setY" + , "setZValue" + , "shape" + , "show" + , "stackBefore" + , "toGraphicsObject" + , "toolTip" + , "topLevelItem" + , "topLevelWidget" + , "transform" + , "transformOriginPoint" + , "transformations" + , "type" + , "ungrabKeyboard" + , "ungrabMouse" + , "unsetCursor" + , "update" + , "window" + , "x" + , "y" + , "zValue" + , "toString" +}; + +static const char * const qtscript_QGraphicsItem_function_signatures[] = { + "QGraphicsItem parent" + // static + // prototype + , "" + , "" + , "" + , "" + , "int phase" + , "" + , "QTransform itemToDeviceTransform" + , "" + , "" + , "" + , "" + , "" + , "" + , "QGraphicsItem other, ItemSelectionMode mode" + , "QPainterPath path, ItemSelectionMode mode" + , "ItemSelectionMode mode" + , "QGraphicsItem other" + , "QPointF point" + , "" + , "int key" + , "QTransform viewportTransform" + , "" + , "QRectF rect, int xmargin, int ymargin\nqreal x, qreal y, qreal w, qreal h, int xmargin, int ymargin" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QGraphicsItem filterItem" + , "" + , "QGraphicsItem child" + , "QGraphicsItem blockingPanel" + , "" + , "" + , "QRectF rect\nqreal x, qreal y, qreal w, qreal h" + , "QGraphicsItem item" + , "" + , "" + , "" + , "" + , "QGraphicsItem parent" + , "" + , "" + , "QGraphicsItem other, bool ok" + , "QGraphicsItem item, QPainterPath path\nQGraphicsItem item, QPointF point\nQGraphicsItem item, QPolygonF polygon\nQGraphicsItem item, QRectF rect\nQGraphicsItem item, qreal x, qreal y\nQGraphicsItem item, qreal x, qreal y, qreal w, qreal h" + , "QPainterPath path\nQPointF point\nQPolygonF polygon\nQRectF rect\nqreal x, qreal y\nqreal x, qreal y, qreal w, qreal h" + , "QPainterPath path\nQPointF point\nQPolygonF polygon\nQRectF rect\nqreal x, qreal y\nqreal x, qreal y, qreal w, qreal h" + , "QGraphicsItem item, QRectF rect\nQGraphicsItem item, qreal x, qreal y, qreal w, qreal h" + , "QRectF rect\nqreal x, qreal y, qreal w, qreal h" + , "QRectF rect\nqreal x, qreal y, qreal w, qreal h" + , "QGraphicsItem item, QRectF rect\nQGraphicsItem item, qreal x, qreal y, qreal w, qreal h" + , "QRectF rect\nqreal x, qreal y, qreal w, qreal h" + , "QRectF rect\nqreal x, qreal y, qreal w, qreal h" + , "QGraphicsItem item, QPainterPath path\nQGraphicsItem item, QPointF point\nQGraphicsItem item, QPolygonF polygon\nQGraphicsItem item, QRectF rect\nQGraphicsItem item, qreal x, qreal y\nQGraphicsItem item, qreal x, qreal y, qreal w, qreal h" + , "QPainterPath path\nQPointF point\nQPolygonF polygon\nQRectF rect\nqreal x, qreal y\nqreal x, qreal y, qreal w, qreal h" + , "QPainterPath path\nQPointF point\nQPolygonF polygon\nQRectF rect\nqreal x, qreal y\nqreal x, qreal y, qreal w, qreal h" + , "qreal dx, qreal dy" + , "" + , "" + , "QPainter painter, QStyleOptionGraphicsItem option, QWidget widget" + , "" + , "" + , "" + , "" + , "" + , "" + , "QGraphicsItem filterItem" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "qreal dx, qreal dy, QRectF rect" + , "bool on" + , "bool enabled" + , "bool enabled" + , "MouseButtons buttons" + , "bool active" + , "qreal granularity" + , "CacheMode mode, QSize cacheSize" + , "QCursor cursor" + , "int key, Object value" + , "bool enabled" + , "bool enabled" + , "GraphicsItemFlag flag, bool enabled" + , "GraphicsItemFlags flags" + , "FocusReason focusReason" + , "QGraphicsItem item" + , "QGraphicsEffect effect" + , "QGraphicsItemGroup group" + , "bool enabled" + , "InputMethodHints hints" + , "qreal opacity" + , "PanelModality panelModality" + , "QGraphicsItem parent" + , "QPointF pos\nqreal x, qreal y" + , "qreal angle" + , "qreal scale" + , "bool selected" + , "String toolTip" + , "QTransform matrix, bool combine" + , "QPointF origin\nqreal ax, qreal ay" + , "List transformations" + , "bool visible" + , "qreal x" + , "qreal y" + , "qreal z" + , "" + , "" + , "QGraphicsItem sibling" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QRectF rect\nqreal x, qreal y, qreal width, qreal height" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QGraphicsItem_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 2 + , 2 + , 1 + , 1 + , 1 + , 0 + , 1 + , 1 + , 0 + , 6 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 1 + , 0 + , 0 + , 4 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 2 + , 5 + , 4 + , 4 + , 5 + , 4 + , 4 + , 5 + , 4 + , 4 + , 5 + , 4 + , 4 + , 2 + , 0 + , 0 + , 3 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 3 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 2 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 2 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 4 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGraphicsItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsItem*) +Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemChange) +Q_DECLARE_METATYPE(QGraphicsItem::PanelModality) +Q_DECLARE_METATYPE(QGraphicsItem::CacheMode) +Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QGraphicsEffect*) +Q_DECLARE_METATYPE(QGraphicsItemGroup*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QGraphicsItem**) +Q_DECLARE_METATYPE(bool*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QGraphicsObject*) +Q_DECLARE_METATYPE(QGraphicsWidget*) +Q_DECLARE_METATYPE(QGraphicsScene*) +Q_DECLARE_METATYPE(Qt::FocusReason) +Q_DECLARE_METATYPE(QGraphicsTransform*) +Q_DECLARE_METATYPE(QList) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QGraphicsItem::GraphicsItemChange +// + +static const QGraphicsItem::GraphicsItemChange qtscript_QGraphicsItem_GraphicsItemChange_values[] = { + QGraphicsItem::ItemPositionChange + , QGraphicsItem::ItemMatrixChange + , QGraphicsItem::ItemVisibleChange + , QGraphicsItem::ItemEnabledChange + , QGraphicsItem::ItemSelectedChange + , QGraphicsItem::ItemParentChange + , QGraphicsItem::ItemChildAddedChange + , QGraphicsItem::ItemChildRemovedChange + , QGraphicsItem::ItemTransformChange + , QGraphicsItem::ItemPositionHasChanged + , QGraphicsItem::ItemTransformHasChanged + , QGraphicsItem::ItemSceneChange + , QGraphicsItem::ItemVisibleHasChanged + , QGraphicsItem::ItemEnabledHasChanged + , QGraphicsItem::ItemSelectedHasChanged + , QGraphicsItem::ItemParentHasChanged + , QGraphicsItem::ItemSceneHasChanged + , QGraphicsItem::ItemCursorChange + , QGraphicsItem::ItemCursorHasChanged + , QGraphicsItem::ItemToolTipChange + , QGraphicsItem::ItemToolTipHasChanged + , QGraphicsItem::ItemFlagsChange + , QGraphicsItem::ItemFlagsHaveChanged + , QGraphicsItem::ItemZValueChange + , QGraphicsItem::ItemZValueHasChanged + , QGraphicsItem::ItemOpacityChange + , QGraphicsItem::ItemOpacityHasChanged + , QGraphicsItem::ItemScenePositionHasChanged + , QGraphicsItem::ItemRotationChange + , QGraphicsItem::ItemRotationHasChanged + , QGraphicsItem::ItemScaleChange + , QGraphicsItem::ItemScaleHasChanged + , QGraphicsItem::ItemTransformOriginPointChange + , QGraphicsItem::ItemTransformOriginPointHasChanged +}; + +static const char * const qtscript_QGraphicsItem_GraphicsItemChange_keys[] = { + "ItemPositionChange" + , "ItemMatrixChange" + , "ItemVisibleChange" + , "ItemEnabledChange" + , "ItemSelectedChange" + , "ItemParentChange" + , "ItemChildAddedChange" + , "ItemChildRemovedChange" + , "ItemTransformChange" + , "ItemPositionHasChanged" + , "ItemTransformHasChanged" + , "ItemSceneChange" + , "ItemVisibleHasChanged" + , "ItemEnabledHasChanged" + , "ItemSelectedHasChanged" + , "ItemParentHasChanged" + , "ItemSceneHasChanged" + , "ItemCursorChange" + , "ItemCursorHasChanged" + , "ItemToolTipChange" + , "ItemToolTipHasChanged" + , "ItemFlagsChange" + , "ItemFlagsHaveChanged" + , "ItemZValueChange" + , "ItemZValueHasChanged" + , "ItemOpacityChange" + , "ItemOpacityHasChanged" + , "ItemScenePositionHasChanged" + , "ItemRotationChange" + , "ItemRotationHasChanged" + , "ItemScaleChange" + , "ItemScaleHasChanged" + , "ItemTransformOriginPointChange" + , "ItemTransformOriginPointHasChanged" +}; + +static QString qtscript_QGraphicsItem_GraphicsItemChange_toStringHelper(QGraphicsItem::GraphicsItemChange value) +{ + if ((value >= QGraphicsItem::ItemPositionChange) && (value <= QGraphicsItem::ItemTransformOriginPointHasChanged)) + return qtscript_QGraphicsItem_GraphicsItemChange_keys[static_cast(value)-static_cast(QGraphicsItem::ItemPositionChange)]; + return QString(); +} + +static QScriptValue qtscript_QGraphicsItem_GraphicsItemChange_toScriptValue(QScriptEngine *engine, const QGraphicsItem::GraphicsItemChange &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGraphicsItem")); + return clazz.property(qtscript_QGraphicsItem_GraphicsItemChange_toStringHelper(value)); +} + +static void qtscript_QGraphicsItem_GraphicsItemChange_fromScriptValue(const QScriptValue &value, QGraphicsItem::GraphicsItemChange &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGraphicsItem_GraphicsItemChange(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QGraphicsItem::ItemPositionChange) && (arg <= QGraphicsItem::ItemTransformOriginPointHasChanged)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("GraphicsItemChange(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGraphicsItem_GraphicsItemChange_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsItem::GraphicsItemChange value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsItem_GraphicsItemChange_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsItem::GraphicsItemChange value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGraphicsItem_GraphicsItemChange_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGraphicsItem_GraphicsItemChange_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGraphicsItem_GraphicsItemChange, + qtscript_QGraphicsItem_GraphicsItemChange_valueOf, qtscript_QGraphicsItem_GraphicsItemChange_toString); + qScriptRegisterMetaType(engine, qtscript_QGraphicsItem_GraphicsItemChange_toScriptValue, + qtscript_QGraphicsItem_GraphicsItemChange_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 34; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGraphicsItem_GraphicsItemChange_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGraphicsItem_GraphicsItemChange_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGraphicsItem::PanelModality +// + +static const QGraphicsItem::PanelModality qtscript_QGraphicsItem_PanelModality_values[] = { + QGraphicsItem::NonModal + , QGraphicsItem::PanelModal + , QGraphicsItem::SceneModal +}; + +static const char * const qtscript_QGraphicsItem_PanelModality_keys[] = { + "NonModal" + , "PanelModal" + , "SceneModal" +}; + +static QString qtscript_QGraphicsItem_PanelModality_toStringHelper(QGraphicsItem::PanelModality value) +{ + if ((value >= QGraphicsItem::NonModal) && (value <= QGraphicsItem::SceneModal)) + return qtscript_QGraphicsItem_PanelModality_keys[static_cast(value)-static_cast(QGraphicsItem::NonModal)]; + return QString(); +} + +static QScriptValue qtscript_QGraphicsItem_PanelModality_toScriptValue(QScriptEngine *engine, const QGraphicsItem::PanelModality &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGraphicsItem")); + return clazz.property(qtscript_QGraphicsItem_PanelModality_toStringHelper(value)); +} + +static void qtscript_QGraphicsItem_PanelModality_fromScriptValue(const QScriptValue &value, QGraphicsItem::PanelModality &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGraphicsItem_PanelModality(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QGraphicsItem::NonModal) && (arg <= QGraphicsItem::SceneModal)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("PanelModality(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGraphicsItem_PanelModality_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsItem::PanelModality value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsItem_PanelModality_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsItem::PanelModality value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGraphicsItem_PanelModality_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGraphicsItem_PanelModality_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGraphicsItem_PanelModality, + qtscript_QGraphicsItem_PanelModality_valueOf, qtscript_QGraphicsItem_PanelModality_toString); + qScriptRegisterMetaType(engine, qtscript_QGraphicsItem_PanelModality_toScriptValue, + qtscript_QGraphicsItem_PanelModality_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGraphicsItem_PanelModality_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGraphicsItem_PanelModality_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGraphicsItem::CacheMode +// + +static const QGraphicsItem::CacheMode qtscript_QGraphicsItem_CacheMode_values[] = { + QGraphicsItem::NoCache + , QGraphicsItem::ItemCoordinateCache + , QGraphicsItem::DeviceCoordinateCache +}; + +static const char * const qtscript_QGraphicsItem_CacheMode_keys[] = { + "NoCache" + , "ItemCoordinateCache" + , "DeviceCoordinateCache" +}; + +static QString qtscript_QGraphicsItem_CacheMode_toStringHelper(QGraphicsItem::CacheMode value) +{ + if ((value >= QGraphicsItem::NoCache) && (value <= QGraphicsItem::DeviceCoordinateCache)) + return qtscript_QGraphicsItem_CacheMode_keys[static_cast(value)-static_cast(QGraphicsItem::NoCache)]; + return QString(); +} + +static QScriptValue qtscript_QGraphicsItem_CacheMode_toScriptValue(QScriptEngine *engine, const QGraphicsItem::CacheMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGraphicsItem")); + return clazz.property(qtscript_QGraphicsItem_CacheMode_toStringHelper(value)); +} + +static void qtscript_QGraphicsItem_CacheMode_fromScriptValue(const QScriptValue &value, QGraphicsItem::CacheMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGraphicsItem_CacheMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QGraphicsItem::NoCache) && (arg <= QGraphicsItem::DeviceCoordinateCache)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("CacheMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGraphicsItem_CacheMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsItem::CacheMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsItem_CacheMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsItem::CacheMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGraphicsItem_CacheMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGraphicsItem_CacheMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGraphicsItem_CacheMode, + qtscript_QGraphicsItem_CacheMode_valueOf, qtscript_QGraphicsItem_CacheMode_toString); + qScriptRegisterMetaType(engine, qtscript_QGraphicsItem_CacheMode_toScriptValue, + qtscript_QGraphicsItem_CacheMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGraphicsItem_CacheMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGraphicsItem_CacheMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGraphicsItem::GraphicsItemFlag +// + +static const QGraphicsItem::GraphicsItemFlag qtscript_QGraphicsItem_GraphicsItemFlag_values[] = { + QGraphicsItem::ItemIsMovable + , QGraphicsItem::ItemIsSelectable + , QGraphicsItem::ItemIsFocusable + , QGraphicsItem::ItemClipsToShape + , QGraphicsItem::ItemClipsChildrenToShape + , QGraphicsItem::ItemIgnoresTransformations + , QGraphicsItem::ItemIgnoresParentOpacity + , QGraphicsItem::ItemDoesntPropagateOpacityToChildren + , QGraphicsItem::ItemStacksBehindParent + , QGraphicsItem::ItemUsesExtendedStyleOption + , QGraphicsItem::ItemHasNoContents + , QGraphicsItem::ItemSendsGeometryChanges + , QGraphicsItem::ItemAcceptsInputMethod + , QGraphicsItem::ItemNegativeZStacksBehindParent + , QGraphicsItem::ItemIsPanel + , QGraphicsItem::ItemIsFocusScope + , QGraphicsItem::ItemSendsScenePositionChanges + , QGraphicsItem::ItemStopsClickFocusPropagation + , QGraphicsItem::ItemStopsFocusHandling + , QGraphicsItem::ItemContainsChildrenInShape +}; + +static const char * const qtscript_QGraphicsItem_GraphicsItemFlag_keys[] = { + "ItemIsMovable" + , "ItemIsSelectable" + , "ItemIsFocusable" + , "ItemClipsToShape" + , "ItemClipsChildrenToShape" + , "ItemIgnoresTransformations" + , "ItemIgnoresParentOpacity" + , "ItemDoesntPropagateOpacityToChildren" + , "ItemStacksBehindParent" + , "ItemUsesExtendedStyleOption" + , "ItemHasNoContents" + , "ItemSendsGeometryChanges" + , "ItemAcceptsInputMethod" + , "ItemNegativeZStacksBehindParent" + , "ItemIsPanel" + , "ItemIsFocusScope" + , "ItemSendsScenePositionChanges" + , "ItemStopsClickFocusPropagation" + , "ItemStopsFocusHandling" + , "ItemContainsChildrenInShape" +}; + +static QString qtscript_QGraphicsItem_GraphicsItemFlag_toStringHelper(QGraphicsItem::GraphicsItemFlag value) +{ + for (int i = 0; i < 20; ++i) { + if (qtscript_QGraphicsItem_GraphicsItemFlag_values[i] == value) + return QString::fromLatin1(qtscript_QGraphicsItem_GraphicsItemFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QGraphicsItem_GraphicsItemFlag_toScriptValue(QScriptEngine *engine, const QGraphicsItem::GraphicsItemFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGraphicsItem")); + return clazz.property(qtscript_QGraphicsItem_GraphicsItemFlag_toStringHelper(value)); +} + +static void qtscript_QGraphicsItem_GraphicsItemFlag_fromScriptValue(const QScriptValue &value, QGraphicsItem::GraphicsItemFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGraphicsItem_GraphicsItemFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 20; ++i) { + if (qtscript_QGraphicsItem_GraphicsItemFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("GraphicsItemFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGraphicsItem_GraphicsItemFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsItem::GraphicsItemFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsItem_GraphicsItemFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsItem::GraphicsItemFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGraphicsItem_GraphicsItemFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGraphicsItem_GraphicsItemFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGraphicsItem_GraphicsItemFlag, + qtscript_QGraphicsItem_GraphicsItemFlag_valueOf, qtscript_QGraphicsItem_GraphicsItemFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QGraphicsItem_GraphicsItemFlag_toScriptValue, + qtscript_QGraphicsItem_GraphicsItemFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 20; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGraphicsItem_GraphicsItemFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGraphicsItem_GraphicsItemFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGraphicsItem::GraphicsItemFlags +// + +static QScriptValue qtscript_QGraphicsItem_GraphicsItemFlags_toScriptValue(QScriptEngine *engine, const QGraphicsItem::GraphicsItemFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QGraphicsItem_GraphicsItemFlags_fromScriptValue(const QScriptValue &value, QGraphicsItem::GraphicsItemFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QGraphicsItem_GraphicsItemFlags(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsItem::GraphicsItemFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("GraphicsItemFlags(): argument %0 is not of type GraphicsItemFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QGraphicsItem_GraphicsItemFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsItem::GraphicsItemFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsItem_GraphicsItemFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsItem::GraphicsItemFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 20; ++i) { + if ((value & qtscript_QGraphicsItem_GraphicsItemFlag_values[i]) == qtscript_QGraphicsItem_GraphicsItemFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QGraphicsItem_GraphicsItemFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QGraphicsItem_GraphicsItemFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QGraphicsItem_GraphicsItemFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QGraphicsItem_GraphicsItemFlags, qtscript_QGraphicsItem_GraphicsItemFlags_valueOf, + qtscript_QGraphicsItem_GraphicsItemFlags_toString, qtscript_QGraphicsItem_GraphicsItemFlags_equals); + qScriptRegisterMetaType(engine, qtscript_QGraphicsItem_GraphicsItemFlags_toScriptValue, + qtscript_QGraphicsItem_GraphicsItemFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QGraphicsItem +// + +static QScriptValue qtscript_QGraphicsItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 137; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsItem.%0(): this object is not a QGraphicsItem") + .arg(qtscript_QGraphicsItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->acceptDrops(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->acceptHoverEvents(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->acceptTouchEvents(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->acceptedMouseButtons(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->advance(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->boundingRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRegion _q_result = _q_self->boundingRegion(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->boundingRegionGranularity(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QGraphicsItem::CacheMode _q_result = _q_self->cacheMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->childItems(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->childrenBoundingRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + _q_self->clearFocus(); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QPainterPath _q_result = _q_self->clipPath(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->collidesWithItem(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->collidesWithItem(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->collidesWithPath(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->collidesWithPath(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->collidingItems(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + Qt::ItemSelectionMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->collidingItems(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsItem* _q_result = _q_self->commonAncestorItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QCursor _q_result = _q_self->cursor(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_result = _q_self->data(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform _q_result = _q_self->deviceTransform(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->effectiveOpacity(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + _q_self->ensureVisible(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->ensureVisible(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->ensureVisible(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->ensureVisible(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->ensureVisible(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + int _q_arg4 = context->argument(4).toInt32(); + _q_self->ensureVisible(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + int _q_arg4 = context->argument(4).toInt32(); + int _q_arg5 = context->argument(5).toInt32(); + _q_self->ensureVisible(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->filtersChildEvents(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->flags(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + QGraphicsItem* _q_result = _q_self->focusItem(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + QGraphicsItem* _q_result = _q_self->focusProxy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + QGraphicsItem* _q_result = _q_self->focusScopeItem(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 0) { + _q_self->grabKeyboard(); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 0) { + _q_self->grabMouse(); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 0) { + QGraphicsEffect* _q_result = _q_self->graphicsEffect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 0) { + QGraphicsItemGroup* _q_result = _q_self->group(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->handlesChildEvents(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasCursor(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 34: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasFocus(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 35: + if (context->argumentCount() == 0) { + _q_self->hide(); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->inputMethodHints(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 37: + if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->installSceneEventFilter(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isActive(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 1) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isAncestorOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 40: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isBlockedByModalPanel(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QGraphicsItem** _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isBlockedByModalPanel(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 41: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isClipped(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 42: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEnabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 43: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isObscured(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isObscured(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + bool _q_result = _q_self->isObscured(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 44: + if (context->argumentCount() == 1) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isObscuredBy(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 45: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isPanel(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 46: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isSelected(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 47: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isUnderMouse(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 48: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isVisible(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 49: + if (context->argumentCount() == 1) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isVisibleTo(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 50: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isWidget(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 51: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isWindow(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 52: + if (context->argumentCount() == 1) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform _q_result = _q_self->itemTransform(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTransform _q_result = _q_self->itemTransform(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 53: + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPainterPath _q_result = _q_self->mapFromItem(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_result = _q_self->mapFromItem(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPolygonF _q_result = _q_self->mapFromItem(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPolygonF _q_result = _q_self->mapFromItem(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + QPointF _q_result = _q_self->mapFromItem(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + QPolygonF _q_result = _q_self->mapFromItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 54: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->mapFromParent(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_result = _q_self->mapFromParent(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->mapFromParent(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->mapFromParent(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_result = _q_self->mapFromParent(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QPolygonF _q_result = _q_self->mapFromParent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 55: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->mapFromScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_result = _q_self->mapFromScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->mapFromScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->mapFromScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_result = _q_self->mapFromScene(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QPolygonF _q_result = _q_self->mapFromScene(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 56: + if (context->argumentCount() == 2) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_result = _q_self->mapRectFromItem(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + QRectF _q_result = _q_self->mapRectFromItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 57: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->mapRectFromParent(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QRectF _q_result = _q_self->mapRectFromParent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 58: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->mapRectFromScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QRectF _q_result = _q_self->mapRectFromScene(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 59: + if (context->argumentCount() == 2) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_result = _q_self->mapRectToItem(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + QRectF _q_result = _q_self->mapRectToItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 60: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->mapRectToParent(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QRectF _q_result = _q_self->mapRectToParent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 61: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->mapRectToScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QRectF _q_result = _q_self->mapRectToScene(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 62: + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPainterPath _q_result = _q_self->mapToItem(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_result = _q_self->mapToItem(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPolygonF _q_result = _q_self->mapToItem(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPolygonF _q_result = _q_self->mapToItem(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + QPointF _q_result = _q_self->mapToItem(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + qreal _q_arg4 = qscriptvalue_cast(context->argument(4)); + QPolygonF _q_result = _q_self->mapToItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 63: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->mapToParent(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_result = _q_self->mapToParent(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->mapToParent(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->mapToParent(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_result = _q_self->mapToParent(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QPolygonF _q_result = _q_self->mapToParent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 64: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->mapToScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_result = _q_self->mapToScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->mapToScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->mapToScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPointF _q_result = _q_self->mapToScene(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QPolygonF _q_result = _q_self->mapToScene(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 65: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->moveBy(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 66: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->opacity(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 67: + if (context->argumentCount() == 0) { + QPainterPath _q_result = _q_self->opaqueArea(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 68: + if (context->argumentCount() == 2) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOptionGraphicsItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->paint(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOptionGraphicsItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->paint(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 69: + if (context->argumentCount() == 0) { + QGraphicsItem* _q_result = _q_self->panel(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 70: + if (context->argumentCount() == 0) { + QGraphicsItem::PanelModality _q_result = _q_self->panelModality(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 71: + if (context->argumentCount() == 0) { + QGraphicsItem* _q_result = _q_self->parentItem(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 72: + if (context->argumentCount() == 0) { + QGraphicsObject* _q_result = _q_self->parentObject(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 73: + if (context->argumentCount() == 0) { + QGraphicsWidget* _q_result = _q_self->parentWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 74: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 75: + if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeSceneEventFilter(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 76: + if (context->argumentCount() == 0) { + _q_self->resetTransform(); + return context->engine()->undefinedValue(); + } + break; + + case 77: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->rotation(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 78: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->scale(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 79: + if (context->argumentCount() == 0) { + QGraphicsScene* _q_result = _q_self->scene(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 80: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->sceneBoundingRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 81: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->scenePos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 82: + if (context->argumentCount() == 0) { + QTransform _q_result = _q_self->sceneTransform(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 83: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->scroll(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->scroll(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 84: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setAcceptDrops(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 85: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setAcceptHoverEvents(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 86: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setAcceptTouchEvents(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 87: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setAcceptedMouseButtons(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 88: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setActive(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 89: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBoundingRegionGranularity(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 90: + if (context->argumentCount() == 1) { + QGraphicsItem::CacheMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCacheMode(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QGraphicsItem::CacheMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSize _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setCacheMode(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 91: + if (context->argumentCount() == 1) { + QCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCursor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 92: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setData(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 93: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 94: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setFiltersChildEvents(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 95: + if (context->argumentCount() == 1) { + QGraphicsItem::GraphicsItemFlag _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFlag(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QGraphicsItem::GraphicsItemFlag _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setFlag(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 96: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setFlags(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 97: + if (context->argumentCount() == 0) { + _q_self->setFocus(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + Qt::FocusReason _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFocus(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 98: + if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFocusProxy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 99: + if (context->argumentCount() == 1) { + QGraphicsEffect* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setGraphicsEffect(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 100: + if (context->argumentCount() == 1) { + QGraphicsItemGroup* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setGroup(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 101: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setHandlesChildEvents(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 102: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setInputMethodHints(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 103: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOpacity(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 104: + if (context->argumentCount() == 1) { + QGraphicsItem::PanelModality _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPanelModality(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 105: + if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setParentItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 106: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPos(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setPos(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 107: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRotation(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 108: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScale(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 109: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setSelected(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 110: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setToolTip(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 111: + if (context->argumentCount() == 1) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTransform(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setTransform(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 112: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTransformOriginPoint(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setTransformOriginPoint(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 113: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setTransformations(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 114: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setVisible(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 115: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setX(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 116: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setY(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 117: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setZValue(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 118: + if (context->argumentCount() == 0) { + QPainterPath _q_result = _q_self->shape(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 119: + if (context->argumentCount() == 0) { + _q_self->show(); + return context->engine()->undefinedValue(); + } + break; + + case 120: + if (context->argumentCount() == 1) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->stackBefore(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 121: + if (context->argumentCount() == 0) { + QGraphicsObject* _q_result = _q_self->toGraphicsObject(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 122: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toolTip(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 123: + if (context->argumentCount() == 0) { + QGraphicsItem* _q_result = _q_self->topLevelItem(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 124: + if (context->argumentCount() == 0) { + QGraphicsWidget* _q_result = _q_self->topLevelWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 125: + if (context->argumentCount() == 0) { + QTransform _q_result = _q_self->transform(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 126: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->transformOriginPoint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 127: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->transformations(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 128: + if (context->argumentCount() == 0) { + int _q_result = _q_self->type(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 129: + if (context->argumentCount() == 0) { + _q_self->ungrabKeyboard(); + return context->engine()->undefinedValue(); + } + break; + + case 130: + if (context->argumentCount() == 0) { + _q_self->ungrabMouse(); + return context->engine()->undefinedValue(); + } + break; + + case 131: + if (context->argumentCount() == 0) { + _q_self->unsetCursor(); + return context->engine()->undefinedValue(); + } + break; + + case 132: + if (context->argumentCount() == 0) { + _q_self->update(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->update(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->update(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 133: + if (context->argumentCount() == 0) { + QGraphicsWidget* _q_result = _q_self->window(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 134: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->x(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 135: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->y(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 136: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->zValue(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 137: { + QString result; + QDebug d(&result); + d << _q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsItem_function_names[_id+1], + qtscript_QGraphicsItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsItem* _q_cpp_result = new QtScriptShell_QGraphicsItem(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsItem* _q_cpp_result = new QtScriptShell_QGraphicsItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsItem_function_names[_id], + qtscript_QGraphicsItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsItem*)0)); + for (int i = 0; i < 138; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsItem_prototype_call, qtscript_QGraphicsItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsItem_static_call, proto, qtscript_QGraphicsItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("GraphicsItemChange"), + qtscript_create_QGraphicsItem_GraphicsItemChange_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("PanelModality"), + qtscript_create_QGraphicsItem_PanelModality_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("CacheMode"), + qtscript_create_QGraphicsItem_CacheMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("GraphicsItemFlag"), + qtscript_create_QGraphicsItem_GraphicsItemFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("GraphicsItemFlags"), + qtscript_create_QGraphicsItem_GraphicsItemFlags_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsItemAnimation.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsItemAnimation.cpp new file mode 100644 index 00000000..0b0a9924 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsItemAnimation.cpp @@ -0,0 +1,473 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsItemAnimation.h" + +static const char * const qtscript_QGraphicsItemAnimation_function_names[] = { + "QGraphicsItemAnimation" + // static + // prototype + , "clear" + , "horizontalScaleAt" + , "horizontalShearAt" + , "item" + , "matrixAt" + , "posAt" + , "posList" + , "rotationAt" + , "rotationList" + , "scaleList" + , "setItem" + , "setPosAt" + , "setRotationAt" + , "setScaleAt" + , "setShearAt" + , "setTimeLine" + , "setTranslationAt" + , "shearList" + , "timeLine" + , "translationList" + , "verticalScaleAt" + , "verticalShearAt" + , "xTranslationAt" + , "yTranslationAt" + , "toString" +}; + +static const char * const qtscript_QGraphicsItemAnimation_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" + , "qreal step" + , "qreal step" + , "" + , "qreal step" + , "qreal step" + , "" + , "qreal step" + , "" + , "" + , "QGraphicsItem item" + , "qreal step, QPointF pos" + , "qreal step, qreal angle" + , "qreal step, qreal sx, qreal sy" + , "qreal step, qreal sh, qreal sv" + , "QTimeLine timeLine" + , "qreal step, qreal dx, qreal dy" + , "" + , "" + , "" + , "qreal step" + , "qreal step" + , "qreal step" + , "qreal step" +"" +}; + +static const int qtscript_QGraphicsItemAnimation_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 1 + , 0 + , 1 + , 1 + , 0 + , 1 + , 0 + , 0 + , 1 + , 2 + , 2 + , 3 + , 3 + , 1 + , 3 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsItemAnimation_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsItemAnimation::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsItemAnimation*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsItemAnimation*) +template <> \ +struct QMetaTypeId< QPair > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QPair >("QPair")); \ + return metatype_id.load(); \ + } \ +}; +template <> \ +struct QMetaTypeId< QList > > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QList > >("QList >")); \ + return metatype_id.load(); \ + } \ +}; +template <> \ +struct QMetaTypeId< QPair > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QPair >("QPair")); \ + return metatype_id.load(); \ + } \ +}; +template <> \ +struct QMetaTypeId< QList > > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QList > >("QList >")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(QTimeLine*) + +// +// QGraphicsItemAnimation +// + +static QScriptValue qtscript_QGraphicsItemAnimation_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 24; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsItemAnimation* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsItemAnimation.%0(): this object is not a QGraphicsItemAnimation") + .arg(qtscript_QGraphicsItemAnimation_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->horizontalScaleAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->horizontalShearAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QGraphicsItem* _q_result = _q_self->item(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMatrix _q_result = _q_self->matrixAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_result = _q_self->posAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QList > _q_result = _q_self->posList(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->rotationAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QList > _q_result = _q_self->rotationList(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QList > _q_result = _q_self->scaleList(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setPosAt(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setRotationAt(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 3) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setScaleAt(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 3) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setShearAt(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QTimeLine* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTimeLine(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 3) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setTranslationAt(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QList > _q_result = _q_self->shearList(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QTimeLine* _q_result = _q_self->timeLine(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QList > _q_result = _q_self->translationList(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->verticalScaleAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->verticalShearAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->xTranslationAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = _q_self->yTranslationAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: { + QString result = QString::fromLatin1("QGraphicsItemAnimation"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsItemAnimation_throw_ambiguity_error_helper(context, + qtscript_QGraphicsItemAnimation_function_names[_id+1], + qtscript_QGraphicsItemAnimation_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsItemAnimation_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsItemAnimation(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsItemAnimation* _q_cpp_result = new QtScriptShell_QGraphicsItemAnimation(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsItemAnimation*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QGraphicsItemAnimation* _q_cpp_result = new QtScriptShell_QGraphicsItemAnimation(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsItemAnimation*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsItemAnimation_throw_ambiguity_error_helper(context, + qtscript_QGraphicsItemAnimation_function_names[_id], + qtscript_QGraphicsItemAnimation_function_signatures[_id]); +} + +static QScriptValue qtscript_QGraphicsItemAnimation_toScriptValue(QScriptEngine *engine, QGraphicsItemAnimation* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGraphicsItemAnimation_fromScriptValue(const QScriptValue &value, QGraphicsItemAnimation* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGraphicsItemAnimation_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsItemAnimation*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 25; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsItemAnimation_prototype_call, qtscript_QGraphicsItemAnimation_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsItemAnimation_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGraphicsItemAnimation_toScriptValue, + qtscript_QGraphicsItemAnimation_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsItemAnimation_static_call, proto, qtscript_QGraphicsItemAnimation_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsItemGroup.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsItemGroup.cpp new file mode 100644 index 00000000..c214b057 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsItemGroup.cpp @@ -0,0 +1,180 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsItemGroup.h" + +static const char * const qtscript_QGraphicsItemGroup_function_names[] = { + "QGraphicsItemGroup" + // static + // prototype + , "addToGroup" + , "removeFromGroup" + , "toString" +}; + +static const char * const qtscript_QGraphicsItemGroup_function_signatures[] = { + "QGraphicsItem parent" + // static + // prototype + , "QGraphicsItem item" + , "QGraphicsItem item" +"" +}; + +static const int qtscript_QGraphicsItemGroup_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsItemGroup_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsItemGroup::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsItemGroup*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsItemGroup*) + +// +// QGraphicsItemGroup +// + +static QScriptValue qtscript_QGraphicsItemGroup_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsItemGroup* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsItemGroup.%0(): this object is not a QGraphicsItemGroup") + .arg(qtscript_QGraphicsItemGroup_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addToGroup(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeFromGroup(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: { + QString result = QString::fromLatin1("QGraphicsItemGroup"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsItemGroup_throw_ambiguity_error_helper(context, + qtscript_QGraphicsItemGroup_function_names[_id+1], + qtscript_QGraphicsItemGroup_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsItemGroup_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsItemGroup(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsItemGroup* _q_cpp_result = new QtScriptShell_QGraphicsItemGroup(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsItemGroup*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsItemGroup* _q_cpp_result = new QtScriptShell_QGraphicsItemGroup(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsItemGroup*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsItemGroup_throw_ambiguity_error_helper(context, + qtscript_QGraphicsItemGroup_function_names[_id], + qtscript_QGraphicsItemGroup_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsItemGroup_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsItemGroup*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsItemGroup_prototype_call, qtscript_QGraphicsItemGroup_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsItemGroup_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsItemGroup_static_call, proto, qtscript_QGraphicsItemGroup_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsLayout.cpp new file mode 100644 index 00000000..5c5fe744 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsLayout.cpp @@ -0,0 +1,262 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsLayout.h" + +static const char * const qtscript_QGraphicsLayout_function_names[] = { + "QGraphicsLayout" + // static + , "instantInvalidatePropagation" + , "setInstantInvalidatePropagation" + // prototype + , "activate" + , "count" + , "invalidate" + , "isActivated" + , "itemAt" + , "removeAt" + , "setContentsMargins" + , "widgetEvent" + , "toString" +}; + +static const char * const qtscript_QGraphicsLayout_function_signatures[] = { + "QGraphicsLayoutItem parent" + // static + , "" + , "bool enable" + // prototype + , "" + , "" + , "" + , "" + , "int i" + , "int index" + , "qreal left, qreal top, qreal right, qreal bottom" + , "QEvent e" +"" +}; + +static const int qtscript_QGraphicsLayout_function_lengths[] = { + 1 + // static + , 0 + , 1 + // prototype + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 4 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsLayout_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsLayout::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsLayout*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsLayout*) +Q_DECLARE_METATYPE(QGraphicsLayoutItem*) +Q_DECLARE_METATYPE(QEvent*) + +// +// QGraphicsLayout +// + +static QScriptValue qtscript_QGraphicsLayout_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsLayout* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsLayout.%0(): this object is not a QGraphicsLayout") + .arg(qtscript_QGraphicsLayout_function_names[_id+3])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->activate(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->invalidate(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isActivated(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QGraphicsLayoutItem* _q_result = _q_self->itemAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->removeAt(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setContentsMargins(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QEvent* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->widgetEvent(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: { + QString result = QString::fromLatin1("QGraphicsLayout"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsLayout_throw_ambiguity_error_helper(context, + qtscript_QGraphicsLayout_function_names[_id+3], + qtscript_QGraphicsLayout_function_signatures[_id+3]); +} + +static QScriptValue qtscript_QGraphicsLayout_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsLayout(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsLayout* _q_cpp_result = new QtScriptShell_QGraphicsLayout(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsLayout*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsLayout* _q_cpp_result = new QtScriptShell_QGraphicsLayout(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsLayout*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = QGraphicsLayout::instantInvalidatePropagation(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + QGraphicsLayout::setInstantInvalidatePropagation(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsLayout_throw_ambiguity_error_helper(context, + qtscript_QGraphicsLayout_function_names[_id], + qtscript_QGraphicsLayout_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsLayout_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsLayout*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsLayout_prototype_call, qtscript_QGraphicsLayout_function_lengths[i+3]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsLayout_function_names[i+3]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsLayout_static_call, proto, qtscript_QGraphicsLayout_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsLayout_static_call, + qtscript_QGraphicsLayout_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QGraphicsLayout_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsLayoutItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsLayoutItem.cpp new file mode 100644 index 00000000..5c2cc34c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsLayoutItem.cpp @@ -0,0 +1,517 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsLayoutItem.h" + +static const char * const qtscript_QGraphicsLayoutItem_function_names[] = { + "QGraphicsLayoutItem" + // static + // prototype + , "contentsRect" + , "effectiveSizeHint" + , "geometry" + , "getContentsMargins" + , "graphicsItem" + , "isLayout" + , "maximumHeight" + , "maximumSize" + , "maximumWidth" + , "minimumHeight" + , "minimumSize" + , "minimumWidth" + , "ownedByLayout" + , "parentLayoutItem" + , "preferredHeight" + , "preferredSize" + , "preferredWidth" + , "setGeometry" + , "setMaximumHeight" + , "setMaximumSize" + , "setMaximumWidth" + , "setMinimumHeight" + , "setMinimumSize" + , "setMinimumWidth" + , "setParentLayoutItem" + , "setPreferredHeight" + , "setPreferredSize" + , "setPreferredWidth" + , "setSizePolicy" + , "sizePolicy" + , "updateGeometry" + , "toString" +}; + +static const char * const qtscript_QGraphicsLayoutItem_function_signatures[] = { + "QGraphicsLayoutItem parent, bool isLayout" + // static + // prototype + , "" + , "SizeHint which, QSizeF constraint" + , "" + , "qreal left, qreal top, qreal right, qreal bottom" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QRectF rect" + , "qreal height" + , "QSizeF size\nqreal w, qreal h" + , "qreal width" + , "qreal height" + , "QSizeF size\nqreal w, qreal h" + , "qreal width" + , "QGraphicsLayoutItem parent" + , "qreal height" + , "QSizeF size\nqreal w, qreal h" + , "qreal width" + , "Policy hPolicy, Policy vPolicy, ControlType controlType\nQSizePolicy policy" + , "" + , "" +"" +}; + +static const int qtscript_QGraphicsLayoutItem_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 2 + , 0 + , 4 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 2 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 2 + , 1 + , 3 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGraphicsLayoutItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsLayoutItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsLayoutItem*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsLayoutItem*) +Q_DECLARE_METATYPE(Qt::SizeHint) +Q_DECLARE_METATYPE(qreal*) +Q_DECLARE_METATYPE(QSizePolicy::Policy) +Q_DECLARE_METATYPE(QSizePolicy::ControlType) + +// +// QGraphicsLayoutItem +// + +static QScriptValue qtscript_QGraphicsLayoutItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 31; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsLayoutItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsLayoutItem.%0(): this object is not a QGraphicsLayoutItem") + .arg(qtscript_QGraphicsLayoutItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->contentsRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + Qt::SizeHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizeF _q_result = _q_self->effectiveSizeHint(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + Qt::SizeHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizeF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QSizeF _q_result = _q_self->effectiveSizeHint(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->geometry(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 4) { + qreal* _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal* _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal* _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal* _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->getContentsMargins(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QGraphicsItem* _q_result = _q_self->graphicsItem(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isLayout(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->maximumHeight(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QSizeF _q_result = _q_self->maximumSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->maximumWidth(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->minimumHeight(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QSizeF _q_result = _q_self->minimumSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->minimumWidth(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->ownedByLayout(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QGraphicsLayoutItem* _q_result = _q_self->parentLayoutItem(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->preferredHeight(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QSizeF _q_result = _q_self->preferredSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->preferredWidth(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setGeometry(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMaximumHeight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QSizeF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMaximumSize(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setMaximumSize(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMaximumWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMinimumHeight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QSizeF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMinimumSize(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setMinimumSize(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMinimumWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setParentLayoutItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPreferredHeight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QSizeF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPreferredSize(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setPreferredSize(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPreferredWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + QSizePolicy _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSizePolicy(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QSizePolicy::Policy _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizePolicy::Policy _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setSizePolicy(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QSizePolicy::Policy _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizePolicy::Policy _q_arg1 = qscriptvalue_cast(context->argument(1)); + QSizePolicy::ControlType _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setSizePolicy(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 0) { + QSizePolicy _q_result = _q_self->sizePolicy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 0) { + _q_self->updateGeometry(); + return context->engine()->undefinedValue(); + } + break; + + case 31: { + QString result = QString::fromLatin1("QGraphicsLayoutItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsLayoutItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsLayoutItem_function_names[_id+1], + qtscript_QGraphicsLayoutItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsLayoutItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsLayoutItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsLayoutItem* _q_cpp_result = new QtScriptShell_QGraphicsLayoutItem(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsLayoutItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsLayoutItem* _q_cpp_result = new QtScriptShell_QGraphicsLayoutItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsLayoutItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + QtScriptShell_QGraphicsLayoutItem* _q_cpp_result = new QtScriptShell_QGraphicsLayoutItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsLayoutItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsLayoutItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsLayoutItem_function_names[_id], + qtscript_QGraphicsLayoutItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsLayoutItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsLayoutItem*)0)); + for (int i = 0; i < 32; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsLayoutItem_prototype_call, qtscript_QGraphicsLayoutItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsLayoutItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsLayoutItem_static_call, proto, qtscript_QGraphicsLayoutItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsLineItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsLineItem.cpp new file mode 100644 index 00000000..7ec730a5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsLineItem.cpp @@ -0,0 +1,244 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsLineItem.h" + +static const char * const qtscript_QGraphicsLineItem_function_names[] = { + "QGraphicsLineItem" + // static + // prototype + , "line" + , "pen" + , "setLine" + , "setPen" + , "toString" +}; + +static const char * const qtscript_QGraphicsLineItem_function_signatures[] = { + "QGraphicsItem parent\nQLineF line, QGraphicsItem parent\nqreal x1, qreal y1, qreal x2, qreal y2, QGraphicsItem parent" + // static + // prototype + , "" + , "" + , "QLineF line\nqreal x1, qreal y1, qreal x2, qreal y2" + , "QPen pen" +"" +}; + +static const int qtscript_QGraphicsLineItem_function_lengths[] = { + 5 + // static + // prototype + , 0 + , 0 + , 4 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsLineItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsLineItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsLineItem*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsLineItem*) + +// +// QGraphicsLineItem +// + +static QScriptValue qtscript_QGraphicsLineItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsLineItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsLineItem.%0(): this object is not a QGraphicsLineItem") + .arg(qtscript_QGraphicsLineItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QLineF _q_result = _q_self->line(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QPen _q_result = _q_self->pen(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QLineF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLine(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setLine(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QPen _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPen(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: { + QString result = QString::fromLatin1("QGraphicsLineItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsLineItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsLineItem_function_names[_id+1], + qtscript_QGraphicsLineItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsLineItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsLineItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsLineItem* _q_cpp_result = new QtScriptShell_QGraphicsLineItem(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsLineItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsLineItem* _q_cpp_result = new QtScriptShell_QGraphicsLineItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsLineItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QLineF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsLineItem* _q_cpp_result = new QtScriptShell_QGraphicsLineItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsLineItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QLineF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGraphicsLineItem* _q_cpp_result = new QtScriptShell_QGraphicsLineItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsLineItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QtScriptShell_QGraphicsLineItem* _q_cpp_result = new QtScriptShell_QGraphicsLineItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsLineItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QGraphicsItem* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QtScriptShell_QGraphicsLineItem* _q_cpp_result = new QtScriptShell_QGraphicsLineItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsLineItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsLineItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsLineItem_function_names[_id], + qtscript_QGraphicsLineItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsLineItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsLineItem*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsLineItem_prototype_call, qtscript_QGraphicsLineItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsLineItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsLineItem_static_call, proto, qtscript_QGraphicsLineItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsLinearLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsLinearLayout.cpp new file mode 100644 index 00000000..e332426f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsLinearLayout.cpp @@ -0,0 +1,356 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsLinearLayout.h" + +static const char * const qtscript_QGraphicsLinearLayout_function_names[] = { + "QGraphicsLinearLayout" + // static + // prototype + , "addItem" + , "addStretch" + , "alignment" + , "dump" + , "insertItem" + , "insertStretch" + , "itemSpacing" + , "orientation" + , "removeItem" + , "setAlignment" + , "setItemSpacing" + , "setOrientation" + , "setSpacing" + , "setStretchFactor" + , "spacing" + , "stretchFactor" + , "toString" +}; + +static const char * const qtscript_QGraphicsLinearLayout_function_signatures[] = { + "QGraphicsLayoutItem parent\nOrientation orientation, QGraphicsLayoutItem parent" + // static + // prototype + , "QGraphicsLayoutItem item" + , "int stretch" + , "QGraphicsLayoutItem item" + , "int indent" + , "int index, QGraphicsLayoutItem item" + , "int index, int stretch" + , "int index" + , "" + , "QGraphicsLayoutItem item" + , "QGraphicsLayoutItem item, Alignment alignment" + , "int index, qreal spacing" + , "Orientation orientation" + , "qreal spacing" + , "QGraphicsLayoutItem item, int stretch" + , "" + , "QGraphicsLayoutItem item" +"" +}; + +static const int qtscript_QGraphicsLinearLayout_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 1 + , 1 + , 1 + , 2 + , 2 + , 1 + , 0 + , 1 + , 2 + , 2 + , 1 + , 1 + , 2 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsLinearLayout_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsLinearLayout::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsLinearLayout*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsLinearLayout*) +Q_DECLARE_METATYPE(QGraphicsLayoutItem*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(QGraphicsLayout*) + +// +// QGraphicsLinearLayout +// + +static QScriptValue qtscript_QGraphicsLinearLayout_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 16; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsLinearLayout* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsLinearLayout.%0(): this object is not a QGraphicsLinearLayout") + .arg(qtscript_QGraphicsLinearLayout_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->addStretch(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->addStretch(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_result = _q_self->alignment(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->dump(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->dump(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QGraphicsLayoutItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->insertStretch(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->insertStretch(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_result = _q_self->itemSpacing(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + Qt::Orientation _q_result = _q_self->orientation(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 2) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + _q_self->setAlignment(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setItemSpacing(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOrientation(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 2) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setStretchFactor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->spacing(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->stretchFactor(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: { + QString result = QString::fromLatin1("QGraphicsLinearLayout"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsLinearLayout_throw_ambiguity_error_helper(context, + qtscript_QGraphicsLinearLayout_function_names[_id+1], + qtscript_QGraphicsLinearLayout_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsLinearLayout_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsLinearLayout(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsLinearLayout* _q_cpp_result = new QtScriptShell_QGraphicsLinearLayout(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsLinearLayout*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QGraphicsLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsLinearLayout* _q_cpp_result = new QtScriptShell_QGraphicsLinearLayout(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsLinearLayout*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsLinearLayout* _q_cpp_result = new QtScriptShell_QGraphicsLinearLayout(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsLinearLayout*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsLayoutItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGraphicsLinearLayout* _q_cpp_result = new QtScriptShell_QGraphicsLinearLayout(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsLinearLayout*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsLinearLayout_throw_ambiguity_error_helper(context, + qtscript_QGraphicsLinearLayout_function_names[_id], + qtscript_QGraphicsLinearLayout_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsLinearLayout_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsLinearLayout*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 17; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsLinearLayout_prototype_call, qtscript_QGraphicsLinearLayout_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsLinearLayout_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsLinearLayout_static_call, proto, qtscript_QGraphicsLinearLayout_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsObject.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsObject.cpp new file mode 100644 index 00000000..a851f985 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsObject.cpp @@ -0,0 +1,206 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsObject.h" + +static const char * const qtscript_QGraphicsObject_function_names[] = { + "QGraphicsObject" + // static + // prototype + , "grabGesture" + , "ungrabGesture" + , "toString" +}; + +static const char * const qtscript_QGraphicsObject_function_signatures[] = { + "QGraphicsItem parent" + // static + // prototype + , "GestureType type, GestureFlags flags" + , "GestureType type" +"" +}; + +static const int qtscript_QGraphicsObject_function_lengths[] = { + 1 + // static + // prototype + , 2 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsObject_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsObject::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsObject*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsObject*) +Q_DECLARE_METATYPE(QFlags) + +// +// QGraphicsObject +// + +static QScriptValue qtscript_QGraphicsObject_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsObject* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsObject.%0(): this object is not a QGraphicsObject") + .arg(qtscript_QGraphicsObject_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + Qt::GestureType _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->grabGesture(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + Qt::GestureType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + _q_self->grabGesture(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + Qt::GestureType _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->ungrabGesture(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: { + QString result; + QDebug d(&result); + d << _q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsObject_throw_ambiguity_error_helper(context, + qtscript_QGraphicsObject_function_names[_id+1], + qtscript_QGraphicsObject_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsObject_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsObject(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsObject* _q_cpp_result = new QtScriptShell_QGraphicsObject(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsObject*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsObject* _q_cpp_result = new QtScriptShell_QGraphicsObject(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsObject*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsObject_throw_ambiguity_error_helper(context, + qtscript_QGraphicsObject_function_names[_id], + qtscript_QGraphicsObject_function_signatures[_id]); +} + +static QScriptValue qtscript_QGraphicsObject_toScriptValue(QScriptEngine *engine, QGraphicsObject* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGraphicsObject_fromScriptValue(const QScriptValue &value, QGraphicsObject* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGraphicsObject_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsObject*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + proto.setProperty(QString::fromLatin1("__QGraphicsItem__"), + engine->defaultPrototype(qMetaTypeId()), + QScriptValue::SkipInEnumeration); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsObject_prototype_call, qtscript_QGraphicsObject_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsObject_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGraphicsObject_toScriptValue, + qtscript_QGraphicsObject_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsObject_static_call, proto, qtscript_QGraphicsObject_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsOpacityEffect.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsOpacityEffect.cpp new file mode 100644 index 00000000..59812f00 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsOpacityEffect.cpp @@ -0,0 +1,154 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsOpacityEffect.h" + +static const char * const qtscript_QGraphicsOpacityEffect_function_names[] = { + "QGraphicsOpacityEffect" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QGraphicsOpacityEffect_function_signatures[] = { + "QObject parent" + // static + // prototype +"" +}; + +static const int qtscript_QGraphicsOpacityEffect_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QGraphicsOpacityEffect_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsOpacityEffect::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsOpacityEffect*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsOpacityEffect*) +Q_DECLARE_METATYPE(QGraphicsEffect*) + +// +// QGraphicsOpacityEffect +// + +static QScriptValue qtscript_QGraphicsOpacityEffect_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsOpacityEffect* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsOpacityEffect.%0(): this object is not a QGraphicsOpacityEffect") + .arg(qtscript_QGraphicsOpacityEffect_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QGraphicsOpacityEffect"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsOpacityEffect_throw_ambiguity_error_helper(context, + qtscript_QGraphicsOpacityEffect_function_names[_id+1], + qtscript_QGraphicsOpacityEffect_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsOpacityEffect_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsOpacityEffect(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsOpacityEffect* _q_cpp_result = new QtScriptShell_QGraphicsOpacityEffect(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsOpacityEffect*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QGraphicsOpacityEffect* _q_cpp_result = new QtScriptShell_QGraphicsOpacityEffect(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsOpacityEffect*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsOpacityEffect_throw_ambiguity_error_helper(context, + qtscript_QGraphicsOpacityEffect_function_names[_id], + qtscript_QGraphicsOpacityEffect_function_signatures[_id]); +} + +static QScriptValue qtscript_QGraphicsOpacityEffect_toScriptValue(QScriptEngine *engine, QGraphicsOpacityEffect* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGraphicsOpacityEffect_fromScriptValue(const QScriptValue &value, QGraphicsOpacityEffect* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGraphicsOpacityEffect_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsOpacityEffect*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QGraphicsOpacityEffect_toScriptValue, + qtscript_QGraphicsOpacityEffect_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsOpacityEffect_static_call, proto, qtscript_QGraphicsOpacityEffect_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsPathItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsPathItem.cpp new file mode 100644 index 00000000..5b747952 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsPathItem.cpp @@ -0,0 +1,198 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsPathItem.h" + +static const char * const qtscript_QGraphicsPathItem_function_names[] = { + "QGraphicsPathItem" + // static + // prototype + , "path" + , "setPath" + , "toString" +}; + +static const char * const qtscript_QGraphicsPathItem_function_signatures[] = { + "QGraphicsItem parent\nQPainterPath path, QGraphicsItem parent" + // static + // prototype + , "" + , "QPainterPath path" +"" +}; + +static const int qtscript_QGraphicsPathItem_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsPathItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsPathItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsPathItem*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsPathItem*) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QAbstractGraphicsShapeItem*) + +// +// QGraphicsPathItem +// + +static QScriptValue qtscript_QGraphicsPathItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsPathItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsPathItem.%0(): this object is not a QGraphicsPathItem") + .arg(qtscript_QGraphicsPathItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QPainterPath _q_result = _q_self->path(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPath(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: { + QString result = QString::fromLatin1("QGraphicsPathItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsPathItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsPathItem_function_names[_id+1], + qtscript_QGraphicsPathItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsPathItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsPathItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsPathItem* _q_cpp_result = new QtScriptShell_QGraphicsPathItem(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsPathItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsPathItem* _q_cpp_result = new QtScriptShell_QGraphicsPathItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsPathItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsPathItem* _q_cpp_result = new QtScriptShell_QGraphicsPathItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsPathItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGraphicsPathItem* _q_cpp_result = new QtScriptShell_QGraphicsPathItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsPathItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsPathItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsPathItem_function_names[_id], + qtscript_QGraphicsPathItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsPathItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsPathItem*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsPathItem_prototype_call, qtscript_QGraphicsPathItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsPathItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsPathItem_static_call, proto, qtscript_QGraphicsPathItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsPixmapItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsPixmapItem.cpp new file mode 100644 index 00000000..54356095 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsPixmapItem.cpp @@ -0,0 +1,351 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsPixmapItem.h" + +static const char * const qtscript_QGraphicsPixmapItem_function_names[] = { + "QGraphicsPixmapItem" + // static + // prototype + , "offset" + , "pixmap" + , "setOffset" + , "setPixmap" + , "setShapeMode" + , "setTransformationMode" + , "shapeMode" + , "transformationMode" + , "toString" +}; + +static const char * const qtscript_QGraphicsPixmapItem_function_signatures[] = { + "QGraphicsItem parent\nQPixmap pixmap, QGraphicsItem parent" + // static + // prototype + , "" + , "" + , "QPointF offset\nqreal x, qreal y" + , "QPixmap pixmap" + , "ShapeMode mode" + , "TransformationMode mode" + , "" + , "" +"" +}; + +static const int qtscript_QGraphicsPixmapItem_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 2 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGraphicsPixmapItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsPixmapItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsPixmapItem*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsPixmapItem*) +Q_DECLARE_METATYPE(QGraphicsPixmapItem::ShapeMode) +Q_DECLARE_METATYPE(Qt::TransformationMode) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QGraphicsPixmapItem::ShapeMode +// + +static const QGraphicsPixmapItem::ShapeMode qtscript_QGraphicsPixmapItem_ShapeMode_values[] = { + QGraphicsPixmapItem::MaskShape + , QGraphicsPixmapItem::BoundingRectShape + , QGraphicsPixmapItem::HeuristicMaskShape +}; + +static const char * const qtscript_QGraphicsPixmapItem_ShapeMode_keys[] = { + "MaskShape" + , "BoundingRectShape" + , "HeuristicMaskShape" +}; + +static QString qtscript_QGraphicsPixmapItem_ShapeMode_toStringHelper(QGraphicsPixmapItem::ShapeMode value) +{ + if ((value >= QGraphicsPixmapItem::MaskShape) && (value <= QGraphicsPixmapItem::HeuristicMaskShape)) + return qtscript_QGraphicsPixmapItem_ShapeMode_keys[static_cast(value)-static_cast(QGraphicsPixmapItem::MaskShape)]; + return QString(); +} + +static QScriptValue qtscript_QGraphicsPixmapItem_ShapeMode_toScriptValue(QScriptEngine *engine, const QGraphicsPixmapItem::ShapeMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGraphicsPixmapItem")); + return clazz.property(qtscript_QGraphicsPixmapItem_ShapeMode_toStringHelper(value)); +} + +static void qtscript_QGraphicsPixmapItem_ShapeMode_fromScriptValue(const QScriptValue &value, QGraphicsPixmapItem::ShapeMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGraphicsPixmapItem_ShapeMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QGraphicsPixmapItem::MaskShape) && (arg <= QGraphicsPixmapItem::HeuristicMaskShape)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ShapeMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGraphicsPixmapItem_ShapeMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsPixmapItem::ShapeMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsPixmapItem_ShapeMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsPixmapItem::ShapeMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGraphicsPixmapItem_ShapeMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGraphicsPixmapItem_ShapeMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGraphicsPixmapItem_ShapeMode, + qtscript_QGraphicsPixmapItem_ShapeMode_valueOf, qtscript_QGraphicsPixmapItem_ShapeMode_toString); + qScriptRegisterMetaType(engine, qtscript_QGraphicsPixmapItem_ShapeMode_toScriptValue, + qtscript_QGraphicsPixmapItem_ShapeMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGraphicsPixmapItem_ShapeMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGraphicsPixmapItem_ShapeMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGraphicsPixmapItem +// + +static QScriptValue qtscript_QGraphicsPixmapItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsPixmapItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsPixmapItem.%0(): this object is not a QGraphicsPixmapItem") + .arg(qtscript_QGraphicsPixmapItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->offset(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QPixmap _q_result = _q_self->pixmap(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOffset(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setOffset(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPixmap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QGraphicsPixmapItem::ShapeMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setShapeMode(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 1) { + Qt::TransformationMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTransformationMode(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QGraphicsPixmapItem::ShapeMode _q_result = _q_self->shapeMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + Qt::TransformationMode _q_result = _q_self->transformationMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: { + QString result = QString::fromLatin1("QGraphicsPixmapItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsPixmapItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsPixmapItem_function_names[_id+1], + qtscript_QGraphicsPixmapItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsPixmapItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsPixmapItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsPixmapItem* _q_cpp_result = new QtScriptShell_QGraphicsPixmapItem(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsPixmapItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsPixmapItem* _q_cpp_result = new QtScriptShell_QGraphicsPixmapItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsPixmapItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsPixmapItem* _q_cpp_result = new QtScriptShell_QGraphicsPixmapItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsPixmapItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGraphicsPixmapItem* _q_cpp_result = new QtScriptShell_QGraphicsPixmapItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsPixmapItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsPixmapItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsPixmapItem_function_names[_id], + qtscript_QGraphicsPixmapItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsPixmapItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsPixmapItem*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsPixmapItem_prototype_call, qtscript_QGraphicsPixmapItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsPixmapItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsPixmapItem_static_call, proto, qtscript_QGraphicsPixmapItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ShapeMode"), + qtscript_create_QGraphicsPixmapItem_ShapeMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsPolygonItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsPolygonItem.cpp new file mode 100644 index 00000000..da9bb93a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsPolygonItem.cpp @@ -0,0 +1,219 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsPolygonItem.h" + +static const char * const qtscript_QGraphicsPolygonItem_function_names[] = { + "QGraphicsPolygonItem" + // static + // prototype + , "fillRule" + , "polygon" + , "setFillRule" + , "setPolygon" + , "toString" +}; + +static const char * const qtscript_QGraphicsPolygonItem_function_signatures[] = { + "QGraphicsItem parent\nQPolygonF polygon, QGraphicsItem parent" + // static + // prototype + , "" + , "" + , "FillRule rule" + , "QPolygonF polygon" +"" +}; + +static const int qtscript_QGraphicsPolygonItem_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsPolygonItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsPolygonItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsPolygonItem*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsPolygonItem*) +Q_DECLARE_METATYPE(Qt::FillRule) +Q_DECLARE_METATYPE(QAbstractGraphicsShapeItem*) + +// +// QGraphicsPolygonItem +// + +static QScriptValue qtscript_QGraphicsPolygonItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsPolygonItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsPolygonItem.%0(): this object is not a QGraphicsPolygonItem") + .arg(qtscript_QGraphicsPolygonItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + Qt::FillRule _q_result = _q_self->fillRule(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QPolygonF _q_result = _q_self->polygon(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + Qt::FillRule _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFillRule(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPolygon(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: { + QString result = QString::fromLatin1("QGraphicsPolygonItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsPolygonItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsPolygonItem_function_names[_id+1], + qtscript_QGraphicsPolygonItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsPolygonItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsPolygonItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsPolygonItem* _q_cpp_result = new QtScriptShell_QGraphicsPolygonItem(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsPolygonItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsPolygonItem* _q_cpp_result = new QtScriptShell_QGraphicsPolygonItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsPolygonItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsPolygonItem* _q_cpp_result = new QtScriptShell_QGraphicsPolygonItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsPolygonItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGraphicsPolygonItem* _q_cpp_result = new QtScriptShell_QGraphicsPolygonItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsPolygonItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsPolygonItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsPolygonItem_function_names[_id], + qtscript_QGraphicsPolygonItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsPolygonItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsPolygonItem*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsPolygonItem_prototype_call, qtscript_QGraphicsPolygonItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsPolygonItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsPolygonItem_static_call, proto, qtscript_QGraphicsPolygonItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsProxyWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsProxyWidget.cpp new file mode 100644 index 00000000..ff4034d1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsProxyWidget.cpp @@ -0,0 +1,234 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsProxyWidget.h" + +static const char * const qtscript_QGraphicsProxyWidget_function_names[] = { + "QGraphicsProxyWidget" + // static + // prototype + , "createProxyForChildWidget" + , "setWidget" + , "subWidgetRect" + , "widget" + , "toString" +}; + +static const char * const qtscript_QGraphicsProxyWidget_function_signatures[] = { + "QGraphicsItem parent, WindowFlags wFlags" + // static + // prototype + , "QWidget child" + , "QWidget widget" + , "QWidget widget" + , "" +"" +}; + +static const int qtscript_QGraphicsProxyWidget_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGraphicsProxyWidget_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsProxyWidget::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsProxyWidget*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsProxyWidget*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(const QWidget*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QGraphicsWidget*) + +// +// QGraphicsProxyWidget +// + +static QScriptValue qtscript_QGraphicsProxyWidget_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsProxyWidget* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsProxyWidget.%0(): this object is not a QGraphicsProxyWidget") + .arg(qtscript_QGraphicsProxyWidget_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsProxyWidget* _q_result = _q_self->createProxyForChildWidget(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + const QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->subWidgetRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->widget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QGraphicsProxyWidget"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsProxyWidget_throw_ambiguity_error_helper(context, + qtscript_QGraphicsProxyWidget_function_names[_id+1], + qtscript_QGraphicsProxyWidget_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsProxyWidget_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsProxyWidget(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsProxyWidget* _q_cpp_result = new QtScriptShell_QGraphicsProxyWidget(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsProxyWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsProxyWidget* _q_cpp_result = new QtScriptShell_QGraphicsProxyWidget(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsProxyWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QGraphicsProxyWidget* _q_cpp_result = new QtScriptShell_QGraphicsProxyWidget(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsProxyWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsProxyWidget_throw_ambiguity_error_helper(context, + qtscript_QGraphicsProxyWidget_function_names[_id], + qtscript_QGraphicsProxyWidget_function_signatures[_id]); +} + +static QScriptValue qtscript_QGraphicsProxyWidget_toScriptValue(QScriptEngine *engine, QGraphicsProxyWidget* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGraphicsProxyWidget_fromScriptValue(const QScriptValue &value, QGraphicsProxyWidget* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGraphicsProxyWidget_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsProxyWidget*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsProxyWidget_prototype_call, qtscript_QGraphicsProxyWidget_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsProxyWidget_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGraphicsProxyWidget_toScriptValue, + qtscript_QGraphicsProxyWidget_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsProxyWidget_static_call, proto, qtscript_QGraphicsProxyWidget_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsRectItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsRectItem.cpp new file mode 100644 index 00000000..a3d5f442 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsRectItem.cpp @@ -0,0 +1,224 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsRectItem.h" + +static const char * const qtscript_QGraphicsRectItem_function_names[] = { + "QGraphicsRectItem" + // static + // prototype + , "rect" + , "setRect" + , "toString" +}; + +static const char * const qtscript_QGraphicsRectItem_function_signatures[] = { + "QGraphicsItem parent\nQRectF rect, QGraphicsItem parent\nqreal x, qreal y, qreal w, qreal h, QGraphicsItem parent" + // static + // prototype + , "" + , "QRectF rect\nqreal x, qreal y, qreal w, qreal h" +"" +}; + +static const int qtscript_QGraphicsRectItem_function_lengths[] = { + 5 + // static + // prototype + , 0 + , 4 + , 0 +}; + +static QScriptValue qtscript_QGraphicsRectItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsRectItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsRectItem*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsRectItem*) +Q_DECLARE_METATYPE(QAbstractGraphicsShapeItem*) + +// +// QGraphicsRectItem +// + +static QScriptValue qtscript_QGraphicsRectItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsRectItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsRectItem.%0(): this object is not a QGraphicsRectItem") + .arg(qtscript_QGraphicsRectItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->rect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRect(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 2: { + QString result = QString::fromLatin1("QGraphicsRectItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsRectItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsRectItem_function_names[_id+1], + qtscript_QGraphicsRectItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsRectItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsRectItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsRectItem* _q_cpp_result = new QtScriptShell_QGraphicsRectItem(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsRectItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsRectItem* _q_cpp_result = new QtScriptShell_QGraphicsRectItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsRectItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsRectItem* _q_cpp_result = new QtScriptShell_QGraphicsRectItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsRectItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGraphicsRectItem* _q_cpp_result = new QtScriptShell_QGraphicsRectItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsRectItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QtScriptShell_QGraphicsRectItem* _q_cpp_result = new QtScriptShell_QGraphicsRectItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsRectItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QGraphicsItem* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QtScriptShell_QGraphicsRectItem* _q_cpp_result = new QtScriptShell_QGraphicsRectItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsRectItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsRectItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsRectItem_function_names[_id], + qtscript_QGraphicsRectItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsRectItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsRectItem*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsRectItem_prototype_call, qtscript_QGraphicsRectItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsRectItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsRectItem_static_call, proto, qtscript_QGraphicsRectItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsRotation.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsRotation.cpp new file mode 100644 index 00000000..049f8489 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsRotation.cpp @@ -0,0 +1,168 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsRotation.h" + +static const char * const qtscript_QGraphicsRotation_function_names[] = { + "QGraphicsRotation" + // static + // prototype + , "setAxis" + , "toString" +}; + +static const char * const qtscript_QGraphicsRotation_function_signatures[] = { + "QObject parent" + // static + // prototype + , "Axis axis" +"" +}; + +static const int qtscript_QGraphicsRotation_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsRotation_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsRotation::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsRotation*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsRotation*) +Q_DECLARE_METATYPE(Qt::Axis) +Q_DECLARE_METATYPE(QGraphicsTransform*) + +// +// QGraphicsRotation +// + +static QScriptValue qtscript_QGraphicsRotation_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsRotation* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsRotation.%0(): this object is not a QGraphicsRotation") + .arg(qtscript_QGraphicsRotation_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + Qt::Axis _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setAxis(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: { + QString result = QString::fromLatin1("QGraphicsRotation"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsRotation_throw_ambiguity_error_helper(context, + qtscript_QGraphicsRotation_function_names[_id+1], + qtscript_QGraphicsRotation_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsRotation_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsRotation(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsRotation* _q_cpp_result = new QtScriptShell_QGraphicsRotation(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsRotation*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QGraphicsRotation* _q_cpp_result = new QtScriptShell_QGraphicsRotation(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsRotation*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsRotation_throw_ambiguity_error_helper(context, + qtscript_QGraphicsRotation_function_names[_id], + qtscript_QGraphicsRotation_function_signatures[_id]); +} + +static QScriptValue qtscript_QGraphicsRotation_toScriptValue(QScriptEngine *engine, QGraphicsRotation* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGraphicsRotation_fromScriptValue(const QScriptValue &value, QGraphicsRotation* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGraphicsRotation_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsRotation*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsRotation_prototype_call, qtscript_QGraphicsRotation_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsRotation_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGraphicsRotation_toScriptValue, + qtscript_QGraphicsRotation_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsRotation_static_call, proto, qtscript_QGraphicsRotation_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsScale.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsScale.cpp new file mode 100644 index 00000000..19106361 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsScale.cpp @@ -0,0 +1,150 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsScale.h" + +static const char * const qtscript_QGraphicsScale_function_names[] = { + "QGraphicsScale" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QGraphicsScale_function_signatures[] = { + "QObject parent" + // static + // prototype +"" +}; + +static const int qtscript_QGraphicsScale_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QGraphicsScale_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsScale::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsScale*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsScale*) +Q_DECLARE_METATYPE(QGraphicsTransform*) + +// +// QGraphicsScale +// + +static QScriptValue qtscript_QGraphicsScale_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsScale* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsScale.%0(): this object is not a QGraphicsScale") + .arg(qtscript_QGraphicsScale_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QGraphicsScale"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsScale_throw_ambiguity_error_helper(context, + qtscript_QGraphicsScale_function_names[_id+1], + qtscript_QGraphicsScale_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsScale_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsScale(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsScale* _q_cpp_result = new QtScriptShell_QGraphicsScale(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsScale*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QGraphicsScale* _q_cpp_result = new QtScriptShell_QGraphicsScale(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsScale*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsScale_throw_ambiguity_error_helper(context, + qtscript_QGraphicsScale_function_names[_id], + qtscript_QGraphicsScale_function_signatures[_id]); +} + +static QScriptValue qtscript_QGraphicsScale_toScriptValue(QScriptEngine *engine, QGraphicsScale* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGraphicsScale_fromScriptValue(const QScriptValue &value, QGraphicsScale* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGraphicsScale_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsScale*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QGraphicsScale_toScriptValue, + qtscript_QGraphicsScale_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsScale_static_call, proto, qtscript_QGraphicsScale_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsScene.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsScene.cpp new file mode 100644 index 00000000..e6ae19fc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsScene.cpp @@ -0,0 +1,1332 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsScene.h" + +static const char * const qtscript_QGraphicsScene_function_names[] = { + "QGraphicsScene" + // static + // prototype + , "activePanel" + , "activeWindow" + , "addEllipse" + , "addItem" + , "addLine" + , "addPath" + , "addPixmap" + , "addPolygon" + , "addRect" + , "addSimpleText" + , "addText" + , "addWidget" + , "clearFocus" + , "collidingItems" + , "createItemGroup" + , "destroyItemGroup" + , "focusItem" + , "hasFocus" + , "height" + , "inputMethodQuery" + , "invalidate" + , "isActive" + , "itemAt" + , "items" + , "itemsBoundingRect" + , "mouseGrabberItem" + , "removeItem" + , "render" + , "selectedItems" + , "selectionArea" + , "sendEvent" + , "setActivePanel" + , "setActiveWindow" + , "setFocus" + , "setFocusItem" + , "setSceneRect" + , "setSelectionArea" + , "setStyle" + , "style" + , "update" + , "views" + , "width" + , "toString" +}; + +static const char * const qtscript_QGraphicsScene_function_signatures[] = { + "QObject parent\nQRectF sceneRect, QObject parent\nqreal x, qreal y, qreal width, qreal height, QObject parent" + // static + // prototype + , "" + , "" + , "QRectF rect, QPen pen, QBrush brush\nqreal x, qreal y, qreal w, qreal h, QPen pen, QBrush brush" + , "QGraphicsItem item" + , "QLineF line, QPen pen\nqreal x1, qreal y1, qreal x2, qreal y2, QPen pen" + , "QPainterPath path, QPen pen, QBrush brush" + , "QPixmap pixmap" + , "QPolygonF polygon, QPen pen, QBrush brush" + , "QRectF rect, QPen pen, QBrush brush\nqreal x, qreal y, qreal w, qreal h, QPen pen, QBrush brush" + , "String text, QFont font" + , "String text, QFont font" + , "QWidget widget, WindowFlags wFlags" + , "" + , "QGraphicsItem item, ItemSelectionMode mode" + , "List items" + , "QGraphicsItemGroup group" + , "" + , "" + , "" + , "InputMethodQuery query" + , "qreal x, qreal y, qreal w, qreal h, SceneLayers layers" + , "" + , "QPointF pos, QTransform deviceTransform\nqreal x, qreal y, QTransform deviceTransform" + , "SortOrder order\nQPainterPath path, ItemSelectionMode mode, SortOrder order, QTransform deviceTransform\nQPointF pos, ItemSelectionMode mode, SortOrder order, QTransform deviceTransform\nQPolygonF polygon, ItemSelectionMode mode, SortOrder order, QTransform deviceTransform\nQRectF rect, ItemSelectionMode mode, SortOrder order, QTransform deviceTransform\nqreal x, qreal y, qreal w, qreal h, ItemSelectionMode mode, SortOrder order, QTransform deviceTransform" + , "" + , "" + , "QGraphicsItem item" + , "QPainter painter, QRectF target, QRectF source, AspectRatioMode aspectRatioMode" + , "" + , "" + , "QGraphicsItem item, QEvent event" + , "QGraphicsItem item" + , "QGraphicsWidget widget" + , "FocusReason focusReason" + , "QGraphicsItem item, FocusReason focusReason" + , "qreal x, qreal y, qreal w, qreal h" + , "QPainterPath path, ItemSelectionMode mode, QTransform deviceTransform\nQPainterPath path, QTransform deviceTransform" + , "QStyle style" + , "" + , "qreal x, qreal y, qreal w, qreal h" + , "" + , "" +"" +}; + +static const int qtscript_QGraphicsScene_function_lengths[] = { + 5 + // static + // prototype + , 0 + , 0 + , 6 + , 1 + , 5 + , 3 + , 1 + , 3 + , 6 + , 2 + , 2 + , 2 + , 0 + , 2 + , 1 + , 1 + , 0 + , 0 + , 0 + , 1 + , 5 + , 0 + , 3 + , 7 + , 0 + , 0 + , 1 + , 4 + , 0 + , 0 + , 2 + , 1 + , 1 + , 1 + , 2 + , 4 + , 3 + , 1 + , 0 + , 4 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGraphicsScene_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsScene::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsScene*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsScene*) +Q_DECLARE_METATYPE(QGraphicsScene::ItemIndexMethod) +Q_DECLARE_METATYPE(QGraphicsScene::SceneLayer) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QGraphicsWidget*) +Q_DECLARE_METATYPE(QGraphicsEllipseItem*) +Q_DECLARE_METATYPE(QGraphicsLineItem*) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QGraphicsPathItem*) +Q_DECLARE_METATYPE(QGraphicsPixmapItem*) +Q_DECLARE_METATYPE(QGraphicsPolygonItem*) +Q_DECLARE_METATYPE(QGraphicsRectItem*) +Q_DECLARE_METATYPE(QGraphicsSimpleTextItem*) +Q_DECLARE_METATYPE(QGraphicsTextItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QGraphicsProxyWidget*) +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QGraphicsItemGroup*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(Qt::AspectRatioMode) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(Qt::FocusReason) +Q_DECLARE_METATYPE(QStyle*) +Q_DECLARE_METATYPE(QGraphicsView*) +Q_DECLARE_METATYPE(QList) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QGraphicsScene::ItemIndexMethod +// + +static const QGraphicsScene::ItemIndexMethod qtscript_QGraphicsScene_ItemIndexMethod_values[] = { + QGraphicsScene::NoIndex + , QGraphicsScene::BspTreeIndex +}; + +static const char * const qtscript_QGraphicsScene_ItemIndexMethod_keys[] = { + "NoIndex" + , "BspTreeIndex" +}; + +static QString qtscript_QGraphicsScene_ItemIndexMethod_toStringHelper(QGraphicsScene::ItemIndexMethod value) +{ + if ((value >= QGraphicsScene::NoIndex) && (value <= QGraphicsScene::BspTreeIndex)) + return qtscript_QGraphicsScene_ItemIndexMethod_keys[static_cast(value)-static_cast(QGraphicsScene::NoIndex)]; + return QString(); +} + +static QScriptValue qtscript_QGraphicsScene_ItemIndexMethod_toScriptValue(QScriptEngine *engine, const QGraphicsScene::ItemIndexMethod &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGraphicsScene")); + return clazz.property(qtscript_QGraphicsScene_ItemIndexMethod_toStringHelper(value)); +} + +static void qtscript_QGraphicsScene_ItemIndexMethod_fromScriptValue(const QScriptValue &value, QGraphicsScene::ItemIndexMethod &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGraphicsScene_ItemIndexMethod(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QGraphicsScene::NoIndex) && (arg <= QGraphicsScene::BspTreeIndex)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ItemIndexMethod(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGraphicsScene_ItemIndexMethod_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsScene::ItemIndexMethod value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsScene_ItemIndexMethod_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsScene::ItemIndexMethod value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGraphicsScene_ItemIndexMethod_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGraphicsScene_ItemIndexMethod_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGraphicsScene_ItemIndexMethod, + qtscript_QGraphicsScene_ItemIndexMethod_valueOf, qtscript_QGraphicsScene_ItemIndexMethod_toString); + qScriptRegisterMetaType(engine, qtscript_QGraphicsScene_ItemIndexMethod_toScriptValue, + qtscript_QGraphicsScene_ItemIndexMethod_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGraphicsScene_ItemIndexMethod_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGraphicsScene_ItemIndexMethod_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGraphicsScene::SceneLayer +// + +static const QGraphicsScene::SceneLayer qtscript_QGraphicsScene_SceneLayer_values[] = { + QGraphicsScene::ItemLayer + , QGraphicsScene::BackgroundLayer + , QGraphicsScene::ForegroundLayer + , QGraphicsScene::AllLayers +}; + +static const char * const qtscript_QGraphicsScene_SceneLayer_keys[] = { + "ItemLayer" + , "BackgroundLayer" + , "ForegroundLayer" + , "AllLayers" +}; + +static QString qtscript_QGraphicsScene_SceneLayer_toStringHelper(QGraphicsScene::SceneLayer value) +{ + for (int i = 0; i < 4; ++i) { + if (qtscript_QGraphicsScene_SceneLayer_values[i] == value) + return QString::fromLatin1(qtscript_QGraphicsScene_SceneLayer_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QGraphicsScene_SceneLayer_toScriptValue(QScriptEngine *engine, const QGraphicsScene::SceneLayer &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGraphicsScene")); + return clazz.property(qtscript_QGraphicsScene_SceneLayer_toStringHelper(value)); +} + +static void qtscript_QGraphicsScene_SceneLayer_fromScriptValue(const QScriptValue &value, QGraphicsScene::SceneLayer &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGraphicsScene_SceneLayer(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 4; ++i) { + if (qtscript_QGraphicsScene_SceneLayer_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("SceneLayer(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGraphicsScene_SceneLayer_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsScene::SceneLayer value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsScene_SceneLayer_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsScene::SceneLayer value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGraphicsScene_SceneLayer_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGraphicsScene_SceneLayer_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGraphicsScene_SceneLayer, + qtscript_QGraphicsScene_SceneLayer_valueOf, qtscript_QGraphicsScene_SceneLayer_toString); + qScriptRegisterMetaType(engine, qtscript_QGraphicsScene_SceneLayer_toScriptValue, + qtscript_QGraphicsScene_SceneLayer_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGraphicsScene_SceneLayer_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGraphicsScene_SceneLayer_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGraphicsScene::SceneLayers +// + +static QScriptValue qtscript_QGraphicsScene_SceneLayers_toScriptValue(QScriptEngine *engine, const QGraphicsScene::SceneLayers &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QGraphicsScene_SceneLayers_fromScriptValue(const QScriptValue &value, QGraphicsScene::SceneLayers &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QGraphicsScene_SceneLayers(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsScene::SceneLayers result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("SceneLayers(): argument %0 is not of type SceneLayer").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QGraphicsScene_SceneLayers_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsScene::SceneLayers value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsScene_SceneLayers_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsScene::SceneLayers value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 4; ++i) { + if ((value & qtscript_QGraphicsScene_SceneLayer_values[i]) == qtscript_QGraphicsScene_SceneLayer_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QGraphicsScene_SceneLayer_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QGraphicsScene_SceneLayers_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QGraphicsScene_SceneLayers_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QGraphicsScene_SceneLayers, qtscript_QGraphicsScene_SceneLayers_valueOf, + qtscript_QGraphicsScene_SceneLayers_toString, qtscript_QGraphicsScene_SceneLayers_equals); + qScriptRegisterMetaType(engine, qtscript_QGraphicsScene_SceneLayers_toScriptValue, + qtscript_QGraphicsScene_SceneLayers_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QGraphicsScene +// + +static QScriptValue qtscript_QGraphicsScene_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 42; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsScene* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsScene.%0(): this object is not a QGraphicsScene") + .arg(qtscript_QGraphicsScene_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QGraphicsItem* _q_result = _q_self->activePanel(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QGraphicsWidget* _q_result = _q_self->activeWindow(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsEllipseItem* _q_result = _q_self->addEllipse(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPen _q_arg1 = qscriptvalue_cast(context->argument(1)); + QGraphicsEllipseItem* _q_result = _q_self->addEllipse(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPen _q_arg1 = qscriptvalue_cast(context->argument(1)); + QBrush _q_arg2 = qscriptvalue_cast(context->argument(2)); + QGraphicsEllipseItem* _q_result = _q_self->addEllipse(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QGraphicsEllipseItem* _q_result = _q_self->addEllipse(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QPen _q_arg4 = qscriptvalue_cast(context->argument(4)); + QGraphicsEllipseItem* _q_result = _q_self->addEllipse(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 6) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QPen _q_arg4 = qscriptvalue_cast(context->argument(4)); + QBrush _q_arg5 = qscriptvalue_cast(context->argument(5)); + QGraphicsEllipseItem* _q_result = _q_self->addEllipse(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QLineF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsLineItem* _q_result = _q_self->addLine(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QLineF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPen _q_arg1 = qscriptvalue_cast(context->argument(1)); + QGraphicsLineItem* _q_result = _q_self->addLine(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QGraphicsLineItem* _q_result = _q_self->addLine(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QPen _q_arg4 = qscriptvalue_cast(context->argument(4)); + QGraphicsLineItem* _q_result = _q_self->addLine(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsPathItem* _q_result = _q_self->addPath(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPen _q_arg1 = qscriptvalue_cast(context->argument(1)); + QGraphicsPathItem* _q_result = _q_self->addPath(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPen _q_arg1 = qscriptvalue_cast(context->argument(1)); + QBrush _q_arg2 = qscriptvalue_cast(context->argument(2)); + QGraphicsPathItem* _q_result = _q_self->addPath(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsPixmapItem* _q_result = _q_self->addPixmap(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsPolygonItem* _q_result = _q_self->addPolygon(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPen _q_arg1 = qscriptvalue_cast(context->argument(1)); + QGraphicsPolygonItem* _q_result = _q_self->addPolygon(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPen _q_arg1 = qscriptvalue_cast(context->argument(1)); + QBrush _q_arg2 = qscriptvalue_cast(context->argument(2)); + QGraphicsPolygonItem* _q_result = _q_self->addPolygon(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsRectItem* _q_result = _q_self->addRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPen _q_arg1 = qscriptvalue_cast(context->argument(1)); + QGraphicsRectItem* _q_result = _q_self->addRect(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPen _q_arg1 = qscriptvalue_cast(context->argument(1)); + QBrush _q_arg2 = qscriptvalue_cast(context->argument(2)); + QGraphicsRectItem* _q_result = _q_self->addRect(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QGraphicsRectItem* _q_result = _q_self->addRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QPen _q_arg4 = qscriptvalue_cast(context->argument(4)); + QGraphicsRectItem* _q_result = _q_self->addRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 6) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QPen _q_arg4 = qscriptvalue_cast(context->argument(4)); + QBrush _q_arg5 = qscriptvalue_cast(context->argument(5)); + QGraphicsRectItem* _q_result = _q_self->addRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QGraphicsSimpleTextItem* _q_result = _q_self->addSimpleText(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QFont _q_arg1 = qscriptvalue_cast(context->argument(1)); + QGraphicsSimpleTextItem* _q_result = _q_self->addSimpleText(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QGraphicsTextItem* _q_result = _q_self->addText(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QFont _q_arg1 = qscriptvalue_cast(context->argument(1)); + QGraphicsTextItem* _q_result = _q_self->addText(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + + QScriptValue _q_arg0_orig = context->argument(0); + QWidget* _q_arg0 = qscriptvalue_cast(_q_arg0_orig); + if (_q_arg0 != 0) + context->engine()->newQObject(_q_arg0_orig, _q_arg0, QScriptEngine::QtOwnership); + QGraphicsProxyWidget* _q_result = _q_self->addWidget(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + + QScriptValue _q_arg0_orig = context->argument(0); + QWidget* _q_arg0 = qscriptvalue_cast(_q_arg0_orig); + if (_q_arg0 != 0) + context->engine()->newQObject(_q_arg0_orig, _q_arg0, QScriptEngine::QtOwnership); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QGraphicsProxyWidget* _q_result = _q_self->addWidget(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + _q_self->clearFocus(); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->collidingItems(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QList _q_result = _q_self->collidingItems(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QGraphicsItemGroup* _q_result = _q_self->createItemGroup(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QGraphicsItemGroup* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->destroyItemGroup(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QGraphicsItem* _q_result = _q_self->focusItem(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasFocus(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->height(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + Qt::InputMethodQuery _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_result = _q_self->inputMethodQuery(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->invalidate(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QFlags _q_arg4 = qscriptvalue_cast >(context->argument(4)); + _q_self->invalidate(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isActive(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 2) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform _q_arg1 = qscriptvalue_cast(context->argument(1)); + QGraphicsItem* _q_result = _q_self->itemAt(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTransform _q_arg2 = qscriptvalue_cast(context->argument(2)); + QGraphicsItem* _q_result = _q_self->itemAt(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->items(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::SortOrder _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->items(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->items(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->items(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->items(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->items(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::SortOrder _q_arg2 = qscriptvalue_cast(context->argument(2)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::SortOrder _q_arg2 = qscriptvalue_cast(context->argument(2)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::SortOrder _q_arg2 = qscriptvalue_cast(context->argument(2)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::SortOrder _q_arg2 = qscriptvalue_cast(context->argument(2)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromSequence(context->engine(), _q_result); + } + } + if (context->argumentCount() == 4) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType()) + && (qMetaTypeId() == context->argument(3).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::SortOrder _q_arg2 = qscriptvalue_cast(context->argument(2)); + QTransform _q_arg3 = qscriptvalue_cast(context->argument(3)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType()) + && (qMetaTypeId() == context->argument(3).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::SortOrder _q_arg2 = qscriptvalue_cast(context->argument(2)); + QTransform _q_arg3 = qscriptvalue_cast(context->argument(3)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType()) + && (qMetaTypeId() == context->argument(3).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::SortOrder _q_arg2 = qscriptvalue_cast(context->argument(2)); + QTransform _q_arg3 = qscriptvalue_cast(context->argument(3)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType()) + && (qMetaTypeId() == context->argument(3).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::SortOrder _q_arg2 = qscriptvalue_cast(context->argument(2)); + QTransform _q_arg3 = qscriptvalue_cast(context->argument(3)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromSequence(context->engine(), _q_result); + } + } + if (context->argumentCount() == 6) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + Qt::ItemSelectionMode _q_arg4 = qscriptvalue_cast(context->argument(4)); + Qt::SortOrder _q_arg5 = qscriptvalue_cast(context->argument(5)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 7) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + Qt::ItemSelectionMode _q_arg4 = qscriptvalue_cast(context->argument(4)); + Qt::SortOrder _q_arg5 = qscriptvalue_cast(context->argument(5)); + QTransform _q_arg6 = qscriptvalue_cast(context->argument(6)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->itemsBoundingRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + QGraphicsItem* _q_result = _q_self->mouseGrabberItem(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->render(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->render(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->render(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRectF _q_arg2 = qscriptvalue_cast(context->argument(2)); + Qt::AspectRatioMode _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->render(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->selectedItems(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 0) { + QPainterPath _q_result = _q_self->selectionArea(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 2) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QEvent* _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->sendEvent(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setActivePanel(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + QGraphicsWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setActiveWindow(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 0) { + _q_self->setFocus(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + Qt::FocusReason _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFocus(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFocusItem(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::FocusReason _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setFocusItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setSceneRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSelectionArea(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setSelectionArea(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTransform _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setSelectionArea(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QTransform _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setSelectionArea(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 1) { + QStyle* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStyle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 0) { + QStyle* _q_result = _q_self->style(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->update(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->views(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 41: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->width(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 42: { + QString result = QString::fromLatin1("QGraphicsScene"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsScene_throw_ambiguity_error_helper(context, + qtscript_QGraphicsScene_function_names[_id+1], + qtscript_QGraphicsScene_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsScene_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsScene(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsScene* _q_cpp_result = new QtScriptShell_QGraphicsScene(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsScene*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isQObject()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QGraphicsScene* _q_cpp_result = new QtScriptShell_QGraphicsScene(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsScene*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsScene* _q_cpp_result = new QtScriptShell_QGraphicsScene(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsScene*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QGraphicsScene* _q_cpp_result = new QtScriptShell_QGraphicsScene(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsScene*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QtScriptShell_QGraphicsScene* _q_cpp_result = new QtScriptShell_QGraphicsScene(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsScene*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QObject* _q_arg4 = context->argument(4).toQObject(); + QtScriptShell_QGraphicsScene* _q_cpp_result = new QtScriptShell_QGraphicsScene(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsScene*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsScene_throw_ambiguity_error_helper(context, + qtscript_QGraphicsScene_function_names[_id], + qtscript_QGraphicsScene_function_signatures[_id]); +} + +static QScriptValue qtscript_QGraphicsScene_toScriptValue(QScriptEngine *engine, QGraphicsScene* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGraphicsScene_fromScriptValue(const QScriptValue &value, QGraphicsScene* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGraphicsScene_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsScene*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 43; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsScene_prototype_call, qtscript_QGraphicsScene_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsScene_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGraphicsScene_toScriptValue, + qtscript_QGraphicsScene_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsScene_static_call, proto, qtscript_QGraphicsScene_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ItemIndexMethod"), + qtscript_create_QGraphicsScene_ItemIndexMethod_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("SceneLayer"), + qtscript_create_QGraphicsScene_SceneLayer_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("SceneLayers"), + qtscript_create_QGraphicsScene_SceneLayers_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneContextMenuEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneContextMenuEvent.cpp new file mode 100644 index 00000000..2b66218f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneContextMenuEvent.cpp @@ -0,0 +1,330 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QGraphicsSceneContextMenuEvent_function_names[] = { + "QGraphicsSceneContextMenuEvent" + // static + // prototype + , "modifiers" + , "pos" + , "reason" + , "scenePos" + , "screenPos" + , "setModifiers" + , "setPos" + , "setReason" + , "setScenePos" + , "setScreenPos" + , "toString" +}; + +static const char * const qtscript_QGraphicsSceneContextMenuEvent_function_signatures[] = { + "Type type" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "KeyboardModifiers modifiers" + , "QPointF pos" + , "Reason reason" + , "QPointF pos" + , "QPoint pos" +"" +}; + +static const int qtscript_QGraphicsSceneContextMenuEvent_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsSceneContextMenuEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsSceneContextMenuEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent::Reason) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QGraphicsSceneEvent*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QGraphicsSceneContextMenuEvent::Reason +// + +static const QGraphicsSceneContextMenuEvent::Reason qtscript_QGraphicsSceneContextMenuEvent_Reason_values[] = { + QGraphicsSceneContextMenuEvent::Mouse + , QGraphicsSceneContextMenuEvent::Keyboard + , QGraphicsSceneContextMenuEvent::Other +}; + +static const char * const qtscript_QGraphicsSceneContextMenuEvent_Reason_keys[] = { + "Mouse" + , "Keyboard" + , "Other" +}; + +static QString qtscript_QGraphicsSceneContextMenuEvent_Reason_toStringHelper(QGraphicsSceneContextMenuEvent::Reason value) +{ + if ((value >= QGraphicsSceneContextMenuEvent::Mouse) && (value <= QGraphicsSceneContextMenuEvent::Other)) + return qtscript_QGraphicsSceneContextMenuEvent_Reason_keys[static_cast(value)-static_cast(QGraphicsSceneContextMenuEvent::Mouse)]; + return QString(); +} + +static QScriptValue qtscript_QGraphicsSceneContextMenuEvent_Reason_toScriptValue(QScriptEngine *engine, const QGraphicsSceneContextMenuEvent::Reason &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGraphicsSceneContextMenuEvent")); + return clazz.property(qtscript_QGraphicsSceneContextMenuEvent_Reason_toStringHelper(value)); +} + +static void qtscript_QGraphicsSceneContextMenuEvent_Reason_fromScriptValue(const QScriptValue &value, QGraphicsSceneContextMenuEvent::Reason &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGraphicsSceneContextMenuEvent_Reason(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QGraphicsSceneContextMenuEvent::Mouse) && (arg <= QGraphicsSceneContextMenuEvent::Other)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Reason(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGraphicsSceneContextMenuEvent_Reason_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsSceneContextMenuEvent::Reason value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsSceneContextMenuEvent_Reason_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsSceneContextMenuEvent::Reason value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGraphicsSceneContextMenuEvent_Reason_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGraphicsSceneContextMenuEvent_Reason_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGraphicsSceneContextMenuEvent_Reason, + qtscript_QGraphicsSceneContextMenuEvent_Reason_valueOf, qtscript_QGraphicsSceneContextMenuEvent_Reason_toString); + qScriptRegisterMetaType(engine, qtscript_QGraphicsSceneContextMenuEvent_Reason_toScriptValue, + qtscript_QGraphicsSceneContextMenuEvent_Reason_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGraphicsSceneContextMenuEvent_Reason_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGraphicsSceneContextMenuEvent_Reason_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGraphicsSceneContextMenuEvent +// + +static QScriptValue qtscript_QGraphicsSceneContextMenuEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 10; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsSceneContextMenuEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsSceneContextMenuEvent.%0(): this object is not a QGraphicsSceneContextMenuEvent") + .arg(qtscript_QGraphicsSceneContextMenuEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->modifiers(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QGraphicsSceneContextMenuEvent::Reason _q_result = _q_self->reason(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->scenePos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->screenPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setModifiers(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QGraphicsSceneContextMenuEvent::Reason _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setReason(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScenePos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScreenPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: { + QString result = QString::fromLatin1("QGraphicsSceneContextMenuEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneContextMenuEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneContextMenuEvent_function_names[_id+1], + qtscript_QGraphicsSceneContextMenuEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsSceneContextMenuEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsSceneContextMenuEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QGraphicsSceneContextMenuEvent* _q_cpp_result = new QGraphicsSceneContextMenuEvent(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsSceneContextMenuEvent* _q_cpp_result = new QGraphicsSceneContextMenuEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneContextMenuEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneContextMenuEvent_function_names[_id], + qtscript_QGraphicsSceneContextMenuEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsSceneContextMenuEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsSceneContextMenuEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 11; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsSceneContextMenuEvent_prototype_call, qtscript_QGraphicsSceneContextMenuEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsSceneContextMenuEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsSceneContextMenuEvent_static_call, proto, qtscript_QGraphicsSceneContextMenuEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Reason"), + qtscript_create_QGraphicsSceneContextMenuEvent_Reason_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneDragDropEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneDragDropEvent.cpp new file mode 100644 index 00000000..80b767f5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneDragDropEvent.cpp @@ -0,0 +1,343 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QGraphicsSceneDragDropEvent_function_names[] = { + "QGraphicsSceneDragDropEvent" + // static + // prototype + , "acceptProposedAction" + , "buttons" + , "dropAction" + , "mimeData" + , "modifiers" + , "pos" + , "possibleActions" + , "proposedAction" + , "scenePos" + , "screenPos" + , "setButtons" + , "setDropAction" + , "setModifiers" + , "setPos" + , "setPossibleActions" + , "setProposedAction" + , "setScenePos" + , "setScreenPos" + , "source" + , "toString" +}; + +static const char * const qtscript_QGraphicsSceneDragDropEvent_function_signatures[] = { + "Type type" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "MouseButtons buttons" + , "DropAction action" + , "KeyboardModifiers modifiers" + , "QPointF pos" + , "DropActions actions" + , "DropAction action" + , "QPointF pos" + , "QPoint pos" + , "" +"" +}; + +static const int qtscript_QGraphicsSceneDragDropEvent_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGraphicsSceneDragDropEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsSceneDragDropEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsSceneDragDropEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::DropAction) +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QGraphicsSceneEvent*) + +// +// QGraphicsSceneDragDropEvent +// + +static QScriptValue qtscript_QGraphicsSceneDragDropEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 19; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsSceneDragDropEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsSceneDragDropEvent.%0(): this object is not a QGraphicsSceneDragDropEvent") + .arg(qtscript_QGraphicsSceneDragDropEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->acceptProposedAction(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->buttons(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + Qt::DropAction _q_result = _q_self->dropAction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + const QMimeData* _q_result = const_cast(_q_self->mimeData()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->modifiers(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->possibleActions(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + Qt::DropAction _q_result = _q_self->proposedAction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->scenePos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->screenPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setButtons(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + Qt::DropAction _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDropAction(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setModifiers(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setPossibleActions(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + Qt::DropAction _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setProposedAction(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScenePos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScreenPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->source(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: { + QString result = QString::fromLatin1("QGraphicsSceneDragDropEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneDragDropEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneDragDropEvent_function_names[_id+1], + qtscript_QGraphicsSceneDragDropEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsSceneDragDropEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsSceneDragDropEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QGraphicsSceneDragDropEvent* _q_cpp_result = new QGraphicsSceneDragDropEvent(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsSceneDragDropEvent* _q_cpp_result = new QGraphicsSceneDragDropEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneDragDropEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneDragDropEvent_function_names[_id], + qtscript_QGraphicsSceneDragDropEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsSceneDragDropEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsSceneDragDropEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 20; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsSceneDragDropEvent_prototype_call, qtscript_QGraphicsSceneDragDropEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsSceneDragDropEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsSceneDragDropEvent_static_call, proto, qtscript_QGraphicsSceneDragDropEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneEvent.cpp new file mode 100644 index 00000000..073ecd7b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneEvent.cpp @@ -0,0 +1,144 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QGraphicsSceneEvent_function_names[] = { + "QGraphicsSceneEvent" + // static + // prototype + , "widget" + , "toString" +}; + +static const char * const qtscript_QGraphicsSceneEvent_function_signatures[] = { + "Type type" + // static + // prototype + , "" +"" +}; + +static const int qtscript_QGraphicsSceneEvent_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 +}; + +static QScriptValue qtscript_QGraphicsSceneEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsSceneEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsSceneEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QEvent*) + +// +// QGraphicsSceneEvent +// + +static QScriptValue qtscript_QGraphicsSceneEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsSceneEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsSceneEvent.%0(): this object is not a QGraphicsSceneEvent") + .arg(qtscript_QGraphicsSceneEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->widget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("QGraphicsSceneEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneEvent_function_names[_id+1], + qtscript_QGraphicsSceneEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsSceneEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsSceneEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsSceneEvent* _q_cpp_result = new QGraphicsSceneEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneEvent_function_names[_id], + qtscript_QGraphicsSceneEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsSceneEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsSceneEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsSceneEvent_prototype_call, qtscript_QGraphicsSceneEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsSceneEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsSceneEvent_static_call, proto, qtscript_QGraphicsSceneEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneHelpEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneHelpEvent.cpp new file mode 100644 index 00000000..d48c871f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneHelpEvent.cpp @@ -0,0 +1,180 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QGraphicsSceneHelpEvent_function_names[] = { + "QGraphicsSceneHelpEvent" + // static + // prototype + , "scenePos" + , "screenPos" + , "setScenePos" + , "setScreenPos" + , "toString" +}; + +static const char * const qtscript_QGraphicsSceneHelpEvent_function_signatures[] = { + "Type type" + // static + // prototype + , "" + , "" + , "QPointF pos" + , "QPoint pos" +"" +}; + +static const int qtscript_QGraphicsSceneHelpEvent_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsSceneHelpEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsSceneHelpEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsSceneHelpEvent*) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QGraphicsSceneEvent*) + +// +// QGraphicsSceneHelpEvent +// + +static QScriptValue qtscript_QGraphicsSceneHelpEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsSceneHelpEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsSceneHelpEvent.%0(): this object is not a QGraphicsSceneHelpEvent") + .arg(qtscript_QGraphicsSceneHelpEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->scenePos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->screenPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScenePos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScreenPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: { + QString result = QString::fromLatin1("QGraphicsSceneHelpEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneHelpEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneHelpEvent_function_names[_id+1], + qtscript_QGraphicsSceneHelpEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsSceneHelpEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsSceneHelpEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QGraphicsSceneHelpEvent* _q_cpp_result = new QGraphicsSceneHelpEvent(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsSceneHelpEvent* _q_cpp_result = new QGraphicsSceneHelpEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneHelpEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneHelpEvent_function_names[_id], + qtscript_QGraphicsSceneHelpEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsSceneHelpEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsSceneHelpEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsSceneHelpEvent_prototype_call, qtscript_QGraphicsSceneHelpEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsSceneHelpEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsSceneHelpEvent_static_call, proto, qtscript_QGraphicsSceneHelpEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneHoverEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneHoverEvent.cpp new file mode 100644 index 00000000..8dfc4324 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneHoverEvent.cpp @@ -0,0 +1,286 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QGraphicsSceneHoverEvent_function_names[] = { + "QGraphicsSceneHoverEvent" + // static + // prototype + , "lastPos" + , "lastScenePos" + , "lastScreenPos" + , "modifiers" + , "pos" + , "scenePos" + , "screenPos" + , "setLastPos" + , "setLastScenePos" + , "setLastScreenPos" + , "setModifiers" + , "setPos" + , "setScenePos" + , "setScreenPos" + , "toString" +}; + +static const char * const qtscript_QGraphicsSceneHoverEvent_function_signatures[] = { + "Type type" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QPointF pos" + , "QPointF pos" + , "QPoint pos" + , "KeyboardModifiers modifiers" + , "QPointF pos" + , "QPointF pos" + , "QPoint pos" +"" +}; + +static const int qtscript_QGraphicsSceneHoverEvent_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsSceneHoverEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsSceneHoverEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsSceneHoverEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QGraphicsSceneEvent*) + +// +// QGraphicsSceneHoverEvent +// + +static QScriptValue qtscript_QGraphicsSceneHoverEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 14; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsSceneHoverEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsSceneHoverEvent.%0(): this object is not a QGraphicsSceneHoverEvent") + .arg(qtscript_QGraphicsSceneHoverEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->lastPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->lastScenePos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->lastScreenPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->modifiers(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->scenePos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->screenPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLastPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLastScenePos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLastScreenPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setModifiers(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScenePos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScreenPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: { + QString result = QString::fromLatin1("QGraphicsSceneHoverEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneHoverEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneHoverEvent_function_names[_id+1], + qtscript_QGraphicsSceneHoverEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsSceneHoverEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsSceneHoverEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QGraphicsSceneHoverEvent* _q_cpp_result = new QGraphicsSceneHoverEvent(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsSceneHoverEvent* _q_cpp_result = new QGraphicsSceneHoverEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneHoverEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneHoverEvent_function_names[_id], + qtscript_QGraphicsSceneHoverEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsSceneHoverEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsSceneHoverEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 15; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsSceneHoverEvent_prototype_call, qtscript_QGraphicsSceneHoverEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsSceneHoverEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsSceneHoverEvent_static_call, proto, qtscript_QGraphicsSceneHoverEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneMouseEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneMouseEvent.cpp new file mode 100644 index 00000000..f82fca96 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneMouseEvent.cpp @@ -0,0 +1,399 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QGraphicsSceneMouseEvent_function_names[] = { + "QGraphicsSceneMouseEvent" + // static + // prototype + , "button" + , "buttonDownPos" + , "buttonDownScenePos" + , "buttonDownScreenPos" + , "buttons" + , "lastPos" + , "lastScenePos" + , "lastScreenPos" + , "modifiers" + , "pos" + , "scenePos" + , "screenPos" + , "setButton" + , "setButtonDownPos" + , "setButtonDownScenePos" + , "setButtonDownScreenPos" + , "setButtons" + , "setLastPos" + , "setLastScenePos" + , "setLastScreenPos" + , "setModifiers" + , "setPos" + , "setScenePos" + , "setScreenPos" + , "toString" +}; + +static const char * const qtscript_QGraphicsSceneMouseEvent_function_signatures[] = { + "Type type" + // static + // prototype + , "" + , "MouseButton button" + , "MouseButton button" + , "MouseButton button" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "MouseButton button" + , "MouseButton button, QPointF pos" + , "MouseButton button, QPointF pos" + , "MouseButton button, QPoint pos" + , "MouseButtons buttons" + , "QPointF pos" + , "QPointF pos" + , "QPoint pos" + , "KeyboardModifiers modifiers" + , "QPointF pos" + , "QPointF pos" + , "QPoint pos" +"" +}; + +static const int qtscript_QGraphicsSceneMouseEvent_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 2 + , 2 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsSceneMouseEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsSceneMouseEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsSceneMouseEvent*) +Q_DECLARE_METATYPE(Qt::MouseButton) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QGraphicsSceneEvent*) + +// +// QGraphicsSceneMouseEvent +// + +static QScriptValue qtscript_QGraphicsSceneMouseEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 24; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsSceneMouseEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsSceneMouseEvent.%0(): this object is not a QGraphicsSceneMouseEvent") + .arg(qtscript_QGraphicsSceneMouseEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + Qt::MouseButton _q_result = _q_self->button(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + Qt::MouseButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_result = _q_self->buttonDownPos(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + Qt::MouseButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_result = _q_self->buttonDownScenePos(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + Qt::MouseButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_result = _q_self->buttonDownScreenPos(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->buttons(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->lastPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->lastScenePos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->lastScreenPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->modifiers(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->scenePos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->screenPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + Qt::MouseButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setButton(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 2) { + Qt::MouseButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setButtonDownPos(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 2) { + Qt::MouseButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setButtonDownScenePos(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 2) { + Qt::MouseButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setButtonDownScreenPos(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setButtons(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLastPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLastScenePos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLastScreenPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setModifiers(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScenePos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScreenPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: { + QString result = QString::fromLatin1("QGraphicsSceneMouseEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneMouseEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneMouseEvent_function_names[_id+1], + qtscript_QGraphicsSceneMouseEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsSceneMouseEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsSceneMouseEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QGraphicsSceneMouseEvent* _q_cpp_result = new QGraphicsSceneMouseEvent(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsSceneMouseEvent* _q_cpp_result = new QGraphicsSceneMouseEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneMouseEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneMouseEvent_function_names[_id], + qtscript_QGraphicsSceneMouseEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsSceneMouseEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsSceneMouseEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 25; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsSceneMouseEvent_prototype_call, qtscript_QGraphicsSceneMouseEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsSceneMouseEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsSceneMouseEvent_static_call, proto, qtscript_QGraphicsSceneMouseEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneMoveEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneMoveEvent.cpp new file mode 100644 index 00000000..425828df --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneMoveEvent.cpp @@ -0,0 +1,174 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QGraphicsSceneMoveEvent_function_names[] = { + "QGraphicsSceneMoveEvent" + // static + // prototype + , "newPos" + , "oldPos" + , "setNewPos" + , "setOldPos" + , "toString" +}; + +static const char * const qtscript_QGraphicsSceneMoveEvent_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "QPointF pos" + , "QPointF pos" +"" +}; + +static const int qtscript_QGraphicsSceneMoveEvent_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsSceneMoveEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsSceneMoveEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsSceneMoveEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneEvent*) + +// +// QGraphicsSceneMoveEvent +// + +static QScriptValue qtscript_QGraphicsSceneMoveEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsSceneMoveEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsSceneMoveEvent.%0(): this object is not a QGraphicsSceneMoveEvent") + .arg(qtscript_QGraphicsSceneMoveEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->newPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->oldPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setNewPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOldPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: { + QString result = QString::fromLatin1("QGraphicsSceneMoveEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneMoveEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneMoveEvent_function_names[_id+1], + qtscript_QGraphicsSceneMoveEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsSceneMoveEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsSceneMoveEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QGraphicsSceneMoveEvent* _q_cpp_result = new QGraphicsSceneMoveEvent(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneMoveEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneMoveEvent_function_names[_id], + qtscript_QGraphicsSceneMoveEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsSceneMoveEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsSceneMoveEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsSceneMoveEvent_prototype_call, qtscript_QGraphicsSceneMoveEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsSceneMoveEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsSceneMoveEvent_static_call, proto, qtscript_QGraphicsSceneMoveEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneResizeEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneResizeEvent.cpp new file mode 100644 index 00000000..5594a353 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneResizeEvent.cpp @@ -0,0 +1,174 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QGraphicsSceneResizeEvent_function_names[] = { + "QGraphicsSceneResizeEvent" + // static + // prototype + , "newSize" + , "oldSize" + , "setNewSize" + , "setOldSize" + , "toString" +}; + +static const char * const qtscript_QGraphicsSceneResizeEvent_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "QSizeF size" + , "QSizeF size" +"" +}; + +static const int qtscript_QGraphicsSceneResizeEvent_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsSceneResizeEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsSceneResizeEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsSceneResizeEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneEvent*) + +// +// QGraphicsSceneResizeEvent +// + +static QScriptValue qtscript_QGraphicsSceneResizeEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsSceneResizeEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsSceneResizeEvent.%0(): this object is not a QGraphicsSceneResizeEvent") + .arg(qtscript_QGraphicsSceneResizeEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QSizeF _q_result = _q_self->newSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QSizeF _q_result = _q_self->oldSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QSizeF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setNewSize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QSizeF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOldSize(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: { + QString result = QString::fromLatin1("QGraphicsSceneResizeEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneResizeEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneResizeEvent_function_names[_id+1], + qtscript_QGraphicsSceneResizeEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsSceneResizeEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsSceneResizeEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QGraphicsSceneResizeEvent* _q_cpp_result = new QGraphicsSceneResizeEvent(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneResizeEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneResizeEvent_function_names[_id], + qtscript_QGraphicsSceneResizeEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsSceneResizeEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsSceneResizeEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsSceneResizeEvent_prototype_call, qtscript_QGraphicsSceneResizeEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsSceneResizeEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsSceneResizeEvent_static_call, proto, qtscript_QGraphicsSceneResizeEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneWheelEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneWheelEvent.cpp new file mode 100644 index 00000000..7be18048 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSceneWheelEvent.cpp @@ -0,0 +1,288 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QGraphicsSceneWheelEvent_function_names[] = { + "QGraphicsSceneWheelEvent" + // static + // prototype + , "buttons" + , "delta" + , "modifiers" + , "orientation" + , "pos" + , "scenePos" + , "screenPos" + , "setButtons" + , "setDelta" + , "setModifiers" + , "setOrientation" + , "setPos" + , "setScenePos" + , "setScreenPos" + , "toString" +}; + +static const char * const qtscript_QGraphicsSceneWheelEvent_function_signatures[] = { + "Type type" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "MouseButtons buttons" + , "int delta" + , "KeyboardModifiers modifiers" + , "Orientation orientation" + , "QPointF pos" + , "QPointF pos" + , "QPoint pos" +"" +}; + +static const int qtscript_QGraphicsSceneWheelEvent_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsSceneWheelEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsSceneWheelEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsSceneWheelEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QGraphicsSceneEvent*) + +// +// QGraphicsSceneWheelEvent +// + +static QScriptValue qtscript_QGraphicsSceneWheelEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 14; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsSceneWheelEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsSceneWheelEvent.%0(): this object is not a QGraphicsSceneWheelEvent") + .arg(qtscript_QGraphicsSceneWheelEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->buttons(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->delta(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->modifiers(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + Qt::Orientation _q_result = _q_self->orientation(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->pos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QPointF _q_result = _q_self->scenePos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QPoint _q_result = _q_self->screenPos(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setButtons(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setDelta(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setModifiers(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOrientation(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScenePos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScreenPos(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: { + QString result = QString::fromLatin1("QGraphicsSceneWheelEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneWheelEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneWheelEvent_function_names[_id+1], + qtscript_QGraphicsSceneWheelEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsSceneWheelEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsSceneWheelEvent(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QGraphicsSceneWheelEvent* _q_cpp_result = new QGraphicsSceneWheelEvent(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QEvent::Type _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsSceneWheelEvent* _q_cpp_result = new QGraphicsSceneWheelEvent(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSceneWheelEvent_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSceneWheelEvent_function_names[_id], + qtscript_QGraphicsSceneWheelEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsSceneWheelEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsSceneWheelEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 15; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsSceneWheelEvent_prototype_call, qtscript_QGraphicsSceneWheelEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsSceneWheelEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsSceneWheelEvent_static_call, proto, qtscript_QGraphicsSceneWheelEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSimpleTextItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSimpleTextItem.cpp new file mode 100644 index 00000000..8c89c973 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsSimpleTextItem.cpp @@ -0,0 +1,219 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsSimpleTextItem.h" + +static const char * const qtscript_QGraphicsSimpleTextItem_function_names[] = { + "QGraphicsSimpleTextItem" + // static + // prototype + , "font" + , "setFont" + , "setText" + , "text" + , "toString" +}; + +static const char * const qtscript_QGraphicsSimpleTextItem_function_signatures[] = { + "QGraphicsItem parent\nString text, QGraphicsItem parent" + // static + // prototype + , "" + , "QFont font" + , "String text" + , "" +"" +}; + +static const int qtscript_QGraphicsSimpleTextItem_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGraphicsSimpleTextItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsSimpleTextItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsSimpleTextItem*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsSimpleTextItem*) +Q_DECLARE_METATYPE(QAbstractGraphicsShapeItem*) + +// +// QGraphicsSimpleTextItem +// + +static QScriptValue qtscript_QGraphicsSimpleTextItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsSimpleTextItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsSimpleTextItem.%0(): this object is not a QGraphicsSimpleTextItem") + .arg(qtscript_QGraphicsSimpleTextItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QFont _q_result = _q_self->font(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFont(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->text(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QGraphicsSimpleTextItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSimpleTextItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSimpleTextItem_function_names[_id+1], + qtscript_QGraphicsSimpleTextItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsSimpleTextItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsSimpleTextItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsSimpleTextItem* _q_cpp_result = new QtScriptShell_QGraphicsSimpleTextItem(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsSimpleTextItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsSimpleTextItem* _q_cpp_result = new QtScriptShell_QGraphicsSimpleTextItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsSimpleTextItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QGraphicsSimpleTextItem* _q_cpp_result = new QtScriptShell_QGraphicsSimpleTextItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsSimpleTextItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QGraphicsItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGraphicsSimpleTextItem* _q_cpp_result = new QtScriptShell_QGraphicsSimpleTextItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QGraphicsSimpleTextItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsSimpleTextItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsSimpleTextItem_function_names[_id], + qtscript_QGraphicsSimpleTextItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QGraphicsSimpleTextItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsSimpleTextItem*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsSimpleTextItem_prototype_call, qtscript_QGraphicsSimpleTextItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsSimpleTextItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsSimpleTextItem_static_call, proto, qtscript_QGraphicsSimpleTextItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsTextItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsTextItem.cpp new file mode 100644 index 00000000..5f7bf099 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsTextItem.cpp @@ -0,0 +1,415 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsTextItem.h" + +static const char * const qtscript_QGraphicsTextItem_function_names[] = { + "QGraphicsTextItem" + // static + // prototype + , "adjustSize" + , "defaultTextColor" + , "document" + , "font" + , "openExternalLinks" + , "setDefaultTextColor" + , "setDocument" + , "setFont" + , "setHtml" + , "setOpenExternalLinks" + , "setPlainText" + , "setTabChangesFocus" + , "setTextCursor" + , "setTextInteractionFlags" + , "setTextWidth" + , "tabChangesFocus" + , "textCursor" + , "textInteractionFlags" + , "textWidth" + , "toHtml" + , "toPlainText" + , "toString" +}; + +static const char * const qtscript_QGraphicsTextItem_function_signatures[] = { + "QGraphicsItem parent\nString text, QGraphicsItem parent" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "QColor c" + , "QTextDocument document" + , "QFont font" + , "String html" + , "bool open" + , "String text" + , "bool b" + , "QTextCursor cursor" + , "TextInteractionFlags flags" + , "qreal width" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QGraphicsTextItem_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGraphicsTextItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsTextItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsTextItem*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsTextItem*) +Q_DECLARE_METATYPE(QTextDocument*) +Q_DECLARE_METATYPE(QTextCursor) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QGraphicsObject*) + +// +// QGraphicsTextItem +// + +static QScriptValue qtscript_QGraphicsTextItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 21; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsTextItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsTextItem.%0(): this object is not a QGraphicsTextItem") + .arg(qtscript_QGraphicsTextItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->adjustSize(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QColor _q_result = _q_self->defaultTextColor(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QTextDocument* _q_result = _q_self->document(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QFont _q_result = _q_self->font(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->openExternalLinks(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QColor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDefaultTextColor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QTextDocument* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDocument(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFont(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setHtml(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setOpenExternalLinks(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPlainText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setTabChangesFocus(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QTextCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTextCursor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setTextInteractionFlags(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTextWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->tabChangesFocus(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QTextCursor _q_result = _q_self->textCursor(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->textInteractionFlags(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->textWidth(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toHtml(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toPlainText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: { + QString result = QString::fromLatin1("QGraphicsTextItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsTextItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsTextItem_function_names[_id+1], + qtscript_QGraphicsTextItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsTextItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsTextItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsTextItem* _q_cpp_result = new QtScriptShell_QGraphicsTextItem(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsTextItem*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsTextItem* _q_cpp_result = new QtScriptShell_QGraphicsTextItem(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsTextItem*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QGraphicsTextItem* _q_cpp_result = new QtScriptShell_QGraphicsTextItem(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsTextItem*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QGraphicsItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGraphicsTextItem* _q_cpp_result = new QtScriptShell_QGraphicsTextItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsTextItem*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsTextItem_throw_ambiguity_error_helper(context, + qtscript_QGraphicsTextItem_function_names[_id], + qtscript_QGraphicsTextItem_function_signatures[_id]); +} + +static QScriptValue qtscript_QGraphicsTextItem_toScriptValue(QScriptEngine *engine, QGraphicsTextItem* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGraphicsTextItem_fromScriptValue(const QScriptValue &value, QGraphicsTextItem* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGraphicsTextItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsTextItem*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 22; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsTextItem_prototype_call, qtscript_QGraphicsTextItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsTextItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGraphicsTextItem_toScriptValue, + qtscript_QGraphicsTextItem_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsTextItem_static_call, proto, qtscript_QGraphicsTextItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsTransform.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsTransform.cpp new file mode 100644 index 00000000..6bbf3ab4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsTransform.cpp @@ -0,0 +1,166 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsTransform.h" + +static const char * const qtscript_QGraphicsTransform_function_names[] = { + "QGraphicsTransform" + // static + // prototype + , "applyTo" + , "toString" +}; + +static const char * const qtscript_QGraphicsTransform_function_signatures[] = { + "QObject parent" + // static + // prototype + , "QMatrix4x4 matrix" +"" +}; + +static const int qtscript_QGraphicsTransform_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 +}; + +static QScriptValue qtscript_QGraphicsTransform_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsTransform::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsTransform*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsTransform*) +Q_DECLARE_METATYPE(QMatrix4x4*) + +// +// QGraphicsTransform +// + +static QScriptValue qtscript_QGraphicsTransform_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsTransform* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsTransform.%0(): this object is not a QGraphicsTransform") + .arg(qtscript_QGraphicsTransform_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QMatrix4x4* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->applyTo(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: { + QString result = QString::fromLatin1("QGraphicsTransform"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsTransform_throw_ambiguity_error_helper(context, + qtscript_QGraphicsTransform_function_names[_id+1], + qtscript_QGraphicsTransform_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsTransform_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsTransform(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsTransform* _q_cpp_result = new QtScriptShell_QGraphicsTransform(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsTransform*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QGraphicsTransform* _q_cpp_result = new QtScriptShell_QGraphicsTransform(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsTransform*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsTransform_throw_ambiguity_error_helper(context, + qtscript_QGraphicsTransform_function_names[_id], + qtscript_QGraphicsTransform_function_signatures[_id]); +} + +static QScriptValue qtscript_QGraphicsTransform_toScriptValue(QScriptEngine *engine, QGraphicsTransform* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGraphicsTransform_fromScriptValue(const QScriptValue &value, QGraphicsTransform* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGraphicsTransform_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsTransform*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsTransform_prototype_call, qtscript_QGraphicsTransform_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsTransform_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGraphicsTransform_toScriptValue, + qtscript_QGraphicsTransform_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsTransform_static_call, proto, qtscript_QGraphicsTransform_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsView.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsView.cpp new file mode 100644 index 00000000..f11256c5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsView.cpp @@ -0,0 +1,953 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsView.h" + +static const char * const qtscript_QGraphicsView_function_names[] = { + "QGraphicsView" + // static + // prototype + , "centerOn" + , "ensureVisible" + , "fitInView" + , "isTransformed" + , "itemAt" + , "items" + , "mapFromScene" + , "mapToScene" + , "matrix" + , "render" + , "resetCachedContent" + , "resetMatrix" + , "resetTransform" + , "rotate" + , "rubberBandRect" + , "scale" + , "scene" + , "setMatrix" + , "setOptimizationFlag" + , "setRenderHint" + , "setScene" + , "setSceneRect" + , "setTransform" + , "shear" + , "transform" + , "translate" + , "viewportTransform" + , "toString" +}; + +static const char * const qtscript_QGraphicsView_function_signatures[] = { + "QGraphicsScene scene, QWidget parent\nQWidget parent" + // static + // prototype + , "QGraphicsItem item\nQPointF pos\nqreal x, qreal y" + , "QGraphicsItem item, int xmargin, int ymargin\nQRectF rect, int xmargin, int ymargin\nqreal x, qreal y, qreal w, qreal h, int xmargin, int ymargin" + , "QGraphicsItem item, AspectRatioMode aspectRadioMode\nQRectF rect, AspectRatioMode aspectRadioMode\nqreal x, qreal y, qreal w, qreal h, AspectRatioMode aspectRadioMode" + , "" + , "QPoint pos\nint x, int y" + , "\nQPainterPath path, ItemSelectionMode mode\nQPoint pos\nQPolygon polygon, ItemSelectionMode mode\nQRect rect, ItemSelectionMode mode\nint x, int y\nint x, int y, int w, int h, ItemSelectionMode mode" + , "QPainterPath path\nQPointF point\nQPolygonF polygon\nQRectF rect\nqreal x, qreal y\nqreal x, qreal y, qreal w, qreal h" + , "QPainterPath path\nQPoint point\nQPolygon polygon\nQRect rect\nint x, int y\nint x, int y, int w, int h" + , "" + , "QPainter painter, QRectF target, QRect source, AspectRatioMode aspectRatioMode" + , "" + , "" + , "" + , "qreal angle" + , "" + , "qreal sx, qreal sy" + , "" + , "QMatrix matrix, bool combine" + , "OptimizationFlag flag, bool enabled" + , "RenderHint hint, bool enabled" + , "QGraphicsScene scene" + , "qreal x, qreal y, qreal w, qreal h" + , "QTransform matrix, bool combine" + , "qreal sh, qreal sv" + , "" + , "qreal dx, qreal dy" + , "" +"" +}; + +static const int qtscript_QGraphicsView_function_lengths[] = { + 2 + // static + // prototype + , 2 + , 6 + , 5 + , 0 + , 2 + , 5 + , 4 + , 4 + , 0 + , 4 + , 0 + , 0 + , 0 + , 1 + , 0 + , 2 + , 0 + , 2 + , 2 + , 2 + , 1 + , 4 + , 2 + , 2 + , 0 + , 2 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGraphicsView_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsView::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsView*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsView*) +Q_DECLARE_METATYPE(QGraphicsView::DragMode) +Q_DECLARE_METATYPE(QGraphicsView::ViewportAnchor) +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::AspectRatioMode) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QGraphicsScene*) +Q_DECLARE_METATYPE(QGraphicsView::OptimizationFlag) +Q_DECLARE_METATYPE(QPainter::RenderHint) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractScrollArea*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QGraphicsView::DragMode +// + +static const QGraphicsView::DragMode qtscript_QGraphicsView_DragMode_values[] = { + QGraphicsView::NoDrag + , QGraphicsView::ScrollHandDrag + , QGraphicsView::RubberBandDrag +}; + +static const char * const qtscript_QGraphicsView_DragMode_keys[] = { + "NoDrag" + , "ScrollHandDrag" + , "RubberBandDrag" +}; + +static QString qtscript_QGraphicsView_DragMode_toStringHelper(QGraphicsView::DragMode value) +{ + if ((value >= QGraphicsView::NoDrag) && (value <= QGraphicsView::RubberBandDrag)) + return qtscript_QGraphicsView_DragMode_keys[static_cast(value)-static_cast(QGraphicsView::NoDrag)]; + return QString(); +} + +static QScriptValue qtscript_QGraphicsView_DragMode_toScriptValue(QScriptEngine *engine, const QGraphicsView::DragMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGraphicsView")); + return clazz.property(qtscript_QGraphicsView_DragMode_toStringHelper(value)); +} + +static void qtscript_QGraphicsView_DragMode_fromScriptValue(const QScriptValue &value, QGraphicsView::DragMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGraphicsView_DragMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QGraphicsView::NoDrag) && (arg <= QGraphicsView::RubberBandDrag)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("DragMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGraphicsView_DragMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsView::DragMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsView_DragMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsView::DragMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGraphicsView_DragMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGraphicsView_DragMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGraphicsView_DragMode, + qtscript_QGraphicsView_DragMode_valueOf, qtscript_QGraphicsView_DragMode_toString); + qScriptRegisterMetaType(engine, qtscript_QGraphicsView_DragMode_toScriptValue, + qtscript_QGraphicsView_DragMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGraphicsView_DragMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGraphicsView_DragMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGraphicsView::ViewportAnchor +// + +static const QGraphicsView::ViewportAnchor qtscript_QGraphicsView_ViewportAnchor_values[] = { + QGraphicsView::NoAnchor + , QGraphicsView::AnchorViewCenter + , QGraphicsView::AnchorUnderMouse +}; + +static const char * const qtscript_QGraphicsView_ViewportAnchor_keys[] = { + "NoAnchor" + , "AnchorViewCenter" + , "AnchorUnderMouse" +}; + +static QString qtscript_QGraphicsView_ViewportAnchor_toStringHelper(QGraphicsView::ViewportAnchor value) +{ + if ((value >= QGraphicsView::NoAnchor) && (value <= QGraphicsView::AnchorUnderMouse)) + return qtscript_QGraphicsView_ViewportAnchor_keys[static_cast(value)-static_cast(QGraphicsView::NoAnchor)]; + return QString(); +} + +static QScriptValue qtscript_QGraphicsView_ViewportAnchor_toScriptValue(QScriptEngine *engine, const QGraphicsView::ViewportAnchor &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QGraphicsView")); + return clazz.property(qtscript_QGraphicsView_ViewportAnchor_toStringHelper(value)); +} + +static void qtscript_QGraphicsView_ViewportAnchor_fromScriptValue(const QScriptValue &value, QGraphicsView::ViewportAnchor &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QGraphicsView_ViewportAnchor(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QGraphicsView::NoAnchor) && (arg <= QGraphicsView::AnchorUnderMouse)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ViewportAnchor(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QGraphicsView_ViewportAnchor_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsView::ViewportAnchor value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QGraphicsView_ViewportAnchor_toString(QScriptContext *context, QScriptEngine *engine) +{ + QGraphicsView::ViewportAnchor value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QGraphicsView_ViewportAnchor_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QGraphicsView_ViewportAnchor_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QGraphicsView_ViewportAnchor, + qtscript_QGraphicsView_ViewportAnchor_valueOf, qtscript_QGraphicsView_ViewportAnchor_toString); + qScriptRegisterMetaType(engine, qtscript_QGraphicsView_ViewportAnchor_toScriptValue, + qtscript_QGraphicsView_ViewportAnchor_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QGraphicsView_ViewportAnchor_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QGraphicsView_ViewportAnchor_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QGraphicsView +// + +static QScriptValue qtscript_QGraphicsView_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 27; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsView* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsView.%0(): this object is not a QGraphicsView") + .arg(qtscript_QGraphicsView_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->centerOn(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->centerOn(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->centerOn(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->ensureVisible(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->ensureVisible(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->ensureVisible(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->ensureVisible(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->ensureVisible(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isNumber() + && context->argument(2).isNumber()) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->ensureVisible(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->ensureVisible(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + int _q_arg4 = context->argument(4).toInt32(); + _q_self->ensureVisible(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + int _q_arg4 = context->argument(4).toInt32(); + int _q_arg5 = context->argument(5).toInt32(); + _q_self->ensureVisible(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->fitInView(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->fitInView(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + const QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::AspectRatioMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->fitInView(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::AspectRatioMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->fitInView(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->fitInView(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + Qt::AspectRatioMode _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->fitInView(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isTransformed(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsItem* _q_result = _q_self->itemAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QGraphicsItem* _q_result = _q_self->itemAt(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->items(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->items(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->items(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->items(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->items(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ItemSelectionMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QList _q_result = _q_self->items(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QList _q_result = _q_self->items(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + Qt::ItemSelectionMode _q_arg4 = qscriptvalue_cast(context->argument(4)); + QList _q_result = _q_self->items(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->mapFromScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_result = _q_self->mapFromScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygonF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygon _q_result = _q_self->mapFromScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRectF _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygon _q_result = _q_self->mapFromScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPoint _q_result = _q_self->mapFromScene(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + QPolygon _q_result = _q_self->mapFromScene(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPainterPath _q_result = _q_self->mapToScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPointF _q_result = _q_self->mapToScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPolygon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->mapToScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPolygonF _q_result = _q_self->mapToScene(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QPointF _q_result = _q_self->mapToScene(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QPolygonF _q_result = _q_self->mapToScene(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QMatrix _q_result = _q_self->matrix(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->render(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->render(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRect _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->render(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRect _q_arg2 = qscriptvalue_cast(context->argument(2)); + Qt::AspectRatioMode _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->render(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 0) { + _q_self->resetCachedContent(); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + _q_self->resetMatrix(); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 0) { + _q_self->resetTransform(); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->rotate(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->rubberBandRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->scale(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QGraphicsScene* _q_result = _q_self->scene(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMatrix(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QMatrix _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setMatrix(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QGraphicsView::OptimizationFlag _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOptimizationFlag(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QGraphicsView::OptimizationFlag _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setOptimizationFlag(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QPainter::RenderHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRenderHint(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QPainter::RenderHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setRenderHint(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QGraphicsScene* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setScene(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setSceneRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTransform(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setTransform(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->shear(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 0) { + QTransform _q_result = _q_self->transform(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->translate(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 0) { + QTransform _q_result = _q_self->viewportTransform(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: { + QString result = QString::fromLatin1("QGraphicsView"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsView_throw_ambiguity_error_helper(context, + qtscript_QGraphicsView_function_names[_id+1], + qtscript_QGraphicsView_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGraphicsView_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsView(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsView* _q_cpp_result = new QtScriptShell_QGraphicsView(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QGraphicsScene* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsView* _q_cpp_result = new QtScriptShell_QGraphicsView(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsView* _q_cpp_result = new QtScriptShell_QGraphicsView(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QGraphicsScene* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGraphicsView* _q_cpp_result = new QtScriptShell_QGraphicsView(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsView_throw_ambiguity_error_helper(context, + qtscript_QGraphicsView_function_names[_id], + qtscript_QGraphicsView_function_signatures[_id]); +} + +static QScriptValue qtscript_QGraphicsView_toScriptValue(QScriptEngine *engine, QGraphicsView* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGraphicsView_fromScriptValue(const QScriptValue &value, QGraphicsView* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGraphicsView_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsView*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 28; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsView_prototype_call, qtscript_QGraphicsView_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsView_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGraphicsView_toScriptValue, + qtscript_QGraphicsView_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsView_static_call, proto, qtscript_QGraphicsView_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("DragMode"), + qtscript_create_QGraphicsView_DragMode_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ViewportAnchor"), + qtscript_create_QGraphicsView_ViewportAnchor_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsWidget.cpp new file mode 100644 index 00000000..94c02f62 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGraphicsWidget.cpp @@ -0,0 +1,578 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGraphicsWidget.h" + +static const char * const qtscript_QGraphicsWidget_function_names[] = { + "QGraphicsWidget" + // static + , "setTabOrder" + // prototype + , "actions" + , "addAction" + , "addActions" + , "adjustSize" + , "focusWidget" + , "getWindowFrameMargins" + , "grabShortcut" + , "insertAction" + , "insertActions" + , "isActiveWindow" + , "paintWindowFrame" + , "rect" + , "releaseShortcut" + , "removeAction" + , "resize" + , "setAttribute" + , "setContentsMargins" + , "setGeometry" + , "setShortcutAutoRepeat" + , "setShortcutEnabled" + , "setStyle" + , "setWindowFrameMargins" + , "style" + , "testAttribute" + , "unsetLayoutDirection" + , "unsetWindowFrameMargins" + , "windowFrameGeometry" + , "windowFrameRect" + , "windowType" + , "toString" +}; + +static const char * const qtscript_QGraphicsWidget_function_signatures[] = { + "QGraphicsItem parent, WindowFlags wFlags" + // static + , "QGraphicsWidget first, QGraphicsWidget second" + // prototype + , "" + , "QAction action" + , "List actions" + , "" + , "" + , "qreal left, qreal top, qreal right, qreal bottom" + , "QKeySequence sequence, ShortcutContext context" + , "QAction before, QAction action" + , "QAction before, List actions" + , "" + , "QPainter painter, QStyleOptionGraphicsItem option, QWidget widget" + , "" + , "int id" + , "QAction action" + , "qreal w, qreal h" + , "WidgetAttribute attribute, bool on" + , "qreal left, qreal top, qreal right, qreal bottom" + , "qreal x, qreal y, qreal w, qreal h" + , "int id, bool enabled" + , "int id, bool enabled" + , "QStyle style" + , "qreal left, qreal top, qreal right, qreal bottom" + , "" + , "WidgetAttribute attribute" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QGraphicsWidget_function_lengths[] = { + 2 + // static + , 2 + // prototype + , 0 + , 1 + , 1 + , 0 + , 0 + , 4 + , 2 + , 2 + , 2 + , 0 + , 3 + , 0 + , 1 + , 1 + , 2 + , 2 + , 4 + , 4 + , 2 + , 2 + , 1 + , 4 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGraphicsWidget_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGraphicsWidget::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGraphicsWidget*) +Q_DECLARE_METATYPE(QtScriptShell_QGraphicsWidget*) +Q_DECLARE_METATYPE(QAction*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(qreal*) +Q_DECLARE_METATYPE(Qt::ShortcutContext) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(Qt::WidgetAttribute) +Q_DECLARE_METATYPE(QStyle*) +Q_DECLARE_METATYPE(Qt::WindowType) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QGraphicsObject*) +Q_DECLARE_METATYPE(QGraphicsLayoutItem*) + +// +// QGraphicsWidget +// + +static QScriptValue qtscript_QGraphicsWidget_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 29; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGraphicsWidget* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGraphicsWidget.%0(): this object is not a QGraphicsWidget") + .arg(qtscript_QGraphicsWidget_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->actions(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addAction(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->addActions(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->adjustSize(); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QGraphicsWidget* _q_result = _q_self->focusWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 4) { + qreal* _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal* _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal* _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal* _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->getWindowFrameMargins(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QKeySequence _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->grabShortcut(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QKeySequence _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ShortcutContext _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_result = _q_self->grabShortcut(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 2) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAction* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertAction(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 2) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + _q_self->insertActions(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isActiveWindow(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 2) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOptionGraphicsItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->paintWindowFrame(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOptionGraphicsItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->paintWindowFrame(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->rect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->releaseShortcut(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeAction(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 2) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->resize(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + Qt::WidgetAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setAttribute(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + Qt::WidgetAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setAttribute(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setContentsMargins(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setGeometry(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setShortcutAutoRepeat(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setShortcutAutoRepeat(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setShortcutEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setShortcutEnabled(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QStyle* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStyle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 4) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_arg1 = qscriptvalue_cast(context->argument(1)); + qreal _q_arg2 = qscriptvalue_cast(context->argument(2)); + qreal _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->setWindowFrameMargins(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 0) { + QStyle* _q_result = _q_self->style(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 1) { + Qt::WidgetAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->testAttribute(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + _q_self->unsetLayoutDirection(); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 0) { + _q_self->unsetWindowFrameMargins(); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->windowFrameGeometry(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + QRectF _q_result = _q_self->windowFrameRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 0) { + Qt::WindowType _q_result = _q_self->windowType(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 29: { + QString result = QString::fromLatin1("QGraphicsWidget"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsWidget_throw_ambiguity_error_helper(context, + qtscript_QGraphicsWidget_function_names[_id+2], + qtscript_QGraphicsWidget_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QGraphicsWidget_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGraphicsWidget(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGraphicsWidget* _q_cpp_result = new QtScriptShell_QGraphicsWidget(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGraphicsWidget* _q_cpp_result = new QtScriptShell_QGraphicsWidget(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QGraphicsItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QGraphicsWidget* _q_cpp_result = new QtScriptShell_QGraphicsWidget(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGraphicsWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + QGraphicsWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QGraphicsWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QGraphicsWidget::setTabOrder(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGraphicsWidget_throw_ambiguity_error_helper(context, + qtscript_QGraphicsWidget_function_names[_id], + qtscript_QGraphicsWidget_function_signatures[_id]); +} + +static QScriptValue qtscript_QGraphicsWidget_toScriptValue(QScriptEngine *engine, QGraphicsWidget* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGraphicsWidget_fromScriptValue(const QScriptValue &value, QGraphicsWidget* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGraphicsWidget_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGraphicsWidget*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + proto.setProperty(QString::fromLatin1("__QGraphicsLayoutItem__"), + engine->defaultPrototype(qMetaTypeId()), + QScriptValue::SkipInEnumeration); + for (int i = 0; i < 30; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsWidget_prototype_call, qtscript_QGraphicsWidget_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGraphicsWidget_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGraphicsWidget_toScriptValue, + qtscript_QGraphicsWidget_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGraphicsWidget_static_call, proto, qtscript_QGraphicsWidget_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGraphicsWidget_static_call, + qtscript_QGraphicsWidget_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QGraphicsWidget_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGridLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGridLayout.cpp new file mode 100644 index 00000000..86bda9eb --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGridLayout.cpp @@ -0,0 +1,534 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGridLayout.h" + +static const char * const qtscript_QGridLayout_function_names[] = { + "QGridLayout" + // static + // prototype + , "addItem" + , "addLayout" + , "addWidget" + , "cellRect" + , "columnCount" + , "columnMinimumWidth" + , "columnStretch" + , "getItemPosition" + , "horizontalSpacing" + , "itemAtPosition" + , "originCorner" + , "rowCount" + , "rowMinimumHeight" + , "rowStretch" + , "setColumnMinimumWidth" + , "setColumnStretch" + , "setDefaultPositioning" + , "setHorizontalSpacing" + , "setOriginCorner" + , "setRowMinimumHeight" + , "setRowStretch" + , "setSpacing" + , "setVerticalSpacing" + , "spacing" + , "verticalSpacing" + , "toString" +}; + +static const char * const qtscript_QGridLayout_function_signatures[] = { + "\nQWidget parent" + // static + // prototype + , "QLayoutItem item, int row, int column, int rowSpan, int columnSpan, Alignment arg__6" + , "QLayout arg__1, int row, int column, Alignment arg__4\nQLayout arg__1, int row, int column, int rowSpan, int columnSpan, Alignment arg__6" + , "QWidget arg__1, int row, int column, Alignment arg__4\nQWidget arg__1, int row, int column, int rowSpan, int columnSpan, Alignment arg__6" + , "int row, int column" + , "" + , "int column" + , "int column" + , "int idx, int row, int column, int rowSpan, int columnSpan" + , "" + , "int row, int column" + , "" + , "" + , "int row" + , "int row" + , "int column, int minSize" + , "int column, int stretch" + , "int n, Orientation orient" + , "int spacing" + , "Corner arg__1" + , "int row, int minSize" + , "int row, int stretch" + , "int spacing" + , "int spacing" + , "" + , "" +"" +}; + +static const int qtscript_QGridLayout_function_lengths[] = { + 1 + // static + // prototype + , 6 + , 6 + , 6 + , 2 + , 0 + , 1 + , 1 + , 5 + , 0 + , 2 + , 0 + , 0 + , 1 + , 1 + , 2 + , 2 + , 2 + , 1 + , 1 + , 2 + , 2 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QGridLayout_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGridLayout::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGridLayout*) +Q_DECLARE_METATYPE(QtScriptShell_QGridLayout*) +Q_DECLARE_METATYPE(QLayoutItem*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(int*) +Q_DECLARE_METATYPE(Qt::Corner) +Q_DECLARE_METATYPE(Qt::Orientation) + +// +// QGridLayout +// + +static QScriptValue qtscript_QGridLayout_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 25; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGridLayout* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGridLayout.%0(): this object is not a QGridLayout") + .arg(qtscript_QGridLayout_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 3) { + QLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->addItem(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + QLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->addItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + QLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + _q_self->addItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + QLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + _q_self->addItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 3) { + QLayout* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->addLayout(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + QLayout* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + _q_self->addLayout(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + QLayout* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + _q_self->addLayout(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + QLayout* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + _q_self->addLayout(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->addWidget(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + _q_self->addWidget(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + _q_self->addWidget(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + _q_self->addWidget(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QRect _q_result = _q_self->cellRect(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->columnCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->columnMinimumWidth(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->columnStretch(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 5) { + int _q_arg0 = context->argument(0).toInt32(); + int* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + int* _q_arg4 = qscriptvalue_cast(context->argument(4)); + _q_self->getItemPosition(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + int _q_result = _q_self->horizontalSpacing(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QLayoutItem* _q_result = _q_self->itemAtPosition(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + Qt::Corner _q_result = _q_self->originCorner(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + int _q_result = _q_self->rowCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->rowMinimumHeight(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->rowStretch(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setColumnMinimumWidth(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setColumnStretch(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::Orientation _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setDefaultPositioning(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setHorizontalSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + Qt::Corner _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOriginCorner(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setRowMinimumHeight(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setRowStretch(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setVerticalSpacing(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 0) { + int _q_result = _q_self->spacing(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + int _q_result = _q_self->verticalSpacing(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: { + QString result = QString::fromLatin1("QGridLayout"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGridLayout_throw_ambiguity_error_helper(context, + qtscript_QGridLayout_function_names[_id+1], + qtscript_QGridLayout_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGridLayout_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGridLayout(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGridLayout* _q_cpp_result = new QtScriptShell_QGridLayout(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGridLayout*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGridLayout* _q_cpp_result = new QtScriptShell_QGridLayout(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGridLayout*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGridLayout_throw_ambiguity_error_helper(context, + qtscript_QGridLayout_function_names[_id], + qtscript_QGridLayout_function_signatures[_id]); +} + +static QScriptValue qtscript_QGridLayout_toScriptValue(QScriptEngine *engine, QGridLayout* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGridLayout_fromScriptValue(const QScriptValue &value, QGridLayout* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGridLayout_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGridLayout*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 26; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGridLayout_prototype_call, qtscript_QGridLayout_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGridLayout_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGridLayout_toScriptValue, + qtscript_QGridLayout_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGridLayout_static_call, proto, qtscript_QGridLayout_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGroupBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGroupBox.cpp new file mode 100644 index 00000000..01b7e178 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QGroupBox.cpp @@ -0,0 +1,216 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QGroupBox.h" + +static const char * const qtscript_QGroupBox_function_names[] = { + "QGroupBox" + // static + // prototype + , "minimumSizeHint" + , "setAlignment" + , "toString" +}; + +static const char * const qtscript_QGroupBox_function_signatures[] = { + "QWidget parent\nString title, QWidget parent" + // static + // prototype + , "" + , "int alignment" +"" +}; + +static const int qtscript_QGroupBox_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QGroupBox_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QGroupBox::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QGroupBox*) +Q_DECLARE_METATYPE(QtScriptShell_QGroupBox*) +Q_DECLARE_METATYPE(QWidget*) + +// +// QGroupBox +// + +static QScriptValue qtscript_QGroupBox_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QGroupBox* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QGroupBox.%0(): this object is not a QGroupBox") + .arg(qtscript_QGroupBox_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setAlignment(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: { + QString result = QString::fromLatin1("QGroupBox"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QGroupBox_throw_ambiguity_error_helper(context, + qtscript_QGroupBox_function_names[_id+1], + qtscript_QGroupBox_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QGroupBox_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QGroupBox(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QGroupBox* _q_cpp_result = new QtScriptShell_QGroupBox(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGroupBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QGroupBox* _q_cpp_result = new QtScriptShell_QGroupBox(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGroupBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QGroupBox* _q_cpp_result = new QtScriptShell_QGroupBox(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGroupBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QGroupBox* _q_cpp_result = new QtScriptShell_QGroupBox(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QGroupBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QGroupBox_throw_ambiguity_error_helper(context, + qtscript_QGroupBox_function_names[_id], + qtscript_QGroupBox_function_signatures[_id]); +} + +static QScriptValue qtscript_QGroupBox_toScriptValue(QScriptEngine *engine, QGroupBox* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QGroupBox_fromScriptValue(const QScriptValue &value, QGroupBox* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QGroupBox_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QGroupBox*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QGroupBox_prototype_call, qtscript_QGroupBox_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QGroupBox_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QGroupBox_toScriptValue, + qtscript_QGroupBox_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QGroupBox_static_call, proto, qtscript_QGroupBox_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QHBoxLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QHBoxLayout.cpp new file mode 100644 index 00000000..e8d488da --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QHBoxLayout.cpp @@ -0,0 +1,156 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QHBoxLayout.h" + +static const char * const qtscript_QHBoxLayout_function_names[] = { + "QHBoxLayout" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QHBoxLayout_function_signatures[] = { + "\nQWidget parent" + // static + // prototype +"" +}; + +static const int qtscript_QHBoxLayout_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QHBoxLayout_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QHBoxLayout::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QHBoxLayout*) +Q_DECLARE_METATYPE(QtScriptShell_QHBoxLayout*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QBoxLayout*) + +// +// QHBoxLayout +// + +static QScriptValue qtscript_QHBoxLayout_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QHBoxLayout* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QHBoxLayout.%0(): this object is not a QHBoxLayout") + .arg(qtscript_QHBoxLayout_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QHBoxLayout"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QHBoxLayout_throw_ambiguity_error_helper(context, + qtscript_QHBoxLayout_function_names[_id+1], + qtscript_QHBoxLayout_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QHBoxLayout_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QHBoxLayout(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QHBoxLayout* _q_cpp_result = new QtScriptShell_QHBoxLayout(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QHBoxLayout*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QHBoxLayout* _q_cpp_result = new QtScriptShell_QHBoxLayout(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QHBoxLayout*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QHBoxLayout_throw_ambiguity_error_helper(context, + qtscript_QHBoxLayout_function_names[_id], + qtscript_QHBoxLayout_function_signatures[_id]); +} + +static QScriptValue qtscript_QHBoxLayout_toScriptValue(QScriptEngine *engine, QHBoxLayout* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QHBoxLayout_fromScriptValue(const QScriptValue &value, QHBoxLayout* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QHBoxLayout_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QHBoxLayout*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QHBoxLayout_toScriptValue, + qtscript_QHBoxLayout_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QHBoxLayout_static_call, proto, qtscript_QHBoxLayout_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QHeaderView.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QHeaderView.cpp new file mode 100644 index 00000000..cab85282 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QHeaderView.cpp @@ -0,0 +1,715 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QHeaderView.h" + +static const char * const qtscript_QHeaderView_function_names[] = { + "QHeaderView" + // static + // prototype + , "count" + , "hiddenSectionCount" + , "hideSection" + , "isSectionHidden" + , "length" + , "logicalIndex" + , "logicalIndexAt" + , "moveSection" + , "offset" + , "orientation" + , "resetDefaultSectionSize" + , "resizeContentsPrecision" + , "resizeSection" + , "resizeSections" + , "restoreState" + , "saveState" + , "sectionPosition" + , "sectionResizeMode" + , "sectionSize" + , "sectionSizeHint" + , "sectionViewportPosition" + , "sectionsClickable" + , "sectionsHidden" + , "sectionsMovable" + , "sectionsMoved" + , "setResizeContentsPrecision" + , "setSectionHidden" + , "setSectionResizeMode" + , "setSectionsClickable" + , "setSectionsMovable" + , "setSortIndicator" + , "setVisible" + , "showSection" + , "sortIndicatorOrder" + , "sortIndicatorSection" + , "stretchSectionCount" + , "swapSections" + , "visualIndex" + , "visualIndexAt" + , "toString" +}; + +static const char * const qtscript_QHeaderView_function_signatures[] = { + "Orientation orientation, QWidget parent" + // static + // prototype + , "" + , "" + , "int logicalIndex" + , "int logicalIndex" + , "" + , "int visualIndex" + , "QPoint pos\nint position\nint x, int y" + , "int from, int to" + , "" + , "" + , "" + , "" + , "int logicalIndex, int size" + , "ResizeMode mode" + , "QByteArray state" + , "" + , "int logicalIndex" + , "int logicalIndex" + , "int logicalIndex" + , "int logicalIndex" + , "int logicalIndex" + , "" + , "" + , "" + , "" + , "int precision" + , "int logicalIndex, bool hide" + , "ResizeMode mode\nint logicalIndex, ResizeMode mode" + , "bool clickable" + , "bool movable" + , "int logicalIndex, SortOrder order" + , "bool v" + , "int logicalIndex" + , "" + , "" + , "" + , "int first, int second" + , "int logicalIndex" + , "int position" +"" +}; + +static const int qtscript_QHeaderView_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 1 + , 1 + , 0 + , 1 + , 2 + , 2 + , 0 + , 0 + , 0 + , 0 + , 2 + , 1 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 2 + , 2 + , 1 + , 1 + , 2 + , 1 + , 1 + , 0 + , 0 + , 0 + , 2 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QHeaderView_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QHeaderView::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QHeaderView*) +Q_DECLARE_METATYPE(QtScriptShell_QHeaderView*) +Q_DECLARE_METATYPE(QHeaderView::ResizeMode) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemView*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QHeaderView::ResizeMode +// + +static const QHeaderView::ResizeMode qtscript_QHeaderView_ResizeMode_values[] = { + QHeaderView::Interactive + , QHeaderView::Stretch + , QHeaderView::Fixed + , QHeaderView::ResizeToContents +}; + +static const char * const qtscript_QHeaderView_ResizeMode_keys[] = { + "Interactive" + , "Stretch" + , "Fixed" + , "ResizeToContents" +}; + +static QString qtscript_QHeaderView_ResizeMode_toStringHelper(QHeaderView::ResizeMode value) +{ + if ((value >= QHeaderView::Interactive) && (value <= QHeaderView::ResizeToContents)) + return qtscript_QHeaderView_ResizeMode_keys[static_cast(value)-static_cast(QHeaderView::Interactive)]; + return QString(); +} + +static QScriptValue qtscript_QHeaderView_ResizeMode_toScriptValue(QScriptEngine *engine, const QHeaderView::ResizeMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QHeaderView")); + return clazz.property(qtscript_QHeaderView_ResizeMode_toStringHelper(value)); +} + +static void qtscript_QHeaderView_ResizeMode_fromScriptValue(const QScriptValue &value, QHeaderView::ResizeMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QHeaderView_ResizeMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QHeaderView::Interactive) && (arg <= QHeaderView::ResizeToContents)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ResizeMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QHeaderView_ResizeMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QHeaderView::ResizeMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QHeaderView_ResizeMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QHeaderView::ResizeMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QHeaderView_ResizeMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QHeaderView_ResizeMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QHeaderView_ResizeMode, + qtscript_QHeaderView_ResizeMode_valueOf, qtscript_QHeaderView_ResizeMode_toString); + qScriptRegisterMetaType(engine, qtscript_QHeaderView_ResizeMode_toScriptValue, + qtscript_QHeaderView_ResizeMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QHeaderView_ResizeMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QHeaderView_ResizeMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QHeaderView +// + +static QScriptValue qtscript_QHeaderView_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 39; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QHeaderView* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QHeaderView.%0(): this object is not a QHeaderView") + .arg(qtscript_QHeaderView_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->hiddenSectionCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->hideSection(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->isSectionHidden(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->length(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->logicalIndex(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->logicalIndexAt(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->logicalIndexAt(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->logicalIndexAt(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->moveSection(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + int _q_result = _q_self->offset(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + Qt::Orientation _q_result = _q_self->orientation(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + _q_self->resetDefaultSectionSize(); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + int _q_result = _q_self->resizeContentsPrecision(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->resizeSection(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QHeaderView::ResizeMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->resizeSections(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->restoreState(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->saveState(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->sectionPosition(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QHeaderView::ResizeMode _q_result = _q_self->sectionResizeMode(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->sectionSize(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->sectionSizeHint(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->sectionViewportPosition(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->sectionsClickable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->sectionsHidden(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->sectionsMovable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->sectionsMoved(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setResizeContentsPrecision(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setSectionHidden(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + QHeaderView::ResizeMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSectionResizeMode(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QHeaderView::ResizeMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setSectionResizeMode(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setSectionsClickable(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setSectionsMovable(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::SortOrder _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setSortIndicator(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setVisible(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->showSection(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 0) { + Qt::SortOrder _q_result = _q_self->sortIndicatorOrder(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 34: + if (context->argumentCount() == 0) { + int _q_result = _q_self->sortIndicatorSection(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 35: + if (context->argumentCount() == 0) { + int _q_result = _q_self->stretchSectionCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 36: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->swapSections(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->visualIndex(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 38: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->visualIndexAt(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 39: { + QString result = QString::fromLatin1("QHeaderView"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QHeaderView_throw_ambiguity_error_helper(context, + qtscript_QHeaderView_function_names[_id+1], + qtscript_QHeaderView_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QHeaderView_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QHeaderView(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QHeaderView* _q_cpp_result = new QtScriptShell_QHeaderView(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QHeaderView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QHeaderView* _q_cpp_result = new QtScriptShell_QHeaderView(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QHeaderView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QHeaderView_throw_ambiguity_error_helper(context, + qtscript_QHeaderView_function_names[_id], + qtscript_QHeaderView_function_signatures[_id]); +} + +static QScriptValue qtscript_QHeaderView_toScriptValue(QScriptEngine *engine, QHeaderView* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QHeaderView_fromScriptValue(const QScriptValue &value, QHeaderView* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QHeaderView_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QHeaderView*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 40; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QHeaderView_prototype_call, qtscript_QHeaderView_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QHeaderView_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QHeaderView_toScriptValue, + qtscript_QHeaderView_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QHeaderView_static_call, proto, qtscript_QHeaderView_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ResizeMode"), + qtscript_create_QHeaderView_ResizeMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QInputDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QInputDialog.cpp new file mode 100644 index 00000000..8b53365d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QInputDialog.cpp @@ -0,0 +1,1122 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QInputDialog.h" + +static const char * const qtscript_QInputDialog_function_names[] = { + "QInputDialog" + // static + , "getDouble" + , "getInt_private" + , "getItem" + , "getMultiLineText" + , "getText" + // prototype + , "cancelButtonText" + , "comboBoxItems" + , "doubleDecimals" + , "doubleMaximum" + , "doubleMinimum" + , "doubleValue" + , "inputMode" + , "intMaximum" + , "intMinimum" + , "intStep" + , "intValue" + , "isComboBoxEditable" + , "labelText" + , "okButtonText" + , "open" + , "options" + , "setCancelButtonText" + , "setComboBoxEditable" + , "setComboBoxItems" + , "setDoubleDecimals" + , "setDoubleMaximum" + , "setDoubleMinimum" + , "setDoubleRange" + , "setDoubleValue" + , "setInputMode" + , "setIntMaximum" + , "setIntMinimum" + , "setIntRange" + , "setIntStep" + , "setIntValue" + , "setLabelText" + , "setOkButtonText" + , "setOption" + , "setOptions" + , "setTextEchoMode" + , "setTextValue" + , "testOption" + , "textEchoMode" + , "textValue" + , "toString" +}; + +static const char * const qtscript_QInputDialog_function_signatures[] = { + "QWidget parent, WindowFlags flags" + // static + , "QWidget parent, String title, String label, double value, double minValue, double maxValue, int decimals, WindowFlags flags" + , "QWidget parent, String title, String label, int value, int minValue, int maxValue, int step, bool ok, WindowFlags flags" + , "QWidget parent, String title, String label, List items, int current, bool editable, bool ok, WindowFlags flags, InputMethodHints inputMethodHints" + , "QWidget parent, String title, String label, String text, bool ok, WindowFlags flags, InputMethodHints inputMethodHints" + , "QWidget parent, String title, String label, EchoMode echo, String text, bool ok, WindowFlags flags, InputMethodHints inputMethodHints" + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QObject receiver, char member" + , "" + , "String text" + , "bool editable" + , "List items" + , "int decimals" + , "double max" + , "double min" + , "double min, double max" + , "double value" + , "InputMode mode" + , "int max" + , "int min" + , "int min, int max" + , "int step" + , "int value" + , "String text" + , "String text" + , "InputDialogOption option, bool on" + , "InputDialogOptions options" + , "EchoMode mode" + , "String text" + , "InputDialogOption option" + , "" + , "" +"" +}; + +static const int qtscript_QInputDialog_function_lengths[] = { + 2 + // static + , 9 + , 9 + , 9 + , 7 + , 8 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 2 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QInputDialog_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QInputDialog::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QInputDialog*) +Q_DECLARE_METATYPE(QtScriptShell_QInputDialog*) +Q_DECLARE_METATYPE(QInputDialog::InputDialogOption) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QInputDialog::InputMode) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(QLineEdit::EchoMode) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(bool*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QDialog*) + + + Q_DECLARE_METATYPE(QScriptValue) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QInputDialog::InputDialogOption +// + +static const QInputDialog::InputDialogOption qtscript_QInputDialog_InputDialogOption_values[] = { + QInputDialog::NoButtons + , QInputDialog::UseListViewForComboBoxItems + , QInputDialog::UsePlainTextEditForTextInput +}; + +static const char * const qtscript_QInputDialog_InputDialogOption_keys[] = { + "NoButtons" + , "UseListViewForComboBoxItems" + , "UsePlainTextEditForTextInput" +}; + +static QString qtscript_QInputDialog_InputDialogOption_toStringHelper(QInputDialog::InputDialogOption value) +{ + for (int i = 0; i < 3; ++i) { + if (qtscript_QInputDialog_InputDialogOption_values[i] == value) + return QString::fromLatin1(qtscript_QInputDialog_InputDialogOption_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QInputDialog_InputDialogOption_toScriptValue(QScriptEngine *engine, const QInputDialog::InputDialogOption &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QInputDialog")); + return clazz.property(qtscript_QInputDialog_InputDialogOption_toStringHelper(value)); +} + +static void qtscript_QInputDialog_InputDialogOption_fromScriptValue(const QScriptValue &value, QInputDialog::InputDialogOption &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QInputDialog_InputDialogOption(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 3; ++i) { + if (qtscript_QInputDialog_InputDialogOption_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("InputDialogOption(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QInputDialog_InputDialogOption_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QInputDialog::InputDialogOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QInputDialog_InputDialogOption_toString(QScriptContext *context, QScriptEngine *engine) +{ + QInputDialog::InputDialogOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QInputDialog_InputDialogOption_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QInputDialog_InputDialogOption_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QInputDialog_InputDialogOption, + qtscript_QInputDialog_InputDialogOption_valueOf, qtscript_QInputDialog_InputDialogOption_toString); + qScriptRegisterMetaType(engine, qtscript_QInputDialog_InputDialogOption_toScriptValue, + qtscript_QInputDialog_InputDialogOption_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QInputDialog_InputDialogOption_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QInputDialog_InputDialogOption_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QInputDialog::InputDialogOptions +// + +static QScriptValue qtscript_QInputDialog_InputDialogOptions_toScriptValue(QScriptEngine *engine, const QInputDialog::InputDialogOptions &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QInputDialog_InputDialogOptions_fromScriptValue(const QScriptValue &value, QInputDialog::InputDialogOptions &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QInputDialog_InputDialogOptions(QScriptContext *context, QScriptEngine *engine) +{ + QInputDialog::InputDialogOptions result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("InputDialogOptions(): argument %0 is not of type InputDialogOption").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QInputDialog_InputDialogOptions_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QInputDialog::InputDialogOptions value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QInputDialog_InputDialogOptions_toString(QScriptContext *context, QScriptEngine *engine) +{ + QInputDialog::InputDialogOptions value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 3; ++i) { + if ((value & qtscript_QInputDialog_InputDialogOption_values[i]) == qtscript_QInputDialog_InputDialogOption_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QInputDialog_InputDialogOption_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QInputDialog_InputDialogOptions_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QInputDialog_InputDialogOptions_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QInputDialog_InputDialogOptions, qtscript_QInputDialog_InputDialogOptions_valueOf, + qtscript_QInputDialog_InputDialogOptions_toString, qtscript_QInputDialog_InputDialogOptions_equals); + qScriptRegisterMetaType(engine, qtscript_QInputDialog_InputDialogOptions_toScriptValue, + qtscript_QInputDialog_InputDialogOptions_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QInputDialog::InputMode +// + +static const QInputDialog::InputMode qtscript_QInputDialog_InputMode_values[] = { + QInputDialog::TextInput + , QInputDialog::IntInput + , QInputDialog::DoubleInput +}; + +static const char * const qtscript_QInputDialog_InputMode_keys[] = { + "TextInput" + , "IntInput" + , "DoubleInput" +}; + +static QString qtscript_QInputDialog_InputMode_toStringHelper(QInputDialog::InputMode value) +{ + if ((value >= QInputDialog::TextInput) && (value <= QInputDialog::DoubleInput)) + return qtscript_QInputDialog_InputMode_keys[static_cast(value)-static_cast(QInputDialog::TextInput)]; + return QString(); +} + +static QScriptValue qtscript_QInputDialog_InputMode_toScriptValue(QScriptEngine *engine, const QInputDialog::InputMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QInputDialog")); + return clazz.property(qtscript_QInputDialog_InputMode_toStringHelper(value)); +} + +static void qtscript_QInputDialog_InputMode_fromScriptValue(const QScriptValue &value, QInputDialog::InputMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QInputDialog_InputMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QInputDialog::TextInput) && (arg <= QInputDialog::DoubleInput)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("InputMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QInputDialog_InputMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QInputDialog::InputMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QInputDialog_InputMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QInputDialog::InputMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QInputDialog_InputMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QInputDialog_InputMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QInputDialog_InputMode, + qtscript_QInputDialog_InputMode_valueOf, qtscript_QInputDialog_InputMode_toString); + qScriptRegisterMetaType(engine, qtscript_QInputDialog_InputMode_toScriptValue, + qtscript_QInputDialog_InputMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QInputDialog_InputMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QInputDialog_InputMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QInputDialog +// + +static QScriptValue qtscript_QInputDialog_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 39; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QInputDialog* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QInputDialog.%0(): this object is not a QInputDialog") + .arg(qtscript_QInputDialog_function_names[_id+6])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->cancelButtonText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->comboBoxItems(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->doubleDecimals(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + double _q_result = _q_self->doubleMaximum(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + double _q_result = _q_self->doubleMinimum(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + double _q_result = _q_self->doubleValue(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QInputDialog::InputMode _q_result = _q_self->inputMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->intMaximum(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + int _q_result = _q_self->intMinimum(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->intStep(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + int _q_result = _q_self->intValue(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isComboBoxEditable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->labelText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->okButtonText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->open(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->options(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setCancelButtonText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setComboBoxEditable(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setComboBoxItems(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setDoubleDecimals(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + double _q_arg0 = context->argument(0).toNumber(); + _q_self->setDoubleMaximum(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + double _q_arg0 = context->argument(0).toNumber(); + _q_self->setDoubleMinimum(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 2) { + double _q_arg0 = context->argument(0).toNumber(); + double _q_arg1 = context->argument(1).toNumber(); + _q_self->setDoubleRange(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + double _q_arg0 = context->argument(0).toNumber(); + _q_self->setDoubleValue(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QInputDialog::InputMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setInputMode(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setIntMaximum(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setIntMinimum(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setIntRange(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setIntStep(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setIntValue(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setLabelText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setOkButtonText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + QInputDialog::InputDialogOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOption(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QInputDialog::InputDialogOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setOption(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setOptions(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 1) { + QLineEdit::EchoMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTextEchoMode(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setTextValue(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + QInputDialog::InputDialogOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->testOption(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 37: + if (context->argumentCount() == 0) { + QLineEdit::EchoMode _q_result = _q_self->textEchoMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 38: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->textValue(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 39: { + QString result = QString::fromLatin1("QInputDialog"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QInputDialog_throw_ambiguity_error_helper(context, + qtscript_QInputDialog_function_names[_id+6], + qtscript_QInputDialog_function_signatures[_id+6]); +} + +static QScriptValue qtscript_QInputDialog_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QInputDialog(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QInputDialog* _q_cpp_result = new QtScriptShell_QInputDialog(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QInputDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QInputDialog* _q_cpp_result = new QtScriptShell_QInputDialog(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QInputDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QInputDialog* _q_cpp_result = new QtScriptShell_QInputDialog(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QInputDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 8) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + double _q_arg3 = context->argument(3).toNumber(); + double _q_arg4 = context->argument(4).toNumber(); + double _q_arg5 = context->argument(5).toNumber(); + int _q_arg6 = context->argument(6).toInt32(); + + // TEMPLATE - core.prepare_removed_bool*_argument - START + bool __ok; + bool *_q_arg7 = &__ok; + // TEMPLATE - core.prepare_removed_bool*_argument - END + QFlags _q_arg8 = qscriptvalue_cast >(context->argument(7)); + double _q_result = QInputDialog::getDouble(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7, _q_arg8); + + // TEMPLATE - core.convert_to_null_or_primitive - START + QScriptValue _q_convertedResult; + if (!__ok) + _q_convertedResult = context->engine()->nullValue(); + else + _q_convertedResult = QScriptValue(context->engine(), _q_result); + // TEMPLATE - core.convert_to_null_or_primitive - END + return qScriptValueFromValue(context->engine(), _q_convertedResult); + } + break; + + case 2: + if (context->argumentCount() == 9) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_arg4 = context->argument(4).toInt32(); + int _q_arg5 = context->argument(5).toInt32(); + int _q_arg6 = context->argument(6).toInt32(); + bool* _q_arg7 = qscriptvalue_cast(context->argument(7)); + QFlags _q_arg8 = qscriptvalue_cast >(context->argument(8)); + int _q_result = QInputDialog::getInt(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7, _q_arg8); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 4) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QStringList _q_arg3; + qScriptValueToSequence(context->argument(3), _q_arg3); + QString _q_result = QInputDialog::getItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QStringList _q_arg3; + qScriptValueToSequence(context->argument(3), _q_arg3); + int _q_arg4 = context->argument(4).toInt32(); + QString _q_result = QInputDialog::getItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 6) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QStringList _q_arg3; + qScriptValueToSequence(context->argument(3), _q_arg3); + int _q_arg4 = context->argument(4).toInt32(); + bool _q_arg5 = context->argument(5).toBoolean(); + QString _q_result = QInputDialog::getItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 7) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QStringList _q_arg3; + qScriptValueToSequence(context->argument(3), _q_arg3); + int _q_arg4 = context->argument(4).toInt32(); + bool _q_arg5 = context->argument(5).toBoolean(); + bool* _q_arg6 = qscriptvalue_cast(context->argument(6)); + QString _q_result = QInputDialog::getItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 8) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QStringList _q_arg3; + qScriptValueToSequence(context->argument(3), _q_arg3); + int _q_arg4 = context->argument(4).toInt32(); + bool _q_arg5 = context->argument(5).toBoolean(); + bool* _q_arg6 = qscriptvalue_cast(context->argument(6)); + QFlags _q_arg7 = qscriptvalue_cast >(context->argument(7)); + QString _q_result = QInputDialog::getItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 9) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QStringList _q_arg3; + qScriptValueToSequence(context->argument(3), _q_arg3); + int _q_arg4 = context->argument(4).toInt32(); + bool _q_arg5 = context->argument(5).toBoolean(); + bool* _q_arg6 = qscriptvalue_cast(context->argument(6)); + QFlags _q_arg7 = qscriptvalue_cast >(context->argument(7)); + QFlags _q_arg8 = qscriptvalue_cast >(context->argument(8)); + QString _q_result = QInputDialog::getItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7, _q_arg8); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_result = QInputDialog::getMultiLineText(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + QString _q_result = QInputDialog::getMultiLineText(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + bool* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QString _q_result = QInputDialog::getMultiLineText(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 6) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + bool* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + QString _q_result = QInputDialog::getMultiLineText(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 7) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + bool* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + QFlags _q_arg6 = qscriptvalue_cast >(context->argument(6)); + QString _q_result = QInputDialog::getMultiLineText(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_result = QInputDialog::getText(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QLineEdit::EchoMode _q_arg3 = qscriptvalue_cast(context->argument(3)); + QString _q_result = QInputDialog::getText(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QLineEdit::EchoMode _q_arg3 = qscriptvalue_cast(context->argument(3)); + QString _q_arg4 = context->argument(4).toString(); + QString _q_result = QInputDialog::getText(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 6) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QLineEdit::EchoMode _q_arg3 = qscriptvalue_cast(context->argument(3)); + QString _q_arg4 = context->argument(4).toString(); + bool* _q_arg5 = qscriptvalue_cast(context->argument(5)); + QString _q_result = QInputDialog::getText(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 7) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QLineEdit::EchoMode _q_arg3 = qscriptvalue_cast(context->argument(3)); + QString _q_arg4 = context->argument(4).toString(); + bool* _q_arg5 = qscriptvalue_cast(context->argument(5)); + QFlags _q_arg6 = qscriptvalue_cast >(context->argument(6)); + QString _q_result = QInputDialog::getText(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 8) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QLineEdit::EchoMode _q_arg3 = qscriptvalue_cast(context->argument(3)); + QString _q_arg4 = context->argument(4).toString(); + bool* _q_arg5 = qscriptvalue_cast(context->argument(5)); + QFlags _q_arg6 = qscriptvalue_cast >(context->argument(6)); + QFlags _q_arg7 = qscriptvalue_cast >(context->argument(7)); + QString _q_result = QInputDialog::getText(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6, _q_arg7); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QInputDialog_throw_ambiguity_error_helper(context, + qtscript_QInputDialog_function_names[_id], + qtscript_QInputDialog_function_signatures[_id]); +} + +static QScriptValue qtscript_QInputDialog_toScriptValue(QScriptEngine *engine, QInputDialog* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QInputDialog_fromScriptValue(const QScriptValue &value, QInputDialog* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QInputDialog_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QInputDialog*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 40; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QInputDialog_prototype_call, qtscript_QInputDialog_function_lengths[i+6]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QInputDialog_function_names[i+6]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QInputDialog_toScriptValue, + qtscript_QInputDialog_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QInputDialog_static_call, proto, qtscript_QInputDialog_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QInputDialog_static_call, + qtscript_QInputDialog_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QInputDialog_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("InputDialogOption"), + qtscript_create_QInputDialog_InputDialogOption_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("InputDialogOptions"), + qtscript_create_QInputDialog_InputDialogOptions_class(engine)); + ctor.setProperty(QString::fromLatin1("InputMode"), + qtscript_create_QInputDialog_InputMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemDelegate.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemDelegate.cpp new file mode 100644 index 00000000..3f851c55 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemDelegate.cpp @@ -0,0 +1,189 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QItemDelegate.h" + +static const char * const qtscript_QItemDelegate_function_names[] = { + "QItemDelegate" + // static + // prototype + , "itemEditorFactory" + , "setItemEditorFactory" + , "toString" +}; + +static const char * const qtscript_QItemDelegate_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" + , "QItemEditorFactory factory" +"" +}; + +static const int qtscript_QItemDelegate_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QItemDelegate_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QItemDelegate::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QItemDelegate*) +Q_DECLARE_METATYPE(QtScriptShell_QItemDelegate*) +Q_DECLARE_METATYPE(QItemEditorFactory*) +Q_DECLARE_METATYPE(QAbstractItemDelegate*) + +// +// QItemDelegate +// + +static QScriptValue qtscript_QItemDelegate_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QItemDelegate* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QItemDelegate.%0(): this object is not a QItemDelegate") + .arg(qtscript_QItemDelegate_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QItemEditorFactory* _q_result = _q_self->itemEditorFactory(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QItemEditorFactory* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setItemEditorFactory(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: { + QString result = QString::fromLatin1("QItemDelegate"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QItemDelegate_throw_ambiguity_error_helper(context, + qtscript_QItemDelegate_function_names[_id+1], + qtscript_QItemDelegate_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QItemDelegate_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QItemDelegate(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QItemDelegate* _q_cpp_result = new QtScriptShell_QItemDelegate(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QItemDelegate*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QItemDelegate* _q_cpp_result = new QtScriptShell_QItemDelegate(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QItemDelegate*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QItemDelegate_throw_ambiguity_error_helper(context, + qtscript_QItemDelegate_function_names[_id], + qtscript_QItemDelegate_function_signatures[_id]); +} + +static QScriptValue qtscript_QItemDelegate_toScriptValue(QScriptEngine *engine, QItemDelegate* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QItemDelegate_fromScriptValue(const QScriptValue &value, QItemDelegate* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QItemDelegate_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QItemDelegate*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QItemDelegate_prototype_call, qtscript_QItemDelegate_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QItemDelegate_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QItemDelegate_toScriptValue, + qtscript_QItemDelegate_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QItemDelegate_static_call, proto, qtscript_QItemDelegate_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemEditorCreatorBase.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemEditorCreatorBase.cpp new file mode 100644 index 00000000..9d2698a1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemEditorCreatorBase.cpp @@ -0,0 +1,155 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QItemEditorCreatorBase.h" + +static const char * const qtscript_QItemEditorCreatorBase_function_names[] = { + "QItemEditorCreatorBase" + // static + // prototype + , "createWidget" + , "valuePropertyName" + , "toString" +}; + +static const char * const qtscript_QItemEditorCreatorBase_function_signatures[] = { + "" + // static + // prototype + , "QWidget parent" + , "" +"" +}; + +static const int qtscript_QItemEditorCreatorBase_function_lengths[] = { + 0 + // static + // prototype + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QItemEditorCreatorBase_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QItemEditorCreatorBase::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QItemEditorCreatorBase*) +Q_DECLARE_METATYPE(QtScriptShell_QItemEditorCreatorBase*) +Q_DECLARE_METATYPE(QWidget*) + +// +// QItemEditorCreatorBase +// + +static QScriptValue qtscript_QItemEditorCreatorBase_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QItemEditorCreatorBase* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QItemEditorCreatorBase.%0(): this object is not a QItemEditorCreatorBase") + .arg(qtscript_QItemEditorCreatorBase_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_result = _q_self->createWidget(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->valuePropertyName(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QItemEditorCreatorBase"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QItemEditorCreatorBase_throw_ambiguity_error_helper(context, + qtscript_QItemEditorCreatorBase_function_names[_id+1], + qtscript_QItemEditorCreatorBase_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QItemEditorCreatorBase_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QItemEditorCreatorBase(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QItemEditorCreatorBase* _q_cpp_result = new QtScriptShell_QItemEditorCreatorBase(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QItemEditorCreatorBase*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QItemEditorCreatorBase_throw_ambiguity_error_helper(context, + qtscript_QItemEditorCreatorBase_function_names[_id], + qtscript_QItemEditorCreatorBase_function_signatures[_id]); +} + +QScriptValue qtscript_create_QItemEditorCreatorBase_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QItemEditorCreatorBase*)0)); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QItemEditorCreatorBase_prototype_call, qtscript_QItemEditorCreatorBase_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QItemEditorCreatorBase_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QItemEditorCreatorBase_static_call, proto, qtscript_QItemEditorCreatorBase_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemEditorFactory.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemEditorFactory.cpp new file mode 100644 index 00000000..f84528a1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemEditorFactory.cpp @@ -0,0 +1,200 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +#include "qtscriptshell_QItemEditorFactory.h" + +static const char * const qtscript_QItemEditorFactory_function_names[] = { + "QItemEditorFactory" + // static + , "defaultFactory" + , "setDefaultFactory" + // prototype + , "createEditor" + , "registerEditor" + , "valuePropertyName" + , "toString" +}; + +static const char * const qtscript_QItemEditorFactory_function_signatures[] = { + "" + // static + , "" + , "QItemEditorFactory factory" + // prototype + , "int userType, QWidget parent" + , "int userType, QItemEditorCreatorBase creator" + , "int userType" +"" +}; + +static const int qtscript_QItemEditorFactory_function_lengths[] = { + 0 + // static + , 0 + , 1 + // prototype + , 2 + , 2 + , 1 + , 0 +}; + +static QScriptValue qtscript_QItemEditorFactory_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QItemEditorFactory::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QItemEditorFactory*) +Q_DECLARE_METATYPE(QtScriptShell_QItemEditorFactory*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QItemEditorCreatorBase*) +Q_DECLARE_METATYPE(const QItemEditorFactory*) + +// +// QItemEditorFactory +// + +static QScriptValue qtscript_QItemEditorFactory_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QItemEditorFactory* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QItemEditorFactory.%0(): this object is not a QItemEditorFactory") + .arg(qtscript_QItemEditorFactory_function_names[_id+3])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QWidget* _q_result = _q_self->createEditor(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QItemEditorCreatorBase* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->registerEditor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QByteArray _q_result = _q_self->valuePropertyName(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: { + QString result = QString::fromLatin1("QItemEditorFactory"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QItemEditorFactory_throw_ambiguity_error_helper(context, + qtscript_QItemEditorFactory_function_names[_id+3], + qtscript_QItemEditorFactory_function_signatures[_id+3]); +} + +static QScriptValue qtscript_QItemEditorFactory_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QItemEditorFactory(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QItemEditorFactory* _q_cpp_result = new QtScriptShell_QItemEditorFactory(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QItemEditorFactory*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + const QItemEditorFactory* _q_result = const_cast(QItemEditorFactory::defaultFactory()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QItemEditorFactory* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QItemEditorFactory::setDefaultFactory(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QItemEditorFactory_throw_ambiguity_error_helper(context, + qtscript_QItemEditorFactory_function_names[_id], + qtscript_QItemEditorFactory_function_signatures[_id]); +} + +QScriptValue qtscript_create_QItemEditorFactory_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QItemEditorFactory*)0)); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QItemEditorFactory_prototype_call, qtscript_QItemEditorFactory_function_lengths[i+3]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QItemEditorFactory_function_names[i+3]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QItemEditorFactory_static_call, proto, qtscript_QItemEditorFactory_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QItemEditorFactory_static_call, + qtscript_QItemEditorFactory_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QItemEditorFactory_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemSelection.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemSelection.cpp new file mode 100644 index 00000000..573e061d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemSelection.cpp @@ -0,0 +1,707 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QItemSelection_function_names[] = { + "QItemSelection" + // static + , "fromVector" + , "split" + // prototype + , "append" + , "at" + , "back" + , "clear" + , "constFirst" + , "constLast" + , "contains" + , "count" + , "detachShared" + , "empty" + , "endsWith" + , "first" + , "front" + , "indexOf" + , "indexes" + , "isEmpty" + , "isSharedWith" + , "last" + , "lastIndexOf" + , "length" + , "merge" + , "mid" + , "move" + , "equals" + , "pop_back" + , "pop_front" + , "prepend" + , "push_back" + , "push_front" + , "removeAll" + , "removeAt" + , "removeFirst" + , "removeLast" + , "removeOne" + , "replace" + , "reserve" + , "select" + , "setSharable" + , "size" + , "startsWith" + , "swap" + , "takeAt" + , "takeFirst" + , "takeLast" + , "toVector" + , "value" + , "toString" +}; + +static const char * const qtscript_QItemSelection_function_signatures[] = { + "\nQModelIndex topLeft, QModelIndex bottomRight" + // static + , "List vector" + , "QItemSelectionRange range, QItemSelectionRange other, QItemSelection result" + // prototype + , "QItemSelectionRange t\nList t" + , "int i" + , "" + , "" + , "" + , "" + , "QModelIndex index" + , "\nQItemSelectionRange t" + , "" + , "" + , "QItemSelectionRange t" + , "" + , "" + , "QItemSelectionRange t, int from" + , "" + , "" + , "List other" + , "" + , "QItemSelectionRange t, int from" + , "" + , "QItemSelection other, SelectionFlags command" + , "int pos, int length" + , "int from, int to" + , "List l" + , "" + , "" + , "QItemSelectionRange t" + , "QItemSelectionRange t" + , "QItemSelectionRange t" + , "QItemSelectionRange t" + , "int i" + , "" + , "" + , "QItemSelectionRange t" + , "int i, QItemSelectionRange t" + , "int size" + , "QModelIndex topLeft, QModelIndex bottomRight" + , "bool sharable" + , "" + , "QItemSelectionRange t" + , "List other\nint i, int j" + , "int i" + , "" + , "" + , "" + , "int i\nint i, QItemSelectionRange defaultValue" +"" +}; + +static const int qtscript_QItemSelection_function_lengths[] = { + 2 + // static + , 1 + , 3 + // prototype + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 1 + , 0 + , 0 + , 2 + , 0 + , 0 + , 1 + , 0 + , 2 + , 0 + , 2 + , 2 + , 2 + , 1 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 1 + , 2 + , 1 + , 2 + , 1 + , 0 + , 1 + , 2 + , 1 + , 0 + , 0 + , 0 + , 2 + , 0 +}; + +static QScriptValue qtscript_QItemSelection_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QItemSelection::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QItemSelection*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QVector) + +// +// QItemSelection +// + +static QScriptValue qtscript_QItemSelection_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 46; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QItemSelection* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QItemSelection.%0(): this object is not a QItemSelection") + .arg(qtscript_QItemSelection_function_names[_id+3])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->append(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isArray()) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->append(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + const QItemSelectionRange& _q_result = _q_self->at(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + const QItemSelectionRange& _q_result = _q_self->back(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + const QItemSelectionRange& _q_result = _q_self->constFirst(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + const QItemSelectionRange& _q_result = _q_self->constLast(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->count(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + _q_self->detachShared(); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->empty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->endsWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + const QItemSelectionRange& _q_result = _q_self->first(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + const QItemSelectionRange& _q_result = _q_self->front(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->indexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->indexOf(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->indexes(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + bool _q_result = _q_self->isSharedWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + const QItemSelectionRange& _q_result = _q_self->last(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->lastIndexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->lastIndexOf(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + int _q_result = _q_self->length(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 2) { + QItemSelection _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + _q_self->merge(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QList _q_result = _q_self->mid(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QList _q_result = _q_self->mid(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->move(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + _q_self->pop_back(); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 0) { + _q_self->pop_front(); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->prepend(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->push_back(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->push_front(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 1) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->removeAll(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->removeAt(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 0) { + _q_self->removeFirst(); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 0) { + _q_self->removeLast(); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 1) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->removeOne(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 34: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QItemSelectionRange _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->replace(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->reserve(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 2) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QModelIndex _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->select(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setSharable(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 0) { + int _q_result = _q_self->size(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 1) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->startsWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 40: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->swap(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QItemSelectionRange _q_result = _q_self->takeAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 42: + if (context->argumentCount() == 0) { + QItemSelectionRange _q_result = _q_self->takeFirst(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 43: + if (context->argumentCount() == 0) { + QItemSelectionRange _q_result = _q_self->takeLast(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 44: + if (context->argumentCount() == 0) { + QVector _q_result = _q_self->toVector(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 45: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QItemSelectionRange _q_result = _q_self->value(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QItemSelectionRange _q_arg1 = qscriptvalue_cast(context->argument(1)); + QItemSelectionRange _q_result = _q_self->value(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 46: { + QString result = QString::fromLatin1("QItemSelection"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QItemSelection_throw_ambiguity_error_helper(context, + qtscript_QItemSelection_function_names[_id+3], + qtscript_QItemSelection_function_signatures[_id+3]); +} + +static QScriptValue qtscript_QItemSelection_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QItemSelection(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QItemSelection _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QModelIndex _q_arg1 = qscriptvalue_cast(context->argument(1)); + QItemSelection _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QVector _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QList _q_result = QItemSelection::fromVector(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 3) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + QItemSelectionRange _q_arg1 = qscriptvalue_cast(context->argument(1)); + QItemSelection* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QItemSelection::split(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QItemSelection_throw_ambiguity_error_helper(context, + qtscript_QItemSelection_function_names[_id], + qtscript_QItemSelection_function_signatures[_id]); +} + +QScriptValue qtscript_create_QItemSelection_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QItemSelection*)0)); + for (int i = 0; i < 47; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QItemSelection_prototype_call, qtscript_QItemSelection_function_lengths[i+3]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QItemSelection_function_names[i+3]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QItemSelection_static_call, proto, qtscript_QItemSelection_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QItemSelection_static_call, + qtscript_QItemSelection_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QItemSelection_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemSelectionModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemSelectionModel.cpp new file mode 100644 index 00000000..9f3ad5d0 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemSelectionModel.cpp @@ -0,0 +1,359 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QItemSelectionModel.h" + +static const char * const qtscript_QItemSelectionModel_function_names[] = { + "QItemSelectionModel" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QItemSelectionModel_function_signatures[] = { + "QAbstractItemModel model\nQAbstractItemModel model, QObject parent" + // static + // prototype +"" +}; + +static const int qtscript_QItemSelectionModel_function_lengths[] = { + 2 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QItemSelectionModel_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QItemSelectionModel::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QItemSelectionModel*) +Q_DECLARE_METATYPE(QtScriptShell_QItemSelectionModel*) +Q_DECLARE_METATYPE(QItemSelectionModel::SelectionFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAbstractItemModel*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QItemSelectionModel::SelectionFlag +// + +static const QItemSelectionModel::SelectionFlag qtscript_QItemSelectionModel_SelectionFlag_values[] = { + QItemSelectionModel::NoUpdate + , QItemSelectionModel::Clear + , QItemSelectionModel::Select + , QItemSelectionModel::ClearAndSelect + , QItemSelectionModel::Deselect + , QItemSelectionModel::Toggle + , QItemSelectionModel::Current + , QItemSelectionModel::SelectCurrent + , QItemSelectionModel::ToggleCurrent + , QItemSelectionModel::Rows + , QItemSelectionModel::Columns +}; + +static const char * const qtscript_QItemSelectionModel_SelectionFlag_keys[] = { + "NoUpdate" + , "Clear" + , "Select" + , "ClearAndSelect" + , "Deselect" + , "Toggle" + , "Current" + , "SelectCurrent" + , "ToggleCurrent" + , "Rows" + , "Columns" +}; + +static QString qtscript_QItemSelectionModel_SelectionFlag_toStringHelper(QItemSelectionModel::SelectionFlag value) +{ + for (int i = 0; i < 11; ++i) { + if (qtscript_QItemSelectionModel_SelectionFlag_values[i] == value) + return QString::fromLatin1(qtscript_QItemSelectionModel_SelectionFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QItemSelectionModel_SelectionFlag_toScriptValue(QScriptEngine *engine, const QItemSelectionModel::SelectionFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QItemSelectionModel")); + return clazz.property(qtscript_QItemSelectionModel_SelectionFlag_toStringHelper(value)); +} + +static void qtscript_QItemSelectionModel_SelectionFlag_fromScriptValue(const QScriptValue &value, QItemSelectionModel::SelectionFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QItemSelectionModel_SelectionFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 11; ++i) { + if (qtscript_QItemSelectionModel_SelectionFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("SelectionFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QItemSelectionModel_SelectionFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QItemSelectionModel::SelectionFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QItemSelectionModel_SelectionFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QItemSelectionModel::SelectionFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QItemSelectionModel_SelectionFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QItemSelectionModel_SelectionFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QItemSelectionModel_SelectionFlag, + qtscript_QItemSelectionModel_SelectionFlag_valueOf, qtscript_QItemSelectionModel_SelectionFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QItemSelectionModel_SelectionFlag_toScriptValue, + qtscript_QItemSelectionModel_SelectionFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 11; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QItemSelectionModel_SelectionFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QItemSelectionModel_SelectionFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QItemSelectionModel::SelectionFlags +// + +static QScriptValue qtscript_QItemSelectionModel_SelectionFlags_toScriptValue(QScriptEngine *engine, const QItemSelectionModel::SelectionFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QItemSelectionModel_SelectionFlags_fromScriptValue(const QScriptValue &value, QItemSelectionModel::SelectionFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QItemSelectionModel_SelectionFlags(QScriptContext *context, QScriptEngine *engine) +{ + QItemSelectionModel::SelectionFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("SelectionFlags(): argument %0 is not of type SelectionFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QItemSelectionModel_SelectionFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QItemSelectionModel::SelectionFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QItemSelectionModel_SelectionFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + QItemSelectionModel::SelectionFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 11; ++i) { + if ((value & qtscript_QItemSelectionModel_SelectionFlag_values[i]) == qtscript_QItemSelectionModel_SelectionFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QItemSelectionModel_SelectionFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QItemSelectionModel_SelectionFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QItemSelectionModel_SelectionFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QItemSelectionModel_SelectionFlags, qtscript_QItemSelectionModel_SelectionFlags_valueOf, + qtscript_QItemSelectionModel_SelectionFlags_toString, qtscript_QItemSelectionModel_SelectionFlags_equals); + qScriptRegisterMetaType(engine, qtscript_QItemSelectionModel_SelectionFlags_toScriptValue, + qtscript_QItemSelectionModel_SelectionFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QItemSelectionModel +// + +static QScriptValue qtscript_QItemSelectionModel_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QItemSelectionModel* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QItemSelectionModel.%0(): this object is not a QItemSelectionModel") + .arg(qtscript_QItemSelectionModel_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QItemSelectionModel"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QItemSelectionModel_throw_ambiguity_error_helper(context, + qtscript_QItemSelectionModel_function_names[_id+1], + qtscript_QItemSelectionModel_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QItemSelectionModel_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QItemSelectionModel(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QItemSelectionModel* _q_cpp_result = new QtScriptShell_QItemSelectionModel(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QItemSelectionModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QAbstractItemModel* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QItemSelectionModel* _q_cpp_result = new QtScriptShell_QItemSelectionModel(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QItemSelectionModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QAbstractItemModel* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QItemSelectionModel* _q_cpp_result = new QtScriptShell_QItemSelectionModel(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QItemSelectionModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QItemSelectionModel_throw_ambiguity_error_helper(context, + qtscript_QItemSelectionModel_function_names[_id], + qtscript_QItemSelectionModel_function_signatures[_id]); +} + +static QScriptValue qtscript_QItemSelectionModel_toScriptValue(QScriptEngine *engine, QItemSelectionModel* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QItemSelectionModel_fromScriptValue(const QScriptValue &value, QItemSelectionModel* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QItemSelectionModel_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QItemSelectionModel*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QItemSelectionModel_toScriptValue, + qtscript_QItemSelectionModel_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QItemSelectionModel_static_call, proto, qtscript_QItemSelectionModel_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("SelectionFlag"), + qtscript_create_QItemSelectionModel_SelectionFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("SelectionFlags"), + qtscript_create_QItemSelectionModel_SelectionFlags_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemSelectionRange.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemSelectionRange.cpp new file mode 100644 index 00000000..aa6d5474 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QItemSelectionRange.cpp @@ -0,0 +1,366 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +static const char * const qtscript_QItemSelectionRange_function_names[] = { + "QItemSelectionRange" + // static + // prototype + , "bottom" + , "bottomRight" + , "contains" + , "height" + , "indexes" + , "intersected" + , "intersects" + , "isEmpty" + , "isValid" + , "left" + , "model" + , "operator_assign" + , "equals" + , "operator_less" + , "parent" + , "right" + , "swap" + , "top" + , "topLeft" + , "width" + , "toString" +}; + +static const char * const qtscript_QItemSelectionRange_function_signatures[] = { + "\nQItemSelectionRange other\nQModelIndex index\nQModelIndex topL, QModelIndex bottomR" + // static + // prototype + , "" + , "" + , "QModelIndex index\nint row, int column, QModelIndex parentIndex" + , "" + , "" + , "QItemSelectionRange other" + , "QItemSelectionRange other" + , "" + , "" + , "" + , "" + , "QItemSelectionRange other" + , "QItemSelectionRange other" + , "QItemSelectionRange other" + , "" + , "" + , "QItemSelectionRange other" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QItemSelectionRange_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 3 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QItemSelectionRange_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QItemSelectionRange::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QItemSelectionRange*) +Q_DECLARE_METATYPE(const QAbstractItemModel*) + +// +// QItemSelectionRange +// + +static QScriptValue qtscript_QItemSelectionRange_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 20; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QItemSelectionRange* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QItemSelectionRange.%0(): this object is not a QItemSelectionRange") + .arg(qtscript_QItemSelectionRange_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->bottom(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + const QPersistentModelIndex& _q_result = _q_self->bottomRight(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QModelIndex _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = _q_self->contains(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->height(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->indexes(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + QItemSelectionRange _q_result = _q_self->intersected(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->intersects(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isValid(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->left(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + const QAbstractItemModel* _q_result = const_cast(_q_self->model()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + QItemSelectionRange& _q_result = _q_self->operator=(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator<(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QModelIndex _q_result = _q_self->parent(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + int _q_result = _q_self->right(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->swap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 0) { + int _q_result = _q_self->top(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + const QPersistentModelIndex& _q_result = _q_self->topLeft(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + int _q_result = _q_self->width(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QItemSelectionRange_throw_ambiguity_error_helper(context, + qtscript_QItemSelectionRange_function_names[_id+1], + qtscript_QItemSelectionRange_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QItemSelectionRange_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QItemSelectionRange(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QItemSelectionRange _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QItemSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + QItemSelectionRange _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QItemSelectionRange _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QModelIndex _q_arg1 = qscriptvalue_cast(context->argument(1)); + QItemSelectionRange _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QItemSelectionRange_throw_ambiguity_error_helper(context, + qtscript_QItemSelectionRange_function_names[_id], + qtscript_QItemSelectionRange_function_signatures[_id]); +} + +QScriptValue qtscript_create_QItemSelectionRange_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QItemSelectionRange*)0)); + for (int i = 0; i < 21; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QItemSelectionRange_prototype_call, qtscript_QItemSelectionRange_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QItemSelectionRange_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QItemSelectionRange_static_call, proto, qtscript_QItemSelectionRange_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QKeyEventTransition.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QKeyEventTransition.cpp new file mode 100644 index 00000000..a5496cc7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QKeyEventTransition.cpp @@ -0,0 +1,172 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QKeyEventTransition.h" + +static const char * const qtscript_QKeyEventTransition_function_names[] = { + "QKeyEventTransition" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QKeyEventTransition_function_signatures[] = { + "QObject object, Type type, int key, QState sourceState\nQState sourceState" + // static + // prototype +"" +}; + +static const int qtscript_QKeyEventTransition_function_lengths[] = { + 4 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QKeyEventTransition_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QKeyEventTransition::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QKeyEventTransition*) +Q_DECLARE_METATYPE(QtScriptShell_QKeyEventTransition*) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(QState*) +Q_DECLARE_METATYPE(QEventTransition*) + +// +// QKeyEventTransition +// + +static QScriptValue qtscript_QKeyEventTransition_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QKeyEventTransition* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QKeyEventTransition.%0(): this object is not a QKeyEventTransition") + .arg(qtscript_QKeyEventTransition_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QKeyEventTransition"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QKeyEventTransition_throw_ambiguity_error_helper(context, + qtscript_QKeyEventTransition_function_names[_id+1], + qtscript_QKeyEventTransition_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QKeyEventTransition_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QKeyEventTransition(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QKeyEventTransition* _q_cpp_result = new QtScriptShell_QKeyEventTransition(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QKeyEventTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QState* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QKeyEventTransition* _q_cpp_result = new QtScriptShell_QKeyEventTransition(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QKeyEventTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 3) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QEvent::Type _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QtScriptShell_QKeyEventTransition* _q_cpp_result = new QtScriptShell_QKeyEventTransition(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QKeyEventTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 4) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QEvent::Type _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QState* _q_arg3 = qscriptvalue_cast(context->argument(3)); + QtScriptShell_QKeyEventTransition* _q_cpp_result = new QtScriptShell_QKeyEventTransition(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QKeyEventTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QKeyEventTransition_throw_ambiguity_error_helper(context, + qtscript_QKeyEventTransition_function_names[_id], + qtscript_QKeyEventTransition_function_signatures[_id]); +} + +static QScriptValue qtscript_QKeyEventTransition_toScriptValue(QScriptEngine *engine, QKeyEventTransition* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QKeyEventTransition_fromScriptValue(const QScriptValue &value, QKeyEventTransition* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QKeyEventTransition_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QKeyEventTransition*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QKeyEventTransition_toScriptValue, + qtscript_QKeyEventTransition_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QKeyEventTransition_static_call, proto, qtscript_QKeyEventTransition_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLCDNumber.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLCDNumber.cpp new file mode 100644 index 00000000..e8e7b88b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLCDNumber.cpp @@ -0,0 +1,301 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QLCDNumber.h" + +static const char * const qtscript_QLCDNumber_function_names[] = { + "QLCDNumber" + // static + // prototype + , "checkOverflow" + , "toString" +}; + +static const char * const qtscript_QLCDNumber_function_signatures[] = { + "QWidget parent\nuint numDigits, QWidget parent" + // static + // prototype + , "double num\nint num" +"" +}; + +static const int qtscript_QLCDNumber_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 0 +}; + +static QScriptValue qtscript_QLCDNumber_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QLCDNumber::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QLCDNumber*) +Q_DECLARE_METATYPE(QtScriptShell_QLCDNumber*) +Q_DECLARE_METATYPE(QLCDNumber::Mode) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFrame*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QLCDNumber::Mode +// + +static const QLCDNumber::Mode qtscript_QLCDNumber_Mode_values[] = { + QLCDNumber::Hex + , QLCDNumber::Dec + , QLCDNumber::Oct + , QLCDNumber::Bin +}; + +static const char * const qtscript_QLCDNumber_Mode_keys[] = { + "Hex" + , "Dec" + , "Oct" + , "Bin" +}; + +static QString qtscript_QLCDNumber_Mode_toStringHelper(QLCDNumber::Mode value) +{ + if ((value >= QLCDNumber::Hex) && (value <= QLCDNumber::Bin)) + return qtscript_QLCDNumber_Mode_keys[static_cast(value)-static_cast(QLCDNumber::Hex)]; + return QString(); +} + +static QScriptValue qtscript_QLCDNumber_Mode_toScriptValue(QScriptEngine *engine, const QLCDNumber::Mode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QLCDNumber")); + return clazz.property(qtscript_QLCDNumber_Mode_toStringHelper(value)); +} + +static void qtscript_QLCDNumber_Mode_fromScriptValue(const QScriptValue &value, QLCDNumber::Mode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QLCDNumber_Mode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QLCDNumber::Hex) && (arg <= QLCDNumber::Bin)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Mode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QLCDNumber_Mode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QLCDNumber::Mode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QLCDNumber_Mode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QLCDNumber::Mode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QLCDNumber_Mode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QLCDNumber_Mode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QLCDNumber_Mode, + qtscript_QLCDNumber_Mode_valueOf, qtscript_QLCDNumber_Mode_toString); + qScriptRegisterMetaType(engine, qtscript_QLCDNumber_Mode_toScriptValue, + qtscript_QLCDNumber_Mode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QLCDNumber_Mode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QLCDNumber_Mode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QLCDNumber +// + +static QScriptValue qtscript_QLCDNumber_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QLCDNumber* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QLCDNumber.%0(): this object is not a QLCDNumber") + .arg(qtscript_QLCDNumber_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if (context->argument(0).isNumber()) { + double _q_arg0 = context->argument(0).toNumber(); + bool _q_result = _q_self->checkOverflow(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->checkOverflow(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 1: { + QString result = QString::fromLatin1("QLCDNumber"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QLCDNumber_throw_ambiguity_error_helper(context, + qtscript_QLCDNumber_function_names[_id+1], + qtscript_QLCDNumber_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QLCDNumber_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QLCDNumber(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QLCDNumber* _q_cpp_result = new QtScriptShell_QLCDNumber(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLCDNumber*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QLCDNumber* _q_cpp_result = new QtScriptShell_QLCDNumber(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLCDNumber*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber()) { + uint _q_arg0 = context->argument(0).toUInt32(); + QtScriptShell_QLCDNumber* _q_cpp_result = new QtScriptShell_QLCDNumber(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLCDNumber*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + uint _q_arg0 = context->argument(0).toUInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QLCDNumber* _q_cpp_result = new QtScriptShell_QLCDNumber(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLCDNumber*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QLCDNumber_throw_ambiguity_error_helper(context, + qtscript_QLCDNumber_function_names[_id], + qtscript_QLCDNumber_function_signatures[_id]); +} + +static QScriptValue qtscript_QLCDNumber_toScriptValue(QScriptEngine *engine, QLCDNumber* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QLCDNumber_fromScriptValue(const QScriptValue &value, QLCDNumber* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QLCDNumber_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QLCDNumber*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QLCDNumber_prototype_call, qtscript_QLCDNumber_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QLCDNumber_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QLCDNumber_toScriptValue, + qtscript_QLCDNumber_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QLCDNumber_static_call, proto, qtscript_QLCDNumber_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Mode"), + qtscript_create_QLCDNumber_Mode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLabel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLabel.cpp new file mode 100644 index 00000000..06e9cc8a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLabel.cpp @@ -0,0 +1,293 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QLabel.h" + +static const char * const qtscript_QLabel_function_names[] = { + "QLabel" + // static + // prototype + , "buddy" + , "minimumSizeHint" + , "movie" + , "picture_private" + , "selectionStart" + , "setBuddy" + , "setSelection" + , "toString" +}; + +static const char * const qtscript_QLabel_function_signatures[] = { + "QWidget parent, WindowFlags f\nString text, QWidget parent, WindowFlags f" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "QWidget arg__1" + , "int arg__1, int arg__2" +"" +}; + +static const int qtscript_QLabel_function_lengths[] = { + 3 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QLabel_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QLabel::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QLabel*) +Q_DECLARE_METATYPE(QtScriptShell_QLabel*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QMovie*) +Q_DECLARE_METATYPE(const QPicture*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFrame*) + +// +// QLabel +// + +static QScriptValue qtscript_QLabel_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 7; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QLabel* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QLabel.%0(): this object is not a QLabel") + .arg(qtscript_QLabel_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->buddy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QMovie* _q_result = _q_self->movie(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + const QPicture* _q_result = const_cast(_q_self->picture()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->selectionStart(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBuddy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setSelection(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 7: { + QString result = QString::fromLatin1("QLabel"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QLabel_throw_ambiguity_error_helper(context, + qtscript_QLabel_function_names[_id+1], + qtscript_QLabel_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QLabel_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QLabel(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QLabel* _q_cpp_result = new QtScriptShell_QLabel(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLabel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QLabel* _q_cpp_result = new QtScriptShell_QLabel(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLabel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QLabel* _q_cpp_result = new QtScriptShell_QLabel(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLabel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QLabel* _q_cpp_result = new QtScriptShell_QLabel(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLabel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1))) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QLabel* _q_cpp_result = new QtScriptShell_QLabel(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLabel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QtScriptShell_QLabel* _q_cpp_result = new QtScriptShell_QLabel(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLabel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QLabel_throw_ambiguity_error_helper(context, + qtscript_QLabel_function_names[_id], + qtscript_QLabel_function_signatures[_id]); +} + +static QScriptValue qtscript_QLabel_toScriptValue(QScriptEngine *engine, QLabel* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QLabel_fromScriptValue(const QScriptValue &value, QLabel* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QLabel_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QLabel*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QLabel_prototype_call, qtscript_QLabel_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QLabel_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QLabel_toScriptValue, + qtscript_QLabel_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QLabel_static_call, proto, qtscript_QLabel_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLayout.cpp new file mode 100644 index 00000000..c82d3325 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLayout.cpp @@ -0,0 +1,553 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QLayout.h" + +static const char * const qtscript_QLayout_function_names[] = { + "QLayout" + // static + , "closestAcceptableSize" + // prototype + , "activate" + , "addItem" + , "addWidget" + , "contentsMargins" + , "contentsRect" + , "count" + , "getContentsMargins" + , "indexOf" + , "isEnabled" + , "itemAt" + , "menuBar" + , "parentWidget" + , "removeItem" + , "removeWidget" + , "setAlignment" + , "setContentsMargins" + , "setEnabled" + , "setMenuBar" + , "takeAt" + , "totalHeightForWidth" + , "totalMaximumSize" + , "totalMinimumSize" + , "totalSizeHint" + , "update" + , "toString" +}; + +static const char * const qtscript_QLayout_function_signatures[] = { + "\nQWidget parent" + // static + , "QWidget w, QSize s" + // prototype + , "" + , "QLayoutItem arg__1" + , "QWidget w" + , "" + , "" + , "" + , "int left, int top, int right, int bottom" + , "QWidget arg__1" + , "" + , "int index" + , "" + , "" + , "QLayoutItem arg__1" + , "QWidget w" + , "QLayout l, Alignment alignment\nQWidget w, Alignment alignment" + , "QMargins margins\nint left, int top, int right, int bottom" + , "bool arg__1" + , "QWidget w" + , "int index" + , "int w" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QLayout_function_lengths[] = { + 1 + // static + , 2 + // prototype + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 4 + , 1 + , 0 + , 1 + , 0 + , 0 + , 1 + , 1 + , 2 + , 4 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QLayout_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QLayout::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QtScriptShell_QLayout*) +Q_DECLARE_METATYPE(QLayout::SizeConstraint) +Q_DECLARE_METATYPE(QLayoutItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QMargins) +Q_DECLARE_METATYPE(int*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(const QWidget*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QLayout::SizeConstraint +// + +static const QLayout::SizeConstraint qtscript_QLayout_SizeConstraint_values[] = { + QLayout::SetDefaultConstraint + , QLayout::SetNoConstraint + , QLayout::SetMinimumSize + , QLayout::SetFixedSize + , QLayout::SetMaximumSize + , QLayout::SetMinAndMaxSize +}; + +static const char * const qtscript_QLayout_SizeConstraint_keys[] = { + "SetDefaultConstraint" + , "SetNoConstraint" + , "SetMinimumSize" + , "SetFixedSize" + , "SetMaximumSize" + , "SetMinAndMaxSize" +}; + +static QString qtscript_QLayout_SizeConstraint_toStringHelper(QLayout::SizeConstraint value) +{ + if ((value >= QLayout::SetDefaultConstraint) && (value <= QLayout::SetMinAndMaxSize)) + return qtscript_QLayout_SizeConstraint_keys[static_cast(value)-static_cast(QLayout::SetDefaultConstraint)]; + return QString(); +} + +static QScriptValue qtscript_QLayout_SizeConstraint_toScriptValue(QScriptEngine *engine, const QLayout::SizeConstraint &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QLayout")); + return clazz.property(qtscript_QLayout_SizeConstraint_toStringHelper(value)); +} + +static void qtscript_QLayout_SizeConstraint_fromScriptValue(const QScriptValue &value, QLayout::SizeConstraint &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QLayout_SizeConstraint(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QLayout::SetDefaultConstraint) && (arg <= QLayout::SetMinAndMaxSize)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SizeConstraint(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QLayout_SizeConstraint_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QLayout::SizeConstraint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QLayout_SizeConstraint_toString(QScriptContext *context, QScriptEngine *engine) +{ + QLayout::SizeConstraint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QLayout_SizeConstraint_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QLayout_SizeConstraint_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QLayout_SizeConstraint, + qtscript_QLayout_SizeConstraint_valueOf, qtscript_QLayout_SizeConstraint_toString); + qScriptRegisterMetaType(engine, qtscript_QLayout_SizeConstraint_toScriptValue, + qtscript_QLayout_SizeConstraint_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QLayout_SizeConstraint_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QLayout_SizeConstraint_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QLayout +// + +static QScriptValue qtscript_QLayout_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 24; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QLayout* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QLayout.%0(): this object is not a QLayout") + .arg(qtscript_QLayout_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->activate(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QMargins _q_result = _q_self->contentsMargins(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->contentsRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 4) { + int* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->getContentsMargins(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->indexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEnabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QLayoutItem* _q_result = _q_self->itemAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->menuBar(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->parentWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QLayoutItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QLayout* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + bool _q_result = _q_self->setAlignment(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + bool _q_result = _q_self->setAlignment(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 15: + if (context->argumentCount() == 1) { + QMargins _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setContentsMargins(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setContentsMargins(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMenuBar(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QLayoutItem* _q_result = _q_self->takeAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->totalHeightForWidth(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->totalMaximumSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->totalMinimumSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->totalSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + _q_self->update(); + return context->engine()->undefinedValue(); + } + break; + + case 24: { + QString result = QString::fromLatin1("QLayout"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QLayout_throw_ambiguity_error_helper(context, + qtscript_QLayout_function_names[_id+2], + qtscript_QLayout_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QLayout_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QLayout(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QLayout* _q_cpp_result = new QtScriptShell_QLayout(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLayout*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QLayout* _q_cpp_result = new QtScriptShell_QLayout(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLayout*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + const QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSize _q_arg1 = qscriptvalue_cast(context->argument(1)); + QSize _q_result = QLayout::closestAcceptableSize(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QLayout_throw_ambiguity_error_helper(context, + qtscript_QLayout_function_names[_id], + qtscript_QLayout_function_signatures[_id]); +} + +static QScriptValue qtscript_QLayout_toScriptValue(QScriptEngine *engine, QLayout* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QLayout_fromScriptValue(const QScriptValue &value, QLayout* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QLayout_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QLayout*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + proto.setProperty(QString::fromLatin1("__QLayoutItem__"), + engine->defaultPrototype(qMetaTypeId()), + QScriptValue::SkipInEnumeration); + for (int i = 0; i < 25; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QLayout_prototype_call, qtscript_QLayout_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QLayout_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QLayout_toScriptValue, + qtscript_QLayout_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QLayout_static_call, proto, qtscript_QLayout_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QLayout_static_call, + qtscript_QLayout_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QLayout_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("SizeConstraint"), + qtscript_create_QLayout_SizeConstraint_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLayoutItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLayoutItem.cpp new file mode 100644 index 00000000..c4d6ece4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLayoutItem.cpp @@ -0,0 +1,322 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QLayoutItem.h" + +static const char * const qtscript_QLayoutItem_function_names[] = { + "QLayoutItem" + // static + // prototype + , "alignment" + , "controlTypes" + , "expandingDirections" + , "geometry" + , "hasHeightForWidth" + , "heightForWidth" + , "invalidate" + , "isEmpty" + , "layout" + , "maximumSize" + , "minimumHeightForWidth" + , "minimumSize" + , "setAlignment" + , "setGeometry" + , "sizeHint" + , "spacerItem" + , "widget" + , "toString" +}; + +static const char * const qtscript_QLayoutItem_function_signatures[] = { + "Alignment alignment" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "int arg__1" + , "" + , "" + , "" + , "" + , "int arg__1" + , "" + , "Alignment a" + , "QRect arg__1" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QLayoutItem_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QLayoutItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QLayoutItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QLayoutItem*) +Q_DECLARE_METATYPE(QtScriptShell_QLayoutItem*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QSpacerItem*) +Q_DECLARE_METATYPE(QWidget*) + +// +// QLayoutItem +// + +static QScriptValue qtscript_QLayoutItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 17; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QLayoutItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QLayoutItem.%0(): this object is not a QLayoutItem") + .arg(qtscript_QLayoutItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->alignment(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->controlTypes(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->expandingDirections(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->geometry(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasHeightForWidth(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->heightForWidth(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + _q_self->invalidate(); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QLayout* _q_result = _q_self->layout(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->maximumSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->minimumHeightForWidth(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setAlignment(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setGeometry(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QSpacerItem* _q_result = _q_self->spacerItem(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->widget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: { + QString result = QString::fromLatin1("QLayoutItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QLayoutItem_throw_ambiguity_error_helper(context, + qtscript_QLayoutItem_function_names[_id+1], + qtscript_QLayoutItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QLayoutItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QLayoutItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QLayoutItem* _q_cpp_result = new QtScriptShell_QLayoutItem(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QLayoutItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QtScriptShell_QLayoutItem* _q_cpp_result = new QtScriptShell_QLayoutItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QLayoutItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QLayoutItem_throw_ambiguity_error_helper(context, + qtscript_QLayoutItem_function_names[_id], + qtscript_QLayoutItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QLayoutItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QLayoutItem*)0)); + for (int i = 0; i < 18; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QLayoutItem_prototype_call, qtscript_QLayoutItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QLayoutItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QLayoutItem_static_call, proto, qtscript_QLayoutItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLineEdit.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLineEdit.cpp new file mode 100644 index 00000000..60354dd1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QLineEdit.cpp @@ -0,0 +1,558 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QLineEdit.h" + +static const char * const qtscript_QLineEdit_function_names[] = { + "QLineEdit" + // static + // prototype + , "backspace" + , "completer" + , "createStandardContextMenu" + , "cursorBackward" + , "cursorForward" + , "cursorPositionAt" + , "cursorWordBackward" + , "cursorWordForward" + , "del" + , "deselect" + , "end" + , "getTextMargins" + , "home" + , "insert" + , "minimumSizeHint" + , "selectionStart" + , "setCompleter" + , "setSelection" + , "setTextMargins" + , "setValidator" + , "sizeHint" + , "textMargins" + , "validator" + , "toString" +}; + +static const char * const qtscript_QLineEdit_function_signatures[] = { + "QWidget parent\nString arg__1, QWidget parent" + // static + // prototype + , "" + , "" + , "" + , "bool mark, int steps" + , "bool mark, int steps" + , "QPoint pos" + , "bool mark" + , "bool mark" + , "" + , "" + , "bool mark" + , "int left, int top, int right, int bottom" + , "bool mark" + , "String arg__1" + , "" + , "" + , "QCompleter completer" + , "int arg__1, int arg__2" + , "QMargins margins\nint left, int top, int right, int bottom" + , "QValidator arg__1" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QLineEdit_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 + , 2 + , 2 + , 1 + , 1 + , 1 + , 0 + , 0 + , 1 + , 4 + , 1 + , 1 + , 0 + , 0 + , 1 + , 2 + , 4 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QLineEdit_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QLineEdit::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QLineEdit*) +Q_DECLARE_METATYPE(QtScriptShell_QLineEdit*) +Q_DECLARE_METATYPE(QLineEdit::EchoMode) +Q_DECLARE_METATYPE(QCompleter*) +Q_DECLARE_METATYPE(QMenu*) +Q_DECLARE_METATYPE(int*) +Q_DECLARE_METATYPE(QMargins) +Q_DECLARE_METATYPE(const QValidator*) +Q_DECLARE_METATYPE(QWidget*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QLineEdit::EchoMode +// + +static const QLineEdit::EchoMode qtscript_QLineEdit_EchoMode_values[] = { + QLineEdit::Normal + , QLineEdit::NoEcho + , QLineEdit::Password + , QLineEdit::PasswordEchoOnEdit +}; + +static const char * const qtscript_QLineEdit_EchoMode_keys[] = { + "Normal" + , "NoEcho" + , "Password" + , "PasswordEchoOnEdit" +}; + +static QString qtscript_QLineEdit_EchoMode_toStringHelper(QLineEdit::EchoMode value) +{ + if ((value >= QLineEdit::Normal) && (value <= QLineEdit::PasswordEchoOnEdit)) + return qtscript_QLineEdit_EchoMode_keys[static_cast(value)-static_cast(QLineEdit::Normal)]; + return QString(); +} + +static QScriptValue qtscript_QLineEdit_EchoMode_toScriptValue(QScriptEngine *engine, const QLineEdit::EchoMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QLineEdit")); + return clazz.property(qtscript_QLineEdit_EchoMode_toStringHelper(value)); +} + +static void qtscript_QLineEdit_EchoMode_fromScriptValue(const QScriptValue &value, QLineEdit::EchoMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QLineEdit_EchoMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QLineEdit::Normal) && (arg <= QLineEdit::PasswordEchoOnEdit)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("EchoMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QLineEdit_EchoMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QLineEdit::EchoMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QLineEdit_EchoMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QLineEdit::EchoMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QLineEdit_EchoMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QLineEdit_EchoMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QLineEdit_EchoMode, + qtscript_QLineEdit_EchoMode_valueOf, qtscript_QLineEdit_EchoMode_toString); + qScriptRegisterMetaType(engine, qtscript_QLineEdit_EchoMode_toScriptValue, + qtscript_QLineEdit_EchoMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QLineEdit_EchoMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QLineEdit_EchoMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QLineEdit +// + +static QScriptValue qtscript_QLineEdit_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 23; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QLineEdit* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QLineEdit.%0(): this object is not a QLineEdit") + .arg(qtscript_QLineEdit_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->backspace(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QCompleter* _q_result = _q_self->completer(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QMenu* _q_result = _q_self->createStandardContextMenu(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->cursorBackward(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + bool _q_arg0 = context->argument(0).toBoolean(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->cursorBackward(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->cursorForward(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + bool _q_arg0 = context->argument(0).toBoolean(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->cursorForward(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->cursorPositionAt(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->cursorWordBackward(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->cursorWordForward(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + _q_self->del(); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 0) { + _q_self->deselect(); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->end(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 4) { + int* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->getTextMargins(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->home(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->insert(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + int _q_result = _q_self->selectionStart(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QCompleter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCompleter(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setSelection(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QMargins _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTextMargins(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setTextMargins(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + const QValidator* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setValidator(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + QMargins _q_result = _q_self->textMargins(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + const QValidator* _q_result = const_cast(_q_self->validator()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: { + QString result = QString::fromLatin1("QLineEdit"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QLineEdit_throw_ambiguity_error_helper(context, + qtscript_QLineEdit_function_names[_id+1], + qtscript_QLineEdit_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QLineEdit_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QLineEdit(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QLineEdit* _q_cpp_result = new QtScriptShell_QLineEdit(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLineEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QLineEdit* _q_cpp_result = new QtScriptShell_QLineEdit(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLineEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QLineEdit* _q_cpp_result = new QtScriptShell_QLineEdit(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLineEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QLineEdit* _q_cpp_result = new QtScriptShell_QLineEdit(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QLineEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QLineEdit_throw_ambiguity_error_helper(context, + qtscript_QLineEdit_function_names[_id], + qtscript_QLineEdit_function_signatures[_id]); +} + +static QScriptValue qtscript_QLineEdit_toScriptValue(QScriptEngine *engine, QLineEdit* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QLineEdit_fromScriptValue(const QScriptValue &value, QLineEdit* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QLineEdit_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QLineEdit*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 24; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QLineEdit_prototype_call, qtscript_QLineEdit_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QLineEdit_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QLineEdit_toScriptValue, + qtscript_QLineEdit_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QLineEdit_static_call, proto, qtscript_QLineEdit_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("EchoMode"), + qtscript_create_QLineEdit_EchoMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QListView.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QListView.cpp new file mode 100644 index 00000000..5fb792a5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QListView.cpp @@ -0,0 +1,305 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QListView.h" + +static const char * const qtscript_QListView_function_names[] = { + "QListView" + // static + // prototype + , "clearPropertyFlags" + , "isRowHidden" + , "setRowHidden" + , "toString" +}; + +static const char * const qtscript_QListView_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "" + , "int row" + , "int row, bool hide" +"" +}; + +static const int qtscript_QListView_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QListView_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QListView::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QListView*) +Q_DECLARE_METATYPE(QtScriptShell_QListView*) +Q_DECLARE_METATYPE(QListView::Movement) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemView*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QListView::Movement +// + +static const QListView::Movement qtscript_QListView_Movement_values[] = { + QListView::Static + , QListView::Free + , QListView::Snap +}; + +static const char * const qtscript_QListView_Movement_keys[] = { + "Static" + , "Free" + , "Snap" +}; + +static QString qtscript_QListView_Movement_toStringHelper(QListView::Movement value) +{ + if ((value >= QListView::Static) && (value <= QListView::Snap)) + return qtscript_QListView_Movement_keys[static_cast(value)-static_cast(QListView::Static)]; + return QString(); +} + +static QScriptValue qtscript_QListView_Movement_toScriptValue(QScriptEngine *engine, const QListView::Movement &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QListView")); + return clazz.property(qtscript_QListView_Movement_toStringHelper(value)); +} + +static void qtscript_QListView_Movement_fromScriptValue(const QScriptValue &value, QListView::Movement &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QListView_Movement(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QListView::Static) && (arg <= QListView::Snap)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Movement(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QListView_Movement_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QListView::Movement value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QListView_Movement_toString(QScriptContext *context, QScriptEngine *engine) +{ + QListView::Movement value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QListView_Movement_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QListView_Movement_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QListView_Movement, + qtscript_QListView_Movement_valueOf, qtscript_QListView_Movement_toString); + qScriptRegisterMetaType(engine, qtscript_QListView_Movement_toScriptValue, + qtscript_QListView_Movement_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QListView_Movement_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QListView_Movement_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QListView +// + +static QScriptValue qtscript_QListView_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QListView* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QListView.%0(): this object is not a QListView") + .arg(qtscript_QListView_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->clearPropertyFlags(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->isRowHidden(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setRowHidden(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 3: { + QString result = QString::fromLatin1("QListView"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QListView_throw_ambiguity_error_helper(context, + qtscript_QListView_function_names[_id+1], + qtscript_QListView_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QListView_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QListView(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QListView* _q_cpp_result = new QtScriptShell_QListView(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QListView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QListView* _q_cpp_result = new QtScriptShell_QListView(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QListView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QListView_throw_ambiguity_error_helper(context, + qtscript_QListView_function_names[_id], + qtscript_QListView_function_signatures[_id]); +} + +static QScriptValue qtscript_QListView_toScriptValue(QScriptEngine *engine, QListView* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QListView_fromScriptValue(const QScriptValue &value, QListView* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QListView_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QListView*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QListView_prototype_call, qtscript_QListView_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QListView_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QListView_toScriptValue, + qtscript_QListView_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QListView_static_call, proto, qtscript_QListView_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Movement"), + qtscript_create_QListView_Movement_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QListWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QListWidget.cpp new file mode 100644 index 00000000..d8ee37de --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QListWidget.cpp @@ -0,0 +1,449 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QListWidget.h" + +static const char * const qtscript_QListWidget_function_names[] = { + "QListWidget" + // static + // prototype + , "addItem" + , "addItems" + , "closePersistentEditor" + , "currentItem" + , "editItem" + , "findItems" + , "insertItem" + , "insertItems" + , "item" + , "itemAt" + , "itemWidget" + , "openPersistentEditor" + , "removeItemWidget" + , "row" + , "selectedItems" + , "setCurrentItem" + , "setItemWidget" + , "sortItems" + , "takeItem" + , "visualItemRect" + , "toString" +}; + +static const char * const qtscript_QListWidget_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "QListWidgetItem item\nString label" + , "List labels" + , "QListWidgetItem item" + , "" + , "QListWidgetItem item" + , "String text, MatchFlags flags" + , "int row, QListWidgetItem item\nint row, String label" + , "int row, List labels" + , "int row" + , "QPoint p\nint x, int y" + , "QListWidgetItem item" + , "QListWidgetItem item" + , "QListWidgetItem item" + , "QListWidgetItem item" + , "" + , "QListWidgetItem item\nQListWidgetItem item, SelectionFlags command" + , "QListWidgetItem item, QWidget widget" + , "SortOrder order" + , "int row" + , "QListWidgetItem item" +"" +}; + +static const int qtscript_QListWidget_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 1 + , 1 + , 0 + , 1 + , 2 + , 2 + , 2 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 0 + , 2 + , 2 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QListWidget_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QListWidget::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QListWidget*) +Q_DECLARE_METATYPE(QtScriptShell_QListWidget*) +Q_DECLARE_METATYPE(QListWidgetItem*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(const QListWidgetItem*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QListView*) + +// +// QListWidget +// + +static QScriptValue qtscript_QListWidget_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 20; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QListWidget* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QListWidget.%0(): this object is not a QListWidget") + .arg(qtscript_QListWidget_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QListWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addItem(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->addItem(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->addItems(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QListWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->closePersistentEditor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QListWidgetItem* _q_result = _q_self->currentItem(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QListWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->editItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QList _q_result = _q_self->findItems(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 2) { + if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1))) { + int _q_arg0 = context->argument(0).toInt32(); + QListWidgetItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isString()) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->insertItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + break; + + case 7: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + _q_self->insertItems(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QListWidgetItem* _q_result = _q_self->item(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QListWidgetItem* _q_result = _q_self->itemAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QListWidgetItem* _q_result = _q_self->itemAt(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QListWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_result = _q_self->itemWidget(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QListWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->openPersistentEditor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QListWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeItemWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + const QListWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->row(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->selectedItems(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QListWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCurrentItem(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QListWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + _q_self->setCurrentItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 2) { + QListWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setItemWidget(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 0) { + _q_self->sortItems(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + Qt::SortOrder _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->sortItems(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QListWidgetItem* _q_result = _q_self->takeItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + const QListWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->visualItemRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: { + QString result = QString::fromLatin1("QListWidget"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QListWidget_throw_ambiguity_error_helper(context, + qtscript_QListWidget_function_names[_id+1], + qtscript_QListWidget_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QListWidget_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QListWidget(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QListWidget* _q_cpp_result = new QtScriptShell_QListWidget(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QListWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QListWidget* _q_cpp_result = new QtScriptShell_QListWidget(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QListWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QListWidget_throw_ambiguity_error_helper(context, + qtscript_QListWidget_function_names[_id], + qtscript_QListWidget_function_signatures[_id]); +} + +static QScriptValue qtscript_QListWidget_toScriptValue(QScriptEngine *engine, QListWidget* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QListWidget_fromScriptValue(const QScriptValue &value, QListWidget* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QListWidget_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QListWidget*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 21; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QListWidget_prototype_call, qtscript_QListWidget_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QListWidget_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QListWidget_toScriptValue, + qtscript_QListWidget_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QListWidget_static_call, proto, qtscript_QListWidget_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QListWidgetItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QListWidgetItem.cpp new file mode 100644 index 00000000..ef1a2398 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QListWidgetItem.cpp @@ -0,0 +1,645 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QListWidgetItem.h" + +static const char * const qtscript_QListWidgetItem_function_names[] = { + "QListWidgetItem" + // static + // prototype + , "background" + , "checkState" + , "clone" + , "data" + , "flags" + , "font" + , "foreground" + , "icon" + , "isHidden" + , "isSelected" + , "listWidget" + , "setBackground" + , "setCheckState" + , "setData" + , "setFlags" + , "setFont" + , "setForeground" + , "setHidden" + , "setIcon" + , "setSelected" + , "setSizeHint" + , "setStatusTip" + , "setText" + , "setTextAlignment" + , "setToolTip" + , "setWhatsThis" + , "sizeHint" + , "statusTip" + , "text" + , "textAlignment" + , "toolTip" + , "type" + , "whatsThis" + , "toString" +}; + +static const char * const qtscript_QListWidgetItem_function_signatures[] = { + "QListWidget view, int type\nQIcon icon, String text, QListWidget view, int type\nString text, QListWidget view, int type" + // static + // prototype + , "" + , "" + , "" + , "int role" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QBrush brush" + , "CheckState state" + , "int role, Object value" + , "ItemFlags flags" + , "QFont font" + , "QBrush brush" + , "bool hide" + , "QIcon icon" + , "bool select" + , "QSize size" + , "String statusTip" + , "String text" + , "int alignment" + , "String toolTip" + , "String whatsThis" + , "" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QListWidgetItem_function_lengths[] = { + 4 + // static + // prototype + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QListWidgetItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QListWidgetItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QListWidgetItem*) +Q_DECLARE_METATYPE(QtScriptShell_QListWidgetItem*) +Q_DECLARE_METATYPE(QListWidgetItem::ItemType) +Q_DECLARE_METATYPE(Qt::CheckState) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QListWidget*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QListWidgetItem::ItemType +// + +static const QListWidgetItem::ItemType qtscript_QListWidgetItem_ItemType_values[] = { + QListWidgetItem::Type + , QListWidgetItem::UserType +}; + +static const char * const qtscript_QListWidgetItem_ItemType_keys[] = { + "Type" + , "UserType" +}; + +static QString qtscript_QListWidgetItem_ItemType_toStringHelper(QListWidgetItem::ItemType value) +{ + for (int i = 0; i < 2; ++i) { + if (qtscript_QListWidgetItem_ItemType_values[i] == value) + return QString::fromLatin1(qtscript_QListWidgetItem_ItemType_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QListWidgetItem_ItemType_toScriptValue(QScriptEngine *engine, const QListWidgetItem::ItemType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QListWidgetItem")); + return clazz.property(qtscript_QListWidgetItem_ItemType_toStringHelper(value)); +} + +static void qtscript_QListWidgetItem_ItemType_fromScriptValue(const QScriptValue &value, QListWidgetItem::ItemType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QListWidgetItem_ItemType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 2; ++i) { + if (qtscript_QListWidgetItem_ItemType_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ItemType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QListWidgetItem_ItemType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QListWidgetItem::ItemType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QListWidgetItem_ItemType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QListWidgetItem::ItemType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QListWidgetItem_ItemType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QListWidgetItem_ItemType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QListWidgetItem_ItemType, + qtscript_QListWidgetItem_ItemType_valueOf, qtscript_QListWidgetItem_ItemType_toString); + qScriptRegisterMetaType(engine, qtscript_QListWidgetItem_ItemType_toScriptValue, + qtscript_QListWidgetItem_ItemType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QListWidgetItem_ItemType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QListWidgetItem_ItemType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QListWidgetItem +// + +static QScriptValue qtscript_QListWidgetItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 33; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QListWidgetItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QListWidgetItem.%0(): this object is not a QListWidgetItem") + .arg(qtscript_QListWidgetItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QBrush _q_result = _q_self->background(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + Qt::CheckState _q_result = _q_self->checkState(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QListWidgetItem* _q_result = _q_self->clone(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_result = _q_self->data(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->flags(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QFont _q_result = _q_self->font(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QBrush _q_result = _q_self->foreground(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QIcon _q_result = _q_self->icon(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isHidden(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isSelected(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QListWidget* _q_result = _q_self->listWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBackground(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + Qt::CheckState _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCheckState(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setData(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setFlags(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFont(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setForeground(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setHidden(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setIcon(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setSelected(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSizeHint(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setStatusTip(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setTextAlignment(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setToolTip(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setWhatsThis(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->statusTip(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->text(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 0) { + int _q_result = _q_self->textAlignment(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toolTip(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 0) { + int _q_result = _q_self->type(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->whatsThis(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 33: { + QString result = QString::fromLatin1("QListWidgetItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QListWidgetItem_throw_ambiguity_error_helper(context, + qtscript_QListWidgetItem_function_names[_id+1], + qtscript_QListWidgetItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QListWidgetItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QListWidgetItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QListWidgetItem* _q_cpp_result = new QtScriptShell_QListWidgetItem(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QListWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QListWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QListWidgetItem* _q_cpp_result = new QtScriptShell_QListWidgetItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QListWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QListWidgetItem* _q_cpp_result = new QtScriptShell_QListWidgetItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QListWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + QListWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QListWidgetItem* _q_cpp_result = new QtScriptShell_QListWidgetItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QListWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QtScriptShell_QListWidgetItem* _q_cpp_result = new QtScriptShell_QListWidgetItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QListWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1))) { + QString _q_arg0 = context->argument(0).toString(); + QListWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QListWidgetItem* _q_cpp_result = new QtScriptShell_QListWidgetItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QListWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString() + && qscriptvalue_cast(context->argument(2))) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QListWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QListWidgetItem* _q_cpp_result = new QtScriptShell_QListWidgetItem(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QListWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + QListWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QtScriptShell_QListWidgetItem* _q_cpp_result = new QtScriptShell_QListWidgetItem(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QListWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 4) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QListWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_arg3 = context->argument(3).toInt32(); + QtScriptShell_QListWidgetItem* _q_cpp_result = new QtScriptShell_QListWidgetItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QListWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QListWidgetItem_throw_ambiguity_error_helper(context, + qtscript_QListWidgetItem_function_names[_id], + qtscript_QListWidgetItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QListWidgetItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QListWidgetItem*)0)); + for (int i = 0; i < 34; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QListWidgetItem_prototype_call, qtscript_QListWidgetItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QListWidgetItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QListWidgetItem_static_call, proto, qtscript_QListWidgetItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ItemType"), + qtscript_create_QListWidgetItem_ItemType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMainWindow.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMainWindow.cpp new file mode 100644 index 00000000..8caa9f7f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMainWindow.cpp @@ -0,0 +1,798 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QMainWindow.h" + +static const char * const qtscript_QMainWindow_function_names[] = { + "QMainWindow" + // static + // prototype + , "addDockWidget" + , "addToolBar" + , "addToolBarBreak" + , "centralWidget" + , "corner" + , "createPopupMenu" + , "dockWidgetArea" + , "insertToolBar" + , "insertToolBarBreak" + , "isSeparator" + , "menuBar" + , "menuWidget" + , "removeDockWidget" + , "removeToolBar" + , "removeToolBarBreak" + , "resizeDocks" + , "restoreDockWidget" + , "restoreState" + , "saveState" + , "setCentralWidget" + , "setCorner" + , "setMenuBar" + , "setMenuWidget" + , "setStatusBar" + , "setTabPosition" + , "splitDockWidget" + , "statusBar" + , "tabPosition" + , "tabifiedDockWidgets" + , "tabifyDockWidget" + , "takeCentralWidget" + , "toolBarArea" + , "toolBarBreak" + , "toString" +}; + +static const char * const qtscript_QMainWindow_function_signatures[] = { + "QWidget parent, WindowFlags flags" + // static + // prototype + , "DockWidgetArea area, QDockWidget dockwidget\nDockWidgetArea area, QDockWidget dockwidget, Orientation orientation" + , "QToolBar toolbar\nToolBarArea area, QToolBar toolbar\nString title" + , "ToolBarArea area" + , "" + , "Corner corner" + , "" + , "QDockWidget dockwidget" + , "QToolBar before, QToolBar toolbar" + , "QToolBar before" + , "QPoint pos" + , "" + , "" + , "QDockWidget dockwidget" + , "QToolBar toolbar" + , "QToolBar before" + , "List docks, List sizes, Orientation orientation" + , "QDockWidget dockwidget" + , "QByteArray state, int version" + , "int version" + , "QWidget widget" + , "Corner corner, DockWidgetArea area" + , "QMenuBar menubar" + , "QWidget menubar" + , "QStatusBar statusbar" + , "DockWidgetAreas areas, TabPosition tabPosition" + , "QDockWidget after, QDockWidget dockwidget, Orientation orientation" + , "" + , "DockWidgetArea area" + , "QDockWidget dockwidget" + , "QDockWidget first, QDockWidget second" + , "" + , "QToolBar toolbar" + , "QToolBar toolbar" +"" +}; + +static const int qtscript_QMainWindow_function_lengths[] = { + 2 + // static + // prototype + , 3 + , 2 + , 1 + , 0 + , 1 + , 0 + , 1 + , 2 + , 1 + , 1 + , 0 + , 0 + , 1 + , 1 + , 1 + , 3 + , 1 + , 2 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 2 + , 3 + , 0 + , 1 + , 1 + , 2 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QMainWindow_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QMainWindow::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QMainWindow*) +Q_DECLARE_METATYPE(QtScriptShell_QMainWindow*) +Q_DECLARE_METATYPE(QMainWindow::DockOption) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::DockWidgetArea) +Q_DECLARE_METATYPE(QDockWidget*) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(QToolBar*) +Q_DECLARE_METATYPE(Qt::ToolBarArea) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(Qt::Corner) +Q_DECLARE_METATYPE(QMenu*) +Q_DECLARE_METATYPE(QMenuBar*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QStatusBar*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabWidget::TabPosition) +Q_DECLARE_METATYPE(QFlags) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QMainWindow::DockOption +// + +static const QMainWindow::DockOption qtscript_QMainWindow_DockOption_values[] = { + QMainWindow::AnimatedDocks + , QMainWindow::AllowNestedDocks + , QMainWindow::AllowTabbedDocks + , QMainWindow::ForceTabbedDocks + , QMainWindow::VerticalTabs + , QMainWindow::GroupedDragging +}; + +static const char * const qtscript_QMainWindow_DockOption_keys[] = { + "AnimatedDocks" + , "AllowNestedDocks" + , "AllowTabbedDocks" + , "ForceTabbedDocks" + , "VerticalTabs" + , "GroupedDragging" +}; + +static QString qtscript_QMainWindow_DockOption_toStringHelper(QMainWindow::DockOption value) +{ + for (int i = 0; i < 6; ++i) { + if (qtscript_QMainWindow_DockOption_values[i] == value) + return QString::fromLatin1(qtscript_QMainWindow_DockOption_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QMainWindow_DockOption_toScriptValue(QScriptEngine *engine, const QMainWindow::DockOption &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QMainWindow")); + return clazz.property(qtscript_QMainWindow_DockOption_toStringHelper(value)); +} + +static void qtscript_QMainWindow_DockOption_fromScriptValue(const QScriptValue &value, QMainWindow::DockOption &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QMainWindow_DockOption(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 6; ++i) { + if (qtscript_QMainWindow_DockOption_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("DockOption(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QMainWindow_DockOption_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QMainWindow::DockOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QMainWindow_DockOption_toString(QScriptContext *context, QScriptEngine *engine) +{ + QMainWindow::DockOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QMainWindow_DockOption_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QMainWindow_DockOption_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QMainWindow_DockOption, + qtscript_QMainWindow_DockOption_valueOf, qtscript_QMainWindow_DockOption_toString); + qScriptRegisterMetaType(engine, qtscript_QMainWindow_DockOption_toScriptValue, + qtscript_QMainWindow_DockOption_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QMainWindow_DockOption_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QMainWindow_DockOption_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QMainWindow::DockOptions +// + +static QScriptValue qtscript_QMainWindow_DockOptions_toScriptValue(QScriptEngine *engine, const QMainWindow::DockOptions &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QMainWindow_DockOptions_fromScriptValue(const QScriptValue &value, QMainWindow::DockOptions &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QMainWindow_DockOptions(QScriptContext *context, QScriptEngine *engine) +{ + QMainWindow::DockOptions result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("DockOptions(): argument %0 is not of type DockOption").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QMainWindow_DockOptions_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QMainWindow::DockOptions value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QMainWindow_DockOptions_toString(QScriptContext *context, QScriptEngine *engine) +{ + QMainWindow::DockOptions value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 6; ++i) { + if ((value & qtscript_QMainWindow_DockOption_values[i]) == qtscript_QMainWindow_DockOption_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QMainWindow_DockOption_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QMainWindow_DockOptions_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QMainWindow_DockOptions_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QMainWindow_DockOptions, qtscript_QMainWindow_DockOptions_valueOf, + qtscript_QMainWindow_DockOptions_toString, qtscript_QMainWindow_DockOptions_equals); + qScriptRegisterMetaType(engine, qtscript_QMainWindow_DockOptions_toScriptValue, + qtscript_QMainWindow_DockOptions_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QMainWindow +// + +static QScriptValue qtscript_QMainWindow_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 33; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QMainWindow* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QMainWindow.%0(): this object is not a QMainWindow") + .arg(qtscript_QMainWindow_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + Qt::DockWidgetArea _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDockWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->addDockWidget(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + Qt::DockWidgetArea _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDockWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::Orientation _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->addDockWidget(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QToolBar* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addToolBar(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QToolBar* _q_result = _q_self->addToolBar(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + Qt::ToolBarArea _q_arg0 = qscriptvalue_cast(context->argument(0)); + QToolBar* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->addToolBar(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->addToolBarBreak(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + Qt::ToolBarArea _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addToolBarBreak(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->centralWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + Qt::Corner _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::DockWidgetArea _q_result = _q_self->corner(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QMenu* _q_result = _q_self->createPopupMenu(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QDockWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::DockWidgetArea _q_result = _q_self->dockWidgetArea(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 2) { + QToolBar* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QToolBar* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertToolBar(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QToolBar* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->insertToolBarBreak(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isSeparator(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QMenuBar* _q_result = _q_self->menuBar(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->menuWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QDockWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeDockWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QToolBar* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeToolBar(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QToolBar* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeToolBarBreak(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 3) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + Qt::Orientation _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->resizeDocks(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QDockWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->restoreDockWidget(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->restoreState(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + bool _q_result = _q_self->restoreState(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->saveState(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QByteArray _q_result = _q_self->saveState(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCentralWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 2) { + Qt::Corner _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::DockWidgetArea _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setCorner(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + QMenuBar* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMenuBar(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMenuWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QStatusBar* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStatusBar(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 2) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QTabWidget::TabPosition _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setTabPosition(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 3) { + QDockWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDockWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::Orientation _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->splitDockWidget(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 0) { + QStatusBar* _q_result = _q_self->statusBar(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 1) { + Qt::DockWidgetArea _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTabWidget::TabPosition _q_result = _q_self->tabPosition(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 1) { + QDockWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->tabifiedDockWidgets(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 2) { + QDockWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDockWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->tabifyDockWidget(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->takeCentralWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 1) { + QToolBar* _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ToolBarArea _q_result = _q_self->toolBarArea(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 1) { + QToolBar* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->toolBarBreak(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 33: { + QString result = QString::fromLatin1("QMainWindow"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QMainWindow_throw_ambiguity_error_helper(context, + qtscript_QMainWindow_function_names[_id+1], + qtscript_QMainWindow_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QMainWindow_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QMainWindow(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QMainWindow* _q_cpp_result = new QtScriptShell_QMainWindow(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMainWindow*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QMainWindow* _q_cpp_result = new QtScriptShell_QMainWindow(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMainWindow*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QMainWindow* _q_cpp_result = new QtScriptShell_QMainWindow(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMainWindow*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QMainWindow_throw_ambiguity_error_helper(context, + qtscript_QMainWindow_function_names[_id], + qtscript_QMainWindow_function_signatures[_id]); +} + +static QScriptValue qtscript_QMainWindow_toScriptValue(QScriptEngine *engine, QMainWindow* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QMainWindow_fromScriptValue(const QScriptValue &value, QMainWindow* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QMainWindow_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QMainWindow*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 34; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMainWindow_prototype_call, qtscript_QMainWindow_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QMainWindow_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QMainWindow_toScriptValue, + qtscript_QMainWindow_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QMainWindow_static_call, proto, qtscript_QMainWindow_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("DockOption"), + qtscript_create_QMainWindow_DockOption_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("DockOptions"), + qtscript_create_QMainWindow_DockOptions_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMdiArea.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMdiArea.cpp new file mode 100644 index 00000000..d3144c1c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMdiArea.cpp @@ -0,0 +1,528 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QMdiArea.h" + +static const char * const qtscript_QMdiArea_function_names[] = { + "QMdiArea" + // static + // prototype + , "activeSubWindow" + , "addSubWindow" + , "currentSubWindow" + , "removeSubWindow" + , "setOption" + , "subWindowList" + , "testOption" + , "toString" +}; + +static const char * const qtscript_QMdiArea_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "" + , "QWidget widget, WindowFlags flags" + , "" + , "QWidget widget" + , "AreaOption option, bool on" + , "WindowOrder order" + , "AreaOption opton" +"" +}; + +static const int qtscript_QMdiArea_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 2 + , 0 + , 1 + , 2 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QMdiArea_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QMdiArea::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QMdiArea*) +Q_DECLARE_METATYPE(QtScriptShell_QMdiArea*) +Q_DECLARE_METATYPE(QMdiArea::AreaOption) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QMdiArea::WindowOrder) +Q_DECLARE_METATYPE(QMdiSubWindow*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QAbstractScrollArea*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QMdiArea::AreaOption +// + +static const QMdiArea::AreaOption qtscript_QMdiArea_AreaOption_values[] = { + QMdiArea::DontMaximizeSubWindowOnActivation +}; + +static const char * const qtscript_QMdiArea_AreaOption_keys[] = { + "DontMaximizeSubWindowOnActivation" +}; + +static QString qtscript_QMdiArea_AreaOption_toStringHelper(QMdiArea::AreaOption value) +{ + if ((value >= QMdiArea::DontMaximizeSubWindowOnActivation) && (value <= QMdiArea::DontMaximizeSubWindowOnActivation)) + return qtscript_QMdiArea_AreaOption_keys[static_cast(value)-static_cast(QMdiArea::DontMaximizeSubWindowOnActivation)]; + return QString(); +} + +static QScriptValue qtscript_QMdiArea_AreaOption_toScriptValue(QScriptEngine *engine, const QMdiArea::AreaOption &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QMdiArea")); + return clazz.property(qtscript_QMdiArea_AreaOption_toStringHelper(value)); +} + +static void qtscript_QMdiArea_AreaOption_fromScriptValue(const QScriptValue &value, QMdiArea::AreaOption &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QMdiArea_AreaOption(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QMdiArea::DontMaximizeSubWindowOnActivation) && (arg <= QMdiArea::DontMaximizeSubWindowOnActivation)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("AreaOption(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QMdiArea_AreaOption_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QMdiArea::AreaOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QMdiArea_AreaOption_toString(QScriptContext *context, QScriptEngine *engine) +{ + QMdiArea::AreaOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QMdiArea_AreaOption_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QMdiArea_AreaOption_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QMdiArea_AreaOption, + qtscript_QMdiArea_AreaOption_valueOf, qtscript_QMdiArea_AreaOption_toString); + qScriptRegisterMetaType(engine, qtscript_QMdiArea_AreaOption_toScriptValue, + qtscript_QMdiArea_AreaOption_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QMdiArea_AreaOption_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QMdiArea_AreaOption_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QMdiArea::AreaOptions +// + +static QScriptValue qtscript_QMdiArea_AreaOptions_toScriptValue(QScriptEngine *engine, const QMdiArea::AreaOptions &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QMdiArea_AreaOptions_fromScriptValue(const QScriptValue &value, QMdiArea::AreaOptions &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QMdiArea_AreaOptions(QScriptContext *context, QScriptEngine *engine) +{ + QMdiArea::AreaOptions result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("AreaOptions(): argument %0 is not of type AreaOption").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QMdiArea_AreaOptions_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QMdiArea::AreaOptions value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QMdiArea_AreaOptions_toString(QScriptContext *context, QScriptEngine *engine) +{ + QMdiArea::AreaOptions value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 1; ++i) { + if ((value & qtscript_QMdiArea_AreaOption_values[i]) == qtscript_QMdiArea_AreaOption_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QMdiArea_AreaOption_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QMdiArea_AreaOptions_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QMdiArea_AreaOptions_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QMdiArea_AreaOptions, qtscript_QMdiArea_AreaOptions_valueOf, + qtscript_QMdiArea_AreaOptions_toString, qtscript_QMdiArea_AreaOptions_equals); + qScriptRegisterMetaType(engine, qtscript_QMdiArea_AreaOptions_toScriptValue, + qtscript_QMdiArea_AreaOptions_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QMdiArea::WindowOrder +// + +static const QMdiArea::WindowOrder qtscript_QMdiArea_WindowOrder_values[] = { + QMdiArea::CreationOrder + , QMdiArea::StackingOrder + , QMdiArea::ActivationHistoryOrder +}; + +static const char * const qtscript_QMdiArea_WindowOrder_keys[] = { + "CreationOrder" + , "StackingOrder" + , "ActivationHistoryOrder" +}; + +static QString qtscript_QMdiArea_WindowOrder_toStringHelper(QMdiArea::WindowOrder value) +{ + if ((value >= QMdiArea::CreationOrder) && (value <= QMdiArea::ActivationHistoryOrder)) + return qtscript_QMdiArea_WindowOrder_keys[static_cast(value)-static_cast(QMdiArea::CreationOrder)]; + return QString(); +} + +static QScriptValue qtscript_QMdiArea_WindowOrder_toScriptValue(QScriptEngine *engine, const QMdiArea::WindowOrder &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QMdiArea")); + return clazz.property(qtscript_QMdiArea_WindowOrder_toStringHelper(value)); +} + +static void qtscript_QMdiArea_WindowOrder_fromScriptValue(const QScriptValue &value, QMdiArea::WindowOrder &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QMdiArea_WindowOrder(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QMdiArea::CreationOrder) && (arg <= QMdiArea::ActivationHistoryOrder)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("WindowOrder(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QMdiArea_WindowOrder_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QMdiArea::WindowOrder value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QMdiArea_WindowOrder_toString(QScriptContext *context, QScriptEngine *engine) +{ + QMdiArea::WindowOrder value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QMdiArea_WindowOrder_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QMdiArea_WindowOrder_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QMdiArea_WindowOrder, + qtscript_QMdiArea_WindowOrder_valueOf, qtscript_QMdiArea_WindowOrder_toString); + qScriptRegisterMetaType(engine, qtscript_QMdiArea_WindowOrder_toScriptValue, + qtscript_QMdiArea_WindowOrder_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QMdiArea_WindowOrder_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QMdiArea_WindowOrder_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QMdiArea +// + +static QScriptValue qtscript_QMdiArea_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 7; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QMdiArea* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QMdiArea.%0(): this object is not a QMdiArea") + .arg(qtscript_QMdiArea_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QMdiSubWindow* _q_result = _q_self->activeSubWindow(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMdiSubWindow* _q_result = _q_self->addSubWindow(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QMdiSubWindow* _q_result = _q_self->addSubWindow(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QMdiSubWindow* _q_result = _q_self->currentSubWindow(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeSubWindow(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QMdiArea::AreaOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOption(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QMdiArea::AreaOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setOption(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->subWindowList(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QMdiArea::WindowOrder _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_result = _q_self->subWindowList(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QMdiArea::AreaOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->testOption(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: { + QString result = QString::fromLatin1("QMdiArea"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QMdiArea_throw_ambiguity_error_helper(context, + qtscript_QMdiArea_function_names[_id+1], + qtscript_QMdiArea_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QMdiArea_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QMdiArea(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QMdiArea* _q_cpp_result = new QtScriptShell_QMdiArea(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMdiArea*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QMdiArea* _q_cpp_result = new QtScriptShell_QMdiArea(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMdiArea*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QMdiArea_throw_ambiguity_error_helper(context, + qtscript_QMdiArea_function_names[_id], + qtscript_QMdiArea_function_signatures[_id]); +} + +static QScriptValue qtscript_QMdiArea_toScriptValue(QScriptEngine *engine, QMdiArea* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QMdiArea_fromScriptValue(const QScriptValue &value, QMdiArea* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QMdiArea_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QMdiArea*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMdiArea_prototype_call, qtscript_QMdiArea_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QMdiArea_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QMdiArea_toScriptValue, + qtscript_QMdiArea_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QMdiArea_static_call, proto, qtscript_QMdiArea_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("AreaOption"), + qtscript_create_QMdiArea_AreaOption_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("AreaOptions"), + qtscript_create_QMdiArea_AreaOptions_class(engine)); + ctor.setProperty(QString::fromLatin1("WindowOrder"), + qtscript_create_QMdiArea_WindowOrder_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMdiSubWindow.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMdiSubWindow.cpp new file mode 100644 index 00000000..526bd44b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMdiSubWindow.cpp @@ -0,0 +1,509 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QMdiSubWindow.h" + +static const char * const qtscript_QMdiSubWindow_function_names[] = { + "QMdiSubWindow" + // static + // prototype + , "isShaded" + , "maximizedButtonsWidget" + , "maximizedSystemMenuIconWidget" + , "mdiArea" + , "minimumSizeHint" + , "setOption" + , "setSystemMenu" + , "setWidget" + , "sizeHint" + , "systemMenu" + , "testOption" + , "widget" + , "toString" +}; + +static const char * const qtscript_QMdiSubWindow_function_signatures[] = { + "QWidget parent, WindowFlags flags" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "SubWindowOption option, bool on" + , "QMenu systemMenu" + , "QWidget widget" + , "" + , "" + , "SubWindowOption arg__1" + , "" +"" +}; + +static const int qtscript_QMdiSubWindow_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 2 + , 1 + , 1 + , 0 + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QMdiSubWindow_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QMdiSubWindow::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QMdiSubWindow*) +Q_DECLARE_METATYPE(QtScriptShell_QMdiSubWindow*) +Q_DECLARE_METATYPE(QMdiSubWindow::SubWindowOption) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QMdiArea*) +Q_DECLARE_METATYPE(QMenu*) +Q_DECLARE_METATYPE(QFlags) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QMdiSubWindow::SubWindowOption +// + +static const QMdiSubWindow::SubWindowOption qtscript_QMdiSubWindow_SubWindowOption_values[] = { + QMdiSubWindow::AllowOutsideAreaHorizontally + , QMdiSubWindow::AllowOutsideAreaVertically + , QMdiSubWindow::RubberBandResize + , QMdiSubWindow::RubberBandMove +}; + +static const char * const qtscript_QMdiSubWindow_SubWindowOption_keys[] = { + "AllowOutsideAreaHorizontally" + , "AllowOutsideAreaVertically" + , "RubberBandResize" + , "RubberBandMove" +}; + +static QString qtscript_QMdiSubWindow_SubWindowOption_toStringHelper(QMdiSubWindow::SubWindowOption value) +{ + for (int i = 0; i < 4; ++i) { + if (qtscript_QMdiSubWindow_SubWindowOption_values[i] == value) + return QString::fromLatin1(qtscript_QMdiSubWindow_SubWindowOption_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QMdiSubWindow_SubWindowOption_toScriptValue(QScriptEngine *engine, const QMdiSubWindow::SubWindowOption &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QMdiSubWindow")); + return clazz.property(qtscript_QMdiSubWindow_SubWindowOption_toStringHelper(value)); +} + +static void qtscript_QMdiSubWindow_SubWindowOption_fromScriptValue(const QScriptValue &value, QMdiSubWindow::SubWindowOption &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QMdiSubWindow_SubWindowOption(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 4; ++i) { + if (qtscript_QMdiSubWindow_SubWindowOption_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("SubWindowOption(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QMdiSubWindow_SubWindowOption_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QMdiSubWindow::SubWindowOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QMdiSubWindow_SubWindowOption_toString(QScriptContext *context, QScriptEngine *engine) +{ + QMdiSubWindow::SubWindowOption value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QMdiSubWindow_SubWindowOption_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QMdiSubWindow_SubWindowOption_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QMdiSubWindow_SubWindowOption, + qtscript_QMdiSubWindow_SubWindowOption_valueOf, qtscript_QMdiSubWindow_SubWindowOption_toString); + qScriptRegisterMetaType(engine, qtscript_QMdiSubWindow_SubWindowOption_toScriptValue, + qtscript_QMdiSubWindow_SubWindowOption_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QMdiSubWindow_SubWindowOption_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QMdiSubWindow_SubWindowOption_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QMdiSubWindow::SubWindowOptions +// + +static QScriptValue qtscript_QMdiSubWindow_SubWindowOptions_toScriptValue(QScriptEngine *engine, const QMdiSubWindow::SubWindowOptions &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QMdiSubWindow_SubWindowOptions_fromScriptValue(const QScriptValue &value, QMdiSubWindow::SubWindowOptions &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QMdiSubWindow_SubWindowOptions(QScriptContext *context, QScriptEngine *engine) +{ + QMdiSubWindow::SubWindowOptions result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("SubWindowOptions(): argument %0 is not of type SubWindowOption").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QMdiSubWindow_SubWindowOptions_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QMdiSubWindow::SubWindowOptions value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QMdiSubWindow_SubWindowOptions_toString(QScriptContext *context, QScriptEngine *engine) +{ + QMdiSubWindow::SubWindowOptions value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 4; ++i) { + if ((value & qtscript_QMdiSubWindow_SubWindowOption_values[i]) == qtscript_QMdiSubWindow_SubWindowOption_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QMdiSubWindow_SubWindowOption_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QMdiSubWindow_SubWindowOptions_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QMdiSubWindow_SubWindowOptions_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QMdiSubWindow_SubWindowOptions, qtscript_QMdiSubWindow_SubWindowOptions_valueOf, + qtscript_QMdiSubWindow_SubWindowOptions_toString, qtscript_QMdiSubWindow_SubWindowOptions_equals); + qScriptRegisterMetaType(engine, qtscript_QMdiSubWindow_SubWindowOptions_toScriptValue, + qtscript_QMdiSubWindow_SubWindowOptions_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QMdiSubWindow +// + +static QScriptValue qtscript_QMdiSubWindow_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 12; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QMdiSubWindow* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QMdiSubWindow.%0(): this object is not a QMdiSubWindow") + .arg(qtscript_QMdiSubWindow_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isShaded(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->maximizedButtonsWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->maximizedSystemMenuIconWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QMdiArea* _q_result = _q_self->mdiArea(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QMdiSubWindow::SubWindowOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOption(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QMdiSubWindow::SubWindowOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setOption(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QMenu* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSystemMenu(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QMenu* _q_result = _q_self->systemMenu(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QMdiSubWindow::SubWindowOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->testOption(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->widget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: { + QString result = QString::fromLatin1("QMdiSubWindow"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QMdiSubWindow_throw_ambiguity_error_helper(context, + qtscript_QMdiSubWindow_function_names[_id+1], + qtscript_QMdiSubWindow_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QMdiSubWindow_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QMdiSubWindow(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QMdiSubWindow* _q_cpp_result = new QtScriptShell_QMdiSubWindow(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMdiSubWindow*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QMdiSubWindow* _q_cpp_result = new QtScriptShell_QMdiSubWindow(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMdiSubWindow*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QMdiSubWindow* _q_cpp_result = new QtScriptShell_QMdiSubWindow(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMdiSubWindow*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QMdiSubWindow_throw_ambiguity_error_helper(context, + qtscript_QMdiSubWindow_function_names[_id], + qtscript_QMdiSubWindow_function_signatures[_id]); +} + +static QScriptValue qtscript_QMdiSubWindow_toScriptValue(QScriptEngine *engine, QMdiSubWindow* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QMdiSubWindow_fromScriptValue(const QScriptValue &value, QMdiSubWindow* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QMdiSubWindow_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QMdiSubWindow*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 13; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMdiSubWindow_prototype_call, qtscript_QMdiSubWindow_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QMdiSubWindow_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QMdiSubWindow_toScriptValue, + qtscript_QMdiSubWindow_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QMdiSubWindow_static_call, proto, qtscript_QMdiSubWindow_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("SubWindowOption"), + qtscript_create_QMdiSubWindow_SubWindowOption_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("SubWindowOptions"), + qtscript_create_QMdiSubWindow_SubWindowOptions_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMenu.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMenu.cpp new file mode 100644 index 00000000..f62aad03 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMenu.cpp @@ -0,0 +1,505 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QMenu.h" + +static const char * const qtscript_QMenu_function_names[] = { + "QMenu" + // static + , "exec" + // prototype + , "actionAt" + , "actionGeometry" + , "activeAction" + , "addAction" + , "addMenu" + , "addSection" + , "addSeparator" + , "clear" + , "defaultAction" + , "exec" + , "hideTearOffMenu" + , "insertMenu" + , "insertSection" + , "insertSeparator" + , "isEmpty" + , "isTearOffMenuVisible" + , "menuAction" + , "popup" + , "setActiveAction" + , "setDefaultAction" + , "sizeHint" + , "toString" +}; + +static const char * const qtscript_QMenu_function_signatures[] = { + "QWidget parent\nString title, QWidget parent" + // static + , "List actions, QPoint pos, QAction at, QWidget parent" + // prototype + , "QPoint arg__1" + , "QAction arg__1" + , "" + , "QIcon icon, String text\nString text" + , "QMenu menu\nQIcon icon, String title\nString title" + , "QIcon icon, String text\nString text" + , "" + , "" + , "" + , "\nQPoint pos, QAction at" + , "" + , "QAction before, QMenu menu" + , "QAction before, QIcon icon, String text\nQAction before, String text" + , "QAction before" + , "" + , "" + , "" + , "QPoint pos, QAction at" + , "QAction act" + , "QAction arg__1" + , "" +"" +}; + +static const int qtscript_QMenu_function_lengths[] = { + 2 + // static + , 4 + // prototype + , 1 + , 1 + , 0 + , 2 + , 2 + , 2 + , 0 + , 0 + , 0 + , 2 + , 0 + , 2 + , 3 + , 1 + , 0 + , 0 + , 0 + , 2 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QMenu_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QMenu::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QMenu*) +Q_DECLARE_METATYPE(QtScriptShell_QMenu*) +Q_DECLARE_METATYPE(QAction*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QWidget*) + +// +// QMenu +// + +static QScriptValue qtscript_QMenu_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 21; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QMenu* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QMenu.%0(): this object is not a QMenu") + .arg(qtscript_QMenu_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAction* _q_result = _q_self->actionAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->actionGeometry(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QAction* _q_result = _q_self->activeAction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QAction* _q_result = _q_self->addAction(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QAction* _q_result = _q_self->addAction(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QMenu* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAction* _q_result = _q_self->addMenu(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QMenu* _q_result = _q_self->addMenu(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QMenu* _q_result = _q_self->addMenu(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QAction* _q_result = _q_self->addSection(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QAction* _q_result = _q_self->addSection(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QAction* _q_result = _q_self->addSeparator(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QAction* _q_result = _q_self->defaultAction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QAction* _q_result = _q_self->exec(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAction* _q_result = _q_self->exec(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAction* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QAction* _q_result = _q_self->exec(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + _q_self->hideTearOffMenu(); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 2) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMenu* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QAction* _q_result = _q_self->insertMenu(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 2) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QAction* _q_result = _q_self->insertSection(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIcon _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + QAction* _q_result = _q_self->insertSection(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAction* _q_result = _q_self->insertSeparator(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isTearOffMenuVisible(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QAction* _q_result = _q_self->menuAction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->popup(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAction* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->popup(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setActiveAction(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDefaultAction(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: { + QString result = QString::fromLatin1("QMenu"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QMenu_throw_ambiguity_error_helper(context, + qtscript_QMenu_function_names[_id+2], + qtscript_QMenu_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QMenu_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QMenu(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QMenu* _q_cpp_result = new QtScriptShell_QMenu(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMenu*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QMenu* _q_cpp_result = new QtScriptShell_QMenu(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMenu*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QMenu* _q_cpp_result = new QtScriptShell_QMenu(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMenu*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QMenu* _q_cpp_result = new QtScriptShell_QMenu(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMenu*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 2) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QAction* _q_result = QMenu::exec(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QAction* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QAction* _q_result = QMenu::exec(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QAction* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QWidget* _q_arg3 = qscriptvalue_cast(context->argument(3)); + QAction* _q_result = QMenu::exec(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QMenu_throw_ambiguity_error_helper(context, + qtscript_QMenu_function_names[_id], + qtscript_QMenu_function_signatures[_id]); +} + +static QScriptValue qtscript_QMenu_toScriptValue(QScriptEngine *engine, QMenu* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QMenu_fromScriptValue(const QScriptValue &value, QMenu* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QMenu_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QMenu*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 22; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMenu_prototype_call, qtscript_QMenu_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QMenu_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QMenu_toScriptValue, + qtscript_QMenu_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QMenu_static_call, proto, qtscript_QMenu_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMenu_static_call, + qtscript_QMenu_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QMenu_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMenuBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMenuBar.cpp new file mode 100644 index 00000000..5f5efe94 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMenuBar.cpp @@ -0,0 +1,356 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QMenuBar.h" + +static const char * const qtscript_QMenuBar_function_names[] = { + "QMenuBar" + // static + // prototype + , "actionAt" + , "actionGeometry" + , "activeAction" + , "addAction" + , "addMenu" + , "addSeparator" + , "clear" + , "cornerWidget" + , "insertMenu" + , "insertSeparator" + , "minimumSizeHint" + , "setActiveAction" + , "setCornerWidget" + , "sizeHint" + , "toString" +}; + +static const char * const qtscript_QMenuBar_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "QPoint arg__1" + , "QAction arg__1" + , "" + , "String text" + , "QMenu menu\nQIcon icon, String title\nString title" + , "" + , "" + , "Corner corner" + , "QAction before, QMenu menu" + , "QAction before" + , "" + , "QAction action" + , "QWidget w, Corner corner" + , "" +"" +}; + +static const int qtscript_QMenuBar_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 1 + , 0 + , 1 + , 2 + , 0 + , 0 + , 1 + , 2 + , 1 + , 0 + , 1 + , 2 + , 0 + , 0 +}; + +static QScriptValue qtscript_QMenuBar_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QMenuBar::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QMenuBar*) +Q_DECLARE_METATYPE(QtScriptShell_QMenuBar*) +Q_DECLARE_METATYPE(QAction*) +Q_DECLARE_METATYPE(QMenu*) +Q_DECLARE_METATYPE(Qt::Corner) +Q_DECLARE_METATYPE(QWidget*) + +// +// QMenuBar +// + +static QScriptValue qtscript_QMenuBar_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 14; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QMenuBar* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QMenuBar.%0(): this object is not a QMenuBar") + .arg(qtscript_QMenuBar_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAction* _q_result = _q_self->actionAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->actionGeometry(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QAction* _q_result = _q_self->activeAction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QAction* _q_result = _q_self->addAction(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QMenu* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAction* _q_result = _q_self->addMenu(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QMenu* _q_result = _q_self->addMenu(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QMenu* _q_result = _q_self->addMenu(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QAction* _q_result = _q_self->addSeparator(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->cornerWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + Qt::Corner _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_result = _q_self->cornerWidget(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 2) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMenu* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QAction* _q_result = _q_self->insertMenu(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAction* _q_result = _q_self->insertSeparator(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setActiveAction(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCornerWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::Corner _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setCornerWidget(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: { + QString result = QString::fromLatin1("QMenuBar"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QMenuBar_throw_ambiguity_error_helper(context, + qtscript_QMenuBar_function_names[_id+1], + qtscript_QMenuBar_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QMenuBar_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QMenuBar(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QMenuBar* _q_cpp_result = new QtScriptShell_QMenuBar(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMenuBar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QMenuBar* _q_cpp_result = new QtScriptShell_QMenuBar(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMenuBar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QMenuBar_throw_ambiguity_error_helper(context, + qtscript_QMenuBar_function_names[_id], + qtscript_QMenuBar_function_signatures[_id]); +} + +static QScriptValue qtscript_QMenuBar_toScriptValue(QScriptEngine *engine, QMenuBar* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QMenuBar_fromScriptValue(const QScriptValue &value, QMenuBar* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QMenuBar_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QMenuBar*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 15; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMenuBar_prototype_call, qtscript_QMenuBar_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QMenuBar_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QMenuBar_toScriptValue, + qtscript_QMenuBar_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QMenuBar_static_call, proto, qtscript_QMenuBar_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMessageBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMessageBox.cpp new file mode 100644 index 00000000..3a7d2686 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMessageBox.cpp @@ -0,0 +1,952 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QMessageBox.h" + +static const char * const qtscript_QMessageBox_function_names[] = { + "QMessageBox" + // static + , "about" + , "aboutQt" + , "critical" + , "information" + , "question" + , "warning" + // prototype + , "addButton" + , "button" + , "buttonRole" + , "buttons" + , "checkBox" + , "clickedButton" + , "defaultButton" + , "escapeButton" + , "open" + , "removeButton" + , "setCheckBox" + , "setDefaultButton" + , "setEscapeButton" + , "standardButton" + , "toString" +}; + +static const char * const qtscript_QMessageBox_function_signatures[] = { + "Icon icon, String title, String text, StandardButtons buttons, QWidget parent, WindowFlags flags\nQWidget parent" + // static + , "QWidget parent, String title, String text" + , "QWidget parent, String title" + , "QWidget parent, String title, String text, StandardButtons buttons, StandardButton defaultButton\nQWidget parent, String title, String text, StandardButton button0, StandardButton button1" + , "QWidget parent, String title, String text, StandardButtons buttons, StandardButton defaultButton\nQWidget parent, String title, String text, StandardButton button0, StandardButton button1" + , "QWidget parent, String title, String text, StandardButtons buttons, StandardButton defaultButton\nQWidget parent, String title, String text, StandardButton button0, StandardButton button1" + , "QWidget parent, String title, String text, StandardButtons buttons, StandardButton defaultButton\nQWidget parent, String title, String text, StandardButton button0, StandardButton button1" + // prototype + , "QAbstractButton button, ButtonRole role\nStandardButton button\nString text, ButtonRole role" + , "StandardButton which" + , "QAbstractButton button" + , "" + , "" + , "" + , "" + , "" + , "QObject receiver, char member" + , "QAbstractButton button" + , "QCheckBox cb" + , "StandardButton button\nQPushButton button" + , "QAbstractButton button\nStandardButton button" + , "QAbstractButton button" +"" +}; + +static const int qtscript_QMessageBox_function_lengths[] = { + 6 + // static + , 3 + , 2 + , 5 + , 5 + , 5 + , 5 + // prototype + , 2 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QMessageBox_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QMessageBox::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QMessageBox*) +Q_DECLARE_METATYPE(QtScriptShell_QMessageBox*) +Q_DECLARE_METATYPE(QMessageBox::Icon) +Q_DECLARE_METATYPE(QMessageBox::StandardButton) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAbstractButton*) +Q_DECLARE_METATYPE(QMessageBox::ButtonRole) +Q_DECLARE_METATYPE(QPushButton*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QCheckBox*) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QDialog*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QMessageBox::Icon +// + +static const QMessageBox::Icon qtscript_QMessageBox_Icon_values[] = { + QMessageBox::NoIcon + , QMessageBox::Information + , QMessageBox::Warning + , QMessageBox::Critical + , QMessageBox::Question +}; + +static const char * const qtscript_QMessageBox_Icon_keys[] = { + "NoIcon" + , "Information" + , "Warning" + , "Critical" + , "Question" +}; + +static QString qtscript_QMessageBox_Icon_toStringHelper(QMessageBox::Icon value) +{ + if ((value >= QMessageBox::NoIcon) && (value <= QMessageBox::Question)) + return qtscript_QMessageBox_Icon_keys[static_cast(value)-static_cast(QMessageBox::NoIcon)]; + return QString(); +} + +static QScriptValue qtscript_QMessageBox_Icon_toScriptValue(QScriptEngine *engine, const QMessageBox::Icon &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QMessageBox")); + return clazz.property(qtscript_QMessageBox_Icon_toStringHelper(value)); +} + +static void qtscript_QMessageBox_Icon_fromScriptValue(const QScriptValue &value, QMessageBox::Icon &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QMessageBox_Icon(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QMessageBox::NoIcon) && (arg <= QMessageBox::Question)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Icon(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QMessageBox_Icon_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QMessageBox::Icon value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QMessageBox_Icon_toString(QScriptContext *context, QScriptEngine *engine) +{ + QMessageBox::Icon value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QMessageBox_Icon_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QMessageBox_Icon_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QMessageBox_Icon, + qtscript_QMessageBox_Icon_valueOf, qtscript_QMessageBox_Icon_toString); + qScriptRegisterMetaType(engine, qtscript_QMessageBox_Icon_toScriptValue, + qtscript_QMessageBox_Icon_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QMessageBox_Icon_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QMessageBox_Icon_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QMessageBox::StandardButton +// + +static const QMessageBox::StandardButton qtscript_QMessageBox_StandardButton_values[] = { + QMessageBox::NoButton + , QMessageBox::Default + , QMessageBox::Escape + , QMessageBox::FlagMask + , QMessageBox::ButtonMask + , QMessageBox::Ok + , QMessageBox::Save + , QMessageBox::SaveAll + , QMessageBox::Open + , QMessageBox::Yes + , QMessageBox::YesToAll + , QMessageBox::No + , QMessageBox::NoToAll + , QMessageBox::Abort + , QMessageBox::Retry + , QMessageBox::Ignore + , QMessageBox::Close + , QMessageBox::Cancel + , QMessageBox::Discard + , QMessageBox::Help + , QMessageBox::Apply + , QMessageBox::Reset + , QMessageBox::RestoreDefaults +}; + +static const char * const qtscript_QMessageBox_StandardButton_keys[] = { + "NoButton" + , "Default" + , "Escape" + , "FlagMask" + , "ButtonMask" + , "Ok" + , "Save" + , "SaveAll" + , "Open" + , "Yes" + , "YesToAll" + , "No" + , "NoToAll" + , "Abort" + , "Retry" + , "Ignore" + , "Close" + , "Cancel" + , "Discard" + , "Help" + , "Apply" + , "Reset" + , "RestoreDefaults" +}; + +static QString qtscript_QMessageBox_StandardButton_toStringHelper(QMessageBox::StandardButton value) +{ + for (int i = 0; i < 23; ++i) { + if (qtscript_QMessageBox_StandardButton_values[i] == value) + return QString::fromLatin1(qtscript_QMessageBox_StandardButton_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QMessageBox_StandardButton_toScriptValue(QScriptEngine *engine, const QMessageBox::StandardButton &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QMessageBox")); + return clazz.property(qtscript_QMessageBox_StandardButton_toStringHelper(value)); +} + +static void qtscript_QMessageBox_StandardButton_fromScriptValue(const QScriptValue &value, QMessageBox::StandardButton &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QMessageBox_StandardButton(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 23; ++i) { + if (qtscript_QMessageBox_StandardButton_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("StandardButton(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QMessageBox_StandardButton_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QMessageBox::StandardButton value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QMessageBox_StandardButton_toString(QScriptContext *context, QScriptEngine *engine) +{ + QMessageBox::StandardButton value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QMessageBox_StandardButton_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QMessageBox_StandardButton_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QMessageBox_StandardButton, + qtscript_QMessageBox_StandardButton_valueOf, qtscript_QMessageBox_StandardButton_toString); + qScriptRegisterMetaType(engine, qtscript_QMessageBox_StandardButton_toScriptValue, + qtscript_QMessageBox_StandardButton_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 23; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QMessageBox_StandardButton_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QMessageBox_StandardButton_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QMessageBox::StandardButtons +// + +static QScriptValue qtscript_QMessageBox_StandardButtons_toScriptValue(QScriptEngine *engine, const QMessageBox::StandardButtons &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QMessageBox_StandardButtons_fromScriptValue(const QScriptValue &value, QMessageBox::StandardButtons &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QMessageBox_StandardButtons(QScriptContext *context, QScriptEngine *engine) +{ + QMessageBox::StandardButtons result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("StandardButtons(): argument %0 is not of type StandardButton").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QMessageBox_StandardButtons_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QMessageBox::StandardButtons value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QMessageBox_StandardButtons_toString(QScriptContext *context, QScriptEngine *engine) +{ + QMessageBox::StandardButtons value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 23; ++i) { + if ((value & qtscript_QMessageBox_StandardButton_values[i]) == qtscript_QMessageBox_StandardButton_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QMessageBox_StandardButton_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QMessageBox_StandardButtons_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QMessageBox_StandardButtons_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QMessageBox_StandardButtons, qtscript_QMessageBox_StandardButtons_valueOf, + qtscript_QMessageBox_StandardButtons_toString, qtscript_QMessageBox_StandardButtons_equals); + qScriptRegisterMetaType(engine, qtscript_QMessageBox_StandardButtons_toScriptValue, + qtscript_QMessageBox_StandardButtons_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QMessageBox +// + +static QScriptValue qtscript_QMessageBox_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 14; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QMessageBox* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QMessageBox.%0(): this object is not a QMessageBox") + .arg(qtscript_QMessageBox_function_names[_id+7])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QMessageBox::StandardButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPushButton* _q_result = _q_self->addButton(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QAbstractButton* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMessageBox::ButtonRole _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->addButton(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QMessageBox::ButtonRole _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPushButton* _q_result = _q_self->addButton(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 1: + if (context->argumentCount() == 1) { + QMessageBox::StandardButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAbstractButton* _q_result = _q_self->button(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QAbstractButton* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMessageBox::ButtonRole _q_result = _q_self->buttonRole(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->buttons(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QCheckBox* _q_result = _q_self->checkBox(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QAbstractButton* _q_result = _q_self->clickedButton(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QPushButton* _q_result = _q_self->defaultButton(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QAbstractButton* _q_result = _q_self->escapeButton(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->open(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QAbstractButton* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeButton(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QCheckBox* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCheckBox(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QMessageBox::StandardButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDefaultButton(_q_arg0); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0))) { + QPushButton* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDefaultButton(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 12: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QAbstractButton* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setEscapeButton(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QMessageBox::StandardButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setEscapeButton(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 13: + if (context->argumentCount() == 1) { + QAbstractButton* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMessageBox::StandardButton _q_result = _q_self->standardButton(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: { + QString result = QString::fromLatin1("QMessageBox"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QMessageBox_throw_ambiguity_error_helper(context, + qtscript_QMessageBox_function_names[_id+7], + qtscript_QMessageBox_function_signatures[_id+7]); +} + +static QScriptValue qtscript_QMessageBox_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QMessageBox(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QMessageBox* _q_cpp_result = new QtScriptShell_QMessageBox(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMessageBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QMessageBox* _q_cpp_result = new QtScriptShell_QMessageBox(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMessageBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 3) { + QMessageBox::Icon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QtScriptShell_QMessageBox* _q_cpp_result = new QtScriptShell_QMessageBox(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMessageBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 4) { + QMessageBox::Icon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QtScriptShell_QMessageBox* _q_cpp_result = new QtScriptShell_QMessageBox(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMessageBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 5) { + QMessageBox::Icon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QWidget* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QtScriptShell_QMessageBox* _q_cpp_result = new QtScriptShell_QMessageBox(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMessageBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 6) { + QMessageBox::Icon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QWidget* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + QtScriptShell_QMessageBox* _q_cpp_result = new QtScriptShell_QMessageBox(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMessageBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QMessageBox::about(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMessageBox::aboutQt(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QMessageBox::aboutQt(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QMessageBox::StandardButton _q_result = QMessageBox::critical(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QMessageBox::StandardButton _q_result = QMessageBox::critical(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString() + && context->argument(2).isString() + && (qMetaTypeId >() == context->argument(3).toVariant().userType()) + && (qMetaTypeId() == context->argument(4).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QMessageBox::StandardButton _q_arg4 = qscriptvalue_cast(context->argument(4)); + QMessageBox::StandardButton _q_result = QMessageBox::critical(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString() + && context->argument(2).isString() + && (qMetaTypeId() == context->argument(3).toVariant().userType()) + && (qMetaTypeId() == context->argument(4).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QMessageBox::StandardButton _q_arg3 = qscriptvalue_cast(context->argument(3)); + QMessageBox::StandardButton _q_arg4 = qscriptvalue_cast(context->argument(4)); + int _q_result = QMessageBox::critical(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 4: + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QMessageBox::StandardButton _q_result = QMessageBox::information(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString() + && context->argument(2).isString() + && (qMetaTypeId >() == context->argument(3).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QMessageBox::StandardButton _q_result = QMessageBox::information(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString() + && context->argument(2).isString() + && (qMetaTypeId() == context->argument(3).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QMessageBox::StandardButton _q_arg3 = qscriptvalue_cast(context->argument(3)); + QMessageBox::StandardButton _q_result = QMessageBox::information(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 5) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString() + && context->argument(2).isString() + && (qMetaTypeId >() == context->argument(3).toVariant().userType()) + && (qMetaTypeId() == context->argument(4).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QMessageBox::StandardButton _q_arg4 = qscriptvalue_cast(context->argument(4)); + QMessageBox::StandardButton _q_result = QMessageBox::information(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString() + && context->argument(2).isString() + && (qMetaTypeId() == context->argument(3).toVariant().userType()) + && (qMetaTypeId() == context->argument(4).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QMessageBox::StandardButton _q_arg3 = qscriptvalue_cast(context->argument(3)); + QMessageBox::StandardButton _q_arg4 = qscriptvalue_cast(context->argument(4)); + QMessageBox::StandardButton _q_result = QMessageBox::information(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } + } + break; + + case 5: + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QMessageBox::StandardButton _q_result = QMessageBox::question(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QMessageBox::StandardButton _q_result = QMessageBox::question(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString() + && context->argument(2).isString() + && (qMetaTypeId >() == context->argument(3).toVariant().userType()) + && (qMetaTypeId() == context->argument(4).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QMessageBox::StandardButton _q_arg4 = qscriptvalue_cast(context->argument(4)); + QMessageBox::StandardButton _q_result = QMessageBox::question(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString() + && context->argument(2).isString() + && (qMetaTypeId() == context->argument(3).toVariant().userType()) + && (qMetaTypeId() == context->argument(4).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QMessageBox::StandardButton _q_arg3 = qscriptvalue_cast(context->argument(3)); + QMessageBox::StandardButton _q_arg4 = qscriptvalue_cast(context->argument(4)); + int _q_result = QMessageBox::question(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 6: + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QMessageBox::StandardButton _q_result = QMessageBox::warning(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QMessageBox::StandardButton _q_result = QMessageBox::warning(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString() + && context->argument(2).isString() + && (qMetaTypeId >() == context->argument(3).toVariant().userType()) + && (qMetaTypeId() == context->argument(4).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + QMessageBox::StandardButton _q_arg4 = qscriptvalue_cast(context->argument(4)); + QMessageBox::StandardButton _q_result = QMessageBox::warning(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return qScriptValueFromValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isString() + && context->argument(2).isString() + && (qMetaTypeId() == context->argument(3).toVariant().userType()) + && (qMetaTypeId() == context->argument(4).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QMessageBox::StandardButton _q_arg3 = qscriptvalue_cast(context->argument(3)); + QMessageBox::StandardButton _q_arg4 = qscriptvalue_cast(context->argument(4)); + int _q_result = QMessageBox::warning(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QMessageBox_throw_ambiguity_error_helper(context, + qtscript_QMessageBox_function_names[_id], + qtscript_QMessageBox_function_signatures[_id]); +} + +static QScriptValue qtscript_QMessageBox_toScriptValue(QScriptEngine *engine, QMessageBox* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QMessageBox_fromScriptValue(const QScriptValue &value, QMessageBox* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QMessageBox_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QMessageBox*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 15; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMessageBox_prototype_call, qtscript_QMessageBox_function_lengths[i+7]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QMessageBox_function_names[i+7]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QMessageBox_toScriptValue, + qtscript_QMessageBox_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QMessageBox_static_call, proto, qtscript_QMessageBox_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMessageBox_static_call, + qtscript_QMessageBox_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QMessageBox_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("Icon"), + qtscript_create_QMessageBox_Icon_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StandardButton"), + qtscript_create_QMessageBox_StandardButton_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StandardButtons"), + qtscript_create_QMessageBox_StandardButtons_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMouseEventTransition.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMouseEventTransition.cpp new file mode 100644 index 00000000..95d7d51f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QMouseEventTransition.cpp @@ -0,0 +1,202 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QMouseEventTransition.h" + +static const char * const qtscript_QMouseEventTransition_function_names[] = { + "QMouseEventTransition" + // static + // prototype + , "hitTestPath" + , "setHitTestPath" + , "toString" +}; + +static const char * const qtscript_QMouseEventTransition_function_signatures[] = { + "QObject object, Type type, MouseButton button, QState sourceState\nQState sourceState" + // static + // prototype + , "" + , "QPainterPath path" +"" +}; + +static const int qtscript_QMouseEventTransition_function_lengths[] = { + 4 + // static + // prototype + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QMouseEventTransition_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QMouseEventTransition::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QMouseEventTransition*) +Q_DECLARE_METATYPE(QtScriptShell_QMouseEventTransition*) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QEvent::Type) +Q_DECLARE_METATYPE(Qt::MouseButton) +Q_DECLARE_METATYPE(QState*) +Q_DECLARE_METATYPE(QEventTransition*) + +// +// QMouseEventTransition +// + +static QScriptValue qtscript_QMouseEventTransition_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QMouseEventTransition* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QMouseEventTransition.%0(): this object is not a QMouseEventTransition") + .arg(qtscript_QMouseEventTransition_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QPainterPath _q_result = _q_self->hitTestPath(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QPainterPath _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setHitTestPath(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: { + QString result = QString::fromLatin1("QMouseEventTransition"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QMouseEventTransition_throw_ambiguity_error_helper(context, + qtscript_QMouseEventTransition_function_names[_id+1], + qtscript_QMouseEventTransition_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QMouseEventTransition_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QMouseEventTransition(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QMouseEventTransition* _q_cpp_result = new QtScriptShell_QMouseEventTransition(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMouseEventTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QState* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QMouseEventTransition* _q_cpp_result = new QtScriptShell_QMouseEventTransition(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMouseEventTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 3) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QEvent::Type _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::MouseButton _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QMouseEventTransition* _q_cpp_result = new QtScriptShell_QMouseEventTransition(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMouseEventTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 4) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QEvent::Type _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::MouseButton _q_arg2 = qscriptvalue_cast(context->argument(2)); + QState* _q_arg3 = qscriptvalue_cast(context->argument(3)); + QtScriptShell_QMouseEventTransition* _q_cpp_result = new QtScriptShell_QMouseEventTransition(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QMouseEventTransition*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QMouseEventTransition_throw_ambiguity_error_helper(context, + qtscript_QMouseEventTransition_function_names[_id], + qtscript_QMouseEventTransition_function_signatures[_id]); +} + +static QScriptValue qtscript_QMouseEventTransition_toScriptValue(QScriptEngine *engine, QMouseEventTransition* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QMouseEventTransition_fromScriptValue(const QScriptValue &value, QMouseEventTransition* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QMouseEventTransition_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QMouseEventTransition*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QMouseEventTransition_prototype_call, qtscript_QMouseEventTransition_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QMouseEventTransition_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QMouseEventTransition_toScriptValue, + qtscript_QMouseEventTransition_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QMouseEventTransition_static_call, proto, qtscript_QMouseEventTransition_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPaintDevice.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPaintDevice.cpp new file mode 100644 index 00000000..b51e70e5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPaintDevice.cpp @@ -0,0 +1,400 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPaintDevice.h" + +static const char * const qtscript_QPaintDevice_function_names[] = { + "QPaintDevice" + // static + , "devicePixelRatioFScale" + // prototype + , "colorCount" + , "depth" + , "devType" + , "devicePixelRatio" + , "devicePixelRatioF" + , "height" + , "heightMM" + , "logicalDpiX" + , "logicalDpiY" + , "paintEngine" + , "paintingActive" + , "physicalDpiX" + , "physicalDpiY" + , "width" + , "widthMM" + , "toString" +}; + +static const char * const qtscript_QPaintDevice_function_signatures[] = { + "" + // static + , "" + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QPaintDevice_function_lengths[] = { + 0 + // static + , 0 + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPaintDevice_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPaintDevice::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QtScriptShell_QPaintDevice*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QPaintEngine*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QPaintDevice::PaintDeviceMetric +// + +static const QPaintDevice::PaintDeviceMetric qtscript_QPaintDevice_PaintDeviceMetric_values[] = { + QPaintDevice::PdmWidth + , QPaintDevice::PdmHeight + , QPaintDevice::PdmWidthMM + , QPaintDevice::PdmHeightMM + , QPaintDevice::PdmNumColors + , QPaintDevice::PdmDepth + , QPaintDevice::PdmDpiX + , QPaintDevice::PdmDpiY + , QPaintDevice::PdmPhysicalDpiX + , QPaintDevice::PdmPhysicalDpiY + , QPaintDevice::PdmDevicePixelRatio + , QPaintDevice::PdmDevicePixelRatioScaled +}; + +static const char * const qtscript_QPaintDevice_PaintDeviceMetric_keys[] = { + "PdmWidth" + , "PdmHeight" + , "PdmWidthMM" + , "PdmHeightMM" + , "PdmNumColors" + , "PdmDepth" + , "PdmDpiX" + , "PdmDpiY" + , "PdmPhysicalDpiX" + , "PdmPhysicalDpiY" + , "PdmDevicePixelRatio" + , "PdmDevicePixelRatioScaled" +}; + +static QString qtscript_QPaintDevice_PaintDeviceMetric_toStringHelper(QPaintDevice::PaintDeviceMetric value) +{ + if ((value >= QPaintDevice::PdmWidth) && (value <= QPaintDevice::PdmDevicePixelRatioScaled)) + return qtscript_QPaintDevice_PaintDeviceMetric_keys[static_cast(value)-static_cast(QPaintDevice::PdmWidth)]; + return QString(); +} + +static QScriptValue qtscript_QPaintDevice_PaintDeviceMetric_toScriptValue(QScriptEngine *engine, const QPaintDevice::PaintDeviceMetric &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPaintDevice")); + return clazz.property(qtscript_QPaintDevice_PaintDeviceMetric_toStringHelper(value)); +} + +static void qtscript_QPaintDevice_PaintDeviceMetric_fromScriptValue(const QScriptValue &value, QPaintDevice::PaintDeviceMetric &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPaintDevice_PaintDeviceMetric(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPaintDevice::PdmWidth) && (arg <= QPaintDevice::PdmDevicePixelRatioScaled)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("PaintDeviceMetric(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPaintDevice_PaintDeviceMetric_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPaintDevice::PaintDeviceMetric value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPaintDevice_PaintDeviceMetric_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPaintDevice::PaintDeviceMetric value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPaintDevice_PaintDeviceMetric_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPaintDevice_PaintDeviceMetric_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPaintDevice_PaintDeviceMetric, + qtscript_QPaintDevice_PaintDeviceMetric_valueOf, qtscript_QPaintDevice_PaintDeviceMetric_toString); + qScriptRegisterMetaType(engine, qtscript_QPaintDevice_PaintDeviceMetric_toScriptValue, + qtscript_QPaintDevice_PaintDeviceMetric_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 12; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPaintDevice_PaintDeviceMetric_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPaintDevice_PaintDeviceMetric_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPaintDevice +// + +static QScriptValue qtscript_QPaintDevice_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 15; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPaintDevice* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPaintDevice.%0(): this object is not a QPaintDevice") + .arg(qtscript_QPaintDevice_function_names[_id+2])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->colorCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->depth(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->devType(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->devicePixelRatio(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->devicePixelRatioF(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->height(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = _q_self->heightMM(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + int _q_result = _q_self->logicalDpiX(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + int _q_result = _q_self->logicalDpiY(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QPaintEngine* _q_result = _q_self->paintEngine(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->paintingActive(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + int _q_result = _q_self->physicalDpiX(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + int _q_result = _q_self->physicalDpiY(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + int _q_result = _q_self->width(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + int _q_result = _q_self->widthMM(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: { + QString result = QString::fromLatin1("QPaintDevice"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPaintDevice_throw_ambiguity_error_helper(context, + qtscript_QPaintDevice_function_names[_id+2], + qtscript_QPaintDevice_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QPaintDevice_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPaintDevice cannot be constructed")); + break; + + case 1: + if (context->argumentCount() == 0) { + qreal _q_result = QPaintDevice::devicePixelRatioFScale(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPaintDevice_throw_ambiguity_error_helper(context, + qtscript_QPaintDevice_function_names[_id], + qtscript_QPaintDevice_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPaintDevice_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPaintDevice*)0)); + for (int i = 0; i < 16; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPaintDevice_prototype_call, qtscript_QPaintDevice_function_lengths[i+2]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPaintDevice_function_names[i+2]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPaintDevice_static_call, proto, qtscript_QPaintDevice_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPaintDevice_static_call, + qtscript_QPaintDevice_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QPaintDevice_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("PaintDeviceMetric"), + qtscript_create_QPaintDevice_PaintDeviceMetric_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPanGesture.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPanGesture.cpp new file mode 100644 index 00000000..2f1acf7d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPanGesture.cpp @@ -0,0 +1,149 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPanGesture.h" + +static const char * const qtscript_QPanGesture_function_names[] = { + "QPanGesture" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QPanGesture_function_signatures[] = { + "QObject parent" + // static + // prototype +"" +}; + +static const int qtscript_QPanGesture_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QPanGesture_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPanGesture::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPanGesture*) +Q_DECLARE_METATYPE(QtScriptShell_QPanGesture*) +Q_DECLARE_METATYPE(QGesture*) + +// +// QPanGesture +// + +static QScriptValue qtscript_QPanGesture_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPanGesture* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPanGesture.%0(): this object is not a QPanGesture") + .arg(qtscript_QPanGesture_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QPanGesture"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPanGesture_throw_ambiguity_error_helper(context, + qtscript_QPanGesture_function_names[_id+1], + qtscript_QPanGesture_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPanGesture_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPanGesture(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPanGesture* _q_cpp_result = new QtScriptShell_QPanGesture(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPanGesture*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QPanGesture* _q_cpp_result = new QtScriptShell_QPanGesture(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPanGesture*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPanGesture_throw_ambiguity_error_helper(context, + qtscript_QPanGesture_function_names[_id], + qtscript_QPanGesture_function_signatures[_id]); +} + +static QScriptValue qtscript_QPanGesture_toScriptValue(QScriptEngine *engine, QPanGesture* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QPanGesture_fromScriptValue(const QScriptValue &value, QPanGesture* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QPanGesture_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPanGesture*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QPanGesture_toScriptValue, + qtscript_QPanGesture_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPanGesture_static_call, proto, qtscript_QPanGesture_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPictureFormatPlugin.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPictureFormatPlugin.cpp new file mode 100644 index 00000000..6db47cdc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPictureFormatPlugin.cpp @@ -0,0 +1,193 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPictureFormatPlugin.h" + +static const char * const qtscript_QPictureFormatPlugin_function_names[] = { + "QPictureFormatPlugin" + // static + // prototype + , "installIOHandler" + , "loadPicture" + , "savePicture" + , "toString" +}; + +static const char * const qtscript_QPictureFormatPlugin_function_signatures[] = { + "QObject parent" + // static + // prototype + , "String format" + , "String format, String filename, QPicture pic" + , "String format, String filename, QPicture pic" +"" +}; + +static const int qtscript_QPictureFormatPlugin_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 3 + , 3 + , 0 +}; + +static QScriptValue qtscript_QPictureFormatPlugin_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPictureFormatPlugin::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPictureFormatPlugin*) +Q_DECLARE_METATYPE(QtScriptShell_QPictureFormatPlugin*) +Q_DECLARE_METATYPE(QPicture*) +Q_DECLARE_METATYPE(QPicture) + +// +// QPictureFormatPlugin +// + +static QScriptValue qtscript_QPictureFormatPlugin_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPictureFormatPlugin* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPictureFormatPlugin.%0(): this object is not a QPictureFormatPlugin") + .arg(qtscript_QPictureFormatPlugin_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->installIOHandler(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QPicture* _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = _q_self->loadPicture(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QPicture _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = _q_self->savePicture(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: { + QString result = QString::fromLatin1("QPictureFormatPlugin"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPictureFormatPlugin_throw_ambiguity_error_helper(context, + qtscript_QPictureFormatPlugin_function_names[_id+1], + qtscript_QPictureFormatPlugin_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPictureFormatPlugin_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPictureFormatPlugin(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPictureFormatPlugin* _q_cpp_result = new QtScriptShell_QPictureFormatPlugin(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPictureFormatPlugin*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QPictureFormatPlugin* _q_cpp_result = new QtScriptShell_QPictureFormatPlugin(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPictureFormatPlugin*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPictureFormatPlugin_throw_ambiguity_error_helper(context, + qtscript_QPictureFormatPlugin_function_names[_id], + qtscript_QPictureFormatPlugin_function_signatures[_id]); +} + +static QScriptValue qtscript_QPictureFormatPlugin_toScriptValue(QScriptEngine *engine, QPictureFormatPlugin* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QPictureFormatPlugin_fromScriptValue(const QScriptValue &value, QPictureFormatPlugin* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QPictureFormatPlugin_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPictureFormatPlugin*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPictureFormatPlugin_prototype_call, qtscript_QPictureFormatPlugin_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPictureFormatPlugin_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QPictureFormatPlugin_toScriptValue, + qtscript_QPictureFormatPlugin_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPictureFormatPlugin_static_call, proto, qtscript_QPictureFormatPlugin_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPlainTextDocumentLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPlainTextDocumentLayout.cpp new file mode 100644 index 00000000..f2749fab --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPlainTextDocumentLayout.cpp @@ -0,0 +1,232 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPlainTextDocumentLayout.h" + +static const char * const qtscript_QPlainTextDocumentLayout_function_names[] = { + "QPlainTextDocumentLayout" + // static + // prototype + , "blockBoundingRect" + , "documentSize" + , "draw" + , "ensureBlockLayout" + , "frameBoundingRect" + , "hitTest" + , "pageCount" + , "requestUpdate" + , "toString" +}; + +static const char * const qtscript_QPlainTextDocumentLayout_function_signatures[] = { + "QTextDocument document" + // static + // prototype + , "QTextBlock block" + , "" + , "QPainter arg__1, QAbstractTextDocumentLayout_PaintContext arg__2" + , "QTextBlock block" + , "QTextFrame arg__1" + , "QPointF arg__1, HitTestAccuracy arg__2" + , "" + , "" +"" +}; + +static const int qtscript_QPlainTextDocumentLayout_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 2 + , 1 + , 1 + , 2 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPlainTextDocumentLayout_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPlainTextDocumentLayout::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPlainTextDocumentLayout*) +Q_DECLARE_METATYPE(QtScriptShell_QPlainTextDocumentLayout*) +Q_DECLARE_METATYPE(QTextBlock) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QAbstractTextDocumentLayout::PaintContext) +Q_DECLARE_METATYPE(QTextFrame*) +Q_DECLARE_METATYPE(Qt::HitTestAccuracy) +Q_DECLARE_METATYPE(QTextDocument*) + +// +// QPlainTextDocumentLayout +// + +static QScriptValue qtscript_QPlainTextDocumentLayout_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPlainTextDocumentLayout* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPlainTextDocumentLayout.%0(): this object is not a QPlainTextDocumentLayout") + .arg(qtscript_QPlainTextDocumentLayout_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QTextBlock _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->blockBoundingRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QSizeF _q_result = _q_self->documentSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 2) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAbstractTextDocumentLayout::PaintContext _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->draw(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QTextBlock _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->ensureBlockLayout(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QTextFrame* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRectF _q_result = _q_self->frameBoundingRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 2) { + QPointF _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::HitTestAccuracy _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_result = _q_self->hitTest(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = _q_self->pageCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + _q_self->requestUpdate(); + return context->engine()->undefinedValue(); + } + break; + + case 8: { + QString result = QString::fromLatin1("QPlainTextDocumentLayout"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPlainTextDocumentLayout_throw_ambiguity_error_helper(context, + qtscript_QPlainTextDocumentLayout_function_names[_id+1], + qtscript_QPlainTextDocumentLayout_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPlainTextDocumentLayout_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPlainTextDocumentLayout(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QTextDocument* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPlainTextDocumentLayout* _q_cpp_result = new QtScriptShell_QPlainTextDocumentLayout(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QPlainTextDocumentLayout*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPlainTextDocumentLayout_throw_ambiguity_error_helper(context, + qtscript_QPlainTextDocumentLayout_function_names[_id], + qtscript_QPlainTextDocumentLayout_function_signatures[_id]); +} + +QScriptValue qtscript_create_QPlainTextDocumentLayout_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPlainTextDocumentLayout*)0)); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPlainTextDocumentLayout_prototype_call, qtscript_QPlainTextDocumentLayout_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPlainTextDocumentLayout_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPlainTextDocumentLayout_static_call, proto, qtscript_QPlainTextDocumentLayout_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPlainTextEdit.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPlainTextEdit.cpp new file mode 100644 index 00000000..45015b1e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPlainTextEdit.cpp @@ -0,0 +1,761 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPlainTextEdit.h" + +static const char * const qtscript_QPlainTextEdit_function_names[] = { + "QPlainTextEdit" + // static + // prototype + , "anchorAt" + , "backgroundVisible" + , "blockCount" + , "canPaste" + , "centerOnScroll" + , "createStandardContextMenu" + , "currentCharFormat" + , "cursorForPosition" + , "cursorRect" + , "cursorWidth" + , "document" + , "ensureCursorVisible" + , "extraSelections" + , "find" + , "isReadOnly" + , "loadResource" + , "maximumBlockCount" + , "mergeCurrentCharFormat" + , "moveCursor" + , "overwriteMode" + , "placeholderText" + , "setBackgroundVisible" + , "setCenterOnScroll" + , "setCurrentCharFormat" + , "setCursorWidth" + , "setDocument" + , "setExtraSelections" + , "setMaximumBlockCount" + , "setOverwriteMode" + , "setPlaceholderText" + , "setReadOnly" + , "setTabStopWidth" + , "setTextCursor" + , "setTextInteractionFlags" + , "setWordWrapMode" + , "tabStopWidth" + , "textCursor" + , "textInteractionFlags" + , "toPlainText" + , "wordWrapMode" + , "toString" +}; + +static const char * const qtscript_QPlainTextEdit_function_signatures[] = { + "QWidget parent\nString text, QWidget parent" + // static + // prototype + , "QPoint pos" + , "" + , "" + , "" + , "" + , "\nQPoint position" + , "" + , "QPoint pos" + , "\nQTextCursor cursor" + , "" + , "" + , "" + , "" + , "QRegExp exp, FindFlags options\nString exp, FindFlags options" + , "" + , "int type, QUrl name" + , "" + , "QTextCharFormat modifier" + , "MoveOperation operation, MoveMode mode" + , "" + , "" + , "bool visible" + , "bool enabled" + , "QTextCharFormat format" + , "int width" + , "QTextDocument document" + , "List selections" + , "int maximum" + , "bool overwrite" + , "String placeholderText" + , "bool ro" + , "int width" + , "QTextCursor cursor" + , "TextInteractionFlags flags" + , "WrapMode policy" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QPlainTextEdit_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 2 + , 0 + , 2 + , 0 + , 1 + , 2 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPlainTextEdit_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPlainTextEdit::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPlainTextEdit*) +Q_DECLARE_METATYPE(QtScriptShell_QPlainTextEdit*) +Q_DECLARE_METATYPE(QPlainTextEdit::LineWrapMode) +Q_DECLARE_METATYPE(QMenu*) +Q_DECLARE_METATYPE(QTextCharFormat) +Q_DECLARE_METATYPE(QTextCursor) +Q_DECLARE_METATYPE(QTextDocument*) +Q_DECLARE_METATYPE(QTextEdit::ExtraSelection) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTextCursor::MoveOperation) +Q_DECLARE_METATYPE(QTextCursor::MoveMode) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTextOption::WrapMode) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractScrollArea*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QPlainTextEdit::LineWrapMode +// + +static const QPlainTextEdit::LineWrapMode qtscript_QPlainTextEdit_LineWrapMode_values[] = { + QPlainTextEdit::NoWrap + , QPlainTextEdit::WidgetWidth +}; + +static const char * const qtscript_QPlainTextEdit_LineWrapMode_keys[] = { + "NoWrap" + , "WidgetWidth" +}; + +static QString qtscript_QPlainTextEdit_LineWrapMode_toStringHelper(QPlainTextEdit::LineWrapMode value) +{ + if ((value >= QPlainTextEdit::NoWrap) && (value <= QPlainTextEdit::WidgetWidth)) + return qtscript_QPlainTextEdit_LineWrapMode_keys[static_cast(value)-static_cast(QPlainTextEdit::NoWrap)]; + return QString(); +} + +static QScriptValue qtscript_QPlainTextEdit_LineWrapMode_toScriptValue(QScriptEngine *engine, const QPlainTextEdit::LineWrapMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QPlainTextEdit")); + return clazz.property(qtscript_QPlainTextEdit_LineWrapMode_toStringHelper(value)); +} + +static void qtscript_QPlainTextEdit_LineWrapMode_fromScriptValue(const QScriptValue &value, QPlainTextEdit::LineWrapMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QPlainTextEdit_LineWrapMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QPlainTextEdit::NoWrap) && (arg <= QPlainTextEdit::WidgetWidth)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("LineWrapMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QPlainTextEdit_LineWrapMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QPlainTextEdit::LineWrapMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QPlainTextEdit_LineWrapMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QPlainTextEdit::LineWrapMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QPlainTextEdit_LineWrapMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QPlainTextEdit_LineWrapMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QPlainTextEdit_LineWrapMode, + qtscript_QPlainTextEdit_LineWrapMode_valueOf, qtscript_QPlainTextEdit_LineWrapMode_toString); + qScriptRegisterMetaType(engine, qtscript_QPlainTextEdit_LineWrapMode_toScriptValue, + qtscript_QPlainTextEdit_LineWrapMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QPlainTextEdit_LineWrapMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QPlainTextEdit_LineWrapMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QPlainTextEdit +// + +static QScriptValue qtscript_QPlainTextEdit_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 40; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPlainTextEdit* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPlainTextEdit.%0(): this object is not a QPlainTextEdit") + .arg(qtscript_QPlainTextEdit_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->anchorAt(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->backgroundVisible(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->blockCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->canPaste(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->centerOnScroll(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QMenu* _q_result = _q_self->createStandardContextMenu(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMenu* _q_result = _q_self->createStandardContextMenu(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QTextCharFormat _q_result = _q_self->currentCharFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCursor _q_result = _q_self->cursorForPosition(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->cursorRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QTextCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->cursorRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->cursorWidth(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QTextDocument* _q_result = _q_self->document(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + _q_self->ensureCursorVisible(); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->extraSelections(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + if (context->argument(0).isRegExp()) { + QRegExp _q_arg0 = context->argument(0).toRegExp(); + bool _q_result = _q_self->find(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->find(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (context->argument(0).isRegExp() + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QRegExp _q_arg0 = context->argument(0).toRegExp(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + bool _q_result = _q_self->find(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + bool _q_result = _q_self->find(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 14: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isReadOnly(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QUrl _q_arg1 = qscriptvalue_cast(context->argument(1)); + QVariant _q_result = _q_self->loadResource(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + int _q_result = _q_self->maximumBlockCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QTextCharFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->mergeCurrentCharFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QTextCursor::MoveOperation _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveCursor(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QTextCursor::MoveOperation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCursor::MoveMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->moveCursor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->overwriteMode(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->placeholderText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setBackgroundVisible(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setCenterOnScroll(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QTextCharFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCurrentCharFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setCursorWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 1) { + QTextDocument* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDocument(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setExtraSelections(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setMaximumBlockCount(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setOverwriteMode(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPlaceholderText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setReadOnly(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setTabStopWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + QTextCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTextCursor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setTextInteractionFlags(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 1) { + QTextOption::WrapMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWordWrapMode(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 0) { + int _q_result = _q_self->tabStopWidth(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 36: + if (context->argumentCount() == 0) { + QTextCursor _q_result = _q_self->textCursor(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 37: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->textInteractionFlags(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 38: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toPlainText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 0) { + QTextOption::WrapMode _q_result = _q_self->wordWrapMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 40: { + QString result = QString::fromLatin1("QPlainTextEdit"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPlainTextEdit_throw_ambiguity_error_helper(context, + qtscript_QPlainTextEdit_function_names[_id+1], + qtscript_QPlainTextEdit_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPlainTextEdit_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPlainTextEdit(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPlainTextEdit* _q_cpp_result = new QtScriptShell_QPlainTextEdit(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPlainTextEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPlainTextEdit* _q_cpp_result = new QtScriptShell_QPlainTextEdit(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPlainTextEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QPlainTextEdit* _q_cpp_result = new QtScriptShell_QPlainTextEdit(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPlainTextEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QPlainTextEdit* _q_cpp_result = new QtScriptShell_QPlainTextEdit(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPlainTextEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPlainTextEdit_throw_ambiguity_error_helper(context, + qtscript_QPlainTextEdit_function_names[_id], + qtscript_QPlainTextEdit_function_signatures[_id]); +} + +static QScriptValue qtscript_QPlainTextEdit_toScriptValue(QScriptEngine *engine, QPlainTextEdit* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QPlainTextEdit_fromScriptValue(const QScriptValue &value, QPlainTextEdit* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QPlainTextEdit_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPlainTextEdit*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 41; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPlainTextEdit_prototype_call, qtscript_QPlainTextEdit_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPlainTextEdit_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QPlainTextEdit_toScriptValue, + qtscript_QPlainTextEdit_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPlainTextEdit_static_call, proto, qtscript_QPlainTextEdit_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("LineWrapMode"), + qtscript_create_QPlainTextEdit_LineWrapMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QProgressBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QProgressBar.cpp new file mode 100644 index 00000000..98a13a4a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QProgressBar.cpp @@ -0,0 +1,294 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QProgressBar.h" + +static const char * const qtscript_QProgressBar_function_names[] = { + "QProgressBar" + // static + // prototype + , "minimumSizeHint" + , "resetFormat" + , "sizeHint" + , "toString" +}; + +static const char * const qtscript_QProgressBar_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "" + , "" + , "" +"" +}; + +static const int qtscript_QProgressBar_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QProgressBar_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QProgressBar::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QProgressBar*) +Q_DECLARE_METATYPE(QtScriptShell_QProgressBar*) +Q_DECLARE_METATYPE(QProgressBar::Direction) +Q_DECLARE_METATYPE(QWidget*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QProgressBar::Direction +// + +static const QProgressBar::Direction qtscript_QProgressBar_Direction_values[] = { + QProgressBar::TopToBottom + , QProgressBar::BottomToTop +}; + +static const char * const qtscript_QProgressBar_Direction_keys[] = { + "TopToBottom" + , "BottomToTop" +}; + +static QString qtscript_QProgressBar_Direction_toStringHelper(QProgressBar::Direction value) +{ + if ((value >= QProgressBar::TopToBottom) && (value <= QProgressBar::BottomToTop)) + return qtscript_QProgressBar_Direction_keys[static_cast(value)-static_cast(QProgressBar::TopToBottom)]; + return QString(); +} + +static QScriptValue qtscript_QProgressBar_Direction_toScriptValue(QScriptEngine *engine, const QProgressBar::Direction &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QProgressBar")); + return clazz.property(qtscript_QProgressBar_Direction_toStringHelper(value)); +} + +static void qtscript_QProgressBar_Direction_fromScriptValue(const QScriptValue &value, QProgressBar::Direction &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QProgressBar_Direction(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QProgressBar::TopToBottom) && (arg <= QProgressBar::BottomToTop)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Direction(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QProgressBar_Direction_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QProgressBar::Direction value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QProgressBar_Direction_toString(QScriptContext *context, QScriptEngine *engine) +{ + QProgressBar::Direction value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QProgressBar_Direction_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QProgressBar_Direction_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QProgressBar_Direction, + qtscript_QProgressBar_Direction_valueOf, qtscript_QProgressBar_Direction_toString); + qScriptRegisterMetaType(engine, qtscript_QProgressBar_Direction_toScriptValue, + qtscript_QProgressBar_Direction_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QProgressBar_Direction_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QProgressBar_Direction_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QProgressBar +// + +static QScriptValue qtscript_QProgressBar_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QProgressBar* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QProgressBar.%0(): this object is not a QProgressBar") + .arg(qtscript_QProgressBar_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->resetFormat(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: { + QString result = QString::fromLatin1("QProgressBar"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QProgressBar_throw_ambiguity_error_helper(context, + qtscript_QProgressBar_function_names[_id+1], + qtscript_QProgressBar_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QProgressBar_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QProgressBar(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QProgressBar* _q_cpp_result = new QtScriptShell_QProgressBar(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QProgressBar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QProgressBar* _q_cpp_result = new QtScriptShell_QProgressBar(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QProgressBar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QProgressBar_throw_ambiguity_error_helper(context, + qtscript_QProgressBar_function_names[_id], + qtscript_QProgressBar_function_signatures[_id]); +} + +static QScriptValue qtscript_QProgressBar_toScriptValue(QScriptEngine *engine, QProgressBar* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QProgressBar_fromScriptValue(const QScriptValue &value, QProgressBar* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QProgressBar_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QProgressBar*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QProgressBar_prototype_call, qtscript_QProgressBar_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QProgressBar_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QProgressBar_toScriptValue, + qtscript_QProgressBar_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QProgressBar_static_call, proto, qtscript_QProgressBar_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Direction"), + qtscript_create_QProgressBar_Direction_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QProgressDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QProgressDialog.cpp new file mode 100644 index 00000000..e1e764d5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QProgressDialog.cpp @@ -0,0 +1,270 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QProgressDialog.h" + +static const char * const qtscript_QProgressDialog_function_names[] = { + "QProgressDialog" + // static + // prototype + , "open" + , "setBar" + , "setCancelButton" + , "setLabel" + , "toString" +}; + +static const char * const qtscript_QProgressDialog_function_signatures[] = { + "QWidget parent, WindowFlags flags\nString labelText, String cancelButtonText, int minimum, int maximum, QWidget parent, WindowFlags flags" + // static + // prototype + , "QObject receiver, char member" + , "QProgressBar bar" + , "QPushButton button" + , "QLabel label" +"" +}; + +static const int qtscript_QProgressDialog_function_lengths[] = { + 6 + // static + // prototype + , 2 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QProgressDialog_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QProgressDialog::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QProgressDialog*) +Q_DECLARE_METATYPE(QtScriptShell_QProgressDialog*) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(QProgressBar*) +Q_DECLARE_METATYPE(QPushButton*) +Q_DECLARE_METATYPE(QLabel*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QDialog*) + +// +// QProgressDialog +// + +static QScriptValue qtscript_QProgressDialog_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QProgressDialog* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QProgressDialog.%0(): this object is not a QProgressDialog") + .arg(qtscript_QProgressDialog_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + const char* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->open(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QProgressBar* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBar(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QPushButton* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCancelButton(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QLabel* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLabel(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: { + QString result = QString::fromLatin1("QProgressDialog"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QProgressDialog_throw_ambiguity_error_helper(context, + qtscript_QProgressDialog_function_names[_id+1], + qtscript_QProgressDialog_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QProgressDialog_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QProgressDialog(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QProgressDialog* _q_cpp_result = new QtScriptShell_QProgressDialog(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QProgressDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QProgressDialog* _q_cpp_result = new QtScriptShell_QProgressDialog(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QProgressDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QProgressDialog* _q_cpp_result = new QtScriptShell_QProgressDialog(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QProgressDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 4) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QtScriptShell_QProgressDialog* _q_cpp_result = new QtScriptShell_QProgressDialog(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QProgressDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 5) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QWidget* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QtScriptShell_QProgressDialog* _q_cpp_result = new QtScriptShell_QProgressDialog(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QProgressDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 6) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QWidget* _q_arg4 = qscriptvalue_cast(context->argument(4)); + QFlags _q_arg5 = qscriptvalue_cast >(context->argument(5)); + QtScriptShell_QProgressDialog* _q_cpp_result = new QtScriptShell_QProgressDialog(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QProgressDialog*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QProgressDialog_throw_ambiguity_error_helper(context, + qtscript_QProgressDialog_function_names[_id], + qtscript_QProgressDialog_function_signatures[_id]); +} + +static QScriptValue qtscript_QProgressDialog_toScriptValue(QScriptEngine *engine, QProgressDialog* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QProgressDialog_fromScriptValue(const QScriptValue &value, QProgressDialog* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QProgressDialog_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QProgressDialog*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QProgressDialog_prototype_call, qtscript_QProgressDialog_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QProgressDialog_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QProgressDialog_toScriptValue, + qtscript_QProgressDialog_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QProgressDialog_static_call, proto, qtscript_QProgressDialog_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPushButton.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPushButton.cpp new file mode 100644 index 00000000..3a8497f5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QPushButton.cpp @@ -0,0 +1,259 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QPushButton.h" + +static const char * const qtscript_QPushButton_function_names[] = { + "QPushButton" + // static + // prototype + , "menu" + , "minimumSizeHint" + , "setMenu" + , "sizeHint" + , "toString" +}; + +static const char * const qtscript_QPushButton_function_signatures[] = { + "QWidget parent\nQIcon icon, String text, QWidget parent\nString text, QWidget parent" + // static + // prototype + , "" + , "" + , "QMenu menu" + , "" +"" +}; + +static const int qtscript_QPushButton_function_lengths[] = { + 3 + // static + // prototype + , 0 + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QPushButton_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QPushButton::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QPushButton*) +Q_DECLARE_METATYPE(QtScriptShell_QPushButton*) +Q_DECLARE_METATYPE(QMenu*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractButton*) + +// +// QPushButton +// + +static QScriptValue qtscript_QPushButton_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QPushButton* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QPushButton.%0(): this object is not a QPushButton") + .arg(qtscript_QPushButton_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QMenu* _q_result = _q_self->menu(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QMenu* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMenu(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QPushButton"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QPushButton_throw_ambiguity_error_helper(context, + qtscript_QPushButton_function_names[_id+1], + qtscript_QPushButton_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QPushButton_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QPushButton(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QPushButton* _q_cpp_result = new QtScriptShell_QPushButton(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPushButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QPushButton* _q_cpp_result = new QtScriptShell_QPushButton(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPushButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QPushButton* _q_cpp_result = new QtScriptShell_QPushButton(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPushButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QtScriptShell_QPushButton* _q_cpp_result = new QtScriptShell_QPushButton(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPushButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1))) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QPushButton* _q_cpp_result = new QtScriptShell_QPushButton(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPushButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QPushButton* _q_cpp_result = new QtScriptShell_QPushButton(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QPushButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QPushButton_throw_ambiguity_error_helper(context, + qtscript_QPushButton_function_names[_id], + qtscript_QPushButton_function_signatures[_id]); +} + +static QScriptValue qtscript_QPushButton_toScriptValue(QScriptEngine *engine, QPushButton* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QPushButton_fromScriptValue(const QScriptValue &value, QPushButton* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QPushButton_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QPushButton*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QPushButton_prototype_call, qtscript_QPushButton_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QPushButton_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QPushButton_toScriptValue, + qtscript_QPushButton_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QPushButton_static_call, proto, qtscript_QPushButton_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QRadioButton.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QRadioButton.cpp new file mode 100644 index 00000000..b0f3f985 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QRadioButton.cpp @@ -0,0 +1,217 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QRadioButton.h" + +static const char * const qtscript_QRadioButton_function_names[] = { + "QRadioButton" + // static + // prototype + , "minimumSizeHint" + , "sizeHint" + , "toString" +}; + +static const char * const qtscript_QRadioButton_function_signatures[] = { + "QWidget parent\nString text, QWidget parent" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QRadioButton_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QRadioButton_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QRadioButton::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QRadioButton*) +Q_DECLARE_METATYPE(QtScriptShell_QRadioButton*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractButton*) + +// +// QRadioButton +// + +static QScriptValue qtscript_QRadioButton_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QRadioButton* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QRadioButton.%0(): this object is not a QRadioButton") + .arg(qtscript_QRadioButton_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QRadioButton"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QRadioButton_throw_ambiguity_error_helper(context, + qtscript_QRadioButton_function_names[_id+1], + qtscript_QRadioButton_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QRadioButton_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QRadioButton(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QRadioButton* _q_cpp_result = new QtScriptShell_QRadioButton(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QRadioButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QRadioButton* _q_cpp_result = new QtScriptShell_QRadioButton(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QRadioButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QRadioButton* _q_cpp_result = new QtScriptShell_QRadioButton(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QRadioButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QRadioButton* _q_cpp_result = new QtScriptShell_QRadioButton(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QRadioButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QRadioButton_throw_ambiguity_error_helper(context, + qtscript_QRadioButton_function_names[_id], + qtscript_QRadioButton_function_signatures[_id]); +} + +static QScriptValue qtscript_QRadioButton_toScriptValue(QScriptEngine *engine, QRadioButton* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QRadioButton_fromScriptValue(const QScriptValue &value, QRadioButton* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QRadioButton_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QRadioButton*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QRadioButton_prototype_call, qtscript_QRadioButton_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QRadioButton_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QRadioButton_toScriptValue, + qtscript_QRadioButton_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QRadioButton_static_call, proto, qtscript_QRadioButton_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QRubberBand.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QRubberBand.cpp new file mode 100644 index 00000000..1858b9e8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QRubberBand.cpp @@ -0,0 +1,328 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QRubberBand.h" + +static const char * const qtscript_QRubberBand_function_names[] = { + "QRubberBand" + // static + // prototype + , "moveRubberBand" + , "resizeRubberBand" + , "setRubberBandGeometry" + , "shape" + , "toString" +}; + +static const char * const qtscript_QRubberBand_function_signatures[] = { + "Shape arg__1, QWidget arg__2" + // static + // prototype + , "QPoint p\nint x, int y" + , "QSize s\nint w, int h" + , "QRect r\nint x, int y, int w, int h" + , "" +"" +}; + +static const int qtscript_QRubberBand_function_lengths[] = { + 2 + // static + // prototype + , 2 + , 2 + , 4 + , 0 + , 0 +}; + +static QScriptValue qtscript_QRubberBand_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QRubberBand::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QRubberBand*) +Q_DECLARE_METATYPE(QtScriptShell_QRubberBand*) +Q_DECLARE_METATYPE(QRubberBand::Shape) +Q_DECLARE_METATYPE(QWidget*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QRubberBand::Shape +// + +static const QRubberBand::Shape qtscript_QRubberBand_Shape_values[] = { + QRubberBand::Line + , QRubberBand::Rectangle +}; + +static const char * const qtscript_QRubberBand_Shape_keys[] = { + "Line" + , "Rectangle" +}; + +static QString qtscript_QRubberBand_Shape_toStringHelper(QRubberBand::Shape value) +{ + if ((value >= QRubberBand::Line) && (value <= QRubberBand::Rectangle)) + return qtscript_QRubberBand_Shape_keys[static_cast(value)-static_cast(QRubberBand::Line)]; + return QString(); +} + +static QScriptValue qtscript_QRubberBand_Shape_toScriptValue(QScriptEngine *engine, const QRubberBand::Shape &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QRubberBand")); + return clazz.property(qtscript_QRubberBand_Shape_toStringHelper(value)); +} + +static void qtscript_QRubberBand_Shape_fromScriptValue(const QScriptValue &value, QRubberBand::Shape &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QRubberBand_Shape(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QRubberBand::Line) && (arg <= QRubberBand::Rectangle)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Shape(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QRubberBand_Shape_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QRubberBand::Shape value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QRubberBand_Shape_toString(QScriptContext *context, QScriptEngine *engine) +{ + QRubberBand::Shape value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QRubberBand_Shape_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QRubberBand_Shape_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QRubberBand_Shape, + qtscript_QRubberBand_Shape_valueOf, qtscript_QRubberBand_Shape_toString); + qScriptRegisterMetaType(engine, qtscript_QRubberBand_Shape_toScriptValue, + qtscript_QRubberBand_Shape_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QRubberBand_Shape_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QRubberBand_Shape_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QRubberBand +// + +static QScriptValue qtscript_QRubberBand_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QRubberBand* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QRubberBand.%0(): this object is not a QRubberBand") + .arg(qtscript_QRubberBand_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->move(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->move(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->resize(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->resize(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setGeometry(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setGeometry(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QRubberBand::Shape _q_result = _q_self->shape(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QRubberBand"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QRubberBand_throw_ambiguity_error_helper(context, + qtscript_QRubberBand_function_names[_id+1], + qtscript_QRubberBand_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QRubberBand_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QRubberBand(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QRubberBand::Shape _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QRubberBand* _q_cpp_result = new QtScriptShell_QRubberBand(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QRubberBand*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QRubberBand::Shape _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QRubberBand* _q_cpp_result = new QtScriptShell_QRubberBand(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QRubberBand*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QRubberBand_throw_ambiguity_error_helper(context, + qtscript_QRubberBand_function_names[_id], + qtscript_QRubberBand_function_signatures[_id]); +} + +static QScriptValue qtscript_QRubberBand_toScriptValue(QScriptEngine *engine, QRubberBand* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QRubberBand_fromScriptValue(const QScriptValue &value, QRubberBand* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QRubberBand_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QRubberBand*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QRubberBand_prototype_call, qtscript_QRubberBand_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QRubberBand_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QRubberBand_toScriptValue, + qtscript_QRubberBand_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QRubberBand_static_call, proto, qtscript_QRubberBand_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("Shape"), + qtscript_create_QRubberBand_Shape_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QScrollArea.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QScrollArea.cpp new file mode 100644 index 00000000..e45b28bd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QScrollArea.cpp @@ -0,0 +1,264 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QScrollArea.h" + +static const char * const qtscript_QScrollArea_function_names[] = { + "QScrollArea" + // static + // prototype + , "ensureVisible" + , "ensureWidgetVisible" + , "setWidget" + , "takeWidget" + , "widget" + , "toString" +}; + +static const char * const qtscript_QScrollArea_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "int x, int y, int xmargin, int ymargin" + , "QWidget childWidget, int xmargin, int ymargin" + , "QWidget widget" + , "" + , "" +"" +}; + +static const int qtscript_QScrollArea_function_lengths[] = { + 1 + // static + // prototype + , 4 + , 3 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QScrollArea_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QScrollArea::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QScrollArea*) +Q_DECLARE_METATYPE(QtScriptShell_QScrollArea*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractScrollArea*) + +// +// QScrollArea +// + +static QScriptValue qtscript_QScrollArea_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QScrollArea* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QScrollArea.%0(): this object is not a QScrollArea") + .arg(qtscript_QScrollArea_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->ensureVisible(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->ensureVisible(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->ensureVisible(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->ensureWidgetVisible(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->ensureWidgetVisible(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->ensureWidgetVisible(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->takeWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->widget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: { + QString result = QString::fromLatin1("QScrollArea"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QScrollArea_throw_ambiguity_error_helper(context, + qtscript_QScrollArea_function_names[_id+1], + qtscript_QScrollArea_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QScrollArea_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QScrollArea(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QScrollArea* _q_cpp_result = new QtScriptShell_QScrollArea(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QScrollArea*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QScrollArea* _q_cpp_result = new QtScriptShell_QScrollArea(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QScrollArea*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QScrollArea_throw_ambiguity_error_helper(context, + qtscript_QScrollArea_function_names[_id], + qtscript_QScrollArea_function_signatures[_id]); +} + +static QScriptValue qtscript_QScrollArea_toScriptValue(QScriptEngine *engine, QScrollArea* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QScrollArea_fromScriptValue(const QScriptValue &value, QScrollArea* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QScrollArea_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QScrollArea*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QScrollArea_prototype_call, qtscript_QScrollArea_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QScrollArea_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QScrollArea_toScriptValue, + qtscript_QScrollArea_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QScrollArea_static_call, proto, qtscript_QScrollArea_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QScrollBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QScrollBar.cpp new file mode 100644 index 00000000..b941010e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QScrollBar.cpp @@ -0,0 +1,207 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QScrollBar.h" + +static const char * const qtscript_QScrollBar_function_names[] = { + "QScrollBar" + // static + // prototype + , "sizeHint" + , "toString" +}; + +static const char * const qtscript_QScrollBar_function_signatures[] = { + "QWidget parent\nOrientation arg__1, QWidget parent" + // static + // prototype + , "" +"" +}; + +static const int qtscript_QScrollBar_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 +}; + +static QScriptValue qtscript_QScrollBar_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QScrollBar::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QScrollBar*) +Q_DECLARE_METATYPE(QtScriptShell_QScrollBar*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(QAbstractSlider*) + +// +// QScrollBar +// + +static QScriptValue qtscript_QScrollBar_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QScrollBar* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QScrollBar.%0(): this object is not a QScrollBar") + .arg(qtscript_QScrollBar_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("QScrollBar"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QScrollBar_throw_ambiguity_error_helper(context, + qtscript_QScrollBar_function_names[_id+1], + qtscript_QScrollBar_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QScrollBar_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QScrollBar(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QScrollBar* _q_cpp_result = new QtScriptShell_QScrollBar(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QScrollBar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QScrollBar* _q_cpp_result = new QtScriptShell_QScrollBar(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QScrollBar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QScrollBar* _q_cpp_result = new QtScriptShell_QScrollBar(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QScrollBar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QScrollBar* _q_cpp_result = new QtScriptShell_QScrollBar(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QScrollBar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QScrollBar_throw_ambiguity_error_helper(context, + qtscript_QScrollBar_function_names[_id], + qtscript_QScrollBar_function_signatures[_id]); +} + +static QScriptValue qtscript_QScrollBar_toScriptValue(QScriptEngine *engine, QScrollBar* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QScrollBar_fromScriptValue(const QScriptValue &value, QScrollBar* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QScrollBar_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QScrollBar*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QScrollBar_prototype_call, qtscript_QScrollBar_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QScrollBar_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QScrollBar_toScriptValue, + qtscript_QScrollBar_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QScrollBar_static_call, proto, qtscript_QScrollBar_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSessionManager.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSessionManager.cpp new file mode 100644 index 00000000..889a8757 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSessionManager.cpp @@ -0,0 +1,393 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QSessionManager_function_names[] = { + "QSessionManager" + // static + // prototype + , "allowsErrorInteraction" + , "allowsInteraction" + , "cancel" + , "discardCommand" + , "isPhase2" + , "release" + , "requestPhase2" + , "restartCommand" + , "restartHint" + , "sessionId" + , "sessionKey" + , "setDiscardCommand" + , "setManagerProperty" + , "setRestartCommand" + , "setRestartHint" + , "toString" +}; + +static const char * const qtscript_QSessionManager_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "List arg__1" + , "String name, String value\nString name, List value" + , "List arg__1" + , "RestartHint arg__1" +"" +}; + +static const int qtscript_QSessionManager_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 2 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QSessionManager_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSessionManager::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSessionManager*) +Q_DECLARE_METATYPE(QSessionManager::RestartHint) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QSessionManager::RestartHint +// + +static const QSessionManager::RestartHint qtscript_QSessionManager_RestartHint_values[] = { + QSessionManager::RestartIfRunning + , QSessionManager::RestartAnyway + , QSessionManager::RestartImmediately + , QSessionManager::RestartNever +}; + +static const char * const qtscript_QSessionManager_RestartHint_keys[] = { + "RestartIfRunning" + , "RestartAnyway" + , "RestartImmediately" + , "RestartNever" +}; + +static QString qtscript_QSessionManager_RestartHint_toStringHelper(QSessionManager::RestartHint value) +{ + if ((value >= QSessionManager::RestartIfRunning) && (value <= QSessionManager::RestartNever)) + return qtscript_QSessionManager_RestartHint_keys[static_cast(value)-static_cast(QSessionManager::RestartIfRunning)]; + return QString(); +} + +static QScriptValue qtscript_QSessionManager_RestartHint_toScriptValue(QScriptEngine *engine, const QSessionManager::RestartHint &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSessionManager")); + return clazz.property(qtscript_QSessionManager_RestartHint_toStringHelper(value)); +} + +static void qtscript_QSessionManager_RestartHint_fromScriptValue(const QScriptValue &value, QSessionManager::RestartHint &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSessionManager_RestartHint(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSessionManager::RestartIfRunning) && (arg <= QSessionManager::RestartNever)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("RestartHint(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSessionManager_RestartHint_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSessionManager::RestartHint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSessionManager_RestartHint_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSessionManager::RestartHint value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSessionManager_RestartHint_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSessionManager_RestartHint_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSessionManager_RestartHint, + qtscript_QSessionManager_RestartHint_valueOf, qtscript_QSessionManager_RestartHint_toString); + qScriptRegisterMetaType(engine, qtscript_QSessionManager_RestartHint_toScriptValue, + qtscript_QSessionManager_RestartHint_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSessionManager_RestartHint_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSessionManager_RestartHint_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSessionManager +// + +static QScriptValue qtscript_QSessionManager_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 15; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSessionManager* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSessionManager.%0(): this object is not a QSessionManager") + .arg(qtscript_QSessionManager_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->allowsErrorInteraction(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->allowsInteraction(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->cancel(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->discardCommand(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isPhase2(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + _q_self->release(); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 0) { + _q_self->requestPhase2(); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->restartCommand(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QSessionManager::RestartHint _q_result = _q_self->restartHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->sessionId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->sessionKey(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setDiscardCommand(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setManagerProperty(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && context->argument(1).isArray()) { + QString _q_arg0 = context->argument(0).toString(); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + _q_self->setManagerProperty(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + break; + + case 13: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setRestartCommand(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QSessionManager::RestartHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setRestartHint(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: { + QString result = QString::fromLatin1("QSessionManager"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSessionManager_throw_ambiguity_error_helper(context, + qtscript_QSessionManager_function_names[_id+1], + qtscript_QSessionManager_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSessionManager_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSessionManager cannot be constructed")); + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSessionManager_throw_ambiguity_error_helper(context, + qtscript_QSessionManager_function_names[_id], + qtscript_QSessionManager_function_signatures[_id]); +} + +static QScriptValue qtscript_QSessionManager_toScriptValue(QScriptEngine *engine, QSessionManager* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSessionManager_fromScriptValue(const QScriptValue &value, QSessionManager* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSessionManager_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSessionManager*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 16; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSessionManager_prototype_call, qtscript_QSessionManager_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSessionManager_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSessionManager_toScriptValue, + qtscript_QSessionManager_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSessionManager_static_call, proto, qtscript_QSessionManager_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("RestartHint"), + qtscript_create_QSessionManager_RestartHint_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QShortcut.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QShortcut.cpp new file mode 100644 index 00000000..69ad97fe --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QShortcut.cpp @@ -0,0 +1,183 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QShortcut.h" + +static const char * const qtscript_QShortcut_function_names[] = { + "QShortcut" + // static + // prototype + , "id" + , "parentWidget" + , "toString" +}; + +static const char * const qtscript_QShortcut_function_signatures[] = { + "QWidget parent\nQKeySequence key, QWidget parent, char member, char ambiguousMember, ShortcutContext context" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QShortcut_function_lengths[] = { + 5 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QShortcut_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QShortcut::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QShortcut*) +Q_DECLARE_METATYPE(QtScriptShell_QShortcut*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(const char*) +Q_DECLARE_METATYPE(Qt::ShortcutContext) + +// +// QShortcut +// + +static QScriptValue qtscript_QShortcut_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QShortcut* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QShortcut.%0(): this object is not a QShortcut") + .arg(qtscript_QShortcut_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->id(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->parentWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QShortcut"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QShortcut_throw_ambiguity_error_helper(context, + qtscript_QShortcut_function_names[_id+1], + qtscript_QShortcut_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QShortcut_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QShortcut(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QShortcut* _q_cpp_result = new QtScriptShell_QShortcut(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QShortcut*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 5) { + QKeySequence _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + const char* _q_arg2 = qscriptvalue_cast(context->argument(2)); + const char* _q_arg3 = qscriptvalue_cast(context->argument(3)); + Qt::ShortcutContext _q_arg4 = qscriptvalue_cast(context->argument(4)); + QtScriptShell_QShortcut* _q_cpp_result = new QtScriptShell_QShortcut(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QShortcut*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QShortcut_throw_ambiguity_error_helper(context, + qtscript_QShortcut_function_names[_id], + qtscript_QShortcut_function_signatures[_id]); +} + +static QScriptValue qtscript_QShortcut_toScriptValue(QScriptEngine *engine, QShortcut* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QShortcut_fromScriptValue(const QScriptValue &value, QShortcut* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QShortcut_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QShortcut*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QShortcut_prototype_call, qtscript_QShortcut_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QShortcut_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QShortcut_toScriptValue, + qtscript_QShortcut_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QShortcut_static_call, proto, qtscript_QShortcut_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSizeGrip.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSizeGrip.cpp new file mode 100644 index 00000000..a4861805 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSizeGrip.cpp @@ -0,0 +1,195 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSizeGrip.h" + +static const char * const qtscript_QSizeGrip_function_names[] = { + "QSizeGrip" + // static + // prototype + , "setVisible" + , "sizeHint" + , "toString" +}; + +static const char * const qtscript_QSizeGrip_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "bool arg__1" + , "" +"" +}; + +static const int qtscript_QSizeGrip_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QSizeGrip_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSizeGrip::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSizeGrip*) +Q_DECLARE_METATYPE(QtScriptShell_QSizeGrip*) +Q_DECLARE_METATYPE(QWidget*) + +// +// QSizeGrip +// + +static QScriptValue qtscript_QSizeGrip_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSizeGrip* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSizeGrip.%0(): this object is not a QSizeGrip") + .arg(qtscript_QSizeGrip_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setVisible(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QSizeGrip"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSizeGrip_throw_ambiguity_error_helper(context, + qtscript_QSizeGrip_function_names[_id+1], + qtscript_QSizeGrip_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSizeGrip_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSizeGrip(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QSizeGrip* _q_cpp_result = new QtScriptShell_QSizeGrip(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSizeGrip*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSizeGrip_throw_ambiguity_error_helper(context, + qtscript_QSizeGrip_function_names[_id], + qtscript_QSizeGrip_function_signatures[_id]); +} + +static QScriptValue qtscript_QSizeGrip_toScriptValue(QScriptEngine *engine, QSizeGrip* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSizeGrip_fromScriptValue(const QScriptValue &value, QSizeGrip* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSizeGrip_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSizeGrip*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSizeGrip_prototype_call, qtscript_QSizeGrip_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSizeGrip_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSizeGrip_toScriptValue, + qtscript_QSizeGrip_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSizeGrip_static_call, proto, qtscript_QSizeGrip_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSizePolicy.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSizePolicy.cpp new file mode 100644 index 00000000..8a35be65 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSizePolicy.cpp @@ -0,0 +1,521 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QSizePolicy_function_names[] = { + "QSizePolicy" + // static + // prototype + , "controlType" + , "expandingDirections" + , "hasHeightForWidth" + , "hasWidthForHeight" + , "horizontalPolicy" + , "horizontalStretch" + , "equals" + , "retainSizeWhenHidden" + , "setControlType" + , "setHeightForWidth" + , "setHorizontalPolicy" + , "setHorizontalStretch" + , "setRetainSizeWhenHidden" + , "setVerticalPolicy" + , "setVerticalStretch" + , "setWidthForHeight" + , "transpose" + , "verticalPolicy" + , "verticalStretch" + , "toString" +}; + +static const char * const qtscript_QSizePolicy_function_signatures[] = { + "\nPolicy horizontal, Policy vertical, ControlType type" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" + , "QSizePolicy s" + , "" + , "ControlType type" + , "bool b" + , "Policy d" + , "int stretchFactor" + , "bool retainSize" + , "Policy d" + , "int stretchFactor" + , "bool b" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QSizePolicy_function_lengths[] = { + 3 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QSizePolicy_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSizePolicy::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSizePolicy*) +Q_DECLARE_METATYPE(QSizePolicy::PolicyFlag) +Q_DECLARE_METATYPE(QSizePolicy::Policy) +Q_DECLARE_METATYPE(QSizePolicy::ControlType) +Q_DECLARE_METATYPE(QFlags) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QSizePolicy::PolicyFlag +// + +static const QSizePolicy::PolicyFlag qtscript_QSizePolicy_PolicyFlag_values[] = { + QSizePolicy::GrowFlag + , QSizePolicy::ExpandFlag + , QSizePolicy::ShrinkFlag + , QSizePolicy::IgnoreFlag +}; + +static const char * const qtscript_QSizePolicy_PolicyFlag_keys[] = { + "GrowFlag" + , "ExpandFlag" + , "ShrinkFlag" + , "IgnoreFlag" +}; + +static QString qtscript_QSizePolicy_PolicyFlag_toStringHelper(QSizePolicy::PolicyFlag value) +{ + for (int i = 0; i < 4; ++i) { + if (qtscript_QSizePolicy_PolicyFlag_values[i] == value) + return QString::fromLatin1(qtscript_QSizePolicy_PolicyFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QSizePolicy_PolicyFlag_toScriptValue(QScriptEngine *engine, const QSizePolicy::PolicyFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSizePolicy")); + return clazz.property(qtscript_QSizePolicy_PolicyFlag_toStringHelper(value)); +} + +static void qtscript_QSizePolicy_PolicyFlag_fromScriptValue(const QScriptValue &value, QSizePolicy::PolicyFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSizePolicy_PolicyFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 4; ++i) { + if (qtscript_QSizePolicy_PolicyFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("PolicyFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSizePolicy_PolicyFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSizePolicy::PolicyFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSizePolicy_PolicyFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSizePolicy::PolicyFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSizePolicy_PolicyFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSizePolicy_PolicyFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSizePolicy_PolicyFlag, + qtscript_QSizePolicy_PolicyFlag_valueOf, qtscript_QSizePolicy_PolicyFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QSizePolicy_PolicyFlag_toScriptValue, + qtscript_QSizePolicy_PolicyFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSizePolicy_PolicyFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSizePolicy_PolicyFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSizePolicy::Policy +// + +static const QSizePolicy::Policy qtscript_QSizePolicy_Policy_values[] = { + QSizePolicy::Fixed + , QSizePolicy::Minimum + , QSizePolicy::MinimumExpanding + , QSizePolicy::Maximum + , QSizePolicy::Preferred + , QSizePolicy::Expanding + , QSizePolicy::Ignored +}; + +static const char * const qtscript_QSizePolicy_Policy_keys[] = { + "Fixed" + , "Minimum" + , "MinimumExpanding" + , "Maximum" + , "Preferred" + , "Expanding" + , "Ignored" +}; + +static QString qtscript_QSizePolicy_Policy_toStringHelper(QSizePolicy::Policy value) +{ + for (int i = 0; i < 7; ++i) { + if (qtscript_QSizePolicy_Policy_values[i] == value) + return QString::fromLatin1(qtscript_QSizePolicy_Policy_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QSizePolicy_Policy_toScriptValue(QScriptEngine *engine, const QSizePolicy::Policy &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSizePolicy")); + return clazz.property(qtscript_QSizePolicy_Policy_toStringHelper(value)); +} + +static void qtscript_QSizePolicy_Policy_fromScriptValue(const QScriptValue &value, QSizePolicy::Policy &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSizePolicy_Policy(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 7; ++i) { + if (qtscript_QSizePolicy_Policy_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("Policy(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSizePolicy_Policy_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSizePolicy::Policy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSizePolicy_Policy_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSizePolicy::Policy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSizePolicy_Policy_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSizePolicy_Policy_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSizePolicy_Policy, + qtscript_QSizePolicy_Policy_valueOf, qtscript_QSizePolicy_Policy_toString); + qScriptRegisterMetaType(engine, qtscript_QSizePolicy_Policy_toScriptValue, + qtscript_QSizePolicy_Policy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 7; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSizePolicy_Policy_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSizePolicy_Policy_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSizePolicy +// + +static QScriptValue qtscript_QSizePolicy_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 19; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSizePolicy* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSizePolicy.%0(): this object is not a QSizePolicy") + .arg(qtscript_QSizePolicy_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QSizePolicy::ControlType _q_result = _q_self->controlType(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->expandingDirections(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasHeightForWidth(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasWidthForHeight(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QSizePolicy::Policy _q_result = _q_self->horizontalPolicy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->horizontalStretch(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QSizePolicy _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->retainSizeWhenHidden(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QSizePolicy::ControlType _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setControlType(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setHeightForWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QSizePolicy::Policy _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setHorizontalPolicy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setHorizontalStretch(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setRetainSizeWhenHidden(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QSizePolicy::Policy _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setVerticalPolicy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setVerticalStretch(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setWidthForHeight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 0) { + _q_self->transpose(); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QSizePolicy::Policy _q_result = _q_self->verticalPolicy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + int _q_result = _q_self->verticalStretch(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSizePolicy_throw_ambiguity_error_helper(context, + qtscript_QSizePolicy_function_names[_id+1], + qtscript_QSizePolicy_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSizePolicy_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSizePolicy(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QSizePolicy _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QSizePolicy::Policy _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizePolicy::Policy _q_arg1 = qscriptvalue_cast(context->argument(1)); + QSizePolicy _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + QSizePolicy::Policy _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizePolicy::Policy _q_arg1 = qscriptvalue_cast(context->argument(1)); + QSizePolicy::ControlType _q_arg2 = qscriptvalue_cast(context->argument(2)); + QSizePolicy _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSizePolicy_throw_ambiguity_error_helper(context, + qtscript_QSizePolicy_function_names[_id], + qtscript_QSizePolicy_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSizePolicy_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSizePolicy*)0)); + for (int i = 0; i < 20; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSizePolicy_prototype_call, qtscript_QSizePolicy_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSizePolicy_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSizePolicy_static_call, proto, qtscript_QSizePolicy_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("PolicyFlag"), + qtscript_create_QSizePolicy_PolicyFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Policy"), + qtscript_create_QSizePolicy_Policy_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSlider.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSlider.cpp new file mode 100644 index 00000000..68bfc3b4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSlider.cpp @@ -0,0 +1,305 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSlider.h" + +static const char * const qtscript_QSlider_function_names[] = { + "QSlider" + // static + // prototype + , "minimumSizeHint" + , "sizeHint" + , "toString" +}; + +static const char * const qtscript_QSlider_function_signatures[] = { + "QWidget parent\nOrientation orientation, QWidget parent" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QSlider_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QSlider_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSlider::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSlider*) +Q_DECLARE_METATYPE(QtScriptShell_QSlider*) +Q_DECLARE_METATYPE(QSlider::TickPosition) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(QAbstractSlider*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QSlider::TickPosition +// + +static const QSlider::TickPosition qtscript_QSlider_TickPosition_values[] = { + QSlider::NoTicks + , QSlider::TicksAbove + , QSlider::TicksBelow + , QSlider::TicksBothSides +}; + +static const char * const qtscript_QSlider_TickPosition_keys[] = { + "NoTicks" + , "TicksAbove" + , "TicksBelow" + , "TicksBothSides" +}; + +static QString qtscript_QSlider_TickPosition_toStringHelper(QSlider::TickPosition value) +{ + if ((value >= QSlider::NoTicks) && (value <= QSlider::TicksBothSides)) + return qtscript_QSlider_TickPosition_keys[static_cast(value)-static_cast(QSlider::NoTicks)]; + return QString(); +} + +static QScriptValue qtscript_QSlider_TickPosition_toScriptValue(QScriptEngine *engine, const QSlider::TickPosition &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSlider")); + return clazz.property(qtscript_QSlider_TickPosition_toStringHelper(value)); +} + +static void qtscript_QSlider_TickPosition_fromScriptValue(const QScriptValue &value, QSlider::TickPosition &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSlider_TickPosition(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSlider::NoTicks) && (arg <= QSlider::TicksBothSides)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("TickPosition(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSlider_TickPosition_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSlider::TickPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSlider_TickPosition_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSlider::TickPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSlider_TickPosition_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSlider_TickPosition_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSlider_TickPosition, + qtscript_QSlider_TickPosition_valueOf, qtscript_QSlider_TickPosition_toString); + qScriptRegisterMetaType(engine, qtscript_QSlider_TickPosition_toScriptValue, + qtscript_QSlider_TickPosition_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSlider_TickPosition_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSlider_TickPosition_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSlider +// + +static QScriptValue qtscript_QSlider_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSlider* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSlider.%0(): this object is not a QSlider") + .arg(qtscript_QSlider_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QSlider"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSlider_throw_ambiguity_error_helper(context, + qtscript_QSlider_function_names[_id+1], + qtscript_QSlider_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSlider_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSlider(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSlider* _q_cpp_result = new QtScriptShell_QSlider(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSlider*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QSlider* _q_cpp_result = new QtScriptShell_QSlider(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSlider*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QSlider* _q_cpp_result = new QtScriptShell_QSlider(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSlider*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QSlider* _q_cpp_result = new QtScriptShell_QSlider(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSlider*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSlider_throw_ambiguity_error_helper(context, + qtscript_QSlider_function_names[_id], + qtscript_QSlider_function_signatures[_id]); +} + +static QScriptValue qtscript_QSlider_toScriptValue(QScriptEngine *engine, QSlider* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSlider_fromScriptValue(const QScriptValue &value, QSlider* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSlider_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSlider*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSlider_prototype_call, qtscript_QSlider_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSlider_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSlider_toScriptValue, + qtscript_QSlider_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSlider_static_call, proto, qtscript_QSlider_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("TickPosition"), + qtscript_create_QSlider_TickPosition_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSpacerItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSpacerItem.cpp new file mode 100644 index 00000000..e75e6cc8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSpacerItem.cpp @@ -0,0 +1,196 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSpacerItem.h" + +static const char * const qtscript_QSpacerItem_function_names[] = { + "QSpacerItem" + // static + // prototype + , "changeSize" + , "sizePolicy" + , "toString" +}; + +static const char * const qtscript_QSpacerItem_function_signatures[] = { + "int w, int h, Policy hData, Policy vData" + // static + // prototype + , "int w, int h, Policy hData, Policy vData" + , "" +"" +}; + +static const int qtscript_QSpacerItem_function_lengths[] = { + 4 + // static + // prototype + , 4 + , 0 + , 0 +}; + +static QScriptValue qtscript_QSpacerItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSpacerItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSpacerItem*) +Q_DECLARE_METATYPE(QtScriptShell_QSpacerItem*) +Q_DECLARE_METATYPE(QSizePolicy::Policy) +Q_DECLARE_METATYPE(QLayoutItem*) + +// +// QSpacerItem +// + +static QScriptValue qtscript_QSpacerItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSpacerItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSpacerItem.%0(): this object is not a QSpacerItem") + .arg(qtscript_QSpacerItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->changeSize(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QSizePolicy::Policy _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->changeSize(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QSizePolicy::Policy _q_arg2 = qscriptvalue_cast(context->argument(2)); + QSizePolicy::Policy _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->changeSize(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QSizePolicy _q_result = _q_self->sizePolicy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QSpacerItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSpacerItem_throw_ambiguity_error_helper(context, + qtscript_QSpacerItem_function_names[_id+1], + qtscript_QSpacerItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSpacerItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSpacerItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QSpacerItem* _q_cpp_result = new QtScriptShell_QSpacerItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QSpacerItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QSizePolicy::Policy _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QSpacerItem* _q_cpp_result = new QtScriptShell_QSpacerItem(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QSpacerItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QSizePolicy::Policy _q_arg2 = qscriptvalue_cast(context->argument(2)); + QSizePolicy::Policy _q_arg3 = qscriptvalue_cast(context->argument(3)); + QtScriptShell_QSpacerItem* _q_cpp_result = new QtScriptShell_QSpacerItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QSpacerItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSpacerItem_throw_ambiguity_error_helper(context, + qtscript_QSpacerItem_function_names[_id], + qtscript_QSpacerItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QSpacerItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSpacerItem*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSpacerItem_prototype_call, qtscript_QSpacerItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSpacerItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSpacerItem_static_call, proto, qtscript_QSpacerItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSpinBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSpinBox.cpp new file mode 100644 index 00000000..8ce439db --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSpinBox.cpp @@ -0,0 +1,194 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSpinBox.h" + +static const char * const qtscript_QSpinBox_function_names[] = { + "QSpinBox" + // static + // prototype + , "setRange" + , "toString" +}; + +static const char * const qtscript_QSpinBox_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "int min, int max" +"" +}; + +static const int qtscript_QSpinBox_function_lengths[] = { + 1 + // static + // prototype + , 2 + , 0 +}; + +static QScriptValue qtscript_QSpinBox_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSpinBox::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSpinBox*) +Q_DECLARE_METATYPE(QtScriptShell_QSpinBox*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractSpinBox*) + +// +// QSpinBox +// + +static QScriptValue qtscript_QSpinBox_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSpinBox* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSpinBox.%0(): this object is not a QSpinBox") + .arg(qtscript_QSpinBox_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setRange(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: { + QString result = QString::fromLatin1("QSpinBox"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSpinBox_throw_ambiguity_error_helper(context, + qtscript_QSpinBox_function_names[_id+1], + qtscript_QSpinBox_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSpinBox_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSpinBox(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSpinBox* _q_cpp_result = new QtScriptShell_QSpinBox(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSpinBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QSpinBox* _q_cpp_result = new QtScriptShell_QSpinBox(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSpinBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSpinBox_throw_ambiguity_error_helper(context, + qtscript_QSpinBox_function_names[_id], + qtscript_QSpinBox_function_signatures[_id]); +} + +static QScriptValue qtscript_QSpinBox_toScriptValue(QScriptEngine *engine, QSpinBox* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSpinBox_fromScriptValue(const QScriptValue &value, QSpinBox* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSpinBox_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSpinBox*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSpinBox_prototype_call, qtscript_QSpinBox_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSpinBox_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSpinBox_toScriptValue, + qtscript_QSpinBox_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSpinBox_static_call, proto, qtscript_QSpinBox_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSplashScreen.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSplashScreen.cpp new file mode 100644 index 00000000..635b5abd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSplashScreen.cpp @@ -0,0 +1,257 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSplashScreen.h" + +static const char * const qtscript_QSplashScreen_function_names[] = { + "QSplashScreen" + // static + // prototype + , "finish" + , "message" + , "pixmap" + , "setPixmap" + , "toString" +}; + +static const char * const qtscript_QSplashScreen_function_signatures[] = { + "QWidget parent, QPixmap pixmap, WindowFlags f\nQPixmap pixmap, WindowFlags f" + // static + // prototype + , "QWidget w" + , "" + , "" + , "QPixmap pixmap" +"" +}; + +static const int qtscript_QSplashScreen_function_lengths[] = { + 3 + // static + // prototype + , 1 + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QSplashScreen_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSplashScreen::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSplashScreen*) +Q_DECLARE_METATYPE(QtScriptShell_QSplashScreen*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFlags) + +// +// QSplashScreen +// + +static QScriptValue qtscript_QSplashScreen_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSplashScreen* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSplashScreen.%0(): this object is not a QSplashScreen") + .arg(qtscript_QSplashScreen_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->finish(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->message(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + const QPixmap _q_result = _q_self->pixmap(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setPixmap(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: { + QString result = QString::fromLatin1("QSplashScreen"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSplashScreen_throw_ambiguity_error_helper(context, + qtscript_QSplashScreen_function_names[_id+1], + qtscript_QSplashScreen_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSplashScreen_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSplashScreen(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSplashScreen* _q_cpp_result = new QtScriptShell_QSplashScreen(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSplashScreen*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QSplashScreen* _q_cpp_result = new QtScriptShell_QSplashScreen(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSplashScreen*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QSplashScreen* _q_cpp_result = new QtScriptShell_QSplashScreen(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSplashScreen*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QSplashScreen* _q_cpp_result = new QtScriptShell_QSplashScreen(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSplashScreen*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QSplashScreen* _q_cpp_result = new QtScriptShell_QSplashScreen(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSplashScreen*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + QtScriptShell_QSplashScreen* _q_cpp_result = new QtScriptShell_QSplashScreen(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSplashScreen*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSplashScreen_throw_ambiguity_error_helper(context, + qtscript_QSplashScreen_function_names[_id], + qtscript_QSplashScreen_function_signatures[_id]); +} + +static QScriptValue qtscript_QSplashScreen_toScriptValue(QScriptEngine *engine, QSplashScreen* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSplashScreen_fromScriptValue(const QScriptValue &value, QSplashScreen* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSplashScreen_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSplashScreen*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSplashScreen_prototype_call, qtscript_QSplashScreen_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSplashScreen_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSplashScreen_toScriptValue, + qtscript_QSplashScreen_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSplashScreen_static_call, proto, qtscript_QSplashScreen_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSplitter.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSplitter.cpp new file mode 100644 index 00000000..0aae59dd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSplitter.cpp @@ -0,0 +1,401 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSplitter.h" + +static const char * const qtscript_QSplitter_function_names[] = { + "QSplitter" + // static + // prototype + , "addWidget" + , "count" + , "getRange" + , "handle" + , "indexOf" + , "insertWidget" + , "isCollapsible" + , "minimumSizeHint" + , "readFrom" + , "refresh" + , "restoreState" + , "saveState" + , "setCollapsible" + , "setSizes" + , "setStretchFactor" + , "sizes" + , "widget" + , "writeTo" + , "toString" +}; + +static const char * const qtscript_QSplitter_function_signatures[] = { + "QWidget parent\nOrientation arg__1, QWidget parent" + // static + // prototype + , "QWidget widget" + , "" + , "int index, int arg__2, int arg__3" + , "int index" + , "QWidget w" + , "int index, QWidget widget" + , "int index" + , "" + , "QTextStream arg__1" + , "" + , "QByteArray state" + , "" + , "int index, bool arg__2" + , "List list" + , "int index, int stretch" + , "" + , "int index" + , "QTextStream arg__1" +"" +}; + +static const int qtscript_QSplitter_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 0 + , 3 + , 1 + , 1 + , 2 + , 1 + , 0 + , 1 + , 0 + , 1 + , 0 + , 2 + , 1 + , 2 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QSplitter_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSplitter::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSplitter*) +Q_DECLARE_METATYPE(QtScriptShell_QSplitter*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(int*) +Q_DECLARE_METATYPE(QSplitterHandle*) +Q_DECLARE_METATYPE(QTextStream*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(QFrame*) + +// +// QSplitter +// + +static QScriptValue qtscript_QSplitter_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 18; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSplitter* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSplitter.%0(): this object is not a QSplitter") + .arg(qtscript_QSplitter_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->getRange(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QSplitterHandle* _q_result = _q_self->handle(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->indexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertWidget(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->isCollapsible(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QTextStream* _q_arg0 = qscriptvalue_cast(context->argument(0)); + operator>>(*_q_arg0, *_q_self); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 0) { + _q_self->refresh(); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->restoreState(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->saveState(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setCollapsible(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setSizes(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setStretchFactor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->sizes(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_result = _q_self->widget(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QTextStream* _q_arg0 = qscriptvalue_cast(context->argument(0)); + operator<<(*_q_arg0, *_q_self); + return context->engine()->undefinedValue(); + } + break; + + case 18: { + QString result = QString::fromLatin1("QSplitter"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSplitter_throw_ambiguity_error_helper(context, + qtscript_QSplitter_function_names[_id+1], + qtscript_QSplitter_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSplitter_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSplitter(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSplitter* _q_cpp_result = new QtScriptShell_QSplitter(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSplitter*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QSplitter* _q_cpp_result = new QtScriptShell_QSplitter(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSplitter*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QSplitter* _q_cpp_result = new QtScriptShell_QSplitter(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSplitter*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QSplitter* _q_cpp_result = new QtScriptShell_QSplitter(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSplitter*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSplitter_throw_ambiguity_error_helper(context, + qtscript_QSplitter_function_names[_id], + qtscript_QSplitter_function_signatures[_id]); +} + +static QScriptValue qtscript_QSplitter_toScriptValue(QScriptEngine *engine, QSplitter* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSplitter_fromScriptValue(const QScriptValue &value, QSplitter* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSplitter_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSplitter*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 19; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSplitter_prototype_call, qtscript_QSplitter_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSplitter_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSplitter_toScriptValue, + qtscript_QSplitter_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSplitter_static_call, proto, qtscript_QSplitter_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSplitterHandle.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSplitterHandle.cpp new file mode 100644 index 00000000..8ff8ae31 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSplitterHandle.cpp @@ -0,0 +1,228 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSplitterHandle.h" + +static const char * const qtscript_QSplitterHandle_function_names[] = { + "QSplitterHandle" + // static + // prototype + , "opaqueResize" + , "orientation" + , "setOrientation" + , "sizeHint" + , "splitter" + , "toString" +}; + +static const char * const qtscript_QSplitterHandle_function_signatures[] = { + "Orientation o, QSplitter parent" + // static + // prototype + , "" + , "" + , "Orientation o" + , "" + , "" +"" +}; + +static const int qtscript_QSplitterHandle_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QSplitterHandle_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSplitterHandle::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSplitterHandle*) +Q_DECLARE_METATYPE(QtScriptShell_QSplitterHandle*) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(QSplitter*) +Q_DECLARE_METATYPE(QWidget*) + +// +// QSplitterHandle +// + +static QScriptValue qtscript_QSplitterHandle_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSplitterHandle* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSplitterHandle.%0(): this object is not a QSplitterHandle") + .arg(qtscript_QSplitterHandle_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->opaqueResize(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + Qt::Orientation _q_result = _q_self->orientation(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOrientation(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QSplitter* _q_result = _q_self->splitter(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: { + QString result = QString::fromLatin1("QSplitterHandle"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSplitterHandle_throw_ambiguity_error_helper(context, + qtscript_QSplitterHandle_function_names[_id+1], + qtscript_QSplitterHandle_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSplitterHandle_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSplitterHandle(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 2) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSplitter* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QSplitterHandle* _q_cpp_result = new QtScriptShell_QSplitterHandle(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSplitterHandle*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSplitterHandle_throw_ambiguity_error_helper(context, + qtscript_QSplitterHandle_function_names[_id], + qtscript_QSplitterHandle_function_signatures[_id]); +} + +static QScriptValue qtscript_QSplitterHandle_toScriptValue(QScriptEngine *engine, QSplitterHandle* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSplitterHandle_fromScriptValue(const QScriptValue &value, QSplitterHandle* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSplitterHandle_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSplitterHandle*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSplitterHandle_prototype_call, qtscript_QSplitterHandle_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSplitterHandle_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSplitterHandle_toScriptValue, + qtscript_QSplitterHandle_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSplitterHandle_static_call, proto, qtscript_QSplitterHandle_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStackedLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStackedLayout.cpp new file mode 100644 index 00000000..dbe0275c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStackedLayout.cpp @@ -0,0 +1,298 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QStackedLayout.h" + +static const char * const qtscript_QStackedLayout_function_names[] = { + "QStackedLayout" + // static + // prototype + , "addStackedWidget" + , "currentWidget" + , "insertWidget" + , "widget" + , "toString" +}; + +static const char * const qtscript_QStackedLayout_function_signatures[] = { + "\nQLayout parentLayout\nQWidget parent" + // static + // prototype + , "QWidget w" + , "" + , "int index, QWidget w" + , "int arg__1" +"" +}; + +static const int qtscript_QStackedLayout_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 2 + , 1 + , 0 +}; + +static QScriptValue qtscript_QStackedLayout_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStackedLayout::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStackedLayout*) +Q_DECLARE_METATYPE(QtScriptShell_QStackedLayout*) +Q_DECLARE_METATYPE(QStackedLayout::StackingMode) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QLayout*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStackedLayout::StackingMode +// + +static const QStackedLayout::StackingMode qtscript_QStackedLayout_StackingMode_values[] = { + QStackedLayout::StackOne + , QStackedLayout::StackAll +}; + +static const char * const qtscript_QStackedLayout_StackingMode_keys[] = { + "StackOne" + , "StackAll" +}; + +static QString qtscript_QStackedLayout_StackingMode_toStringHelper(QStackedLayout::StackingMode value) +{ + if ((value >= QStackedLayout::StackOne) && (value <= QStackedLayout::StackAll)) + return qtscript_QStackedLayout_StackingMode_keys[static_cast(value)-static_cast(QStackedLayout::StackOne)]; + return QString(); +} + +static QScriptValue qtscript_QStackedLayout_StackingMode_toScriptValue(QScriptEngine *engine, const QStackedLayout::StackingMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStackedLayout")); + return clazz.property(qtscript_QStackedLayout_StackingMode_toStringHelper(value)); +} + +static void qtscript_QStackedLayout_StackingMode_fromScriptValue(const QScriptValue &value, QStackedLayout::StackingMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStackedLayout_StackingMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStackedLayout::StackOne) && (arg <= QStackedLayout::StackAll)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StackingMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStackedLayout_StackingMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStackedLayout::StackingMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStackedLayout_StackingMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStackedLayout::StackingMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStackedLayout_StackingMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStackedLayout_StackingMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStackedLayout_StackingMode, + qtscript_QStackedLayout_StackingMode_valueOf, qtscript_QStackedLayout_StackingMode_toString); + qScriptRegisterMetaType(engine, qtscript_QStackedLayout_StackingMode_toScriptValue, + qtscript_QStackedLayout_StackingMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStackedLayout_StackingMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStackedLayout_StackingMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStackedLayout +// + +static QScriptValue qtscript_QStackedLayout_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStackedLayout* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStackedLayout.%0(): this object is not a QStackedLayout") + .arg(qtscript_QStackedLayout_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->addWidget(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->currentWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_result = _q_self->insertWidget(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_result = _q_self->widget(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QStackedLayout"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStackedLayout_throw_ambiguity_error_helper(context, + qtscript_QStackedLayout_function_names[_id+1], + qtscript_QStackedLayout_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStackedLayout_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStackedLayout(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStackedLayout* _q_cpp_result = new QtScriptShell_QStackedLayout(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStackedLayout*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QLayout* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStackedLayout* _q_cpp_result = new QtScriptShell_QStackedLayout(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStackedLayout*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStackedLayout* _q_cpp_result = new QtScriptShell_QStackedLayout(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStackedLayout*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStackedLayout_throw_ambiguity_error_helper(context, + qtscript_QStackedLayout_function_names[_id], + qtscript_QStackedLayout_function_signatures[_id]); +} + +static QScriptValue qtscript_QStackedLayout_toScriptValue(QScriptEngine *engine, QStackedLayout* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QStackedLayout_fromScriptValue(const QScriptValue &value, QStackedLayout* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QStackedLayout_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStackedLayout*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStackedLayout_prototype_call, qtscript_QStackedLayout_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStackedLayout_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QStackedLayout_toScriptValue, + qtscript_QStackedLayout_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStackedLayout_static_call, proto, qtscript_QStackedLayout_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StackingMode"), + qtscript_create_QStackedLayout_StackingMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStackedWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStackedWidget.cpp new file mode 100644 index 00000000..0438edd3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStackedWidget.cpp @@ -0,0 +1,247 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QStackedWidget.h" + +static const char * const qtscript_QStackedWidget_function_names[] = { + "QStackedWidget" + // static + // prototype + , "addWidget" + , "currentWidget" + , "indexOf" + , "insertWidget" + , "removeWidget" + , "widget" + , "toString" +}; + +static const char * const qtscript_QStackedWidget_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "QWidget w" + , "" + , "QWidget arg__1" + , "int index, QWidget w" + , "QWidget w" + , "int arg__1" +"" +}; + +static const int qtscript_QStackedWidget_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 1 + , 2 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QStackedWidget_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStackedWidget::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStackedWidget*) +Q_DECLARE_METATYPE(QtScriptShell_QStackedWidget*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFrame*) + +// +// QStackedWidget +// + +static QScriptValue qtscript_QStackedWidget_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStackedWidget* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStackedWidget.%0(): this object is not a QStackedWidget") + .arg(qtscript_QStackedWidget_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->addWidget(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->currentWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->indexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_result = _q_self->insertWidget(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_result = _q_self->widget(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: { + QString result = QString::fromLatin1("QStackedWidget"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStackedWidget_throw_ambiguity_error_helper(context, + qtscript_QStackedWidget_function_names[_id+1], + qtscript_QStackedWidget_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStackedWidget_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStackedWidget(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStackedWidget* _q_cpp_result = new QtScriptShell_QStackedWidget(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStackedWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStackedWidget* _q_cpp_result = new QtScriptShell_QStackedWidget(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStackedWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStackedWidget_throw_ambiguity_error_helper(context, + qtscript_QStackedWidget_function_names[_id], + qtscript_QStackedWidget_function_signatures[_id]); +} + +static QScriptValue qtscript_QStackedWidget_toScriptValue(QScriptEngine *engine, QStackedWidget* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QStackedWidget_fromScriptValue(const QScriptValue &value, QStackedWidget* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QStackedWidget_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStackedWidget*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStackedWidget_prototype_call, qtscript_QStackedWidget_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStackedWidget_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QStackedWidget_toScriptValue, + qtscript_QStackedWidget_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStackedWidget_static_call, proto, qtscript_QStackedWidget_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStandardItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStandardItem.cpp new file mode 100644 index 00000000..defa9425 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStandardItem.cpp @@ -0,0 +1,1150 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QStandardItem.h" + +static const char * const qtscript_QStandardItem_function_names[] = { + "QStandardItem" + // static + // prototype + , "accessibleDescription" + , "accessibleText" + , "appendColumn" + , "appendRow" + , "appendRows" + , "background" + , "checkState" + , "child" + , "clone" + , "column" + , "columnCount" + , "data" + , "flags" + , "font" + , "foreground" + , "hasChildren" + , "icon" + , "index" + , "insertColumn" + , "insertColumns" + , "insertRow" + , "insertRows" + , "isAutoTristate" + , "isCheckable" + , "isDragEnabled" + , "isDropEnabled" + , "isEditable" + , "isEnabled" + , "isSelectable" + , "isTristate" + , "isUserTristate" + , "model" + , "parent" + , "removeColumn" + , "removeColumns" + , "removeRow" + , "removeRows" + , "row" + , "rowCount" + , "setAccessibleDescription" + , "setAccessibleText" + , "setAutoTristate" + , "setBackground" + , "setCheckState" + , "setCheckable" + , "setChild" + , "setColumnCount" + , "setData" + , "setDragEnabled" + , "setDropEnabled" + , "setEditable" + , "setEnabled" + , "setFlags" + , "setFont" + , "setForeground" + , "setIcon" + , "setRowCount" + , "setSelectable" + , "setSizeHint" + , "setStatusTip" + , "setText" + , "setTextAlignment" + , "setToolTip" + , "setTristate" + , "setUserTristate" + , "setWhatsThis" + , "sizeHint" + , "sortChildren" + , "statusTip" + , "takeChild" + , "takeColumn" + , "takeRow" + , "text" + , "textAlignment" + , "toolTip" + , "type" + , "whatsThis" + , "toString" +}; + +static const char * const qtscript_QStandardItem_function_signatures[] = { + "\nQIcon icon, String text\nString text\nint rows, int columns" + // static + // prototype + , "" + , "" + , "List items" + , "QStandardItem item\nList items" + , "List items" + , "" + , "" + , "int row, int column" + , "" + , "" + , "" + , "int role" + , "" + , "" + , "" + , "" + , "" + , "" + , "int column, List items" + , "int column, int count" + , "int row, QStandardItem item\nint row, List items" + , "int row, List items\nint row, int count" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "int column" + , "int column, int count" + , "int row" + , "int row, int count" + , "" + , "" + , "String accessibleDescription" + , "String accessibleText" + , "bool tristate" + , "QBrush brush" + , "CheckState checkState" + , "bool checkable" + , "int row, QStandardItem item\nint row, int column, QStandardItem item" + , "int columns" + , "Object value, int role" + , "bool dragEnabled" + , "bool dropEnabled" + , "bool editable" + , "bool enabled" + , "ItemFlags flags" + , "QFont font" + , "QBrush brush" + , "QIcon icon" + , "int rows" + , "bool selectable" + , "QSize sizeHint" + , "String statusTip" + , "String text" + , "Alignment textAlignment" + , "String toolTip" + , "bool tristate" + , "bool tristate" + , "String whatsThis" + , "" + , "int column, SortOrder order" + , "" + , "int row, int column" + , "int column" + , "int row" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QStandardItem_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 1 + , 1 + , 1 + , 0 + , 0 + , 2 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 2 + , 2 + , 2 + , 2 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 2 + , 1 + , 2 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 3 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 2 + , 0 + , 2 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QStandardItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStandardItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStandardItem*) +Q_DECLARE_METATYPE(QtScriptShell_QStandardItem*) +Q_DECLARE_METATYPE(QStandardItem::ItemType) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(Qt::CheckState) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QStandardItemModel*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::SortOrder) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStandardItem::ItemType +// + +static const QStandardItem::ItemType qtscript_QStandardItem_ItemType_values[] = { + QStandardItem::Type + , QStandardItem::UserType +}; + +static const char * const qtscript_QStandardItem_ItemType_keys[] = { + "Type" + , "UserType" +}; + +static QString qtscript_QStandardItem_ItemType_toStringHelper(QStandardItem::ItemType value) +{ + for (int i = 0; i < 2; ++i) { + if (qtscript_QStandardItem_ItemType_values[i] == value) + return QString::fromLatin1(qtscript_QStandardItem_ItemType_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QStandardItem_ItemType_toScriptValue(QScriptEngine *engine, const QStandardItem::ItemType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStandardItem")); + return clazz.property(qtscript_QStandardItem_ItemType_toStringHelper(value)); +} + +static void qtscript_QStandardItem_ItemType_fromScriptValue(const QScriptValue &value, QStandardItem::ItemType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStandardItem_ItemType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 2; ++i) { + if (qtscript_QStandardItem_ItemType_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ItemType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStandardItem_ItemType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStandardItem::ItemType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStandardItem_ItemType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStandardItem::ItemType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStandardItem_ItemType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStandardItem_ItemType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStandardItem_ItemType, + qtscript_QStandardItem_ItemType_valueOf, qtscript_QStandardItem_ItemType_toString); + qScriptRegisterMetaType(engine, qtscript_QStandardItem_ItemType_toScriptValue, + qtscript_QStandardItem_ItemType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStandardItem_ItemType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStandardItem_ItemType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStandardItem +// + +static QScriptValue qtscript_QStandardItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 77; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStandardItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStandardItem.%0(): this object is not a QStandardItem") + .arg(qtscript_QStandardItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->accessibleDescription(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->accessibleText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->appendColumn(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QStandardItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->appendRow(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isArray()) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->appendRow(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 4: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->appendRows(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QBrush _q_result = _q_self->background(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + Qt::CheckState _q_result = _q_self->checkState(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QStandardItem* _q_result = _q_self->child(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QStandardItem* _q_result = _q_self->child(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QStandardItem* _q_result = _q_self->clone(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->column(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + int _q_result = _q_self->columnCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QVariant _q_result = _q_self->data(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_result = _q_self->data(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->flags(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QFont _q_result = _q_self->font(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QBrush _q_result = _q_self->foreground(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasChildren(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QIcon _q_result = _q_self->icon(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QModelIndex _q_result = _q_self->index(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + _q_self->insertColumn(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->insertColumns(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 2) { + if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1))) { + int _q_arg0 = context->argument(0).toInt32(); + QStandardItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertRow(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isArray()) { + int _q_arg0 = context->argument(0).toInt32(); + QList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + _q_self->insertRow(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + break; + + case 21: + if (context->argumentCount() == 2) { + if (context->argument(0).isNumber() + && context->argument(1).isArray()) { + int _q_arg0 = context->argument(0).toInt32(); + QList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + _q_self->insertRows(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->insertRows(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + break; + + case 22: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isAutoTristate(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isCheckable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isDragEnabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isDropEnabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEditable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEnabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isSelectable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isTristate(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isUserTristate(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 0) { + QStandardItemModel* _q_result = _q_self->model(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 0) { + QStandardItem* _q_result = _q_self->parent(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->removeColumn(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->removeColumns(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->removeRow(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->removeRows(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 0) { + int _q_result = _q_self->row(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 38: + if (context->argumentCount() == 0) { + int _q_result = _q_self->rowCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setAccessibleDescription(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setAccessibleText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setAutoTristate(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 42: + if (context->argumentCount() == 1) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBackground(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 43: + if (context->argumentCount() == 1) { + Qt::CheckState _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCheckState(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 44: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setCheckable(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 45: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QStandardItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setChild(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QStandardItem* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setChild(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 46: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setColumnCount(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 47: + if (context->argumentCount() == 1) { + QVariant _q_arg0 = context->argument(0).toVariant(); + _q_self->setData(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QVariant _q_arg0 = context->argument(0).toVariant(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setData(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 48: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setDragEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 49: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setDropEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 50: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setEditable(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 51: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 52: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setFlags(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 53: + if (context->argumentCount() == 1) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFont(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 54: + if (context->argumentCount() == 1) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setForeground(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 55: + if (context->argumentCount() == 1) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setIcon(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 56: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setRowCount(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 57: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setSelectable(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 58: + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSizeHint(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 59: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setStatusTip(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 60: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 61: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setTextAlignment(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 62: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setToolTip(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 63: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setTristate(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 64: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setUserTristate(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 65: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setWhatsThis(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 66: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 67: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->sortChildren(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::SortOrder _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->sortChildren(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 68: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->statusTip(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 69: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QStandardItem* _q_result = _q_self->takeChild(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QStandardItem* _q_result = _q_self->takeChild(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 70: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QList _q_result = _q_self->takeColumn(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 71: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QList _q_result = _q_self->takeRow(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 72: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->text(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 73: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->textAlignment(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 74: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toolTip(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 75: + if (context->argumentCount() == 0) { + int _q_result = _q_self->type(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 76: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->whatsThis(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 77: { + QString result = QString::fromLatin1("QStandardItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStandardItem_throw_ambiguity_error_helper(context, + qtscript_QStandardItem_function_names[_id+1], + qtscript_QStandardItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStandardItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStandardItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStandardItem* _q_cpp_result = new QtScriptShell_QStandardItem(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStandardItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QStandardItem* _q_cpp_result = new QtScriptShell_QStandardItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStandardItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QtScriptShell_QStandardItem* _q_cpp_result = new QtScriptShell_QStandardItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStandardItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QtScriptShell_QStandardItem* _q_cpp_result = new QtScriptShell_QStandardItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStandardItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber() + && context->argument(1).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QStandardItem* _q_cpp_result = new QtScriptShell_QStandardItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStandardItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStandardItem_throw_ambiguity_error_helper(context, + qtscript_QStandardItem_function_names[_id], + qtscript_QStandardItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStandardItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStandardItem*)0)); + for (int i = 0; i < 78; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStandardItem_prototype_call, qtscript_QStandardItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStandardItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStandardItem_static_call, proto, qtscript_QStandardItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ItemType"), + qtscript_create_QStandardItem_ItemType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStandardItemModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStandardItemModel.cpp new file mode 100644 index 00000000..849dcb5d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStandardItemModel.cpp @@ -0,0 +1,545 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QStandardItemModel.h" + +static const char * const qtscript_QStandardItemModel_function_names[] = { + "QStandardItemModel" + // static + // prototype + , "appendColumn" + , "appendRow" + , "clear" + , "findItems" + , "horizontalHeaderItem" + , "indexFromItem" + , "insertColumn" + , "insertRow" + , "invisibleRootItem" + , "item" + , "itemFromIndex" + , "itemPrototype" + , "setColumnCount" + , "setHorizontalHeaderItem" + , "setHorizontalHeaderLabels" + , "setItem" + , "setItemPrototype" + , "setItemRoleNames" + , "setRowCount" + , "setVerticalHeaderItem" + , "setVerticalHeaderLabels" + , "takeColumn" + , "takeHorizontalHeaderItem" + , "takeItem" + , "takeRow" + , "takeVerticalHeaderItem" + , "verticalHeaderItem" + , "toString" +}; + +static const char * const qtscript_QStandardItemModel_function_signatures[] = { + "QObject parent\nint rows, int columns, QObject parent" + // static + // prototype + , "List items" + , "QStandardItem item\nList items" + , "" + , "String text, MatchFlags flags, int column" + , "int column" + , "QStandardItem item" + , "int column, List items" + , "int row, QStandardItem item\nint row, List items" + , "" + , "int row, int column" + , "QModelIndex index" + , "" + , "int columns" + , "int column, QStandardItem item" + , "List labels" + , "int row, QStandardItem item\nint row, int column, QStandardItem item" + , "QStandardItem item" + , "HashMap roleNames" + , "int rows" + , "int row, QStandardItem item" + , "List labels" + , "int column" + , "int column" + , "int row, int column" + , "int row" + , "int row" + , "int row" +"" +}; + +static const int qtscript_QStandardItemModel_function_lengths[] = { + 3 + // static + // prototype + , 1 + , 1 + , 0 + , 3 + , 1 + , 1 + , 2 + , 2 + , 0 + , 2 + , 1 + , 0 + , 1 + , 2 + , 1 + , 3 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QStandardItemModel_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStandardItemModel::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStandardItemModel*) +Q_DECLARE_METATYPE(QtScriptShell_QStandardItemModel*) +Q_DECLARE_METATYPE(QStandardItem*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(const QStandardItem*) +template <> \ +struct QMetaTypeId< QHash > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QHash >("QHash")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(QAbstractItemModel*) + +// +// QStandardItemModel +// + +static QScriptValue qtscript_QStandardItemModel_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 27; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStandardItemModel* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStandardItemModel.%0(): this object is not a QStandardItemModel") + .arg(qtscript_QStandardItemModel_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->appendColumn(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QStandardItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->appendRow(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isArray()) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->appendRow(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QList _q_result = _q_self->findItems(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QList _q_result = _q_self->findItems(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QList _q_result = _q_self->findItems(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QStandardItem* _q_result = _q_self->horizontalHeaderItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + const QStandardItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QModelIndex _q_result = _q_self->indexFromItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + _q_self->insertColumn(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 2) { + if (context->argument(0).isNumber() + && qscriptvalue_cast(context->argument(1))) { + int _q_arg0 = context->argument(0).toInt32(); + QStandardItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertRow(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isNumber() + && context->argument(1).isArray()) { + int _q_arg0 = context->argument(0).toInt32(); + QList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + _q_self->insertRow(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + break; + + case 8: + if (context->argumentCount() == 0) { + QStandardItem* _q_result = _q_self->invisibleRootItem(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QStandardItem* _q_result = _q_self->item(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QStandardItem* _q_result = _q_self->item(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStandardItem* _q_result = _q_self->itemFromIndex(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + const QStandardItem* _q_result = const_cast(_q_self->itemPrototype()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setColumnCount(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QStandardItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setHorizontalHeaderItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setHorizontalHeaderLabels(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QStandardItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QStandardItem* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setItem(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + const QStandardItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setItemPrototype(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QHash _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setItemRoleNames(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setRowCount(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QStandardItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setVerticalHeaderItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setVerticalHeaderLabels(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QList _q_result = _q_self->takeColumn(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QStandardItem* _q_result = _q_self->takeHorizontalHeaderItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QStandardItem* _q_result = _q_self->takeItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QStandardItem* _q_result = _q_self->takeItem(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QList _q_result = _q_self->takeRow(_q_arg0); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QStandardItem* _q_result = _q_self->takeVerticalHeaderItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QStandardItem* _q_result = _q_self->verticalHeaderItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: { + QString result = QString::fromLatin1("QStandardItemModel"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStandardItemModel_throw_ambiguity_error_helper(context, + qtscript_QStandardItemModel_function_names[_id+1], + qtscript_QStandardItemModel_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStandardItemModel_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStandardItemModel(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStandardItemModel* _q_cpp_result = new QtScriptShell_QStandardItemModel(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStandardItemModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QStandardItemModel* _q_cpp_result = new QtScriptShell_QStandardItemModel(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStandardItemModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QStandardItemModel* _q_cpp_result = new QtScriptShell_QStandardItemModel(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStandardItemModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QObject* _q_arg2 = context->argument(2).toQObject(); + QtScriptShell_QStandardItemModel* _q_cpp_result = new QtScriptShell_QStandardItemModel(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStandardItemModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStandardItemModel_throw_ambiguity_error_helper(context, + qtscript_QStandardItemModel_function_names[_id], + qtscript_QStandardItemModel_function_signatures[_id]); +} + +static QScriptValue qtscript_QStandardItemModel_toScriptValue(QScriptEngine *engine, QStandardItemModel* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QStandardItemModel_fromScriptValue(const QScriptValue &value, QStandardItemModel* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QStandardItemModel_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStandardItemModel*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 28; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStandardItemModel_prototype_call, qtscript_QStandardItemModel_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStandardItemModel_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QStandardItemModel_toScriptValue, + qtscript_QStandardItemModel_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStandardItemModel_static_call, proto, qtscript_QStandardItemModel_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStatusBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStatusBar.cpp new file mode 100644 index 00000000..4c812ebd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStatusBar.cpp @@ -0,0 +1,272 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QStatusBar.h" + +static const char * const qtscript_QStatusBar_function_names[] = { + "QStatusBar" + // static + // prototype + , "addPermanentWidget" + , "addWidget" + , "currentMessage" + , "insertPermanentWidget" + , "insertWidget" + , "removeWidget" + , "toString" +}; + +static const char * const qtscript_QStatusBar_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "QWidget widget, int stretch" + , "QWidget widget, int stretch" + , "" + , "int index, QWidget widget, int stretch" + , "int index, QWidget widget, int stretch" + , "QWidget widget" +"" +}; + +static const int qtscript_QStatusBar_function_lengths[] = { + 1 + // static + // prototype + , 2 + , 2 + , 0 + , 3 + , 3 + , 1 + , 0 +}; + +static QScriptValue qtscript_QStatusBar_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStatusBar::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStatusBar*) +Q_DECLARE_METATYPE(QtScriptShell_QStatusBar*) +Q_DECLARE_METATYPE(QWidget*) + +// +// QStatusBar +// + +static QScriptValue qtscript_QStatusBar_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStatusBar* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStatusBar.%0(): this object is not a QStatusBar") + .arg(qtscript_QStatusBar_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addPermanentWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->addPermanentWidget(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->addWidget(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->currentMessage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_result = _q_self->insertPermanentWidget(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + int _q_result = _q_self->insertPermanentWidget(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_result = _q_self->insertWidget(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + int _q_result = _q_self->insertWidget(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: { + QString result = QString::fromLatin1("QStatusBar"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStatusBar_throw_ambiguity_error_helper(context, + qtscript_QStatusBar_function_names[_id+1], + qtscript_QStatusBar_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStatusBar_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStatusBar(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStatusBar* _q_cpp_result = new QtScriptShell_QStatusBar(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStatusBar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStatusBar* _q_cpp_result = new QtScriptShell_QStatusBar(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStatusBar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStatusBar_throw_ambiguity_error_helper(context, + qtscript_QStatusBar_function_names[_id], + qtscript_QStatusBar_function_signatures[_id]); +} + +static QScriptValue qtscript_QStatusBar_toScriptValue(QScriptEngine *engine, QStatusBar* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QStatusBar_fromScriptValue(const QScriptValue &value, QStatusBar* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QStatusBar_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStatusBar*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStatusBar_prototype_call, qtscript_QStatusBar_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStatusBar_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QStatusBar_toScriptValue, + qtscript_QStatusBar_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStatusBar_static_call, proto, qtscript_QStatusBar_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStringListModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStringListModel.cpp new file mode 100644 index 00000000..4df7d845 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStringListModel.cpp @@ -0,0 +1,199 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QStringListModel.h" + +static const char * const qtscript_QStringListModel_function_names[] = { + "QStringListModel" + // static + // prototype + , "setStringList" + , "stringList" + , "toString" +}; + +static const char * const qtscript_QStringListModel_function_signatures[] = { + "QObject parent\nList strings, QObject parent" + // static + // prototype + , "List strings" + , "" +"" +}; + +static const int qtscript_QStringListModel_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QStringListModel_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStringListModel::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStringListModel*) +Q_DECLARE_METATYPE(QtScriptShell_QStringListModel*) +Q_DECLARE_METATYPE(QAbstractListModel*) + +// +// QStringListModel +// + +static QScriptValue qtscript_QStringListModel_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStringListModel* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStringListModel.%0(): this object is not a QStringListModel") + .arg(qtscript_QStringListModel_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setStringList(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QStringList _q_result = _q_self->stringList(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QStringListModel"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStringListModel_throw_ambiguity_error_helper(context, + qtscript_QStringListModel_function_names[_id+1], + qtscript_QStringListModel_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStringListModel_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStringListModel(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStringListModel* _q_cpp_result = new QtScriptShell_QStringListModel(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStringListModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isQObject()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QStringListModel* _q_cpp_result = new QtScriptShell_QStringListModel(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStringListModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isArray()) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QtScriptShell_QStringListModel* _q_cpp_result = new QtScriptShell_QStringListModel(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStringListModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QStringListModel* _q_cpp_result = new QtScriptShell_QStringListModel(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStringListModel*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStringListModel_throw_ambiguity_error_helper(context, + qtscript_QStringListModel_function_names[_id], + qtscript_QStringListModel_function_signatures[_id]); +} + +static QScriptValue qtscript_QStringListModel_toScriptValue(QScriptEngine *engine, QStringListModel* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QStringListModel_fromScriptValue(const QScriptValue &value, QStringListModel* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QStringListModel_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStringListModel*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStringListModel_prototype_call, qtscript_QStringListModel_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStringListModel_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QStringListModel_toScriptValue, + qtscript_QStringListModel_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStringListModel_static_call, proto, qtscript_QStringListModel_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyle.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyle.cpp new file mode 100644 index 00000000..c3390847 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyle.cpp @@ -0,0 +1,2219 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QStyle.h" + +static const char * const qtscript_QStyle_function_names[] = { + "QStyle" + // static + , "alignedRect" + , "sliderPositionFromValue" + , "sliderValueFromPosition" + , "visualAlignment" + , "visualPos" + , "visualRect" + // prototype + , "combinedLayoutSpacing" + , "drawComplexControl" + , "drawControl" + , "drawItemPixmap" + , "drawItemText" + , "drawPrimitive" + , "generatedIconPixmap" + , "hitTestComplexControl" + , "itemPixmapRect" + , "layoutSpacing" + , "pixelMetric" + , "polish" + , "proxy" + , "sizeFromContents" + , "standardIcon" + , "standardPalette" + , "standardPixmap" + , "styleHint" + , "subControlRect" + , "subElementRect" + , "unpolish" + , "toString" +}; + +static const char * const qtscript_QStyle_function_signatures[] = { + "" + // static + , "LayoutDirection direction, Alignment alignment, QSize size, QRect rectangle" + , "int min, int max, int val, int space, bool upsideDown" + , "int min, int max, int pos, int space, bool upsideDown" + , "LayoutDirection direction, Alignment alignment" + , "LayoutDirection direction, QRect boundingRect, QPoint logicalPos" + , "LayoutDirection direction, QRect boundingRect, QRect logicalRect" + // prototype + , "ControlTypes controls1, ControlTypes controls2, Orientation orientation, QStyleOption option, QWidget widget" + , "ComplexControl cc, QStyleOptionComplex opt, QPainter p, QWidget widget" + , "ControlElement element, QStyleOption opt, QPainter p, QWidget w" + , "QPainter painter, QRect rect, int alignment, QPixmap pixmap" + , "QPainter painter, QRect rect, int flags, QPalette pal, bool enabled, String text, ColorRole textRole" + , "PrimitiveElement pe, QStyleOption opt, QPainter p, QWidget w" + , "Mode iconMode, QPixmap pixmap, QStyleOption opt" + , "ComplexControl cc, QStyleOptionComplex opt, QPoint pt, QWidget widget" + , "QRect r, int flags, QPixmap pixmap" + , "ControlType control1, ControlType control2, Orientation orientation, QStyleOption option, QWidget widget" + , "PixelMetric metric, QStyleOption option, QWidget widget" + , "QApplication application\nQPalette palette\nQWidget widget" + , "" + , "ContentsType ct, QStyleOption opt, QSize contentsSize, QWidget w" + , "StandardPixmap standardIcon, QStyleOption option, QWidget widget" + , "" + , "StandardPixmap standardPixmap, QStyleOption opt, QWidget widget" + , "StyleHint stylehint, QStyleOption opt, QWidget widget, QStyleHintReturn returnData" + , "ComplexControl cc, QStyleOptionComplex opt, SubControl sc, QWidget widget" + , "SubElement subElement, QStyleOption option, QWidget widget" + , "QApplication application\nQWidget widget" +"" +}; + +static const int qtscript_QStyle_function_lengths[] = { + 0 + // static + , 4 + , 5 + , 5 + , 2 + , 3 + , 3 + // prototype + , 5 + , 4 + , 4 + , 4 + , 7 + , 4 + , 3 + , 4 + , 3 + , 5 + , 3 + , 1 + , 0 + , 4 + , 3 + , 0 + , 3 + , 4 + , 4 + , 3 + , 1 + , 0 +}; + +static QScriptValue qtscript_QStyle_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyle::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyle*) +Q_DECLARE_METATYPE(QtScriptShell_QStyle*) +Q_DECLARE_METATYPE(QStyle::ComplexControl) +Q_DECLARE_METATYPE(QStyle::PrimitiveElement) +Q_DECLARE_METATYPE(QStyle::ControlElement) +Q_DECLARE_METATYPE(QStyle::PixelMetric) +Q_DECLARE_METATYPE(QStyle::ContentsType) +Q_DECLARE_METATYPE(QStyle::SubElement) +Q_DECLARE_METATYPE(QStyle::RequestSoftwareInputPanel) +Q_DECLARE_METATYPE(QStyle::StandardPixmap) +Q_DECLARE_METATYPE(QStyle::StateFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(QStyleOption*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(const QStyleOptionComplex*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QWidget*) +Q_DECLARE_METATYPE(const QStyleOption*) +Q_DECLARE_METATYPE(QPalette::ColorRole) +Q_DECLARE_METATYPE(QIcon::Mode) +Q_DECLARE_METATYPE(QStyle::SubControl) +Q_DECLARE_METATYPE(QSizePolicy::ControlType) +Q_DECLARE_METATYPE(QApplication*) +Q_DECLARE_METATYPE(const QStyle*) +Q_DECLARE_METATYPE(QStyle::StyleHint) +Q_DECLARE_METATYPE(QStyleHintReturn*) +Q_DECLARE_METATYPE(Qt::LayoutDirection) +Q_DECLARE_METATYPE(QFlags) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QStyle::ComplexControl +// + +static const QStyle::ComplexControl qtscript_QStyle_ComplexControl_values[] = { + QStyle::CC_CustomBase + , QStyle::CC_SpinBox + , QStyle::CC_ComboBox + , QStyle::CC_ScrollBar + , QStyle::CC_Slider + , QStyle::CC_ToolButton + , QStyle::CC_TitleBar + , QStyle::CC_Dial + , QStyle::CC_GroupBox + , QStyle::CC_MdiControls +}; + +static const char * const qtscript_QStyle_ComplexControl_keys[] = { + "CC_CustomBase" + , "CC_SpinBox" + , "CC_ComboBox" + , "CC_ScrollBar" + , "CC_Slider" + , "CC_ToolButton" + , "CC_TitleBar" + , "CC_Dial" + , "CC_GroupBox" + , "CC_MdiControls" +}; + +static QString qtscript_QStyle_ComplexControl_toStringHelper(QStyle::ComplexControl value) +{ + for (int i = 0; i < 10; ++i) { + if (qtscript_QStyle_ComplexControl_values[i] == value) + return QString::fromLatin1(qtscript_QStyle_ComplexControl_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QStyle_ComplexControl_toScriptValue(QScriptEngine *engine, const QStyle::ComplexControl &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyle")); + return clazz.property(qtscript_QStyle_ComplexControl_toStringHelper(value)); +} + +static void qtscript_QStyle_ComplexControl_fromScriptValue(const QScriptValue &value, QStyle::ComplexControl &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyle_ComplexControl(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 10; ++i) { + if (qtscript_QStyle_ComplexControl_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ComplexControl(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyle_ComplexControl_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::ComplexControl value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyle_ComplexControl_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::ComplexControl value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyle_ComplexControl_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyle_ComplexControl_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyle_ComplexControl, + qtscript_QStyle_ComplexControl_valueOf, qtscript_QStyle_ComplexControl_toString); + qScriptRegisterMetaType(engine, qtscript_QStyle_ComplexControl_toScriptValue, + qtscript_QStyle_ComplexControl_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 10; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyle_ComplexControl_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyle_ComplexControl_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyle::PrimitiveElement +// + +static const QStyle::PrimitiveElement qtscript_QStyle_PrimitiveElement_values[] = { + QStyle::PE_Frame + , QStyle::PE_FrameDefaultButton + , QStyle::PE_FrameDockWidget + , QStyle::PE_FrameFocusRect + , QStyle::PE_FrameGroupBox + , QStyle::PE_FrameLineEdit + , QStyle::PE_FrameMenu + , QStyle::PE_FrameStatusBar + , QStyle::PE_FrameTabWidget + , QStyle::PE_FrameWindow + , QStyle::PE_FrameButtonBevel + , QStyle::PE_FrameButtonTool + , QStyle::PE_FrameTabBarBase + , QStyle::PE_PanelButtonCommand + , QStyle::PE_PanelButtonBevel + , QStyle::PE_PanelButtonTool + , QStyle::PE_PanelMenuBar + , QStyle::PE_PanelToolBar + , QStyle::PE_PanelLineEdit + , QStyle::PE_IndicatorArrowDown + , QStyle::PE_IndicatorArrowLeft + , QStyle::PE_IndicatorArrowRight + , QStyle::PE_IndicatorArrowUp + , QStyle::PE_IndicatorBranch + , QStyle::PE_IndicatorButtonDropDown + , QStyle::PE_IndicatorViewItemCheck + , QStyle::PE_IndicatorCheckBox + , QStyle::PE_IndicatorDockWidgetResizeHandle + , QStyle::PE_IndicatorHeaderArrow + , QStyle::PE_IndicatorMenuCheckMark + , QStyle::PE_IndicatorProgressChunk + , QStyle::PE_IndicatorRadioButton + , QStyle::PE_IndicatorSpinDown + , QStyle::PE_IndicatorSpinMinus + , QStyle::PE_IndicatorSpinPlus + , QStyle::PE_IndicatorSpinUp + , QStyle::PE_IndicatorToolBarHandle + , QStyle::PE_IndicatorToolBarSeparator + , QStyle::PE_PanelTipLabel + , QStyle::PE_IndicatorTabTear + , QStyle::PE_PanelScrollAreaCorner + , QStyle::PE_Widget + , QStyle::PE_IndicatorColumnViewArrow + , QStyle::PE_IndicatorItemViewItemDrop + , QStyle::PE_PanelItemViewItem + , QStyle::PE_PanelItemViewRow + , QStyle::PE_PanelStatusBar + , QStyle::PE_IndicatorTabClose + , QStyle::PE_PanelMenu + , QStyle::PE_CustomBase +}; + +static const char * const qtscript_QStyle_PrimitiveElement_keys[] = { + "PE_Frame" + , "PE_FrameDefaultButton" + , "PE_FrameDockWidget" + , "PE_FrameFocusRect" + , "PE_FrameGroupBox" + , "PE_FrameLineEdit" + , "PE_FrameMenu" + , "PE_FrameStatusBar" + , "PE_FrameTabWidget" + , "PE_FrameWindow" + , "PE_FrameButtonBevel" + , "PE_FrameButtonTool" + , "PE_FrameTabBarBase" + , "PE_PanelButtonCommand" + , "PE_PanelButtonBevel" + , "PE_PanelButtonTool" + , "PE_PanelMenuBar" + , "PE_PanelToolBar" + , "PE_PanelLineEdit" + , "PE_IndicatorArrowDown" + , "PE_IndicatorArrowLeft" + , "PE_IndicatorArrowRight" + , "PE_IndicatorArrowUp" + , "PE_IndicatorBranch" + , "PE_IndicatorButtonDropDown" + , "PE_IndicatorViewItemCheck" + , "PE_IndicatorCheckBox" + , "PE_IndicatorDockWidgetResizeHandle" + , "PE_IndicatorHeaderArrow" + , "PE_IndicatorMenuCheckMark" + , "PE_IndicatorProgressChunk" + , "PE_IndicatorRadioButton" + , "PE_IndicatorSpinDown" + , "PE_IndicatorSpinMinus" + , "PE_IndicatorSpinPlus" + , "PE_IndicatorSpinUp" + , "PE_IndicatorToolBarHandle" + , "PE_IndicatorToolBarSeparator" + , "PE_PanelTipLabel" + , "PE_IndicatorTabTear" + , "PE_PanelScrollAreaCorner" + , "PE_Widget" + , "PE_IndicatorColumnViewArrow" + , "PE_IndicatorItemViewItemDrop" + , "PE_PanelItemViewItem" + , "PE_PanelItemViewRow" + , "PE_PanelStatusBar" + , "PE_IndicatorTabClose" + , "PE_PanelMenu" + , "PE_CustomBase" +}; + +static QString qtscript_QStyle_PrimitiveElement_toStringHelper(QStyle::PrimitiveElement value) +{ + for (int i = 0; i < 50; ++i) { + if (qtscript_QStyle_PrimitiveElement_values[i] == value) + return QString::fromLatin1(qtscript_QStyle_PrimitiveElement_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QStyle_PrimitiveElement_toScriptValue(QScriptEngine *engine, const QStyle::PrimitiveElement &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyle")); + return clazz.property(qtscript_QStyle_PrimitiveElement_toStringHelper(value)); +} + +static void qtscript_QStyle_PrimitiveElement_fromScriptValue(const QScriptValue &value, QStyle::PrimitiveElement &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyle_PrimitiveElement(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 50; ++i) { + if (qtscript_QStyle_PrimitiveElement_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("PrimitiveElement(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyle_PrimitiveElement_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::PrimitiveElement value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyle_PrimitiveElement_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::PrimitiveElement value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyle_PrimitiveElement_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyle_PrimitiveElement_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyle_PrimitiveElement, + qtscript_QStyle_PrimitiveElement_valueOf, qtscript_QStyle_PrimitiveElement_toString); + qScriptRegisterMetaType(engine, qtscript_QStyle_PrimitiveElement_toScriptValue, + qtscript_QStyle_PrimitiveElement_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 50; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyle_PrimitiveElement_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyle_PrimitiveElement_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyle::ControlElement +// + +static const QStyle::ControlElement qtscript_QStyle_ControlElement_values[] = { + QStyle::CE_CustomBase + , QStyle::CE_PushButton + , QStyle::CE_PushButtonBevel + , QStyle::CE_PushButtonLabel + , QStyle::CE_CheckBox + , QStyle::CE_CheckBoxLabel + , QStyle::CE_RadioButton + , QStyle::CE_RadioButtonLabel + , QStyle::CE_TabBarTab + , QStyle::CE_TabBarTabShape + , QStyle::CE_TabBarTabLabel + , QStyle::CE_ProgressBar + , QStyle::CE_ProgressBarGroove + , QStyle::CE_ProgressBarContents + , QStyle::CE_ProgressBarLabel + , QStyle::CE_MenuItem + , QStyle::CE_MenuScroller + , QStyle::CE_MenuVMargin + , QStyle::CE_MenuHMargin + , QStyle::CE_MenuTearoff + , QStyle::CE_MenuEmptyArea + , QStyle::CE_MenuBarItem + , QStyle::CE_MenuBarEmptyArea + , QStyle::CE_ToolButtonLabel + , QStyle::CE_Header + , QStyle::CE_HeaderSection + , QStyle::CE_HeaderLabel + , QStyle::CE_ToolBoxTab + , QStyle::CE_SizeGrip + , QStyle::CE_Splitter + , QStyle::CE_RubberBand + , QStyle::CE_DockWidgetTitle + , QStyle::CE_ScrollBarAddLine + , QStyle::CE_ScrollBarSubLine + , QStyle::CE_ScrollBarAddPage + , QStyle::CE_ScrollBarSubPage + , QStyle::CE_ScrollBarSlider + , QStyle::CE_ScrollBarFirst + , QStyle::CE_ScrollBarLast + , QStyle::CE_FocusFrame + , QStyle::CE_ComboBoxLabel + , QStyle::CE_ToolBar + , QStyle::CE_ToolBoxTabShape + , QStyle::CE_ToolBoxTabLabel + , QStyle::CE_HeaderEmptyArea + , QStyle::CE_ColumnViewGrip + , QStyle::CE_ItemViewItem + , QStyle::CE_ShapedFrame +}; + +static const char * const qtscript_QStyle_ControlElement_keys[] = { + "CE_CustomBase" + , "CE_PushButton" + , "CE_PushButtonBevel" + , "CE_PushButtonLabel" + , "CE_CheckBox" + , "CE_CheckBoxLabel" + , "CE_RadioButton" + , "CE_RadioButtonLabel" + , "CE_TabBarTab" + , "CE_TabBarTabShape" + , "CE_TabBarTabLabel" + , "CE_ProgressBar" + , "CE_ProgressBarGroove" + , "CE_ProgressBarContents" + , "CE_ProgressBarLabel" + , "CE_MenuItem" + , "CE_MenuScroller" + , "CE_MenuVMargin" + , "CE_MenuHMargin" + , "CE_MenuTearoff" + , "CE_MenuEmptyArea" + , "CE_MenuBarItem" + , "CE_MenuBarEmptyArea" + , "CE_ToolButtonLabel" + , "CE_Header" + , "CE_HeaderSection" + , "CE_HeaderLabel" + , "CE_ToolBoxTab" + , "CE_SizeGrip" + , "CE_Splitter" + , "CE_RubberBand" + , "CE_DockWidgetTitle" + , "CE_ScrollBarAddLine" + , "CE_ScrollBarSubLine" + , "CE_ScrollBarAddPage" + , "CE_ScrollBarSubPage" + , "CE_ScrollBarSlider" + , "CE_ScrollBarFirst" + , "CE_ScrollBarLast" + , "CE_FocusFrame" + , "CE_ComboBoxLabel" + , "CE_ToolBar" + , "CE_ToolBoxTabShape" + , "CE_ToolBoxTabLabel" + , "CE_HeaderEmptyArea" + , "CE_ColumnViewGrip" + , "CE_ItemViewItem" + , "CE_ShapedFrame" +}; + +static QString qtscript_QStyle_ControlElement_toStringHelper(QStyle::ControlElement value) +{ + for (int i = 0; i < 48; ++i) { + if (qtscript_QStyle_ControlElement_values[i] == value) + return QString::fromLatin1(qtscript_QStyle_ControlElement_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QStyle_ControlElement_toScriptValue(QScriptEngine *engine, const QStyle::ControlElement &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyle")); + return clazz.property(qtscript_QStyle_ControlElement_toStringHelper(value)); +} + +static void qtscript_QStyle_ControlElement_fromScriptValue(const QScriptValue &value, QStyle::ControlElement &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyle_ControlElement(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 48; ++i) { + if (qtscript_QStyle_ControlElement_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ControlElement(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyle_ControlElement_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::ControlElement value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyle_ControlElement_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::ControlElement value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyle_ControlElement_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyle_ControlElement_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyle_ControlElement, + qtscript_QStyle_ControlElement_valueOf, qtscript_QStyle_ControlElement_toString); + qScriptRegisterMetaType(engine, qtscript_QStyle_ControlElement_toScriptValue, + qtscript_QStyle_ControlElement_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 48; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyle_ControlElement_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyle_ControlElement_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyle::PixelMetric +// + +static const QStyle::PixelMetric qtscript_QStyle_PixelMetric_values[] = { + QStyle::PM_CustomBase + , QStyle::PM_ButtonMargin + , QStyle::PM_ButtonDefaultIndicator + , QStyle::PM_MenuButtonIndicator + , QStyle::PM_ButtonShiftHorizontal + , QStyle::PM_ButtonShiftVertical + , QStyle::PM_DefaultFrameWidth + , QStyle::PM_SpinBoxFrameWidth + , QStyle::PM_ComboBoxFrameWidth + , QStyle::PM_MaximumDragDistance + , QStyle::PM_ScrollBarExtent + , QStyle::PM_ScrollBarSliderMin + , QStyle::PM_SliderThickness + , QStyle::PM_SliderControlThickness + , QStyle::PM_SliderLength + , QStyle::PM_SliderTickmarkOffset + , QStyle::PM_SliderSpaceAvailable + , QStyle::PM_DockWidgetSeparatorExtent + , QStyle::PM_DockWidgetHandleExtent + , QStyle::PM_DockWidgetFrameWidth + , QStyle::PM_TabBarTabOverlap + , QStyle::PM_TabBarTabHSpace + , QStyle::PM_TabBarTabVSpace + , QStyle::PM_TabBarBaseHeight + , QStyle::PM_TabBarBaseOverlap + , QStyle::PM_ProgressBarChunkWidth + , QStyle::PM_SplitterWidth + , QStyle::PM_TitleBarHeight + , QStyle::PM_MenuScrollerHeight + , QStyle::PM_MenuHMargin + , QStyle::PM_MenuVMargin + , QStyle::PM_MenuPanelWidth + , QStyle::PM_MenuTearoffHeight + , QStyle::PM_MenuDesktopFrameWidth + , QStyle::PM_MenuBarPanelWidth + , QStyle::PM_MenuBarItemSpacing + , QStyle::PM_MenuBarVMargin + , QStyle::PM_MenuBarHMargin + , QStyle::PM_IndicatorWidth + , QStyle::PM_IndicatorHeight + , QStyle::PM_ExclusiveIndicatorWidth + , QStyle::PM_ExclusiveIndicatorHeight + , QStyle::PM_DialogButtonsSeparator + , QStyle::PM_DialogButtonsButtonWidth + , QStyle::PM_DialogButtonsButtonHeight + , QStyle::PM_MdiSubWindowFrameWidth + , QStyle::PM_MdiSubWindowMinimizedWidth + , QStyle::PM_HeaderMargin + , QStyle::PM_HeaderMarkSize + , QStyle::PM_HeaderGripMargin + , QStyle::PM_TabBarTabShiftHorizontal + , QStyle::PM_TabBarTabShiftVertical + , QStyle::PM_TabBarScrollButtonWidth + , QStyle::PM_ToolBarFrameWidth + , QStyle::PM_ToolBarHandleExtent + , QStyle::PM_ToolBarItemSpacing + , QStyle::PM_ToolBarItemMargin + , QStyle::PM_ToolBarSeparatorExtent + , QStyle::PM_ToolBarExtensionExtent + , QStyle::PM_SpinBoxSliderHeight + , QStyle::PM_DefaultTopLevelMargin + , QStyle::PM_DefaultChildMargin + , QStyle::PM_DefaultLayoutSpacing + , QStyle::PM_ToolBarIconSize + , QStyle::PM_ListViewIconSize + , QStyle::PM_IconViewIconSize + , QStyle::PM_SmallIconSize + , QStyle::PM_LargeIconSize + , QStyle::PM_FocusFrameVMargin + , QStyle::PM_FocusFrameHMargin + , QStyle::PM_ToolTipLabelFrameWidth + , QStyle::PM_CheckBoxLabelSpacing + , QStyle::PM_TabBarIconSize + , QStyle::PM_SizeGripSize + , QStyle::PM_DockWidgetTitleMargin + , QStyle::PM_MessageBoxIconSize + , QStyle::PM_ButtonIconSize + , QStyle::PM_DockWidgetTitleBarButtonMargin + , QStyle::PM_RadioButtonLabelSpacing + , QStyle::PM_LayoutLeftMargin + , QStyle::PM_LayoutTopMargin + , QStyle::PM_LayoutRightMargin + , QStyle::PM_LayoutBottomMargin + , QStyle::PM_LayoutHorizontalSpacing + , QStyle::PM_LayoutVerticalSpacing + , QStyle::PM_TabBar_ScrollButtonOverlap + , QStyle::PM_TextCursorWidth + , QStyle::PM_TabCloseIndicatorWidth + , QStyle::PM_TabCloseIndicatorHeight + , QStyle::PM_ScrollView_ScrollBarSpacing + , QStyle::PM_ScrollView_ScrollBarOverlap + , QStyle::PM_SubMenuOverlap + , QStyle::PM_TreeViewIndentation + , QStyle::PM_HeaderDefaultSectionSizeHorizontal + , QStyle::PM_HeaderDefaultSectionSizeVertical +}; + +static const char * const qtscript_QStyle_PixelMetric_keys[] = { + "PM_CustomBase" + , "PM_ButtonMargin" + , "PM_ButtonDefaultIndicator" + , "PM_MenuButtonIndicator" + , "PM_ButtonShiftHorizontal" + , "PM_ButtonShiftVertical" + , "PM_DefaultFrameWidth" + , "PM_SpinBoxFrameWidth" + , "PM_ComboBoxFrameWidth" + , "PM_MaximumDragDistance" + , "PM_ScrollBarExtent" + , "PM_ScrollBarSliderMin" + , "PM_SliderThickness" + , "PM_SliderControlThickness" + , "PM_SliderLength" + , "PM_SliderTickmarkOffset" + , "PM_SliderSpaceAvailable" + , "PM_DockWidgetSeparatorExtent" + , "PM_DockWidgetHandleExtent" + , "PM_DockWidgetFrameWidth" + , "PM_TabBarTabOverlap" + , "PM_TabBarTabHSpace" + , "PM_TabBarTabVSpace" + , "PM_TabBarBaseHeight" + , "PM_TabBarBaseOverlap" + , "PM_ProgressBarChunkWidth" + , "PM_SplitterWidth" + , "PM_TitleBarHeight" + , "PM_MenuScrollerHeight" + , "PM_MenuHMargin" + , "PM_MenuVMargin" + , "PM_MenuPanelWidth" + , "PM_MenuTearoffHeight" + , "PM_MenuDesktopFrameWidth" + , "PM_MenuBarPanelWidth" + , "PM_MenuBarItemSpacing" + , "PM_MenuBarVMargin" + , "PM_MenuBarHMargin" + , "PM_IndicatorWidth" + , "PM_IndicatorHeight" + , "PM_ExclusiveIndicatorWidth" + , "PM_ExclusiveIndicatorHeight" + , "PM_DialogButtonsSeparator" + , "PM_DialogButtonsButtonWidth" + , "PM_DialogButtonsButtonHeight" + , "PM_MdiSubWindowFrameWidth" + , "PM_MdiSubWindowMinimizedWidth" + , "PM_HeaderMargin" + , "PM_HeaderMarkSize" + , "PM_HeaderGripMargin" + , "PM_TabBarTabShiftHorizontal" + , "PM_TabBarTabShiftVertical" + , "PM_TabBarScrollButtonWidth" + , "PM_ToolBarFrameWidth" + , "PM_ToolBarHandleExtent" + , "PM_ToolBarItemSpacing" + , "PM_ToolBarItemMargin" + , "PM_ToolBarSeparatorExtent" + , "PM_ToolBarExtensionExtent" + , "PM_SpinBoxSliderHeight" + , "PM_DefaultTopLevelMargin" + , "PM_DefaultChildMargin" + , "PM_DefaultLayoutSpacing" + , "PM_ToolBarIconSize" + , "PM_ListViewIconSize" + , "PM_IconViewIconSize" + , "PM_SmallIconSize" + , "PM_LargeIconSize" + , "PM_FocusFrameVMargin" + , "PM_FocusFrameHMargin" + , "PM_ToolTipLabelFrameWidth" + , "PM_CheckBoxLabelSpacing" + , "PM_TabBarIconSize" + , "PM_SizeGripSize" + , "PM_DockWidgetTitleMargin" + , "PM_MessageBoxIconSize" + , "PM_ButtonIconSize" + , "PM_DockWidgetTitleBarButtonMargin" + , "PM_RadioButtonLabelSpacing" + , "PM_LayoutLeftMargin" + , "PM_LayoutTopMargin" + , "PM_LayoutRightMargin" + , "PM_LayoutBottomMargin" + , "PM_LayoutHorizontalSpacing" + , "PM_LayoutVerticalSpacing" + , "PM_TabBar_ScrollButtonOverlap" + , "PM_TextCursorWidth" + , "PM_TabCloseIndicatorWidth" + , "PM_TabCloseIndicatorHeight" + , "PM_ScrollView_ScrollBarSpacing" + , "PM_ScrollView_ScrollBarOverlap" + , "PM_SubMenuOverlap" + , "PM_TreeViewIndentation" + , "PM_HeaderDefaultSectionSizeHorizontal" + , "PM_HeaderDefaultSectionSizeVertical" +}; + +static QString qtscript_QStyle_PixelMetric_toStringHelper(QStyle::PixelMetric value) +{ + for (int i = 0; i < 95; ++i) { + if (qtscript_QStyle_PixelMetric_values[i] == value) + return QString::fromLatin1(qtscript_QStyle_PixelMetric_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QStyle_PixelMetric_toScriptValue(QScriptEngine *engine, const QStyle::PixelMetric &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyle")); + return clazz.property(qtscript_QStyle_PixelMetric_toStringHelper(value)); +} + +static void qtscript_QStyle_PixelMetric_fromScriptValue(const QScriptValue &value, QStyle::PixelMetric &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyle_PixelMetric(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 95; ++i) { + if (qtscript_QStyle_PixelMetric_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("PixelMetric(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyle_PixelMetric_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::PixelMetric value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyle_PixelMetric_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::PixelMetric value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyle_PixelMetric_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyle_PixelMetric_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyle_PixelMetric, + qtscript_QStyle_PixelMetric_valueOf, qtscript_QStyle_PixelMetric_toString); + qScriptRegisterMetaType(engine, qtscript_QStyle_PixelMetric_toScriptValue, + qtscript_QStyle_PixelMetric_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 95; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyle_PixelMetric_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyle_PixelMetric_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyle::ContentsType +// + +static const QStyle::ContentsType qtscript_QStyle_ContentsType_values[] = { + QStyle::CT_CustomBase + , QStyle::CT_PushButton + , QStyle::CT_CheckBox + , QStyle::CT_RadioButton + , QStyle::CT_ToolButton + , QStyle::CT_ComboBox + , QStyle::CT_Splitter + , QStyle::CT_ProgressBar + , QStyle::CT_MenuItem + , QStyle::CT_MenuBarItem + , QStyle::CT_MenuBar + , QStyle::CT_Menu + , QStyle::CT_TabBarTab + , QStyle::CT_Slider + , QStyle::CT_ScrollBar + , QStyle::CT_LineEdit + , QStyle::CT_SpinBox + , QStyle::CT_SizeGrip + , QStyle::CT_TabWidget + , QStyle::CT_DialogButtons + , QStyle::CT_HeaderSection + , QStyle::CT_GroupBox + , QStyle::CT_MdiControls + , QStyle::CT_ItemViewItem +}; + +static const char * const qtscript_QStyle_ContentsType_keys[] = { + "CT_CustomBase" + , "CT_PushButton" + , "CT_CheckBox" + , "CT_RadioButton" + , "CT_ToolButton" + , "CT_ComboBox" + , "CT_Splitter" + , "CT_ProgressBar" + , "CT_MenuItem" + , "CT_MenuBarItem" + , "CT_MenuBar" + , "CT_Menu" + , "CT_TabBarTab" + , "CT_Slider" + , "CT_ScrollBar" + , "CT_LineEdit" + , "CT_SpinBox" + , "CT_SizeGrip" + , "CT_TabWidget" + , "CT_DialogButtons" + , "CT_HeaderSection" + , "CT_GroupBox" + , "CT_MdiControls" + , "CT_ItemViewItem" +}; + +static QString qtscript_QStyle_ContentsType_toStringHelper(QStyle::ContentsType value) +{ + for (int i = 0; i < 24; ++i) { + if (qtscript_QStyle_ContentsType_values[i] == value) + return QString::fromLatin1(qtscript_QStyle_ContentsType_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QStyle_ContentsType_toScriptValue(QScriptEngine *engine, const QStyle::ContentsType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyle")); + return clazz.property(qtscript_QStyle_ContentsType_toStringHelper(value)); +} + +static void qtscript_QStyle_ContentsType_fromScriptValue(const QScriptValue &value, QStyle::ContentsType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyle_ContentsType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 24; ++i) { + if (qtscript_QStyle_ContentsType_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ContentsType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyle_ContentsType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::ContentsType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyle_ContentsType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::ContentsType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyle_ContentsType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyle_ContentsType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyle_ContentsType, + qtscript_QStyle_ContentsType_valueOf, qtscript_QStyle_ContentsType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyle_ContentsType_toScriptValue, + qtscript_QStyle_ContentsType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 24; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyle_ContentsType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyle_ContentsType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyle::SubElement +// + +static const QStyle::SubElement qtscript_QStyle_SubElement_values[] = { + QStyle::SE_CustomBase + , QStyle::SE_PushButtonContents + , QStyle::SE_PushButtonFocusRect + , QStyle::SE_CheckBoxIndicator + , QStyle::SE_CheckBoxContents + , QStyle::SE_CheckBoxFocusRect + , QStyle::SE_CheckBoxClickRect + , QStyle::SE_RadioButtonIndicator + , QStyle::SE_RadioButtonContents + , QStyle::SE_RadioButtonFocusRect + , QStyle::SE_RadioButtonClickRect + , QStyle::SE_ComboBoxFocusRect + , QStyle::SE_SliderFocusRect + , QStyle::SE_ProgressBarGroove + , QStyle::SE_ProgressBarContents + , QStyle::SE_ProgressBarLabel + , QStyle::SE_ToolBoxTabContents + , QStyle::SE_HeaderLabel + , QStyle::SE_HeaderArrow + , QStyle::SE_TabWidgetTabBar + , QStyle::SE_TabWidgetTabPane + , QStyle::SE_TabWidgetTabContents + , QStyle::SE_TabWidgetLeftCorner + , QStyle::SE_TabWidgetRightCorner + , QStyle::SE_ViewItemCheckIndicator + , QStyle::SE_TabBarTearIndicator + , QStyle::SE_TreeViewDisclosureItem + , QStyle::SE_LineEditContents + , QStyle::SE_FrameContents + , QStyle::SE_DockWidgetCloseButton + , QStyle::SE_DockWidgetFloatButton + , QStyle::SE_DockWidgetTitleBarText + , QStyle::SE_DockWidgetIcon + , QStyle::SE_CheckBoxLayoutItem + , QStyle::SE_ComboBoxLayoutItem + , QStyle::SE_DateTimeEditLayoutItem + , QStyle::SE_DialogButtonBoxLayoutItem + , QStyle::SE_LabelLayoutItem + , QStyle::SE_ProgressBarLayoutItem + , QStyle::SE_PushButtonLayoutItem + , QStyle::SE_RadioButtonLayoutItem + , QStyle::SE_SliderLayoutItem + , QStyle::SE_SpinBoxLayoutItem + , QStyle::SE_ToolButtonLayoutItem + , QStyle::SE_FrameLayoutItem + , QStyle::SE_GroupBoxLayoutItem + , QStyle::SE_TabWidgetLayoutItem + , QStyle::SE_ItemViewItemDecoration + , QStyle::SE_ItemViewItemText + , QStyle::SE_ItemViewItemFocusRect + , QStyle::SE_TabBarTabLeftButton + , QStyle::SE_TabBarTabRightButton + , QStyle::SE_TabBarTabText + , QStyle::SE_ShapedFrameContents + , QStyle::SE_ToolBarHandle +}; + +static const char * const qtscript_QStyle_SubElement_keys[] = { + "SE_CustomBase" + , "SE_PushButtonContents" + , "SE_PushButtonFocusRect" + , "SE_CheckBoxIndicator" + , "SE_CheckBoxContents" + , "SE_CheckBoxFocusRect" + , "SE_CheckBoxClickRect" + , "SE_RadioButtonIndicator" + , "SE_RadioButtonContents" + , "SE_RadioButtonFocusRect" + , "SE_RadioButtonClickRect" + , "SE_ComboBoxFocusRect" + , "SE_SliderFocusRect" + , "SE_ProgressBarGroove" + , "SE_ProgressBarContents" + , "SE_ProgressBarLabel" + , "SE_ToolBoxTabContents" + , "SE_HeaderLabel" + , "SE_HeaderArrow" + , "SE_TabWidgetTabBar" + , "SE_TabWidgetTabPane" + , "SE_TabWidgetTabContents" + , "SE_TabWidgetLeftCorner" + , "SE_TabWidgetRightCorner" + , "SE_ViewItemCheckIndicator" + , "SE_TabBarTearIndicator" + , "SE_TreeViewDisclosureItem" + , "SE_LineEditContents" + , "SE_FrameContents" + , "SE_DockWidgetCloseButton" + , "SE_DockWidgetFloatButton" + , "SE_DockWidgetTitleBarText" + , "SE_DockWidgetIcon" + , "SE_CheckBoxLayoutItem" + , "SE_ComboBoxLayoutItem" + , "SE_DateTimeEditLayoutItem" + , "SE_DialogButtonBoxLayoutItem" + , "SE_LabelLayoutItem" + , "SE_ProgressBarLayoutItem" + , "SE_PushButtonLayoutItem" + , "SE_RadioButtonLayoutItem" + , "SE_SliderLayoutItem" + , "SE_SpinBoxLayoutItem" + , "SE_ToolButtonLayoutItem" + , "SE_FrameLayoutItem" + , "SE_GroupBoxLayoutItem" + , "SE_TabWidgetLayoutItem" + , "SE_ItemViewItemDecoration" + , "SE_ItemViewItemText" + , "SE_ItemViewItemFocusRect" + , "SE_TabBarTabLeftButton" + , "SE_TabBarTabRightButton" + , "SE_TabBarTabText" + , "SE_ShapedFrameContents" + , "SE_ToolBarHandle" +}; + +static QString qtscript_QStyle_SubElement_toStringHelper(QStyle::SubElement value) +{ + for (int i = 0; i < 55; ++i) { + if (qtscript_QStyle_SubElement_values[i] == value) + return QString::fromLatin1(qtscript_QStyle_SubElement_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QStyle_SubElement_toScriptValue(QScriptEngine *engine, const QStyle::SubElement &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyle")); + return clazz.property(qtscript_QStyle_SubElement_toStringHelper(value)); +} + +static void qtscript_QStyle_SubElement_fromScriptValue(const QScriptValue &value, QStyle::SubElement &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyle_SubElement(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 55; ++i) { + if (qtscript_QStyle_SubElement_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("SubElement(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyle_SubElement_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::SubElement value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyle_SubElement_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::SubElement value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyle_SubElement_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyle_SubElement_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyle_SubElement, + qtscript_QStyle_SubElement_valueOf, qtscript_QStyle_SubElement_toString); + qScriptRegisterMetaType(engine, qtscript_QStyle_SubElement_toScriptValue, + qtscript_QStyle_SubElement_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 55; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyle_SubElement_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyle_SubElement_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyle::RequestSoftwareInputPanel +// + +static const QStyle::RequestSoftwareInputPanel qtscript_QStyle_RequestSoftwareInputPanel_values[] = { + QStyle::RSIP_OnMouseClickAndAlreadyFocused + , QStyle::RSIP_OnMouseClick +}; + +static const char * const qtscript_QStyle_RequestSoftwareInputPanel_keys[] = { + "RSIP_OnMouseClickAndAlreadyFocused" + , "RSIP_OnMouseClick" +}; + +static QString qtscript_QStyle_RequestSoftwareInputPanel_toStringHelper(QStyle::RequestSoftwareInputPanel value) +{ + if ((value >= QStyle::RSIP_OnMouseClickAndAlreadyFocused) && (value <= QStyle::RSIP_OnMouseClick)) + return qtscript_QStyle_RequestSoftwareInputPanel_keys[static_cast(value)-static_cast(QStyle::RSIP_OnMouseClickAndAlreadyFocused)]; + return QString(); +} + +static QScriptValue qtscript_QStyle_RequestSoftwareInputPanel_toScriptValue(QScriptEngine *engine, const QStyle::RequestSoftwareInputPanel &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyle")); + return clazz.property(qtscript_QStyle_RequestSoftwareInputPanel_toStringHelper(value)); +} + +static void qtscript_QStyle_RequestSoftwareInputPanel_fromScriptValue(const QScriptValue &value, QStyle::RequestSoftwareInputPanel &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyle_RequestSoftwareInputPanel(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyle::RSIP_OnMouseClickAndAlreadyFocused) && (arg <= QStyle::RSIP_OnMouseClick)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("RequestSoftwareInputPanel(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyle_RequestSoftwareInputPanel_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::RequestSoftwareInputPanel value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyle_RequestSoftwareInputPanel_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::RequestSoftwareInputPanel value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyle_RequestSoftwareInputPanel_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyle_RequestSoftwareInputPanel_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyle_RequestSoftwareInputPanel, + qtscript_QStyle_RequestSoftwareInputPanel_valueOf, qtscript_QStyle_RequestSoftwareInputPanel_toString); + qScriptRegisterMetaType(engine, qtscript_QStyle_RequestSoftwareInputPanel_toScriptValue, + qtscript_QStyle_RequestSoftwareInputPanel_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyle_RequestSoftwareInputPanel_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyle_RequestSoftwareInputPanel_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyle::StandardPixmap +// + +static const QStyle::StandardPixmap qtscript_QStyle_StandardPixmap_values[] = { + QStyle::SP_CustomBase + , QStyle::SP_TitleBarMenuButton + , QStyle::SP_TitleBarMinButton + , QStyle::SP_TitleBarMaxButton + , QStyle::SP_TitleBarCloseButton + , QStyle::SP_TitleBarNormalButton + , QStyle::SP_TitleBarShadeButton + , QStyle::SP_TitleBarUnshadeButton + , QStyle::SP_TitleBarContextHelpButton + , QStyle::SP_DockWidgetCloseButton + , QStyle::SP_MessageBoxInformation + , QStyle::SP_MessageBoxWarning + , QStyle::SP_MessageBoxCritical + , QStyle::SP_MessageBoxQuestion + , QStyle::SP_DesktopIcon + , QStyle::SP_TrashIcon + , QStyle::SP_ComputerIcon + , QStyle::SP_DriveFDIcon + , QStyle::SP_DriveHDIcon + , QStyle::SP_DriveCDIcon + , QStyle::SP_DriveDVDIcon + , QStyle::SP_DriveNetIcon + , QStyle::SP_DirOpenIcon + , QStyle::SP_DirClosedIcon + , QStyle::SP_DirLinkIcon + , QStyle::SP_DirLinkOpenIcon + , QStyle::SP_FileIcon + , QStyle::SP_FileLinkIcon + , QStyle::SP_ToolBarHorizontalExtensionButton + , QStyle::SP_ToolBarVerticalExtensionButton + , QStyle::SP_FileDialogStart + , QStyle::SP_FileDialogEnd + , QStyle::SP_FileDialogToParent + , QStyle::SP_FileDialogNewFolder + , QStyle::SP_FileDialogDetailedView + , QStyle::SP_FileDialogInfoView + , QStyle::SP_FileDialogContentsView + , QStyle::SP_FileDialogListView + , QStyle::SP_FileDialogBack + , QStyle::SP_DirIcon + , QStyle::SP_DialogOkButton + , QStyle::SP_DialogCancelButton + , QStyle::SP_DialogHelpButton + , QStyle::SP_DialogOpenButton + , QStyle::SP_DialogSaveButton + , QStyle::SP_DialogCloseButton + , QStyle::SP_DialogApplyButton + , QStyle::SP_DialogResetButton + , QStyle::SP_DialogDiscardButton + , QStyle::SP_DialogYesButton + , QStyle::SP_DialogNoButton + , QStyle::SP_ArrowUp + , QStyle::SP_ArrowDown + , QStyle::SP_ArrowLeft + , QStyle::SP_ArrowRight + , QStyle::SP_ArrowBack + , QStyle::SP_ArrowForward + , QStyle::SP_DirHomeIcon + , QStyle::SP_CommandLink + , QStyle::SP_VistaShield + , QStyle::SP_BrowserReload + , QStyle::SP_BrowserStop + , QStyle::SP_MediaPlay + , QStyle::SP_MediaStop + , QStyle::SP_MediaPause + , QStyle::SP_MediaSkipForward + , QStyle::SP_MediaSkipBackward + , QStyle::SP_MediaSeekForward + , QStyle::SP_MediaSeekBackward + , QStyle::SP_MediaVolume + , QStyle::SP_MediaVolumeMuted + , QStyle::SP_LineEditClearButton +}; + +static const char * const qtscript_QStyle_StandardPixmap_keys[] = { + "SP_CustomBase" + , "SP_TitleBarMenuButton" + , "SP_TitleBarMinButton" + , "SP_TitleBarMaxButton" + , "SP_TitleBarCloseButton" + , "SP_TitleBarNormalButton" + , "SP_TitleBarShadeButton" + , "SP_TitleBarUnshadeButton" + , "SP_TitleBarContextHelpButton" + , "SP_DockWidgetCloseButton" + , "SP_MessageBoxInformation" + , "SP_MessageBoxWarning" + , "SP_MessageBoxCritical" + , "SP_MessageBoxQuestion" + , "SP_DesktopIcon" + , "SP_TrashIcon" + , "SP_ComputerIcon" + , "SP_DriveFDIcon" + , "SP_DriveHDIcon" + , "SP_DriveCDIcon" + , "SP_DriveDVDIcon" + , "SP_DriveNetIcon" + , "SP_DirOpenIcon" + , "SP_DirClosedIcon" + , "SP_DirLinkIcon" + , "SP_DirLinkOpenIcon" + , "SP_FileIcon" + , "SP_FileLinkIcon" + , "SP_ToolBarHorizontalExtensionButton" + , "SP_ToolBarVerticalExtensionButton" + , "SP_FileDialogStart" + , "SP_FileDialogEnd" + , "SP_FileDialogToParent" + , "SP_FileDialogNewFolder" + , "SP_FileDialogDetailedView" + , "SP_FileDialogInfoView" + , "SP_FileDialogContentsView" + , "SP_FileDialogListView" + , "SP_FileDialogBack" + , "SP_DirIcon" + , "SP_DialogOkButton" + , "SP_DialogCancelButton" + , "SP_DialogHelpButton" + , "SP_DialogOpenButton" + , "SP_DialogSaveButton" + , "SP_DialogCloseButton" + , "SP_DialogApplyButton" + , "SP_DialogResetButton" + , "SP_DialogDiscardButton" + , "SP_DialogYesButton" + , "SP_DialogNoButton" + , "SP_ArrowUp" + , "SP_ArrowDown" + , "SP_ArrowLeft" + , "SP_ArrowRight" + , "SP_ArrowBack" + , "SP_ArrowForward" + , "SP_DirHomeIcon" + , "SP_CommandLink" + , "SP_VistaShield" + , "SP_BrowserReload" + , "SP_BrowserStop" + , "SP_MediaPlay" + , "SP_MediaStop" + , "SP_MediaPause" + , "SP_MediaSkipForward" + , "SP_MediaSkipBackward" + , "SP_MediaSeekForward" + , "SP_MediaSeekBackward" + , "SP_MediaVolume" + , "SP_MediaVolumeMuted" + , "SP_LineEditClearButton" +}; + +static QString qtscript_QStyle_StandardPixmap_toStringHelper(QStyle::StandardPixmap value) +{ + for (int i = 0; i < 72; ++i) { + if (qtscript_QStyle_StandardPixmap_values[i] == value) + return QString::fromLatin1(qtscript_QStyle_StandardPixmap_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QStyle_StandardPixmap_toScriptValue(QScriptEngine *engine, const QStyle::StandardPixmap &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyle")); + return clazz.property(qtscript_QStyle_StandardPixmap_toStringHelper(value)); +} + +static void qtscript_QStyle_StandardPixmap_fromScriptValue(const QScriptValue &value, QStyle::StandardPixmap &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyle_StandardPixmap(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 72; ++i) { + if (qtscript_QStyle_StandardPixmap_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("StandardPixmap(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyle_StandardPixmap_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::StandardPixmap value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyle_StandardPixmap_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::StandardPixmap value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyle_StandardPixmap_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyle_StandardPixmap_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyle_StandardPixmap, + qtscript_QStyle_StandardPixmap_valueOf, qtscript_QStyle_StandardPixmap_toString); + qScriptRegisterMetaType(engine, qtscript_QStyle_StandardPixmap_toScriptValue, + qtscript_QStyle_StandardPixmap_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 72; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyle_StandardPixmap_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyle_StandardPixmap_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyle::StateFlag +// + +static const QStyle::StateFlag qtscript_QStyle_StateFlag_values[] = { + QStyle::State_None + , QStyle::State_Enabled + , QStyle::State_Raised + , QStyle::State_Sunken + , QStyle::State_Off + , QStyle::State_NoChange + , QStyle::State_On + , QStyle::State_DownArrow + , QStyle::State_Horizontal + , QStyle::State_HasFocus + , QStyle::State_Top + , QStyle::State_Bottom + , QStyle::State_FocusAtBorder + , QStyle::State_AutoRaise + , QStyle::State_MouseOver + , QStyle::State_UpArrow + , QStyle::State_Selected + , QStyle::State_Active + , QStyle::State_Window + , QStyle::State_Open + , QStyle::State_Children + , QStyle::State_Item + , QStyle::State_Sibling + , QStyle::State_Editing + , QStyle::State_KeyboardFocusChange + , QStyle::State_ReadOnly + , QStyle::State_Small + , QStyle::State_Mini +}; + +static const char * const qtscript_QStyle_StateFlag_keys[] = { + "State_None" + , "State_Enabled" + , "State_Raised" + , "State_Sunken" + , "State_Off" + , "State_NoChange" + , "State_On" + , "State_DownArrow" + , "State_Horizontal" + , "State_HasFocus" + , "State_Top" + , "State_Bottom" + , "State_FocusAtBorder" + , "State_AutoRaise" + , "State_MouseOver" + , "State_UpArrow" + , "State_Selected" + , "State_Active" + , "State_Window" + , "State_Open" + , "State_Children" + , "State_Item" + , "State_Sibling" + , "State_Editing" + , "State_KeyboardFocusChange" + , "State_ReadOnly" + , "State_Small" + , "State_Mini" +}; + +static QString qtscript_QStyle_StateFlag_toStringHelper(QStyle::StateFlag value) +{ + for (int i = 0; i < 28; ++i) { + if (qtscript_QStyle_StateFlag_values[i] == value) + return QString::fromLatin1(qtscript_QStyle_StateFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QStyle_StateFlag_toScriptValue(QScriptEngine *engine, const QStyle::StateFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyle")); + return clazz.property(qtscript_QStyle_StateFlag_toStringHelper(value)); +} + +static void qtscript_QStyle_StateFlag_fromScriptValue(const QScriptValue &value, QStyle::StateFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyle_StateFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 28; ++i) { + if (qtscript_QStyle_StateFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("StateFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyle_StateFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::StateFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyle_StateFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::StateFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyle_StateFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyle_StateFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyle_StateFlag, + qtscript_QStyle_StateFlag_valueOf, qtscript_QStyle_StateFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QStyle_StateFlag_toScriptValue, + qtscript_QStyle_StateFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 28; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyle_StateFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyle_StateFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyle::State +// + +static QScriptValue qtscript_QStyle_State_toScriptValue(QScriptEngine *engine, const QStyle::State &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QStyle_State_fromScriptValue(const QScriptValue &value, QStyle::State &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QStyle_State(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::State result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("State(): argument %0 is not of type StateFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QStyle_State_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::State value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyle_State_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyle::State value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 28; ++i) { + if ((value & qtscript_QStyle_StateFlag_values[i]) == qtscript_QStyle_StateFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QStyle_StateFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QStyle_State_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QStyle_State_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QStyle_State, qtscript_QStyle_State_valueOf, + qtscript_QStyle_State_toString, qtscript_QStyle_State_equals); + qScriptRegisterMetaType(engine, qtscript_QStyle_State_toScriptValue, + qtscript_QStyle_State_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QStyle +// + +static QScriptValue qtscript_QStyle_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 21; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyle* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyle.%0(): this object is not a QStyle") + .arg(qtscript_QStyle_function_names[_id+7])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 3) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + Qt::Orientation _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_result = _q_self->combinedLayoutSpacing(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + Qt::Orientation _q_arg2 = qscriptvalue_cast(context->argument(2)); + QStyleOption* _q_arg3 = qscriptvalue_cast(context->argument(3)); + int _q_result = _q_self->combinedLayoutSpacing(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + Qt::Orientation _q_arg2 = qscriptvalue_cast(context->argument(2)); + QStyleOption* _q_arg3 = qscriptvalue_cast(context->argument(3)); + QWidget* _q_arg4 = qscriptvalue_cast(context->argument(4)); + int _q_result = _q_self->combinedLayoutSpacing(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 3) { + QStyle::ComplexControl _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOptionComplex* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPainter* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawComplexControl(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + QStyle::ComplexControl _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOptionComplex* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPainter* _q_arg2 = qscriptvalue_cast(context->argument(2)); + const QWidget* _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->drawComplexControl(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 3) { + QStyle::ControlElement _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPainter* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawControl(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + QStyle::ControlElement _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPainter* _q_arg2 = qscriptvalue_cast(context->argument(2)); + const QWidget* _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->drawControl(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 4) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QPixmap _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->drawItemPixmap(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 6) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QPalette _q_arg3 = qscriptvalue_cast(context->argument(3)); + bool _q_arg4 = context->argument(4).toBoolean(); + QString _q_arg5 = context->argument(5).toString(); + _q_self->drawItemText(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 7) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QPalette _q_arg3 = qscriptvalue_cast(context->argument(3)); + bool _q_arg4 = context->argument(4).toBoolean(); + QString _q_arg5 = context->argument(5).toString(); + QPalette::ColorRole _q_arg6 = qscriptvalue_cast(context->argument(6)); + _q_self->drawItemText(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5, _q_arg6); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 3) { + QStyle::PrimitiveElement _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPainter* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawPrimitive(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + QStyle::PrimitiveElement _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPainter* _q_arg2 = qscriptvalue_cast(context->argument(2)); + const QWidget* _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->drawPrimitive(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 3) { + QIcon::Mode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + const QStyleOption* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QPixmap _q_result = _q_self->generatedIconPixmap(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 3) { + QStyle::ComplexControl _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOptionComplex* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPoint _q_arg2 = qscriptvalue_cast(context->argument(2)); + QStyle::SubControl _q_result = _q_self->hitTestComplexControl(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QStyle::ComplexControl _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOptionComplex* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPoint _q_arg2 = qscriptvalue_cast(context->argument(2)); + const QWidget* _q_arg3 = qscriptvalue_cast(context->argument(3)); + QStyle::SubControl _q_result = _q_self->hitTestComplexControl(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 3) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QPixmap _q_arg2 = qscriptvalue_cast(context->argument(2)); + QRect _q_result = _q_self->itemPixmapRect(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 3) { + QSizePolicy::ControlType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizePolicy::ControlType _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::Orientation _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_result = _q_self->layoutSpacing(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QSizePolicy::ControlType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizePolicy::ControlType _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::Orientation _q_arg2 = qscriptvalue_cast(context->argument(2)); + const QStyleOption* _q_arg3 = qscriptvalue_cast(context->argument(3)); + int _q_result = _q_self->layoutSpacing(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + QSizePolicy::ControlType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizePolicy::ControlType _q_arg1 = qscriptvalue_cast(context->argument(1)); + Qt::Orientation _q_arg2 = qscriptvalue_cast(context->argument(2)); + const QStyleOption* _q_arg3 = qscriptvalue_cast(context->argument(3)); + const QWidget* _q_arg4 = qscriptvalue_cast(context->argument(4)); + int _q_result = _q_self->layoutSpacing(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QStyle::PixelMetric _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->pixelMetric(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QStyle::PixelMetric _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_result = _q_self->pixelMetric(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QStyle::PixelMetric _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + const QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_result = _q_self->pixelMetric(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QApplication* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->polish(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QPalette _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->polish(_q_arg0); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->polish(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 12: + if (context->argumentCount() == 0) { + const QStyle* _q_result = const_cast(_q_self->proxy()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 3) { + QStyle::ContentsType _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QSize _q_arg2 = qscriptvalue_cast(context->argument(2)); + QSize _q_result = _q_self->sizeFromContents(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QStyle::ContentsType _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QSize _q_arg2 = qscriptvalue_cast(context->argument(2)); + const QWidget* _q_arg3 = qscriptvalue_cast(context->argument(3)); + QSize _q_result = _q_self->sizeFromContents(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QStyle::StandardPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIcon _q_result = _q_self->standardIcon(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QStyle::StandardPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QIcon _q_result = _q_self->standardIcon(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QStyle::StandardPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + const QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QIcon _q_result = _q_self->standardIcon(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QPalette _q_result = _q_self->standardPalette(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QStyle::StandardPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_result = _q_self->standardPixmap(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QStyle::StandardPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPixmap _q_result = _q_self->standardPixmap(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QStyle::StandardPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + const QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QPixmap _q_result = _q_self->standardPixmap(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QStyle::StyleHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->styleHint(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QStyle::StyleHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_result = _q_self->styleHint(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QStyle::StyleHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + const QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int _q_result = _q_self->styleHint(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QStyle::StyleHint _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + const QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QStyleHintReturn* _q_arg3 = qscriptvalue_cast(context->argument(3)); + int _q_result = _q_self->styleHint(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 3) { + QStyle::ComplexControl _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOptionComplex* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QStyle::SubControl _q_arg2 = qscriptvalue_cast(context->argument(2)); + QRect _q_result = _q_self->subControlRect(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + QStyle::ComplexControl _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOptionComplex* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QStyle::SubControl _q_arg2 = qscriptvalue_cast(context->argument(2)); + const QWidget* _q_arg3 = qscriptvalue_cast(context->argument(3)); + QRect _q_result = _q_self->subControlRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 2) { + QStyle::SubElement _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRect _q_result = _q_self->subElementRect(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QStyle::SubElement _q_arg0 = qscriptvalue_cast(context->argument(0)); + const QStyleOption* _q_arg1 = qscriptvalue_cast(context->argument(1)); + const QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QRect _q_result = _q_self->subElementRect(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QApplication* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->unpolish(_q_arg0); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->unpolish(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 21: { + QString result = QString::fromLatin1("QStyle"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyle_throw_ambiguity_error_helper(context, + qtscript_QStyle_function_names[_id+7], + qtscript_QStyle_function_signatures[_id+7]); +} + +static QScriptValue qtscript_QStyle_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyle(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyle* _q_cpp_result = new QtScriptShell_QStyle(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStyle*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 4) { + Qt::LayoutDirection _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QSize _q_arg2 = qscriptvalue_cast(context->argument(2)); + QRect _q_arg3 = qscriptvalue_cast(context->argument(3)); + QRect _q_result = QStyle::alignedRect(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_result = QStyle::sliderPositionFromValue(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + bool _q_arg4 = context->argument(4).toBoolean(); + int _q_result = QStyle::sliderPositionFromValue(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + int _q_result = QStyle::sliderValueFromPosition(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 5) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + bool _q_arg4 = context->argument(4).toBoolean(); + int _q_result = QStyle::sliderValueFromPosition(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 2) { + Qt::LayoutDirection _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QFlags _q_result = QStyle::visualAlignment(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 3) { + Qt::LayoutDirection _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPoint _q_arg2 = qscriptvalue_cast(context->argument(2)); + QPoint _q_result = QStyle::visualPos(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 3) { + Qt::LayoutDirection _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRect _q_arg2 = qscriptvalue_cast(context->argument(2)); + QRect _q_result = QStyle::visualRect(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyle_throw_ambiguity_error_helper(context, + qtscript_QStyle_function_names[_id], + qtscript_QStyle_function_signatures[_id]); +} + +static QScriptValue qtscript_QStyle_toScriptValue(QScriptEngine *engine, QStyle* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QStyle_fromScriptValue(const QScriptValue &value, QStyle* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QStyle_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyle*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 22; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStyle_prototype_call, qtscript_QStyle_function_lengths[i+7]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStyle_function_names[i+7]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QStyle_toScriptValue, + qtscript_QStyle_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyle_static_call, proto, qtscript_QStyle_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStyle_static_call, + qtscript_QStyle_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QStyle_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("ComplexControl"), + qtscript_create_QStyle_ComplexControl_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("PrimitiveElement"), + qtscript_create_QStyle_PrimitiveElement_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ControlElement"), + qtscript_create_QStyle_ControlElement_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("PixelMetric"), + qtscript_create_QStyle_PixelMetric_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ContentsType"), + qtscript_create_QStyle_ContentsType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("SubElement"), + qtscript_create_QStyle_SubElement_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("RequestSoftwareInputPanel"), + qtscript_create_QStyle_RequestSoftwareInputPanel_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StandardPixmap"), + qtscript_create_QStyle_StandardPixmap_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StateFlag"), + qtscript_create_QStyle_StateFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("State"), + qtscript_create_QStyle_State_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleFactory.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleFactory.cpp new file mode 100644 index 00000000..fe85fd1f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleFactory.cpp @@ -0,0 +1,156 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleFactory.h" + +static const char * const qtscript_QStyleFactory_function_names[] = { + "QStyleFactory" + // static + , "create" + , "keys" + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleFactory_function_signatures[] = { + "" + // static + , "String arg__1" + , "" + // prototype +"" +}; + +static const int qtscript_QStyleFactory_function_lengths[] = { + 0 + // static + , 1 + , 0 + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleFactory_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleFactory::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleFactory*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleFactory*) +Q_DECLARE_METATYPE(QStyle*) + +// +// QStyleFactory +// + +static QScriptValue qtscript_QStyleFactory_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleFactory* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleFactory.%0(): this object is not a QStyleFactory") + .arg(qtscript_QStyleFactory_function_names[_id+3])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleFactory"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleFactory_throw_ambiguity_error_helper(context, + qtscript_QStyleFactory_function_names[_id+3], + qtscript_QStyleFactory_function_signatures[_id+3]); +} + +static QScriptValue qtscript_QStyleFactory_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleFactory(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleFactory* _q_cpp_result = new QtScriptShell_QStyleFactory(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleFactory*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QStyle* _q_result = QStyleFactory::create(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QStringList _q_result = QStyleFactory::keys(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleFactory_throw_ambiguity_error_helper(context, + qtscript_QStyleFactory_function_names[_id], + qtscript_QStyleFactory_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleFactory_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleFactory*)0)); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleFactory_static_call, proto, qtscript_QStyleFactory_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStyleFactory_static_call, + qtscript_QStyleFactory_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QStyleFactory_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleHintReturn.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleHintReturn.cpp new file mode 100644 index 00000000..48907efc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleHintReturn.cpp @@ -0,0 +1,360 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QStyleHintReturn.h" + +static const char * const qtscript_QStyleHintReturn_function_names[] = { + "QStyleHintReturn" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleHintReturn_function_signatures[] = { + "int version, int type" + // static + // prototype +"" +}; + +static const int qtscript_QStyleHintReturn_function_lengths[] = { + 2 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleHintReturn_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleHintReturn::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleHintReturn*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleHintReturn*) +Q_DECLARE_METATYPE(QStyleHintReturn::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleHintReturn::HintReturnType) +Q_DECLARE_METATYPE(QStyleHintReturn::StyleOptionType) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleHintReturn::StyleOptionVersion +// + +static const QStyleHintReturn::StyleOptionVersion qtscript_QStyleHintReturn_StyleOptionVersion_values[] = { + QStyleHintReturn::Version +}; + +static const char * const qtscript_QStyleHintReturn_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleHintReturn_StyleOptionVersion_toStringHelper(QStyleHintReturn::StyleOptionVersion value) +{ + if ((value >= QStyleHintReturn::Version) && (value <= QStyleHintReturn::Version)) + return qtscript_QStyleHintReturn_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleHintReturn::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleHintReturn_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleHintReturn::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleHintReturn")); + return clazz.property(qtscript_QStyleHintReturn_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleHintReturn_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleHintReturn::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleHintReturn_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleHintReturn::Version) && (arg <= QStyleHintReturn::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleHintReturn_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleHintReturn::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleHintReturn_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleHintReturn::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleHintReturn_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleHintReturn_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleHintReturn_StyleOptionVersion, + qtscript_QStyleHintReturn_StyleOptionVersion_valueOf, qtscript_QStyleHintReturn_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleHintReturn_StyleOptionVersion_toScriptValue, + qtscript_QStyleHintReturn_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleHintReturn_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleHintReturn_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleHintReturn::HintReturnType +// + +static const QStyleHintReturn::HintReturnType qtscript_QStyleHintReturn_HintReturnType_values[] = { + QStyleHintReturn::SH_Default + , QStyleHintReturn::SH_Mask + , QStyleHintReturn::SH_Variant +}; + +static const char * const qtscript_QStyleHintReturn_HintReturnType_keys[] = { + "SH_Default" + , "SH_Mask" + , "SH_Variant" +}; + +static QString qtscript_QStyleHintReturn_HintReturnType_toStringHelper(QStyleHintReturn::HintReturnType value) +{ + if ((value >= QStyleHintReturn::SH_Default) && (value <= QStyleHintReturn::SH_Variant)) + return qtscript_QStyleHintReturn_HintReturnType_keys[static_cast(value)-static_cast(QStyleHintReturn::SH_Default)]; + return QString(); +} + +static QScriptValue qtscript_QStyleHintReturn_HintReturnType_toScriptValue(QScriptEngine *engine, const QStyleHintReturn::HintReturnType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleHintReturn")); + return clazz.property(qtscript_QStyleHintReturn_HintReturnType_toStringHelper(value)); +} + +static void qtscript_QStyleHintReturn_HintReturnType_fromScriptValue(const QScriptValue &value, QStyleHintReturn::HintReturnType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleHintReturn_HintReturnType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleHintReturn::SH_Default) && (arg <= QStyleHintReturn::SH_Variant)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("HintReturnType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleHintReturn_HintReturnType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleHintReturn::HintReturnType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleHintReturn_HintReturnType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleHintReturn::HintReturnType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleHintReturn_HintReturnType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleHintReturn_HintReturnType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleHintReturn_HintReturnType, + qtscript_QStyleHintReturn_HintReturnType_valueOf, qtscript_QStyleHintReturn_HintReturnType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleHintReturn_HintReturnType_toScriptValue, + qtscript_QStyleHintReturn_HintReturnType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleHintReturn_HintReturnType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleHintReturn_HintReturnType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleHintReturn::StyleOptionType +// + +static const QStyleHintReturn::StyleOptionType qtscript_QStyleHintReturn_StyleOptionType_values[] = { + QStyleHintReturn::Type +}; + +static const char * const qtscript_QStyleHintReturn_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleHintReturn_StyleOptionType_toStringHelper(QStyleHintReturn::StyleOptionType value) +{ + if ((value >= QStyleHintReturn::Type) && (value <= QStyleHintReturn::Type)) + return qtscript_QStyleHintReturn_StyleOptionType_keys[static_cast(value)-static_cast(QStyleHintReturn::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleHintReturn_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleHintReturn::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleHintReturn")); + return clazz.property(qtscript_QStyleHintReturn_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleHintReturn_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleHintReturn::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleHintReturn_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleHintReturn::Type) && (arg <= QStyleHintReturn::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleHintReturn_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleHintReturn::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleHintReturn_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleHintReturn::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleHintReturn_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleHintReturn_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleHintReturn_StyleOptionType, + qtscript_QStyleHintReturn_StyleOptionType_valueOf, qtscript_QStyleHintReturn_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleHintReturn_StyleOptionType_toScriptValue, + qtscript_QStyleHintReturn_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleHintReturn_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleHintReturn_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleHintReturn +// + +static QScriptValue qtscript_QStyleHintReturn_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleHintReturn* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleHintReturn.%0(): this object is not a QStyleHintReturn") + .arg(qtscript_QStyleHintReturn_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleHintReturn"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleHintReturn_throw_ambiguity_error_helper(context, + qtscript_QStyleHintReturn_function_names[_id+1], + qtscript_QStyleHintReturn_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleHintReturn_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleHintReturn(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleHintReturn* _q_cpp_result = new QtScriptShell_QStyleHintReturn(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleHintReturn*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QtScriptShell_QStyleHintReturn* _q_cpp_result = new QtScriptShell_QStyleHintReturn(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleHintReturn*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QStyleHintReturn* _q_cpp_result = new QtScriptShell_QStyleHintReturn(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleHintReturn*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleHintReturn_throw_ambiguity_error_helper(context, + qtscript_QStyleHintReturn_function_names[_id], + qtscript_QStyleHintReturn_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleHintReturn_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleHintReturn*)0)); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleHintReturn_static_call, proto, qtscript_QStyleHintReturn_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleHintReturn_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("HintReturnType"), + qtscript_create_QStyleHintReturn_HintReturnType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleHintReturn_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleHintReturnMask.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleHintReturnMask.cpp new file mode 100644 index 00000000..5fed500b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleHintReturnMask.cpp @@ -0,0 +1,277 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QStyleHintReturnMask.h" + +static const char * const qtscript_QStyleHintReturnMask_function_names[] = { + "QStyleHintReturnMask" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleHintReturnMask_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QStyleHintReturnMask_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleHintReturnMask_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleHintReturnMask::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleHintReturnMask*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleHintReturnMask*) +Q_DECLARE_METATYPE(QStyleHintReturnMask::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleHintReturnMask::StyleOptionType) +Q_DECLARE_METATYPE(QStyleHintReturn*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleHintReturnMask::StyleOptionVersion +// + +static const QStyleHintReturnMask::StyleOptionVersion qtscript_QStyleHintReturnMask_StyleOptionVersion_values[] = { + QStyleHintReturnMask::Version +}; + +static const char * const qtscript_QStyleHintReturnMask_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleHintReturnMask_StyleOptionVersion_toStringHelper(QStyleHintReturnMask::StyleOptionVersion value) +{ + if ((value >= QStyleHintReturnMask::Version) && (value <= QStyleHintReturnMask::Version)) + return qtscript_QStyleHintReturnMask_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleHintReturnMask::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleHintReturnMask_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleHintReturnMask::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleHintReturnMask")); + return clazz.property(qtscript_QStyleHintReturnMask_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleHintReturnMask_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleHintReturnMask::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleHintReturnMask_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleHintReturnMask::Version) && (arg <= QStyleHintReturnMask::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleHintReturnMask_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleHintReturnMask::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleHintReturnMask_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleHintReturnMask::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleHintReturnMask_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleHintReturnMask_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleHintReturnMask_StyleOptionVersion, + qtscript_QStyleHintReturnMask_StyleOptionVersion_valueOf, qtscript_QStyleHintReturnMask_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleHintReturnMask_StyleOptionVersion_toScriptValue, + qtscript_QStyleHintReturnMask_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleHintReturnMask_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleHintReturnMask_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleHintReturnMask::StyleOptionType +// + +static const QStyleHintReturnMask::StyleOptionType qtscript_QStyleHintReturnMask_StyleOptionType_values[] = { + QStyleHintReturnMask::Type +}; + +static const char * const qtscript_QStyleHintReturnMask_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleHintReturnMask_StyleOptionType_toStringHelper(QStyleHintReturnMask::StyleOptionType value) +{ + if ((value >= QStyleHintReturnMask::Type) && (value <= QStyleHintReturnMask::Type)) + return qtscript_QStyleHintReturnMask_StyleOptionType_keys[static_cast(value)-static_cast(QStyleHintReturnMask::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleHintReturnMask_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleHintReturnMask::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleHintReturnMask")); + return clazz.property(qtscript_QStyleHintReturnMask_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleHintReturnMask_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleHintReturnMask::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleHintReturnMask_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleHintReturnMask::Type) && (arg <= QStyleHintReturnMask::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleHintReturnMask_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleHintReturnMask::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleHintReturnMask_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleHintReturnMask::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleHintReturnMask_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleHintReturnMask_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleHintReturnMask_StyleOptionType, + qtscript_QStyleHintReturnMask_StyleOptionType_valueOf, qtscript_QStyleHintReturnMask_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleHintReturnMask_StyleOptionType_toScriptValue, + qtscript_QStyleHintReturnMask_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleHintReturnMask_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleHintReturnMask_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleHintReturnMask +// + +static QScriptValue qtscript_QStyleHintReturnMask_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleHintReturnMask* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleHintReturnMask.%0(): this object is not a QStyleHintReturnMask") + .arg(qtscript_QStyleHintReturnMask_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleHintReturnMask"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleHintReturnMask_throw_ambiguity_error_helper(context, + qtscript_QStyleHintReturnMask_function_names[_id+1], + qtscript_QStyleHintReturnMask_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleHintReturnMask_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleHintReturnMask(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleHintReturnMask* _q_cpp_result = new QtScriptShell_QStyleHintReturnMask(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleHintReturnMask*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleHintReturnMask_throw_ambiguity_error_helper(context, + qtscript_QStyleHintReturnMask_function_names[_id], + qtscript_QStyleHintReturnMask_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleHintReturnMask_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleHintReturnMask*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleHintReturnMask_static_call, proto, qtscript_QStyleHintReturnMask_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleHintReturnMask_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleHintReturnMask_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleHintReturnVariant.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleHintReturnVariant.cpp new file mode 100644 index 00000000..31dd9f7d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleHintReturnVariant.cpp @@ -0,0 +1,277 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QStyleHintReturnVariant.h" + +static const char * const qtscript_QStyleHintReturnVariant_function_names[] = { + "QStyleHintReturnVariant" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleHintReturnVariant_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QStyleHintReturnVariant_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleHintReturnVariant_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleHintReturnVariant::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleHintReturnVariant*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleHintReturnVariant*) +Q_DECLARE_METATYPE(QStyleHintReturnVariant::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleHintReturnVariant::StyleOptionType) +Q_DECLARE_METATYPE(QStyleHintReturn*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleHintReturnVariant::StyleOptionVersion +// + +static const QStyleHintReturnVariant::StyleOptionVersion qtscript_QStyleHintReturnVariant_StyleOptionVersion_values[] = { + QStyleHintReturnVariant::Version +}; + +static const char * const qtscript_QStyleHintReturnVariant_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleHintReturnVariant_StyleOptionVersion_toStringHelper(QStyleHintReturnVariant::StyleOptionVersion value) +{ + if ((value >= QStyleHintReturnVariant::Version) && (value <= QStyleHintReturnVariant::Version)) + return qtscript_QStyleHintReturnVariant_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleHintReturnVariant::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleHintReturnVariant_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleHintReturnVariant::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleHintReturnVariant")); + return clazz.property(qtscript_QStyleHintReturnVariant_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleHintReturnVariant_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleHintReturnVariant::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleHintReturnVariant_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleHintReturnVariant::Version) && (arg <= QStyleHintReturnVariant::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleHintReturnVariant_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleHintReturnVariant::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleHintReturnVariant_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleHintReturnVariant::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleHintReturnVariant_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleHintReturnVariant_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleHintReturnVariant_StyleOptionVersion, + qtscript_QStyleHintReturnVariant_StyleOptionVersion_valueOf, qtscript_QStyleHintReturnVariant_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleHintReturnVariant_StyleOptionVersion_toScriptValue, + qtscript_QStyleHintReturnVariant_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleHintReturnVariant_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleHintReturnVariant_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleHintReturnVariant::StyleOptionType +// + +static const QStyleHintReturnVariant::StyleOptionType qtscript_QStyleHintReturnVariant_StyleOptionType_values[] = { + QStyleHintReturnVariant::Type +}; + +static const char * const qtscript_QStyleHintReturnVariant_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleHintReturnVariant_StyleOptionType_toStringHelper(QStyleHintReturnVariant::StyleOptionType value) +{ + if ((value >= QStyleHintReturnVariant::Type) && (value <= QStyleHintReturnVariant::Type)) + return qtscript_QStyleHintReturnVariant_StyleOptionType_keys[static_cast(value)-static_cast(QStyleHintReturnVariant::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleHintReturnVariant_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleHintReturnVariant::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleHintReturnVariant")); + return clazz.property(qtscript_QStyleHintReturnVariant_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleHintReturnVariant_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleHintReturnVariant::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleHintReturnVariant_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleHintReturnVariant::Type) && (arg <= QStyleHintReturnVariant::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleHintReturnVariant_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleHintReturnVariant::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleHintReturnVariant_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleHintReturnVariant::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleHintReturnVariant_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleHintReturnVariant_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleHintReturnVariant_StyleOptionType, + qtscript_QStyleHintReturnVariant_StyleOptionType_valueOf, qtscript_QStyleHintReturnVariant_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleHintReturnVariant_StyleOptionType_toScriptValue, + qtscript_QStyleHintReturnVariant_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleHintReturnVariant_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleHintReturnVariant_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleHintReturnVariant +// + +static QScriptValue qtscript_QStyleHintReturnVariant_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleHintReturnVariant* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleHintReturnVariant.%0(): this object is not a QStyleHintReturnVariant") + .arg(qtscript_QStyleHintReturnVariant_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleHintReturnVariant"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleHintReturnVariant_throw_ambiguity_error_helper(context, + qtscript_QStyleHintReturnVariant_function_names[_id+1], + qtscript_QStyleHintReturnVariant_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleHintReturnVariant_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleHintReturnVariant(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleHintReturnVariant* _q_cpp_result = new QtScriptShell_QStyleHintReturnVariant(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleHintReturnVariant*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleHintReturnVariant_throw_ambiguity_error_helper(context, + qtscript_QStyleHintReturnVariant_function_names[_id], + qtscript_QStyleHintReturnVariant_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleHintReturnVariant_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleHintReturnVariant*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleHintReturnVariant_static_call, proto, qtscript_QStyleHintReturnVariant_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleHintReturnVariant_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleHintReturnVariant_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOption.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOption.cpp new file mode 100644 index 00000000..aefad6a7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOption.cpp @@ -0,0 +1,453 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOption.h" + +static const char * const qtscript_QStyleOption_function_names[] = { + "QStyleOption" + // static + // prototype + , "initFrom" + , "state" + , "toString" +}; + +static const char * const qtscript_QStyleOption_function_signatures[] = { + "QStyleOption other\nint version, int type" + // static + // prototype + , "QWidget w" + , "" +"" +}; + +static const int qtscript_QStyleOption_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QStyleOption_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOption::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOption) +Q_DECLARE_METATYPE(QStyleOption*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOption) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOption*) +Q_DECLARE_METATYPE(QStyleOption::OptionType) +Q_DECLARE_METATYPE(QStyleOption::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOption::StyleOptionType) +Q_DECLARE_METATYPE(const QWidget*) +Q_DECLARE_METATYPE(QStyle::StateFlag) +Q_DECLARE_METATYPE(QFlags) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOption::OptionType +// + +static const QStyleOption::OptionType qtscript_QStyleOption_OptionType_values[] = { + QStyleOption::SO_Default + , QStyleOption::SO_FocusRect + , QStyleOption::SO_Button + , QStyleOption::SO_Tab + , QStyleOption::SO_MenuItem + , QStyleOption::SO_Frame + , QStyleOption::SO_ProgressBar + , QStyleOption::SO_ToolBox + , QStyleOption::SO_Header + , QStyleOption::SO_DockWidget + , QStyleOption::SO_ViewItem + , QStyleOption::SO_TabWidgetFrame + , QStyleOption::SO_TabBarBase + , QStyleOption::SO_RubberBand + , QStyleOption::SO_ToolBar + , QStyleOption::SO_GraphicsItem + , QStyleOption::SO_CustomBase + , QStyleOption::SO_Complex + , QStyleOption::SO_Slider + , QStyleOption::SO_SpinBox + , QStyleOption::SO_ToolButton + , QStyleOption::SO_ComboBox + , QStyleOption::SO_TitleBar + , QStyleOption::SO_GroupBox + , QStyleOption::SO_SizeGrip + , QStyleOption::SO_ComplexCustomBase +}; + +static const char * const qtscript_QStyleOption_OptionType_keys[] = { + "SO_Default" + , "SO_FocusRect" + , "SO_Button" + , "SO_Tab" + , "SO_MenuItem" + , "SO_Frame" + , "SO_ProgressBar" + , "SO_ToolBox" + , "SO_Header" + , "SO_DockWidget" + , "SO_ViewItem" + , "SO_TabWidgetFrame" + , "SO_TabBarBase" + , "SO_RubberBand" + , "SO_ToolBar" + , "SO_GraphicsItem" + , "SO_CustomBase" + , "SO_Complex" + , "SO_Slider" + , "SO_SpinBox" + , "SO_ToolButton" + , "SO_ComboBox" + , "SO_TitleBar" + , "SO_GroupBox" + , "SO_SizeGrip" + , "SO_ComplexCustomBase" +}; + +static QString qtscript_QStyleOption_OptionType_toStringHelper(QStyleOption::OptionType value) +{ + for (int i = 0; i < 26; ++i) { + if (qtscript_QStyleOption_OptionType_values[i] == value) + return QString::fromLatin1(qtscript_QStyleOption_OptionType_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QStyleOption_OptionType_toScriptValue(QScriptEngine *engine, const QStyleOption::OptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOption")); + return clazz.property(qtscript_QStyleOption_OptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOption_OptionType_fromScriptValue(const QScriptValue &value, QStyleOption::OptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOption_OptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 26; ++i) { + if (qtscript_QStyleOption_OptionType_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("OptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOption_OptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOption::OptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOption_OptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOption::OptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOption_OptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOption_OptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOption_OptionType, + qtscript_QStyleOption_OptionType_valueOf, qtscript_QStyleOption_OptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOption_OptionType_toScriptValue, + qtscript_QStyleOption_OptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 26; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOption_OptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOption_OptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOption::StyleOptionVersion +// + +static const QStyleOption::StyleOptionVersion qtscript_QStyleOption_StyleOptionVersion_values[] = { + QStyleOption::Version +}; + +static const char * const qtscript_QStyleOption_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOption_StyleOptionVersion_toStringHelper(QStyleOption::StyleOptionVersion value) +{ + if ((value >= QStyleOption::Version) && (value <= QStyleOption::Version)) + return qtscript_QStyleOption_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOption::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOption_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOption::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOption")); + return clazz.property(qtscript_QStyleOption_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOption_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOption::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOption_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOption::Version) && (arg <= QStyleOption::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOption_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOption::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOption_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOption::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOption_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOption_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOption_StyleOptionVersion, + qtscript_QStyleOption_StyleOptionVersion_valueOf, qtscript_QStyleOption_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOption_StyleOptionVersion_toScriptValue, + qtscript_QStyleOption_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOption_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOption_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOption::StyleOptionType +// + +static const QStyleOption::StyleOptionType qtscript_QStyleOption_StyleOptionType_values[] = { + QStyleOption::Type +}; + +static const char * const qtscript_QStyleOption_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOption_StyleOptionType_toStringHelper(QStyleOption::StyleOptionType value) +{ + if ((value >= QStyleOption::Type) && (value <= QStyleOption::Type)) + return qtscript_QStyleOption_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOption::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOption_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOption::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOption")); + return clazz.property(qtscript_QStyleOption_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOption_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOption::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOption_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOption::Type) && (arg <= QStyleOption::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOption_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOption::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOption_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOption::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOption_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOption_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOption_StyleOptionType, + qtscript_QStyleOption_StyleOptionType_valueOf, qtscript_QStyleOption_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOption_StyleOptionType_toScriptValue, + qtscript_QStyleOption_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOption_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOption_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOption +// + +static QScriptValue qtscript_QStyleOption_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOption* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOption.%0(): this object is not a QStyleOption") + .arg(qtscript_QStyleOption_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + const QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->initFrom(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: { + QFlags result = _q_self->state; + return qScriptValueFromValue(context->engine(), result); + } + + case 2: { + QString result; + QDebug d(&result); + d << *_q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOption_throw_ambiguity_error_helper(context, + qtscript_QStyleOption_function_names[_id+1], + qtscript_QStyleOption_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOption_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOption(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOption _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOption)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QStyleOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOption _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOption)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QtScriptShell_QStyleOption _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOption)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QStyleOption _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOption)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOption_throw_ambiguity_error_helper(context, + qtscript_QStyleOption_function_names[_id], + qtscript_QStyleOption_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOption_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOption*)0)); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStyleOption_prototype_call, qtscript_QStyleOption_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStyleOption_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOption_static_call, proto, qtscript_QStyleOption_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("OptionType"), + qtscript_create_QStyleOption_OptionType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOption_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOption_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionButton.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionButton.cpp new file mode 100644 index 00000000..bb1f80fa --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionButton.cpp @@ -0,0 +1,466 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionButton.h" + +static const char * const qtscript_QStyleOptionButton_function_names[] = { + "QStyleOptionButton" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionButton_function_signatures[] = { + "\nQStyleOptionButton other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionButton_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionButton_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionButton::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionButton) +Q_DECLARE_METATYPE(QStyleOptionButton*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionButton) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionButton*) +Q_DECLARE_METATYPE(QStyleOptionButton::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionButton::ButtonFeature) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QStyleOptionButton::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOption*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QStyleOptionButton::StyleOptionVersion +// + +static const QStyleOptionButton::StyleOptionVersion qtscript_QStyleOptionButton_StyleOptionVersion_values[] = { + QStyleOptionButton::Version +}; + +static const char * const qtscript_QStyleOptionButton_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionButton_StyleOptionVersion_toStringHelper(QStyleOptionButton::StyleOptionVersion value) +{ + if ((value >= QStyleOptionButton::Version) && (value <= QStyleOptionButton::Version)) + return qtscript_QStyleOptionButton_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionButton::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionButton_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionButton::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionButton")); + return clazz.property(qtscript_QStyleOptionButton_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionButton_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionButton::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionButton_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionButton::Version) && (arg <= QStyleOptionButton::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionButton_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionButton::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionButton_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionButton::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionButton_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionButton_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionButton_StyleOptionVersion, + qtscript_QStyleOptionButton_StyleOptionVersion_valueOf, qtscript_QStyleOptionButton_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionButton_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionButton_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionButton_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionButton_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionButton::ButtonFeature +// + +static const QStyleOptionButton::ButtonFeature qtscript_QStyleOptionButton_ButtonFeature_values[] = { + QStyleOptionButton::None + , QStyleOptionButton::Flat + , QStyleOptionButton::HasMenu + , QStyleOptionButton::DefaultButton + , QStyleOptionButton::AutoDefaultButton + , QStyleOptionButton::CommandLinkButton +}; + +static const char * const qtscript_QStyleOptionButton_ButtonFeature_keys[] = { + "None" + , "Flat" + , "HasMenu" + , "DefaultButton" + , "AutoDefaultButton" + , "CommandLinkButton" +}; + +static QString qtscript_QStyleOptionButton_ButtonFeature_toStringHelper(QStyleOptionButton::ButtonFeature value) +{ + for (int i = 0; i < 6; ++i) { + if (qtscript_QStyleOptionButton_ButtonFeature_values[i] == value) + return QString::fromLatin1(qtscript_QStyleOptionButton_ButtonFeature_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QStyleOptionButton_ButtonFeature_toScriptValue(QScriptEngine *engine, const QStyleOptionButton::ButtonFeature &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionButton")); + return clazz.property(qtscript_QStyleOptionButton_ButtonFeature_toStringHelper(value)); +} + +static void qtscript_QStyleOptionButton_ButtonFeature_fromScriptValue(const QScriptValue &value, QStyleOptionButton::ButtonFeature &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionButton_ButtonFeature(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 6; ++i) { + if (qtscript_QStyleOptionButton_ButtonFeature_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ButtonFeature(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionButton_ButtonFeature_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionButton::ButtonFeature value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionButton_ButtonFeature_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionButton::ButtonFeature value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionButton_ButtonFeature_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionButton_ButtonFeature_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionButton_ButtonFeature, + qtscript_QStyleOptionButton_ButtonFeature_valueOf, qtscript_QStyleOptionButton_ButtonFeature_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionButton_ButtonFeature_toScriptValue, + qtscript_QStyleOptionButton_ButtonFeature_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionButton_ButtonFeature_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionButton_ButtonFeature_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionButton::ButtonFeatures +// + +static QScriptValue qtscript_QStyleOptionButton_ButtonFeatures_toScriptValue(QScriptEngine *engine, const QStyleOptionButton::ButtonFeatures &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QStyleOptionButton_ButtonFeatures_fromScriptValue(const QScriptValue &value, QStyleOptionButton::ButtonFeatures &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QStyleOptionButton_ButtonFeatures(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionButton::ButtonFeatures result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("ButtonFeatures(): argument %0 is not of type ButtonFeature").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QStyleOptionButton_ButtonFeatures_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionButton::ButtonFeatures value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionButton_ButtonFeatures_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionButton::ButtonFeatures value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 6; ++i) { + if ((value & qtscript_QStyleOptionButton_ButtonFeature_values[i]) == qtscript_QStyleOptionButton_ButtonFeature_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QStyleOptionButton_ButtonFeature_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QStyleOptionButton_ButtonFeatures_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QStyleOptionButton_ButtonFeatures_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QStyleOptionButton_ButtonFeatures, qtscript_QStyleOptionButton_ButtonFeatures_valueOf, + qtscript_QStyleOptionButton_ButtonFeatures_toString, qtscript_QStyleOptionButton_ButtonFeatures_equals); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionButton_ButtonFeatures_toScriptValue, + qtscript_QStyleOptionButton_ButtonFeatures_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QStyleOptionButton::StyleOptionType +// + +static const QStyleOptionButton::StyleOptionType qtscript_QStyleOptionButton_StyleOptionType_values[] = { + QStyleOptionButton::Type +}; + +static const char * const qtscript_QStyleOptionButton_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionButton_StyleOptionType_toStringHelper(QStyleOptionButton::StyleOptionType value) +{ + if ((value >= QStyleOptionButton::Type) && (value <= QStyleOptionButton::Type)) + return qtscript_QStyleOptionButton_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionButton::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionButton_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionButton::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionButton")); + return clazz.property(qtscript_QStyleOptionButton_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionButton_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionButton::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionButton_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionButton::Type) && (arg <= QStyleOptionButton::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionButton_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionButton::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionButton_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionButton::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionButton_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionButton_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionButton_StyleOptionType, + qtscript_QStyleOptionButton_StyleOptionType_valueOf, qtscript_QStyleOptionButton_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionButton_StyleOptionType_toScriptValue, + qtscript_QStyleOptionButton_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionButton_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionButton_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionButton +// + +static QScriptValue qtscript_QStyleOptionButton_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionButton* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionButton.%0(): this object is not a QStyleOptionButton") + .arg(qtscript_QStyleOptionButton_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionButton"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionButton_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionButton_function_names[_id+1], + qtscript_QStyleOptionButton_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionButton_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionButton(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionButton _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionButton)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionButton _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionButton)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionButton_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionButton_function_names[_id], + qtscript_QStyleOptionButton_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionButton_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionButton*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionButton_static_call, proto, qtscript_QStyleOptionButton_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionButton_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ButtonFeature"), + qtscript_create_QStyleOptionButton_ButtonFeature_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ButtonFeatures"), + qtscript_create_QStyleOptionButton_ButtonFeatures_class(engine)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionButton_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionComboBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionComboBox.cpp new file mode 100644 index 00000000..86af42f7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionComboBox.cpp @@ -0,0 +1,288 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionComboBox.h" + +static const char * const qtscript_QStyleOptionComboBox_function_names[] = { + "QStyleOptionComboBox" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionComboBox_function_signatures[] = { + "\nQStyleOptionComboBox other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionComboBox_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionComboBox_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionComboBox::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionComboBox) +Q_DECLARE_METATYPE(QStyleOptionComboBox*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionComboBox) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionComboBox*) +Q_DECLARE_METATYPE(QStyleOptionComboBox::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionComboBox::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOptionComplex*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionComboBox::StyleOptionVersion +// + +static const QStyleOptionComboBox::StyleOptionVersion qtscript_QStyleOptionComboBox_StyleOptionVersion_values[] = { + QStyleOptionComboBox::Version +}; + +static const char * const qtscript_QStyleOptionComboBox_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionComboBox_StyleOptionVersion_toStringHelper(QStyleOptionComboBox::StyleOptionVersion value) +{ + if ((value >= QStyleOptionComboBox::Version) && (value <= QStyleOptionComboBox::Version)) + return qtscript_QStyleOptionComboBox_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionComboBox::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionComboBox_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionComboBox::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionComboBox")); + return clazz.property(qtscript_QStyleOptionComboBox_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionComboBox_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionComboBox::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionComboBox_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionComboBox::Version) && (arg <= QStyleOptionComboBox::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionComboBox_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionComboBox::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionComboBox_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionComboBox::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionComboBox_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionComboBox_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionComboBox_StyleOptionVersion, + qtscript_QStyleOptionComboBox_StyleOptionVersion_valueOf, qtscript_QStyleOptionComboBox_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionComboBox_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionComboBox_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionComboBox_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionComboBox_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionComboBox::StyleOptionType +// + +static const QStyleOptionComboBox::StyleOptionType qtscript_QStyleOptionComboBox_StyleOptionType_values[] = { + QStyleOptionComboBox::Type +}; + +static const char * const qtscript_QStyleOptionComboBox_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionComboBox_StyleOptionType_toStringHelper(QStyleOptionComboBox::StyleOptionType value) +{ + if ((value >= QStyleOptionComboBox::Type) && (value <= QStyleOptionComboBox::Type)) + return qtscript_QStyleOptionComboBox_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionComboBox::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionComboBox_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionComboBox::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionComboBox")); + return clazz.property(qtscript_QStyleOptionComboBox_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionComboBox_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionComboBox::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionComboBox_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionComboBox::Type) && (arg <= QStyleOptionComboBox::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionComboBox_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionComboBox::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionComboBox_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionComboBox::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionComboBox_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionComboBox_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionComboBox_StyleOptionType, + qtscript_QStyleOptionComboBox_StyleOptionType_valueOf, qtscript_QStyleOptionComboBox_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionComboBox_StyleOptionType_toScriptValue, + qtscript_QStyleOptionComboBox_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionComboBox_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionComboBox_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionComboBox +// + +static QScriptValue qtscript_QStyleOptionComboBox_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionComboBox* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionComboBox.%0(): this object is not a QStyleOptionComboBox") + .arg(qtscript_QStyleOptionComboBox_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionComboBox"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionComboBox_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionComboBox_function_names[_id+1], + qtscript_QStyleOptionComboBox_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionComboBox_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionComboBox(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionComboBox _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionComboBox)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionComboBox _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionComboBox _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionComboBox)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionComboBox_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionComboBox_function_names[_id], + qtscript_QStyleOptionComboBox_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionComboBox_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionComboBox*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionComboBox_static_call, proto, qtscript_QStyleOptionComboBox_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionComboBox_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionComboBox_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionComplex.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionComplex.cpp new file mode 100644 index 00000000..9a6b8d4b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionComplex.cpp @@ -0,0 +1,303 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionComplex.h" + +static const char * const qtscript_QStyleOptionComplex_function_names[] = { + "QStyleOptionComplex" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionComplex_function_signatures[] = { + "QStyleOptionComplex other\nint version, int type" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionComplex_function_lengths[] = { + 2 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionComplex_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionComplex::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionComplex) +Q_DECLARE_METATYPE(QStyleOptionComplex*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionComplex) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionComplex*) +Q_DECLARE_METATYPE(QStyleOptionComplex::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionComplex::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOption*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionComplex::StyleOptionVersion +// + +static const QStyleOptionComplex::StyleOptionVersion qtscript_QStyleOptionComplex_StyleOptionVersion_values[] = { + QStyleOptionComplex::Version +}; + +static const char * const qtscript_QStyleOptionComplex_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionComplex_StyleOptionVersion_toStringHelper(QStyleOptionComplex::StyleOptionVersion value) +{ + if ((value >= QStyleOptionComplex::Version) && (value <= QStyleOptionComplex::Version)) + return qtscript_QStyleOptionComplex_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionComplex::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionComplex_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionComplex::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionComplex")); + return clazz.property(qtscript_QStyleOptionComplex_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionComplex_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionComplex::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionComplex_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionComplex::Version) && (arg <= QStyleOptionComplex::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionComplex_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionComplex::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionComplex_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionComplex::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionComplex_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionComplex_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionComplex_StyleOptionVersion, + qtscript_QStyleOptionComplex_StyleOptionVersion_valueOf, qtscript_QStyleOptionComplex_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionComplex_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionComplex_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionComplex_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionComplex_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionComplex::StyleOptionType +// + +static const QStyleOptionComplex::StyleOptionType qtscript_QStyleOptionComplex_StyleOptionType_values[] = { + QStyleOptionComplex::Type +}; + +static const char * const qtscript_QStyleOptionComplex_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionComplex_StyleOptionType_toStringHelper(QStyleOptionComplex::StyleOptionType value) +{ + if ((value >= QStyleOptionComplex::Type) && (value <= QStyleOptionComplex::Type)) + return qtscript_QStyleOptionComplex_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionComplex::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionComplex_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionComplex::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionComplex")); + return clazz.property(qtscript_QStyleOptionComplex_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionComplex_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionComplex::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionComplex_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionComplex::Type) && (arg <= QStyleOptionComplex::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionComplex_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionComplex::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionComplex_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionComplex::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionComplex_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionComplex_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionComplex_StyleOptionType, + qtscript_QStyleOptionComplex_StyleOptionType_valueOf, qtscript_QStyleOptionComplex_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionComplex_StyleOptionType_toScriptValue, + qtscript_QStyleOptionComplex_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionComplex_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionComplex_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionComplex +// + +static QScriptValue qtscript_QStyleOptionComplex_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionComplex* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionComplex.%0(): this object is not a QStyleOptionComplex") + .arg(qtscript_QStyleOptionComplex_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionComplex"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionComplex_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionComplex_function_names[_id+1], + qtscript_QStyleOptionComplex_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionComplex_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionComplex(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionComplex _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionComplex)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QStyleOptionComplex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionComplex _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionComplex)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QtScriptShell_QStyleOptionComplex _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionComplex)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QStyleOptionComplex _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionComplex)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionComplex_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionComplex_function_names[_id], + qtscript_QStyleOptionComplex_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionComplex_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionComplex*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionComplex_static_call, proto, qtscript_QStyleOptionComplex_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionComplex_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionComplex_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionDockWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionDockWidget.cpp new file mode 100644 index 00000000..21e5ac8f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionDockWidget.cpp @@ -0,0 +1,288 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionDockWidget.h" + +static const char * const qtscript_QStyleOptionDockWidget_function_names[] = { + "QStyleOptionDockWidget" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionDockWidget_function_signatures[] = { + "\nQStyleOptionDockWidget other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionDockWidget_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionDockWidget_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionDockWidget::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionDockWidget) +Q_DECLARE_METATYPE(QStyleOptionDockWidget*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionDockWidget) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionDockWidget*) +Q_DECLARE_METATYPE(QStyleOptionDockWidget::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionDockWidget::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOption*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionDockWidget::StyleOptionVersion +// + +static const QStyleOptionDockWidget::StyleOptionVersion qtscript_QStyleOptionDockWidget_StyleOptionVersion_values[] = { + QStyleOptionDockWidget::Version +}; + +static const char * const qtscript_QStyleOptionDockWidget_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionDockWidget_StyleOptionVersion_toStringHelper(QStyleOptionDockWidget::StyleOptionVersion value) +{ + if ((value >= QStyleOptionDockWidget::Version) && (value <= QStyleOptionDockWidget::Version)) + return qtscript_QStyleOptionDockWidget_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionDockWidget::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionDockWidget_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionDockWidget::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionDockWidget")); + return clazz.property(qtscript_QStyleOptionDockWidget_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionDockWidget_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionDockWidget::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionDockWidget_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionDockWidget::Version) && (arg <= QStyleOptionDockWidget::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionDockWidget_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionDockWidget::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionDockWidget_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionDockWidget::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionDockWidget_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionDockWidget_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionDockWidget_StyleOptionVersion, + qtscript_QStyleOptionDockWidget_StyleOptionVersion_valueOf, qtscript_QStyleOptionDockWidget_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionDockWidget_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionDockWidget_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionDockWidget_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionDockWidget_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionDockWidget::StyleOptionType +// + +static const QStyleOptionDockWidget::StyleOptionType qtscript_QStyleOptionDockWidget_StyleOptionType_values[] = { + QStyleOptionDockWidget::Type +}; + +static const char * const qtscript_QStyleOptionDockWidget_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionDockWidget_StyleOptionType_toStringHelper(QStyleOptionDockWidget::StyleOptionType value) +{ + if ((value >= QStyleOptionDockWidget::Type) && (value <= QStyleOptionDockWidget::Type)) + return qtscript_QStyleOptionDockWidget_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionDockWidget::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionDockWidget_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionDockWidget::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionDockWidget")); + return clazz.property(qtscript_QStyleOptionDockWidget_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionDockWidget_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionDockWidget::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionDockWidget_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionDockWidget::Type) && (arg <= QStyleOptionDockWidget::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionDockWidget_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionDockWidget::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionDockWidget_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionDockWidget::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionDockWidget_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionDockWidget_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionDockWidget_StyleOptionType, + qtscript_QStyleOptionDockWidget_StyleOptionType_valueOf, qtscript_QStyleOptionDockWidget_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionDockWidget_StyleOptionType_toScriptValue, + qtscript_QStyleOptionDockWidget_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionDockWidget_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionDockWidget_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionDockWidget +// + +static QScriptValue qtscript_QStyleOptionDockWidget_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionDockWidget* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionDockWidget.%0(): this object is not a QStyleOptionDockWidget") + .arg(qtscript_QStyleOptionDockWidget_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionDockWidget"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionDockWidget_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionDockWidget_function_names[_id+1], + qtscript_QStyleOptionDockWidget_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionDockWidget_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionDockWidget(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionDockWidget _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionDockWidget)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionDockWidget _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionDockWidget _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionDockWidget)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionDockWidget_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionDockWidget_function_names[_id], + qtscript_QStyleOptionDockWidget_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionDockWidget_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionDockWidget*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionDockWidget_static_call, proto, qtscript_QStyleOptionDockWidget_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionDockWidget_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionDockWidget_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionFocusRect.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionFocusRect.cpp new file mode 100644 index 00000000..e0d6be7f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionFocusRect.cpp @@ -0,0 +1,288 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionFocusRect.h" + +static const char * const qtscript_QStyleOptionFocusRect_function_names[] = { + "QStyleOptionFocusRect" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionFocusRect_function_signatures[] = { + "\nQStyleOptionFocusRect other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionFocusRect_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionFocusRect_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionFocusRect::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionFocusRect) +Q_DECLARE_METATYPE(QStyleOptionFocusRect*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionFocusRect) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionFocusRect*) +Q_DECLARE_METATYPE(QStyleOptionFocusRect::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionFocusRect::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOption*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionFocusRect::StyleOptionVersion +// + +static const QStyleOptionFocusRect::StyleOptionVersion qtscript_QStyleOptionFocusRect_StyleOptionVersion_values[] = { + QStyleOptionFocusRect::Version +}; + +static const char * const qtscript_QStyleOptionFocusRect_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionFocusRect_StyleOptionVersion_toStringHelper(QStyleOptionFocusRect::StyleOptionVersion value) +{ + if ((value >= QStyleOptionFocusRect::Version) && (value <= QStyleOptionFocusRect::Version)) + return qtscript_QStyleOptionFocusRect_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionFocusRect::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionFocusRect_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionFocusRect::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionFocusRect")); + return clazz.property(qtscript_QStyleOptionFocusRect_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionFocusRect_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionFocusRect::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionFocusRect_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionFocusRect::Version) && (arg <= QStyleOptionFocusRect::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionFocusRect_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionFocusRect::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionFocusRect_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionFocusRect::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionFocusRect_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionFocusRect_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionFocusRect_StyleOptionVersion, + qtscript_QStyleOptionFocusRect_StyleOptionVersion_valueOf, qtscript_QStyleOptionFocusRect_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionFocusRect_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionFocusRect_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionFocusRect_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionFocusRect_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionFocusRect::StyleOptionType +// + +static const QStyleOptionFocusRect::StyleOptionType qtscript_QStyleOptionFocusRect_StyleOptionType_values[] = { + QStyleOptionFocusRect::Type +}; + +static const char * const qtscript_QStyleOptionFocusRect_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionFocusRect_StyleOptionType_toStringHelper(QStyleOptionFocusRect::StyleOptionType value) +{ + if ((value >= QStyleOptionFocusRect::Type) && (value <= QStyleOptionFocusRect::Type)) + return qtscript_QStyleOptionFocusRect_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionFocusRect::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionFocusRect_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionFocusRect::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionFocusRect")); + return clazz.property(qtscript_QStyleOptionFocusRect_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionFocusRect_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionFocusRect::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionFocusRect_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionFocusRect::Type) && (arg <= QStyleOptionFocusRect::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionFocusRect_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionFocusRect::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionFocusRect_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionFocusRect::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionFocusRect_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionFocusRect_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionFocusRect_StyleOptionType, + qtscript_QStyleOptionFocusRect_StyleOptionType_valueOf, qtscript_QStyleOptionFocusRect_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionFocusRect_StyleOptionType_toScriptValue, + qtscript_QStyleOptionFocusRect_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionFocusRect_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionFocusRect_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionFocusRect +// + +static QScriptValue qtscript_QStyleOptionFocusRect_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionFocusRect* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionFocusRect.%0(): this object is not a QStyleOptionFocusRect") + .arg(qtscript_QStyleOptionFocusRect_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionFocusRect"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionFocusRect_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionFocusRect_function_names[_id+1], + qtscript_QStyleOptionFocusRect_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionFocusRect_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionFocusRect(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionFocusRect _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionFocusRect)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionFocusRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionFocusRect _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionFocusRect)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionFocusRect_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionFocusRect_function_names[_id], + qtscript_QStyleOptionFocusRect_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionFocusRect_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionFocusRect*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionFocusRect_static_call, proto, qtscript_QStyleOptionFocusRect_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionFocusRect_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionFocusRect_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionFrame.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionFrame.cpp new file mode 100644 index 00000000..6db3dd3e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionFrame.cpp @@ -0,0 +1,456 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionFrame.h" + +static const char * const qtscript_QStyleOptionFrame_function_names[] = { + "QStyleOptionFrame" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionFrame_function_signatures[] = { + "\nQStyleOptionFrame other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionFrame_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionFrame_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionFrame::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionFrame) +Q_DECLARE_METATYPE(QStyleOptionFrame*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionFrame) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionFrame*) +Q_DECLARE_METATYPE(QStyleOptionFrame::FrameFeature) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QStyleOptionFrame::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionFrame::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOption*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QStyleOptionFrame::FrameFeature +// + +static const QStyleOptionFrame::FrameFeature qtscript_QStyleOptionFrame_FrameFeature_values[] = { + QStyleOptionFrame::None + , QStyleOptionFrame::Flat + , QStyleOptionFrame::Rounded +}; + +static const char * const qtscript_QStyleOptionFrame_FrameFeature_keys[] = { + "None" + , "Flat" + , "Rounded" +}; + +static QString qtscript_QStyleOptionFrame_FrameFeature_toStringHelper(QStyleOptionFrame::FrameFeature value) +{ + if ((value >= QStyleOptionFrame::None) && (value <= QStyleOptionFrame::Rounded)) + return qtscript_QStyleOptionFrame_FrameFeature_keys[static_cast(value)-static_cast(QStyleOptionFrame::None)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionFrame_FrameFeature_toScriptValue(QScriptEngine *engine, const QStyleOptionFrame::FrameFeature &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionFrame")); + return clazz.property(qtscript_QStyleOptionFrame_FrameFeature_toStringHelper(value)); +} + +static void qtscript_QStyleOptionFrame_FrameFeature_fromScriptValue(const QScriptValue &value, QStyleOptionFrame::FrameFeature &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionFrame_FrameFeature(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionFrame::None) && (arg <= QStyleOptionFrame::Rounded)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("FrameFeature(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionFrame_FrameFeature_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionFrame::FrameFeature value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionFrame_FrameFeature_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionFrame::FrameFeature value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionFrame_FrameFeature_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionFrame_FrameFeature_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionFrame_FrameFeature, + qtscript_QStyleOptionFrame_FrameFeature_valueOf, qtscript_QStyleOptionFrame_FrameFeature_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionFrame_FrameFeature_toScriptValue, + qtscript_QStyleOptionFrame_FrameFeature_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionFrame_FrameFeature_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionFrame_FrameFeature_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionFrame::FrameFeatures +// + +static QScriptValue qtscript_QStyleOptionFrame_FrameFeatures_toScriptValue(QScriptEngine *engine, const QStyleOptionFrame::FrameFeatures &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QStyleOptionFrame_FrameFeatures_fromScriptValue(const QScriptValue &value, QStyleOptionFrame::FrameFeatures &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QStyleOptionFrame_FrameFeatures(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionFrame::FrameFeatures result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("FrameFeatures(): argument %0 is not of type FrameFeature").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QStyleOptionFrame_FrameFeatures_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionFrame::FrameFeatures value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionFrame_FrameFeatures_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionFrame::FrameFeatures value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 3; ++i) { + if ((value & qtscript_QStyleOptionFrame_FrameFeature_values[i]) == qtscript_QStyleOptionFrame_FrameFeature_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QStyleOptionFrame_FrameFeature_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QStyleOptionFrame_FrameFeatures_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QStyleOptionFrame_FrameFeatures_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QStyleOptionFrame_FrameFeatures, qtscript_QStyleOptionFrame_FrameFeatures_valueOf, + qtscript_QStyleOptionFrame_FrameFeatures_toString, qtscript_QStyleOptionFrame_FrameFeatures_equals); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionFrame_FrameFeatures_toScriptValue, + qtscript_QStyleOptionFrame_FrameFeatures_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QStyleOptionFrame::StyleOptionVersion +// + +static const QStyleOptionFrame::StyleOptionVersion qtscript_QStyleOptionFrame_StyleOptionVersion_values[] = { + QStyleOptionFrame::Version +}; + +static const char * const qtscript_QStyleOptionFrame_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionFrame_StyleOptionVersion_toStringHelper(QStyleOptionFrame::StyleOptionVersion value) +{ + if ((value >= QStyleOptionFrame::Version) && (value <= QStyleOptionFrame::Version)) + return qtscript_QStyleOptionFrame_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionFrame::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionFrame_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionFrame::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionFrame")); + return clazz.property(qtscript_QStyleOptionFrame_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionFrame_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionFrame::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionFrame_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionFrame::Version) && (arg <= QStyleOptionFrame::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionFrame_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionFrame::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionFrame_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionFrame::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionFrame_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionFrame_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionFrame_StyleOptionVersion, + qtscript_QStyleOptionFrame_StyleOptionVersion_valueOf, qtscript_QStyleOptionFrame_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionFrame_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionFrame_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionFrame_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionFrame_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionFrame::StyleOptionType +// + +static const QStyleOptionFrame::StyleOptionType qtscript_QStyleOptionFrame_StyleOptionType_values[] = { + QStyleOptionFrame::Type +}; + +static const char * const qtscript_QStyleOptionFrame_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionFrame_StyleOptionType_toStringHelper(QStyleOptionFrame::StyleOptionType value) +{ + if ((value >= QStyleOptionFrame::Type) && (value <= QStyleOptionFrame::Type)) + return qtscript_QStyleOptionFrame_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionFrame::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionFrame_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionFrame::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionFrame")); + return clazz.property(qtscript_QStyleOptionFrame_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionFrame_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionFrame::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionFrame_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionFrame::Type) && (arg <= QStyleOptionFrame::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionFrame_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionFrame::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionFrame_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionFrame::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionFrame_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionFrame_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionFrame_StyleOptionType, + qtscript_QStyleOptionFrame_StyleOptionType_valueOf, qtscript_QStyleOptionFrame_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionFrame_StyleOptionType_toScriptValue, + qtscript_QStyleOptionFrame_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionFrame_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionFrame_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionFrame +// + +static QScriptValue qtscript_QStyleOptionFrame_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionFrame* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionFrame.%0(): this object is not a QStyleOptionFrame") + .arg(qtscript_QStyleOptionFrame_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionFrame"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionFrame_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionFrame_function_names[_id+1], + qtscript_QStyleOptionFrame_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionFrame_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionFrame(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionFrame _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionFrame)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionFrame _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionFrame _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionFrame)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionFrame_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionFrame_function_names[_id], + qtscript_QStyleOptionFrame_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionFrame_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionFrame*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionFrame_static_call, proto, qtscript_QStyleOptionFrame_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("FrameFeature"), + qtscript_create_QStyleOptionFrame_FrameFeature_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("FrameFeatures"), + qtscript_create_QStyleOptionFrame_FrameFeatures_class(engine)); + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionFrame_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionFrame_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionGraphicsItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionGraphicsItem.cpp new file mode 100644 index 00000000..99eb7d19 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionGraphicsItem.cpp @@ -0,0 +1,307 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionGraphicsItem.h" + +static const char * const qtscript_QStyleOptionGraphicsItem_function_names[] = { + "QStyleOptionGraphicsItem" + // static + , "levelOfDetailFromTransform" + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionGraphicsItem_function_signatures[] = { + "\nQStyleOptionGraphicsItem other" + // static + , "QTransform worldTransform" + // prototype +"" +}; + +static const int qtscript_QStyleOptionGraphicsItem_function_lengths[] = { + 1 + // static + , 1 + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionGraphicsItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionGraphicsItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionGraphicsItem) +Q_DECLARE_METATYPE(QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionGraphicsItem) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QStyleOptionGraphicsItem::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionGraphicsItem::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOption*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionGraphicsItem::StyleOptionVersion +// + +static const QStyleOptionGraphicsItem::StyleOptionVersion qtscript_QStyleOptionGraphicsItem_StyleOptionVersion_values[] = { + QStyleOptionGraphicsItem::Version +}; + +static const char * const qtscript_QStyleOptionGraphicsItem_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionGraphicsItem_StyleOptionVersion_toStringHelper(QStyleOptionGraphicsItem::StyleOptionVersion value) +{ + if ((value >= QStyleOptionGraphicsItem::Version) && (value <= QStyleOptionGraphicsItem::Version)) + return qtscript_QStyleOptionGraphicsItem_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionGraphicsItem::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionGraphicsItem_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionGraphicsItem::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionGraphicsItem")); + return clazz.property(qtscript_QStyleOptionGraphicsItem_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionGraphicsItem_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionGraphicsItem::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionGraphicsItem_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionGraphicsItem::Version) && (arg <= QStyleOptionGraphicsItem::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionGraphicsItem_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionGraphicsItem::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionGraphicsItem_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionGraphicsItem::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionGraphicsItem_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionGraphicsItem_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionGraphicsItem_StyleOptionVersion, + qtscript_QStyleOptionGraphicsItem_StyleOptionVersion_valueOf, qtscript_QStyleOptionGraphicsItem_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionGraphicsItem_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionGraphicsItem_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionGraphicsItem_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionGraphicsItem_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionGraphicsItem::StyleOptionType +// + +static const QStyleOptionGraphicsItem::StyleOptionType qtscript_QStyleOptionGraphicsItem_StyleOptionType_values[] = { + QStyleOptionGraphicsItem::Type +}; + +static const char * const qtscript_QStyleOptionGraphicsItem_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionGraphicsItem_StyleOptionType_toStringHelper(QStyleOptionGraphicsItem::StyleOptionType value) +{ + if ((value >= QStyleOptionGraphicsItem::Type) && (value <= QStyleOptionGraphicsItem::Type)) + return qtscript_QStyleOptionGraphicsItem_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionGraphicsItem::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionGraphicsItem_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionGraphicsItem::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionGraphicsItem")); + return clazz.property(qtscript_QStyleOptionGraphicsItem_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionGraphicsItem_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionGraphicsItem::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionGraphicsItem_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionGraphicsItem::Type) && (arg <= QStyleOptionGraphicsItem::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionGraphicsItem_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionGraphicsItem::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionGraphicsItem_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionGraphicsItem::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionGraphicsItem_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionGraphicsItem_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionGraphicsItem_StyleOptionType, + qtscript_QStyleOptionGraphicsItem_StyleOptionType_valueOf, qtscript_QStyleOptionGraphicsItem_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionGraphicsItem_StyleOptionType_toScriptValue, + qtscript_QStyleOptionGraphicsItem_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionGraphicsItem_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionGraphicsItem_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionGraphicsItem +// + +static QScriptValue qtscript_QStyleOptionGraphicsItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionGraphicsItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionGraphicsItem.%0(): this object is not a QStyleOptionGraphicsItem") + .arg(qtscript_QStyleOptionGraphicsItem_function_names[_id+2])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionGraphicsItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionGraphicsItem_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionGraphicsItem_function_names[_id+2], + qtscript_QStyleOptionGraphicsItem_function_signatures[_id+2]); +} + +static QScriptValue qtscript_QStyleOptionGraphicsItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionGraphicsItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionGraphicsItem _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionGraphicsItem)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionGraphicsItem _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionGraphicsItem _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionGraphicsItem)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 1) { + QTransform _q_arg0 = qscriptvalue_cast(context->argument(0)); + qreal _q_result = QStyleOptionGraphicsItem::levelOfDetailFromTransform(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionGraphicsItem_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionGraphicsItem_function_names[_id], + qtscript_QStyleOptionGraphicsItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionGraphicsItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionGraphicsItem*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionGraphicsItem_static_call, proto, qtscript_QStyleOptionGraphicsItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 1; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStyleOptionGraphicsItem_static_call, + qtscript_QStyleOptionGraphicsItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QStyleOptionGraphicsItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionGraphicsItem_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionGraphicsItem_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionGroupBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionGroupBox.cpp new file mode 100644 index 00000000..24398a0d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionGroupBox.cpp @@ -0,0 +1,288 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionGroupBox.h" + +static const char * const qtscript_QStyleOptionGroupBox_function_names[] = { + "QStyleOptionGroupBox" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionGroupBox_function_signatures[] = { + "\nQStyleOptionGroupBox other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionGroupBox_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionGroupBox_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionGroupBox::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionGroupBox) +Q_DECLARE_METATYPE(QStyleOptionGroupBox*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionGroupBox) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionGroupBox*) +Q_DECLARE_METATYPE(QStyleOptionGroupBox::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionGroupBox::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOptionComplex*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionGroupBox::StyleOptionVersion +// + +static const QStyleOptionGroupBox::StyleOptionVersion qtscript_QStyleOptionGroupBox_StyleOptionVersion_values[] = { + QStyleOptionGroupBox::Version +}; + +static const char * const qtscript_QStyleOptionGroupBox_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionGroupBox_StyleOptionVersion_toStringHelper(QStyleOptionGroupBox::StyleOptionVersion value) +{ + if ((value >= QStyleOptionGroupBox::Version) && (value <= QStyleOptionGroupBox::Version)) + return qtscript_QStyleOptionGroupBox_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionGroupBox::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionGroupBox_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionGroupBox::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionGroupBox")); + return clazz.property(qtscript_QStyleOptionGroupBox_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionGroupBox_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionGroupBox::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionGroupBox_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionGroupBox::Version) && (arg <= QStyleOptionGroupBox::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionGroupBox_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionGroupBox::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionGroupBox_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionGroupBox::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionGroupBox_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionGroupBox_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionGroupBox_StyleOptionVersion, + qtscript_QStyleOptionGroupBox_StyleOptionVersion_valueOf, qtscript_QStyleOptionGroupBox_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionGroupBox_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionGroupBox_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionGroupBox_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionGroupBox_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionGroupBox::StyleOptionType +// + +static const QStyleOptionGroupBox::StyleOptionType qtscript_QStyleOptionGroupBox_StyleOptionType_values[] = { + QStyleOptionGroupBox::Type +}; + +static const char * const qtscript_QStyleOptionGroupBox_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionGroupBox_StyleOptionType_toStringHelper(QStyleOptionGroupBox::StyleOptionType value) +{ + if ((value >= QStyleOptionGroupBox::Type) && (value <= QStyleOptionGroupBox::Type)) + return qtscript_QStyleOptionGroupBox_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionGroupBox::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionGroupBox_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionGroupBox::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionGroupBox")); + return clazz.property(qtscript_QStyleOptionGroupBox_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionGroupBox_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionGroupBox::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionGroupBox_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionGroupBox::Type) && (arg <= QStyleOptionGroupBox::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionGroupBox_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionGroupBox::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionGroupBox_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionGroupBox::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionGroupBox_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionGroupBox_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionGroupBox_StyleOptionType, + qtscript_QStyleOptionGroupBox_StyleOptionType_valueOf, qtscript_QStyleOptionGroupBox_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionGroupBox_StyleOptionType_toScriptValue, + qtscript_QStyleOptionGroupBox_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionGroupBox_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionGroupBox_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionGroupBox +// + +static QScriptValue qtscript_QStyleOptionGroupBox_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionGroupBox* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionGroupBox.%0(): this object is not a QStyleOptionGroupBox") + .arg(qtscript_QStyleOptionGroupBox_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionGroupBox"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionGroupBox_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionGroupBox_function_names[_id+1], + qtscript_QStyleOptionGroupBox_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionGroupBox_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionGroupBox(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionGroupBox _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionGroupBox)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionGroupBox _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionGroupBox _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionGroupBox)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionGroupBox_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionGroupBox_function_names[_id], + qtscript_QStyleOptionGroupBox_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionGroupBox_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionGroupBox*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionGroupBox_static_call, proto, qtscript_QStyleOptionGroupBox_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionGroupBox_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionGroupBox_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionHeader.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionHeader.cpp new file mode 100644 index 00000000..e061cc32 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionHeader.cpp @@ -0,0 +1,508 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionHeader.h" + +static const char * const qtscript_QStyleOptionHeader_function_names[] = { + "QStyleOptionHeader" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionHeader_function_signatures[] = { + "\nQStyleOptionHeader other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionHeader_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionHeader_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionHeader::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionHeader) +Q_DECLARE_METATYPE(QStyleOptionHeader*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionHeader) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionHeader*) +Q_DECLARE_METATYPE(QStyleOptionHeader::SectionPosition) +Q_DECLARE_METATYPE(QStyleOptionHeader::SelectedPosition) +Q_DECLARE_METATYPE(QStyleOptionHeader::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionHeader::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOptionHeader::SortIndicator) +Q_DECLARE_METATYPE(QStyleOption*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionHeader::SectionPosition +// + +static const QStyleOptionHeader::SectionPosition qtscript_QStyleOptionHeader_SectionPosition_values[] = { + QStyleOptionHeader::Beginning + , QStyleOptionHeader::Middle + , QStyleOptionHeader::End + , QStyleOptionHeader::OnlyOneSection +}; + +static const char * const qtscript_QStyleOptionHeader_SectionPosition_keys[] = { + "Beginning" + , "Middle" + , "End" + , "OnlyOneSection" +}; + +static QString qtscript_QStyleOptionHeader_SectionPosition_toStringHelper(QStyleOptionHeader::SectionPosition value) +{ + if ((value >= QStyleOptionHeader::Beginning) && (value <= QStyleOptionHeader::OnlyOneSection)) + return qtscript_QStyleOptionHeader_SectionPosition_keys[static_cast(value)-static_cast(QStyleOptionHeader::Beginning)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionHeader_SectionPosition_toScriptValue(QScriptEngine *engine, const QStyleOptionHeader::SectionPosition &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionHeader")); + return clazz.property(qtscript_QStyleOptionHeader_SectionPosition_toStringHelper(value)); +} + +static void qtscript_QStyleOptionHeader_SectionPosition_fromScriptValue(const QScriptValue &value, QStyleOptionHeader::SectionPosition &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionHeader_SectionPosition(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionHeader::Beginning) && (arg <= QStyleOptionHeader::OnlyOneSection)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SectionPosition(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionHeader_SectionPosition_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionHeader::SectionPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionHeader_SectionPosition_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionHeader::SectionPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionHeader_SectionPosition_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionHeader_SectionPosition_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionHeader_SectionPosition, + qtscript_QStyleOptionHeader_SectionPosition_valueOf, qtscript_QStyleOptionHeader_SectionPosition_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionHeader_SectionPosition_toScriptValue, + qtscript_QStyleOptionHeader_SectionPosition_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionHeader_SectionPosition_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionHeader_SectionPosition_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionHeader::SelectedPosition +// + +static const QStyleOptionHeader::SelectedPosition qtscript_QStyleOptionHeader_SelectedPosition_values[] = { + QStyleOptionHeader::NotAdjacent + , QStyleOptionHeader::NextIsSelected + , QStyleOptionHeader::PreviousIsSelected + , QStyleOptionHeader::NextAndPreviousAreSelected +}; + +static const char * const qtscript_QStyleOptionHeader_SelectedPosition_keys[] = { + "NotAdjacent" + , "NextIsSelected" + , "PreviousIsSelected" + , "NextAndPreviousAreSelected" +}; + +static QString qtscript_QStyleOptionHeader_SelectedPosition_toStringHelper(QStyleOptionHeader::SelectedPosition value) +{ + if ((value >= QStyleOptionHeader::NotAdjacent) && (value <= QStyleOptionHeader::NextAndPreviousAreSelected)) + return qtscript_QStyleOptionHeader_SelectedPosition_keys[static_cast(value)-static_cast(QStyleOptionHeader::NotAdjacent)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionHeader_SelectedPosition_toScriptValue(QScriptEngine *engine, const QStyleOptionHeader::SelectedPosition &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionHeader")); + return clazz.property(qtscript_QStyleOptionHeader_SelectedPosition_toStringHelper(value)); +} + +static void qtscript_QStyleOptionHeader_SelectedPosition_fromScriptValue(const QScriptValue &value, QStyleOptionHeader::SelectedPosition &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionHeader_SelectedPosition(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionHeader::NotAdjacent) && (arg <= QStyleOptionHeader::NextAndPreviousAreSelected)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SelectedPosition(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionHeader_SelectedPosition_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionHeader::SelectedPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionHeader_SelectedPosition_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionHeader::SelectedPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionHeader_SelectedPosition_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionHeader_SelectedPosition_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionHeader_SelectedPosition, + qtscript_QStyleOptionHeader_SelectedPosition_valueOf, qtscript_QStyleOptionHeader_SelectedPosition_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionHeader_SelectedPosition_toScriptValue, + qtscript_QStyleOptionHeader_SelectedPosition_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionHeader_SelectedPosition_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionHeader_SelectedPosition_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionHeader::StyleOptionVersion +// + +static const QStyleOptionHeader::StyleOptionVersion qtscript_QStyleOptionHeader_StyleOptionVersion_values[] = { + QStyleOptionHeader::Version +}; + +static const char * const qtscript_QStyleOptionHeader_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionHeader_StyleOptionVersion_toStringHelper(QStyleOptionHeader::StyleOptionVersion value) +{ + if ((value >= QStyleOptionHeader::Version) && (value <= QStyleOptionHeader::Version)) + return qtscript_QStyleOptionHeader_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionHeader::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionHeader_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionHeader::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionHeader")); + return clazz.property(qtscript_QStyleOptionHeader_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionHeader_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionHeader::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionHeader_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionHeader::Version) && (arg <= QStyleOptionHeader::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionHeader_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionHeader::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionHeader_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionHeader::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionHeader_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionHeader_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionHeader_StyleOptionVersion, + qtscript_QStyleOptionHeader_StyleOptionVersion_valueOf, qtscript_QStyleOptionHeader_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionHeader_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionHeader_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionHeader_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionHeader_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionHeader::StyleOptionType +// + +static const QStyleOptionHeader::StyleOptionType qtscript_QStyleOptionHeader_StyleOptionType_values[] = { + QStyleOptionHeader::Type +}; + +static const char * const qtscript_QStyleOptionHeader_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionHeader_StyleOptionType_toStringHelper(QStyleOptionHeader::StyleOptionType value) +{ + if ((value >= QStyleOptionHeader::Type) && (value <= QStyleOptionHeader::Type)) + return qtscript_QStyleOptionHeader_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionHeader::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionHeader_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionHeader::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionHeader")); + return clazz.property(qtscript_QStyleOptionHeader_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionHeader_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionHeader::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionHeader_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionHeader::Type) && (arg <= QStyleOptionHeader::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionHeader_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionHeader::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionHeader_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionHeader::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionHeader_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionHeader_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionHeader_StyleOptionType, + qtscript_QStyleOptionHeader_StyleOptionType_valueOf, qtscript_QStyleOptionHeader_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionHeader_StyleOptionType_toScriptValue, + qtscript_QStyleOptionHeader_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionHeader_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionHeader_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionHeader::SortIndicator +// + +static const QStyleOptionHeader::SortIndicator qtscript_QStyleOptionHeader_SortIndicator_values[] = { + QStyleOptionHeader::None + , QStyleOptionHeader::SortUp + , QStyleOptionHeader::SortDown +}; + +static const char * const qtscript_QStyleOptionHeader_SortIndicator_keys[] = { + "None" + , "SortUp" + , "SortDown" +}; + +static QString qtscript_QStyleOptionHeader_SortIndicator_toStringHelper(QStyleOptionHeader::SortIndicator value) +{ + if ((value >= QStyleOptionHeader::None) && (value <= QStyleOptionHeader::SortDown)) + return qtscript_QStyleOptionHeader_SortIndicator_keys[static_cast(value)-static_cast(QStyleOptionHeader::None)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionHeader_SortIndicator_toScriptValue(QScriptEngine *engine, const QStyleOptionHeader::SortIndicator &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionHeader")); + return clazz.property(qtscript_QStyleOptionHeader_SortIndicator_toStringHelper(value)); +} + +static void qtscript_QStyleOptionHeader_SortIndicator_fromScriptValue(const QScriptValue &value, QStyleOptionHeader::SortIndicator &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionHeader_SortIndicator(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionHeader::None) && (arg <= QStyleOptionHeader::SortDown)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SortIndicator(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionHeader_SortIndicator_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionHeader::SortIndicator value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionHeader_SortIndicator_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionHeader::SortIndicator value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionHeader_SortIndicator_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionHeader_SortIndicator_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionHeader_SortIndicator, + qtscript_QStyleOptionHeader_SortIndicator_valueOf, qtscript_QStyleOptionHeader_SortIndicator_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionHeader_SortIndicator_toScriptValue, + qtscript_QStyleOptionHeader_SortIndicator_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionHeader_SortIndicator_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionHeader_SortIndicator_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionHeader +// + +static QScriptValue qtscript_QStyleOptionHeader_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionHeader* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionHeader.%0(): this object is not a QStyleOptionHeader") + .arg(qtscript_QStyleOptionHeader_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionHeader"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionHeader_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionHeader_function_names[_id+1], + qtscript_QStyleOptionHeader_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionHeader_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionHeader(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionHeader _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionHeader)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionHeader _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionHeader _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionHeader)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionHeader_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionHeader_function_names[_id], + qtscript_QStyleOptionHeader_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionHeader_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionHeader*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionHeader_static_call, proto, qtscript_QStyleOptionHeader_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("SectionPosition"), + qtscript_create_QStyleOptionHeader_SectionPosition_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("SelectedPosition"), + qtscript_create_QStyleOptionHeader_SelectedPosition_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionHeader_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionHeader_StyleOptionType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("SortIndicator"), + qtscript_create_QStyleOptionHeader_SortIndicator_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionMenuItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionMenuItem.cpp new file mode 100644 index 00000000..19607478 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionMenuItem.cpp @@ -0,0 +1,442 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionMenuItem.h" + +static const char * const qtscript_QStyleOptionMenuItem_function_names[] = { + "QStyleOptionMenuItem" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionMenuItem_function_signatures[] = { + "\nQStyleOptionMenuItem other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionMenuItem_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionMenuItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionMenuItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionMenuItem) +Q_DECLARE_METATYPE(QStyleOptionMenuItem*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionMenuItem) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionMenuItem*) +Q_DECLARE_METATYPE(QStyleOptionMenuItem::MenuItemType) +Q_DECLARE_METATYPE(QStyleOptionMenuItem::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionMenuItem::CheckType) +Q_DECLARE_METATYPE(QStyleOptionMenuItem::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOption*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionMenuItem::MenuItemType +// + +static const QStyleOptionMenuItem::MenuItemType qtscript_QStyleOptionMenuItem_MenuItemType_values[] = { + QStyleOptionMenuItem::Normal + , QStyleOptionMenuItem::DefaultItem + , QStyleOptionMenuItem::Separator + , QStyleOptionMenuItem::SubMenu + , QStyleOptionMenuItem::Scroller + , QStyleOptionMenuItem::TearOff + , QStyleOptionMenuItem::Margin + , QStyleOptionMenuItem::EmptyArea +}; + +static const char * const qtscript_QStyleOptionMenuItem_MenuItemType_keys[] = { + "Normal" + , "DefaultItem" + , "Separator" + , "SubMenu" + , "Scroller" + , "TearOff" + , "Margin" + , "EmptyArea" +}; + +static QString qtscript_QStyleOptionMenuItem_MenuItemType_toStringHelper(QStyleOptionMenuItem::MenuItemType value) +{ + if ((value >= QStyleOptionMenuItem::Normal) && (value <= QStyleOptionMenuItem::EmptyArea)) + return qtscript_QStyleOptionMenuItem_MenuItemType_keys[static_cast(value)-static_cast(QStyleOptionMenuItem::Normal)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionMenuItem_MenuItemType_toScriptValue(QScriptEngine *engine, const QStyleOptionMenuItem::MenuItemType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionMenuItem")); + return clazz.property(qtscript_QStyleOptionMenuItem_MenuItemType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionMenuItem_MenuItemType_fromScriptValue(const QScriptValue &value, QStyleOptionMenuItem::MenuItemType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionMenuItem_MenuItemType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionMenuItem::Normal) && (arg <= QStyleOptionMenuItem::EmptyArea)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("MenuItemType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionMenuItem_MenuItemType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionMenuItem::MenuItemType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionMenuItem_MenuItemType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionMenuItem::MenuItemType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionMenuItem_MenuItemType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionMenuItem_MenuItemType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionMenuItem_MenuItemType, + qtscript_QStyleOptionMenuItem_MenuItemType_valueOf, qtscript_QStyleOptionMenuItem_MenuItemType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionMenuItem_MenuItemType_toScriptValue, + qtscript_QStyleOptionMenuItem_MenuItemType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 8; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionMenuItem_MenuItemType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionMenuItem_MenuItemType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionMenuItem::StyleOptionVersion +// + +static const QStyleOptionMenuItem::StyleOptionVersion qtscript_QStyleOptionMenuItem_StyleOptionVersion_values[] = { + QStyleOptionMenuItem::Version +}; + +static const char * const qtscript_QStyleOptionMenuItem_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionMenuItem_StyleOptionVersion_toStringHelper(QStyleOptionMenuItem::StyleOptionVersion value) +{ + if ((value >= QStyleOptionMenuItem::Version) && (value <= QStyleOptionMenuItem::Version)) + return qtscript_QStyleOptionMenuItem_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionMenuItem::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionMenuItem_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionMenuItem::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionMenuItem")); + return clazz.property(qtscript_QStyleOptionMenuItem_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionMenuItem_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionMenuItem::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionMenuItem_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionMenuItem::Version) && (arg <= QStyleOptionMenuItem::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionMenuItem_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionMenuItem::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionMenuItem_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionMenuItem::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionMenuItem_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionMenuItem_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionMenuItem_StyleOptionVersion, + qtscript_QStyleOptionMenuItem_StyleOptionVersion_valueOf, qtscript_QStyleOptionMenuItem_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionMenuItem_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionMenuItem_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionMenuItem_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionMenuItem_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionMenuItem::CheckType +// + +static const QStyleOptionMenuItem::CheckType qtscript_QStyleOptionMenuItem_CheckType_values[] = { + QStyleOptionMenuItem::NotCheckable + , QStyleOptionMenuItem::Exclusive + , QStyleOptionMenuItem::NonExclusive +}; + +static const char * const qtscript_QStyleOptionMenuItem_CheckType_keys[] = { + "NotCheckable" + , "Exclusive" + , "NonExclusive" +}; + +static QString qtscript_QStyleOptionMenuItem_CheckType_toStringHelper(QStyleOptionMenuItem::CheckType value) +{ + if ((value >= QStyleOptionMenuItem::NotCheckable) && (value <= QStyleOptionMenuItem::NonExclusive)) + return qtscript_QStyleOptionMenuItem_CheckType_keys[static_cast(value)-static_cast(QStyleOptionMenuItem::NotCheckable)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionMenuItem_CheckType_toScriptValue(QScriptEngine *engine, const QStyleOptionMenuItem::CheckType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionMenuItem")); + return clazz.property(qtscript_QStyleOptionMenuItem_CheckType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionMenuItem_CheckType_fromScriptValue(const QScriptValue &value, QStyleOptionMenuItem::CheckType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionMenuItem_CheckType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionMenuItem::NotCheckable) && (arg <= QStyleOptionMenuItem::NonExclusive)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("CheckType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionMenuItem_CheckType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionMenuItem::CheckType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionMenuItem_CheckType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionMenuItem::CheckType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionMenuItem_CheckType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionMenuItem_CheckType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionMenuItem_CheckType, + qtscript_QStyleOptionMenuItem_CheckType_valueOf, qtscript_QStyleOptionMenuItem_CheckType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionMenuItem_CheckType_toScriptValue, + qtscript_QStyleOptionMenuItem_CheckType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionMenuItem_CheckType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionMenuItem_CheckType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionMenuItem::StyleOptionType +// + +static const QStyleOptionMenuItem::StyleOptionType qtscript_QStyleOptionMenuItem_StyleOptionType_values[] = { + QStyleOptionMenuItem::Type +}; + +static const char * const qtscript_QStyleOptionMenuItem_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionMenuItem_StyleOptionType_toStringHelper(QStyleOptionMenuItem::StyleOptionType value) +{ + if ((value >= QStyleOptionMenuItem::Type) && (value <= QStyleOptionMenuItem::Type)) + return qtscript_QStyleOptionMenuItem_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionMenuItem::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionMenuItem_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionMenuItem::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionMenuItem")); + return clazz.property(qtscript_QStyleOptionMenuItem_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionMenuItem_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionMenuItem::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionMenuItem_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionMenuItem::Type) && (arg <= QStyleOptionMenuItem::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionMenuItem_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionMenuItem::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionMenuItem_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionMenuItem::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionMenuItem_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionMenuItem_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionMenuItem_StyleOptionType, + qtscript_QStyleOptionMenuItem_StyleOptionType_valueOf, qtscript_QStyleOptionMenuItem_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionMenuItem_StyleOptionType_toScriptValue, + qtscript_QStyleOptionMenuItem_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionMenuItem_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionMenuItem_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionMenuItem +// + +static QScriptValue qtscript_QStyleOptionMenuItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionMenuItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionMenuItem.%0(): this object is not a QStyleOptionMenuItem") + .arg(qtscript_QStyleOptionMenuItem_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionMenuItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionMenuItem_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionMenuItem_function_names[_id+1], + qtscript_QStyleOptionMenuItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionMenuItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionMenuItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionMenuItem _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionMenuItem)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionMenuItem _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionMenuItem _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionMenuItem)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionMenuItem_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionMenuItem_function_names[_id], + qtscript_QStyleOptionMenuItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionMenuItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionMenuItem*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionMenuItem_static_call, proto, qtscript_QStyleOptionMenuItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("MenuItemType"), + qtscript_create_QStyleOptionMenuItem_MenuItemType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionMenuItem_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("CheckType"), + qtscript_create_QStyleOptionMenuItem_CheckType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionMenuItem_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionProgressBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionProgressBar.cpp new file mode 100644 index 00000000..afc3516a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionProgressBar.cpp @@ -0,0 +1,288 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionProgressBar.h" + +static const char * const qtscript_QStyleOptionProgressBar_function_names[] = { + "QStyleOptionProgressBar" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionProgressBar_function_signatures[] = { + "\nQStyleOptionProgressBar other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionProgressBar_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionProgressBar_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionProgressBar::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionProgressBar) +Q_DECLARE_METATYPE(QStyleOptionProgressBar*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionProgressBar) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionProgressBar*) +Q_DECLARE_METATYPE(QStyleOptionProgressBar::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionProgressBar::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOption*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionProgressBar::StyleOptionVersion +// + +static const QStyleOptionProgressBar::StyleOptionVersion qtscript_QStyleOptionProgressBar_StyleOptionVersion_values[] = { + QStyleOptionProgressBar::Version +}; + +static const char * const qtscript_QStyleOptionProgressBar_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionProgressBar_StyleOptionVersion_toStringHelper(QStyleOptionProgressBar::StyleOptionVersion value) +{ + if ((value >= QStyleOptionProgressBar::Version) && (value <= QStyleOptionProgressBar::Version)) + return qtscript_QStyleOptionProgressBar_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionProgressBar::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionProgressBar_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionProgressBar::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionProgressBar")); + return clazz.property(qtscript_QStyleOptionProgressBar_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionProgressBar_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionProgressBar::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionProgressBar_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionProgressBar::Version) && (arg <= QStyleOptionProgressBar::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionProgressBar_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionProgressBar::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionProgressBar_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionProgressBar::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionProgressBar_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionProgressBar_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionProgressBar_StyleOptionVersion, + qtscript_QStyleOptionProgressBar_StyleOptionVersion_valueOf, qtscript_QStyleOptionProgressBar_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionProgressBar_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionProgressBar_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionProgressBar_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionProgressBar_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionProgressBar::StyleOptionType +// + +static const QStyleOptionProgressBar::StyleOptionType qtscript_QStyleOptionProgressBar_StyleOptionType_values[] = { + QStyleOptionProgressBar::Type +}; + +static const char * const qtscript_QStyleOptionProgressBar_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionProgressBar_StyleOptionType_toStringHelper(QStyleOptionProgressBar::StyleOptionType value) +{ + if ((value >= QStyleOptionProgressBar::Type) && (value <= QStyleOptionProgressBar::Type)) + return qtscript_QStyleOptionProgressBar_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionProgressBar::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionProgressBar_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionProgressBar::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionProgressBar")); + return clazz.property(qtscript_QStyleOptionProgressBar_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionProgressBar_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionProgressBar::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionProgressBar_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionProgressBar::Type) && (arg <= QStyleOptionProgressBar::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionProgressBar_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionProgressBar::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionProgressBar_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionProgressBar::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionProgressBar_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionProgressBar_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionProgressBar_StyleOptionType, + qtscript_QStyleOptionProgressBar_StyleOptionType_valueOf, qtscript_QStyleOptionProgressBar_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionProgressBar_StyleOptionType_toScriptValue, + qtscript_QStyleOptionProgressBar_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionProgressBar_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionProgressBar_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionProgressBar +// + +static QScriptValue qtscript_QStyleOptionProgressBar_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionProgressBar* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionProgressBar.%0(): this object is not a QStyleOptionProgressBar") + .arg(qtscript_QStyleOptionProgressBar_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionProgressBar"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionProgressBar_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionProgressBar_function_names[_id+1], + qtscript_QStyleOptionProgressBar_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionProgressBar_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionProgressBar(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionProgressBar _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionProgressBar)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionProgressBar _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionProgressBar _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionProgressBar)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionProgressBar_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionProgressBar_function_names[_id], + qtscript_QStyleOptionProgressBar_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionProgressBar_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionProgressBar*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionProgressBar_static_call, proto, qtscript_QStyleOptionProgressBar_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionProgressBar_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionProgressBar_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionRubberBand.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionRubberBand.cpp new file mode 100644 index 00000000..5e9a01b7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionRubberBand.cpp @@ -0,0 +1,288 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionRubberBand.h" + +static const char * const qtscript_QStyleOptionRubberBand_function_names[] = { + "QStyleOptionRubberBand" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionRubberBand_function_signatures[] = { + "\nQStyleOptionRubberBand other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionRubberBand_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionRubberBand_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionRubberBand::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionRubberBand) +Q_DECLARE_METATYPE(QStyleOptionRubberBand*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionRubberBand) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionRubberBand*) +Q_DECLARE_METATYPE(QStyleOptionRubberBand::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionRubberBand::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOption*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionRubberBand::StyleOptionVersion +// + +static const QStyleOptionRubberBand::StyleOptionVersion qtscript_QStyleOptionRubberBand_StyleOptionVersion_values[] = { + QStyleOptionRubberBand::Version +}; + +static const char * const qtscript_QStyleOptionRubberBand_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionRubberBand_StyleOptionVersion_toStringHelper(QStyleOptionRubberBand::StyleOptionVersion value) +{ + if ((value >= QStyleOptionRubberBand::Version) && (value <= QStyleOptionRubberBand::Version)) + return qtscript_QStyleOptionRubberBand_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionRubberBand::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionRubberBand_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionRubberBand::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionRubberBand")); + return clazz.property(qtscript_QStyleOptionRubberBand_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionRubberBand_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionRubberBand::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionRubberBand_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionRubberBand::Version) && (arg <= QStyleOptionRubberBand::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionRubberBand_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionRubberBand::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionRubberBand_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionRubberBand::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionRubberBand_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionRubberBand_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionRubberBand_StyleOptionVersion, + qtscript_QStyleOptionRubberBand_StyleOptionVersion_valueOf, qtscript_QStyleOptionRubberBand_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionRubberBand_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionRubberBand_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionRubberBand_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionRubberBand_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionRubberBand::StyleOptionType +// + +static const QStyleOptionRubberBand::StyleOptionType qtscript_QStyleOptionRubberBand_StyleOptionType_values[] = { + QStyleOptionRubberBand::Type +}; + +static const char * const qtscript_QStyleOptionRubberBand_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionRubberBand_StyleOptionType_toStringHelper(QStyleOptionRubberBand::StyleOptionType value) +{ + if ((value >= QStyleOptionRubberBand::Type) && (value <= QStyleOptionRubberBand::Type)) + return qtscript_QStyleOptionRubberBand_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionRubberBand::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionRubberBand_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionRubberBand::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionRubberBand")); + return clazz.property(qtscript_QStyleOptionRubberBand_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionRubberBand_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionRubberBand::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionRubberBand_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionRubberBand::Type) && (arg <= QStyleOptionRubberBand::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionRubberBand_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionRubberBand::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionRubberBand_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionRubberBand::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionRubberBand_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionRubberBand_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionRubberBand_StyleOptionType, + qtscript_QStyleOptionRubberBand_StyleOptionType_valueOf, qtscript_QStyleOptionRubberBand_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionRubberBand_StyleOptionType_toScriptValue, + qtscript_QStyleOptionRubberBand_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionRubberBand_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionRubberBand_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionRubberBand +// + +static QScriptValue qtscript_QStyleOptionRubberBand_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionRubberBand* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionRubberBand.%0(): this object is not a QStyleOptionRubberBand") + .arg(qtscript_QStyleOptionRubberBand_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionRubberBand"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionRubberBand_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionRubberBand_function_names[_id+1], + qtscript_QStyleOptionRubberBand_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionRubberBand_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionRubberBand(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionRubberBand _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionRubberBand)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionRubberBand _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionRubberBand _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionRubberBand)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionRubberBand_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionRubberBand_function_names[_id], + qtscript_QStyleOptionRubberBand_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionRubberBand_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionRubberBand*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionRubberBand_static_call, proto, qtscript_QStyleOptionRubberBand_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionRubberBand_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionRubberBand_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionSizeGrip.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionSizeGrip.cpp new file mode 100644 index 00000000..775f9f9f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionSizeGrip.cpp @@ -0,0 +1,288 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionSizeGrip.h" + +static const char * const qtscript_QStyleOptionSizeGrip_function_names[] = { + "QStyleOptionSizeGrip" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionSizeGrip_function_signatures[] = { + "\nQStyleOptionSizeGrip other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionSizeGrip_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionSizeGrip_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionSizeGrip::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionSizeGrip) +Q_DECLARE_METATYPE(QStyleOptionSizeGrip*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionSizeGrip) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionSizeGrip*) +Q_DECLARE_METATYPE(QStyleOptionSizeGrip::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionSizeGrip::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOptionComplex*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionSizeGrip::StyleOptionVersion +// + +static const QStyleOptionSizeGrip::StyleOptionVersion qtscript_QStyleOptionSizeGrip_StyleOptionVersion_values[] = { + QStyleOptionSizeGrip::Version +}; + +static const char * const qtscript_QStyleOptionSizeGrip_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionSizeGrip_StyleOptionVersion_toStringHelper(QStyleOptionSizeGrip::StyleOptionVersion value) +{ + if ((value >= QStyleOptionSizeGrip::Version) && (value <= QStyleOptionSizeGrip::Version)) + return qtscript_QStyleOptionSizeGrip_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionSizeGrip::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionSizeGrip_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionSizeGrip::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionSizeGrip")); + return clazz.property(qtscript_QStyleOptionSizeGrip_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionSizeGrip_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionSizeGrip::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionSizeGrip_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionSizeGrip::Version) && (arg <= QStyleOptionSizeGrip::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionSizeGrip_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionSizeGrip::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionSizeGrip_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionSizeGrip::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionSizeGrip_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionSizeGrip_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionSizeGrip_StyleOptionVersion, + qtscript_QStyleOptionSizeGrip_StyleOptionVersion_valueOf, qtscript_QStyleOptionSizeGrip_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionSizeGrip_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionSizeGrip_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionSizeGrip_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionSizeGrip_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionSizeGrip::StyleOptionType +// + +static const QStyleOptionSizeGrip::StyleOptionType qtscript_QStyleOptionSizeGrip_StyleOptionType_values[] = { + QStyleOptionSizeGrip::Type +}; + +static const char * const qtscript_QStyleOptionSizeGrip_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionSizeGrip_StyleOptionType_toStringHelper(QStyleOptionSizeGrip::StyleOptionType value) +{ + if ((value >= QStyleOptionSizeGrip::Type) && (value <= QStyleOptionSizeGrip::Type)) + return qtscript_QStyleOptionSizeGrip_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionSizeGrip::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionSizeGrip_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionSizeGrip::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionSizeGrip")); + return clazz.property(qtscript_QStyleOptionSizeGrip_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionSizeGrip_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionSizeGrip::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionSizeGrip_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionSizeGrip::Type) && (arg <= QStyleOptionSizeGrip::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionSizeGrip_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionSizeGrip::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionSizeGrip_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionSizeGrip::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionSizeGrip_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionSizeGrip_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionSizeGrip_StyleOptionType, + qtscript_QStyleOptionSizeGrip_StyleOptionType_valueOf, qtscript_QStyleOptionSizeGrip_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionSizeGrip_StyleOptionType_toScriptValue, + qtscript_QStyleOptionSizeGrip_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionSizeGrip_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionSizeGrip_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionSizeGrip +// + +static QScriptValue qtscript_QStyleOptionSizeGrip_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionSizeGrip* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionSizeGrip.%0(): this object is not a QStyleOptionSizeGrip") + .arg(qtscript_QStyleOptionSizeGrip_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionSizeGrip"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionSizeGrip_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionSizeGrip_function_names[_id+1], + qtscript_QStyleOptionSizeGrip_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionSizeGrip_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionSizeGrip(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionSizeGrip _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionSizeGrip)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionSizeGrip _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionSizeGrip _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionSizeGrip)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionSizeGrip_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionSizeGrip_function_names[_id], + qtscript_QStyleOptionSizeGrip_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionSizeGrip_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionSizeGrip*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionSizeGrip_static_call, proto, qtscript_QStyleOptionSizeGrip_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionSizeGrip_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionSizeGrip_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionSlider.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionSlider.cpp new file mode 100644 index 00000000..9701c44b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionSlider.cpp @@ -0,0 +1,288 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionSlider.h" + +static const char * const qtscript_QStyleOptionSlider_function_names[] = { + "QStyleOptionSlider" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionSlider_function_signatures[] = { + "\nQStyleOptionSlider other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionSlider_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionSlider_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionSlider::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionSlider) +Q_DECLARE_METATYPE(QStyleOptionSlider*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionSlider) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionSlider*) +Q_DECLARE_METATYPE(QStyleOptionSlider::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionSlider::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOptionComplex*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionSlider::StyleOptionVersion +// + +static const QStyleOptionSlider::StyleOptionVersion qtscript_QStyleOptionSlider_StyleOptionVersion_values[] = { + QStyleOptionSlider::Version +}; + +static const char * const qtscript_QStyleOptionSlider_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionSlider_StyleOptionVersion_toStringHelper(QStyleOptionSlider::StyleOptionVersion value) +{ + if ((value >= QStyleOptionSlider::Version) && (value <= QStyleOptionSlider::Version)) + return qtscript_QStyleOptionSlider_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionSlider::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionSlider_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionSlider::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionSlider")); + return clazz.property(qtscript_QStyleOptionSlider_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionSlider_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionSlider::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionSlider_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionSlider::Version) && (arg <= QStyleOptionSlider::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionSlider_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionSlider::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionSlider_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionSlider::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionSlider_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionSlider_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionSlider_StyleOptionVersion, + qtscript_QStyleOptionSlider_StyleOptionVersion_valueOf, qtscript_QStyleOptionSlider_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionSlider_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionSlider_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionSlider_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionSlider_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionSlider::StyleOptionType +// + +static const QStyleOptionSlider::StyleOptionType qtscript_QStyleOptionSlider_StyleOptionType_values[] = { + QStyleOptionSlider::Type +}; + +static const char * const qtscript_QStyleOptionSlider_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionSlider_StyleOptionType_toStringHelper(QStyleOptionSlider::StyleOptionType value) +{ + if ((value >= QStyleOptionSlider::Type) && (value <= QStyleOptionSlider::Type)) + return qtscript_QStyleOptionSlider_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionSlider::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionSlider_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionSlider::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionSlider")); + return clazz.property(qtscript_QStyleOptionSlider_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionSlider_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionSlider::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionSlider_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionSlider::Type) && (arg <= QStyleOptionSlider::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionSlider_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionSlider::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionSlider_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionSlider::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionSlider_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionSlider_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionSlider_StyleOptionType, + qtscript_QStyleOptionSlider_StyleOptionType_valueOf, qtscript_QStyleOptionSlider_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionSlider_StyleOptionType_toScriptValue, + qtscript_QStyleOptionSlider_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionSlider_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionSlider_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionSlider +// + +static QScriptValue qtscript_QStyleOptionSlider_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionSlider* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionSlider.%0(): this object is not a QStyleOptionSlider") + .arg(qtscript_QStyleOptionSlider_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionSlider"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionSlider_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionSlider_function_names[_id+1], + qtscript_QStyleOptionSlider_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionSlider_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionSlider(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionSlider _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionSlider)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionSlider _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionSlider _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionSlider)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionSlider_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionSlider_function_names[_id], + qtscript_QStyleOptionSlider_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionSlider_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionSlider*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionSlider_static_call, proto, qtscript_QStyleOptionSlider_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionSlider_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionSlider_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionSpinBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionSpinBox.cpp new file mode 100644 index 00000000..5fe24d8a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionSpinBox.cpp @@ -0,0 +1,288 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionSpinBox.h" + +static const char * const qtscript_QStyleOptionSpinBox_function_names[] = { + "QStyleOptionSpinBox" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionSpinBox_function_signatures[] = { + "\nQStyleOptionSpinBox other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionSpinBox_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionSpinBox_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionSpinBox::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionSpinBox) +Q_DECLARE_METATYPE(QStyleOptionSpinBox*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionSpinBox) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionSpinBox*) +Q_DECLARE_METATYPE(QStyleOptionSpinBox::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionSpinBox::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOptionComplex*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionSpinBox::StyleOptionVersion +// + +static const QStyleOptionSpinBox::StyleOptionVersion qtscript_QStyleOptionSpinBox_StyleOptionVersion_values[] = { + QStyleOptionSpinBox::Version +}; + +static const char * const qtscript_QStyleOptionSpinBox_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionSpinBox_StyleOptionVersion_toStringHelper(QStyleOptionSpinBox::StyleOptionVersion value) +{ + if ((value >= QStyleOptionSpinBox::Version) && (value <= QStyleOptionSpinBox::Version)) + return qtscript_QStyleOptionSpinBox_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionSpinBox::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionSpinBox_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionSpinBox::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionSpinBox")); + return clazz.property(qtscript_QStyleOptionSpinBox_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionSpinBox_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionSpinBox::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionSpinBox_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionSpinBox::Version) && (arg <= QStyleOptionSpinBox::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionSpinBox_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionSpinBox::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionSpinBox_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionSpinBox::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionSpinBox_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionSpinBox_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionSpinBox_StyleOptionVersion, + qtscript_QStyleOptionSpinBox_StyleOptionVersion_valueOf, qtscript_QStyleOptionSpinBox_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionSpinBox_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionSpinBox_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionSpinBox_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionSpinBox_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionSpinBox::StyleOptionType +// + +static const QStyleOptionSpinBox::StyleOptionType qtscript_QStyleOptionSpinBox_StyleOptionType_values[] = { + QStyleOptionSpinBox::Type +}; + +static const char * const qtscript_QStyleOptionSpinBox_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionSpinBox_StyleOptionType_toStringHelper(QStyleOptionSpinBox::StyleOptionType value) +{ + if ((value >= QStyleOptionSpinBox::Type) && (value <= QStyleOptionSpinBox::Type)) + return qtscript_QStyleOptionSpinBox_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionSpinBox::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionSpinBox_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionSpinBox::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionSpinBox")); + return clazz.property(qtscript_QStyleOptionSpinBox_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionSpinBox_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionSpinBox::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionSpinBox_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionSpinBox::Type) && (arg <= QStyleOptionSpinBox::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionSpinBox_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionSpinBox::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionSpinBox_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionSpinBox::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionSpinBox_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionSpinBox_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionSpinBox_StyleOptionType, + qtscript_QStyleOptionSpinBox_StyleOptionType_valueOf, qtscript_QStyleOptionSpinBox_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionSpinBox_StyleOptionType_toScriptValue, + qtscript_QStyleOptionSpinBox_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionSpinBox_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionSpinBox_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionSpinBox +// + +static QScriptValue qtscript_QStyleOptionSpinBox_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionSpinBox* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionSpinBox.%0(): this object is not a QStyleOptionSpinBox") + .arg(qtscript_QStyleOptionSpinBox_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionSpinBox"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionSpinBox_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionSpinBox_function_names[_id+1], + qtscript_QStyleOptionSpinBox_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionSpinBox_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionSpinBox(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionSpinBox _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionSpinBox)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionSpinBox _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionSpinBox _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionSpinBox)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionSpinBox_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionSpinBox_function_names[_id], + qtscript_QStyleOptionSpinBox_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionSpinBox_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionSpinBox*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionSpinBox_static_call, proto, qtscript_QStyleOptionSpinBox_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionSpinBox_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionSpinBox_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionTab.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionTab.cpp new file mode 100644 index 00000000..c351fe9f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionTab.cpp @@ -0,0 +1,602 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionTab.h" + +static const char * const qtscript_QStyleOptionTab_function_names[] = { + "QStyleOptionTab" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionTab_function_signatures[] = { + "\nQStyleOptionTab other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionTab_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionTab_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionTab::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionTab) +Q_DECLARE_METATYPE(QStyleOptionTab*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionTab) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionTab*) +Q_DECLARE_METATYPE(QStyleOptionTab::CornerWidget) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QStyleOptionTab::SelectedPosition) +Q_DECLARE_METATYPE(QStyleOptionTab::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionTab::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOptionTab::TabPosition) +Q_DECLARE_METATYPE(QStyleOption*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QStyleOptionTab::CornerWidget +// + +static const QStyleOptionTab::CornerWidget qtscript_QStyleOptionTab_CornerWidget_values[] = { + QStyleOptionTab::NoCornerWidgets + , QStyleOptionTab::LeftCornerWidget + , QStyleOptionTab::RightCornerWidget +}; + +static const char * const qtscript_QStyleOptionTab_CornerWidget_keys[] = { + "NoCornerWidgets" + , "LeftCornerWidget" + , "RightCornerWidget" +}; + +static QString qtscript_QStyleOptionTab_CornerWidget_toStringHelper(QStyleOptionTab::CornerWidget value) +{ + if ((value >= QStyleOptionTab::NoCornerWidgets) && (value <= QStyleOptionTab::RightCornerWidget)) + return qtscript_QStyleOptionTab_CornerWidget_keys[static_cast(value)-static_cast(QStyleOptionTab::NoCornerWidgets)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionTab_CornerWidget_toScriptValue(QScriptEngine *engine, const QStyleOptionTab::CornerWidget &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionTab")); + return clazz.property(qtscript_QStyleOptionTab_CornerWidget_toStringHelper(value)); +} + +static void qtscript_QStyleOptionTab_CornerWidget_fromScriptValue(const QScriptValue &value, QStyleOptionTab::CornerWidget &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionTab_CornerWidget(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionTab::NoCornerWidgets) && (arg <= QStyleOptionTab::RightCornerWidget)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("CornerWidget(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionTab_CornerWidget_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTab::CornerWidget value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionTab_CornerWidget_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTab::CornerWidget value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionTab_CornerWidget_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionTab_CornerWidget_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionTab_CornerWidget, + qtscript_QStyleOptionTab_CornerWidget_valueOf, qtscript_QStyleOptionTab_CornerWidget_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionTab_CornerWidget_toScriptValue, + qtscript_QStyleOptionTab_CornerWidget_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionTab_CornerWidget_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionTab_CornerWidget_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionTab::CornerWidgets +// + +static QScriptValue qtscript_QStyleOptionTab_CornerWidgets_toScriptValue(QScriptEngine *engine, const QStyleOptionTab::CornerWidgets &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QStyleOptionTab_CornerWidgets_fromScriptValue(const QScriptValue &value, QStyleOptionTab::CornerWidgets &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QStyleOptionTab_CornerWidgets(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTab::CornerWidgets result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("CornerWidgets(): argument %0 is not of type CornerWidget").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QStyleOptionTab_CornerWidgets_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTab::CornerWidgets value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionTab_CornerWidgets_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTab::CornerWidgets value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 3; ++i) { + if ((value & qtscript_QStyleOptionTab_CornerWidget_values[i]) == qtscript_QStyleOptionTab_CornerWidget_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QStyleOptionTab_CornerWidget_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QStyleOptionTab_CornerWidgets_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QStyleOptionTab_CornerWidgets_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QStyleOptionTab_CornerWidgets, qtscript_QStyleOptionTab_CornerWidgets_valueOf, + qtscript_QStyleOptionTab_CornerWidgets_toString, qtscript_QStyleOptionTab_CornerWidgets_equals); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionTab_CornerWidgets_toScriptValue, + qtscript_QStyleOptionTab_CornerWidgets_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QStyleOptionTab::SelectedPosition +// + +static const QStyleOptionTab::SelectedPosition qtscript_QStyleOptionTab_SelectedPosition_values[] = { + QStyleOptionTab::NotAdjacent + , QStyleOptionTab::NextIsSelected + , QStyleOptionTab::PreviousIsSelected +}; + +static const char * const qtscript_QStyleOptionTab_SelectedPosition_keys[] = { + "NotAdjacent" + , "NextIsSelected" + , "PreviousIsSelected" +}; + +static QString qtscript_QStyleOptionTab_SelectedPosition_toStringHelper(QStyleOptionTab::SelectedPosition value) +{ + if ((value >= QStyleOptionTab::NotAdjacent) && (value <= QStyleOptionTab::PreviousIsSelected)) + return qtscript_QStyleOptionTab_SelectedPosition_keys[static_cast(value)-static_cast(QStyleOptionTab::NotAdjacent)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionTab_SelectedPosition_toScriptValue(QScriptEngine *engine, const QStyleOptionTab::SelectedPosition &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionTab")); + return clazz.property(qtscript_QStyleOptionTab_SelectedPosition_toStringHelper(value)); +} + +static void qtscript_QStyleOptionTab_SelectedPosition_fromScriptValue(const QScriptValue &value, QStyleOptionTab::SelectedPosition &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionTab_SelectedPosition(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionTab::NotAdjacent) && (arg <= QStyleOptionTab::PreviousIsSelected)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SelectedPosition(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionTab_SelectedPosition_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTab::SelectedPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionTab_SelectedPosition_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTab::SelectedPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionTab_SelectedPosition_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionTab_SelectedPosition_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionTab_SelectedPosition, + qtscript_QStyleOptionTab_SelectedPosition_valueOf, qtscript_QStyleOptionTab_SelectedPosition_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionTab_SelectedPosition_toScriptValue, + qtscript_QStyleOptionTab_SelectedPosition_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionTab_SelectedPosition_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionTab_SelectedPosition_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionTab::StyleOptionVersion +// + +static const QStyleOptionTab::StyleOptionVersion qtscript_QStyleOptionTab_StyleOptionVersion_values[] = { + QStyleOptionTab::Version +}; + +static const char * const qtscript_QStyleOptionTab_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionTab_StyleOptionVersion_toStringHelper(QStyleOptionTab::StyleOptionVersion value) +{ + if ((value >= QStyleOptionTab::Version) && (value <= QStyleOptionTab::Version)) + return qtscript_QStyleOptionTab_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionTab::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionTab_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionTab::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionTab")); + return clazz.property(qtscript_QStyleOptionTab_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionTab_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionTab::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionTab_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionTab::Version) && (arg <= QStyleOptionTab::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionTab_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTab::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionTab_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTab::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionTab_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionTab_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionTab_StyleOptionVersion, + qtscript_QStyleOptionTab_StyleOptionVersion_valueOf, qtscript_QStyleOptionTab_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionTab_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionTab_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionTab_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionTab_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionTab::StyleOptionType +// + +static const QStyleOptionTab::StyleOptionType qtscript_QStyleOptionTab_StyleOptionType_values[] = { + QStyleOptionTab::Type +}; + +static const char * const qtscript_QStyleOptionTab_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionTab_StyleOptionType_toStringHelper(QStyleOptionTab::StyleOptionType value) +{ + if ((value >= QStyleOptionTab::Type) && (value <= QStyleOptionTab::Type)) + return qtscript_QStyleOptionTab_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionTab::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionTab_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionTab::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionTab")); + return clazz.property(qtscript_QStyleOptionTab_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionTab_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionTab::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionTab_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionTab::Type) && (arg <= QStyleOptionTab::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionTab_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTab::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionTab_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTab::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionTab_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionTab_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionTab_StyleOptionType, + qtscript_QStyleOptionTab_StyleOptionType_valueOf, qtscript_QStyleOptionTab_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionTab_StyleOptionType_toScriptValue, + qtscript_QStyleOptionTab_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionTab_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionTab_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionTab::TabPosition +// + +static const QStyleOptionTab::TabPosition qtscript_QStyleOptionTab_TabPosition_values[] = { + QStyleOptionTab::Beginning + , QStyleOptionTab::Middle + , QStyleOptionTab::End + , QStyleOptionTab::OnlyOneTab +}; + +static const char * const qtscript_QStyleOptionTab_TabPosition_keys[] = { + "Beginning" + , "Middle" + , "End" + , "OnlyOneTab" +}; + +static QString qtscript_QStyleOptionTab_TabPosition_toStringHelper(QStyleOptionTab::TabPosition value) +{ + if ((value >= QStyleOptionTab::Beginning) && (value <= QStyleOptionTab::OnlyOneTab)) + return qtscript_QStyleOptionTab_TabPosition_keys[static_cast(value)-static_cast(QStyleOptionTab::Beginning)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionTab_TabPosition_toScriptValue(QScriptEngine *engine, const QStyleOptionTab::TabPosition &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionTab")); + return clazz.property(qtscript_QStyleOptionTab_TabPosition_toStringHelper(value)); +} + +static void qtscript_QStyleOptionTab_TabPosition_fromScriptValue(const QScriptValue &value, QStyleOptionTab::TabPosition &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionTab_TabPosition(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionTab::Beginning) && (arg <= QStyleOptionTab::OnlyOneTab)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("TabPosition(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionTab_TabPosition_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTab::TabPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionTab_TabPosition_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTab::TabPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionTab_TabPosition_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionTab_TabPosition_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionTab_TabPosition, + qtscript_QStyleOptionTab_TabPosition_valueOf, qtscript_QStyleOptionTab_TabPosition_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionTab_TabPosition_toScriptValue, + qtscript_QStyleOptionTab_TabPosition_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionTab_TabPosition_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionTab_TabPosition_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionTab +// + +static QScriptValue qtscript_QStyleOptionTab_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionTab* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionTab.%0(): this object is not a QStyleOptionTab") + .arg(qtscript_QStyleOptionTab_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionTab"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionTab_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionTab_function_names[_id+1], + qtscript_QStyleOptionTab_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionTab_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionTab(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionTab _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionTab)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionTab _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionTab _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionTab)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionTab_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionTab_function_names[_id], + qtscript_QStyleOptionTab_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionTab_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionTab*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionTab_static_call, proto, qtscript_QStyleOptionTab_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("CornerWidget"), + qtscript_create_QStyleOptionTab_CornerWidget_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("CornerWidgets"), + qtscript_create_QStyleOptionTab_CornerWidgets_class(engine)); + ctor.setProperty(QString::fromLatin1("SelectedPosition"), + qtscript_create_QStyleOptionTab_SelectedPosition_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionTab_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionTab_StyleOptionType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("TabPosition"), + qtscript_create_QStyleOptionTab_TabPosition_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionTabBarBase.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionTabBarBase.cpp new file mode 100644 index 00000000..1016f639 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionTabBarBase.cpp @@ -0,0 +1,288 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionTabBarBase.h" + +static const char * const qtscript_QStyleOptionTabBarBase_function_names[] = { + "QStyleOptionTabBarBase" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionTabBarBase_function_signatures[] = { + "\nQStyleOptionTabBarBase other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionTabBarBase_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionTabBarBase_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionTabBarBase::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionTabBarBase) +Q_DECLARE_METATYPE(QStyleOptionTabBarBase*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionTabBarBase) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionTabBarBase*) +Q_DECLARE_METATYPE(QStyleOptionTabBarBase::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionTabBarBase::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOption*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionTabBarBase::StyleOptionVersion +// + +static const QStyleOptionTabBarBase::StyleOptionVersion qtscript_QStyleOptionTabBarBase_StyleOptionVersion_values[] = { + QStyleOptionTabBarBase::Version +}; + +static const char * const qtscript_QStyleOptionTabBarBase_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionTabBarBase_StyleOptionVersion_toStringHelper(QStyleOptionTabBarBase::StyleOptionVersion value) +{ + if ((value >= QStyleOptionTabBarBase::Version) && (value <= QStyleOptionTabBarBase::Version)) + return qtscript_QStyleOptionTabBarBase_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionTabBarBase::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionTabBarBase_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionTabBarBase::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionTabBarBase")); + return clazz.property(qtscript_QStyleOptionTabBarBase_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionTabBarBase_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionTabBarBase::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionTabBarBase_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionTabBarBase::Version) && (arg <= QStyleOptionTabBarBase::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionTabBarBase_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTabBarBase::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionTabBarBase_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTabBarBase::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionTabBarBase_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionTabBarBase_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionTabBarBase_StyleOptionVersion, + qtscript_QStyleOptionTabBarBase_StyleOptionVersion_valueOf, qtscript_QStyleOptionTabBarBase_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionTabBarBase_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionTabBarBase_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionTabBarBase_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionTabBarBase_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionTabBarBase::StyleOptionType +// + +static const QStyleOptionTabBarBase::StyleOptionType qtscript_QStyleOptionTabBarBase_StyleOptionType_values[] = { + QStyleOptionTabBarBase::Type +}; + +static const char * const qtscript_QStyleOptionTabBarBase_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionTabBarBase_StyleOptionType_toStringHelper(QStyleOptionTabBarBase::StyleOptionType value) +{ + if ((value >= QStyleOptionTabBarBase::Type) && (value <= QStyleOptionTabBarBase::Type)) + return qtscript_QStyleOptionTabBarBase_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionTabBarBase::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionTabBarBase_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionTabBarBase::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionTabBarBase")); + return clazz.property(qtscript_QStyleOptionTabBarBase_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionTabBarBase_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionTabBarBase::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionTabBarBase_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionTabBarBase::Type) && (arg <= QStyleOptionTabBarBase::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionTabBarBase_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTabBarBase::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionTabBarBase_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTabBarBase::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionTabBarBase_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionTabBarBase_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionTabBarBase_StyleOptionType, + qtscript_QStyleOptionTabBarBase_StyleOptionType_valueOf, qtscript_QStyleOptionTabBarBase_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionTabBarBase_StyleOptionType_toScriptValue, + qtscript_QStyleOptionTabBarBase_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionTabBarBase_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionTabBarBase_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionTabBarBase +// + +static QScriptValue qtscript_QStyleOptionTabBarBase_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionTabBarBase* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionTabBarBase.%0(): this object is not a QStyleOptionTabBarBase") + .arg(qtscript_QStyleOptionTabBarBase_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionTabBarBase"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionTabBarBase_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionTabBarBase_function_names[_id+1], + qtscript_QStyleOptionTabBarBase_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionTabBarBase_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionTabBarBase(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionTabBarBase _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionTabBarBase)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionTabBarBase _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionTabBarBase _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionTabBarBase)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionTabBarBase_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionTabBarBase_function_names[_id], + qtscript_QStyleOptionTabBarBase_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionTabBarBase_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionTabBarBase*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionTabBarBase_static_call, proto, qtscript_QStyleOptionTabBarBase_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionTabBarBase_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionTabBarBase_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionTabWidgetFrame.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionTabWidgetFrame.cpp new file mode 100644 index 00000000..519f72d8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionTabWidgetFrame.cpp @@ -0,0 +1,288 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionTabWidgetFrame.h" + +static const char * const qtscript_QStyleOptionTabWidgetFrame_function_names[] = { + "QStyleOptionTabWidgetFrame" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionTabWidgetFrame_function_signatures[] = { + "\nQStyleOptionTabWidgetFrame other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionTabWidgetFrame_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionTabWidgetFrame_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionTabWidgetFrame::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionTabWidgetFrame) +Q_DECLARE_METATYPE(QStyleOptionTabWidgetFrame*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionTabWidgetFrame) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionTabWidgetFrame*) +Q_DECLARE_METATYPE(QStyleOptionTabWidgetFrame::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionTabWidgetFrame::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOption*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionTabWidgetFrame::StyleOptionVersion +// + +static const QStyleOptionTabWidgetFrame::StyleOptionVersion qtscript_QStyleOptionTabWidgetFrame_StyleOptionVersion_values[] = { + QStyleOptionTabWidgetFrame::Version +}; + +static const char * const qtscript_QStyleOptionTabWidgetFrame_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionTabWidgetFrame_StyleOptionVersion_toStringHelper(QStyleOptionTabWidgetFrame::StyleOptionVersion value) +{ + if ((value >= QStyleOptionTabWidgetFrame::Version) && (value <= QStyleOptionTabWidgetFrame::Version)) + return qtscript_QStyleOptionTabWidgetFrame_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionTabWidgetFrame::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionTabWidgetFrame_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionTabWidgetFrame::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionTabWidgetFrame")); + return clazz.property(qtscript_QStyleOptionTabWidgetFrame_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionTabWidgetFrame_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionTabWidgetFrame::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionTabWidgetFrame_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionTabWidgetFrame::Version) && (arg <= QStyleOptionTabWidgetFrame::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionTabWidgetFrame_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTabWidgetFrame::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionTabWidgetFrame_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTabWidgetFrame::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionTabWidgetFrame_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionTabWidgetFrame_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionTabWidgetFrame_StyleOptionVersion, + qtscript_QStyleOptionTabWidgetFrame_StyleOptionVersion_valueOf, qtscript_QStyleOptionTabWidgetFrame_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionTabWidgetFrame_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionTabWidgetFrame_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionTabWidgetFrame_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionTabWidgetFrame_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionTabWidgetFrame::StyleOptionType +// + +static const QStyleOptionTabWidgetFrame::StyleOptionType qtscript_QStyleOptionTabWidgetFrame_StyleOptionType_values[] = { + QStyleOptionTabWidgetFrame::Type +}; + +static const char * const qtscript_QStyleOptionTabWidgetFrame_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionTabWidgetFrame_StyleOptionType_toStringHelper(QStyleOptionTabWidgetFrame::StyleOptionType value) +{ + if ((value >= QStyleOptionTabWidgetFrame::Type) && (value <= QStyleOptionTabWidgetFrame::Type)) + return qtscript_QStyleOptionTabWidgetFrame_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionTabWidgetFrame::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionTabWidgetFrame_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionTabWidgetFrame::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionTabWidgetFrame")); + return clazz.property(qtscript_QStyleOptionTabWidgetFrame_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionTabWidgetFrame_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionTabWidgetFrame::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionTabWidgetFrame_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionTabWidgetFrame::Type) && (arg <= QStyleOptionTabWidgetFrame::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionTabWidgetFrame_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTabWidgetFrame::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionTabWidgetFrame_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTabWidgetFrame::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionTabWidgetFrame_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionTabWidgetFrame_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionTabWidgetFrame_StyleOptionType, + qtscript_QStyleOptionTabWidgetFrame_StyleOptionType_valueOf, qtscript_QStyleOptionTabWidgetFrame_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionTabWidgetFrame_StyleOptionType_toScriptValue, + qtscript_QStyleOptionTabWidgetFrame_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionTabWidgetFrame_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionTabWidgetFrame_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionTabWidgetFrame +// + +static QScriptValue qtscript_QStyleOptionTabWidgetFrame_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionTabWidgetFrame* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionTabWidgetFrame.%0(): this object is not a QStyleOptionTabWidgetFrame") + .arg(qtscript_QStyleOptionTabWidgetFrame_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionTabWidgetFrame"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionTabWidgetFrame_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionTabWidgetFrame_function_names[_id+1], + qtscript_QStyleOptionTabWidgetFrame_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionTabWidgetFrame_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionTabWidgetFrame(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionTabWidgetFrame _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionTabWidgetFrame)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionTabWidgetFrame _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionTabWidgetFrame _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionTabWidgetFrame)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionTabWidgetFrame_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionTabWidgetFrame_function_names[_id], + qtscript_QStyleOptionTabWidgetFrame_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionTabWidgetFrame_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionTabWidgetFrame*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionTabWidgetFrame_static_call, proto, qtscript_QStyleOptionTabWidgetFrame_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionTabWidgetFrame_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionTabWidgetFrame_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionTitleBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionTitleBar.cpp new file mode 100644 index 00000000..15a1af6b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionTitleBar.cpp @@ -0,0 +1,288 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionTitleBar.h" + +static const char * const qtscript_QStyleOptionTitleBar_function_names[] = { + "QStyleOptionTitleBar" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionTitleBar_function_signatures[] = { + "\nQStyleOptionTitleBar other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionTitleBar_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionTitleBar_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionTitleBar::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionTitleBar) +Q_DECLARE_METATYPE(QStyleOptionTitleBar*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionTitleBar) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionTitleBar*) +Q_DECLARE_METATYPE(QStyleOptionTitleBar::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionTitleBar::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOptionComplex*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionTitleBar::StyleOptionVersion +// + +static const QStyleOptionTitleBar::StyleOptionVersion qtscript_QStyleOptionTitleBar_StyleOptionVersion_values[] = { + QStyleOptionTitleBar::Version +}; + +static const char * const qtscript_QStyleOptionTitleBar_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionTitleBar_StyleOptionVersion_toStringHelper(QStyleOptionTitleBar::StyleOptionVersion value) +{ + if ((value >= QStyleOptionTitleBar::Version) && (value <= QStyleOptionTitleBar::Version)) + return qtscript_QStyleOptionTitleBar_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionTitleBar::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionTitleBar_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionTitleBar::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionTitleBar")); + return clazz.property(qtscript_QStyleOptionTitleBar_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionTitleBar_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionTitleBar::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionTitleBar_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionTitleBar::Version) && (arg <= QStyleOptionTitleBar::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionTitleBar_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTitleBar::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionTitleBar_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTitleBar::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionTitleBar_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionTitleBar_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionTitleBar_StyleOptionVersion, + qtscript_QStyleOptionTitleBar_StyleOptionVersion_valueOf, qtscript_QStyleOptionTitleBar_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionTitleBar_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionTitleBar_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionTitleBar_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionTitleBar_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionTitleBar::StyleOptionType +// + +static const QStyleOptionTitleBar::StyleOptionType qtscript_QStyleOptionTitleBar_StyleOptionType_values[] = { + QStyleOptionTitleBar::Type +}; + +static const char * const qtscript_QStyleOptionTitleBar_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionTitleBar_StyleOptionType_toStringHelper(QStyleOptionTitleBar::StyleOptionType value) +{ + if ((value >= QStyleOptionTitleBar::Type) && (value <= QStyleOptionTitleBar::Type)) + return qtscript_QStyleOptionTitleBar_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionTitleBar::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionTitleBar_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionTitleBar::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionTitleBar")); + return clazz.property(qtscript_QStyleOptionTitleBar_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionTitleBar_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionTitleBar::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionTitleBar_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionTitleBar::Type) && (arg <= QStyleOptionTitleBar::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionTitleBar_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTitleBar::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionTitleBar_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionTitleBar::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionTitleBar_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionTitleBar_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionTitleBar_StyleOptionType, + qtscript_QStyleOptionTitleBar_StyleOptionType_valueOf, qtscript_QStyleOptionTitleBar_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionTitleBar_StyleOptionType_toScriptValue, + qtscript_QStyleOptionTitleBar_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionTitleBar_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionTitleBar_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionTitleBar +// + +static QScriptValue qtscript_QStyleOptionTitleBar_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionTitleBar* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionTitleBar.%0(): this object is not a QStyleOptionTitleBar") + .arg(qtscript_QStyleOptionTitleBar_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionTitleBar"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionTitleBar_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionTitleBar_function_names[_id+1], + qtscript_QStyleOptionTitleBar_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionTitleBar_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionTitleBar(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionTitleBar _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionTitleBar)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionTitleBar _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionTitleBar _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionTitleBar)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionTitleBar_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionTitleBar_function_names[_id], + qtscript_QStyleOptionTitleBar_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionTitleBar_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionTitleBar*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionTitleBar_static_call, proto, qtscript_QStyleOptionTitleBar_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionTitleBar_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionTitleBar_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionToolBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionToolBar.cpp new file mode 100644 index 00000000..d656f984 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionToolBar.cpp @@ -0,0 +1,528 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionToolBar.h" + +static const char * const qtscript_QStyleOptionToolBar_function_names[] = { + "QStyleOptionToolBar" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionToolBar_function_signatures[] = { + "\nQStyleOptionToolBar other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionToolBar_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionToolBar_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionToolBar::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionToolBar) +Q_DECLARE_METATYPE(QStyleOptionToolBar*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionToolBar) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionToolBar*) +Q_DECLARE_METATYPE(QStyleOptionToolBar::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionToolBar::ToolBarFeature) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QStyleOptionToolBar::ToolBarPosition) +Q_DECLARE_METATYPE(QStyleOptionToolBar::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOption*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QStyleOptionToolBar::StyleOptionVersion +// + +static const QStyleOptionToolBar::StyleOptionVersion qtscript_QStyleOptionToolBar_StyleOptionVersion_values[] = { + QStyleOptionToolBar::Version +}; + +static const char * const qtscript_QStyleOptionToolBar_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionToolBar_StyleOptionVersion_toStringHelper(QStyleOptionToolBar::StyleOptionVersion value) +{ + if ((value >= QStyleOptionToolBar::Version) && (value <= QStyleOptionToolBar::Version)) + return qtscript_QStyleOptionToolBar_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionToolBar::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionToolBar_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionToolBar::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionToolBar")); + return clazz.property(qtscript_QStyleOptionToolBar_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionToolBar_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionToolBar::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionToolBar_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionToolBar::Version) && (arg <= QStyleOptionToolBar::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionToolBar_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBar::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionToolBar_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBar::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionToolBar_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionToolBar_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionToolBar_StyleOptionVersion, + qtscript_QStyleOptionToolBar_StyleOptionVersion_valueOf, qtscript_QStyleOptionToolBar_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionToolBar_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionToolBar_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionToolBar_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionToolBar_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionToolBar::ToolBarFeature +// + +static const QStyleOptionToolBar::ToolBarFeature qtscript_QStyleOptionToolBar_ToolBarFeature_values[] = { + QStyleOptionToolBar::None + , QStyleOptionToolBar::Movable +}; + +static const char * const qtscript_QStyleOptionToolBar_ToolBarFeature_keys[] = { + "None" + , "Movable" +}; + +static QString qtscript_QStyleOptionToolBar_ToolBarFeature_toStringHelper(QStyleOptionToolBar::ToolBarFeature value) +{ + if ((value >= QStyleOptionToolBar::None) && (value <= QStyleOptionToolBar::Movable)) + return qtscript_QStyleOptionToolBar_ToolBarFeature_keys[static_cast(value)-static_cast(QStyleOptionToolBar::None)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionToolBar_ToolBarFeature_toScriptValue(QScriptEngine *engine, const QStyleOptionToolBar::ToolBarFeature &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionToolBar")); + return clazz.property(qtscript_QStyleOptionToolBar_ToolBarFeature_toStringHelper(value)); +} + +static void qtscript_QStyleOptionToolBar_ToolBarFeature_fromScriptValue(const QScriptValue &value, QStyleOptionToolBar::ToolBarFeature &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionToolBar_ToolBarFeature(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionToolBar::None) && (arg <= QStyleOptionToolBar::Movable)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ToolBarFeature(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionToolBar_ToolBarFeature_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBar::ToolBarFeature value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionToolBar_ToolBarFeature_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBar::ToolBarFeature value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionToolBar_ToolBarFeature_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionToolBar_ToolBarFeature_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionToolBar_ToolBarFeature, + qtscript_QStyleOptionToolBar_ToolBarFeature_valueOf, qtscript_QStyleOptionToolBar_ToolBarFeature_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionToolBar_ToolBarFeature_toScriptValue, + qtscript_QStyleOptionToolBar_ToolBarFeature_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionToolBar_ToolBarFeature_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionToolBar_ToolBarFeature_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionToolBar::ToolBarFeatures +// + +static QScriptValue qtscript_QStyleOptionToolBar_ToolBarFeatures_toScriptValue(QScriptEngine *engine, const QStyleOptionToolBar::ToolBarFeatures &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QStyleOptionToolBar_ToolBarFeatures_fromScriptValue(const QScriptValue &value, QStyleOptionToolBar::ToolBarFeatures &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QStyleOptionToolBar_ToolBarFeatures(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBar::ToolBarFeatures result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("ToolBarFeatures(): argument %0 is not of type ToolBarFeature").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QStyleOptionToolBar_ToolBarFeatures_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBar::ToolBarFeatures value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionToolBar_ToolBarFeatures_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBar::ToolBarFeatures value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 2; ++i) { + if ((value & qtscript_QStyleOptionToolBar_ToolBarFeature_values[i]) == qtscript_QStyleOptionToolBar_ToolBarFeature_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QStyleOptionToolBar_ToolBarFeature_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QStyleOptionToolBar_ToolBarFeatures_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QStyleOptionToolBar_ToolBarFeatures_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QStyleOptionToolBar_ToolBarFeatures, qtscript_QStyleOptionToolBar_ToolBarFeatures_valueOf, + qtscript_QStyleOptionToolBar_ToolBarFeatures_toString, qtscript_QStyleOptionToolBar_ToolBarFeatures_equals); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionToolBar_ToolBarFeatures_toScriptValue, + qtscript_QStyleOptionToolBar_ToolBarFeatures_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QStyleOptionToolBar::ToolBarPosition +// + +static const QStyleOptionToolBar::ToolBarPosition qtscript_QStyleOptionToolBar_ToolBarPosition_values[] = { + QStyleOptionToolBar::Beginning + , QStyleOptionToolBar::Middle + , QStyleOptionToolBar::End + , QStyleOptionToolBar::OnlyOne +}; + +static const char * const qtscript_QStyleOptionToolBar_ToolBarPosition_keys[] = { + "Beginning" + , "Middle" + , "End" + , "OnlyOne" +}; + +static QString qtscript_QStyleOptionToolBar_ToolBarPosition_toStringHelper(QStyleOptionToolBar::ToolBarPosition value) +{ + if ((value >= QStyleOptionToolBar::Beginning) && (value <= QStyleOptionToolBar::OnlyOne)) + return qtscript_QStyleOptionToolBar_ToolBarPosition_keys[static_cast(value)-static_cast(QStyleOptionToolBar::Beginning)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionToolBar_ToolBarPosition_toScriptValue(QScriptEngine *engine, const QStyleOptionToolBar::ToolBarPosition &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionToolBar")); + return clazz.property(qtscript_QStyleOptionToolBar_ToolBarPosition_toStringHelper(value)); +} + +static void qtscript_QStyleOptionToolBar_ToolBarPosition_fromScriptValue(const QScriptValue &value, QStyleOptionToolBar::ToolBarPosition &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionToolBar_ToolBarPosition(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionToolBar::Beginning) && (arg <= QStyleOptionToolBar::OnlyOne)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ToolBarPosition(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionToolBar_ToolBarPosition_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBar::ToolBarPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionToolBar_ToolBarPosition_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBar::ToolBarPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionToolBar_ToolBarPosition_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionToolBar_ToolBarPosition_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionToolBar_ToolBarPosition, + qtscript_QStyleOptionToolBar_ToolBarPosition_valueOf, qtscript_QStyleOptionToolBar_ToolBarPosition_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionToolBar_ToolBarPosition_toScriptValue, + qtscript_QStyleOptionToolBar_ToolBarPosition_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionToolBar_ToolBarPosition_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionToolBar_ToolBarPosition_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionToolBar::StyleOptionType +// + +static const QStyleOptionToolBar::StyleOptionType qtscript_QStyleOptionToolBar_StyleOptionType_values[] = { + QStyleOptionToolBar::Type +}; + +static const char * const qtscript_QStyleOptionToolBar_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionToolBar_StyleOptionType_toStringHelper(QStyleOptionToolBar::StyleOptionType value) +{ + if ((value >= QStyleOptionToolBar::Type) && (value <= QStyleOptionToolBar::Type)) + return qtscript_QStyleOptionToolBar_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionToolBar::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionToolBar_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionToolBar::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionToolBar")); + return clazz.property(qtscript_QStyleOptionToolBar_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionToolBar_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionToolBar::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionToolBar_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionToolBar::Type) && (arg <= QStyleOptionToolBar::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionToolBar_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBar::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionToolBar_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBar::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionToolBar_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionToolBar_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionToolBar_StyleOptionType, + qtscript_QStyleOptionToolBar_StyleOptionType_valueOf, qtscript_QStyleOptionToolBar_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionToolBar_StyleOptionType_toScriptValue, + qtscript_QStyleOptionToolBar_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionToolBar_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionToolBar_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionToolBar +// + +static QScriptValue qtscript_QStyleOptionToolBar_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionToolBar* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionToolBar.%0(): this object is not a QStyleOptionToolBar") + .arg(qtscript_QStyleOptionToolBar_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionToolBar"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionToolBar_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionToolBar_function_names[_id+1], + qtscript_QStyleOptionToolBar_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionToolBar_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionToolBar(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionToolBar _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionToolBar)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionToolBar _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionToolBar _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionToolBar)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionToolBar_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionToolBar_function_names[_id], + qtscript_QStyleOptionToolBar_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionToolBar_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionToolBar*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionToolBar_static_call, proto, qtscript_QStyleOptionToolBar_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionToolBar_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ToolBarFeature"), + qtscript_create_QStyleOptionToolBar_ToolBarFeature_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ToolBarFeatures"), + qtscript_create_QStyleOptionToolBar_ToolBarFeatures_class(engine)); + ctor.setProperty(QString::fromLatin1("ToolBarPosition"), + qtscript_create_QStyleOptionToolBar_ToolBarPosition_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionToolBar_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionToolBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionToolBox.cpp new file mode 100644 index 00000000..dfab8912 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionToolBox.cpp @@ -0,0 +1,434 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionToolBox.h" + +static const char * const qtscript_QStyleOptionToolBox_function_names[] = { + "QStyleOptionToolBox" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionToolBox_function_signatures[] = { + "\nQStyleOptionToolBox other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionToolBox_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionToolBox_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionToolBox::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionToolBox) +Q_DECLARE_METATYPE(QStyleOptionToolBox*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionToolBox) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionToolBox*) +Q_DECLARE_METATYPE(QStyleOptionToolBox::SelectedPosition) +Q_DECLARE_METATYPE(QStyleOptionToolBox::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionToolBox::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOptionToolBox::TabPosition) +Q_DECLARE_METATYPE(QStyleOption*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QStyleOptionToolBox::SelectedPosition +// + +static const QStyleOptionToolBox::SelectedPosition qtscript_QStyleOptionToolBox_SelectedPosition_values[] = { + QStyleOptionToolBox::NotAdjacent + , QStyleOptionToolBox::NextIsSelected + , QStyleOptionToolBox::PreviousIsSelected +}; + +static const char * const qtscript_QStyleOptionToolBox_SelectedPosition_keys[] = { + "NotAdjacent" + , "NextIsSelected" + , "PreviousIsSelected" +}; + +static QString qtscript_QStyleOptionToolBox_SelectedPosition_toStringHelper(QStyleOptionToolBox::SelectedPosition value) +{ + if ((value >= QStyleOptionToolBox::NotAdjacent) && (value <= QStyleOptionToolBox::PreviousIsSelected)) + return qtscript_QStyleOptionToolBox_SelectedPosition_keys[static_cast(value)-static_cast(QStyleOptionToolBox::NotAdjacent)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionToolBox_SelectedPosition_toScriptValue(QScriptEngine *engine, const QStyleOptionToolBox::SelectedPosition &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionToolBox")); + return clazz.property(qtscript_QStyleOptionToolBox_SelectedPosition_toStringHelper(value)); +} + +static void qtscript_QStyleOptionToolBox_SelectedPosition_fromScriptValue(const QScriptValue &value, QStyleOptionToolBox::SelectedPosition &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionToolBox_SelectedPosition(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionToolBox::NotAdjacent) && (arg <= QStyleOptionToolBox::PreviousIsSelected)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SelectedPosition(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionToolBox_SelectedPosition_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBox::SelectedPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionToolBox_SelectedPosition_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBox::SelectedPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionToolBox_SelectedPosition_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionToolBox_SelectedPosition_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionToolBox_SelectedPosition, + qtscript_QStyleOptionToolBox_SelectedPosition_valueOf, qtscript_QStyleOptionToolBox_SelectedPosition_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionToolBox_SelectedPosition_toScriptValue, + qtscript_QStyleOptionToolBox_SelectedPosition_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionToolBox_SelectedPosition_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionToolBox_SelectedPosition_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionToolBox::StyleOptionVersion +// + +static const QStyleOptionToolBox::StyleOptionVersion qtscript_QStyleOptionToolBox_StyleOptionVersion_values[] = { + QStyleOptionToolBox::Version +}; + +static const char * const qtscript_QStyleOptionToolBox_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionToolBox_StyleOptionVersion_toStringHelper(QStyleOptionToolBox::StyleOptionVersion value) +{ + if ((value >= QStyleOptionToolBox::Version) && (value <= QStyleOptionToolBox::Version)) + return qtscript_QStyleOptionToolBox_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionToolBox::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionToolBox_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionToolBox::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionToolBox")); + return clazz.property(qtscript_QStyleOptionToolBox_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionToolBox_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionToolBox::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionToolBox_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionToolBox::Version) && (arg <= QStyleOptionToolBox::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionToolBox_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBox::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionToolBox_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBox::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionToolBox_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionToolBox_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionToolBox_StyleOptionVersion, + qtscript_QStyleOptionToolBox_StyleOptionVersion_valueOf, qtscript_QStyleOptionToolBox_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionToolBox_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionToolBox_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionToolBox_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionToolBox_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionToolBox::StyleOptionType +// + +static const QStyleOptionToolBox::StyleOptionType qtscript_QStyleOptionToolBox_StyleOptionType_values[] = { + QStyleOptionToolBox::Type +}; + +static const char * const qtscript_QStyleOptionToolBox_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionToolBox_StyleOptionType_toStringHelper(QStyleOptionToolBox::StyleOptionType value) +{ + if ((value >= QStyleOptionToolBox::Type) && (value <= QStyleOptionToolBox::Type)) + return qtscript_QStyleOptionToolBox_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionToolBox::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionToolBox_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionToolBox::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionToolBox")); + return clazz.property(qtscript_QStyleOptionToolBox_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionToolBox_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionToolBox::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionToolBox_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionToolBox::Type) && (arg <= QStyleOptionToolBox::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionToolBox_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBox::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionToolBox_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBox::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionToolBox_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionToolBox_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionToolBox_StyleOptionType, + qtscript_QStyleOptionToolBox_StyleOptionType_valueOf, qtscript_QStyleOptionToolBox_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionToolBox_StyleOptionType_toScriptValue, + qtscript_QStyleOptionToolBox_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionToolBox_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionToolBox_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionToolBox::TabPosition +// + +static const QStyleOptionToolBox::TabPosition qtscript_QStyleOptionToolBox_TabPosition_values[] = { + QStyleOptionToolBox::Beginning + , QStyleOptionToolBox::Middle + , QStyleOptionToolBox::End + , QStyleOptionToolBox::OnlyOneTab +}; + +static const char * const qtscript_QStyleOptionToolBox_TabPosition_keys[] = { + "Beginning" + , "Middle" + , "End" + , "OnlyOneTab" +}; + +static QString qtscript_QStyleOptionToolBox_TabPosition_toStringHelper(QStyleOptionToolBox::TabPosition value) +{ + if ((value >= QStyleOptionToolBox::Beginning) && (value <= QStyleOptionToolBox::OnlyOneTab)) + return qtscript_QStyleOptionToolBox_TabPosition_keys[static_cast(value)-static_cast(QStyleOptionToolBox::Beginning)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionToolBox_TabPosition_toScriptValue(QScriptEngine *engine, const QStyleOptionToolBox::TabPosition &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionToolBox")); + return clazz.property(qtscript_QStyleOptionToolBox_TabPosition_toStringHelper(value)); +} + +static void qtscript_QStyleOptionToolBox_TabPosition_fromScriptValue(const QScriptValue &value, QStyleOptionToolBox::TabPosition &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionToolBox_TabPosition(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionToolBox::Beginning) && (arg <= QStyleOptionToolBox::OnlyOneTab)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("TabPosition(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionToolBox_TabPosition_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBox::TabPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionToolBox_TabPosition_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolBox::TabPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionToolBox_TabPosition_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionToolBox_TabPosition_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionToolBox_TabPosition, + qtscript_QStyleOptionToolBox_TabPosition_valueOf, qtscript_QStyleOptionToolBox_TabPosition_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionToolBox_TabPosition_toScriptValue, + qtscript_QStyleOptionToolBox_TabPosition_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionToolBox_TabPosition_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionToolBox_TabPosition_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionToolBox +// + +static QScriptValue qtscript_QStyleOptionToolBox_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionToolBox* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionToolBox.%0(): this object is not a QStyleOptionToolBox") + .arg(qtscript_QStyleOptionToolBox_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionToolBox"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionToolBox_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionToolBox_function_names[_id+1], + qtscript_QStyleOptionToolBox_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionToolBox_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionToolBox(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionToolBox _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionToolBox)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionToolBox _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionToolBox _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionToolBox)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionToolBox_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionToolBox_function_names[_id], + qtscript_QStyleOptionToolBox_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionToolBox_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionToolBox*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionToolBox_static_call, proto, qtscript_QStyleOptionToolBox_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("SelectedPosition"), + qtscript_create_QStyleOptionToolBox_SelectedPosition_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionToolBox_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionToolBox_StyleOptionType_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("TabPosition"), + qtscript_create_QStyleOptionToolBox_TabPosition_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionToolButton.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionToolButton.cpp new file mode 100644 index 00000000..87134a57 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionToolButton.cpp @@ -0,0 +1,464 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionToolButton.h" + +static const char * const qtscript_QStyleOptionToolButton_function_names[] = { + "QStyleOptionToolButton" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QStyleOptionToolButton_function_signatures[] = { + "\nQStyleOptionToolButton other" + // static + // prototype +"" +}; + +static const int qtscript_QStyleOptionToolButton_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QStyleOptionToolButton_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionToolButton::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionToolButton) +Q_DECLARE_METATYPE(QStyleOptionToolButton*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionToolButton) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionToolButton*) +Q_DECLARE_METATYPE(QStyleOptionToolButton::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionToolButton::ToolButtonFeature) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QStyleOptionToolButton::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOptionComplex*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QStyleOptionToolButton::StyleOptionVersion +// + +static const QStyleOptionToolButton::StyleOptionVersion qtscript_QStyleOptionToolButton_StyleOptionVersion_values[] = { + QStyleOptionToolButton::Version +}; + +static const char * const qtscript_QStyleOptionToolButton_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionToolButton_StyleOptionVersion_toStringHelper(QStyleOptionToolButton::StyleOptionVersion value) +{ + if ((value >= QStyleOptionToolButton::Version) && (value <= QStyleOptionToolButton::Version)) + return qtscript_QStyleOptionToolButton_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionToolButton::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionToolButton_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionToolButton::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionToolButton")); + return clazz.property(qtscript_QStyleOptionToolButton_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionToolButton_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionToolButton::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionToolButton_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionToolButton::Version) && (arg <= QStyleOptionToolButton::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionToolButton_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolButton::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionToolButton_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolButton::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionToolButton_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionToolButton_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionToolButton_StyleOptionVersion, + qtscript_QStyleOptionToolButton_StyleOptionVersion_valueOf, qtscript_QStyleOptionToolButton_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionToolButton_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionToolButton_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionToolButton_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionToolButton_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionToolButton::ToolButtonFeature +// + +static const QStyleOptionToolButton::ToolButtonFeature qtscript_QStyleOptionToolButton_ToolButtonFeature_values[] = { + QStyleOptionToolButton::None + , QStyleOptionToolButton::Arrow + , QStyleOptionToolButton::Menu + , QStyleOptionToolButton::PopupDelay + , QStyleOptionToolButton::HasMenu +}; + +static const char * const qtscript_QStyleOptionToolButton_ToolButtonFeature_keys[] = { + "None" + , "Arrow" + , "Menu" + , "PopupDelay" + , "HasMenu" +}; + +static QString qtscript_QStyleOptionToolButton_ToolButtonFeature_toStringHelper(QStyleOptionToolButton::ToolButtonFeature value) +{ + for (int i = 0; i < 5; ++i) { + if (qtscript_QStyleOptionToolButton_ToolButtonFeature_values[i] == value) + return QString::fromLatin1(qtscript_QStyleOptionToolButton_ToolButtonFeature_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QStyleOptionToolButton_ToolButtonFeature_toScriptValue(QScriptEngine *engine, const QStyleOptionToolButton::ToolButtonFeature &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionToolButton")); + return clazz.property(qtscript_QStyleOptionToolButton_ToolButtonFeature_toStringHelper(value)); +} + +static void qtscript_QStyleOptionToolButton_ToolButtonFeature_fromScriptValue(const QScriptValue &value, QStyleOptionToolButton::ToolButtonFeature &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionToolButton_ToolButtonFeature(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 5; ++i) { + if (qtscript_QStyleOptionToolButton_ToolButtonFeature_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ToolButtonFeature(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionToolButton_ToolButtonFeature_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolButton::ToolButtonFeature value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionToolButton_ToolButtonFeature_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolButton::ToolButtonFeature value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionToolButton_ToolButtonFeature_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionToolButton_ToolButtonFeature_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionToolButton_ToolButtonFeature, + qtscript_QStyleOptionToolButton_ToolButtonFeature_valueOf, qtscript_QStyleOptionToolButton_ToolButtonFeature_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionToolButton_ToolButtonFeature_toScriptValue, + qtscript_QStyleOptionToolButton_ToolButtonFeature_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionToolButton_ToolButtonFeature_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionToolButton_ToolButtonFeature_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionToolButton::ToolButtonFeatures +// + +static QScriptValue qtscript_QStyleOptionToolButton_ToolButtonFeatures_toScriptValue(QScriptEngine *engine, const QStyleOptionToolButton::ToolButtonFeatures &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QStyleOptionToolButton_ToolButtonFeatures_fromScriptValue(const QScriptValue &value, QStyleOptionToolButton::ToolButtonFeatures &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QStyleOptionToolButton_ToolButtonFeatures(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolButton::ToolButtonFeatures result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("ToolButtonFeatures(): argument %0 is not of type ToolButtonFeature").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QStyleOptionToolButton_ToolButtonFeatures_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolButton::ToolButtonFeatures value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionToolButton_ToolButtonFeatures_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolButton::ToolButtonFeatures value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 5; ++i) { + if ((value & qtscript_QStyleOptionToolButton_ToolButtonFeature_values[i]) == qtscript_QStyleOptionToolButton_ToolButtonFeature_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QStyleOptionToolButton_ToolButtonFeature_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QStyleOptionToolButton_ToolButtonFeatures_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QStyleOptionToolButton_ToolButtonFeatures_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QStyleOptionToolButton_ToolButtonFeatures, qtscript_QStyleOptionToolButton_ToolButtonFeatures_valueOf, + qtscript_QStyleOptionToolButton_ToolButtonFeatures_toString, qtscript_QStyleOptionToolButton_ToolButtonFeatures_equals); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionToolButton_ToolButtonFeatures_toScriptValue, + qtscript_QStyleOptionToolButton_ToolButtonFeatures_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QStyleOptionToolButton::StyleOptionType +// + +static const QStyleOptionToolButton::StyleOptionType qtscript_QStyleOptionToolButton_StyleOptionType_values[] = { + QStyleOptionToolButton::Type +}; + +static const char * const qtscript_QStyleOptionToolButton_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionToolButton_StyleOptionType_toStringHelper(QStyleOptionToolButton::StyleOptionType value) +{ + if ((value >= QStyleOptionToolButton::Type) && (value <= QStyleOptionToolButton::Type)) + return qtscript_QStyleOptionToolButton_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionToolButton::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionToolButton_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionToolButton::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionToolButton")); + return clazz.property(qtscript_QStyleOptionToolButton_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionToolButton_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionToolButton::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionToolButton_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionToolButton::Type) && (arg <= QStyleOptionToolButton::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionToolButton_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolButton::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionToolButton_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionToolButton::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionToolButton_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionToolButton_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionToolButton_StyleOptionType, + qtscript_QStyleOptionToolButton_StyleOptionType_valueOf, qtscript_QStyleOptionToolButton_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionToolButton_StyleOptionType_toScriptValue, + qtscript_QStyleOptionToolButton_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionToolButton_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionToolButton_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionToolButton +// + +static QScriptValue qtscript_QStyleOptionToolButton_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionToolButton* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionToolButton.%0(): this object is not a QStyleOptionToolButton") + .arg(qtscript_QStyleOptionToolButton_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QStyleOptionToolButton"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionToolButton_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionToolButton_function_names[_id+1], + qtscript_QStyleOptionToolButton_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionToolButton_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionToolButton(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionToolButton _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionToolButton)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionToolButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionToolButton _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionToolButton)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionToolButton_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionToolButton_function_names[_id], + qtscript_QStyleOptionToolButton_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionToolButton_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionToolButton*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionToolButton_static_call, proto, qtscript_QStyleOptionToolButton_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionToolButton_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ToolButtonFeature"), + qtscript_create_QStyleOptionToolButton_ToolButtonFeature_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ToolButtonFeatures"), + qtscript_create_QStyleOptionToolButton_ToolButtonFeatures_class(engine)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionToolButton_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionViewItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionViewItem.cpp new file mode 100644 index 00000000..e4d99399 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyleOptionViewItem.cpp @@ -0,0 +1,636 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QStyleOptionViewItem.h" + +static const char * const qtscript_QStyleOptionViewItem_function_names[] = { + "QStyleOptionViewItem" + // static + // prototype + , "rect" + , "font" + , "toString" +}; + +static const char * const qtscript_QStyleOptionViewItem_function_signatures[] = { + "\nQStyleOptionViewItem other" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QStyleOptionViewItem_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QStyleOptionViewItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyleOptionViewItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyleOptionViewItem) +Q_DECLARE_METATYPE(QStyleOptionViewItem*) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionViewItem) +Q_DECLARE_METATYPE(QtScriptShell_QStyleOptionViewItem*) +Q_DECLARE_METATYPE(QStyleOptionViewItem::ViewItemFeature) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QStyleOptionViewItem::ViewItemPosition) +Q_DECLARE_METATYPE(QStyleOptionViewItem::StyleOptionVersion) +Q_DECLARE_METATYPE(QStyleOptionViewItem::Position) +Q_DECLARE_METATYPE(QStyleOptionViewItem::StyleOptionType) +Q_DECLARE_METATYPE(QStyleOption*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QStyleOptionViewItem::ViewItemFeature +// + +static const QStyleOptionViewItem::ViewItemFeature qtscript_QStyleOptionViewItem_ViewItemFeature_values[] = { + QStyleOptionViewItem::None + , QStyleOptionViewItem::WrapText + , QStyleOptionViewItem::Alternate + , QStyleOptionViewItem::HasCheckIndicator + , QStyleOptionViewItem::HasDisplay + , QStyleOptionViewItem::HasDecoration +}; + +static const char * const qtscript_QStyleOptionViewItem_ViewItemFeature_keys[] = { + "None" + , "WrapText" + , "Alternate" + , "HasCheckIndicator" + , "HasDisplay" + , "HasDecoration" +}; + +static QString qtscript_QStyleOptionViewItem_ViewItemFeature_toStringHelper(QStyleOptionViewItem::ViewItemFeature value) +{ + for (int i = 0; i < 6; ++i) { + if (qtscript_QStyleOptionViewItem_ViewItemFeature_values[i] == value) + return QString::fromLatin1(qtscript_QStyleOptionViewItem_ViewItemFeature_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QStyleOptionViewItem_ViewItemFeature_toScriptValue(QScriptEngine *engine, const QStyleOptionViewItem::ViewItemFeature &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionViewItem")); + return clazz.property(qtscript_QStyleOptionViewItem_ViewItemFeature_toStringHelper(value)); +} + +static void qtscript_QStyleOptionViewItem_ViewItemFeature_fromScriptValue(const QScriptValue &value, QStyleOptionViewItem::ViewItemFeature &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionViewItem_ViewItemFeature(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 6; ++i) { + if (qtscript_QStyleOptionViewItem_ViewItemFeature_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ViewItemFeature(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionViewItem_ViewItemFeature_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionViewItem::ViewItemFeature value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionViewItem_ViewItemFeature_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionViewItem::ViewItemFeature value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionViewItem_ViewItemFeature_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionViewItem_ViewItemFeature_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionViewItem_ViewItemFeature, + qtscript_QStyleOptionViewItem_ViewItemFeature_valueOf, qtscript_QStyleOptionViewItem_ViewItemFeature_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionViewItem_ViewItemFeature_toScriptValue, + qtscript_QStyleOptionViewItem_ViewItemFeature_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 6; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionViewItem_ViewItemFeature_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionViewItem_ViewItemFeature_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionViewItem::ViewItemFeatures +// + +static QScriptValue qtscript_QStyleOptionViewItem_ViewItemFeatures_toScriptValue(QScriptEngine *engine, const QStyleOptionViewItem::ViewItemFeatures &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QStyleOptionViewItem_ViewItemFeatures_fromScriptValue(const QScriptValue &value, QStyleOptionViewItem::ViewItemFeatures &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QStyleOptionViewItem_ViewItemFeatures(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionViewItem::ViewItemFeatures result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("ViewItemFeatures(): argument %0 is not of type ViewItemFeature").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QStyleOptionViewItem_ViewItemFeatures_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionViewItem::ViewItemFeatures value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionViewItem_ViewItemFeatures_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionViewItem::ViewItemFeatures value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 6; ++i) { + if ((value & qtscript_QStyleOptionViewItem_ViewItemFeature_values[i]) == qtscript_QStyleOptionViewItem_ViewItemFeature_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QStyleOptionViewItem_ViewItemFeature_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QStyleOptionViewItem_ViewItemFeatures_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QStyleOptionViewItem_ViewItemFeatures_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QStyleOptionViewItem_ViewItemFeatures, qtscript_QStyleOptionViewItem_ViewItemFeatures_valueOf, + qtscript_QStyleOptionViewItem_ViewItemFeatures_toString, qtscript_QStyleOptionViewItem_ViewItemFeatures_equals); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionViewItem_ViewItemFeatures_toScriptValue, + qtscript_QStyleOptionViewItem_ViewItemFeatures_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QStyleOptionViewItem::ViewItemPosition +// + +static const QStyleOptionViewItem::ViewItemPosition qtscript_QStyleOptionViewItem_ViewItemPosition_values[] = { + QStyleOptionViewItem::Invalid + , QStyleOptionViewItem::Beginning + , QStyleOptionViewItem::Middle + , QStyleOptionViewItem::End + , QStyleOptionViewItem::OnlyOne +}; + +static const char * const qtscript_QStyleOptionViewItem_ViewItemPosition_keys[] = { + "Invalid" + , "Beginning" + , "Middle" + , "End" + , "OnlyOne" +}; + +static QString qtscript_QStyleOptionViewItem_ViewItemPosition_toStringHelper(QStyleOptionViewItem::ViewItemPosition value) +{ + if ((value >= QStyleOptionViewItem::Invalid) && (value <= QStyleOptionViewItem::OnlyOne)) + return qtscript_QStyleOptionViewItem_ViewItemPosition_keys[static_cast(value)-static_cast(QStyleOptionViewItem::Invalid)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionViewItem_ViewItemPosition_toScriptValue(QScriptEngine *engine, const QStyleOptionViewItem::ViewItemPosition &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionViewItem")); + return clazz.property(qtscript_QStyleOptionViewItem_ViewItemPosition_toStringHelper(value)); +} + +static void qtscript_QStyleOptionViewItem_ViewItemPosition_fromScriptValue(const QScriptValue &value, QStyleOptionViewItem::ViewItemPosition &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionViewItem_ViewItemPosition(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionViewItem::Invalid) && (arg <= QStyleOptionViewItem::OnlyOne)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ViewItemPosition(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionViewItem_ViewItemPosition_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionViewItem::ViewItemPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionViewItem_ViewItemPosition_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionViewItem::ViewItemPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionViewItem_ViewItemPosition_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionViewItem_ViewItemPosition_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionViewItem_ViewItemPosition, + qtscript_QStyleOptionViewItem_ViewItemPosition_valueOf, qtscript_QStyleOptionViewItem_ViewItemPosition_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionViewItem_ViewItemPosition_toScriptValue, + qtscript_QStyleOptionViewItem_ViewItemPosition_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionViewItem_ViewItemPosition_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionViewItem_ViewItemPosition_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionViewItem::StyleOptionVersion +// + +static const QStyleOptionViewItem::StyleOptionVersion qtscript_QStyleOptionViewItem_StyleOptionVersion_values[] = { + QStyleOptionViewItem::Version +}; + +static const char * const qtscript_QStyleOptionViewItem_StyleOptionVersion_keys[] = { + "Version" +}; + +static QString qtscript_QStyleOptionViewItem_StyleOptionVersion_toStringHelper(QStyleOptionViewItem::StyleOptionVersion value) +{ + if ((value >= QStyleOptionViewItem::Version) && (value <= QStyleOptionViewItem::Version)) + return qtscript_QStyleOptionViewItem_StyleOptionVersion_keys[static_cast(value)-static_cast(QStyleOptionViewItem::Version)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionViewItem_StyleOptionVersion_toScriptValue(QScriptEngine *engine, const QStyleOptionViewItem::StyleOptionVersion &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionViewItem")); + return clazz.property(qtscript_QStyleOptionViewItem_StyleOptionVersion_toStringHelper(value)); +} + +static void qtscript_QStyleOptionViewItem_StyleOptionVersion_fromScriptValue(const QScriptValue &value, QStyleOptionViewItem::StyleOptionVersion &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionViewItem_StyleOptionVersion(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionViewItem::Version) && (arg <= QStyleOptionViewItem::Version)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionVersion(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionViewItem_StyleOptionVersion_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionViewItem::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionViewItem_StyleOptionVersion_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionViewItem::StyleOptionVersion value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionViewItem_StyleOptionVersion_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionViewItem_StyleOptionVersion_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionViewItem_StyleOptionVersion, + qtscript_QStyleOptionViewItem_StyleOptionVersion_valueOf, qtscript_QStyleOptionViewItem_StyleOptionVersion_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionViewItem_StyleOptionVersion_toScriptValue, + qtscript_QStyleOptionViewItem_StyleOptionVersion_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionViewItem_StyleOptionVersion_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionViewItem_StyleOptionVersion_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionViewItem::Position +// + +static const QStyleOptionViewItem::Position qtscript_QStyleOptionViewItem_Position_values[] = { + QStyleOptionViewItem::Left + , QStyleOptionViewItem::Right + , QStyleOptionViewItem::Top + , QStyleOptionViewItem::Bottom +}; + +static const char * const qtscript_QStyleOptionViewItem_Position_keys[] = { + "Left" + , "Right" + , "Top" + , "Bottom" +}; + +static QString qtscript_QStyleOptionViewItem_Position_toStringHelper(QStyleOptionViewItem::Position value) +{ + if ((value >= QStyleOptionViewItem::Left) && (value <= QStyleOptionViewItem::Bottom)) + return qtscript_QStyleOptionViewItem_Position_keys[static_cast(value)-static_cast(QStyleOptionViewItem::Left)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionViewItem_Position_toScriptValue(QScriptEngine *engine, const QStyleOptionViewItem::Position &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionViewItem")); + return clazz.property(qtscript_QStyleOptionViewItem_Position_toStringHelper(value)); +} + +static void qtscript_QStyleOptionViewItem_Position_fromScriptValue(const QScriptValue &value, QStyleOptionViewItem::Position &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionViewItem_Position(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionViewItem::Left) && (arg <= QStyleOptionViewItem::Bottom)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Position(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionViewItem_Position_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionViewItem::Position value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionViewItem_Position_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionViewItem::Position value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionViewItem_Position_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionViewItem_Position_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionViewItem_Position, + qtscript_QStyleOptionViewItem_Position_valueOf, qtscript_QStyleOptionViewItem_Position_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionViewItem_Position_toScriptValue, + qtscript_QStyleOptionViewItem_Position_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionViewItem_Position_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionViewItem_Position_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionViewItem::StyleOptionType +// + +static const QStyleOptionViewItem::StyleOptionType qtscript_QStyleOptionViewItem_StyleOptionType_values[] = { + QStyleOptionViewItem::Type +}; + +static const char * const qtscript_QStyleOptionViewItem_StyleOptionType_keys[] = { + "Type" +}; + +static QString qtscript_QStyleOptionViewItem_StyleOptionType_toStringHelper(QStyleOptionViewItem::StyleOptionType value) +{ + if ((value >= QStyleOptionViewItem::Type) && (value <= QStyleOptionViewItem::Type)) + return qtscript_QStyleOptionViewItem_StyleOptionType_keys[static_cast(value)-static_cast(QStyleOptionViewItem::Type)]; + return QString(); +} + +static QScriptValue qtscript_QStyleOptionViewItem_StyleOptionType_toScriptValue(QScriptEngine *engine, const QStyleOptionViewItem::StyleOptionType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QStyleOptionViewItem")); + return clazz.property(qtscript_QStyleOptionViewItem_StyleOptionType_toStringHelper(value)); +} + +static void qtscript_QStyleOptionViewItem_StyleOptionType_fromScriptValue(const QScriptValue &value, QStyleOptionViewItem::StyleOptionType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QStyleOptionViewItem_StyleOptionType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QStyleOptionViewItem::Type) && (arg <= QStyleOptionViewItem::Type)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("StyleOptionType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QStyleOptionViewItem_StyleOptionType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionViewItem::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QStyleOptionViewItem_StyleOptionType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QStyleOptionViewItem::StyleOptionType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QStyleOptionViewItem_StyleOptionType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QStyleOptionViewItem_StyleOptionType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QStyleOptionViewItem_StyleOptionType, + qtscript_QStyleOptionViewItem_StyleOptionType_valueOf, qtscript_QStyleOptionViewItem_StyleOptionType_toString); + qScriptRegisterMetaType(engine, qtscript_QStyleOptionViewItem_StyleOptionType_toScriptValue, + qtscript_QStyleOptionViewItem_StyleOptionType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 1; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QStyleOptionViewItem_StyleOptionType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QStyleOptionViewItem_StyleOptionType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QStyleOptionViewItem +// + +static QScriptValue qtscript_QStyleOptionViewItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyleOptionViewItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyleOptionViewItem.%0(): this object is not a QStyleOptionViewItem") + .arg(qtscript_QStyleOptionViewItem_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QRect result = _q_self->rect; + return qScriptValueFromValue(context->engine(), result); + } + case 1: { + QFont result = _q_self->font; + return qScriptValueFromValue(context->engine(), result); + } + case 2: { + QString result = QString::fromLatin1("QStyleOptionViewItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionViewItem_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionViewItem_function_names[_id+1], + qtscript_QStyleOptionViewItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyleOptionViewItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyleOptionViewItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyleOptionViewItem _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionViewItem)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QStyleOptionViewItem _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QStyleOptionViewItem _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QStyleOptionViewItem)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyleOptionViewItem_throw_ambiguity_error_helper(context, + qtscript_QStyleOptionViewItem_function_names[_id], + qtscript_QStyleOptionViewItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStyleOptionViewItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyleOptionViewItem*)0)); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStyleOptionViewItem_prototype_call, qtscript_QStyleOptionViewItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStyleOptionViewItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyleOptionViewItem_static_call, proto, qtscript_QStyleOptionViewItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ViewItemFeature"), + qtscript_create_QStyleOptionViewItem_ViewItemFeature_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ViewItemFeatures"), + qtscript_create_QStyleOptionViewItem_ViewItemFeatures_class(engine)); + ctor.setProperty(QString::fromLatin1("ViewItemPosition"), + qtscript_create_QStyleOptionViewItem_ViewItemPosition_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionVersion"), + qtscript_create_QStyleOptionViewItem_StyleOptionVersion_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Position"), + qtscript_create_QStyleOptionViewItem_Position_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("StyleOptionType"), + qtscript_create_QStyleOptionViewItem_StyleOptionType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStylePainter.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStylePainter.cpp new file mode 100644 index 00000000..772ca361 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStylePainter.cpp @@ -0,0 +1,273 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QStylePainter_function_names[] = { + "QStylePainter" + // static + // prototype + , "begin" + , "drawComplexControl" + , "drawControl" + , "drawItemPixmap" + , "drawItemText" + , "drawPrimitive" + , "style" + , "toString" +}; + +static const char * const qtscript_QStylePainter_function_signatures[] = { + "\nQPaintDevice pd, QWidget w\nQWidget w" + // static + // prototype + , "QPaintDevice pd, QWidget w\nQWidget w" + , "ComplexControl cc, QStyleOptionComplex opt" + , "ControlElement ce, QStyleOption opt" + , "QRect r, int flags, QPixmap pixmap" + , "QRect r, int flags, QPalette pal, bool enabled, String text, ColorRole textRole" + , "PrimitiveElement pe, QStyleOption opt" + , "" +"" +}; + +static const int qtscript_QStylePainter_function_lengths[] = { + 2 + // static + // prototype + , 2 + , 2 + , 2 + , 3 + , 6 + , 2 + , 0 + , 0 +}; + +static QScriptValue qtscript_QStylePainter_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStylePainter::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStylePainter*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QStyle::ComplexControl) +Q_DECLARE_METATYPE(QStyleOptionComplex) +Q_DECLARE_METATYPE(QStyle::ControlElement) +Q_DECLARE_METATYPE(QStyleOption) +Q_DECLARE_METATYPE(QPalette::ColorRole) +Q_DECLARE_METATYPE(QStyle::PrimitiveElement) +Q_DECLARE_METATYPE(QStyle*) +Q_DECLARE_METATYPE(QPainter*) + +// +// QStylePainter +// + +static QScriptValue qtscript_QStylePainter_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 7; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStylePainter* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStylePainter.%0(): this object is not a QStylePainter") + .arg(qtscript_QStylePainter_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->begin(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QPaintDevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->begin(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 2) { + QStyle::ComplexControl _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStyleOptionComplex _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawComplexControl(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 2) { + QStyle::ControlElement _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStyleOption _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawControl(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 3) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QPixmap _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->drawItemPixmap(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 5) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QPalette _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_arg3 = context->argument(3).toBoolean(); + QString _q_arg4 = context->argument(4).toString(); + _q_self->drawItemText(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 6) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QPalette _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_arg3 = context->argument(3).toBoolean(); + QString _q_arg4 = context->argument(4).toString(); + QPalette::ColorRole _q_arg5 = qscriptvalue_cast(context->argument(5)); + _q_self->drawItemText(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4, _q_arg5); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 2) { + QStyle::PrimitiveElement _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStyleOption _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->drawPrimitive(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QStyle* _q_result = _q_self->style(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: { + QString result = QString::fromLatin1("QStylePainter"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStylePainter_throw_ambiguity_error_helper(context, + qtscript_QStylePainter_function_names[_id+1], + qtscript_QStylePainter_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStylePainter_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStylePainter(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QStylePainter* _q_cpp_result = new QStylePainter(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStylePainter* _q_cpp_result = new QStylePainter(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 2) { + QPaintDevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QStylePainter* _q_cpp_result = new QStylePainter(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStylePainter_throw_ambiguity_error_helper(context, + qtscript_QStylePainter_function_names[_id], + qtscript_QStylePainter_function_signatures[_id]); +} + +QScriptValue qtscript_create_QStylePainter_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStylePainter*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStylePainter_prototype_call, qtscript_QStylePainter_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStylePainter_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStylePainter_static_call, proto, qtscript_QStylePainter_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStylePlugin.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStylePlugin.cpp new file mode 100644 index 00000000..30273b37 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStylePlugin.cpp @@ -0,0 +1,166 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QStylePlugin.h" + +static const char * const qtscript_QStylePlugin_function_names[] = { + "QStylePlugin" + // static + // prototype + , "create" + , "toString" +}; + +static const char * const qtscript_QStylePlugin_function_signatures[] = { + "QObject parent" + // static + // prototype + , "String key" +"" +}; + +static const int qtscript_QStylePlugin_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 +}; + +static QScriptValue qtscript_QStylePlugin_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStylePlugin::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStylePlugin*) +Q_DECLARE_METATYPE(QtScriptShell_QStylePlugin*) +Q_DECLARE_METATYPE(QStyle*) + +// +// QStylePlugin +// + +static QScriptValue qtscript_QStylePlugin_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStylePlugin* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStylePlugin.%0(): this object is not a QStylePlugin") + .arg(qtscript_QStylePlugin_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QStyle* _q_result = _q_self->create(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("QStylePlugin"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStylePlugin_throw_ambiguity_error_helper(context, + qtscript_QStylePlugin_function_names[_id+1], + qtscript_QStylePlugin_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStylePlugin_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStylePlugin(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStylePlugin* _q_cpp_result = new QtScriptShell_QStylePlugin(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStylePlugin*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QStylePlugin* _q_cpp_result = new QtScriptShell_QStylePlugin(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStylePlugin*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStylePlugin_throw_ambiguity_error_helper(context, + qtscript_QStylePlugin_function_names[_id], + qtscript_QStylePlugin_function_signatures[_id]); +} + +static QScriptValue qtscript_QStylePlugin_toScriptValue(QScriptEngine *engine, QStylePlugin* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QStylePlugin_fromScriptValue(const QScriptValue &value, QStylePlugin* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QStylePlugin_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStylePlugin*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStylePlugin_prototype_call, qtscript_QStylePlugin_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStylePlugin_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QStylePlugin_toScriptValue, + qtscript_QStylePlugin_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStylePlugin_static_call, proto, qtscript_QStylePlugin_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyledItemDelegate.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyledItemDelegate.cpp new file mode 100644 index 00000000..939a56b3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QStyledItemDelegate.cpp @@ -0,0 +1,199 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QStyledItemDelegate.h" + +static const char * const qtscript_QStyledItemDelegate_function_names[] = { + "QStyledItemDelegate" + // static + // prototype + , "displayText" + , "itemEditorFactory" + , "setItemEditorFactory" + , "toString" +}; + +static const char * const qtscript_QStyledItemDelegate_function_signatures[] = { + "QObject parent" + // static + // prototype + , "Object value, QLocale locale" + , "" + , "QItemEditorFactory factory" +"" +}; + +static const int qtscript_QStyledItemDelegate_function_lengths[] = { + 1 + // static + // prototype + , 2 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QStyledItemDelegate_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QStyledItemDelegate::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QStyledItemDelegate*) +Q_DECLARE_METATYPE(QtScriptShell_QStyledItemDelegate*) +Q_DECLARE_METATYPE(QItemEditorFactory*) +Q_DECLARE_METATYPE(QAbstractItemDelegate*) + +// +// QStyledItemDelegate +// + +static QScriptValue qtscript_QStyledItemDelegate_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QStyledItemDelegate* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QStyledItemDelegate.%0(): this object is not a QStyledItemDelegate") + .arg(qtscript_QStyledItemDelegate_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QVariant _q_arg0 = context->argument(0).toVariant(); + QLocale _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = _q_self->displayText(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QItemEditorFactory* _q_result = _q_self->itemEditorFactory(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QItemEditorFactory* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setItemEditorFactory(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: { + QString result = QString::fromLatin1("QStyledItemDelegate"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QStyledItemDelegate_throw_ambiguity_error_helper(context, + qtscript_QStyledItemDelegate_function_names[_id+1], + qtscript_QStyledItemDelegate_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QStyledItemDelegate_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QStyledItemDelegate(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QStyledItemDelegate* _q_cpp_result = new QtScriptShell_QStyledItemDelegate(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStyledItemDelegate*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QStyledItemDelegate* _q_cpp_result = new QtScriptShell_QStyledItemDelegate(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QStyledItemDelegate*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QStyledItemDelegate_throw_ambiguity_error_helper(context, + qtscript_QStyledItemDelegate_function_names[_id], + qtscript_QStyledItemDelegate_function_signatures[_id]); +} + +static QScriptValue qtscript_QStyledItemDelegate_toScriptValue(QScriptEngine *engine, QStyledItemDelegate* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QStyledItemDelegate_fromScriptValue(const QScriptValue &value, QStyledItemDelegate* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QStyledItemDelegate_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QStyledItemDelegate*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QStyledItemDelegate_prototype_call, qtscript_QStyledItemDelegate_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QStyledItemDelegate_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QStyledItemDelegate_toScriptValue, + qtscript_QStyledItemDelegate_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QStyledItemDelegate_static_call, proto, qtscript_QStyledItemDelegate_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSwipeGesture.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSwipeGesture.cpp new file mode 100644 index 00000000..08fa9fd5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSwipeGesture.cpp @@ -0,0 +1,239 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSwipeGesture.h" + +static const char * const qtscript_QSwipeGesture_function_names[] = { + "QSwipeGesture" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QSwipeGesture_function_signatures[] = { + "QObject parent" + // static + // prototype +"" +}; + +static const int qtscript_QSwipeGesture_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QSwipeGesture_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSwipeGesture::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSwipeGesture*) +Q_DECLARE_METATYPE(QtScriptShell_QSwipeGesture*) +Q_DECLARE_METATYPE(QSwipeGesture::SwipeDirection) +Q_DECLARE_METATYPE(QGesture*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QSwipeGesture::SwipeDirection +// + +static const QSwipeGesture::SwipeDirection qtscript_QSwipeGesture_SwipeDirection_values[] = { + QSwipeGesture::NoDirection + , QSwipeGesture::Left + , QSwipeGesture::Right + , QSwipeGesture::Up + , QSwipeGesture::Down +}; + +static const char * const qtscript_QSwipeGesture_SwipeDirection_keys[] = { + "NoDirection" + , "Left" + , "Right" + , "Up" + , "Down" +}; + +static QString qtscript_QSwipeGesture_SwipeDirection_toStringHelper(QSwipeGesture::SwipeDirection value) +{ + if ((value >= QSwipeGesture::NoDirection) && (value <= QSwipeGesture::Down)) + return qtscript_QSwipeGesture_SwipeDirection_keys[static_cast(value)-static_cast(QSwipeGesture::NoDirection)]; + return QString(); +} + +static QScriptValue qtscript_QSwipeGesture_SwipeDirection_toScriptValue(QScriptEngine *engine, const QSwipeGesture::SwipeDirection &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSwipeGesture")); + return clazz.property(qtscript_QSwipeGesture_SwipeDirection_toStringHelper(value)); +} + +static void qtscript_QSwipeGesture_SwipeDirection_fromScriptValue(const QScriptValue &value, QSwipeGesture::SwipeDirection &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSwipeGesture_SwipeDirection(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSwipeGesture::NoDirection) && (arg <= QSwipeGesture::Down)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SwipeDirection(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSwipeGesture_SwipeDirection_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSwipeGesture::SwipeDirection value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSwipeGesture_SwipeDirection_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSwipeGesture::SwipeDirection value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSwipeGesture_SwipeDirection_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSwipeGesture_SwipeDirection_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSwipeGesture_SwipeDirection, + qtscript_QSwipeGesture_SwipeDirection_valueOf, qtscript_QSwipeGesture_SwipeDirection_toString); + qScriptRegisterMetaType(engine, qtscript_QSwipeGesture_SwipeDirection_toScriptValue, + qtscript_QSwipeGesture_SwipeDirection_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSwipeGesture_SwipeDirection_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSwipeGesture_SwipeDirection_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSwipeGesture +// + +static QScriptValue qtscript_QSwipeGesture_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSwipeGesture* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSwipeGesture.%0(): this object is not a QSwipeGesture") + .arg(qtscript_QSwipeGesture_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QSwipeGesture"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSwipeGesture_throw_ambiguity_error_helper(context, + qtscript_QSwipeGesture_function_names[_id+1], + qtscript_QSwipeGesture_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QSwipeGesture_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSwipeGesture(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSwipeGesture* _q_cpp_result = new QtScriptShell_QSwipeGesture(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSwipeGesture*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QSwipeGesture* _q_cpp_result = new QtScriptShell_QSwipeGesture(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSwipeGesture*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSwipeGesture_throw_ambiguity_error_helper(context, + qtscript_QSwipeGesture_function_names[_id], + qtscript_QSwipeGesture_function_signatures[_id]); +} + +static QScriptValue qtscript_QSwipeGesture_toScriptValue(QScriptEngine *engine, QSwipeGesture* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSwipeGesture_fromScriptValue(const QScriptValue &value, QSwipeGesture* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSwipeGesture_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSwipeGesture*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QSwipeGesture_toScriptValue, + qtscript_QSwipeGesture_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSwipeGesture_static_call, proto, qtscript_QSwipeGesture_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("SwipeDirection"), + qtscript_create_QSwipeGesture_SwipeDirection_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSystemTrayIcon.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSystemTrayIcon.cpp new file mode 100644 index 00000000..4ce32366 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QSystemTrayIcon.cpp @@ -0,0 +1,395 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QSystemTrayIcon.h" + +static const char * const qtscript_QSystemTrayIcon_function_names[] = { + "QSystemTrayIcon" + // static + , "isSystemTrayAvailable" + , "supportsMessages" + // prototype + , "contextMenu" + , "geometry" + , "setContextMenu" + , "toString" +}; + +static const char * const qtscript_QSystemTrayIcon_function_signatures[] = { + "QObject parent\nQIcon icon, QObject parent" + // static + , "" + , "" + // prototype + , "" + , "" + , "QMenu menu" +"" +}; + +static const int qtscript_QSystemTrayIcon_function_lengths[] = { + 2 + // static + , 0 + , 0 + // prototype + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QSystemTrayIcon_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QSystemTrayIcon::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QSystemTrayIcon*) +Q_DECLARE_METATYPE(QtScriptShell_QSystemTrayIcon*) +Q_DECLARE_METATYPE(QSystemTrayIcon::MessageIcon) +Q_DECLARE_METATYPE(QSystemTrayIcon::ActivationReason) +Q_DECLARE_METATYPE(QMenu*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QSystemTrayIcon::MessageIcon +// + +static const QSystemTrayIcon::MessageIcon qtscript_QSystemTrayIcon_MessageIcon_values[] = { + QSystemTrayIcon::NoIcon + , QSystemTrayIcon::Information + , QSystemTrayIcon::Warning + , QSystemTrayIcon::Critical +}; + +static const char * const qtscript_QSystemTrayIcon_MessageIcon_keys[] = { + "NoIcon" + , "Information" + , "Warning" + , "Critical" +}; + +static QString qtscript_QSystemTrayIcon_MessageIcon_toStringHelper(QSystemTrayIcon::MessageIcon value) +{ + if ((value >= QSystemTrayIcon::NoIcon) && (value <= QSystemTrayIcon::Critical)) + return qtscript_QSystemTrayIcon_MessageIcon_keys[static_cast(value)-static_cast(QSystemTrayIcon::NoIcon)]; + return QString(); +} + +static QScriptValue qtscript_QSystemTrayIcon_MessageIcon_toScriptValue(QScriptEngine *engine, const QSystemTrayIcon::MessageIcon &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSystemTrayIcon")); + return clazz.property(qtscript_QSystemTrayIcon_MessageIcon_toStringHelper(value)); +} + +static void qtscript_QSystemTrayIcon_MessageIcon_fromScriptValue(const QScriptValue &value, QSystemTrayIcon::MessageIcon &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSystemTrayIcon_MessageIcon(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSystemTrayIcon::NoIcon) && (arg <= QSystemTrayIcon::Critical)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("MessageIcon(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSystemTrayIcon_MessageIcon_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSystemTrayIcon::MessageIcon value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSystemTrayIcon_MessageIcon_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSystemTrayIcon::MessageIcon value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSystemTrayIcon_MessageIcon_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSystemTrayIcon_MessageIcon_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSystemTrayIcon_MessageIcon, + qtscript_QSystemTrayIcon_MessageIcon_valueOf, qtscript_QSystemTrayIcon_MessageIcon_toString); + qScriptRegisterMetaType(engine, qtscript_QSystemTrayIcon_MessageIcon_toScriptValue, + qtscript_QSystemTrayIcon_MessageIcon_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSystemTrayIcon_MessageIcon_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSystemTrayIcon_MessageIcon_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSystemTrayIcon::ActivationReason +// + +static const QSystemTrayIcon::ActivationReason qtscript_QSystemTrayIcon_ActivationReason_values[] = { + QSystemTrayIcon::Unknown + , QSystemTrayIcon::Context + , QSystemTrayIcon::DoubleClick + , QSystemTrayIcon::Trigger + , QSystemTrayIcon::MiddleClick +}; + +static const char * const qtscript_QSystemTrayIcon_ActivationReason_keys[] = { + "Unknown" + , "Context" + , "DoubleClick" + , "Trigger" + , "MiddleClick" +}; + +static QString qtscript_QSystemTrayIcon_ActivationReason_toStringHelper(QSystemTrayIcon::ActivationReason value) +{ + if ((value >= QSystemTrayIcon::Unknown) && (value <= QSystemTrayIcon::MiddleClick)) + return qtscript_QSystemTrayIcon_ActivationReason_keys[static_cast(value)-static_cast(QSystemTrayIcon::Unknown)]; + return QString(); +} + +static QScriptValue qtscript_QSystemTrayIcon_ActivationReason_toScriptValue(QScriptEngine *engine, const QSystemTrayIcon::ActivationReason &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QSystemTrayIcon")); + return clazz.property(qtscript_QSystemTrayIcon_ActivationReason_toStringHelper(value)); +} + +static void qtscript_QSystemTrayIcon_ActivationReason_fromScriptValue(const QScriptValue &value, QSystemTrayIcon::ActivationReason &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QSystemTrayIcon_ActivationReason(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QSystemTrayIcon::Unknown) && (arg <= QSystemTrayIcon::MiddleClick)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ActivationReason(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QSystemTrayIcon_ActivationReason_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QSystemTrayIcon::ActivationReason value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QSystemTrayIcon_ActivationReason_toString(QScriptContext *context, QScriptEngine *engine) +{ + QSystemTrayIcon::ActivationReason value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QSystemTrayIcon_ActivationReason_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QSystemTrayIcon_ActivationReason_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QSystemTrayIcon_ActivationReason, + qtscript_QSystemTrayIcon_ActivationReason_valueOf, qtscript_QSystemTrayIcon_ActivationReason_toString); + qScriptRegisterMetaType(engine, qtscript_QSystemTrayIcon_ActivationReason_toScriptValue, + qtscript_QSystemTrayIcon_ActivationReason_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QSystemTrayIcon_ActivationReason_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QSystemTrayIcon_ActivationReason_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QSystemTrayIcon +// + +static QScriptValue qtscript_QSystemTrayIcon_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QSystemTrayIcon* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QSystemTrayIcon.%0(): this object is not a QSystemTrayIcon") + .arg(qtscript_QSystemTrayIcon_function_names[_id+3])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QMenu* _q_result = _q_self->contextMenu(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->geometry(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QMenu* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setContextMenu(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: { + QString result = QString::fromLatin1("QSystemTrayIcon"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QSystemTrayIcon_throw_ambiguity_error_helper(context, + qtscript_QSystemTrayIcon_function_names[_id+3], + qtscript_QSystemTrayIcon_function_signatures[_id+3]); +} + +static QScriptValue qtscript_QSystemTrayIcon_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QSystemTrayIcon(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QSystemTrayIcon* _q_cpp_result = new QtScriptShell_QSystemTrayIcon(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSystemTrayIcon*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isQObject()) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QSystemTrayIcon* _q_cpp_result = new QtScriptShell_QSystemTrayIcon(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSystemTrayIcon*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QSystemTrayIcon* _q_cpp_result = new QtScriptShell_QSystemTrayIcon(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSystemTrayIcon*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QObject* _q_arg1 = context->argument(1).toQObject(); + QtScriptShell_QSystemTrayIcon* _q_cpp_result = new QtScriptShell_QSystemTrayIcon(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QSystemTrayIcon*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = QSystemTrayIcon::isSystemTrayAvailable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = QSystemTrayIcon::supportsMessages(); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QSystemTrayIcon_throw_ambiguity_error_helper(context, + qtscript_QSystemTrayIcon_function_names[_id], + qtscript_QSystemTrayIcon_function_signatures[_id]); +} + +static QScriptValue qtscript_QSystemTrayIcon_toScriptValue(QScriptEngine *engine, QSystemTrayIcon* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QSystemTrayIcon_fromScriptValue(const QScriptValue &value, QSystemTrayIcon* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QSystemTrayIcon_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QSystemTrayIcon*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSystemTrayIcon_prototype_call, qtscript_QSystemTrayIcon_function_lengths[i+3]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QSystemTrayIcon_function_names[i+3]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QSystemTrayIcon_toScriptValue, + qtscript_QSystemTrayIcon_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QSystemTrayIcon_static_call, proto, qtscript_QSystemTrayIcon_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QSystemTrayIcon_static_call, + qtscript_QSystemTrayIcon_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QSystemTrayIcon_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("MessageIcon"), + qtscript_create_QSystemTrayIcon_MessageIcon_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ActivationReason"), + qtscript_create_QSystemTrayIcon_ActivationReason_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTabBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTabBar.cpp new file mode 100644 index 00000000..0d19fef3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTabBar.cpp @@ -0,0 +1,638 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTabBar.h" + +static const char * const qtscript_QTabBar_function_names[] = { + "QTabBar" + // static + // prototype + , "addTab" + , "insertTab" + , "isTabEnabled" + , "minimumSizeHint" + , "moveTab" + , "removeTab" + , "setTabButton" + , "setTabData" + , "setTabEnabled" + , "setTabIcon" + , "setTabText" + , "setTabTextColor" + , "setTabToolTip" + , "setTabWhatsThis" + , "sizeHint" + , "tabAt" + , "tabButton" + , "tabData" + , "tabIcon" + , "tabRect" + , "tabText" + , "tabTextColor" + , "tabToolTip" + , "tabWhatsThis" + , "toString" +}; + +static const char * const qtscript_QTabBar_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "QIcon icon, String text\nString text" + , "int index, QIcon icon, String text\nint index, String text" + , "int index" + , "" + , "int from, int to" + , "int index" + , "int index, ButtonPosition position, QWidget widget" + , "int index, Object data" + , "int index, bool arg__2" + , "int index, QIcon icon" + , "int index, String text" + , "int index, QColor color" + , "int index, String tip" + , "int index, String text" + , "" + , "QPoint pos" + , "int index, ButtonPosition position" + , "int index" + , "int index" + , "int index" + , "int index" + , "int index" + , "int index" + , "int index" +"" +}; + +static const int qtscript_QTabBar_function_lengths[] = { + 1 + // static + // prototype + , 2 + , 3 + , 1 + , 0 + , 2 + , 1 + , 3 + , 2 + , 2 + , 2 + , 2 + , 2 + , 2 + , 2 + , 0 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QTabBar_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTabBar::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTabBar*) +Q_DECLARE_METATYPE(QtScriptShell_QTabBar*) +Q_DECLARE_METATYPE(QTabBar::SelectionBehavior) +Q_DECLARE_METATYPE(QTabBar::Shape) +Q_DECLARE_METATYPE(QTabBar::ButtonPosition) +Q_DECLARE_METATYPE(QWidget*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTabBar::SelectionBehavior +// + +static const QTabBar::SelectionBehavior qtscript_QTabBar_SelectionBehavior_values[] = { + QTabBar::SelectLeftTab + , QTabBar::SelectRightTab + , QTabBar::SelectPreviousTab +}; + +static const char * const qtscript_QTabBar_SelectionBehavior_keys[] = { + "SelectLeftTab" + , "SelectRightTab" + , "SelectPreviousTab" +}; + +static QString qtscript_QTabBar_SelectionBehavior_toStringHelper(QTabBar::SelectionBehavior value) +{ + if ((value >= QTabBar::SelectLeftTab) && (value <= QTabBar::SelectPreviousTab)) + return qtscript_QTabBar_SelectionBehavior_keys[static_cast(value)-static_cast(QTabBar::SelectLeftTab)]; + return QString(); +} + +static QScriptValue qtscript_QTabBar_SelectionBehavior_toScriptValue(QScriptEngine *engine, const QTabBar::SelectionBehavior &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTabBar")); + return clazz.property(qtscript_QTabBar_SelectionBehavior_toStringHelper(value)); +} + +static void qtscript_QTabBar_SelectionBehavior_fromScriptValue(const QScriptValue &value, QTabBar::SelectionBehavior &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTabBar_SelectionBehavior(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTabBar::SelectLeftTab) && (arg <= QTabBar::SelectPreviousTab)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("SelectionBehavior(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTabBar_SelectionBehavior_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTabBar::SelectionBehavior value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTabBar_SelectionBehavior_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTabBar::SelectionBehavior value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTabBar_SelectionBehavior_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTabBar_SelectionBehavior_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTabBar_SelectionBehavior, + qtscript_QTabBar_SelectionBehavior_valueOf, qtscript_QTabBar_SelectionBehavior_toString); + qScriptRegisterMetaType(engine, qtscript_QTabBar_SelectionBehavior_toScriptValue, + qtscript_QTabBar_SelectionBehavior_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTabBar_SelectionBehavior_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTabBar_SelectionBehavior_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTabBar::Shape +// + +static const QTabBar::Shape qtscript_QTabBar_Shape_values[] = { + QTabBar::RoundedNorth + , QTabBar::RoundedSouth + , QTabBar::RoundedWest + , QTabBar::RoundedEast + , QTabBar::TriangularNorth + , QTabBar::TriangularSouth + , QTabBar::TriangularWest + , QTabBar::TriangularEast +}; + +static const char * const qtscript_QTabBar_Shape_keys[] = { + "RoundedNorth" + , "RoundedSouth" + , "RoundedWest" + , "RoundedEast" + , "TriangularNorth" + , "TriangularSouth" + , "TriangularWest" + , "TriangularEast" +}; + +static QString qtscript_QTabBar_Shape_toStringHelper(QTabBar::Shape value) +{ + if ((value >= QTabBar::RoundedNorth) && (value <= QTabBar::TriangularEast)) + return qtscript_QTabBar_Shape_keys[static_cast(value)-static_cast(QTabBar::RoundedNorth)]; + return QString(); +} + +static QScriptValue qtscript_QTabBar_Shape_toScriptValue(QScriptEngine *engine, const QTabBar::Shape &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTabBar")); + return clazz.property(qtscript_QTabBar_Shape_toStringHelper(value)); +} + +static void qtscript_QTabBar_Shape_fromScriptValue(const QScriptValue &value, QTabBar::Shape &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTabBar_Shape(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTabBar::RoundedNorth) && (arg <= QTabBar::TriangularEast)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("Shape(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTabBar_Shape_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTabBar::Shape value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTabBar_Shape_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTabBar::Shape value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTabBar_Shape_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTabBar_Shape_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTabBar_Shape, + qtscript_QTabBar_Shape_valueOf, qtscript_QTabBar_Shape_toString); + qScriptRegisterMetaType(engine, qtscript_QTabBar_Shape_toScriptValue, + qtscript_QTabBar_Shape_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 8; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTabBar_Shape_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTabBar_Shape_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTabBar +// + +static QScriptValue qtscript_QTabBar_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 24; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTabBar* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTabBar.%0(): this object is not a QTabBar") + .arg(qtscript_QTabBar_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + int _q_result = _q_self->addTab(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + int _q_result = _q_self->addTab(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + int _q_result = _q_self->insertTab(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + QIcon _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + int _q_result = _q_self->insertTab(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->isTabEnabled(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->moveTab(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->removeTab(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + QTabBar::ButtonPosition _q_arg1 = qscriptvalue_cast(context->argument(1)); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setTabButton(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setTabData(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setTabEnabled(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QIcon _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setTabIcon(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setTabText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QColor _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setTabTextColor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setTabToolTip(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setTabWhatsThis(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->tabAt(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QTabBar::ButtonPosition _q_arg1 = qscriptvalue_cast(context->argument(1)); + QWidget* _q_result = _q_self->tabButton(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_result = _q_self->tabData(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QIcon _q_result = _q_self->tabIcon(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QRect _q_result = _q_self->tabRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->tabText(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QColor _q_result = _q_self->tabTextColor(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->tabToolTip(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->tabWhatsThis(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: { + QString result = QString::fromLatin1("QTabBar"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTabBar_throw_ambiguity_error_helper(context, + qtscript_QTabBar_function_names[_id+1], + qtscript_QTabBar_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTabBar_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTabBar(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTabBar* _q_cpp_result = new QtScriptShell_QTabBar(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTabBar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTabBar* _q_cpp_result = new QtScriptShell_QTabBar(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTabBar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTabBar_throw_ambiguity_error_helper(context, + qtscript_QTabBar_function_names[_id], + qtscript_QTabBar_function_signatures[_id]); +} + +static QScriptValue qtscript_QTabBar_toScriptValue(QScriptEngine *engine, QTabBar* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTabBar_fromScriptValue(const QScriptValue &value, QTabBar* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTabBar_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTabBar*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 25; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTabBar_prototype_call, qtscript_QTabBar_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTabBar_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTabBar_toScriptValue, + qtscript_QTabBar_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTabBar_static_call, proto, qtscript_QTabBar_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("SelectionBehavior"), + qtscript_create_QTabBar_SelectionBehavior_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("Shape"), + qtscript_create_QTabBar_Shape_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTabWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTabWidget.cpp new file mode 100644 index 00000000..09422d7c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTabWidget.cpp @@ -0,0 +1,611 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTabWidget.h" + +static const char * const qtscript_QTabWidget_function_names[] = { + "QTabWidget" + // static + // prototype + , "addTab" + , "clear" + , "cornerWidget" + , "currentWidget" + , "indexOf" + , "insertTab" + , "isTabEnabled" + , "minimumSizeHint" + , "removeTab" + , "setCornerWidget" + , "setTabEnabled" + , "setTabIcon" + , "setTabText" + , "setTabToolTip" + , "setTabWhatsThis" + , "sizeHint" + , "tabBar" + , "tabIcon" + , "tabText" + , "tabToolTip" + , "tabWhatsThis" + , "widget" + , "toString" +}; + +static const char * const qtscript_QTabWidget_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "QWidget widget, QIcon icon, String label\nQWidget widget, String arg__2" + , "" + , "Corner corner" + , "" + , "QWidget widget" + , "int index, QWidget widget, QIcon icon, String label\nint index, QWidget widget, String arg__3" + , "int index" + , "" + , "int index" + , "QWidget w, Corner corner" + , "int index, bool arg__2" + , "int index, QIcon icon" + , "int index, String arg__2" + , "int index, String tip" + , "int index, String text" + , "" + , "" + , "int index" + , "int index" + , "int index" + , "int index" + , "int index" +"" +}; + +static const int qtscript_QTabWidget_function_lengths[] = { + 1 + // static + // prototype + , 3 + , 0 + , 1 + , 0 + , 1 + , 4 + , 1 + , 0 + , 1 + , 2 + , 2 + , 2 + , 2 + , 2 + , 2 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QTabWidget_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTabWidget::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTabWidget*) +Q_DECLARE_METATYPE(QtScriptShell_QTabWidget*) +Q_DECLARE_METATYPE(QTabWidget::TabShape) +Q_DECLARE_METATYPE(QTabWidget::TabPosition) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(Qt::Corner) +Q_DECLARE_METATYPE(QTabBar*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTabWidget::TabShape +// + +static const QTabWidget::TabShape qtscript_QTabWidget_TabShape_values[] = { + QTabWidget::Rounded + , QTabWidget::Triangular +}; + +static const char * const qtscript_QTabWidget_TabShape_keys[] = { + "Rounded" + , "Triangular" +}; + +static QString qtscript_QTabWidget_TabShape_toStringHelper(QTabWidget::TabShape value) +{ + if ((value >= QTabWidget::Rounded) && (value <= QTabWidget::Triangular)) + return qtscript_QTabWidget_TabShape_keys[static_cast(value)-static_cast(QTabWidget::Rounded)]; + return QString(); +} + +static QScriptValue qtscript_QTabWidget_TabShape_toScriptValue(QScriptEngine *engine, const QTabWidget::TabShape &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTabWidget")); + return clazz.property(qtscript_QTabWidget_TabShape_toStringHelper(value)); +} + +static void qtscript_QTabWidget_TabShape_fromScriptValue(const QScriptValue &value, QTabWidget::TabShape &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTabWidget_TabShape(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTabWidget::Rounded) && (arg <= QTabWidget::Triangular)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("TabShape(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTabWidget_TabShape_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTabWidget::TabShape value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTabWidget_TabShape_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTabWidget::TabShape value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTabWidget_TabShape_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTabWidget_TabShape_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTabWidget_TabShape, + qtscript_QTabWidget_TabShape_valueOf, qtscript_QTabWidget_TabShape_toString); + qScriptRegisterMetaType(engine, qtscript_QTabWidget_TabShape_toScriptValue, + qtscript_QTabWidget_TabShape_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTabWidget_TabShape_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTabWidget_TabShape_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTabWidget::TabPosition +// + +static const QTabWidget::TabPosition qtscript_QTabWidget_TabPosition_values[] = { + QTabWidget::North + , QTabWidget::South + , QTabWidget::West + , QTabWidget::East +}; + +static const char * const qtscript_QTabWidget_TabPosition_keys[] = { + "North" + , "South" + , "West" + , "East" +}; + +static QString qtscript_QTabWidget_TabPosition_toStringHelper(QTabWidget::TabPosition value) +{ + if ((value >= QTabWidget::North) && (value <= QTabWidget::East)) + return qtscript_QTabWidget_TabPosition_keys[static_cast(value)-static_cast(QTabWidget::North)]; + return QString(); +} + +static QScriptValue qtscript_QTabWidget_TabPosition_toScriptValue(QScriptEngine *engine, const QTabWidget::TabPosition &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTabWidget")); + return clazz.property(qtscript_QTabWidget_TabPosition_toStringHelper(value)); +} + +static void qtscript_QTabWidget_TabPosition_fromScriptValue(const QScriptValue &value, QTabWidget::TabPosition &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTabWidget_TabPosition(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTabWidget::North) && (arg <= QTabWidget::East)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("TabPosition(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTabWidget_TabPosition_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTabWidget::TabPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTabWidget_TabPosition_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTabWidget::TabPosition value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTabWidget_TabPosition_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTabWidget_TabPosition_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTabWidget_TabPosition, + qtscript_QTabWidget_TabPosition_valueOf, qtscript_QTabWidget_TabPosition_toString); + qScriptRegisterMetaType(engine, qtscript_QTabWidget_TabPosition_toScriptValue, + qtscript_QTabWidget_TabPosition_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTabWidget_TabPosition_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTabWidget_TabPosition_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTabWidget +// + +static QScriptValue qtscript_QTabWidget_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 22; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTabWidget* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTabWidget.%0(): this object is not a QTabWidget") + .arg(qtscript_QTabWidget_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + int _q_result = _q_self->addTab(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIcon _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + int _q_result = _q_self->addTab(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->cornerWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + Qt::Corner _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_result = _q_self->cornerWidget(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->currentWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->indexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + int _q_result = _q_self->insertTab(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QIcon _q_arg2 = qscriptvalue_cast(context->argument(2)); + QString _q_arg3 = context->argument(3).toString(); + int _q_result = _q_self->insertTab(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->isTabEnabled(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->removeTab(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCornerWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::Corner _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setCornerWidget(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setTabEnabled(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QIcon _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setTabIcon(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setTabText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setTabToolTip(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setTabWhatsThis(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QTabBar* _q_result = _q_self->tabBar(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QIcon _q_result = _q_self->tabIcon(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->tabText(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->tabToolTip(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->tabWhatsThis(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_result = _q_self->widget(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 22: { + QString result = QString::fromLatin1("QTabWidget"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTabWidget_throw_ambiguity_error_helper(context, + qtscript_QTabWidget_function_names[_id+1], + qtscript_QTabWidget_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTabWidget_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTabWidget(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTabWidget* _q_cpp_result = new QtScriptShell_QTabWidget(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTabWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTabWidget* _q_cpp_result = new QtScriptShell_QTabWidget(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTabWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTabWidget_throw_ambiguity_error_helper(context, + qtscript_QTabWidget_function_names[_id], + qtscript_QTabWidget_function_signatures[_id]); +} + +static QScriptValue qtscript_QTabWidget_toScriptValue(QScriptEngine *engine, QTabWidget* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTabWidget_fromScriptValue(const QScriptValue &value, QTabWidget* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTabWidget_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTabWidget*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 23; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTabWidget_prototype_call, qtscript_QTabWidget_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTabWidget_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTabWidget_toScriptValue, + qtscript_QTabWidget_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTabWidget_static_call, proto, qtscript_QTabWidget_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("TabShape"), + qtscript_create_QTabWidget_TabShape_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("TabPosition"), + qtscript_create_QTabWidget_TabPosition_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTableView.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTableView.cpp new file mode 100644 index 00000000..50144f16 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTableView.cpp @@ -0,0 +1,427 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTableView.h" + +static const char * const qtscript_QTableView_function_names[] = { + "QTableView" + // static + // prototype + , "clearSpans" + , "columnAt" + , "columnSpan" + , "columnViewportPosition" + , "columnWidth" + , "horizontalHeader" + , "isColumnHidden" + , "isRowHidden" + , "rowAt" + , "rowHeight" + , "rowSpan" + , "rowViewportPosition" + , "setColumnHidden" + , "setColumnWidth" + , "setHorizontalHeader" + , "setRowHeight" + , "setRowHidden" + , "setSpan" + , "setVerticalHeader" + , "sortByColumn" + , "verticalHeader" + , "toString" +}; + +static const char * const qtscript_QTableView_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "" + , "int x" + , "int row, int column" + , "int column" + , "int column" + , "" + , "int column" + , "int row" + , "int y" + , "int row" + , "int row, int column" + , "int row" + , "int column, bool hide" + , "int column, int width" + , "QHeaderView header" + , "int row, int height" + , "int row, bool hide" + , "int row, int column, int rowSpan, int columnSpan" + , "QHeaderView header" + , "int column, SortOrder order" + , "" +"" +}; + +static const int qtscript_QTableView_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 2 + , 1 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 2 + , 2 + , 1 + , 2 + , 2 + , 4 + , 1 + , 2 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTableView_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTableView::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTableView*) +Q_DECLARE_METATYPE(QtScriptShell_QTableView*) +Q_DECLARE_METATYPE(QHeaderView*) +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemView*) + +// +// QTableView +// + +static QScriptValue qtscript_QTableView_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 21; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTableView* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTableView.%0(): this object is not a QTableView") + .arg(qtscript_QTableView_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + _q_self->clearSpans(); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->columnAt(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->columnSpan(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->columnViewportPosition(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->columnWidth(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QHeaderView* _q_result = _q_self->horizontalHeader(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->isColumnHidden(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->isRowHidden(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->rowAt(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->rowHeight(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_result = _q_self->rowSpan(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->rowViewportPosition(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setColumnHidden(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setColumnWidth(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QHeaderView* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setHorizontalHeader(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setRowHeight(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setRowHidden(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setSpan(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QHeaderView* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setVerticalHeader(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::SortOrder _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->sortByColumn(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 0) { + QHeaderView* _q_result = _q_self->verticalHeader(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: { + QString result = QString::fromLatin1("QTableView"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTableView_throw_ambiguity_error_helper(context, + qtscript_QTableView_function_names[_id+1], + qtscript_QTableView_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTableView_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTableView(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTableView* _q_cpp_result = new QtScriptShell_QTableView(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTableView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTableView* _q_cpp_result = new QtScriptShell_QTableView(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTableView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTableView_throw_ambiguity_error_helper(context, + qtscript_QTableView_function_names[_id], + qtscript_QTableView_function_signatures[_id]); +} + +static QScriptValue qtscript_QTableView_toScriptValue(QScriptEngine *engine, QTableView* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTableView_fromScriptValue(const QScriptValue &value, QTableView* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTableView_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTableView*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 22; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTableView_prototype_call, qtscript_QTableView_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTableView_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTableView_toScriptValue, + qtscript_QTableView_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTableView_static_call, proto, qtscript_QTableView_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTableWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTableWidget.cpp new file mode 100644 index 00000000..c53d4012 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTableWidget.cpp @@ -0,0 +1,631 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTableWidget.h" + +static const char * const qtscript_QTableWidget_function_names[] = { + "QTableWidget" + // static + // prototype + , "cellWidget" + , "closePersistentEditor" + , "column" + , "currentColumn" + , "currentItem" + , "currentRow" + , "editItem" + , "findItems" + , "horizontalHeaderItem" + , "item" + , "itemAt" + , "itemPrototype" + , "openPersistentEditor" + , "removeCellWidget" + , "row" + , "selectedItems" + , "selectedRanges" + , "setCellWidget" + , "setCurrentCell" + , "setCurrentItem" + , "setHorizontalHeaderItem" + , "setHorizontalHeaderLabels" + , "setItem" + , "setItemPrototype" + , "setRangeSelected" + , "setVerticalHeaderItem" + , "setVerticalHeaderLabels" + , "sortItems" + , "takeHorizontalHeaderItem" + , "takeItem" + , "takeVerticalHeaderItem" + , "verticalHeaderItem" + , "visualColumn" + , "visualItemRect" + , "visualRow" + , "toString" +}; + +static const char * const qtscript_QTableWidget_function_signatures[] = { + "QWidget parent\nint rows, int columns, QWidget parent" + // static + // prototype + , "int row, int column" + , "QTableWidgetItem item" + , "QTableWidgetItem item" + , "" + , "" + , "" + , "QTableWidgetItem item" + , "String text, MatchFlags flags" + , "int column" + , "int row, int column" + , "QPoint p\nint x, int y" + , "" + , "QTableWidgetItem item" + , "int row, int column" + , "QTableWidgetItem item" + , "" + , "" + , "int row, int column, QWidget widget" + , "int row, int column\nint row, int column, SelectionFlags command" + , "QTableWidgetItem item\nQTableWidgetItem item, SelectionFlags command" + , "int column, QTableWidgetItem item" + , "List labels" + , "int row, int column, QTableWidgetItem item" + , "QTableWidgetItem item" + , "QTableWidgetSelectionRange range, bool select" + , "int row, QTableWidgetItem item" + , "List labels" + , "int column, SortOrder order" + , "int column" + , "int row, int column" + , "int row" + , "int row" + , "int logicalColumn" + , "QTableWidgetItem item" + , "int logicalRow" +"" +}; + +static const int qtscript_QTableWidget_function_lengths[] = { + 3 + // static + // prototype + , 2 + , 1 + , 1 + , 0 + , 0 + , 0 + , 1 + , 2 + , 1 + , 2 + , 2 + , 0 + , 1 + , 2 + , 1 + , 0 + , 0 + , 3 + , 3 + , 2 + , 2 + , 1 + , 3 + , 1 + , 2 + , 2 + , 1 + , 2 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QTableWidget_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTableWidget::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTableWidget*) +Q_DECLARE_METATYPE(QtScriptShell_QTableWidget*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QTableWidgetItem*) +Q_DECLARE_METATYPE(const QTableWidgetItem*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QTableWidgetSelectionRange) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QTableView*) + +// +// QTableWidget +// + +static QScriptValue qtscript_QTableWidget_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 35; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTableWidget* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTableWidget.%0(): this object is not a QTableWidget") + .arg(qtscript_QTableWidget_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QWidget* _q_result = _q_self->cellWidget(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QTableWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->closePersistentEditor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + const QTableWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->column(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->currentColumn(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QTableWidgetItem* _q_result = _q_self->currentItem(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->currentRow(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QTableWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->editItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QList _q_result = _q_self->findItems(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTableWidgetItem* _q_result = _q_self->horizontalHeaderItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QTableWidgetItem* _q_result = _q_self->item(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTableWidgetItem* _q_result = _q_self->itemAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QTableWidgetItem* _q_result = _q_self->itemAt(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + const QTableWidgetItem* _q_result = const_cast(_q_self->itemPrototype()); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QTableWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->openPersistentEditor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->removeCellWidget(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + const QTableWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->row(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->selectedItems(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->selectedRanges(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setCellWidget(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setCurrentCell(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + _q_self->setCurrentCell(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QTableWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCurrentItem(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QTableWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + _q_self->setCurrentItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QTableWidgetItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setHorizontalHeaderItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setHorizontalHeaderLabels(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QTableWidgetItem* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setItem(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + const QTableWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setItemPrototype(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 2) { + QTableWidgetSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setRangeSelected(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QTableWidgetItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setVerticalHeaderItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setVerticalHeaderLabels(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->sortItems(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::SortOrder _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->sortItems(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTableWidgetItem* _q_result = _q_self->takeHorizontalHeaderItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QTableWidgetItem* _q_result = _q_self->takeItem(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTableWidgetItem* _q_result = _q_self->takeVerticalHeaderItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTableWidgetItem* _q_result = _q_self->verticalHeaderItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->visualColumn(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 1) { + const QTableWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->visualItemRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 34: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->visualRow(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 35: { + QString result = QString::fromLatin1("QTableWidget"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTableWidget_throw_ambiguity_error_helper(context, + qtscript_QTableWidget_function_names[_id+1], + qtscript_QTableWidget_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTableWidget_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTableWidget(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTableWidget* _q_cpp_result = new QtScriptShell_QTableWidget(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTableWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTableWidget* _q_cpp_result = new QtScriptShell_QTableWidget(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTableWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QTableWidget* _q_cpp_result = new QtScriptShell_QTableWidget(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTableWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QtScriptShell_QTableWidget* _q_cpp_result = new QtScriptShell_QTableWidget(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTableWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTableWidget_throw_ambiguity_error_helper(context, + qtscript_QTableWidget_function_names[_id], + qtscript_QTableWidget_function_signatures[_id]); +} + +static QScriptValue qtscript_QTableWidget_toScriptValue(QScriptEngine *engine, QTableWidget* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTableWidget_fromScriptValue(const QScriptValue &value, QTableWidget* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTableWidget_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTableWidget*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 36; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTableWidget_prototype_call, qtscript_QTableWidget_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTableWidget_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTableWidget_toScriptValue, + qtscript_QTableWidget_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTableWidget_static_call, proto, qtscript_QTableWidget_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTableWidgetItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTableWidgetItem.cpp new file mode 100644 index 00000000..be362d30 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTableWidgetItem.cpp @@ -0,0 +1,613 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTableWidgetItem.h" + +static const char * const qtscript_QTableWidgetItem_function_names[] = { + "QTableWidgetItem" + // static + // prototype + , "background" + , "checkState" + , "clone" + , "column" + , "data" + , "flags" + , "font" + , "foreground" + , "icon" + , "isSelected" + , "row" + , "setBackground" + , "setCheckState" + , "setData" + , "setFlags" + , "setFont" + , "setForeground" + , "setIcon" + , "setSelected" + , "setSizeHint" + , "setStatusTip" + , "setText" + , "setTextAlignment" + , "setToolTip" + , "setWhatsThis" + , "sizeHint" + , "statusTip" + , "tableWidget" + , "text" + , "textAlignment" + , "toolTip" + , "type" + , "whatsThis" + , "toString" +}; + +static const char * const qtscript_QTableWidgetItem_function_signatures[] = { + "QIcon icon, String text, int type\nString text, int type\nint type" + // static + // prototype + , "" + , "" + , "" + , "" + , "int role" + , "" + , "" + , "" + , "" + , "" + , "" + , "QBrush brush" + , "CheckState state" + , "int role, Object value" + , "ItemFlags flags" + , "QFont font" + , "QBrush brush" + , "QIcon icon" + , "bool select" + , "QSize size" + , "String statusTip" + , "String text" + , "int alignment" + , "String toolTip" + , "String whatsThis" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QTableWidgetItem_function_lengths[] = { + 3 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTableWidgetItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTableWidgetItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTableWidgetItem*) +Q_DECLARE_METATYPE(QtScriptShell_QTableWidgetItem*) +Q_DECLARE_METATYPE(QTableWidgetItem::ItemType) +Q_DECLARE_METATYPE(Qt::CheckState) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTableWidget*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTableWidgetItem::ItemType +// + +static const QTableWidgetItem::ItemType qtscript_QTableWidgetItem_ItemType_values[] = { + QTableWidgetItem::Type + , QTableWidgetItem::UserType +}; + +static const char * const qtscript_QTableWidgetItem_ItemType_keys[] = { + "Type" + , "UserType" +}; + +static QString qtscript_QTableWidgetItem_ItemType_toStringHelper(QTableWidgetItem::ItemType value) +{ + for (int i = 0; i < 2; ++i) { + if (qtscript_QTableWidgetItem_ItemType_values[i] == value) + return QString::fromLatin1(qtscript_QTableWidgetItem_ItemType_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QTableWidgetItem_ItemType_toScriptValue(QScriptEngine *engine, const QTableWidgetItem::ItemType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTableWidgetItem")); + return clazz.property(qtscript_QTableWidgetItem_ItemType_toStringHelper(value)); +} + +static void qtscript_QTableWidgetItem_ItemType_fromScriptValue(const QScriptValue &value, QTableWidgetItem::ItemType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTableWidgetItem_ItemType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 2; ++i) { + if (qtscript_QTableWidgetItem_ItemType_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ItemType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTableWidgetItem_ItemType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTableWidgetItem::ItemType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTableWidgetItem_ItemType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTableWidgetItem::ItemType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTableWidgetItem_ItemType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTableWidgetItem_ItemType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTableWidgetItem_ItemType, + qtscript_QTableWidgetItem_ItemType_valueOf, qtscript_QTableWidgetItem_ItemType_toString); + qScriptRegisterMetaType(engine, qtscript_QTableWidgetItem_ItemType_toScriptValue, + qtscript_QTableWidgetItem_ItemType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTableWidgetItem_ItemType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTableWidgetItem_ItemType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTableWidgetItem +// + +static QScriptValue qtscript_QTableWidgetItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 33; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTableWidgetItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTableWidgetItem.%0(): this object is not a QTableWidgetItem") + .arg(qtscript_QTableWidgetItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QBrush _q_result = _q_self->background(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + Qt::CheckState _q_result = _q_self->checkState(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QTableWidgetItem* _q_result = _q_self->clone(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->column(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_result = _q_self->data(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->flags(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QFont _q_result = _q_self->font(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QBrush _q_result = _q_self->foreground(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QIcon _q_result = _q_self->icon(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isSelected(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + int _q_result = _q_self->row(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBackground(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + Qt::CheckState _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCheckState(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setData(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setFlags(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFont(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QBrush _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setForeground(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setIcon(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setSelected(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSizeHint(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setStatusTip(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setTextAlignment(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setToolTip(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setWhatsThis(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->statusTip(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + QTableWidget* _q_result = _q_self->tableWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->text(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 0) { + int _q_result = _q_self->textAlignment(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toolTip(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 0) { + int _q_result = _q_self->type(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->whatsThis(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 33: { + QString result = QString::fromLatin1("QTableWidgetItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTableWidgetItem_throw_ambiguity_error_helper(context, + qtscript_QTableWidgetItem_function_names[_id+1], + qtscript_QTableWidgetItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTableWidgetItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTableWidgetItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTableWidgetItem* _q_cpp_result = new QtScriptShell_QTableWidgetItem(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTableWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QTableWidgetItem* _q_cpp_result = new QtScriptShell_QTableWidgetItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTableWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QtScriptShell_QTableWidgetItem* _q_cpp_result = new QtScriptShell_QTableWidgetItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTableWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isString()) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QtScriptShell_QTableWidgetItem* _q_cpp_result = new QtScriptShell_QTableWidgetItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTableWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString() + && context->argument(1).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QTableWidgetItem* _q_cpp_result = new QtScriptShell_QTableWidgetItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTableWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + int _q_arg2 = context->argument(2).toInt32(); + QtScriptShell_QTableWidgetItem* _q_cpp_result = new QtScriptShell_QTableWidgetItem(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTableWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTableWidgetItem_throw_ambiguity_error_helper(context, + qtscript_QTableWidgetItem_function_names[_id], + qtscript_QTableWidgetItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTableWidgetItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTableWidgetItem*)0)); + for (int i = 0; i < 34; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTableWidgetItem_prototype_call, qtscript_QTableWidgetItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTableWidgetItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTableWidgetItem_static_call, proto, qtscript_QTableWidgetItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ItemType"), + qtscript_create_QTableWidgetItem_ItemType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTableWidgetSelectionRange.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTableWidgetSelectionRange.cpp new file mode 100644 index 00000000..852e4409 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTableWidgetSelectionRange.cpp @@ -0,0 +1,203 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QTableWidgetSelectionRange_function_names[] = { + "QTableWidgetSelectionRange" + // static + // prototype + , "bottomRow" + , "columnCount" + , "leftColumn" + , "rightColumn" + , "rowCount" + , "topRow" + , "toString" +}; + +static const char * const qtscript_QTableWidgetSelectionRange_function_signatures[] = { + "\nQTableWidgetSelectionRange other\nint top, int left, int bottom, int right" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QTableWidgetSelectionRange_function_lengths[] = { + 4 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTableWidgetSelectionRange_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTableWidgetSelectionRange::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTableWidgetSelectionRange) +Q_DECLARE_METATYPE(QTableWidgetSelectionRange*) + +// +// QTableWidgetSelectionRange +// + +static QScriptValue qtscript_QTableWidgetSelectionRange_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTableWidgetSelectionRange* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTableWidgetSelectionRange.%0(): this object is not a QTableWidgetSelectionRange") + .arg(qtscript_QTableWidgetSelectionRange_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->bottomRow(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->columnCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->leftColumn(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->rightColumn(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->rowCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->topRow(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: { + QString result = QString::fromLatin1("QTableWidgetSelectionRange"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTableWidgetSelectionRange_throw_ambiguity_error_helper(context, + qtscript_QTableWidgetSelectionRange_function_names[_id+1], + qtscript_QTableWidgetSelectionRange_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTableWidgetSelectionRange_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTableWidgetSelectionRange(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QTableWidgetSelectionRange _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QTableWidgetSelectionRange _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTableWidgetSelectionRange _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + QTableWidgetSelectionRange _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTableWidgetSelectionRange_throw_ambiguity_error_helper(context, + qtscript_QTableWidgetSelectionRange_function_names[_id], + qtscript_QTableWidgetSelectionRange_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTableWidgetSelectionRange_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTableWidgetSelectionRange*)0)); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTableWidgetSelectionRange_prototype_call, qtscript_QTableWidgetSelectionRange_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTableWidgetSelectionRange_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTableWidgetSelectionRange_static_call, proto, qtscript_QTableWidgetSelectionRange_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTextBrowser.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTextBrowser.cpp new file mode 100644 index 00000000..8a766de9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTextBrowser.cpp @@ -0,0 +1,264 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextBrowser.h" + +static const char * const qtscript_QTextBrowser_function_names[] = { + "QTextBrowser" + // static + // prototype + , "backwardHistoryCount" + , "clearHistory" + , "forwardHistoryCount" + , "historyTitle" + , "historyUrl" + , "isBackwardAvailable" + , "isForwardAvailable" + , "toString" +}; + +static const char * const qtscript_QTextBrowser_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "" + , "" + , "" + , "int arg__1" + , "int arg__1" + , "" + , "" +"" +}; + +static const int qtscript_QTextBrowser_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextBrowser_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextBrowser::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextBrowser*) +Q_DECLARE_METATYPE(QtScriptShell_QTextBrowser*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QTextEdit*) + +// +// QTextBrowser +// + +static QScriptValue qtscript_QTextBrowser_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 7; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextBrowser* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextBrowser.%0(): this object is not a QTextBrowser") + .arg(qtscript_QTextBrowser_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->backwardHistoryCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->clearHistory(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->forwardHistoryCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->historyTitle(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QUrl _q_result = _q_self->historyUrl(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isBackwardAvailable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isForwardAvailable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: { + QString result = QString::fromLatin1("QTextBrowser"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextBrowser_throw_ambiguity_error_helper(context, + qtscript_QTextBrowser_function_names[_id+1], + qtscript_QTextBrowser_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextBrowser_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextBrowser(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTextBrowser* _q_cpp_result = new QtScriptShell_QTextBrowser(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTextBrowser*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTextBrowser* _q_cpp_result = new QtScriptShell_QTextBrowser(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTextBrowser*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextBrowser_throw_ambiguity_error_helper(context, + qtscript_QTextBrowser_function_names[_id], + qtscript_QTextBrowser_function_signatures[_id]); +} + +static QScriptValue qtscript_QTextBrowser_toScriptValue(QScriptEngine *engine, QTextBrowser* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTextBrowser_fromScriptValue(const QScriptValue &value, QTextBrowser* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTextBrowser_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextBrowser*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextBrowser_prototype_call, qtscript_QTextBrowser_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextBrowser_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTextBrowser_toScriptValue, + qtscript_QTextBrowser_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextBrowser_static_call, proto, qtscript_QTextBrowser_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTextEdit.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTextEdit.cpp new file mode 100644 index 00000000..e83d91fa --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTextEdit.cpp @@ -0,0 +1,823 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTextEdit.h" + +static const char * const qtscript_QTextEdit_function_names[] = { + "QTextEdit" + // static + // prototype + , "acceptRichText" + , "alignment" + , "anchorAt" + , "canPaste" + , "createStandardContextMenu" + , "currentCharFormat" + , "currentFont" + , "cursorForPosition" + , "cursorRect" + , "cursorWidth" + , "document" + , "ensureCursorVisible" + , "extraSelections" + , "find" + , "fontFamily" + , "fontItalic" + , "fontPointSize" + , "fontUnderline" + , "fontWeight" + , "isReadOnly" + , "lineWrapColumnOrWidth" + , "mergeCurrentCharFormat" + , "moveCursor" + , "overwriteMode" + , "placeholderText" + , "setAcceptRichText" + , "setCurrentCharFormat" + , "setCursorWidth" + , "setDocument" + , "setExtraSelections" + , "setLineWrapColumnOrWidth" + , "setOverwriteMode" + , "setPlaceholderText" + , "setReadOnly" + , "setTabStopWidth" + , "setTextCursor" + , "setTextInteractionFlags" + , "setWordWrapMode" + , "tabStopWidth" + , "textBackgroundColor" + , "textColor" + , "textCursor" + , "textInteractionFlags" + , "toHtml" + , "toPlainText" + , "wordWrapMode" + , "toString" +}; + +static const char * const qtscript_QTextEdit_function_signatures[] = { + "QWidget parent\nString text, QWidget parent" + // static + // prototype + , "" + , "" + , "QPoint pos" + , "" + , "\nQPoint position" + , "" + , "" + , "QPoint pos" + , "\nQTextCursor cursor" + , "" + , "" + , "" + , "" + , "QRegExp exp, FindFlags options\nString exp, FindFlags options" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QTextCharFormat modifier" + , "MoveOperation operation, MoveMode mode" + , "" + , "" + , "bool accept" + , "QTextCharFormat format" + , "int width" + , "QTextDocument document" + , "List selections" + , "int w" + , "bool overwrite" + , "String placeholderText" + , "bool ro" + , "int width" + , "QTextCursor cursor" + , "TextInteractionFlags flags" + , "WrapMode policy" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QTextEdit_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 1 + , 0 + , 1 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 2 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 2 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTextEdit_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextEdit::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextEdit*) +Q_DECLARE_METATYPE(QtScriptShell_QTextEdit*) +Q_DECLARE_METATYPE(QTextEdit::LineWrapMode) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QMenu*) +Q_DECLARE_METATYPE(QTextCharFormat) +Q_DECLARE_METATYPE(QTextCursor) +Q_DECLARE_METATYPE(QTextDocument*) +Q_DECLARE_METATYPE(QTextEdit::ExtraSelection) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTextCursor::MoveOperation) +Q_DECLARE_METATYPE(QTextCursor::MoveMode) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTextOption::WrapMode) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractScrollArea*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTextEdit::LineWrapMode +// + +static const QTextEdit::LineWrapMode qtscript_QTextEdit_LineWrapMode_values[] = { + QTextEdit::NoWrap + , QTextEdit::WidgetWidth + , QTextEdit::FixedPixelWidth + , QTextEdit::FixedColumnWidth +}; + +static const char * const qtscript_QTextEdit_LineWrapMode_keys[] = { + "NoWrap" + , "WidgetWidth" + , "FixedPixelWidth" + , "FixedColumnWidth" +}; + +static QString qtscript_QTextEdit_LineWrapMode_toStringHelper(QTextEdit::LineWrapMode value) +{ + if ((value >= QTextEdit::NoWrap) && (value <= QTextEdit::FixedColumnWidth)) + return qtscript_QTextEdit_LineWrapMode_keys[static_cast(value)-static_cast(QTextEdit::NoWrap)]; + return QString(); +} + +static QScriptValue qtscript_QTextEdit_LineWrapMode_toScriptValue(QScriptEngine *engine, const QTextEdit::LineWrapMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTextEdit")); + return clazz.property(qtscript_QTextEdit_LineWrapMode_toStringHelper(value)); +} + +static void qtscript_QTextEdit_LineWrapMode_fromScriptValue(const QScriptValue &value, QTextEdit::LineWrapMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTextEdit_LineWrapMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTextEdit::NoWrap) && (arg <= QTextEdit::FixedColumnWidth)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("LineWrapMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTextEdit_LineWrapMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTextEdit::LineWrapMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTextEdit_LineWrapMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTextEdit::LineWrapMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTextEdit_LineWrapMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTextEdit_LineWrapMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTextEdit_LineWrapMode, + qtscript_QTextEdit_LineWrapMode_valueOf, qtscript_QTextEdit_LineWrapMode_toString); + qScriptRegisterMetaType(engine, qtscript_QTextEdit_LineWrapMode_toScriptValue, + qtscript_QTextEdit_LineWrapMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 4; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTextEdit_LineWrapMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTextEdit_LineWrapMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTextEdit +// + +static QScriptValue qtscript_QTextEdit_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 46; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextEdit* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextEdit.%0(): this object is not a QTextEdit") + .arg(qtscript_QTextEdit_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->acceptRichText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->alignment(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->anchorAt(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->canPaste(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QMenu* _q_result = _q_self->createStandardContextMenu(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QMenu* _q_result = _q_self->createStandardContextMenu(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QTextCharFormat _q_result = _q_self->currentCharFormat(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QFont _q_result = _q_self->currentFont(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCursor _q_result = _q_self->cursorForPosition(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->cursorRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QTextCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->cursorRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + int _q_result = _q_self->cursorWidth(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QTextDocument* _q_result = _q_self->document(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + _q_self->ensureCursorVisible(); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->extraSelections(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + if (context->argument(0).isRegExp()) { + QRegExp _q_arg0 = context->argument(0).toRegExp(); + bool _q_result = _q_self->find(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->find(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (context->argument(0).isRegExp() + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QRegExp _q_arg0 = context->argument(0).toRegExp(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + bool _q_result = _q_self->find(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && (qMetaTypeId >() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + bool _q_result = _q_self->find(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 14: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->fontFamily(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->fontItalic(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->fontPointSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->fontUnderline(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + int _q_result = _q_self->fontWeight(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isReadOnly(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + int _q_result = _q_self->lineWrapColumnOrWidth(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 1) { + QTextCharFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->mergeCurrentCharFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QTextCursor::MoveOperation _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->moveCursor(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QTextCursor::MoveOperation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTextCursor::MoveMode _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->moveCursor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->overwriteMode(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->placeholderText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setAcceptRichText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QTextCharFormat _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCurrentCharFormat(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setCursorWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + QTextDocument* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDocument(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setExtraSelections(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setLineWrapColumnOrWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setOverwriteMode(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPlaceholderText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setReadOnly(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setTabStopWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 1) { + QTextCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setTextCursor(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setTextInteractionFlags(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 1) { + QTextOption::WrapMode _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWordWrapMode(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 0) { + int _q_result = _q_self->tabStopWidth(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 0) { + QColor _q_result = _q_self->textBackgroundColor(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 40: + if (context->argumentCount() == 0) { + QColor _q_result = _q_self->textColor(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 41: + if (context->argumentCount() == 0) { + QTextCursor _q_result = _q_self->textCursor(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 42: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->textInteractionFlags(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 43: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toHtml(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 44: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toPlainText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 45: + if (context->argumentCount() == 0) { + QTextOption::WrapMode _q_result = _q_self->wordWrapMode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 46: { + QString result = QString::fromLatin1("QTextEdit"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextEdit_throw_ambiguity_error_helper(context, + qtscript_QTextEdit_function_names[_id+1], + qtscript_QTextEdit_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextEdit_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextEdit(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTextEdit* _q_cpp_result = new QtScriptShell_QTextEdit(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTextEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTextEdit* _q_cpp_result = new QtScriptShell_QTextEdit(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTextEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QTextEdit* _q_cpp_result = new QtScriptShell_QTextEdit(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTextEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QTextEdit* _q_cpp_result = new QtScriptShell_QTextEdit(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTextEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextEdit_throw_ambiguity_error_helper(context, + qtscript_QTextEdit_function_names[_id], + qtscript_QTextEdit_function_signatures[_id]); +} + +static QScriptValue qtscript_QTextEdit_toScriptValue(QScriptEngine *engine, QTextEdit* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTextEdit_fromScriptValue(const QScriptValue &value, QTextEdit* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTextEdit_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextEdit*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 47; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTextEdit_prototype_call, qtscript_QTextEdit_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTextEdit_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTextEdit_toScriptValue, + qtscript_QTextEdit_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextEdit_static_call, proto, qtscript_QTextEdit_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("LineWrapMode"), + qtscript_create_QTextEdit_LineWrapMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTextEdit_ExtraSelection.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTextEdit_ExtraSelection.cpp new file mode 100644 index 00000000..9f5e3475 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTextEdit_ExtraSelection.cpp @@ -0,0 +1,128 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QTextEdit_ExtraSelection.h" + +static const char * const qtscript_QTextEdit_ExtraSelection_function_names[] = { + "QTextEdit_ExtraSelection" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QTextEdit_ExtraSelection_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QTextEdit_ExtraSelection_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QTextEdit_ExtraSelection_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTextEdit_ExtraSelection::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTextEdit::ExtraSelection) +Q_DECLARE_METATYPE(QTextEdit::ExtraSelection*) +Q_DECLARE_METATYPE(QtScriptShell_QTextEdit_ExtraSelection) +Q_DECLARE_METATYPE(QtScriptShell_QTextEdit_ExtraSelection*) + +// +// QTextEdit_ExtraSelection +// + +static QScriptValue qtscript_QTextEdit_ExtraSelection_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTextEdit::ExtraSelection* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTextEdit_ExtraSelection.%0(): this object is not a QTextEdit_ExtraSelection") + .arg(qtscript_QTextEdit_ExtraSelection_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QTextEdit_ExtraSelection"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTextEdit_ExtraSelection_throw_ambiguity_error_helper(context, + qtscript_QTextEdit_ExtraSelection_function_names[_id+1], + qtscript_QTextEdit_ExtraSelection_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTextEdit_ExtraSelection_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTextEdit_ExtraSelection(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTextEdit_ExtraSelection _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTextEdit::ExtraSelection)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTextEdit_ExtraSelection_throw_ambiguity_error_helper(context, + qtscript_QTextEdit_ExtraSelection_function_names[_id], + qtscript_QTextEdit_ExtraSelection_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTextEdit_ExtraSelection_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTextEdit::ExtraSelection*)0)); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTextEdit_ExtraSelection_static_call, proto, qtscript_QTextEdit_ExtraSelection_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTimeEdit.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTimeEdit.cpp new file mode 100644 index 00000000..6f1b662f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTimeEdit.cpp @@ -0,0 +1,193 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTimeEdit.h" + +static const char * const qtscript_QTimeEdit_function_names[] = { + "QTimeEdit" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QTimeEdit_function_signatures[] = { + "QWidget parent\nQTime time, QWidget parent" + // static + // prototype +"" +}; + +static const int qtscript_QTimeEdit_function_lengths[] = { + 2 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QTimeEdit_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTimeEdit::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTimeEdit*) +Q_DECLARE_METATYPE(QtScriptShell_QTimeEdit*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QDateTimeEdit*) + +// +// QTimeEdit +// + +static QScriptValue qtscript_QTimeEdit_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTimeEdit* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTimeEdit.%0(): this object is not a QTimeEdit") + .arg(qtscript_QTimeEdit_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QTimeEdit"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTimeEdit_throw_ambiguity_error_helper(context, + qtscript_QTimeEdit_function_names[_id+1], + qtscript_QTimeEdit_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTimeEdit_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTimeEdit(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTimeEdit* _q_cpp_result = new QtScriptShell_QTimeEdit(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTimeEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTimeEdit* _q_cpp_result = new QtScriptShell_QTimeEdit(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTimeEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QTime _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTimeEdit* _q_cpp_result = new QtScriptShell_QTimeEdit(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTimeEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QTime _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QTimeEdit* _q_cpp_result = new QtScriptShell_QTimeEdit(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTimeEdit*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTimeEdit_throw_ambiguity_error_helper(context, + qtscript_QTimeEdit_function_names[_id], + qtscript_QTimeEdit_function_signatures[_id]); +} + +static QScriptValue qtscript_QTimeEdit_toScriptValue(QScriptEngine *engine, QTimeEdit* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTimeEdit_fromScriptValue(const QScriptValue &value, QTimeEdit* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTimeEdit_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTimeEdit*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QTimeEdit_toScriptValue, + qtscript_QTimeEdit_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTimeEdit_static_call, proto, qtscript_QTimeEdit_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QToolBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QToolBar.cpp new file mode 100644 index 00000000..1a5fbc34 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QToolBar.cpp @@ -0,0 +1,435 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QToolBar.h" + +static const char * const qtscript_QToolBar_function_names[] = { + "QToolBar" + // static + // prototype + , "actionAt" + , "actionGeometry" + , "addAction" + , "addSeparator" + , "addWidget" + , "allowedAreas" + , "clear" + , "iconSize" + , "insertSeparator" + , "insertWidget" + , "isAreaAllowed" + , "isFloatable" + , "isFloating" + , "orientation" + , "setAllowedAreas" + , "setFloatable" + , "setMovable" + , "setOrientation" + , "toggleViewAction" + , "toolButtonStyle" + , "widgetForAction" + , "toString" +}; + +static const char * const qtscript_QToolBar_function_signatures[] = { + "QWidget parent\nString title, QWidget parent" + // static + // prototype + , "QPoint p\nint x, int y" + , "QAction action" + , "QIcon icon, String text\nString text" + , "" + , "QWidget widget" + , "" + , "" + , "" + , "QAction before" + , "QAction before, QWidget widget" + , "ToolBarArea area" + , "" + , "" + , "" + , "ToolBarAreas areas" + , "bool floatable" + , "bool movable" + , "Orientation orientation" + , "" + , "" + , "QAction action" +"" +}; + +static const int qtscript_QToolBar_function_lengths[] = { + 2 + // static + // prototype + , 2 + , 1 + , 2 + , 0 + , 1 + , 0 + , 0 + , 0 + , 1 + , 2 + , 1 + , 0 + , 0 + , 0 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QToolBar_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QToolBar::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QToolBar*) +Q_DECLARE_METATYPE(QtScriptShell_QToolBar*) +Q_DECLARE_METATYPE(QAction*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::ToolBarArea) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(Qt::ToolButtonStyle) + +// +// QToolBar +// + +static QScriptValue qtscript_QToolBar_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 21; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QToolBar* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QToolBar.%0(): this object is not a QToolBar") + .arg(qtscript_QToolBar_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAction* _q_result = _q_self->actionAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QAction* _q_result = _q_self->actionAt(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->actionGeometry(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QAction* _q_result = _q_self->addAction(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QIcon _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QAction* _q_result = _q_self->addAction(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QAction* _q_result = _q_self->addSeparator(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAction* _q_result = _q_self->addWidget(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->allowedAreas(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->iconSize(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAction* _q_result = _q_self->insertSeparator(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 2) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QAction* _q_result = _q_self->insertWidget(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + Qt::ToolBarArea _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isAreaAllowed(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isFloatable(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isFloating(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + Qt::Orientation _q_result = _q_self->orientation(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setAllowedAreas(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setFloatable(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setMovable(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + Qt::Orientation _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOrientation(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QAction* _q_result = _q_self->toggleViewAction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + Qt::ToolButtonStyle _q_result = _q_self->toolButtonStyle(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_result = _q_self->widgetForAction(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 21: { + QString result = QString::fromLatin1("QToolBar"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QToolBar_throw_ambiguity_error_helper(context, + qtscript_QToolBar_function_names[_id+1], + qtscript_QToolBar_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QToolBar_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QToolBar(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QToolBar* _q_cpp_result = new QtScriptShell_QToolBar(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QToolBar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QToolBar* _q_cpp_result = new QtScriptShell_QToolBar(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QToolBar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QToolBar* _q_cpp_result = new QtScriptShell_QToolBar(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QToolBar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QToolBar* _q_cpp_result = new QtScriptShell_QToolBar(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QToolBar*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QToolBar_throw_ambiguity_error_helper(context, + qtscript_QToolBar_function_names[_id], + qtscript_QToolBar_function_signatures[_id]); +} + +static QScriptValue qtscript_QToolBar_toScriptValue(QScriptEngine *engine, QToolBar* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QToolBar_fromScriptValue(const QScriptValue &value, QToolBar* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QToolBar_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QToolBar*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 22; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QToolBar_prototype_call, qtscript_QToolBar_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QToolBar_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QToolBar_toScriptValue, + qtscript_QToolBar_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QToolBar_static_call, proto, qtscript_QToolBar_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QToolBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QToolBox.cpp new file mode 100644 index 00000000..1d2fac1c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QToolBox.cpp @@ -0,0 +1,364 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QToolBox.h" + +static const char * const qtscript_QToolBox_function_names[] = { + "QToolBox" + // static + // prototype + , "addItem" + , "currentWidget" + , "indexOf" + , "insertItem" + , "isItemEnabled" + , "itemIcon" + , "itemText" + , "itemToolTip" + , "removeItem" + , "setItemEnabled" + , "setItemIcon" + , "setItemText" + , "setItemToolTip" + , "widget" + , "toString" +}; + +static const char * const qtscript_QToolBox_function_signatures[] = { + "QWidget parent, WindowFlags f" + // static + // prototype + , "QWidget widget, QIcon icon, String text\nQWidget widget, String text" + , "" + , "QWidget widget" + , "int index, QWidget widget, QIcon icon, String text\nint index, QWidget widget, String text" + , "int index" + , "int index" + , "int index" + , "int index" + , "int index" + , "int index, bool enabled" + , "int index, QIcon icon" + , "int index, String text" + , "int index, String toolTip" + , "int index" +"" +}; + +static const int qtscript_QToolBox_function_lengths[] = { + 2 + // static + // prototype + , 3 + , 0 + , 1 + , 4 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 2 + , 2 + , 2 + , 1 + , 0 +}; + +static QScriptValue qtscript_QToolBox_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QToolBox::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QToolBox*) +Q_DECLARE_METATYPE(QtScriptShell_QToolBox*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFrame*) + +// +// QToolBox +// + +static QScriptValue qtscript_QToolBox_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 14; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QToolBox* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QToolBox.%0(): this object is not a QToolBox") + .arg(qtscript_QToolBox_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + int _q_result = _q_self->addItem(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QIcon _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + int _q_result = _q_self->addItem(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->currentWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->indexOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + int _q_result = _q_self->insertItem(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QIcon _q_arg2 = qscriptvalue_cast(context->argument(2)); + QString _q_arg3 = context->argument(3).toString(); + int _q_result = _q_self->insertItem(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->isItemEnabled(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QIcon _q_result = _q_self->itemIcon(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->itemText(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->itemToolTip(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->removeItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setItemEnabled(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QIcon _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setItemIcon(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setItemText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setItemToolTip(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QWidget* _q_result = _q_self->widget(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: { + QString result = QString::fromLatin1("QToolBox"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QToolBox_throw_ambiguity_error_helper(context, + qtscript_QToolBox_function_names[_id+1], + qtscript_QToolBox_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QToolBox_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QToolBox(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QToolBox* _q_cpp_result = new QtScriptShell_QToolBox(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QToolBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QToolBox* _q_cpp_result = new QtScriptShell_QToolBox(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QToolBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QToolBox* _q_cpp_result = new QtScriptShell_QToolBox(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QToolBox*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QToolBox_throw_ambiguity_error_helper(context, + qtscript_QToolBox_function_names[_id], + qtscript_QToolBox_function_signatures[_id]); +} + +static QScriptValue qtscript_QToolBox_toScriptValue(QScriptEngine *engine, QToolBox* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QToolBox_fromScriptValue(const QScriptValue &value, QToolBox* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QToolBox_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QToolBox*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 15; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QToolBox_prototype_call, qtscript_QToolBox_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QToolBox_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QToolBox_toScriptValue, + qtscript_QToolBox_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QToolBox_static_call, proto, qtscript_QToolBox_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QToolButton.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QToolButton.cpp new file mode 100644 index 00000000..6a1ba113 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QToolButton.cpp @@ -0,0 +1,322 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QToolButton.h" + +static const char * const qtscript_QToolButton_function_names[] = { + "QToolButton" + // static + // prototype + , "defaultAction" + , "menu" + , "minimumSizeHint" + , "setMenu" + , "sizeHint" + , "toString" +}; + +static const char * const qtscript_QToolButton_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "" + , "" + , "" + , "QMenu menu" + , "" +"" +}; + +static const int qtscript_QToolButton_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QToolButton_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QToolButton::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QToolButton*) +Q_DECLARE_METATYPE(QtScriptShell_QToolButton*) +Q_DECLARE_METATYPE(QToolButton::ToolButtonPopupMode) +Q_DECLARE_METATYPE(QAction*) +Q_DECLARE_METATYPE(QMenu*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractButton*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QToolButton::ToolButtonPopupMode +// + +static const QToolButton::ToolButtonPopupMode qtscript_QToolButton_ToolButtonPopupMode_values[] = { + QToolButton::DelayedPopup + , QToolButton::MenuButtonPopup + , QToolButton::InstantPopup +}; + +static const char * const qtscript_QToolButton_ToolButtonPopupMode_keys[] = { + "DelayedPopup" + , "MenuButtonPopup" + , "InstantPopup" +}; + +static QString qtscript_QToolButton_ToolButtonPopupMode_toStringHelper(QToolButton::ToolButtonPopupMode value) +{ + if ((value >= QToolButton::DelayedPopup) && (value <= QToolButton::InstantPopup)) + return qtscript_QToolButton_ToolButtonPopupMode_keys[static_cast(value)-static_cast(QToolButton::DelayedPopup)]; + return QString(); +} + +static QScriptValue qtscript_QToolButton_ToolButtonPopupMode_toScriptValue(QScriptEngine *engine, const QToolButton::ToolButtonPopupMode &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QToolButton")); + return clazz.property(qtscript_QToolButton_ToolButtonPopupMode_toStringHelper(value)); +} + +static void qtscript_QToolButton_ToolButtonPopupMode_fromScriptValue(const QScriptValue &value, QToolButton::ToolButtonPopupMode &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QToolButton_ToolButtonPopupMode(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QToolButton::DelayedPopup) && (arg <= QToolButton::InstantPopup)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ToolButtonPopupMode(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QToolButton_ToolButtonPopupMode_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QToolButton::ToolButtonPopupMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QToolButton_ToolButtonPopupMode_toString(QScriptContext *context, QScriptEngine *engine) +{ + QToolButton::ToolButtonPopupMode value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QToolButton_ToolButtonPopupMode_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QToolButton_ToolButtonPopupMode_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QToolButton_ToolButtonPopupMode, + qtscript_QToolButton_ToolButtonPopupMode_valueOf, qtscript_QToolButton_ToolButtonPopupMode_toString); + qScriptRegisterMetaType(engine, qtscript_QToolButton_ToolButtonPopupMode_toScriptValue, + qtscript_QToolButton_ToolButtonPopupMode_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QToolButton_ToolButtonPopupMode_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QToolButton_ToolButtonPopupMode_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QToolButton +// + +static QScriptValue qtscript_QToolButton_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QToolButton* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QToolButton.%0(): this object is not a QToolButton") + .arg(qtscript_QToolButton_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QAction* _q_result = _q_self->defaultAction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QMenu* _q_result = _q_self->menu(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->minimumSizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QMenu* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMenu(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QSize _q_result = _q_self->sizeHint(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: { + QString result = QString::fromLatin1("QToolButton"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QToolButton_throw_ambiguity_error_helper(context, + qtscript_QToolButton_function_names[_id+1], + qtscript_QToolButton_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QToolButton_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QToolButton(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QToolButton* _q_cpp_result = new QtScriptShell_QToolButton(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QToolButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QToolButton* _q_cpp_result = new QtScriptShell_QToolButton(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QToolButton*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QToolButton_throw_ambiguity_error_helper(context, + qtscript_QToolButton_function_names[_id], + qtscript_QToolButton_function_signatures[_id]); +} + +static QScriptValue qtscript_QToolButton_toScriptValue(QScriptEngine *engine, QToolButton* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QToolButton_fromScriptValue(const QScriptValue &value, QToolButton* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QToolButton_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QToolButton*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QToolButton_prototype_call, qtscript_QToolButton_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QToolButton_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QToolButton_toScriptValue, + qtscript_QToolButton_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QToolButton_static_call, proto, qtscript_QToolButton_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ToolButtonPopupMode"), + qtscript_create_QToolButton_ToolButtonPopupMode_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QToolTip.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QToolTip.cpp new file mode 100644 index 00000000..3850f129 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QToolTip.cpp @@ -0,0 +1,236 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QToolTip_function_names[] = { + "QToolTip" + // static + , "font" + , "hideText" + , "isVisible" + , "palette" + , "setFont" + , "setPalette" + , "showText" + , "text" + // prototype + , "toString" +}; + +static const char * const qtscript_QToolTip_function_signatures[] = { + "" + // static + , "" + , "" + , "" + , "" + , "QFont arg__1" + , "QPalette arg__1" + , "QPoint pos, String text, QWidget w\nQPoint pos, String text, QWidget w, QRect rect\nQPoint pos, String text, QWidget w, QRect rect, int msecShowTime" + , "" + // prototype +"" +}; + +static const int qtscript_QToolTip_function_lengths[] = { + 0 + // static + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 5 + , 0 + // prototype + , 0 +}; + +static QScriptValue qtscript_QToolTip_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QToolTip::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QToolTip*) +Q_DECLARE_METATYPE(QWidget*) + +// +// QToolTip +// + +static QScriptValue qtscript_QToolTip_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QToolTip* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QToolTip.%0(): this object is not a QToolTip") + .arg(qtscript_QToolTip_function_names[_id+9])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QToolTip"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QToolTip_throw_ambiguity_error_helper(context, + qtscript_QToolTip_function_names[_id+9], + qtscript_QToolTip_function_signatures[_id+9]); +} + +static QScriptValue qtscript_QToolTip_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QToolTip cannot be constructed")); + break; + + case 1: + if (context->argumentCount() == 0) { + QFont _q_result = QToolTip::font(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QToolTip::hideText(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = QToolTip::isVisible(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QPalette _q_result = QToolTip::palette(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QFont _q_arg0 = qscriptvalue_cast(context->argument(0)); + QToolTip::setFont(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QPalette _q_arg0 = qscriptvalue_cast(context->argument(0)); + QToolTip::setPalette(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 2) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QToolTip::showText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QToolTip::showText(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QRect _q_arg3 = qscriptvalue_cast(context->argument(3)); + QToolTip::showText(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 5) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QRect _q_arg3 = qscriptvalue_cast(context->argument(3)); + int _q_arg4 = context->argument(4).toInt32(); + QToolTip::showText(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QString _q_result = QToolTip::text(); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QToolTip_throw_ambiguity_error_helper(context, + qtscript_QToolTip_function_names[_id], + qtscript_QToolTip_function_signatures[_id]); +} + +QScriptValue qtscript_create_QToolTip_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QToolTip*)0)); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QToolTip_static_call, proto, qtscript_QToolTip_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QToolTip_static_call, + qtscript_QToolTip_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QToolTip_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTouchEvent.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTouchEvent.cpp new file mode 100644 index 00000000..f93e1079 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTouchEvent.cpp @@ -0,0 +1,194 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QTouchEvent_function_names[] = { + "QTouchEvent" + // static + // prototype + , "setTarget" + , "setTouchPointStates" + , "setTouchPoints" + , "target" + , "touchPointStates" + , "touchPoints" + , "toString" +}; + +static const char * const qtscript_QTouchEvent_function_signatures[] = { + "" + // static + // prototype + , "QObject atarget" + , "TouchPointStates aTouchPointStates" + , "List atouchPoints" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QTouchEvent_function_lengths[] = { + 0 + // static + // prototype + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTouchEvent_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTouchEvent::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTouchEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTouchEvent::TouchPoint) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QInputEvent*) + +// +// QTouchEvent +// + +static QScriptValue qtscript_QTouchEvent_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTouchEvent* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTouchEvent.%0(): this object is not a QTouchEvent") + .arg(qtscript_QTouchEvent_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + _q_self->setTarget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setTouchPointStates(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setTouchPoints(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QObject* _q_result = _q_self->target(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->touchPointStates(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + const QList& _q_result = _q_self->touchPoints(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 6: { + QString result = QString::fromLatin1("QTouchEvent"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTouchEvent_throw_ambiguity_error_helper(context, + qtscript_QTouchEvent_function_names[_id+1], + qtscript_QTouchEvent_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTouchEvent_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTouchEvent cannot be constructed")); + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTouchEvent_throw_ambiguity_error_helper(context, + qtscript_QTouchEvent_function_names[_id], + qtscript_QTouchEvent_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTouchEvent_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTouchEvent*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTouchEvent_prototype_call, qtscript_QTouchEvent_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTouchEvent_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTouchEvent_static_call, proto, qtscript_QTouchEvent_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTreeView.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTreeView.cpp new file mode 100644 index 00000000..76ac6666 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTreeView.cpp @@ -0,0 +1,416 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTreeView.h" + +static const char * const qtscript_QTreeView_function_names[] = { + "QTreeView" + // static + // prototype + , "columnAt" + , "columnViewportPosition" + , "columnWidth" + , "header" + , "indexAbove" + , "indexBelow" + , "isColumnHidden" + , "isExpanded" + , "isFirstColumnSpanned" + , "isRowHidden" + , "resetIndentation" + , "setColumnHidden" + , "setColumnWidth" + , "setExpanded" + , "setFirstColumnSpanned" + , "setHeader" + , "setRowHidden" + , "setTreePosition" + , "sortByColumn" + , "treePosition" + , "toString" +}; + +static const char * const qtscript_QTreeView_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "int x" + , "int column" + , "int column" + , "" + , "QModelIndex index" + , "QModelIndex index" + , "int column" + , "QModelIndex index" + , "int row, QModelIndex parent" + , "int row, QModelIndex parent" + , "" + , "int column, bool hide" + , "int column, int width" + , "QModelIndex index, bool expand" + , "int row, QModelIndex parent, bool span" + , "QHeaderView header" + , "int row, QModelIndex parent, bool hide" + , "int logicalIndex" + , "int column, SortOrder order" + , "" +"" +}; + +static const int qtscript_QTreeView_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 1 + , 1 + , 0 + , 1 + , 1 + , 1 + , 1 + , 2 + , 2 + , 0 + , 2 + , 2 + , 2 + , 3 + , 1 + , 3 + , 1 + , 2 + , 0 + , 0 +}; + +static QScriptValue qtscript_QTreeView_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTreeView::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTreeView*) +Q_DECLARE_METATYPE(QtScriptShell_QTreeView*) +Q_DECLARE_METATYPE(QHeaderView*) +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemView*) + +// +// QTreeView +// + +static QScriptValue qtscript_QTreeView_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 20; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTreeView* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTreeView.%0(): this object is not a QTreeView") + .arg(qtscript_QTreeView_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->columnAt(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->columnViewportPosition(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->columnWidth(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QHeaderView* _q_result = _q_self->header(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QModelIndex _q_result = _q_self->indexAbove(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + QModelIndex _q_result = _q_self->indexBelow(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->isColumnHidden(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isExpanded(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QModelIndex _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->isFirstColumnSpanned(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QModelIndex _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->isRowHidden(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + _q_self->resetIndentation(); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setColumnHidden(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setColumnWidth(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 2) { + QModelIndex _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setExpanded(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + QModelIndex _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_arg2 = context->argument(2).toBoolean(); + _q_self->setFirstColumnSpanned(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QHeaderView* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setHeader(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + QModelIndex _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_arg2 = context->argument(2).toBoolean(); + _q_self->setRowHidden(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setTreePosition(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::SortOrder _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->sortByColumn(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 0) { + int _q_result = _q_self->treePosition(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: { + QString result = QString::fromLatin1("QTreeView"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTreeView_throw_ambiguity_error_helper(context, + qtscript_QTreeView_function_names[_id+1], + qtscript_QTreeView_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTreeView_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTreeView(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTreeView* _q_cpp_result = new QtScriptShell_QTreeView(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTreeView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTreeView* _q_cpp_result = new QtScriptShell_QTreeView(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTreeView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTreeView_throw_ambiguity_error_helper(context, + qtscript_QTreeView_function_names[_id], + qtscript_QTreeView_function_signatures[_id]); +} + +static QScriptValue qtscript_QTreeView_toScriptValue(QScriptEngine *engine, QTreeView* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTreeView_fromScriptValue(const QScriptValue &value, QTreeView* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTreeView_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTreeView*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 21; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTreeView_prototype_call, qtscript_QTreeView_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTreeView_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTreeView_toScriptValue, + qtscript_QTreeView_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTreeView_static_call, proto, qtscript_QTreeView_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTreeWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTreeWidget.cpp new file mode 100644 index 00000000..d8028d7d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTreeWidget.cpp @@ -0,0 +1,586 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTreeWidget.h" + +static const char * const qtscript_QTreeWidget_function_names[] = { + "QTreeWidget" + // static + // prototype + , "addTopLevelItem" + , "addTopLevelItems" + , "closePersistentEditor" + , "currentColumn" + , "currentItem" + , "editItem" + , "findItems" + , "headerItem" + , "indexOfTopLevelItem" + , "insertTopLevelItem" + , "insertTopLevelItems" + , "invisibleRootItem" + , "isFirstItemColumnSpanned" + , "itemAbove" + , "itemAt" + , "itemBelow" + , "itemWidget" + , "openPersistentEditor" + , "removeItemWidget" + , "selectedItems" + , "setCurrentItem" + , "setFirstItemColumnSpanned" + , "setHeaderItem" + , "setHeaderLabel" + , "setHeaderLabels" + , "setItemWidget" + , "sortColumn" + , "sortItems" + , "takeTopLevelItem" + , "topLevelItem" + , "visualItemRect" + , "toString" +}; + +static const char * const qtscript_QTreeWidget_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "QTreeWidgetItem item" + , "List items" + , "QTreeWidgetItem item, int column" + , "" + , "" + , "QTreeWidgetItem item, int column" + , "String text, MatchFlags flags, int column" + , "" + , "QTreeWidgetItem item" + , "int index, QTreeWidgetItem item" + , "int index, List items" + , "" + , "QTreeWidgetItem item" + , "QTreeWidgetItem item" + , "QPoint p\nint x, int y" + , "QTreeWidgetItem item" + , "QTreeWidgetItem item, int column" + , "QTreeWidgetItem item, int column" + , "QTreeWidgetItem item, int column" + , "" + , "QTreeWidgetItem item\nQTreeWidgetItem item, int column\nQTreeWidgetItem item, int column, SelectionFlags command" + , "QTreeWidgetItem item, bool span" + , "QTreeWidgetItem item" + , "String label" + , "List labels" + , "QTreeWidgetItem item, int column, QWidget widget" + , "" + , "int column, SortOrder order" + , "int index" + , "int index" + , "QTreeWidgetItem item" +"" +}; + +static const int qtscript_QTreeWidget_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 1 + , 2 + , 0 + , 0 + , 2 + , 3 + , 0 + , 1 + , 2 + , 2 + , 0 + , 1 + , 1 + , 2 + , 1 + , 2 + , 2 + , 2 + , 0 + , 3 + , 2 + , 1 + , 1 + , 1 + , 3 + , 0 + , 2 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QTreeWidget_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTreeWidget::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTreeWidget*) +Q_DECLARE_METATYPE(QtScriptShell_QTreeWidget*) +Q_DECLARE_METATYPE(QTreeWidgetItem*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(const QTreeWidgetItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QTreeView*) + +// +// QTreeWidget +// + +static QScriptValue qtscript_QTreeWidget_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 31; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTreeWidget* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTreeWidget.%0(): this object is not a QTreeWidget") + .arg(qtscript_QTreeWidget_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addTopLevelItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->addTopLevelItems(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->closePersistentEditor(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->closePersistentEditor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->currentColumn(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QTreeWidgetItem* _q_result = _q_self->currentItem(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->editItem(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->editItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QList _q_result = _q_self->findItems(_q_arg0, _q_arg1); + return qScriptValueFromSequence(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QList _q_result = _q_self->findItems(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QTreeWidgetItem* _q_result = _q_self->headerItem(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->indexOfTopLevelItem(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QTreeWidgetItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertTopLevelItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + _q_self->insertTopLevelItems(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QTreeWidgetItem* _q_result = _q_self->invisibleRootItem(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + const QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isFirstItemColumnSpanned(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + const QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTreeWidgetItem* _q_result = _q_self->itemAbove(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTreeWidgetItem* _q_result = _q_self->itemAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QTreeWidgetItem* _q_result = _q_self->itemAt(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + const QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTreeWidgetItem* _q_result = _q_self->itemBelow(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 2) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QWidget* _q_result = _q_self->itemWidget(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->openPersistentEditor(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->openPersistentEditor(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 2) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->removeItemWidget(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->selectedItems(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setCurrentItem(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setCurrentItem(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QFlags _q_arg2 = qscriptvalue_cast >(context->argument(2)); + _q_self->setCurrentItem(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 2) { + const QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setFirstItemColumnSpanned(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setHeaderItem(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setHeaderLabel(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 1) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setHeaderLabels(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 3) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setItemWidget(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 0) { + int _q_result = _q_self->sortColumn(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::SortOrder _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->sortItems(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTreeWidgetItem* _q_result = _q_self->takeTopLevelItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTreeWidgetItem* _q_result = _q_self->topLevelItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 1) { + const QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QRect _q_result = _q_self->visualItemRect(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 31: { + QString result = QString::fromLatin1("QTreeWidget"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTreeWidget_throw_ambiguity_error_helper(context, + qtscript_QTreeWidget_function_names[_id+1], + qtscript_QTreeWidget_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTreeWidget_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTreeWidget(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTreeWidget* _q_cpp_result = new QtScriptShell_QTreeWidget(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTreeWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTreeWidget* _q_cpp_result = new QtScriptShell_QTreeWidget(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QTreeWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTreeWidget_throw_ambiguity_error_helper(context, + qtscript_QTreeWidget_function_names[_id], + qtscript_QTreeWidget_function_signatures[_id]); +} + +static QScriptValue qtscript_QTreeWidget_toScriptValue(QScriptEngine *engine, QTreeWidget* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QTreeWidget_fromScriptValue(const QScriptValue &value, QTreeWidget* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QTreeWidget_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTreeWidget*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 32; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTreeWidget_prototype_call, qtscript_QTreeWidget_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTreeWidget_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QTreeWidget_toScriptValue, + qtscript_QTreeWidget_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTreeWidget_static_call, proto, qtscript_QTreeWidget_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTreeWidgetItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTreeWidgetItem.cpp new file mode 100644 index 00000000..b1dbe125 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QTreeWidgetItem.cpp @@ -0,0 +1,1034 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QTreeWidgetItem.h" + +static const char * const qtscript_QTreeWidgetItem_function_names[] = { + "QTreeWidgetItem" + // static + // prototype + , "addChild" + , "addChildren" + , "background" + , "checkState" + , "child" + , "childCount" + , "childIndicatorPolicy" + , "clone" + , "columnCount" + , "data" + , "flags" + , "font" + , "foreground" + , "icon" + , "indexOfChild" + , "insertChild" + , "insertChildren" + , "isDisabled" + , "isExpanded" + , "isFirstColumnSpanned" + , "isHidden" + , "isSelected" + , "parent" + , "removeChild" + , "setBackground" + , "setCheckState" + , "setChildIndicatorPolicy" + , "setData" + , "setDisabled" + , "setExpanded" + , "setFirstColumnSpanned" + , "setFlags" + , "setFont" + , "setForeground" + , "setHidden" + , "setIcon" + , "setSelected" + , "setSizeHint" + , "setStatusTip" + , "setText" + , "setTextAlignment" + , "setToolTip" + , "setWhatsThis" + , "sizeHint" + , "sortChildren" + , "statusTip" + , "takeChild" + , "takeChildren" + , "text" + , "textAlignment" + , "toolTip" + , "treeWidget" + , "type" + , "whatsThis" + , "toString" +}; + +static const char * const qtscript_QTreeWidgetItem_function_signatures[] = { + "QTreeWidget view, QTreeWidgetItem after, int type\nQTreeWidget view, List strings, int type\nQTreeWidget view, int type\nQTreeWidgetItem parent, QTreeWidgetItem after, int type\nQTreeWidgetItem parent, List strings, int type\nQTreeWidgetItem parent, int type\nList strings, int type\nint type" + // static + // prototype + , "QTreeWidgetItem child" + , "List children" + , "int column" + , "int column" + , "int index" + , "" + , "" + , "" + , "" + , "int column, int role" + , "" + , "int column" + , "int column" + , "int column" + , "QTreeWidgetItem child" + , "int index, QTreeWidgetItem child" + , "int index, List children" + , "" + , "" + , "" + , "" + , "" + , "" + , "QTreeWidgetItem child" + , "int column, QBrush brush" + , "int column, CheckState state" + , "ChildIndicatorPolicy policy" + , "int column, int role, Object value" + , "bool disabled" + , "bool expand" + , "bool span" + , "ItemFlags flags" + , "int column, QFont font" + , "int column, QBrush brush" + , "bool hide" + , "int column, QIcon icon" + , "bool select" + , "int column, QSize size" + , "int column, String statusTip" + , "int column, String text" + , "int column, int alignment" + , "int column, String toolTip" + , "int column, String whatsThis" + , "int column" + , "int column, SortOrder order" + , "int column" + , "int index" + , "" + , "int column" + , "int column" + , "int column" + , "" + , "" + , "int column" +"" +}; + +static const int qtscript_QTreeWidgetItem_function_lengths[] = { + 3 + // static + // prototype + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 2 + , 0 + , 1 + , 1 + , 1 + , 1 + , 2 + , 2 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 2 + , 2 + , 1 + , 3 + , 1 + , 1 + , 1 + , 1 + , 2 + , 2 + , 1 + , 2 + , 1 + , 2 + , 2 + , 2 + , 2 + , 2 + , 2 + , 1 + , 2 + , 1 + , 1 + , 0 + , 1 + , 1 + , 1 + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QTreeWidgetItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QTreeWidgetItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QTreeWidgetItem*) +Q_DECLARE_METATYPE(QtScriptShell_QTreeWidgetItem*) +Q_DECLARE_METATYPE(QTreeWidgetItem::ChildIndicatorPolicy) +Q_DECLARE_METATYPE(QTreeWidgetItem::ItemType) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(Qt::CheckState) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QTreeWidget*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QTreeWidgetItem::ChildIndicatorPolicy +// + +static const QTreeWidgetItem::ChildIndicatorPolicy qtscript_QTreeWidgetItem_ChildIndicatorPolicy_values[] = { + QTreeWidgetItem::ShowIndicator + , QTreeWidgetItem::DontShowIndicator + , QTreeWidgetItem::DontShowIndicatorWhenChildless +}; + +static const char * const qtscript_QTreeWidgetItem_ChildIndicatorPolicy_keys[] = { + "ShowIndicator" + , "DontShowIndicator" + , "DontShowIndicatorWhenChildless" +}; + +static QString qtscript_QTreeWidgetItem_ChildIndicatorPolicy_toStringHelper(QTreeWidgetItem::ChildIndicatorPolicy value) +{ + if ((value >= QTreeWidgetItem::ShowIndicator) && (value <= QTreeWidgetItem::DontShowIndicatorWhenChildless)) + return qtscript_QTreeWidgetItem_ChildIndicatorPolicy_keys[static_cast(value)-static_cast(QTreeWidgetItem::ShowIndicator)]; + return QString(); +} + +static QScriptValue qtscript_QTreeWidgetItem_ChildIndicatorPolicy_toScriptValue(QScriptEngine *engine, const QTreeWidgetItem::ChildIndicatorPolicy &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTreeWidgetItem")); + return clazz.property(qtscript_QTreeWidgetItem_ChildIndicatorPolicy_toStringHelper(value)); +} + +static void qtscript_QTreeWidgetItem_ChildIndicatorPolicy_fromScriptValue(const QScriptValue &value, QTreeWidgetItem::ChildIndicatorPolicy &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTreeWidgetItem_ChildIndicatorPolicy(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QTreeWidgetItem::ShowIndicator) && (arg <= QTreeWidgetItem::DontShowIndicatorWhenChildless)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("ChildIndicatorPolicy(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTreeWidgetItem_ChildIndicatorPolicy_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTreeWidgetItem::ChildIndicatorPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTreeWidgetItem_ChildIndicatorPolicy_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTreeWidgetItem::ChildIndicatorPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTreeWidgetItem_ChildIndicatorPolicy_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTreeWidgetItem_ChildIndicatorPolicy_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTreeWidgetItem_ChildIndicatorPolicy, + qtscript_QTreeWidgetItem_ChildIndicatorPolicy_valueOf, qtscript_QTreeWidgetItem_ChildIndicatorPolicy_toString); + qScriptRegisterMetaType(engine, qtscript_QTreeWidgetItem_ChildIndicatorPolicy_toScriptValue, + qtscript_QTreeWidgetItem_ChildIndicatorPolicy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTreeWidgetItem_ChildIndicatorPolicy_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTreeWidgetItem_ChildIndicatorPolicy_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTreeWidgetItem::ItemType +// + +static const QTreeWidgetItem::ItemType qtscript_QTreeWidgetItem_ItemType_values[] = { + QTreeWidgetItem::Type + , QTreeWidgetItem::UserType +}; + +static const char * const qtscript_QTreeWidgetItem_ItemType_keys[] = { + "Type" + , "UserType" +}; + +static QString qtscript_QTreeWidgetItem_ItemType_toStringHelper(QTreeWidgetItem::ItemType value) +{ + for (int i = 0; i < 2; ++i) { + if (qtscript_QTreeWidgetItem_ItemType_values[i] == value) + return QString::fromLatin1(qtscript_QTreeWidgetItem_ItemType_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QTreeWidgetItem_ItemType_toScriptValue(QScriptEngine *engine, const QTreeWidgetItem::ItemType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QTreeWidgetItem")); + return clazz.property(qtscript_QTreeWidgetItem_ItemType_toStringHelper(value)); +} + +static void qtscript_QTreeWidgetItem_ItemType_fromScriptValue(const QScriptValue &value, QTreeWidgetItem::ItemType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QTreeWidgetItem_ItemType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 2; ++i) { + if (qtscript_QTreeWidgetItem_ItemType_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("ItemType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QTreeWidgetItem_ItemType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QTreeWidgetItem::ItemType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QTreeWidgetItem_ItemType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QTreeWidgetItem::ItemType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QTreeWidgetItem_ItemType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QTreeWidgetItem_ItemType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QTreeWidgetItem_ItemType, + qtscript_QTreeWidgetItem_ItemType_valueOf, qtscript_QTreeWidgetItem_ItemType_toString); + qScriptRegisterMetaType(engine, qtscript_QTreeWidgetItem_ItemType_toScriptValue, + qtscript_QTreeWidgetItem_ItemType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QTreeWidgetItem_ItemType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QTreeWidgetItem_ItemType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QTreeWidgetItem +// + +static QScriptValue qtscript_QTreeWidgetItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 54; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QTreeWidgetItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QTreeWidgetItem.%0(): this object is not a QTreeWidgetItem") + .arg(qtscript_QTreeWidgetItem_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addChild(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->addChildren(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QBrush _q_result = _q_self->background(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::CheckState _q_result = _q_self->checkState(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTreeWidgetItem* _q_result = _q_self->child(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + int _q_result = _q_self->childCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QTreeWidgetItem::ChildIndicatorPolicy _q_result = _q_self->childIndicatorPolicy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QTreeWidgetItem* _q_result = _q_self->clone(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + int _q_result = _q_self->columnCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QVariant _q_result = _q_self->data(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->flags(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QFont _q_result = _q_self->font(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QBrush _q_result = _q_self->foreground(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QIcon _q_result = _q_self->icon(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->indexOfChild(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QTreeWidgetItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertChild(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + _q_self->insertChildren(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isDisabled(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isExpanded(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isFirstColumnSpanned(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isHidden(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isSelected(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + QTreeWidgetItem* _q_result = _q_self->parent(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 1) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeChild(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 24: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QBrush _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setBackground(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 25: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::CheckState _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setCheckState(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 26: + if (context->argumentCount() == 1) { + QTreeWidgetItem::ChildIndicatorPolicy _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setChildIndicatorPolicy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 27: + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QVariant _q_arg2 = context->argument(2).toVariant(); + _q_self->setData(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 28: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setDisabled(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 29: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setExpanded(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setFirstColumnSpanned(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setFlags(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 32: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QFont _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setFont(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 33: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QBrush _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setForeground(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 34: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setHidden(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 35: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QIcon _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setIcon(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 36: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setSelected(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 37: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QSize _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setSizeHint(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setStatusTip(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 39: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 40: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setTextAlignment(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 41: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setToolTip(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 42: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setWhatsThis(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 43: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QSize _q_result = _q_self->sizeHint(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 44: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + Qt::SortOrder _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->sortChildren(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 45: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->statusTip(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 46: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QTreeWidgetItem* _q_result = _q_self->takeChild(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 47: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->takeChildren(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 48: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->text(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 49: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->textAlignment(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 50: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->toolTip(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 51: + if (context->argumentCount() == 0) { + QTreeWidget* _q_result = _q_self->treeWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 52: + if (context->argumentCount() == 0) { + int _q_result = _q_self->type(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 53: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->whatsThis(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 54: { + QString result = QString::fromLatin1("QTreeWidgetItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QTreeWidgetItem_throw_ambiguity_error_helper(context, + qtscript_QTreeWidgetItem_function_names[_id+1], + qtscript_QTreeWidgetItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QTreeWidgetItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QTreeWidgetItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QTreeWidgetItem* _q_cpp_result = new QtScriptShell_QTreeWidgetItem(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTreeWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QTreeWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTreeWidgetItem* _q_cpp_result = new QtScriptShell_QTreeWidgetItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTreeWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QTreeWidgetItem* _q_cpp_result = new QtScriptShell_QTreeWidgetItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTreeWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isArray()) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + QtScriptShell_QTreeWidgetItem* _q_cpp_result = new QtScriptShell_QTreeWidgetItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTreeWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QtScriptShell_QTreeWidgetItem* _q_cpp_result = new QtScriptShell_QTreeWidgetItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTreeWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1))) { + QTreeWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTreeWidgetItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QTreeWidgetItem* _q_cpp_result = new QtScriptShell_QTreeWidgetItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTreeWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isArray()) { + QTreeWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + QtScriptShell_QTreeWidgetItem* _q_cpp_result = new QtScriptShell_QTreeWidgetItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTreeWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + QTreeWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QTreeWidgetItem* _q_cpp_result = new QtScriptShell_QTreeWidgetItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTreeWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1))) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTreeWidgetItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QTreeWidgetItem* _q_cpp_result = new QtScriptShell_QTreeWidgetItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTreeWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isArray()) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + QtScriptShell_QTreeWidgetItem* _q_cpp_result = new QtScriptShell_QTreeWidgetItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTreeWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isNumber()) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QTreeWidgetItem* _q_cpp_result = new QtScriptShell_QTreeWidgetItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTreeWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isArray() + && context->argument(1).isNumber()) { + QStringList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + int _q_arg1 = context->argument(1).toInt32(); + QtScriptShell_QTreeWidgetItem* _q_cpp_result = new QtScriptShell_QTreeWidgetItem(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTreeWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + QTreeWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTreeWidgetItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QtScriptShell_QTreeWidgetItem* _q_cpp_result = new QtScriptShell_QTreeWidgetItem(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTreeWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isArray() + && context->argument(2).isNumber()) { + QTreeWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + int _q_arg2 = context->argument(2).toInt32(); + QtScriptShell_QTreeWidgetItem* _q_cpp_result = new QtScriptShell_QTreeWidgetItem(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTreeWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && context->argument(2).isNumber()) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QTreeWidgetItem* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_arg2 = context->argument(2).toInt32(); + QtScriptShell_QTreeWidgetItem* _q_cpp_result = new QtScriptShell_QTreeWidgetItem(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTreeWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isArray() + && context->argument(2).isNumber()) { + QTreeWidgetItem* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QStringList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + int _q_arg2 = context->argument(2).toInt32(); + QtScriptShell_QTreeWidgetItem* _q_cpp_result = new QtScriptShell_QTreeWidgetItem(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QTreeWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QTreeWidgetItem_throw_ambiguity_error_helper(context, + qtscript_QTreeWidgetItem_function_names[_id], + qtscript_QTreeWidgetItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QTreeWidgetItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QTreeWidgetItem*)0)); + for (int i = 0; i < 55; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QTreeWidgetItem_prototype_call, qtscript_QTreeWidgetItem_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QTreeWidgetItem_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QTreeWidgetItem_static_call, proto, qtscript_QTreeWidgetItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("ChildIndicatorPolicy"), + qtscript_create_QTreeWidgetItem_ChildIndicatorPolicy_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("ItemType"), + qtscript_create_QTreeWidgetItem_ItemType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QUndoCommand.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QUndoCommand.cpp new file mode 100644 index 00000000..b14d8e40 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QUndoCommand.cpp @@ -0,0 +1,247 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +#include "qtscriptshell_QUndoCommand.h" + +static const char * const qtscript_QUndoCommand_function_names[] = { + "QUndoCommand" + // static + // prototype + , "actionText" + , "child" + , "childCount" + , "id" + , "mergeWith" + , "redo" + , "setText" + , "text" + , "undo" + , "toString" +}; + +static const char * const qtscript_QUndoCommand_function_signatures[] = { + "QUndoCommand parent\nString text, QUndoCommand parent" + // static + // prototype + , "" + , "int index" + , "" + , "" + , "QUndoCommand other" + , "" + , "String text" + , "" + , "" +"" +}; + +static const int qtscript_QUndoCommand_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 1 + , 0 + , 0 + , 1 + , 0 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QUndoCommand_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QUndoCommand::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QUndoCommand*) +Q_DECLARE_METATYPE(QtScriptShell_QUndoCommand*) +Q_DECLARE_METATYPE(const QUndoCommand*) + +// +// QUndoCommand +// + +static QScriptValue qtscript_QUndoCommand_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 9; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QUndoCommand* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QUndoCommand.%0(): this object is not a QUndoCommand") + .arg(qtscript_QUndoCommand_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->actionText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + const QUndoCommand* _q_result = const_cast(_q_self->child(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->childCount(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->id(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + const QUndoCommand* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->mergeWith(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + _q_self->redo(); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setText(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->text(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + _q_self->undo(); + return context->engine()->undefinedValue(); + } + break; + + case 9: { + QString result = QString::fromLatin1("QUndoCommand"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QUndoCommand_throw_ambiguity_error_helper(context, + qtscript_QUndoCommand_function_names[_id+1], + qtscript_QUndoCommand_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QUndoCommand_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QUndoCommand(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QUndoCommand* _q_cpp_result = new QtScriptShell_QUndoCommand(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QUndoCommand*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QUndoCommand* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QUndoCommand* _q_cpp_result = new QtScriptShell_QUndoCommand(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QUndoCommand*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QtScriptShell_QUndoCommand* _q_cpp_result = new QtScriptShell_QUndoCommand(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QUndoCommand*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QUndoCommand* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QUndoCommand* _q_cpp_result = new QtScriptShell_QUndoCommand(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QUndoCommand*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QUndoCommand_throw_ambiguity_error_helper(context, + qtscript_QUndoCommand_function_names[_id], + qtscript_QUndoCommand_function_signatures[_id]); +} + +QScriptValue qtscript_create_QUndoCommand_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QUndoCommand*)0)); + for (int i = 0; i < 10; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QUndoCommand_prototype_call, qtscript_QUndoCommand_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QUndoCommand_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QUndoCommand_static_call, proto, qtscript_QUndoCommand_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QUndoGroup.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QUndoGroup.cpp new file mode 100644 index 00000000..d454efe2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QUndoGroup.cpp @@ -0,0 +1,285 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QUndoGroup.h" + +static const char * const qtscript_QUndoGroup_function_names[] = { + "QUndoGroup" + // static + // prototype + , "activeStack" + , "addStack" + , "canRedo" + , "canUndo" + , "createRedoAction" + , "createUndoAction" + , "isClean" + , "redoText" + , "removeStack" + , "stacks" + , "undoText" + , "toString" +}; + +static const char * const qtscript_QUndoGroup_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" + , "QUndoStack stack" + , "" + , "" + , "QObject parent, String prefix" + , "QObject parent, String prefix" + , "" + , "" + , "QUndoStack stack" + , "" + , "" +"" +}; + +static const int qtscript_QUndoGroup_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 0 + , 0 + , 2 + , 2 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QUndoGroup_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QUndoGroup::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QUndoGroup*) +Q_DECLARE_METATYPE(QtScriptShell_QUndoGroup*) +Q_DECLARE_METATYPE(QUndoStack*) +Q_DECLARE_METATYPE(QAction*) +Q_DECLARE_METATYPE(QList) + +// +// QUndoGroup +// + +static QScriptValue qtscript_QUndoGroup_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 11; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QUndoGroup* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QUndoGroup.%0(): this object is not a QUndoGroup") + .arg(qtscript_QUndoGroup_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QUndoStack* _q_result = _q_self->activeStack(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QUndoStack* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addStack(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->canRedo(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->canUndo(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QAction* _q_result = _q_self->createRedoAction(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QString _q_arg1 = context->argument(1).toString(); + QAction* _q_result = _q_self->createRedoAction(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QAction* _q_result = _q_self->createUndoAction(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QString _q_arg1 = context->argument(1).toString(); + QAction* _q_result = _q_self->createUndoAction(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isClean(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->redoText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QUndoStack* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeStack(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->stacks(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->undoText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: { + QString result = QString::fromLatin1("QUndoGroup"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QUndoGroup_throw_ambiguity_error_helper(context, + qtscript_QUndoGroup_function_names[_id+1], + qtscript_QUndoGroup_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QUndoGroup_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QUndoGroup(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QUndoGroup* _q_cpp_result = new QtScriptShell_QUndoGroup(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QUndoGroup*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QUndoGroup* _q_cpp_result = new QtScriptShell_QUndoGroup(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QUndoGroup*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QUndoGroup_throw_ambiguity_error_helper(context, + qtscript_QUndoGroup_function_names[_id], + qtscript_QUndoGroup_function_signatures[_id]); +} + +static QScriptValue qtscript_QUndoGroup_toScriptValue(QScriptEngine *engine, QUndoGroup* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QUndoGroup_fromScriptValue(const QScriptValue &value, QUndoGroup* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QUndoGroup_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QUndoGroup*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 12; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QUndoGroup_prototype_call, qtscript_QUndoGroup_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QUndoGroup_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QUndoGroup_toScriptValue, + qtscript_QUndoGroup_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QUndoGroup_static_call, proto, qtscript_QUndoGroup_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QUndoStack.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QUndoStack.cpp new file mode 100644 index 00000000..df19328c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QUndoStack.cpp @@ -0,0 +1,336 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QUndoStack.h" + +static const char * const qtscript_QUndoStack_function_names[] = { + "QUndoStack" + // static + // prototype + , "beginMacro" + , "canRedo" + , "canUndo" + , "cleanIndex" + , "clear" + , "command" + , "count" + , "createRedoAction" + , "createUndoAction" + , "endMacro" + , "index" + , "isClean" + , "push" + , "redoText" + , "text" + , "undoText" + , "toString" +}; + +static const char * const qtscript_QUndoStack_function_signatures[] = { + "QObject parent" + // static + // prototype + , "String text" + , "" + , "" + , "" + , "" + , "int index" + , "" + , "QObject parent, String prefix" + , "QObject parent, String prefix" + , "" + , "" + , "" + , "QUndoCommand cmd" + , "" + , "int idx" + , "" +"" +}; + +static const int qtscript_QUndoStack_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 2 + , 2 + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QUndoStack_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QUndoStack::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QUndoStack*) +Q_DECLARE_METATYPE(QtScriptShell_QUndoStack*) +Q_DECLARE_METATYPE(const QUndoCommand*) +Q_DECLARE_METATYPE(QAction*) +Q_DECLARE_METATYPE(QUndoCommand*) + +// +// QUndoStack +// + +static QScriptValue qtscript_QUndoStack_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 16; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QUndoStack* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QUndoStack.%0(): this object is not a QUndoStack") + .arg(qtscript_QUndoStack_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->beginMacro(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->canRedo(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->canUndo(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + int _q_result = _q_self->cleanIndex(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + const QUndoCommand* _q_result = const_cast(_q_self->command(_q_arg0)); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QAction* _q_result = _q_self->createRedoAction(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QString _q_arg1 = context->argument(1).toString(); + QAction* _q_result = _q_self->createRedoAction(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QAction* _q_result = _q_self->createUndoAction(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QString _q_arg1 = context->argument(1).toString(); + QAction* _q_result = _q_self->createUndoAction(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + _q_self->endMacro(); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 0) { + int _q_result = _q_self->index(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isClean(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QUndoCommand* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->push(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->redoText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->text(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->undoText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: { + QString result = QString::fromLatin1("QUndoStack"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QUndoStack_throw_ambiguity_error_helper(context, + qtscript_QUndoStack_function_names[_id+1], + qtscript_QUndoStack_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QUndoStack_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QUndoStack(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QUndoStack* _q_cpp_result = new QtScriptShell_QUndoStack(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QUndoStack*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QUndoStack* _q_cpp_result = new QtScriptShell_QUndoStack(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QUndoStack*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QUndoStack_throw_ambiguity_error_helper(context, + qtscript_QUndoStack_function_names[_id], + qtscript_QUndoStack_function_signatures[_id]); +} + +static QScriptValue qtscript_QUndoStack_toScriptValue(QScriptEngine *engine, QUndoStack* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QUndoStack_fromScriptValue(const QScriptValue &value, QUndoStack* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QUndoStack_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QUndoStack*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 17; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QUndoStack_prototype_call, qtscript_QUndoStack_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QUndoStack_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QUndoStack_toScriptValue, + qtscript_QUndoStack_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QUndoStack_static_call, proto, qtscript_QUndoStack_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QUndoView.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QUndoView.cpp new file mode 100644 index 00000000..851f479e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QUndoView.cpp @@ -0,0 +1,242 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QUndoView.h" + +static const char * const qtscript_QUndoView_function_names[] = { + "QUndoView" + // static + // prototype + , "group" + , "stack" + , "toString" +}; + +static const char * const qtscript_QUndoView_function_signatures[] = { + "QUndoGroup group, QWidget parent\nQUndoStack stack, QWidget parent\nQWidget parent" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QUndoView_function_lengths[] = { + 2 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QUndoView_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QUndoView::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QUndoView*) +Q_DECLARE_METATYPE(QtScriptShell_QUndoView*) +Q_DECLARE_METATYPE(QUndoGroup*) +Q_DECLARE_METATYPE(QUndoStack*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QListView*) + +// +// QUndoView +// + +static QScriptValue qtscript_QUndoView_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QUndoView* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QUndoView.%0(): this object is not a QUndoView") + .arg(qtscript_QUndoView_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QUndoGroup* _q_result = _q_self->group(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QUndoStack* _q_result = _q_self->stack(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QUndoView"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QUndoView_throw_ambiguity_error_helper(context, + qtscript_QUndoView_function_names[_id+1], + qtscript_QUndoView_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QUndoView_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QUndoView(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QUndoView* _q_cpp_result = new QtScriptShell_QUndoView(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QUndoView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QUndoGroup* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QUndoView* _q_cpp_result = new QtScriptShell_QUndoView(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QUndoView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + QUndoStack* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QUndoView* _q_cpp_result = new QtScriptShell_QUndoView(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QUndoView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0))) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QUndoView* _q_cpp_result = new QtScriptShell_QUndoView(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QUndoView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } else if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1))) { + QUndoGroup* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QUndoView* _q_cpp_result = new QtScriptShell_QUndoView(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QUndoView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1))) { + QUndoStack* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QtScriptShell_QUndoView* _q_cpp_result = new QtScriptShell_QUndoView(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QUndoView*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QUndoView_throw_ambiguity_error_helper(context, + qtscript_QUndoView_function_names[_id], + qtscript_QUndoView_function_signatures[_id]); +} + +static QScriptValue qtscript_QUndoView_toScriptValue(QScriptEngine *engine, QUndoView* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QUndoView_fromScriptValue(const QScriptValue &value, QUndoView* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QUndoView_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QUndoView*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QUndoView_prototype_call, qtscript_QUndoView_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QUndoView_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QUndoView_toScriptValue, + qtscript_QUndoView_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QUndoView_static_call, proto, qtscript_QUndoView_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QVBoxLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QVBoxLayout.cpp new file mode 100644 index 00000000..e046800b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QVBoxLayout.cpp @@ -0,0 +1,156 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QVBoxLayout.h" + +static const char * const qtscript_QVBoxLayout_function_names[] = { + "QVBoxLayout" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QVBoxLayout_function_signatures[] = { + "\nQWidget parent" + // static + // prototype +"" +}; + +static const int qtscript_QVBoxLayout_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QVBoxLayout_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QVBoxLayout::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QVBoxLayout*) +Q_DECLARE_METATYPE(QtScriptShell_QVBoxLayout*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QBoxLayout*) + +// +// QVBoxLayout +// + +static QScriptValue qtscript_QVBoxLayout_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QVBoxLayout* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QVBoxLayout.%0(): this object is not a QVBoxLayout") + .arg(qtscript_QVBoxLayout_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QVBoxLayout"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QVBoxLayout_throw_ambiguity_error_helper(context, + qtscript_QVBoxLayout_function_names[_id+1], + qtscript_QVBoxLayout_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QVBoxLayout_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QVBoxLayout(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QVBoxLayout* _q_cpp_result = new QtScriptShell_QVBoxLayout(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QVBoxLayout*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QVBoxLayout* _q_cpp_result = new QtScriptShell_QVBoxLayout(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QVBoxLayout*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QVBoxLayout_throw_ambiguity_error_helper(context, + qtscript_QVBoxLayout_function_names[_id], + qtscript_QVBoxLayout_function_signatures[_id]); +} + +static QScriptValue qtscript_QVBoxLayout_toScriptValue(QScriptEngine *engine, QVBoxLayout* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QVBoxLayout_fromScriptValue(const QScriptValue &value, QVBoxLayout* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QVBoxLayout_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QVBoxLayout*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + qScriptRegisterMetaType(engine, qtscript_QVBoxLayout_toScriptValue, + qtscript_QVBoxLayout_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QVBoxLayout_static_call, proto, qtscript_QVBoxLayout_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWhatsThis.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWhatsThis.cpp new file mode 100644 index 00000000..a7543040 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWhatsThis.cpp @@ -0,0 +1,202 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QWhatsThis_function_names[] = { + "QWhatsThis" + // static + , "createAction" + , "enterWhatsThisMode" + , "hideText" + , "inWhatsThisMode" + , "leaveWhatsThisMode" + , "showText" + // prototype + , "toString" +}; + +static const char * const qtscript_QWhatsThis_function_signatures[] = { + "" + // static + , "QObject parent" + , "" + , "" + , "" + , "" + , "QPoint pos, String text, QWidget w" + // prototype +"" +}; + +static const int qtscript_QWhatsThis_function_lengths[] = { + 0 + // static + , 1 + , 0 + , 0 + , 0 + , 0 + , 3 + // prototype + , 0 +}; + +static QScriptValue qtscript_QWhatsThis_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QWhatsThis::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QWhatsThis*) +Q_DECLARE_METATYPE(QAction*) +Q_DECLARE_METATYPE(QWidget*) + +// +// QWhatsThis +// + +static QScriptValue qtscript_QWhatsThis_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QWhatsThis* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QWhatsThis.%0(): this object is not a QWhatsThis") + .arg(qtscript_QWhatsThis_function_names[_id+7])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QWhatsThis"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QWhatsThis_throw_ambiguity_error_helper(context, + qtscript_QWhatsThis_function_names[_id+7], + qtscript_QWhatsThis_function_signatures[_id+7]); +} + +static QScriptValue qtscript_QWhatsThis_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QWhatsThis cannot be constructed")); + break; + + case 1: + if (context->argumentCount() == 0) { + QAction* _q_result = QWhatsThis::createAction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QAction* _q_result = QWhatsThis::createAction(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QWhatsThis::enterWhatsThisMode(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QWhatsThis::hideText(); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = QWhatsThis::inWhatsThisMode(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QWhatsThis::leaveWhatsThisMode(); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 2) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QWhatsThis::showText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + QWidget* _q_arg2 = qscriptvalue_cast(context->argument(2)); + QWhatsThis::showText(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QWhatsThis_throw_ambiguity_error_helper(context, + qtscript_QWhatsThis_function_names[_id], + qtscript_QWhatsThis_function_signatures[_id]); +} + +QScriptValue qtscript_create_QWhatsThis_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QWhatsThis*)0)); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QWhatsThis_static_call, proto, qtscript_QWhatsThis_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QWhatsThis_static_call, + qtscript_QWhatsThis_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QWhatsThis_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWidget.cpp new file mode 100644 index 00000000..8df775eb --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWidget.cpp @@ -0,0 +1,1822 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QWidget.h" + +static const char * const qtscript_QWidget_function_names[] = { + "QWidget" + // static + , "keyboardGrabber" + , "mouseGrabber" + , "setTabOrder" + // prototype + , "actions" + , "activateWindow" + , "addAction" + , "addActions" + , "adjustSize" + , "autoFillBackground" + , "backgroundRole" + , "childAt" + , "clearFocus" + , "clearMask" + , "contentsMargins" + , "contentsRect" + , "createWinId" + , "effectiveWinId" + , "ensurePolished" + , "focusProxy" + , "focusWidget" + , "foregroundRole" + , "getContentsMargins" + , "grabGesture" + , "grabKeyboard" + , "grabMouse" + , "grabShortcut" + , "graphicsEffect" + , "graphicsProxyWidget" + , "hasHeightForWidth" + , "heightForWidth" + , "inputMethodHints" + , "inputMethodQuery" + , "insertAction" + , "insertActions" + , "isAncestorOf" + , "isEnabledTo" + , "isHidden" + , "isLeftToRight" + , "isRightToLeft" + , "isVisibleTo" + , "isWindow" + , "layout" + , "locale" + , "mapFrom" + , "mapFromGlobal" + , "mapFromParent" + , "mapTo" + , "mapToGlobal" + , "mapToParent" + , "mask" + , "move" + , "nativeParentWidget" + , "nextInFocusChain" + , "overrideWindowFlags" + , "overrideWindowState" + , "parentWidget" + , "previousInFocusChain" + , "releaseKeyboard" + , "releaseMouse" + , "releaseShortcut" + , "removeAction" + , "render" + , "repaint" + , "resize" + , "restoreGeometry" + , "saveGeometry" + , "scroll" + , "setAttribute" + , "setAutoFillBackground" + , "setBackgroundRole" + , "setBaseSize" + , "setContentsMargins" + , "setFixedHeight" + , "setFixedSize" + , "setFixedWidth" + , "setFocus" + , "setFocusProxy" + , "setForegroundRole" + , "setGeometry" + , "setGraphicsEffect" + , "setInputMethodHints" + , "setLayout" + , "setLocale" + , "setMask" + , "setMaximumSize" + , "setMinimumSize" + , "setParent" + , "setShortcutAutoRepeat" + , "setShortcutEnabled" + , "setSizeIncrement" + , "setSizePolicy" + , "setStyle" + , "setWindowFilePath" + , "setWindowFlags" + , "setWindowOpacity" + , "setWindowRole" + , "setWindowState" + , "stackUnder" + , "style" + , "styleSheet" + , "testAttribute" + , "underMouse" + , "ungrabGesture" + , "unsetCursor" + , "unsetLayoutDirection" + , "unsetLocale" + , "update" + , "updateGeometry" + , "visibleRegion" + , "winId" + , "window" + , "windowFilePath" + , "windowFlags" + , "windowOpacity" + , "windowRole" + , "windowState" + , "windowType" + , "toString" +}; + +static const char * const qtscript_QWidget_function_signatures[] = { + "QWidget parent, WindowFlags f" + // static + , "" + , "" + , "QWidget arg__1, QWidget arg__2" + // prototype + , "" + , "" + , "QAction action" + , "List actions" + , "" + , "" + , "" + , "QPoint p\nint x, int y" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "int left, int top, int right, int bottom" + , "GestureType type, GestureFlags flags" + , "" + , "\nQCursor arg__1" + , "QKeySequence key, ShortcutContext context" + , "" + , "" + , "" + , "int arg__1" + , "" + , "InputMethodQuery arg__1" + , "QAction before, QAction action" + , "QAction before, List actions" + , "QWidget child" + , "QWidget arg__1" + , "" + , "" + , "" + , "QWidget arg__1" + , "" + , "" + , "" + , "QWidget arg__1, QPoint arg__2" + , "QPoint arg__1" + , "QPoint arg__1" + , "QWidget arg__1, QPoint arg__2" + , "QPoint arg__1" + , "QPoint arg__1" + , "" + , "int x, int y" + , "" + , "" + , "WindowFlags type" + , "WindowStates state" + , "" + , "" + , "" + , "" + , "int id" + , "QAction action" + , "QPaintDevice target, QPoint targetOffset, QRegion sourceRegion, RenderFlags renderFlags\nQPainter painter, QPoint targetOffset, QRegion sourceRegion, RenderFlags renderFlags" + , "QRect arg__1\nQRegion arg__1\nint x, int y, int w, int h" + , "int w, int h" + , "QByteArray geometry" + , "" + , "int dx, int dy\nint dx, int dy, QRect arg__3" + , "WidgetAttribute arg__1, bool on" + , "bool enabled" + , "ColorRole arg__1" + , "int basew, int baseh" + , "QMargins margins\nint left, int top, int right, int bottom" + , "int h" + , "QSize arg__1\nint w, int h" + , "int w" + , "FocusReason reason" + , "QWidget arg__1" + , "ColorRole arg__1" + , "int x, int y, int w, int h" + , "QGraphicsEffect effect" + , "InputMethodHints hints" + , "QLayout arg__1" + , "QLocale locale" + , "QBitmap arg__1\nQRegion arg__1" + , "int maxw, int maxh" + , "int minw, int minh" + , "QWidget parent\nQWidget parent, WindowFlags f" + , "int id, bool enable" + , "int id, bool enable" + , "int w, int h" + , "Policy horizontal, Policy vertical" + , "QStyle arg__1" + , "String filePath" + , "WindowFlags type" + , "qreal level" + , "String arg__1" + , "WindowStates state" + , "QWidget arg__1" + , "" + , "" + , "WidgetAttribute arg__1" + , "" + , "GestureType type" + , "" + , "" + , "" + , "QRect arg__1\nQRegion arg__1\nint x, int y, int w, int h" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QWidget_function_lengths[] = { + 2 + // static + , 0 + , 0 + , 2 + // prototype + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 2 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 4 + , 2 + , 0 + , 1 + , 2 + , 0 + , 0 + , 0 + , 1 + , 0 + , 1 + , 2 + , 2 + , 1 + , 1 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 2 + , 1 + , 1 + , 2 + , 1 + , 1 + , 0 + , 2 + , 0 + , 0 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 4 + , 4 + , 2 + , 1 + , 0 + , 3 + , 2 + , 1 + , 1 + , 2 + , 4 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 4 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 2 + , 2 + , 2 + , 2 + , 2 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 1 + , 0 + , 0 + , 1 + , 0 + , 1 + , 0 + , 0 + , 0 + , 4 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QWidget_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QWidget::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QtScriptShell_QWidget*) +Q_DECLARE_METATYPE(QWidget::RenderFlag) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAction*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QPalette::ColorRole) +Q_DECLARE_METATYPE(QMargins) +Q_DECLARE_METATYPE(WId) +Q_DECLARE_METATYPE(int*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::ShortcutContext) +Q_DECLARE_METATYPE(QGraphicsEffect*) +Q_DECLARE_METATYPE(QGraphicsProxyWidget*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(const QWidget*) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(Qt::WidgetAttribute) +Q_DECLARE_METATYPE(Qt::FocusReason) +Q_DECLARE_METATYPE(QSizePolicy::Policy) +Q_DECLARE_METATYPE(QStyle*) +Q_DECLARE_METATYPE(Qt::WindowType) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +static QScriptValue qtscript_create_flags_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString, + QScriptEngine::FunctionSignature equals) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("equals"), + engine->newFunction(equals), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto); +} + +// +// QWidget::RenderFlag +// + +static const QWidget::RenderFlag qtscript_QWidget_RenderFlag_values[] = { + QWidget::DrawWindowBackground + , QWidget::DrawChildren + , QWidget::IgnoreMask +}; + +static const char * const qtscript_QWidget_RenderFlag_keys[] = { + "DrawWindowBackground" + , "DrawChildren" + , "IgnoreMask" +}; + +static QString qtscript_QWidget_RenderFlag_toStringHelper(QWidget::RenderFlag value) +{ + for (int i = 0; i < 3; ++i) { + if (qtscript_QWidget_RenderFlag_values[i] == value) + return QString::fromLatin1(qtscript_QWidget_RenderFlag_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QWidget_RenderFlag_toScriptValue(QScriptEngine *engine, const QWidget::RenderFlag &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QWidget")); + return clazz.property(qtscript_QWidget_RenderFlag_toStringHelper(value)); +} + +static void qtscript_QWidget_RenderFlag_fromScriptValue(const QScriptValue &value, QWidget::RenderFlag &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QWidget_RenderFlag(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 3; ++i) { + if (qtscript_QWidget_RenderFlag_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("RenderFlag(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QWidget_RenderFlag_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QWidget::RenderFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QWidget_RenderFlag_toString(QScriptContext *context, QScriptEngine *engine) +{ + QWidget::RenderFlag value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QWidget_RenderFlag_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QWidget_RenderFlag_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QWidget_RenderFlag, + qtscript_QWidget_RenderFlag_valueOf, qtscript_QWidget_RenderFlag_toString); + qScriptRegisterMetaType(engine, qtscript_QWidget_RenderFlag_toScriptValue, + qtscript_QWidget_RenderFlag_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QWidget_RenderFlag_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QWidget_RenderFlag_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QWidget::RenderFlags +// + +static QScriptValue qtscript_QWidget_RenderFlags_toScriptValue(QScriptEngine *engine, const QWidget::RenderFlags &value) +{ + return engine->newVariant(qVariantFromValue(value)); +} + +static void qtscript_QWidget_RenderFlags_fromScriptValue(const QScriptValue &value, QWidget::RenderFlags &out) +{ + QVariant var = value.toVariant(); + if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else if (var.userType() == qMetaTypeId()) + out = qvariant_cast(var); + else + out = 0; +} + +static QScriptValue qtscript_construct_QWidget_RenderFlags(QScriptContext *context, QScriptEngine *engine) +{ + QWidget::RenderFlags result = 0; + if ((context->argumentCount() == 1) && context->argument(0).isNumber()) { + result = static_cast(context->argument(0).toInt32()); + } else { + for (int i = 0; i < context->argumentCount(); ++i) { + QVariant v = context->argument(i).toVariant(); + if (v.userType() != qMetaTypeId()) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("RenderFlags(): argument %0 is not of type RenderFlag").arg(i)); + } + result |= qvariant_cast(v); + } + } + return engine->newVariant(qVariantFromValue(result)); +} + +static QScriptValue qtscript_QWidget_RenderFlags_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QWidget::RenderFlags value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QWidget_RenderFlags_toString(QScriptContext *context, QScriptEngine *engine) +{ + QWidget::RenderFlags value = qscriptvalue_cast(context->thisObject()); + QString result; + for (int i = 0; i < 3; ++i) { + if ((value & qtscript_QWidget_RenderFlag_values[i]) == qtscript_QWidget_RenderFlag_values[i]) { + if (!result.isEmpty()) + result.append(QString::fromLatin1(",")); + result.append(QString::fromLatin1(qtscript_QWidget_RenderFlag_keys[i])); + } + } + return QScriptValue(engine, result); +} + +static QScriptValue qtscript_QWidget_RenderFlags_equals(QScriptContext *context, QScriptEngine *engine) +{ + QVariant thisObj = context->thisObject().toVariant(); + QVariant otherObj = context->argument(0).toVariant(); + return QScriptValue(engine, ((thisObj.userType() == otherObj.userType()) && + (thisObj.value() == otherObj.value()))); +} + +static QScriptValue qtscript_create_QWidget_RenderFlags_class(QScriptEngine *engine) +{ + QScriptValue ctor = qtscript_create_flags_class_helper( + engine, qtscript_construct_QWidget_RenderFlags, qtscript_QWidget_RenderFlags_valueOf, + qtscript_QWidget_RenderFlags_toString, qtscript_QWidget_RenderFlags_equals); + qScriptRegisterMetaType(engine, qtscript_QWidget_RenderFlags_toScriptValue, + qtscript_QWidget_RenderFlags_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + return ctor; +} + +// +// QWidget +// + +static QScriptValue qtscript_QWidget_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 114; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QWidget* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QWidget.%0(): this object is not a QWidget") + .arg(qtscript_QWidget_function_names[_id+4])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->actions(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->activateWindow(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->addAction(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->addActions(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + _q_self->adjustSize(); + return context->engine()->undefinedValue(); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->autoFillBackground(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QPalette::ColorRole _q_result = _q_self->backgroundRole(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_result = _q_self->childAt(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QWidget* _q_result = _q_self->childAt(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + _q_self->clearFocus(); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 0) { + _q_self->clearMask(); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QMargins _q_result = _q_self->contentsMargins(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QRect _q_result = _q_self->contentsRect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + _q_self->createWinId(); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 0) { + WId _q_result = _q_self->effectiveWinId(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + _q_self->ensurePolished(); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->focusProxy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->focusWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QPalette::ColorRole _q_result = _q_self->foregroundRole(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 4) { + int* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + _q_self->getContentsMargins(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 1) { + Qt::GestureType _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->grabGesture(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + Qt::GestureType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + _q_self->grabGesture(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 20: + if (context->argumentCount() == 0) { + _q_self->grabKeyboard(); + return context->engine()->undefinedValue(); + } + break; + + case 21: + if (context->argumentCount() == 0) { + _q_self->grabMouse(); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 1) { + QCursor _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->grabMouse(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 22: + if (context->argumentCount() == 1) { + QKeySequence _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->grabShortcut(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QKeySequence _q_arg0 = qscriptvalue_cast(context->argument(0)); + Qt::ShortcutContext _q_arg1 = qscriptvalue_cast(context->argument(1)); + int _q_result = _q_self->grabShortcut(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + QGraphicsEffect* _q_result = _q_self->graphicsEffect(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 0) { + QGraphicsProxyWidget* _q_result = _q_self->graphicsProxyWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasHeightForWidth(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_result = _q_self->heightForWidth(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->inputMethodHints(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 1) { + Qt::InputMethodQuery _q_arg0 = qscriptvalue_cast(context->argument(0)); + QVariant _q_result = _q_self->inputMethodQuery(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 2) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAction* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->insertAction(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 30: + if (context->argumentCount() == 2) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QList _q_arg1; + qScriptValueToSequence(context->argument(1), _q_arg1); + _q_self->insertActions(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 31: + if (context->argumentCount() == 1) { + const QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isAncestorOf(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 1) { + const QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isEnabledTo(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isHidden(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 34: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isLeftToRight(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 35: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isRightToLeft(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 36: + if (context->argumentCount() == 1) { + const QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->isVisibleTo(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 37: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isWindow(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 38: + if (context->argumentCount() == 0) { + QLayout* _q_result = _q_self->layout(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 0) { + QLocale _q_result = _q_self->locale(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 40: + if (context->argumentCount() == 2) { + const QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPoint _q_result = _q_self->mapFrom(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 41: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_result = _q_self->mapFromGlobal(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 42: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_result = _q_self->mapFromParent(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 43: + if (context->argumentCount() == 2) { + const QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QPoint _q_result = _q_self->mapTo(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 44: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_result = _q_self->mapToGlobal(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 45: + if (context->argumentCount() == 1) { + QPoint _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_result = _q_self->mapToParent(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 46: + if (context->argumentCount() == 0) { + QRegion _q_result = _q_self->mask(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 47: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->move(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 48: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->nativeParentWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 49: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->nextInFocusChain(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 50: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->overrideWindowFlags(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 51: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->overrideWindowState(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 52: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->parentWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 53: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->previousInFocusChain(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 54: + if (context->argumentCount() == 0) { + _q_self->releaseKeyboard(); + return context->engine()->undefinedValue(); + } + break; + + case 55: + if (context->argumentCount() == 0) { + _q_self->releaseMouse(); + return context->engine()->undefinedValue(); + } + break; + + case 56: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->releaseShortcut(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 57: + if (context->argumentCount() == 1) { + QAction* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->removeAction(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 58: + if (context->argumentCount() == 1) { + QPaintDevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->render(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPaintDevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->render(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->render(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QPaintDevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRegion _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->render(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRegion _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->render(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType()) + && (qMetaTypeId >() == context->argument(3).toVariant().userType())) { + QPaintDevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRegion _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + _q_self->render(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } else if (qscriptvalue_cast(context->argument(0)) + && (qMetaTypeId() == context->argument(1).toVariant().userType()) + && (qMetaTypeId() == context->argument(2).toVariant().userType()) + && (qMetaTypeId >() == context->argument(3).toVariant().userType())) { + QPainter* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPoint _q_arg1 = qscriptvalue_cast(context->argument(1)); + QRegion _q_arg2 = qscriptvalue_cast(context->argument(2)); + QFlags _q_arg3 = qscriptvalue_cast >(context->argument(3)); + _q_self->render(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + } + break; + + case 59: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->repaint(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->repaint(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->repaint(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 60: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->resize(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 61: + if (context->argumentCount() == 1) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->restoreGeometry(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 62: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->saveGeometry(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 63: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->scroll(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + QRect _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->scroll(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 64: + if (context->argumentCount() == 1) { + Qt::WidgetAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setAttribute(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + Qt::WidgetAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setAttribute(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 65: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setAutoFillBackground(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 66: + if (context->argumentCount() == 1) { + QPalette::ColorRole _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setBackgroundRole(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 67: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setBaseSize(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 68: + if (context->argumentCount() == 1) { + QMargins _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setContentsMargins(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setContentsMargins(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 69: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setFixedHeight(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 70: + if (context->argumentCount() == 1) { + QSize _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFixedSize(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setFixedSize(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 71: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setFixedWidth(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 72: + if (context->argumentCount() == 1) { + Qt::FocusReason _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFocus(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 73: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setFocusProxy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 74: + if (context->argumentCount() == 1) { + QPalette::ColorRole _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setForegroundRole(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 75: + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->setGeometry(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 76: + if (context->argumentCount() == 1) { + QGraphicsEffect* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setGraphicsEffect(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 77: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setInputMethodHints(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 78: + if (context->argumentCount() == 1) { + QLayout* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLayout(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 79: + if (context->argumentCount() == 1) { + QLocale _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLocale(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 80: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QBitmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMask(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setMask(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 81: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setMaximumSize(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 82: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setMinimumSize(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 83: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setParent(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + _q_self->setParent(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 84: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setShortcutAutoRepeat(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setShortcutAutoRepeat(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 85: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->setShortcutEnabled(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setShortcutEnabled(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 86: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setSizeIncrement(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 87: + if (context->argumentCount() == 2) { + QSizePolicy::Policy _q_arg0 = qscriptvalue_cast(context->argument(0)); + QSizePolicy::Policy _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setSizePolicy(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 88: + if (context->argumentCount() == 1) { + QStyle* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setStyle(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 89: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setWindowFilePath(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 90: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setWindowFlags(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 91: + if (context->argumentCount() == 1) { + qreal _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setWindowOpacity(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 92: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setWindowRole(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 93: + if (context->argumentCount() == 1) { + QFlags _q_arg0 = qscriptvalue_cast >(context->argument(0)); + _q_self->setWindowState(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 94: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->stackUnder(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 95: + if (context->argumentCount() == 0) { + QStyle* _q_result = _q_self->style(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 96: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->styleSheet(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 97: + if (context->argumentCount() == 1) { + Qt::WidgetAttribute _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->testAttribute(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 98: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->underMouse(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 99: + if (context->argumentCount() == 1) { + Qt::GestureType _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->ungrabGesture(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 100: + if (context->argumentCount() == 0) { + _q_self->unsetCursor(); + return context->engine()->undefinedValue(); + } + break; + + case 101: + if (context->argumentCount() == 0) { + _q_self->unsetLayoutDirection(); + return context->engine()->undefinedValue(); + } + break; + + case 102: + if (context->argumentCount() == 0) { + _q_self->unsetLocale(); + return context->engine()->undefinedValue(); + } + break; + + case 103: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRect _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->update(_q_arg0); + return context->engine()->undefinedValue(); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QRegion _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->update(_q_arg0); + return context->engine()->undefinedValue(); + } + } + if (context->argumentCount() == 4) { + int _q_arg0 = context->argument(0).toInt32(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + int _q_arg3 = context->argument(3).toInt32(); + _q_self->update(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 104: + if (context->argumentCount() == 0) { + _q_self->updateGeometry(); + return context->engine()->undefinedValue(); + } + break; + + case 105: + if (context->argumentCount() == 0) { + QRegion _q_result = _q_self->visibleRegion(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 106: + if (context->argumentCount() == 0) { + WId _q_result = _q_self->winId(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 107: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->window(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 108: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->windowFilePath(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 109: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->windowFlags(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 110: + if (context->argumentCount() == 0) { + qreal _q_result = _q_self->windowOpacity(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 111: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->windowRole(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 112: + if (context->argumentCount() == 0) { + QFlags _q_result = _q_self->windowState(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 113: + if (context->argumentCount() == 0) { + Qt::WindowType _q_result = _q_self->windowType(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 114: { + QString result; + QDebug d(&result); + d << _q_self; + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QWidget_throw_ambiguity_error_helper(context, + qtscript_QWidget_function_names[_id+4], + qtscript_QWidget_function_signatures[_id+4]); +} + +static QScriptValue qtscript_QWidget_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QWidget(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QWidget* _q_cpp_result = new QtScriptShell_QWidget(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QWidget* _q_cpp_result = new QtScriptShell_QWidget(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QWidget* _q_cpp_result = new QtScriptShell_QWidget(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QWidget*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QWidget* _q_result = QWidget::keyboardGrabber(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QWidget* _q_result = QWidget::mouseGrabber(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QWidget::setTabOrder(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QWidget_throw_ambiguity_error_helper(context, + qtscript_QWidget_function_names[_id], + qtscript_QWidget_function_signatures[_id]); +} + +static QScriptValue qtscript_QWidget_toScriptValue(QScriptEngine *engine, QWidget* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QWidget_fromScriptValue(const QScriptValue &value, QWidget* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QWidget_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QWidget*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + proto.setProperty(QString::fromLatin1("__QPaintDevice__"), + engine->defaultPrototype(qMetaTypeId()), + QScriptValue::SkipInEnumeration); + for (int i = 0; i < 115; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QWidget_prototype_call, qtscript_QWidget_function_lengths[i+4]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QWidget_function_names[i+4]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QWidget_toScriptValue, + qtscript_QWidget_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QWidget_static_call, proto, qtscript_QWidget_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QWidget_static_call, + qtscript_QWidget_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QWidget_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("RenderFlag"), + qtscript_create_QWidget_RenderFlag_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("RenderFlags"), + qtscript_create_QWidget_RenderFlags_class(engine)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWidgetAction.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWidgetAction.cpp new file mode 100644 index 00000000..e02dae6e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWidgetAction.cpp @@ -0,0 +1,201 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QWidgetAction.h" + +static const char * const qtscript_QWidgetAction_function_names[] = { + "QWidgetAction" + // static + // prototype + , "defaultWidget" + , "releaseWidget" + , "requestWidget" + , "setDefaultWidget" + , "toString" +}; + +static const char * const qtscript_QWidgetAction_function_signatures[] = { + "QObject parent" + // static + // prototype + , "" + , "QWidget widget" + , "QWidget parent" + , "QWidget w" +"" +}; + +static const int qtscript_QWidgetAction_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QWidgetAction_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QWidgetAction::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QWidgetAction*) +Q_DECLARE_METATYPE(QtScriptShell_QWidgetAction*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAction*) + +// +// QWidgetAction +// + +static QScriptValue qtscript_QWidgetAction_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QWidgetAction* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QWidgetAction.%0(): this object is not a QWidgetAction") + .arg(qtscript_QWidgetAction_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->defaultWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->releaseWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QWidget* _q_result = _q_self->requestWidget(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDefaultWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 4: { + QString result = QString::fromLatin1("QWidgetAction"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QWidgetAction_throw_ambiguity_error_helper(context, + qtscript_QWidgetAction_function_names[_id+1], + qtscript_QWidgetAction_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QWidgetAction_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QWidgetAction(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QObject* _q_arg0 = context->argument(0).toQObject(); + QtScriptShell_QWidgetAction* _q_cpp_result = new QtScriptShell_QWidgetAction(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QWidgetAction*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QWidgetAction_throw_ambiguity_error_helper(context, + qtscript_QWidgetAction_function_names[_id], + qtscript_QWidgetAction_function_signatures[_id]); +} + +static QScriptValue qtscript_QWidgetAction_toScriptValue(QScriptEngine *engine, QWidgetAction* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QWidgetAction_fromScriptValue(const QScriptValue &value, QWidgetAction* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QWidgetAction_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QWidgetAction*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QWidgetAction_prototype_call, qtscript_QWidgetAction_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QWidgetAction_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QWidgetAction_toScriptValue, + qtscript_QWidgetAction_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QWidgetAction_static_call, proto, qtscript_QWidgetAction_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWidgetItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWidgetItem.cpp new file mode 100644 index 00000000..157068e7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWidgetItem.cpp @@ -0,0 +1,134 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QWidgetItem.h" + +static const char * const qtscript_QWidgetItem_function_names[] = { + "QWidgetItem" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QWidgetItem_function_signatures[] = { + "QWidget w" + // static + // prototype +"" +}; + +static const int qtscript_QWidgetItem_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QWidgetItem_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QWidgetItem::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QWidgetItem*) +Q_DECLARE_METATYPE(QtScriptShell_QWidgetItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QLayoutItem*) + +// +// QWidgetItem +// + +static QScriptValue qtscript_QWidgetItem_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QWidgetItem* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QWidgetItem.%0(): this object is not a QWidgetItem") + .arg(qtscript_QWidgetItem_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QWidgetItem"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QWidgetItem_throw_ambiguity_error_helper(context, + qtscript_QWidgetItem_function_names[_id+1], + qtscript_QWidgetItem_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QWidgetItem_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QWidgetItem(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QWidgetItem* _q_cpp_result = new QtScriptShell_QWidgetItem(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QWidgetItem*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QWidgetItem_throw_ambiguity_error_helper(context, + qtscript_QWidgetItem_function_names[_id], + qtscript_QWidgetItem_function_signatures[_id]); +} + +QScriptValue qtscript_create_QWidgetItem_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QWidgetItem*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QWidgetItem_static_call, proto, qtscript_QWidgetItem_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWizard.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWizard.cpp new file mode 100644 index 00000000..cacbc7ef --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWizard.cpp @@ -0,0 +1,707 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QWizard.h" + +static const char * const qtscript_QWizard_function_names[] = { + "QWizard" + // static + // prototype + , "addPage" + , "button" + , "buttonText" + , "currentPage" + , "field" + , "hasVisitedPage" + , "nextId" + , "page" + , "pageIds" + , "pixmap" + , "removePage" + , "setButton" + , "setButtonLayout" + , "setButtonText" + , "setField" + , "setOption" + , "setPage" + , "setPixmap" + , "setSideWidget" + , "sideWidget" + , "testOption" + , "validateCurrentPage" + , "visitedPages" + , "toString" +}; + +static const char * const qtscript_QWizard_function_signatures[] = { + "QWidget parent, WindowFlags flags" + // static + // prototype + , "QWizardPage page" + , "WizardButton which" + , "WizardButton which" + , "" + , "String name" + , "int id" + , "" + , "int id" + , "" + , "WizardPixmap which" + , "int id" + , "WizardButton which, QAbstractButton button" + , "List layout" + , "WizardButton which, String text" + , "String name, Object value" + , "WizardOption option, bool on" + , "int id, QWizardPage page" + , "WizardPixmap which, QPixmap pixmap" + , "QWidget widget" + , "" + , "WizardOption option" + , "" + , "" +"" +}; + +static const int qtscript_QWizard_function_lengths[] = { + 2 + // static + // prototype + , 1 + , 1 + , 1 + , 0 + , 1 + , 1 + , 0 + , 1 + , 0 + , 1 + , 1 + , 2 + , 1 + , 2 + , 2 + , 2 + , 2 + , 2 + , 1 + , 0 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QWizard_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QWizard::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QWizard*) +Q_DECLARE_METATYPE(QtScriptShell_QWizard*) +Q_DECLARE_METATYPE(QWizard::WizardPixmap) +Q_DECLARE_METATYPE(QWizard::WizardButton) +Q_DECLARE_METATYPE(QWizard::WizardStyle) +Q_DECLARE_METATYPE(QWizardPage*) +Q_DECLARE_METATYPE(QAbstractButton*) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QWizard::WizardOption) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QDialog*) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QWizard::WizardPixmap +// + +static const QWizard::WizardPixmap qtscript_QWizard_WizardPixmap_values[] = { + QWizard::WatermarkPixmap + , QWizard::LogoPixmap + , QWizard::BannerPixmap + , QWizard::BackgroundPixmap + , QWizard::NPixmaps +}; + +static const char * const qtscript_QWizard_WizardPixmap_keys[] = { + "WatermarkPixmap" + , "LogoPixmap" + , "BannerPixmap" + , "BackgroundPixmap" + , "NPixmaps" +}; + +static QString qtscript_QWizard_WizardPixmap_toStringHelper(QWizard::WizardPixmap value) +{ + if ((value >= QWizard::WatermarkPixmap) && (value <= QWizard::NPixmaps)) + return qtscript_QWizard_WizardPixmap_keys[static_cast(value)-static_cast(QWizard::WatermarkPixmap)]; + return QString(); +} + +static QScriptValue qtscript_QWizard_WizardPixmap_toScriptValue(QScriptEngine *engine, const QWizard::WizardPixmap &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QWizard")); + return clazz.property(qtscript_QWizard_WizardPixmap_toStringHelper(value)); +} + +static void qtscript_QWizard_WizardPixmap_fromScriptValue(const QScriptValue &value, QWizard::WizardPixmap &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QWizard_WizardPixmap(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QWizard::WatermarkPixmap) && (arg <= QWizard::NPixmaps)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("WizardPixmap(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QWizard_WizardPixmap_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QWizard::WizardPixmap value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QWizard_WizardPixmap_toString(QScriptContext *context, QScriptEngine *engine) +{ + QWizard::WizardPixmap value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QWizard_WizardPixmap_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QWizard_WizardPixmap_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QWizard_WizardPixmap, + qtscript_QWizard_WizardPixmap_valueOf, qtscript_QWizard_WizardPixmap_toString); + qScriptRegisterMetaType(engine, qtscript_QWizard_WizardPixmap_toScriptValue, + qtscript_QWizard_WizardPixmap_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QWizard_WizardPixmap_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QWizard_WizardPixmap_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QWizard::WizardButton +// + +static const QWizard::WizardButton qtscript_QWizard_WizardButton_values[] = { + QWizard::NoButton + , QWizard::BackButton + , QWizard::NextButton + , QWizard::CommitButton + , QWizard::FinishButton + , QWizard::CancelButton + , QWizard::HelpButton + , QWizard::CustomButton1 + , QWizard::CustomButton2 + , QWizard::CustomButton3 + , QWizard::Stretch +}; + +static const char * const qtscript_QWizard_WizardButton_keys[] = { + "NoButton" + , "BackButton" + , "NextButton" + , "CommitButton" + , "FinishButton" + , "CancelButton" + , "HelpButton" + , "CustomButton1" + , "CustomButton2" + , "CustomButton3" + , "Stretch" +}; + +static QString qtscript_QWizard_WizardButton_toStringHelper(QWizard::WizardButton value) +{ + if ((value >= QWizard::NoButton) && (value <= QWizard::Stretch)) + return qtscript_QWizard_WizardButton_keys[static_cast(value)-static_cast(QWizard::NoButton)]; + return QString(); +} + +static QScriptValue qtscript_QWizard_WizardButton_toScriptValue(QScriptEngine *engine, const QWizard::WizardButton &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QWizard")); + return clazz.property(qtscript_QWizard_WizardButton_toStringHelper(value)); +} + +static void qtscript_QWizard_WizardButton_fromScriptValue(const QScriptValue &value, QWizard::WizardButton &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QWizard_WizardButton(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QWizard::NoButton) && (arg <= QWizard::Stretch)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("WizardButton(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QWizard_WizardButton_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QWizard::WizardButton value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QWizard_WizardButton_toString(QScriptContext *context, QScriptEngine *engine) +{ + QWizard::WizardButton value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QWizard_WizardButton_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QWizard_WizardButton_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QWizard_WizardButton, + qtscript_QWizard_WizardButton_valueOf, qtscript_QWizard_WizardButton_toString); + qScriptRegisterMetaType(engine, qtscript_QWizard_WizardButton_toScriptValue, + qtscript_QWizard_WizardButton_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 11; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QWizard_WizardButton_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QWizard_WizardButton_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QWizard::WizardStyle +// + +static const QWizard::WizardStyle qtscript_QWizard_WizardStyle_values[] = { + QWizard::ClassicStyle + , QWizard::ModernStyle + , QWizard::MacStyle + , QWizard::AeroStyle + , QWizard::NStyles +}; + +static const char * const qtscript_QWizard_WizardStyle_keys[] = { + "ClassicStyle" + , "ModernStyle" + , "MacStyle" + , "AeroStyle" + , "NStyles" +}; + +static QString qtscript_QWizard_WizardStyle_toStringHelper(QWizard::WizardStyle value) +{ + if ((value >= QWizard::ClassicStyle) && (value <= QWizard::NStyles)) + return qtscript_QWizard_WizardStyle_keys[static_cast(value)-static_cast(QWizard::ClassicStyle)]; + return QString(); +} + +static QScriptValue qtscript_QWizard_WizardStyle_toScriptValue(QScriptEngine *engine, const QWizard::WizardStyle &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QWizard")); + return clazz.property(qtscript_QWizard_WizardStyle_toStringHelper(value)); +} + +static void qtscript_QWizard_WizardStyle_fromScriptValue(const QScriptValue &value, QWizard::WizardStyle &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QWizard_WizardStyle(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QWizard::ClassicStyle) && (arg <= QWizard::NStyles)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("WizardStyle(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QWizard_WizardStyle_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QWizard::WizardStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QWizard_WizardStyle_toString(QScriptContext *context, QScriptEngine *engine) +{ + QWizard::WizardStyle value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QWizard_WizardStyle_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QWizard_WizardStyle_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QWizard_WizardStyle, + qtscript_QWizard_WizardStyle_valueOf, qtscript_QWizard_WizardStyle_toString); + qScriptRegisterMetaType(engine, qtscript_QWizard_WizardStyle_toScriptValue, + qtscript_QWizard_WizardStyle_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 5; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QWizard_WizardStyle_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QWizard_WizardStyle_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QWizard +// + +static QScriptValue qtscript_QWizard_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 23; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QWizard* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QWizard.%0(): this object is not a QWizard") + .arg(qtscript_QWizard_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QWizardPage* _q_arg0 = qscriptvalue_cast(context->argument(0)); + int _q_result = _q_self->addPage(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QWizard::WizardButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAbstractButton* _q_result = _q_self->button(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QWizard::WizardButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->buttonText(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QWizardPage* _q_result = _q_self->currentPage(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QVariant _q_result = _q_self->field(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + bool _q_result = _q_self->hasVisitedPage(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = _q_self->nextId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QWizardPage* _q_result = _q_self->page(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->pageIds(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QWizard::WizardPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_result = _q_self->pixmap(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + _q_self->removePage(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 2) { + QWizard::WizardButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QAbstractButton* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setButton(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QList _q_arg0; + qScriptValueToSequence(context->argument(0), _q_arg0); + _q_self->setButtonLayout(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 2) { + QWizard::WizardButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setButtonText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QVariant _q_arg1 = context->argument(1).toVariant(); + _q_self->setField(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QWizard::WizardOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setOption(_q_arg0); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 2) { + QWizard::WizardOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setOption(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 2) { + int _q_arg0 = context->argument(0).toInt32(); + QWizardPage* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setPage(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 2) { + QWizard::WizardPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setPixmap(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setSideWidget(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QWidget* _q_result = _q_self->sideWidget(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 1) { + QWizard::WizardOption _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->testOption(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->validateCurrentPage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + QList _q_result = _q_self->visitedPages(); + return qScriptValueFromSequence(context->engine(), _q_result); + } + break; + + case 23: { + QString result = QString::fromLatin1("QWizard"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QWizard_throw_ambiguity_error_helper(context, + qtscript_QWizard_function_names[_id+1], + qtscript_QWizard_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QWizard_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QWizard(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QWizard* _q_cpp_result = new QtScriptShell_QWizard(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QWizard*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QWizard* _q_cpp_result = new QtScriptShell_QWizard(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QWizard*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 2) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QFlags _q_arg1 = qscriptvalue_cast >(context->argument(1)); + QtScriptShell_QWizard* _q_cpp_result = new QtScriptShell_QWizard(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QWizard*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QWizard_throw_ambiguity_error_helper(context, + qtscript_QWizard_function_names[_id], + qtscript_QWizard_function_signatures[_id]); +} + +static QScriptValue qtscript_QWizard_toScriptValue(QScriptEngine *engine, QWizard* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QWizard_fromScriptValue(const QScriptValue &value, QWizard* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QWizard_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QWizard*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 24; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QWizard_prototype_call, qtscript_QWizard_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QWizard_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QWizard_toScriptValue, + qtscript_QWizard_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QWizard_static_call, proto, qtscript_QWizard_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("WizardPixmap"), + qtscript_create_QWizard_WizardPixmap_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("WizardButton"), + qtscript_create_QWizard_WizardButton_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("WizardStyle"), + qtscript_create_QWizard_WizardStyle_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWizardPage.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWizardPage.cpp new file mode 100644 index 00000000..3f23319d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscript_QWizardPage.cpp @@ -0,0 +1,319 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qtscriptshell_QWizardPage.h" + +static const char * const qtscript_QWizardPage_function_names[] = { + "QWizardPage" + // static + // prototype + , "buttonText" + , "cleanupPage" + , "initializePage" + , "isCommitPage" + , "isComplete" + , "isFinalPage" + , "nextId" + , "pixmap" + , "setButtonText" + , "setCommitPage" + , "setFinalPage" + , "setPixmap" + , "validatePage" + , "toString" +}; + +static const char * const qtscript_QWizardPage_function_signatures[] = { + "QWidget parent" + // static + // prototype + , "WizardButton which" + , "" + , "" + , "" + , "" + , "" + , "" + , "WizardPixmap which" + , "WizardButton which, String text" + , "bool commitPage" + , "bool finalPage" + , "WizardPixmap which, QPixmap pixmap" + , "" +"" +}; + +static const int qtscript_QWizardPage_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 2 + , 1 + , 1 + , 2 + , 0 + , 0 +}; + +static QScriptValue qtscript_QWizardPage_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QWizardPage::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QWizardPage*) +Q_DECLARE_METATYPE(QtScriptShell_QWizardPage*) +Q_DECLARE_METATYPE(QWizard::WizardButton) +Q_DECLARE_METATYPE(QWizard::WizardPixmap) +Q_DECLARE_METATYPE(QWidget*) + +// +// QWizardPage +// + +static QScriptValue qtscript_QWizardPage_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 13; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QWizardPage* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QWizardPage.%0(): this object is not a QWizardPage") + .arg(qtscript_QWizardPage_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QWizard::WizardButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_result = _q_self->buttonText(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->cleanupPage(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->initializePage(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isCommitPage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isComplete(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isFinalPage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = _q_self->nextId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QWizard::WizardPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_result = _q_self->pixmap(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 2) { + QWizard::WizardButton _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setButtonText(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 9: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setCommitPage(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + _q_self->setFinalPage(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 2) { + QWizard::WizardPixmap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QPixmap _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setPixmap(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->validatePage(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: { + QString result = QString::fromLatin1("QWizardPage"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QWizardPage_throw_ambiguity_error_helper(context, + qtscript_QWizardPage_function_names[_id+1], + qtscript_QWizardPage_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QWizardPage_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QWizardPage(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QWizardPage* _q_cpp_result = new QtScriptShell_QWizardPage(); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QWizardPage*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QWidget* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QWizardPage* _q_cpp_result = new QtScriptShell_QWizardPage(_q_arg0); + QScriptValue _q_result = context->engine()->newQObject(context->thisObject(), (QWizardPage*)_q_cpp_result, QScriptEngine::AutoOwnership); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QWizardPage_throw_ambiguity_error_helper(context, + qtscript_QWizardPage_function_names[_id], + qtscript_QWizardPage_function_signatures[_id]); +} + +static QScriptValue qtscript_QWizardPage_toScriptValue(QScriptEngine *engine, QWizardPage* const &in) +{ + return engine->newQObject(in, QScriptEngine::QtOwnership, QScriptEngine::PreferExistingWrapperObject); +} + +static void qtscript_QWizardPage_fromScriptValue(const QScriptValue &value, QWizardPage* &out) +{ + out = qobject_cast(value.toQObject()); +} + +QScriptValue qtscript_create_QWizardPage_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QWizardPage*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 14; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QWizardPage_prototype_call, qtscript_QWizardPage_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QWizardPage_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + qScriptRegisterMetaType(engine, qtscript_QWizardPage_toScriptValue, + qtscript_QWizardPage_fromScriptValue, proto); + + QScriptValue ctor = engine->newFunction(qtscript_QWizardPage_static_call, proto, qtscript_QWizardPage_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractButton.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractButton.cpp new file mode 100644 index 00000000..40cdfbd4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractButton.cpp @@ -0,0 +1,708 @@ +#include "qtscriptshell_QAbstractButton.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QAbstractButton::QtScriptShell_QAbstractButton(QWidget* parent) + : QAbstractButton(parent) {} + +QtScriptShell_QAbstractButton::~QtScriptShell_QAbstractButton() {} + +void QtScriptShell_QAbstractButton::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractButton::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QAbstractButton::checkStateSet() +{ + QScriptValue _q_function = __qtscript_self.property("checkStateSet"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("checkStateSet") & QScriptValue::QObjectMember)) { + QAbstractButton::checkStateSet(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QAbstractButton::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractButton::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractButton::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractButton::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAbstractButton::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QAbstractButton::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractButton::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractButton::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractButton::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractButton::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractButton::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractButton::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAbstractButton::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QAbstractButton::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAbstractButton::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QAbstractButton::focusInEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::focusInEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QAbstractButton::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QAbstractButton::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QAbstractButton::focusOutEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::focusOutEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QAbstractButton::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QAbstractButton::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QAbstractButton::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QAbstractButton::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QAbstractButton::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractButton::hitButton(const QPoint& pos) const +{ + QScriptValue _q_function = __qtscript_self.property("hitButton"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hitButton") & QScriptValue::QObjectMember)) { + return QAbstractButton::hitButton(pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pos))); + } +} + +void QtScriptShell_QAbstractButton::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QAbstractButton::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QAbstractButton::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QAbstractButton::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QAbstractButton::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QAbstractButton::keyPressEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::keyPressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QAbstractButton::keyReleaseEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::keyReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QAbstractButton::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAbstractButton::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QAbstractButton::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QAbstractButton::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QAbstractButton::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractButton::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractButton::mouseMoveEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::mouseMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QAbstractButton::mousePressEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::mousePressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QAbstractButton::mouseReleaseEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::mouseReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QAbstractButton::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractButton::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QAbstractButton::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +void QtScriptShell_QAbstractButton::nextCheckState() +{ + QScriptValue _q_function = __qtscript_self.property("nextCheckState"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nextCheckState") & QScriptValue::QObjectMember)) { + QAbstractButton::nextCheckState(); + } else { + _q_function.call(__qtscript_self); + } +} + +QPaintEngine* QtScriptShell_QAbstractButton::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QAbstractButton::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractButton::paintEvent(QPaintEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + qFatal("QAbstractButton::paintEvent() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QPaintDevice* QtScriptShell_QAbstractButton::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QAbstractButton::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QAbstractButton::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QAbstractButton::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QAbstractButton::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractButton::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_QAbstractButton::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QAbstractButton::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractButton::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractButton::timerEvent(QTimerEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::timerEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QAbstractButton::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QAbstractButton::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractButton.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractButton.h new file mode 100644 index 00000000..200f2bb7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractButton.h @@ -0,0 +1,66 @@ +#ifndef QTSCRIPTSHELL_QABSTRACTBUTTON_H +#define QTSCRIPTSHELL_QABSTRACTBUTTON_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAbstractButton : public QAbstractButton +{ +public: + QtScriptShell_QAbstractButton(QWidget* parent = 0); + ~QtScriptShell_QAbstractButton(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* e); + void checkStateSet(); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* e); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* e); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + bool hitButton(const QPoint& pos) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* e); + void keyReleaseEvent(QKeyEvent* e); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* e); + void mousePressEvent(QMouseEvent* e); + void mouseReleaseEvent(QMouseEvent* e); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + void nextCheckState(); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* e); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* e); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QABSTRACTBUTTON_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractGraphicsShapeItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractGraphicsShapeItem.cpp new file mode 100644 index 00000000..bf9fc877 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractGraphicsShapeItem.cpp @@ -0,0 +1,508 @@ +#include "qtscriptshell_QAbstractGraphicsShapeItem.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneDragDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneHoverEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemChange) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMouseEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneWheelEvent*) + +QtScriptShell_QAbstractGraphicsShapeItem::QtScriptShell_QAbstractGraphicsShapeItem(QGraphicsItem* parent) + : QAbstractGraphicsShapeItem(parent) {} + +QtScriptShell_QAbstractGraphicsShapeItem::~QtScriptShell_QAbstractGraphicsShapeItem() {} + +void QtScriptShell_QAbstractGraphicsShapeItem::advance(int phase) +{ + QScriptValue _q_function = __qtscript_self.property("advance"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("advance") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::advance(phase); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, phase)); + } +} + +QRectF QtScriptShell_QAbstractGraphicsShapeItem::boundingRect() const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRect") & QScriptValue::QObjectMember)) { + qFatal("QAbstractGraphicsShapeItem::boundingRect() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QAbstractGraphicsShapeItem::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithItem") & QScriptValue::QObjectMember)) { + return QAbstractGraphicsShapeItem::collidesWithItem(other, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(other)) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QAbstractGraphicsShapeItem::collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithPath"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithPath") & QScriptValue::QObjectMember)) { + return QAbstractGraphicsShapeItem::collidesWithPath(path, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, path) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QAbstractGraphicsShapeItem::contains(const QPointF& point) const +{ + QScriptValue _q_function = __qtscript_self.property("contains"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contains") & QScriptValue::QObjectMember)) { + return QAbstractGraphicsShapeItem::contains(point); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, point))); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::dragEnterEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::dragLeaveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::dragMoveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::dropEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QAbstractGraphicsShapeItem::extension(const QVariant& variant) const +{ + QScriptValue _q_function = __qtscript_self.property("extension"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("extension") & QScriptValue::QObjectMember)) { + return QAbstractGraphicsShapeItem::extension(variant); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, variant))); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverEnterEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::hoverEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverLeaveEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::hoverLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::hoverMoveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverMoveEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::hoverMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QAbstractGraphicsShapeItem::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QAbstractGraphicsShapeItem::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QAbstractGraphicsShapeItem::isObscuredBy(const QGraphicsItem* item) const +{ + QScriptValue _q_function = __qtscript_self.property("isObscuredBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isObscuredBy") & QScriptValue::QObjectMember)) { + return QAbstractGraphicsShapeItem::isObscuredBy(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(item)))); + } +} + +QVariant QtScriptShell_QAbstractGraphicsShapeItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("itemChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemChange") & QScriptValue::QObjectMember)) { + return QAbstractGraphicsShapeItem::itemChange(change, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, change) + << qScriptValueFromValue(_q_engine, value))); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainterPath QtScriptShell_QAbstractGraphicsShapeItem::opaqueArea() const +{ + QScriptValue _q_function = __qtscript_self.property("opaqueArea"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("opaqueArea") & QScriptValue::QObjectMember)) { + return QAbstractGraphicsShapeItem::opaqueArea(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + qFatal("QAbstractGraphicsShapeItem::paint() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +bool QtScriptShell_QAbstractGraphicsShapeItem::sceneEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEvent") & QScriptValue::QObjectMember)) { + return QAbstractGraphicsShapeItem::sceneEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QAbstractGraphicsShapeItem::sceneEventFilter(QGraphicsItem* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEventFilter") & QScriptValue::QObjectMember)) { + return QAbstractGraphicsShapeItem::sceneEventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QPainterPath QtScriptShell_QAbstractGraphicsShapeItem::shape() const +{ + QScriptValue _q_function = __qtscript_self.property("shape"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("shape") & QScriptValue::QObjectMember)) { + return QAbstractGraphicsShapeItem::shape(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QAbstractGraphicsShapeItem::type() const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + return QAbstractGraphicsShapeItem::type(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractGraphicsShapeItem::wheelEvent(QGraphicsSceneWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QAbstractGraphicsShapeItem::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractGraphicsShapeItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractGraphicsShapeItem.h new file mode 100644 index 00000000..86734bea --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractGraphicsShapeItem.h @@ -0,0 +1,52 @@ +#ifndef QTSCRIPTSHELL_QABSTRACTGRAPHICSSHAPEITEM_H +#define QTSCRIPTSHELL_QABSTRACTGRAPHICSSHAPEITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAbstractGraphicsShapeItem : public QAbstractGraphicsShapeItem +{ +public: + QtScriptShell_QAbstractGraphicsShapeItem(QGraphicsItem* parent = 0); + ~QtScriptShell_QAbstractGraphicsShapeItem(); + + void advance(int phase); + QRectF boundingRect() const; + bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const; + bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const; + bool contains(const QPointF& point) const; + void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); + void dragEnterEvent(QGraphicsSceneDragDropEvent* event); + void dragLeaveEvent(QGraphicsSceneDragDropEvent* event); + void dragMoveEvent(QGraphicsSceneDragDropEvent* event); + void dropEvent(QGraphicsSceneDragDropEvent* event); + QVariant extension(const QVariant& variant) const; + void focusInEvent(QFocusEvent* event); + void focusOutEvent(QFocusEvent* event); + void hoverEnterEvent(QGraphicsSceneHoverEvent* event); + void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); + void hoverMoveEvent(QGraphicsSceneHoverEvent* event); + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isObscuredBy(const QGraphicsItem* item) const; + QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value); + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + QPainterPath opaqueArea() const; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); + bool sceneEvent(QEvent* event); + bool sceneEventFilter(QGraphicsItem* watched, QEvent* event); + QPainterPath shape() const; + int type() const; + void wheelEvent(QGraphicsSceneWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QABSTRACTGRAPHICSSHAPEITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractItemDelegate.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractItemDelegate.cpp new file mode 100644 index 00000000..ba923ab3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractItemDelegate.cpp @@ -0,0 +1,260 @@ +#include "qtscriptshell_QAbstractItemDelegate.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QStyleOptionViewItem) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QAbstractItemModel*) +Q_DECLARE_METATYPE(QHelpEvent*) +Q_DECLARE_METATYPE(QAbstractItemView*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QAbstractItemDelegate::QtScriptShell_QAbstractItemDelegate(QObject* parent) + : QAbstractItemDelegate(parent) {} + +QtScriptShell_QAbstractItemDelegate::~QtScriptShell_QAbstractItemDelegate() {} + +void QtScriptShell_QAbstractItemDelegate::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAbstractItemDelegate::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QWidget* QtScriptShell_QAbstractItemDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("createEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createEditor") & QScriptValue::QObjectMember)) { + return QAbstractItemDelegate::createEditor(parent, option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QAbstractItemDelegate::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAbstractItemDelegate::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemDelegate::destroyEditor(QWidget* editor, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("destroyEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("destroyEditor") & QScriptValue::QObjectMember)) { + QAbstractItemDelegate::destroyEditor(editor, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, index)); + } +} + +bool QtScriptShell_QAbstractItemDelegate::editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) +{ + QScriptValue _q_function = __qtscript_self.property("editorEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("editorEvent") & QScriptValue::QObjectMember)) { + return QAbstractItemDelegate::editorEvent(event, model, option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event) + << qScriptValueFromValue(_q_engine, model) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QAbstractItemDelegate::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAbstractItemDelegate::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QAbstractItemDelegate::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAbstractItemDelegate::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QAbstractItemDelegate::helpEvent(QHelpEvent* event, QAbstractItemView* view, const QStyleOptionViewItem& option, const QModelIndex& index) +{ + QScriptValue _q_function = __qtscript_self.property("helpEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("helpEvent") & QScriptValue::QObjectMember)) { + return QAbstractItemDelegate::helpEvent(event, view, option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event) + << qScriptValueFromValue(_q_engine, view) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QAbstractItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + qFatal("QAbstractItemDelegate::paint() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index)); + } +} + +QVector QtScriptShell_QAbstractItemDelegate::paintingRoles() const +{ + QScriptValue _q_function = __qtscript_self.property("paintingRoles"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintingRoles") & QScriptValue::QObjectMember)) { + return QAbstractItemDelegate::paintingRoles(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractItemDelegate::setEditorData(QWidget* editor, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("setEditorData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setEditorData") & QScriptValue::QObjectMember)) { + QAbstractItemDelegate::setEditorData(editor, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QAbstractItemDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("setModelData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setModelData") & QScriptValue::QObjectMember)) { + QAbstractItemDelegate::setModelData(editor, model, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, model) + << qScriptValueFromValue(_q_engine, index)); + } +} + +QSize QtScriptShell_QAbstractItemDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + qFatal("QAbstractItemDelegate::sizeHint() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QAbstractItemDelegate::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAbstractItemDelegate::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorGeometry") & QScriptValue::QObjectMember)) { + QAbstractItemDelegate::updateEditorGeometry(editor, option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractItemDelegate.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractItemDelegate.h new file mode 100644 index 00000000..ac34282b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractItemDelegate.h @@ -0,0 +1,34 @@ +#ifndef QTSCRIPTSHELL_QABSTRACTITEMDELEGATE_H +#define QTSCRIPTSHELL_QABSTRACTITEMDELEGATE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAbstractItemDelegate : public QAbstractItemDelegate +{ +public: + QtScriptShell_QAbstractItemDelegate(QObject* parent = 0); + ~QtScriptShell_QAbstractItemDelegate(); + + void childEvent(QChildEvent* event); + QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const; + void customEvent(QEvent* event); + void destroyEditor(QWidget* editor, const QModelIndex& index) const; + bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + bool helpEvent(QHelpEvent* event, QAbstractItemView* view, const QStyleOptionViewItem& option, const QModelIndex& index); + void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; + QVector paintingRoles() const; + void setEditorData(QWidget* editor, const QModelIndex& index) const; + void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const; + QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const; + void timerEvent(QTimerEvent* event); + void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QABSTRACTITEMDELEGATE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractItemView.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractItemView.cpp new file mode 100644 index 00000000..7e246c69 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractItemView.cpp @@ -0,0 +1,1222 @@ +#include "qtscriptshell_QAbstractItemView.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::EditTrigger) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::ScrollHint) +Q_DECLARE_METATYPE(const QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAbstractItemModel*) +Q_DECLARE_METATYPE(QItemSelectionModel*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QStyleOptionViewItem) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QAbstractItemView::QtScriptShell_QAbstractItemView(QWidget* parent) + : QAbstractItemView(parent) {} + +QtScriptShell_QAbstractItemView::~QtScriptShell_QAbstractItemView() {} + +void QtScriptShell_QAbstractItemView::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemView::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractItemView::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemView::closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("closeEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEditor") & QScriptValue::QObjectMember)) { + QAbstractItemView::closeEditor(editor, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QAbstractItemView::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemView::commitData(QWidget* editor) +{ + QScriptValue _q_function = __qtscript_self.property("commitData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("commitData") & QScriptValue::QObjectMember)) { + QAbstractItemView::commitData(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QAbstractItemView::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractItemView::currentChanged(const QModelIndex& current, const QModelIndex& previous) +{ + QScriptValue _q_function = __qtscript_self.property("currentChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("currentChanged") & QScriptValue::QObjectMember)) { + QAbstractItemView::currentChanged(current, previous); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, current) + << qScriptValueFromValue(_q_engine, previous)); + } +} + +void QtScriptShell_QAbstractItemView::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemView::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) +{ + QScriptValue _q_function = __qtscript_self.property("dataChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dataChanged") & QScriptValue::QObjectMember)) { + QAbstractItemView::dataChanged(topLeft, bottomRight, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, topLeft) + << qScriptValueFromValue(_q_engine, bottomRight) + << qScriptValueFromValue(_q_engine, roles)); + } +} + +int QtScriptShell_QAbstractItemView::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QAbstractItemView::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractItemView::doItemsLayout() +{ + QScriptValue _q_function = __qtscript_self.property("doItemsLayout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("doItemsLayout") & QScriptValue::QObjectMember)) { + QAbstractItemView::doItemsLayout(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QAbstractItemView::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemView::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemView::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemView::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractItemView::edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("edit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("edit") & QScriptValue::QObjectMember)) { + return QAbstractItemView::edit(index, trigger, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, trigger) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QAbstractItemView::editorDestroyed(QObject* editor) +{ + QScriptValue _q_function = __qtscript_self.property("editorDestroyed"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("editorDestroyed") & QScriptValue::QObjectMember)) { + QAbstractItemView::editorDestroyed(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QAbstractItemView::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractItemView::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAbstractItemView::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QAbstractItemView::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAbstractItemView::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QAbstractItemView::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractItemView::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QAbstractItemView::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QAbstractItemView::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractItemView::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QAbstractItemView::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QAbstractItemView::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QAbstractItemView::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QAbstractItemView::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAbstractItemView::horizontalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("horizontalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalOffset") & QScriptValue::QObjectMember)) { + qFatal("QAbstractItemView::horizontalOffset() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractItemView::horizontalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarAction") & QScriptValue::QObjectMember)) { + QAbstractItemView::horizontalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QAbstractItemView::horizontalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QAbstractItemView::horizontalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QModelIndex QtScriptShell_QAbstractItemView::indexAt(const QPoint& point) const +{ + QScriptValue _q_function = __qtscript_self.property("indexAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexAt") & QScriptValue::QObjectMember)) { + qFatal("QAbstractItemView::indexAt() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, point))); + } +} + +void QtScriptShell_QAbstractItemView::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QAbstractItemView::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QAbstractItemView::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QAbstractItemView::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QAbstractItemView::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QAbstractItemView::isIndexHidden(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("isIndexHidden"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isIndexHidden") & QScriptValue::QObjectMember)) { + qFatal("QAbstractItemView::isIndexHidden() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QAbstractItemView::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemView::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemView::keyboardSearch(const QString& search) +{ + QScriptValue _q_function = __qtscript_self.property("keyboardSearch"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyboardSearch") & QScriptValue::QObjectMember)) { + QAbstractItemView::keyboardSearch(search); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, search)); + } +} + +void QtScriptShell_QAbstractItemView::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAbstractItemView::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QAbstractItemView::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QAbstractItemView::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemView::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemView::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemView::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemView::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractItemView::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QAbstractItemView::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QAbstractItemView::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QAbstractItemView::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractItemView::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QAbstractItemView::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QAbstractItemView::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QAbstractItemView::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + QAbstractItemView::reset(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QAbstractItemView::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemView::rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsAboutToBeRemoved"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsAboutToBeRemoved") & QScriptValue::QObjectMember)) { + QAbstractItemView::rowsAboutToBeRemoved(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QAbstractItemView::rowsInserted(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsInserted"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsInserted") & QScriptValue::QObjectMember)) { + QAbstractItemView::rowsInserted(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QAbstractItemView::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QAbstractItemView::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QAbstractItemView::scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("scrollTo"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollTo") & QScriptValue::QObjectMember)) { + qFatal("QAbstractItemView::scrollTo() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QAbstractItemView::selectAll() +{ + QScriptValue _q_function = __qtscript_self.property("selectAll"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectAll") & QScriptValue::QObjectMember)) { + QAbstractItemView::selectAll(); + } else { + _q_function.call(__qtscript_self); + } +} + +QList QtScriptShell_QAbstractItemView::selectedIndexes() const +{ + QScriptValue _q_function = __qtscript_self.property("selectedIndexes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectedIndexes") & QScriptValue::QObjectMember)) { + return QAbstractItemView::selectedIndexes(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractItemView::selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) +{ + QScriptValue _q_function = __qtscript_self.property("selectionChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionChanged") & QScriptValue::QObjectMember)) { + QAbstractItemView::selectionChanged(selected, deselected); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selected) + << qScriptValueFromValue(_q_engine, deselected)); + } +} + +QItemSelectionModel::SelectionFlags QtScriptShell_QAbstractItemView::selectionCommand(const QModelIndex& index, const QEvent* event) const +{ + QScriptValue _q_function = __qtscript_self.property("selectionCommand"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionCommand") & QScriptValue::QObjectMember)) { + return QAbstractItemView::selectionCommand(index, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, const_cast(event)))); + } +} + +void QtScriptShell_QAbstractItemView::setModel(QAbstractItemModel* model) +{ + QScriptValue _q_function = __qtscript_self.property("setModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setModel") & QScriptValue::QObjectMember)) { + QAbstractItemView::setModel(model); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, model)); + } +} + +void QtScriptShell_QAbstractItemView::setRootIndex(const QModelIndex& index) +{ + QScriptValue _q_function = __qtscript_self.property("setRootIndex"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setRootIndex") & QScriptValue::QObjectMember)) { + QAbstractItemView::setRootIndex(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QAbstractItemView::setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) +{ + QScriptValue _q_function = __qtscript_self.property("setSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelection") & QScriptValue::QObjectMember)) { + qFatal("QAbstractItemView::setSelection() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, command)); + } +} + +void QtScriptShell_QAbstractItemView::setSelectionModel(QItemSelectionModel* selectionModel) +{ + QScriptValue _q_function = __qtscript_self.property("setSelectionModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelectionModel") & QScriptValue::QObjectMember)) { + QAbstractItemView::setSelectionModel(selectionModel); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selectionModel)); + } +} + +void QtScriptShell_QAbstractItemView::setupViewport(QWidget* viewport) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QAbstractItemView::setupViewport(viewport); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, viewport)); + } +} + +QPainter* QtScriptShell_QAbstractItemView::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QAbstractItemView::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractItemView::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAbstractItemView::sizeHintForColumn(int column) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForColumn"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForColumn") & QScriptValue::QObjectMember)) { + return QAbstractItemView::sizeHintForColumn(column); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column))); + } +} + +int QtScriptShell_QAbstractItemView::sizeHintForRow(int row) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForRow"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForRow") & QScriptValue::QObjectMember)) { + return QAbstractItemView::sizeHintForRow(row); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row))); + } +} + +void QtScriptShell_QAbstractItemView::startDrag(Qt::DropActions supportedActions) +{ + QScriptValue _q_function = __qtscript_self.property("startDrag"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startDrag") & QScriptValue::QObjectMember)) { + QAbstractItemView::startDrag(supportedActions); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, supportedActions)); + } +} + +void QtScriptShell_QAbstractItemView::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemView::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractItemView::updateEditorData() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorData") & QScriptValue::QObjectMember)) { + QAbstractItemView::updateEditorData(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QAbstractItemView::updateEditorGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorGeometries") & QScriptValue::QObjectMember)) { + QAbstractItemView::updateEditorGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QAbstractItemView::updateGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometries") & QScriptValue::QObjectMember)) { + QAbstractItemView::updateGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +int QtScriptShell_QAbstractItemView::verticalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("verticalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalOffset") & QScriptValue::QObjectMember)) { + qFatal("QAbstractItemView::verticalOffset() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractItemView::verticalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarAction") & QScriptValue::QObjectMember)) { + QAbstractItemView::verticalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QAbstractItemView::verticalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QAbstractItemView::verticalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QStyleOptionViewItem QtScriptShell_QAbstractItemView::viewOptions() const +{ + QScriptValue _q_function = __qtscript_self.property("viewOptions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewOptions") & QScriptValue::QObjectMember)) { + return QAbstractItemView::viewOptions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QAbstractItemView::viewportEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QAbstractItemView::viewportEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +QSize QtScriptShell_QAbstractItemView::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QAbstractItemView::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QAbstractItemView::visualRect(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRect") & QScriptValue::QObjectMember)) { + qFatal("QAbstractItemView::visualRect() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QRegion QtScriptShell_QAbstractItemView::visualRegionForSelection(const QItemSelection& selection) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRegionForSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRegionForSelection") & QScriptValue::QObjectMember)) { + qFatal("QAbstractItemView::visualRegionForSelection() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selection))); + } +} + +void QtScriptShell_QAbstractItemView::wheelEvent(QWheelEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QAbstractItemView::wheelEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractItemView.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractItemView.h new file mode 100644 index 00000000..a96c6228 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractItemView.h @@ -0,0 +1,106 @@ +#ifndef QTSCRIPTSHELL_QABSTRACTITEMVIEW_H +#define QTSCRIPTSHELL_QABSTRACTITEMVIEW_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAbstractItemView : public QAbstractItemView +{ +public: + QtScriptShell_QAbstractItemView(QWidget* parent = 0); + ~QtScriptShell_QAbstractItemView(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint); + void closeEvent(QCloseEvent* event); + void commitData(QWidget* editor); + void contextMenuEvent(QContextMenuEvent* arg__1); + void currentChanged(const QModelIndex& current, const QModelIndex& previous); + void customEvent(QEvent* event); + void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles = QVector()); + int devType() const; + void doItemsLayout(); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event); + void editorDestroyed(QObject* editor); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + int horizontalOffset() const; + void horizontalScrollbarAction(int action); + void horizontalScrollbarValueChanged(int value); + QModelIndex indexAt(const QPoint& point) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isIndexHidden(const QModelIndex& index) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void keyboardSearch(const QString& search); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void reset(); + void resizeEvent(QResizeEvent* event); + void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end); + void rowsInserted(const QModelIndex& parent, int start, int end); + void scrollContentsBy(int dx, int dy); + void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint = QAbstractItemView::EnsureVisible); + void selectAll(); + QList selectedIndexes() const; + void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected); + QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event = 0) const; + void setModel(QAbstractItemModel* model); + void setRootIndex(const QModelIndex& index); + void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command); + void setSelectionModel(QItemSelectionModel* selectionModel); + void setupViewport(QWidget* viewport); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + int sizeHintForColumn(int column) const; + int sizeHintForRow(int row) const; + void startDrag(Qt::DropActions supportedActions); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void updateEditorData(); + void updateEditorGeometries(); + void updateGeometries(); + int verticalOffset() const; + void verticalScrollbarAction(int action); + void verticalScrollbarValueChanged(int value); + QStyleOptionViewItem viewOptions() const; + bool viewportEvent(QEvent* event); + QSize viewportSizeHint() const; + QRect visualRect(const QModelIndex& index) const; + QRegion visualRegionForSelection(const QItemSelection& selection) const; + void wheelEvent(QWheelEvent* arg__1); + + QModelIndex moveCursor(QAbstractItemView::CursorAction, Qt::KeyboardModifiers) + { return QModelIndex(); } + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QABSTRACTITEMVIEW_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractScrollArea.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractScrollArea.cpp new file mode 100644 index 00000000..68762171 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractScrollArea.cpp @@ -0,0 +1,706 @@ +#include "qtscriptshell_QAbstractScrollArea.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QAbstractScrollArea::QtScriptShell_QAbstractScrollArea(QWidget* parent) + : QAbstractScrollArea(parent) {} + +QtScriptShell_QAbstractScrollArea::~QtScriptShell_QAbstractScrollArea() {} + +void QtScriptShell_QAbstractScrollArea::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractScrollArea::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractScrollArea::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractScrollArea::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractScrollArea::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractScrollArea::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAbstractScrollArea::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QAbstractScrollArea::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractScrollArea::dragEnterEvent(QDragEnterEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::dragEnterEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractScrollArea::dragLeaveEvent(QDragLeaveEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::dragLeaveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractScrollArea::dragMoveEvent(QDragMoveEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::dragMoveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractScrollArea::dropEvent(QDropEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::dropEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractScrollArea::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractScrollArea::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAbstractScrollArea::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QAbstractScrollArea::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAbstractScrollArea::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QAbstractScrollArea::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractScrollArea::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QAbstractScrollArea::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QAbstractScrollArea::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractScrollArea::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QAbstractScrollArea::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QAbstractScrollArea::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QAbstractScrollArea::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QAbstractScrollArea::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractScrollArea::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QAbstractScrollArea::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QAbstractScrollArea::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QAbstractScrollArea::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QAbstractScrollArea::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractScrollArea::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractScrollArea::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAbstractScrollArea::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QAbstractScrollArea::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QAbstractScrollArea::mouseDoubleClickEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::mouseDoubleClickEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractScrollArea::mouseMoveEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::mouseMoveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractScrollArea::mousePressEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::mousePressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractScrollArea::mouseReleaseEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::mouseReleaseEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractScrollArea::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractScrollArea::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QAbstractScrollArea::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QAbstractScrollArea::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QAbstractScrollArea::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractScrollArea::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QAbstractScrollArea::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QAbstractScrollArea::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QAbstractScrollArea::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractScrollArea::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QAbstractScrollArea::setupViewport(QWidget* viewport) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::setupViewport(viewport); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, viewport)); + } +} + +QPainter* QtScriptShell_QAbstractScrollArea::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QAbstractScrollArea::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractScrollArea::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractScrollArea::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractScrollArea::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractScrollArea::viewportEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QAbstractScrollArea::viewportEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QAbstractScrollArea::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QAbstractScrollArea::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractScrollArea::wheelEvent(QWheelEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QAbstractScrollArea::wheelEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractScrollArea.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractScrollArea.h new file mode 100644 index 00000000..c7e06932 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractScrollArea.h @@ -0,0 +1,65 @@ +#ifndef QTSCRIPTSHELL_QABSTRACTSCROLLAREA_H +#define QTSCRIPTSHELL_QABSTRACTSCROLLAREA_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAbstractScrollArea : public QAbstractScrollArea +{ +public: + QtScriptShell_QAbstractScrollArea(QWidget* parent = 0); + ~QtScriptShell_QAbstractScrollArea(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* arg__1); + void dragLeaveEvent(QDragLeaveEvent* arg__1); + void dragMoveEvent(QDragMoveEvent* arg__1); + void dropEvent(QDropEvent* arg__1); + void enterEvent(QEvent* event); + bool event(QEvent* arg__1); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* arg__1); + void mouseMoveEvent(QMouseEvent* arg__1); + void mousePressEvent(QMouseEvent* arg__1); + void mouseReleaseEvent(QMouseEvent* arg__1); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* arg__1); + void scrollContentsBy(int dx, int dy); + void setupViewport(QWidget* viewport); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + bool viewportEvent(QEvent* arg__1); + QSize viewportSizeHint() const; + void wheelEvent(QWheelEvent* arg__1); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QABSTRACTSCROLLAREA_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractSlider.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractSlider.cpp new file mode 100644 index 00000000..75bcb2c7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractSlider.cpp @@ -0,0 +1,671 @@ +#include "qtscriptshell_QAbstractSlider.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QAbstractSlider::QtScriptShell_QAbstractSlider(QWidget* parent) + : QAbstractSlider(parent) {} + +QtScriptShell_QAbstractSlider::~QtScriptShell_QAbstractSlider() {} + +void QtScriptShell_QAbstractSlider::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSlider::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QAbstractSlider::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSlider::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSlider::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSlider::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAbstractSlider::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QAbstractSlider::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractSlider::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSlider::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSlider::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSlider::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSlider::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractSlider::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAbstractSlider::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QAbstractSlider::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAbstractSlider::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QAbstractSlider::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractSlider::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QAbstractSlider::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QAbstractSlider::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractSlider::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QAbstractSlider::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QAbstractSlider::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QAbstractSlider::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QAbstractSlider::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSlider::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QAbstractSlider::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QAbstractSlider::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QAbstractSlider::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QAbstractSlider::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QAbstractSlider::keyPressEvent(QKeyEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::keyPressEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QAbstractSlider::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSlider::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAbstractSlider::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QAbstractSlider::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QAbstractSlider::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QAbstractSlider::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractSlider::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSlider::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSlider::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSlider::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSlider::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractSlider::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QAbstractSlider::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QAbstractSlider::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QAbstractSlider::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractSlider::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QAbstractSlider::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QAbstractSlider::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QAbstractSlider::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QAbstractSlider::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QAbstractSlider::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractSlider::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_QAbstractSlider::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QAbstractSlider::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractSlider::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSlider::timerEvent(QTimerEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::timerEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QAbstractSlider::wheelEvent(QWheelEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QAbstractSlider::wheelEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractSlider.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractSlider.h new file mode 100644 index 00000000..a40d1555 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractSlider.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_QABSTRACTSLIDER_H +#define QTSCRIPTSHELL_QABSTRACTSLIDER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAbstractSlider : public QAbstractSlider +{ +public: + QtScriptShell_QAbstractSlider(QWidget* parent = 0); + ~QtScriptShell_QAbstractSlider(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* e); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* ev); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* arg__1); + void wheelEvent(QWheelEvent* e); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QABSTRACTSLIDER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractSpinBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractSpinBox.cpp new file mode 100644 index 00000000..ec6198af --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractSpinBox.cpp @@ -0,0 +1,718 @@ +#include "qtscriptshell_QAbstractSpinBox.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QValidator::State) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QAbstractSpinBox::QtScriptShell_QAbstractSpinBox(QWidget* parent) + : QAbstractSpinBox(parent) {} + +QtScriptShell_QAbstractSpinBox::~QtScriptShell_QAbstractSpinBox() {} + +void QtScriptShell_QAbstractSpinBox::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::changeEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::changeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::clear() +{ + QScriptValue _q_function = __qtscript_self.property("clear"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clear") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::clear(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QAbstractSpinBox::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAbstractSpinBox::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QAbstractSpinBox::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractSpinBox::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractSpinBox::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAbstractSpinBox::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QAbstractSpinBox::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAbstractSpinBox::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QAbstractSpinBox::fixup(QString& input) const +{ + QScriptValue _q_function = __qtscript_self.property("fixup"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fixup") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::fixup(input); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, input)); + } +} + +void QtScriptShell_QAbstractSpinBox::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractSpinBox::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QAbstractSpinBox::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QAbstractSpinBox::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractSpinBox::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QAbstractSpinBox::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QAbstractSpinBox::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QAbstractSpinBox::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QAbstractSpinBox::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QAbstractSpinBox::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QAbstractSpinBox::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QAbstractSpinBox::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QAbstractSpinBox::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QAbstractSpinBox::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QAbstractSpinBox::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAbstractSpinBox::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QAbstractSpinBox::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QAbstractSpinBox::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QAbstractSpinBox::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractSpinBox::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QAbstractSpinBox::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QAbstractSpinBox::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QAbstractSpinBox::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QAbstractSpinBox::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QAbstractSpinBox::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractSpinBox::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::stepBy(int steps) +{ + QScriptValue _q_function = __qtscript_self.property("stepBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("stepBy") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::stepBy(steps); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, steps)); + } +} + +QAbstractSpinBox::StepEnabled QtScriptShell_QAbstractSpinBox::stepEnabled() const +{ + QScriptValue _q_function = __qtscript_self.property("stepEnabled"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("stepEnabled") & QScriptValue::QObjectMember)) { + return QAbstractSpinBox::stepEnabled(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QAbstractSpinBox::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAbstractSpinBox::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QValidator::State QtScriptShell_QAbstractSpinBox::validate(QString& input, int& pos) const +{ + QScriptValue _q_function = __qtscript_self.property("validate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("validate") & QScriptValue::QObjectMember)) { + return QAbstractSpinBox::validate(input, pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, input) + << qScriptValueFromValue(_q_engine, pos))); + } +} + +void QtScriptShell_QAbstractSpinBox::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QAbstractSpinBox::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractSpinBox.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractSpinBox.h new file mode 100644 index 00000000..71bca792 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAbstractSpinBox.h @@ -0,0 +1,66 @@ +#ifndef QTSCRIPTSHELL_QABSTRACTSPINBOX_H +#define QTSCRIPTSHELL_QABSTRACTSPINBOX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAbstractSpinBox : public QAbstractSpinBox +{ +public: + QtScriptShell_QAbstractSpinBox(QWidget* parent = 0); + ~QtScriptShell_QAbstractSpinBox(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* event); + void childEvent(QChildEvent* event); + void clear(); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fixup(QString& input) const; + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void stepBy(int steps); + QAbstractSpinBox::StepEnabled stepEnabled() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + QValidator::State validate(QString& input, int& pos) const; + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QABSTRACTSPINBOX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAction.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAction.cpp new file mode 100644 index 00000000..fb8c7454 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAction.cpp @@ -0,0 +1,105 @@ +#include "qtscriptshell_QAction.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QAction::QtScriptShell_QAction(QObject* parent) + : QAction(parent) {} + +QtScriptShell_QAction::QtScriptShell_QAction(const QIcon& icon, const QString& text, QObject* parent) + : QAction(icon, text, parent) {} + +QtScriptShell_QAction::QtScriptShell_QAction(const QString& text, QObject* parent) + : QAction(text, parent) {} + +QtScriptShell_QAction::~QtScriptShell_QAction() {} + +void QtScriptShell_QAction::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QAction::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QAction::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QAction::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QAction::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QAction::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QAction::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QAction::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QAction::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QAction::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAction.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAction.h new file mode 100644 index 00000000..ff0f2296 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QAction.h @@ -0,0 +1,26 @@ +#ifndef QTSCRIPTSHELL_QACTION_H +#define QTSCRIPTSHELL_QACTION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QAction : public QAction +{ +public: + QtScriptShell_QAction(QObject* parent); + QtScriptShell_QAction(const QIcon& icon, const QString& text, QObject* parent); + QtScriptShell_QAction(const QString& text, QObject* parent); + ~QtScriptShell_QAction(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* arg__1); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QACTION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QActionGroup.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QActionGroup.cpp new file mode 100644 index 00000000..5efab8b5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QActionGroup.cpp @@ -0,0 +1,94 @@ +#include "qtscriptshell_QActionGroup.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QActionGroup::QtScriptShell_QActionGroup(QObject* parent) + : QActionGroup(parent) {} + +QtScriptShell_QActionGroup::~QtScriptShell_QActionGroup() {} + +void QtScriptShell_QActionGroup::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QActionGroup::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QActionGroup::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QActionGroup::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QActionGroup::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QActionGroup::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QActionGroup::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QActionGroup::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QActionGroup::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QActionGroup::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QActionGroup.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QActionGroup.h new file mode 100644 index 00000000..8e3a7023 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QActionGroup.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QACTIONGROUP_H +#define QTSCRIPTSHELL_QACTIONGROUP_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QActionGroup : public QActionGroup +{ +public: + QtScriptShell_QActionGroup(QObject* parent); + ~QtScriptShell_QActionGroup(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QACTIONGROUP_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QApplication.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QApplication.cpp new file mode 100644 index 00000000..d0afc015 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QApplication.cpp @@ -0,0 +1,124 @@ +#include "qtscriptshell_QApplication.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QApplication::~QtScriptShell_QApplication() {} + +void QtScriptShell_QApplication::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QApplication::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QApplication::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QApplication::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QApplication::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QApplication::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QApplication::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QApplication::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QApplication::notify(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("notify"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("notify") & QScriptValue::QObjectMember)) { + return QApplication::notify(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QApplication::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QApplication::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QApplication.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QApplication.h new file mode 100644 index 00000000..ae5128e1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QApplication.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QAPPLICATION_H +#define QTSCRIPTSHELL_QAPPLICATION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QApplication : public QApplication +{ +public: + QtScriptShell_QApplication(int& argc, char** argv, int arg__3 = ApplicationFlags); + ~QtScriptShell_QApplication(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* arg__1); + bool eventFilter(QObject* watched, QEvent* event); + bool notify(QObject* arg__1, QEvent* arg__2); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QAPPLICATION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QBoxLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QBoxLayout.cpp new file mode 100644 index 00000000..12fc9b8a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QBoxLayout.cpp @@ -0,0 +1,345 @@ +#include "qtscriptshell_QBoxLayout.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QLayoutItem*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QSpacerItem*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QBoxLayout::QtScriptShell_QBoxLayout(QBoxLayout::Direction arg__1, QWidget* parent) + : QBoxLayout(arg__1, parent) {} + +QtScriptShell_QBoxLayout::~QtScriptShell_QBoxLayout() {} + +void QtScriptShell_QBoxLayout::addItem(QLayoutItem* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("addItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("addItem") & QScriptValue::QObjectMember)) { + QBoxLayout::addItem(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QBoxLayout::childEvent(QChildEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QBoxLayout::childEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QSizePolicy::ControlTypes QtScriptShell_QBoxLayout::controlTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("controlTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("controlTypes") & QScriptValue::QObjectMember)) { + return QBoxLayout::controlTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QBoxLayout::count() const +{ + QScriptValue _q_function = __qtscript_self.property("count"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("count") & QScriptValue::QObjectMember)) { + return QBoxLayout::count(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QBoxLayout::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QBoxLayout::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QBoxLayout::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QBoxLayout::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QBoxLayout::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QBoxLayout::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +Qt::Orientations QtScriptShell_QBoxLayout::expandingDirections() const +{ + QScriptValue _q_function = __qtscript_self.property("expandingDirections"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("expandingDirections") & QScriptValue::QObjectMember)) { + return QBoxLayout::expandingDirections(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QBoxLayout::geometry() const +{ + QScriptValue _q_function = __qtscript_self.property("geometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("geometry") & QScriptValue::QObjectMember)) { + return QBoxLayout::geometry(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QBoxLayout::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QBoxLayout::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QBoxLayout::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QBoxLayout::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +int QtScriptShell_QBoxLayout::indexOf(QWidget* arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("indexOf"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexOf") & QScriptValue::QObjectMember)) { + return QBoxLayout::indexOf(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QBoxLayout::invalidate() +{ + QScriptValue _q_function = __qtscript_self.property("invalidate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("invalidate") & QScriptValue::QObjectMember)) { + QBoxLayout::invalidate(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QBoxLayout::isEmpty() const +{ + QScriptValue _q_function = __qtscript_self.property("isEmpty"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isEmpty") & QScriptValue::QObjectMember)) { + return QBoxLayout::isEmpty(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayoutItem* QtScriptShell_QBoxLayout::itemAt(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("itemAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemAt") & QScriptValue::QObjectMember)) { + return QBoxLayout::itemAt(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QLayout* QtScriptShell_QBoxLayout::layout() +{ + QScriptValue _q_function = __qtscript_self.property("layout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("layout") & QScriptValue::QObjectMember)) { + return QBoxLayout::layout(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSize QtScriptShell_QBoxLayout::maximumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("maximumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("maximumSize") & QScriptValue::QObjectMember)) { + return QBoxLayout::maximumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QBoxLayout::minimumHeightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("minimumHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumHeightForWidth") & QScriptValue::QObjectMember)) { + return QBoxLayout::minimumHeightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QBoxLayout::minimumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("minimumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumSize") & QScriptValue::QObjectMember)) { + return QBoxLayout::minimumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QBoxLayout::setGeometry(const QRect& arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + QBoxLayout::setGeometry(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QSize QtScriptShell_QBoxLayout::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + return QBoxLayout::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSpacerItem* QtScriptShell_QBoxLayout::spacerItem() +{ + QScriptValue _q_function = __qtscript_self.property("spacerItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("spacerItem") & QScriptValue::QObjectMember)) { + return QBoxLayout::spacerItem(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayoutItem* QtScriptShell_QBoxLayout::takeAt(int arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("takeAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("takeAt") & QScriptValue::QObjectMember)) { + return QBoxLayout::takeAt(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QBoxLayout::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QBoxLayout::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QWidget* QtScriptShell_QBoxLayout::widget() +{ + QScriptValue _q_function = __qtscript_self.property("widget"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("widget") & QScriptValue::QObjectMember)) { + return QBoxLayout::widget(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QBoxLayout.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QBoxLayout.h new file mode 100644 index 00000000..34b89b3d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QBoxLayout.h @@ -0,0 +1,44 @@ +#ifndef QTSCRIPTSHELL_QBOXLAYOUT_H +#define QTSCRIPTSHELL_QBOXLAYOUT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QBoxLayout : public QBoxLayout +{ +public: + QtScriptShell_QBoxLayout(QBoxLayout::Direction arg__1, QWidget* parent = 0); + ~QtScriptShell_QBoxLayout(); + + void addItem(QLayoutItem* arg__1); + void childEvent(QChildEvent* e); + QSizePolicy::ControlTypes controlTypes() const; + int count() const; + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + Qt::Orientations expandingDirections() const; + QRect geometry() const; + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + int indexOf(QWidget* arg__1) const; + void invalidate(); + bool isEmpty() const; + QLayoutItem* itemAt(int arg__1) const; + QLayout* layout(); + QSize maximumSize() const; + int minimumHeightForWidth(int arg__1) const; + QSize minimumSize() const; + void setGeometry(const QRect& arg__1); + QSize sizeHint() const; + QSpacerItem* spacerItem(); + QLayoutItem* takeAt(int arg__1); + void timerEvent(QTimerEvent* event); + QWidget* widget(); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QBOXLAYOUT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QButtonGroup.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QButtonGroup.cpp new file mode 100644 index 00000000..9f948a7d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QButtonGroup.cpp @@ -0,0 +1,93 @@ +#include "qtscriptshell_QButtonGroup.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QButtonGroup::QtScriptShell_QButtonGroup(QObject* parent) + : QButtonGroup(parent) {} + +QtScriptShell_QButtonGroup::~QtScriptShell_QButtonGroup() {} + +void QtScriptShell_QButtonGroup::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QButtonGroup::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QButtonGroup::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QButtonGroup::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QButtonGroup::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QButtonGroup::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QButtonGroup::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QButtonGroup::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QButtonGroup::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QButtonGroup::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QButtonGroup.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QButtonGroup.h new file mode 100644 index 00000000..703fa06a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QButtonGroup.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QBUTTONGROUP_H +#define QTSCRIPTSHELL_QBUTTONGROUP_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QButtonGroup : public QButtonGroup +{ +public: + QtScriptShell_QButtonGroup(QObject* parent = 0); + ~QtScriptShell_QButtonGroup(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QBUTTONGROUP_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCalendarWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCalendarWidget.cpp new file mode 100644 index 00000000..c2df8619 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCalendarWidget.cpp @@ -0,0 +1,690 @@ +#include "qtscriptshell_QCalendarWidget.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QCalendarWidget::QtScriptShell_QCalendarWidget(QWidget* parent) + : QCalendarWidget(parent) {} + +QtScriptShell_QCalendarWidget::~QtScriptShell_QCalendarWidget() {} + +void QtScriptShell_QCalendarWidget::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QCalendarWidget::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QCalendarWidget::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QCalendarWidget::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QCalendarWidget::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QCalendarWidget::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QCalendarWidget::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QCalendarWidget::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QCalendarWidget::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QCalendarWidget::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QCalendarWidget::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QCalendarWidget::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QCalendarWidget::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QCalendarWidget::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QCalendarWidget::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QCalendarWidget::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QCalendarWidget::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QCalendarWidget::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QCalendarWidget::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QCalendarWidget::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QCalendarWidget::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QCalendarWidget::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QCalendarWidget::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QCalendarWidget::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QCalendarWidget::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QCalendarWidget::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QCalendarWidget::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QCalendarWidget::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QCalendarWidget::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QCalendarWidget::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +void QtScriptShell_QCalendarWidget::paintCell(QPainter* painter, const QRect& rect, const QDate& date) const +{ + QScriptValue _q_function = __qtscript_self.property("paintCell"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintCell") & QScriptValue::QObjectMember)) { + QCalendarWidget::paintCell(painter, rect, date); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, date)); + } +} + +QPaintEngine* QtScriptShell_QCalendarWidget::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QCalendarWidget::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QCalendarWidget::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QCalendarWidget::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QCalendarWidget::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QCalendarWidget::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QCalendarWidget::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QCalendarWidget::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QCalendarWidget::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_QCalendarWidget::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QCalendarWidget::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QCalendarWidget::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCalendarWidget::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QCalendarWidget::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCalendarWidget.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCalendarWidget.h new file mode 100644 index 00000000..8a96a5b9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCalendarWidget.h @@ -0,0 +1,64 @@ +#ifndef QTSCRIPTSHELL_QCALENDARWIDGET_H +#define QTSCRIPTSHELL_QCALENDARWIDGET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QCalendarWidget : public QCalendarWidget +{ +public: + QtScriptShell_QCalendarWidget(QWidget* parent = 0); + ~QtScriptShell_QCalendarWidget(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + void paintCell(QPainter* painter, const QRect& rect, const QDate& date) const; + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QCALENDARWIDGET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCheckBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCheckBox.cpp new file mode 100644 index 00000000..89217146 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCheckBox.cpp @@ -0,0 +1,690 @@ +#include "qtscriptshell_QCheckBox.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QCheckBox::QtScriptShell_QCheckBox(QWidget* parent) + : QCheckBox(parent) {} + +QtScriptShell_QCheckBox::QtScriptShell_QCheckBox(const QString& text, QWidget* parent) + : QCheckBox(text, parent) {} + +QtScriptShell_QCheckBox::~QtScriptShell_QCheckBox() {} + +void QtScriptShell_QCheckBox::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QCheckBox::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCheckBox::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QCheckBox::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QCheckBox::checkStateSet() +{ + QScriptValue _q_function = __qtscript_self.property("checkStateSet"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("checkStateSet") & QScriptValue::QObjectMember)) { + QCheckBox::checkStateSet(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QCheckBox::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QCheckBox::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCheckBox::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QCheckBox::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCheckBox::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QCheckBox::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCheckBox::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QCheckBox::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QCheckBox::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QCheckBox::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QCheckBox::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QCheckBox::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCheckBox::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QCheckBox::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCheckBox::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QCheckBox::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCheckBox::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QCheckBox::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCheckBox::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QCheckBox::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QCheckBox::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QCheckBox::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QCheckBox::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QCheckBox::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QCheckBox::focusInEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QCheckBox::focusInEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QCheckBox::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QCheckBox::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QCheckBox::focusOutEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QCheckBox::focusOutEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QCheckBox::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QCheckBox::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QCheckBox::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QCheckBox::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QCheckBox::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QCheckBox::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QCheckBox::hitButton(const QPoint& pos) const +{ + QScriptValue _q_function = __qtscript_self.property("hitButton"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hitButton") & QScriptValue::QObjectMember)) { + return QCheckBox::hitButton(pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pos))); + } +} + +void QtScriptShell_QCheckBox::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QCheckBox::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QCheckBox::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QCheckBox::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QCheckBox::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QCheckBox::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QCheckBox::keyPressEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QCheckBox::keyPressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QCheckBox::keyReleaseEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QCheckBox::keyReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QCheckBox::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QCheckBox::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QCheckBox::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QCheckBox::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QCheckBox::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QCheckBox::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCheckBox::mouseMoveEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QCheckBox::mouseMoveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QCheckBox::mousePressEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QCheckBox::mousePressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QCheckBox::mouseReleaseEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QCheckBox::mouseReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QCheckBox::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QCheckBox::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QCheckBox::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QCheckBox::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +void QtScriptShell_QCheckBox::nextCheckState() +{ + QScriptValue _q_function = __qtscript_self.property("nextCheckState"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nextCheckState") & QScriptValue::QObjectMember)) { + QCheckBox::nextCheckState(); + } else { + _q_function.call(__qtscript_self); + } +} + +QPaintEngine* QtScriptShell_QCheckBox::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QCheckBox::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QCheckBox::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QCheckBox::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QCheckBox::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QCheckBox::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QCheckBox::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QCheckBox::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QCheckBox::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QCheckBox::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QCheckBox::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QCheckBox::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCheckBox::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QCheckBox::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCheckBox::timerEvent(QTimerEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QCheckBox::timerEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QCheckBox::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QCheckBox::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCheckBox.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCheckBox.h new file mode 100644 index 00000000..f1f51e5e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCheckBox.h @@ -0,0 +1,65 @@ +#ifndef QTSCRIPTSHELL_QCHECKBOX_H +#define QTSCRIPTSHELL_QCHECKBOX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QCheckBox : public QCheckBox +{ +public: + QtScriptShell_QCheckBox(QWidget* parent = 0); + QtScriptShell_QCheckBox(const QString& text, QWidget* parent = 0); + ~QtScriptShell_QCheckBox(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* e); + void checkStateSet(); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* e); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* e); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + bool hitButton(const QPoint& pos) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* e); + void keyReleaseEvent(QKeyEvent* e); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* arg__1); + void mousePressEvent(QMouseEvent* e); + void mouseReleaseEvent(QMouseEvent* e); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + void nextCheckState(); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* e); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QCHECKBOX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QColorDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QColorDialog.cpp new file mode 100644 index 00000000..77ec4fb6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QColorDialog.cpp @@ -0,0 +1,700 @@ +#include "qtscriptshell_QColorDialog.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QColorDialog::QtScriptShell_QColorDialog(QWidget* parent) + : QColorDialog(parent) {} + +QtScriptShell_QColorDialog::QtScriptShell_QColorDialog(const QColor& initial, QWidget* parent) + : QColorDialog(initial, parent) {} + +QtScriptShell_QColorDialog::~QtScriptShell_QColorDialog() {} + +void QtScriptShell_QColorDialog::accept() +{ + QScriptValue _q_function = __qtscript_self.property("accept"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("accept") & QScriptValue::QObjectMember)) { + QColorDialog::accept(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QColorDialog::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QColorDialog::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColorDialog::changeEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QColorDialog::changeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColorDialog::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QColorDialog::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColorDialog::closeEvent(QCloseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QColorDialog::closeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QColorDialog::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QColorDialog::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QColorDialog::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QColorDialog::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QColorDialog::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QColorDialog::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QColorDialog::done(int result) +{ + QScriptValue _q_function = __qtscript_self.property("done"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("done") & QScriptValue::QObjectMember)) { + QColorDialog::done(result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, result)); + } +} + +void QtScriptShell_QColorDialog::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QColorDialog::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColorDialog::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QColorDialog::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColorDialog::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QColorDialog::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColorDialog::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QColorDialog::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColorDialog::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QColorDialog::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QColorDialog::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QColorDialog::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QColorDialog::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QColorDialog::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +int QtScriptShell_QColorDialog::exec() +{ + QScriptValue _q_function = __qtscript_self.property("exec"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("exec") & QScriptValue::QObjectMember)) { + return QColorDialog::exec(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QColorDialog::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QColorDialog::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QColorDialog::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QColorDialog::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QColorDialog::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QColorDialog::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QColorDialog::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QColorDialog::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QColorDialog::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QColorDialog::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QColorDialog::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QColorDialog::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColorDialog::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QColorDialog::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QColorDialog::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QColorDialog::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QColorDialog::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QColorDialog::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QColorDialog::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QColorDialog::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QColorDialog::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QColorDialog::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColorDialog::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QColorDialog::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QColorDialog::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QColorDialog::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QColorDialog::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QColorDialog::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColorDialog::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QColorDialog::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColorDialog::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QColorDialog::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColorDialog::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QColorDialog::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColorDialog::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QColorDialog::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QColorDialog::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QColorDialog::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QColorDialog::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QColorDialog::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QColorDialog::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QColorDialog::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QColorDialog::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QColorDialog::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QColorDialog::reject() +{ + QScriptValue _q_function = __qtscript_self.property("reject"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reject") & QScriptValue::QObjectMember)) { + QColorDialog::reject(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QColorDialog::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QColorDialog::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPainter* QtScriptShell_QColorDialog::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QColorDialog::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QColorDialog::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QColorDialog::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QColorDialog::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QColorDialog::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColorDialog::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QColorDialog::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColorDialog::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QColorDialog::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QColorDialog.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QColorDialog.h new file mode 100644 index 00000000..b05d9193 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QColorDialog.h @@ -0,0 +1,66 @@ +#ifndef QTSCRIPTSHELL_QCOLORDIALOG_H +#define QTSCRIPTSHELL_QCOLORDIALOG_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QColorDialog : public QColorDialog +{ +public: + QtScriptShell_QColorDialog(QWidget* parent = 0); + QtScriptShell_QColorDialog(const QColor& initial, QWidget* parent = 0); + ~QtScriptShell_QColorDialog(); + + void accept(); + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* event); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* arg__1); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void done(int result); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + int exec(); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void reject(); + void resizeEvent(QResizeEvent* arg__1); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QCOLORDIALOG_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QColumnView.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QColumnView.cpp new file mode 100644 index 00000000..21a0d7a3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QColumnView.cpp @@ -0,0 +1,1238 @@ +#include "qtscriptshell_QColumnView.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QAbstractItemView*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::EditTrigger) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::ScrollHint) +Q_DECLARE_METATYPE(const QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAbstractItemModel*) +Q_DECLARE_METATYPE(QItemSelectionModel*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QStyleOptionViewItem) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QColumnView::QtScriptShell_QColumnView(QWidget* parent) + : QColumnView(parent) {} + +QtScriptShell_QColumnView::~QtScriptShell_QColumnView() {} + +void QtScriptShell_QColumnView::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QColumnView::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColumnView::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QColumnView::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QColumnView::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QColumnView::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColumnView::closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("closeEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEditor") & QScriptValue::QObjectMember)) { + QColumnView::closeEditor(editor, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QColumnView::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QColumnView::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColumnView::commitData(QWidget* editor) +{ + QScriptValue _q_function = __qtscript_self.property("commitData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("commitData") & QScriptValue::QObjectMember)) { + QColumnView::commitData(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QColumnView::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QColumnView::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QAbstractItemView* QtScriptShell_QColumnView::createColumn(const QModelIndex& rootIndex) +{ + QScriptValue _q_function = __qtscript_self.property("createColumn"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createColumn") & QScriptValue::QObjectMember)) { + return QColumnView::createColumn(rootIndex); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rootIndex))); + } +} + +void QtScriptShell_QColumnView::currentChanged(const QModelIndex& current, const QModelIndex& previous) +{ + QScriptValue _q_function = __qtscript_self.property("currentChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("currentChanged") & QScriptValue::QObjectMember)) { + QColumnView::currentChanged(current, previous); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, current) + << qScriptValueFromValue(_q_engine, previous)); + } +} + +void QtScriptShell_QColumnView::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QColumnView::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColumnView::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) +{ + QScriptValue _q_function = __qtscript_self.property("dataChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dataChanged") & QScriptValue::QObjectMember)) { + QColumnView::dataChanged(topLeft, bottomRight, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, topLeft) + << qScriptValueFromValue(_q_engine, bottomRight) + << qScriptValueFromValue(_q_engine, roles)); + } +} + +int QtScriptShell_QColumnView::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QColumnView::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QColumnView::doItemsLayout() +{ + QScriptValue _q_function = __qtscript_self.property("doItemsLayout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("doItemsLayout") & QScriptValue::QObjectMember)) { + QColumnView::doItemsLayout(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QColumnView::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QColumnView::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColumnView::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QColumnView::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColumnView::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QColumnView::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColumnView::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QColumnView::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QColumnView::edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("edit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("edit") & QScriptValue::QObjectMember)) { + return QColumnView::edit(index, trigger, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, trigger) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QColumnView::editorDestroyed(QObject* editor) +{ + QScriptValue _q_function = __qtscript_self.property("editorDestroyed"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("editorDestroyed") & QScriptValue::QObjectMember)) { + QColumnView::editorDestroyed(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QColumnView::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QColumnView::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QColumnView::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QColumnView::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QColumnView::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QColumnView::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QColumnView::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QColumnView::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QColumnView::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QColumnView::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QColumnView::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QColumnView::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QColumnView::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QColumnView::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QColumnView::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QColumnView::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QColumnView::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QColumnView::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QColumnView::horizontalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("horizontalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalOffset") & QScriptValue::QObjectMember)) { + return QColumnView::horizontalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QColumnView::horizontalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarAction") & QScriptValue::QObjectMember)) { + QColumnView::horizontalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QColumnView::horizontalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QColumnView::horizontalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QModelIndex QtScriptShell_QColumnView::indexAt(const QPoint& point) const +{ + QScriptValue _q_function = __qtscript_self.property("indexAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexAt") & QScriptValue::QObjectMember)) { + return QColumnView::indexAt(point); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, point))); + } +} + +void QtScriptShell_QColumnView::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QColumnView::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QColumnView::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QColumnView::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QColumnView::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QColumnView::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QColumnView::isIndexHidden(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("isIndexHidden"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isIndexHidden") & QScriptValue::QObjectMember)) { + return QColumnView::isIndexHidden(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QColumnView::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QColumnView::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColumnView::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QColumnView::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColumnView::keyboardSearch(const QString& search) +{ + QScriptValue _q_function = __qtscript_self.property("keyboardSearch"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyboardSearch") & QScriptValue::QObjectMember)) { + QColumnView::keyboardSearch(search); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, search)); + } +} + +void QtScriptShell_QColumnView::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QColumnView::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QColumnView::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QColumnView::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QColumnView::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QColumnView::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColumnView::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QColumnView::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColumnView::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QColumnView::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColumnView::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QColumnView::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColumnView::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QColumnView::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QColumnView::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QColumnView::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QColumnView::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QColumnView::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QColumnView::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QColumnView::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QColumnView::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QColumnView::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QColumnView::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + QColumnView::reset(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QColumnView::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QColumnView::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColumnView::rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsAboutToBeRemoved"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsAboutToBeRemoved") & QScriptValue::QObjectMember)) { + QColumnView::rowsAboutToBeRemoved(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QColumnView::rowsInserted(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsInserted"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsInserted") & QScriptValue::QObjectMember)) { + QColumnView::rowsInserted(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QColumnView::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QColumnView::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QColumnView::scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("scrollTo"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollTo") & QScriptValue::QObjectMember)) { + QColumnView::scrollTo(index, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QColumnView::selectAll() +{ + QScriptValue _q_function = __qtscript_self.property("selectAll"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectAll") & QScriptValue::QObjectMember)) { + QColumnView::selectAll(); + } else { + _q_function.call(__qtscript_self); + } +} + +QList QtScriptShell_QColumnView::selectedIndexes() const +{ + QScriptValue _q_function = __qtscript_self.property("selectedIndexes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectedIndexes") & QScriptValue::QObjectMember)) { + return QColumnView::selectedIndexes(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QColumnView::selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) +{ + QScriptValue _q_function = __qtscript_self.property("selectionChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionChanged") & QScriptValue::QObjectMember)) { + QColumnView::selectionChanged(selected, deselected); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selected) + << qScriptValueFromValue(_q_engine, deselected)); + } +} + +QItemSelectionModel::SelectionFlags QtScriptShell_QColumnView::selectionCommand(const QModelIndex& index, const QEvent* event) const +{ + QScriptValue _q_function = __qtscript_self.property("selectionCommand"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionCommand") & QScriptValue::QObjectMember)) { + return QColumnView::selectionCommand(index, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, const_cast(event)))); + } +} + +void QtScriptShell_QColumnView::setModel(QAbstractItemModel* model) +{ + QScriptValue _q_function = __qtscript_self.property("setModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setModel") & QScriptValue::QObjectMember)) { + QColumnView::setModel(model); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, model)); + } +} + +void QtScriptShell_QColumnView::setRootIndex(const QModelIndex& index) +{ + QScriptValue _q_function = __qtscript_self.property("setRootIndex"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setRootIndex") & QScriptValue::QObjectMember)) { + QColumnView::setRootIndex(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QColumnView::setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) +{ + QScriptValue _q_function = __qtscript_self.property("setSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelection") & QScriptValue::QObjectMember)) { + QColumnView::setSelection(rect, command); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, command)); + } +} + +void QtScriptShell_QColumnView::setSelectionModel(QItemSelectionModel* selectionModel) +{ + QScriptValue _q_function = __qtscript_self.property("setSelectionModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelectionModel") & QScriptValue::QObjectMember)) { + QColumnView::setSelectionModel(selectionModel); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selectionModel)); + } +} + +void QtScriptShell_QColumnView::setupViewport(QWidget* viewport) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QColumnView::setupViewport(viewport); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, viewport)); + } +} + +QPainter* QtScriptShell_QColumnView::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QColumnView::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QColumnView::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QColumnView::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QColumnView::sizeHintForColumn(int column) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForColumn"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForColumn") & QScriptValue::QObjectMember)) { + return QColumnView::sizeHintForColumn(column); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column))); + } +} + +int QtScriptShell_QColumnView::sizeHintForRow(int row) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForRow"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForRow") & QScriptValue::QObjectMember)) { + return QColumnView::sizeHintForRow(row); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row))); + } +} + +void QtScriptShell_QColumnView::startDrag(Qt::DropActions supportedActions) +{ + QScriptValue _q_function = __qtscript_self.property("startDrag"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startDrag") & QScriptValue::QObjectMember)) { + QColumnView::startDrag(supportedActions); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, supportedActions)); + } +} + +void QtScriptShell_QColumnView::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QColumnView::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColumnView::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QColumnView::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QColumnView::updateEditorData() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorData") & QScriptValue::QObjectMember)) { + QColumnView::updateEditorData(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QColumnView::updateEditorGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorGeometries") & QScriptValue::QObjectMember)) { + QColumnView::updateEditorGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QColumnView::updateGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometries") & QScriptValue::QObjectMember)) { + QColumnView::updateGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +int QtScriptShell_QColumnView::verticalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("verticalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalOffset") & QScriptValue::QObjectMember)) { + return QColumnView::verticalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QColumnView::verticalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarAction") & QScriptValue::QObjectMember)) { + QColumnView::verticalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QColumnView::verticalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QColumnView::verticalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QStyleOptionViewItem QtScriptShell_QColumnView::viewOptions() const +{ + QScriptValue _q_function = __qtscript_self.property("viewOptions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewOptions") & QScriptValue::QObjectMember)) { + return QColumnView::viewOptions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QColumnView::viewportEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QColumnView::viewportEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +QSize QtScriptShell_QColumnView::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QColumnView::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QColumnView::visualRect(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRect") & QScriptValue::QObjectMember)) { + return QColumnView::visualRect(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QRegion QtScriptShell_QColumnView::visualRegionForSelection(const QItemSelection& selection) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRegionForSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRegionForSelection") & QScriptValue::QObjectMember)) { + return QColumnView::visualRegionForSelection(selection); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selection))); + } +} + +void QtScriptShell_QColumnView::wheelEvent(QWheelEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QColumnView::wheelEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QColumnView.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QColumnView.h new file mode 100644 index 00000000..97c94dec --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QColumnView.h @@ -0,0 +1,103 @@ +#ifndef QTSCRIPTSHELL_QCOLUMNVIEW_H +#define QTSCRIPTSHELL_QCOLUMNVIEW_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QColumnView : public QColumnView +{ +public: + QtScriptShell_QColumnView(QWidget* parent = 0); + ~QtScriptShell_QColumnView(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint); + void closeEvent(QCloseEvent* event); + void commitData(QWidget* editor); + void contextMenuEvent(QContextMenuEvent* arg__1); + QAbstractItemView* createColumn(const QModelIndex& rootIndex); + void currentChanged(const QModelIndex& current, const QModelIndex& previous); + void customEvent(QEvent* event); + void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles); + int devType() const; + void doItemsLayout(); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event); + void editorDestroyed(QObject* editor); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + int horizontalOffset() const; + void horizontalScrollbarAction(int action); + void horizontalScrollbarValueChanged(int value); + QModelIndex indexAt(const QPoint& point) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isIndexHidden(const QModelIndex& index) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void keyboardSearch(const QString& search); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void reset(); + void resizeEvent(QResizeEvent* event); + void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end); + void rowsInserted(const QModelIndex& parent, int start, int end); + void scrollContentsBy(int dx, int dy); + void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint = QAbstractItemView::EnsureVisible); + void selectAll(); + QList selectedIndexes() const; + void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected); + QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const; + void setModel(QAbstractItemModel* model); + void setRootIndex(const QModelIndex& index); + void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command); + void setSelectionModel(QItemSelectionModel* selectionModel); + void setupViewport(QWidget* viewport); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + int sizeHintForColumn(int column) const; + int sizeHintForRow(int row) const; + void startDrag(Qt::DropActions supportedActions); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void updateEditorData(); + void updateEditorGeometries(); + void updateGeometries(); + int verticalOffset() const; + void verticalScrollbarAction(int action); + void verticalScrollbarValueChanged(int value); + QStyleOptionViewItem viewOptions() const; + bool viewportEvent(QEvent* event); + QSize viewportSizeHint() const; + QRect visualRect(const QModelIndex& index) const; + QRegion visualRegionForSelection(const QItemSelection& selection) const; + void wheelEvent(QWheelEvent* arg__1); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QCOLUMNVIEW_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QComboBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QComboBox.cpp new file mode 100644 index 00000000..2074cee7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QComboBox.cpp @@ -0,0 +1,679 @@ +#include "qtscriptshell_QComboBox.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QComboBox::QtScriptShell_QComboBox(QWidget* parent) + : QComboBox(parent) {} + +QtScriptShell_QComboBox::~QtScriptShell_QComboBox() {} + +void QtScriptShell_QComboBox::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QComboBox::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QComboBox::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QComboBox::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QComboBox::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QComboBox::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QComboBox::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QComboBox::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QComboBox::contextMenuEvent(QContextMenuEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QComboBox::contextMenuEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QComboBox::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QComboBox::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QComboBox::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QComboBox::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QComboBox::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QComboBox::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QComboBox::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QComboBox::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QComboBox::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QComboBox::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QComboBox::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QComboBox::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QComboBox::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QComboBox::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QComboBox::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QComboBox::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QComboBox::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QComboBox::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QComboBox::focusInEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QComboBox::focusInEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QComboBox::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QComboBox::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QComboBox::focusOutEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QComboBox::focusOutEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QComboBox::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QComboBox::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QComboBox::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QComboBox::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QComboBox::hideEvent(QHideEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QComboBox::hideEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QComboBox::hidePopup() +{ + QScriptValue _q_function = __qtscript_self.property("hidePopup"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hidePopup") & QScriptValue::QObjectMember)) { + QComboBox::hidePopup(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QComboBox::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QComboBox::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QComboBox::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QComboBox::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QComboBox::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QComboBox::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QComboBox::keyPressEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QComboBox::keyPressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QComboBox::keyReleaseEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QComboBox::keyReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QComboBox::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QComboBox::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QComboBox::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QComboBox::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QComboBox::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QComboBox::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QComboBox::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QComboBox::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QComboBox::mousePressEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QComboBox::mousePressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QComboBox::mouseReleaseEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QComboBox::mouseReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QComboBox::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QComboBox::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QComboBox::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QComboBox::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QComboBox::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QComboBox::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QComboBox::paintEvent(QPaintEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QComboBox::paintEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QPaintDevice* QtScriptShell_QComboBox::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QComboBox::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QComboBox::resizeEvent(QResizeEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QComboBox::resizeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QPainter* QtScriptShell_QComboBox::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QComboBox::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QComboBox::showEvent(QShowEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QComboBox::showEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QComboBox::showPopup() +{ + QScriptValue _q_function = __qtscript_self.property("showPopup"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showPopup") & QScriptValue::QObjectMember)) { + QComboBox::showPopup(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QComboBox::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QComboBox::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QComboBox::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QComboBox::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QComboBox::wheelEvent(QWheelEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QComboBox::wheelEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QComboBox.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QComboBox.h new file mode 100644 index 00000000..cfc106c4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QComboBox.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_QCOMBOBOX_H +#define QTSCRIPTSHELL_QCOMBOBOX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QComboBox : public QComboBox +{ +public: + QtScriptShell_QComboBox(QWidget* parent = 0); + ~QtScriptShell_QComboBox(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* e); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* e); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* e); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* e); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* e); + void hidePopup(); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* e); + void keyReleaseEvent(QKeyEvent* e); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* e); + void mouseReleaseEvent(QMouseEvent* e); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* e); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* e); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* e); + void showPopup(); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* e); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QCOMBOBOX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCommandLinkButton.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCommandLinkButton.cpp new file mode 100644 index 00000000..95d3170c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCommandLinkButton.cpp @@ -0,0 +1,694 @@ +#include "qtscriptshell_QCommandLinkButton.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QCommandLinkButton::QtScriptShell_QCommandLinkButton(QWidget* parent) + : QCommandLinkButton(parent) {} + +QtScriptShell_QCommandLinkButton::QtScriptShell_QCommandLinkButton(const QString& text, QWidget* parent) + : QCommandLinkButton(text, parent) {} + +QtScriptShell_QCommandLinkButton::QtScriptShell_QCommandLinkButton(const QString& text, const QString& description, QWidget* parent) + : QCommandLinkButton(text, description, parent) {} + +QtScriptShell_QCommandLinkButton::~QtScriptShell_QCommandLinkButton() {} + +void QtScriptShell_QCommandLinkButton::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCommandLinkButton::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QCommandLinkButton::checkStateSet() +{ + QScriptValue _q_function = __qtscript_self.property("checkStateSet"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("checkStateSet") & QScriptValue::QObjectMember)) { + QCommandLinkButton::checkStateSet(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QCommandLinkButton::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCommandLinkButton::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCommandLinkButton::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCommandLinkButton::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QCommandLinkButton::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QCommandLinkButton::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QCommandLinkButton::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCommandLinkButton::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCommandLinkButton::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCommandLinkButton::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCommandLinkButton::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QCommandLinkButton::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QCommandLinkButton::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QCommandLinkButton::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QCommandLinkButton::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QCommandLinkButton::focusInEvent(QFocusEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::focusInEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +bool QtScriptShell_QCommandLinkButton::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QCommandLinkButton::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QCommandLinkButton::focusOutEvent(QFocusEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::focusOutEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +bool QtScriptShell_QCommandLinkButton::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QCommandLinkButton::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QCommandLinkButton::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QCommandLinkButton::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QCommandLinkButton::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QCommandLinkButton::hitButton(const QPoint& pos) const +{ + QScriptValue _q_function = __qtscript_self.property("hitButton"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hitButton") & QScriptValue::QObjectMember)) { + return QCommandLinkButton::hitButton(pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pos))); + } +} + +void QtScriptShell_QCommandLinkButton::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QCommandLinkButton::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QCommandLinkButton::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QCommandLinkButton::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QCommandLinkButton::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QCommandLinkButton::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QCommandLinkButton::keyReleaseEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::keyReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QCommandLinkButton::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QCommandLinkButton::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QCommandLinkButton::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QCommandLinkButton::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCommandLinkButton::mouseMoveEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::mouseMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QCommandLinkButton::mousePressEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::mousePressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QCommandLinkButton::mouseReleaseEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::mouseReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QCommandLinkButton::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QCommandLinkButton::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QCommandLinkButton::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +void QtScriptShell_QCommandLinkButton::nextCheckState() +{ + QScriptValue _q_function = __qtscript_self.property("nextCheckState"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nextCheckState") & QScriptValue::QObjectMember)) { + QCommandLinkButton::nextCheckState(); + } else { + _q_function.call(__qtscript_self); + } +} + +QPaintEngine* QtScriptShell_QCommandLinkButton::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QCommandLinkButton::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QCommandLinkButton::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QCommandLinkButton::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QCommandLinkButton::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QCommandLinkButton::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QCommandLinkButton::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QCommandLinkButton::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QCommandLinkButton::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCommandLinkButton::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCommandLinkButton::timerEvent(QTimerEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::timerEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QCommandLinkButton::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QCommandLinkButton::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCommandLinkButton.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCommandLinkButton.h new file mode 100644 index 00000000..fdff2c15 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCommandLinkButton.h @@ -0,0 +1,66 @@ +#ifndef QTSCRIPTSHELL_QCOMMANDLINKBUTTON_H +#define QTSCRIPTSHELL_QCOMMANDLINKBUTTON_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QCommandLinkButton : public QCommandLinkButton +{ +public: + QtScriptShell_QCommandLinkButton(QWidget* parent = 0); + QtScriptShell_QCommandLinkButton(const QString& text, QWidget* parent = 0); + QtScriptShell_QCommandLinkButton(const QString& text, const QString& description, QWidget* parent = 0); + ~QtScriptShell_QCommandLinkButton(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* e); + void checkStateSet(); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* arg__1); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* arg__1); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + bool hitButton(const QPoint& pos) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* e); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* e); + void mousePressEvent(QMouseEvent* e); + void mouseReleaseEvent(QMouseEvent* e); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + void nextCheckState(); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* e); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QCOMMANDLINKBUTTON_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCommonStyle.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCommonStyle.cpp new file mode 100644 index 00000000..8da73b60 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCommonStyle.cpp @@ -0,0 +1,474 @@ +#include "qtscriptshell_QCommonStyle.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QStyle::ComplexControl) +Q_DECLARE_METATYPE(const QStyleOptionComplex*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QWidget*) +Q_DECLARE_METATYPE(QStyle::ControlElement) +Q_DECLARE_METATYPE(const QStyleOption*) +Q_DECLARE_METATYPE(QPalette::ColorRole) +Q_DECLARE_METATYPE(QStyle::PrimitiveElement) +Q_DECLARE_METATYPE(QIcon::Mode) +Q_DECLARE_METATYPE(QStyle::SubControl) +Q_DECLARE_METATYPE(QSizePolicy::ControlType) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(QStyle::PixelMetric) +Q_DECLARE_METATYPE(QApplication*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QStyle::ContentsType) +Q_DECLARE_METATYPE(QStyle::StandardPixmap) +Q_DECLARE_METATYPE(QStyle::StyleHint) +Q_DECLARE_METATYPE(QStyleHintReturn*) +Q_DECLARE_METATYPE(QStyle::SubElement) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QCommonStyle::QtScriptShell_QCommonStyle() + : QCommonStyle() {} + +QtScriptShell_QCommonStyle::~QtScriptShell_QCommonStyle() {} + +void QtScriptShell_QCommonStyle::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QCommonStyle::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCommonStyle::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QCommonStyle::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCommonStyle::drawComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QPainter* p, const QWidget* w) const +{ + QScriptValue _q_function = __qtscript_self.property("drawComplexControl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawComplexControl") & QScriptValue::QObjectMember)) { + QCommonStyle::drawComplexControl(cc, opt, p, w); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, cc) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, p) + << qScriptValueFromValue(_q_engine, const_cast(w))); + } +} + +void QtScriptShell_QCommonStyle::drawControl(QStyle::ControlElement element, const QStyleOption* opt, QPainter* p, const QWidget* w) const +{ + QScriptValue _q_function = __qtscript_self.property("drawControl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawControl") & QScriptValue::QObjectMember)) { + QCommonStyle::drawControl(element, opt, p, w); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, element) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, p) + << qScriptValueFromValue(_q_engine, const_cast(w))); + } +} + +void QtScriptShell_QCommonStyle::drawItemPixmap(QPainter* painter, const QRect& rect, int alignment, const QPixmap& pixmap) const +{ + QScriptValue _q_function = __qtscript_self.property("drawItemPixmap"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawItemPixmap") & QScriptValue::QObjectMember)) { + QCommonStyle::drawItemPixmap(painter, rect, alignment, pixmap); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, alignment) + << qScriptValueFromValue(_q_engine, pixmap)); + } +} + +void QtScriptShell_QCommonStyle::drawItemText(QPainter* painter, const QRect& rect, int flags, const QPalette& pal, bool enabled, const QString& text, QPalette::ColorRole textRole) const +{ + QScriptValue _q_function = __qtscript_self.property("drawItemText"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawItemText") & QScriptValue::QObjectMember)) { + QCommonStyle::drawItemText(painter, rect, flags, pal, enabled, text, textRole); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, flags) + << qScriptValueFromValue(_q_engine, pal) + << qScriptValueFromValue(_q_engine, enabled) + << qScriptValueFromValue(_q_engine, text) + << qScriptValueFromValue(_q_engine, textRole)); + } +} + +void QtScriptShell_QCommonStyle::drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOption* opt, QPainter* p, const QWidget* w) const +{ + QScriptValue _q_function = __qtscript_self.property("drawPrimitive"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawPrimitive") & QScriptValue::QObjectMember)) { + QCommonStyle::drawPrimitive(pe, opt, p, w); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pe) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, p) + << qScriptValueFromValue(_q_engine, const_cast(w))); + } +} + +bool QtScriptShell_QCommonStyle::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QCommonStyle::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QCommonStyle::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QCommonStyle::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QPixmap QtScriptShell_QCommonStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap& pixmap, const QStyleOption* opt) const +{ + QScriptValue _q_function = __qtscript_self.property("generatedIconPixmap"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("generatedIconPixmap") & QScriptValue::QObjectMember)) { + return QCommonStyle::generatedIconPixmap(iconMode, pixmap, opt); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, iconMode) + << qScriptValueFromValue(_q_engine, pixmap) + << qScriptValueFromValue(_q_engine, const_cast(opt)))); + } +} + +QStyle::SubControl QtScriptShell_QCommonStyle::hitTestComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, const QPoint& pt, const QWidget* w) const +{ + QScriptValue _q_function = __qtscript_self.property("hitTestComplexControl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hitTestComplexControl") & QScriptValue::QObjectMember)) { + return QCommonStyle::hitTestComplexControl(cc, opt, pt, w); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, cc) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, pt) + << qScriptValueFromValue(_q_engine, const_cast(w)))); + } +} + +QRect QtScriptShell_QCommonStyle::itemPixmapRect(const QRect& r, int flags, const QPixmap& pixmap) const +{ + QScriptValue _q_function = __qtscript_self.property("itemPixmapRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemPixmapRect") & QScriptValue::QObjectMember)) { + return QCommonStyle::itemPixmapRect(r, flags, pixmap); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, r) + << qScriptValueFromValue(_q_engine, flags) + << qScriptValueFromValue(_q_engine, pixmap))); + } +} + +int QtScriptShell_QCommonStyle::layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption* option, const QWidget* widget) const +{ + QScriptValue _q_function = __qtscript_self.property("layoutSpacing"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("layoutSpacing") & QScriptValue::QObjectMember)) { + return QCommonStyle::layoutSpacing(control1, control2, orientation, option, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, control1) + << qScriptValueFromValue(_q_engine, control2) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, const_cast(widget)))); + } +} + +int QtScriptShell_QCommonStyle::pixelMetric(QStyle::PixelMetric m, const QStyleOption* opt, const QWidget* widget) const +{ + QScriptValue _q_function = __qtscript_self.property("pixelMetric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("pixelMetric") & QScriptValue::QObjectMember)) { + return QCommonStyle::pixelMetric(m, opt, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, m) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, const_cast(widget)))); + } +} + +void QtScriptShell_QCommonStyle::polish(QApplication* app) +{ + QScriptValue _q_function = __qtscript_self.property("polish"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("polish") & QScriptValue::QObjectMember)) { + QCommonStyle::polish(app); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, app)); + } +} + +void QtScriptShell_QCommonStyle::polish(QPalette& arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("polish"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("polish") & QScriptValue::QObjectMember)) { + QCommonStyle::polish(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QCommonStyle::polish(QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("polish"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("polish") & QScriptValue::QObjectMember)) { + QCommonStyle::polish(widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, widget)); + } +} + +QSize QtScriptShell_QCommonStyle::sizeFromContents(QStyle::ContentsType ct, const QStyleOption* opt, const QSize& contentsSize, const QWidget* widget) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeFromContents"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeFromContents") & QScriptValue::QObjectMember)) { + return QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ct) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, contentsSize) + << qScriptValueFromValue(_q_engine, const_cast(widget)))); + } +} + +QIcon QtScriptShell_QCommonStyle::standardIcon(QStyle::StandardPixmap standardIcon, const QStyleOption* opt, const QWidget* widget) const +{ + QScriptValue _q_function = __qtscript_self.property("standardIcon"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("standardIcon") & QScriptValue::QObjectMember)) { + return QCommonStyle::standardIcon(standardIcon, opt, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, standardIcon) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, const_cast(widget)))); + } +} + +QPalette QtScriptShell_QCommonStyle::standardPalette() const +{ + QScriptValue _q_function = __qtscript_self.property("standardPalette"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("standardPalette") & QScriptValue::QObjectMember)) { + return QCommonStyle::standardPalette(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QPixmap QtScriptShell_QCommonStyle::standardPixmap(QStyle::StandardPixmap standardPixmap, const QStyleOption* opt, const QWidget* widget) const +{ + QScriptValue _q_function = __qtscript_self.property("standardPixmap"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("standardPixmap") & QScriptValue::QObjectMember)) { + qFatal("QCommonStyle::standardPixmap() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, standardPixmap) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, const_cast(widget)))); + } +} + +int QtScriptShell_QCommonStyle::styleHint(QStyle::StyleHint sh, const QStyleOption* opt, const QWidget* w, QStyleHintReturn* shret) const +{ + QScriptValue _q_function = __qtscript_self.property("styleHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("styleHint") & QScriptValue::QObjectMember)) { + return QCommonStyle::styleHint(sh, opt, w, shret); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sh) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, const_cast(w)) + << qScriptValueFromValue(_q_engine, shret))); + } +} + +QRect QtScriptShell_QCommonStyle::subControlRect(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QStyle::SubControl sc, const QWidget* w) const +{ + QScriptValue _q_function = __qtscript_self.property("subControlRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("subControlRect") & QScriptValue::QObjectMember)) { + return QCommonStyle::subControlRect(cc, opt, sc, w); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, cc) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, sc) + << qScriptValueFromValue(_q_engine, const_cast(w)))); + } +} + +QRect QtScriptShell_QCommonStyle::subElementRect(QStyle::SubElement r, const QStyleOption* opt, const QWidget* widget) const +{ + QScriptValue _q_function = __qtscript_self.property("subElementRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("subElementRect") & QScriptValue::QObjectMember)) { + return QCommonStyle::subElementRect(r, opt, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, r) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, const_cast(widget)))); + } +} + +void QtScriptShell_QCommonStyle::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QCommonStyle::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCommonStyle::unpolish(QApplication* application) +{ + QScriptValue _q_function = __qtscript_self.property("unpolish"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("unpolish") & QScriptValue::QObjectMember)) { + QCommonStyle::unpolish(application); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, application)); + } +} + +void QtScriptShell_QCommonStyle::unpolish(QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("unpolish"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("unpolish") & QScriptValue::QObjectMember)) { + QCommonStyle::unpolish(widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, widget)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCommonStyle.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCommonStyle.h new file mode 100644 index 00000000..382e0cb7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCommonStyle.h @@ -0,0 +1,46 @@ +#ifndef QTSCRIPTSHELL_QCOMMONSTYLE_H +#define QTSCRIPTSHELL_QCOMMONSTYLE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QCommonStyle : public QCommonStyle +{ +public: + QtScriptShell_QCommonStyle(); + ~QtScriptShell_QCommonStyle(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + void drawComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QPainter* p, const QWidget* w = 0) const; + void drawControl(QStyle::ControlElement element, const QStyleOption* opt, QPainter* p, const QWidget* w = 0) const; + void drawItemPixmap(QPainter* painter, const QRect& rect, int alignment, const QPixmap& pixmap) const; + void drawItemText(QPainter* painter, const QRect& rect, int flags, const QPalette& pal, bool enabled, const QString& text, QPalette::ColorRole textRole) const; + void drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOption* opt, QPainter* p, const QWidget* w = 0) const; + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap& pixmap, const QStyleOption* opt) const; + QStyle::SubControl hitTestComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, const QPoint& pt, const QWidget* w = 0) const; + QRect itemPixmapRect(const QRect& r, int flags, const QPixmap& pixmap) const; + int layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption* option = 0, const QWidget* widget = 0) const; + int pixelMetric(QStyle::PixelMetric m, const QStyleOption* opt = 0, const QWidget* widget = 0) const; + void polish(QApplication* app); + void polish(QPalette& arg__1); + void polish(QWidget* widget); + QSize sizeFromContents(QStyle::ContentsType ct, const QStyleOption* opt, const QSize& contentsSize, const QWidget* widget = 0) const; + QIcon standardIcon(QStyle::StandardPixmap standardIcon, const QStyleOption* opt = 0, const QWidget* widget = 0) const; + QPalette standardPalette() const; + QPixmap standardPixmap(QStyle::StandardPixmap standardPixmap, const QStyleOption* opt, const QWidget* widget) const; + int styleHint(QStyle::StyleHint sh, const QStyleOption* opt = 0, const QWidget* w = 0, QStyleHintReturn* shret = 0) const; + QRect subControlRect(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QStyle::SubControl sc, const QWidget* w = 0) const; + QRect subElementRect(QStyle::SubElement r, const QStyleOption* opt, const QWidget* widget = 0) const; + void timerEvent(QTimerEvent* event); + void unpolish(QApplication* application); + void unpolish(QWidget* widget); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QCOMMONSTYLE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCompleter.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCompleter.cpp new file mode 100644 index 00000000..aa687d73 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCompleter.cpp @@ -0,0 +1,131 @@ +#include "qtscriptshell_QCompleter.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QCompleter::QtScriptShell_QCompleter(QAbstractItemModel* model, QObject* parent) + : QCompleter(model, parent) {} + +QtScriptShell_QCompleter::QtScriptShell_QCompleter(QObject* parent) + : QCompleter(parent) {} + +QtScriptShell_QCompleter::QtScriptShell_QCompleter(const QStringList& completions, QObject* parent) + : QCompleter(completions, parent) {} + +QtScriptShell_QCompleter::~QtScriptShell_QCompleter() {} + +void QtScriptShell_QCompleter::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QCompleter::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QCompleter::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QCompleter::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QCompleter::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QCompleter::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QCompleter::eventFilter(QObject* o, QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QCompleter::eventFilter(o, e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, o) + << qScriptValueFromValue(_q_engine, e))); + } +} + +QString QtScriptShell_QCompleter::pathFromIndex(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("pathFromIndex"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("pathFromIndex") & QScriptValue::QObjectMember)) { + return QCompleter::pathFromIndex(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QStringList QtScriptShell_QCompleter::splitPath(const QString& path) const +{ + QScriptValue _q_function = __qtscript_self.property("splitPath"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("splitPath") & QScriptValue::QObjectMember)) { + return QCompleter::splitPath(path); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, path))); + } +} + +void QtScriptShell_QCompleter::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QCompleter::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCompleter.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCompleter.h new file mode 100644 index 00000000..4c6ac86c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QCompleter.h @@ -0,0 +1,28 @@ +#ifndef QTSCRIPTSHELL_QCOMPLETER_H +#define QTSCRIPTSHELL_QCOMPLETER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QCompleter : public QCompleter +{ +public: + QtScriptShell_QCompleter(QAbstractItemModel* model, QObject* parent = 0); + QtScriptShell_QCompleter(QObject* parent = 0); + QtScriptShell_QCompleter(const QStringList& completions, QObject* parent = 0); + ~QtScriptShell_QCompleter(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* arg__1); + bool eventFilter(QObject* o, QEvent* e); + QString pathFromIndex(const QModelIndex& index) const; + QStringList splitPath(const QString& path) const; + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QCOMPLETER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDataWidgetMapper.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDataWidgetMapper.cpp new file mode 100644 index 00000000..f24f141e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDataWidgetMapper.cpp @@ -0,0 +1,109 @@ +#include "qtscriptshell_QDataWidgetMapper.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QDataWidgetMapper::QtScriptShell_QDataWidgetMapper(QObject* parent) + : QDataWidgetMapper(parent) {} + +QtScriptShell_QDataWidgetMapper::~QtScriptShell_QDataWidgetMapper() {} + +void QtScriptShell_QDataWidgetMapper::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QDataWidgetMapper::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDataWidgetMapper::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QDataWidgetMapper::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDataWidgetMapper::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QDataWidgetMapper::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QDataWidgetMapper::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QDataWidgetMapper::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QDataWidgetMapper::setCurrentIndex(int index) +{ + QScriptValue _q_function = __qtscript_self.property("setCurrentIndex"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setCurrentIndex") & QScriptValue::QObjectMember)) { + QDataWidgetMapper::setCurrentIndex(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QDataWidgetMapper::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QDataWidgetMapper::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDataWidgetMapper.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDataWidgetMapper.h new file mode 100644 index 00000000..d3f3a970 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDataWidgetMapper.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QDATAWIDGETMAPPER_H +#define QTSCRIPTSHELL_QDATAWIDGETMAPPER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QDataWidgetMapper : public QDataWidgetMapper +{ +public: + QtScriptShell_QDataWidgetMapper(QObject* parent = 0); + ~QtScriptShell_QDataWidgetMapper(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void setCurrentIndex(int index); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QDATAWIDGETMAPPER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDateEdit.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDateEdit.cpp new file mode 100644 index 00000000..0ab79f3c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDateEdit.cpp @@ -0,0 +1,751 @@ +#include "qtscriptshell_QDateEdit.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QValidator::State) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QDateEdit::QtScriptShell_QDateEdit(QWidget* parent) + : QDateEdit(parent) {} + +QtScriptShell_QDateEdit::QtScriptShell_QDateEdit(const QDate& date, QWidget* parent) + : QDateEdit(date, parent) {} + +QtScriptShell_QDateEdit::~QtScriptShell_QDateEdit() {} + +void QtScriptShell_QDateEdit::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QDateEdit::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::changeEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QDateEdit::changeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QDateEdit::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::clear() +{ + QScriptValue _q_function = __qtscript_self.property("clear"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clear") & QScriptValue::QObjectMember)) { + QDateEdit::clear(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QDateEdit::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QDateEdit::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QDateEdit::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QDateEdit::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QDateTime QtScriptShell_QDateEdit::dateTimeFromText(const QString& text) const +{ + QScriptValue _q_function = __qtscript_self.property("dateTimeFromText"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dateTimeFromText") & QScriptValue::QObjectMember)) { + return QDateEdit::dateTimeFromText(text); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, text))); + } +} + +int QtScriptShell_QDateEdit::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QDateEdit::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDateEdit::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QDateEdit::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QDateEdit::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QDateEdit::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QDateEdit::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QDateEdit::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDateEdit::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QDateEdit::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QDateEdit::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QDateEdit::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QDateEdit::fixup(QString& input) const +{ + QScriptValue _q_function = __qtscript_self.property("fixup"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fixup") & QScriptValue::QObjectMember)) { + QDateEdit::fixup(input); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, input)); + } +} + +void QtScriptShell_QDateEdit::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QDateEdit::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDateEdit::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QDateEdit::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QDateEdit::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QDateEdit::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDateEdit::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QDateEdit::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QDateEdit::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QDateEdit::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDateEdit::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QDateEdit::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QDateEdit::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QDateEdit::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QDateEdit::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QDateEdit::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QDateEdit::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDateEdit::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QDateEdit::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QDateEdit::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QDateEdit::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QDateEdit::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QDateEdit::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDateEdit::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QDateEdit::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QDateEdit::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QDateEdit::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QDateEdit::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QDateEdit::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDateEdit::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QDateEdit::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QDateEdit::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QDateEdit::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDateEdit::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QDateEdit::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QDateEdit::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QDateEdit::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QDateEdit::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QDateEdit::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QDateEdit::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QDateEdit::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDateEdit::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QDateEdit::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateEdit::stepBy(int steps) +{ + QScriptValue _q_function = __qtscript_self.property("stepBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("stepBy") & QScriptValue::QObjectMember)) { + QDateEdit::stepBy(steps); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, steps)); + } +} + +QAbstractSpinBox::StepEnabled QtScriptShell_QDateEdit::stepEnabled() const +{ + QScriptValue _q_function = __qtscript_self.property("stepEnabled"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("stepEnabled") & QScriptValue::QObjectMember)) { + return QDateEdit::stepEnabled(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDateEdit::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QDateEdit::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QString QtScriptShell_QDateEdit::textFromDateTime(const QDateTime& dt) const +{ + QScriptValue _q_function = __qtscript_self.property("textFromDateTime"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("textFromDateTime") & QScriptValue::QObjectMember)) { + return QDateEdit::textFromDateTime(dt); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dt))); + } +} + +void QtScriptShell_QDateEdit::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QDateEdit::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QValidator::State QtScriptShell_QDateEdit::validate(QString& input, int& pos) const +{ + QScriptValue _q_function = __qtscript_self.property("validate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("validate") & QScriptValue::QObjectMember)) { + return QDateEdit::validate(input, pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, input) + << qScriptValueFromValue(_q_engine, pos))); + } +} + +void QtScriptShell_QDateEdit::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QDateEdit::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDateEdit.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDateEdit.h new file mode 100644 index 00000000..387174b6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDateEdit.h @@ -0,0 +1,69 @@ +#ifndef QTSCRIPTSHELL_QDATEEDIT_H +#define QTSCRIPTSHELL_QDATEEDIT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QDateEdit : public QDateEdit +{ +public: + QtScriptShell_QDateEdit(QWidget* parent = 0); + QtScriptShell_QDateEdit(const QDate& date, QWidget* parent = 0); + ~QtScriptShell_QDateEdit(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* event); + void childEvent(QChildEvent* event); + void clear(); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + QDateTime dateTimeFromText(const QString& text) const; + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fixup(QString& input) const; + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void stepBy(int steps); + QAbstractSpinBox::StepEnabled stepEnabled() const; + void tabletEvent(QTabletEvent* event); + QString textFromDateTime(const QDateTime& dt) const; + void timerEvent(QTimerEvent* event); + QValidator::State validate(QString& input, int& pos) const; + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QDATEEDIT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDateTimeEdit.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDateTimeEdit.cpp new file mode 100644 index 00000000..1aef34cf --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDateTimeEdit.cpp @@ -0,0 +1,760 @@ +#include "qtscriptshell_QDateTimeEdit.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QValidator::State) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QDateTimeEdit::QtScriptShell_QDateTimeEdit(QWidget* parent) + : QDateTimeEdit(parent) {} + +QtScriptShell_QDateTimeEdit::QtScriptShell_QDateTimeEdit(const QDate& d, QWidget* parent) + : QDateTimeEdit(d, parent) {} + +QtScriptShell_QDateTimeEdit::QtScriptShell_QDateTimeEdit(const QDateTime& dt, QWidget* parent) + : QDateTimeEdit(dt, parent) {} + +QtScriptShell_QDateTimeEdit::QtScriptShell_QDateTimeEdit(const QTime& t, QWidget* parent) + : QDateTimeEdit(t, parent) {} + +QtScriptShell_QDateTimeEdit::QtScriptShell_QDateTimeEdit(const QVariant& val, QVariant::Type parserType, QWidget* parent) + : QDateTimeEdit(val, parserType, parent) {} + +QtScriptShell_QDateTimeEdit::~QtScriptShell_QDateTimeEdit() {} + +void QtScriptShell_QDateTimeEdit::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::changeEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::changeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::clear() +{ + QScriptValue _q_function = __qtscript_self.property("clear"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clear") & QScriptValue::QObjectMember)) { + QDateTimeEdit::clear(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QDateTimeEdit::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QDateTime QtScriptShell_QDateTimeEdit::dateTimeFromText(const QString& text) const +{ + QScriptValue _q_function = __qtscript_self.property("dateTimeFromText"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dateTimeFromText") & QScriptValue::QObjectMember)) { + return QDateTimeEdit::dateTimeFromText(text); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, text))); + } +} + +int QtScriptShell_QDateTimeEdit::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QDateTimeEdit::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDateTimeEdit::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDateTimeEdit::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QDateTimeEdit::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QDateTimeEdit::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QDateTimeEdit::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QDateTimeEdit::fixup(QString& input) const +{ + QScriptValue _q_function = __qtscript_self.property("fixup"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fixup") & QScriptValue::QObjectMember)) { + QDateTimeEdit::fixup(input); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, input)); + } +} + +void QtScriptShell_QDateTimeEdit::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDateTimeEdit::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QDateTimeEdit::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QDateTimeEdit::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDateTimeEdit::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QDateTimeEdit::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QDateTimeEdit::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QDateTimeEdit::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDateTimeEdit::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QDateTimeEdit::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QDateTimeEdit::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QDateTimeEdit::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QDateTimeEdit::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDateTimeEdit::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QDateTimeEdit::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QDateTimeEdit::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDateTimeEdit::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDateTimeEdit::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QDateTimeEdit::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QDateTimeEdit::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QDateTimeEdit::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDateTimeEdit::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QDateTimeEdit::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QDateTimeEdit::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QDateTimeEdit::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QDateTimeEdit::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QDateTimeEdit::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDateTimeEdit::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDateTimeEdit::stepBy(int steps) +{ + QScriptValue _q_function = __qtscript_self.property("stepBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("stepBy") & QScriptValue::QObjectMember)) { + QDateTimeEdit::stepBy(steps); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, steps)); + } +} + +QAbstractSpinBox::StepEnabled QtScriptShell_QDateTimeEdit::stepEnabled() const +{ + QScriptValue _q_function = __qtscript_self.property("stepEnabled"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("stepEnabled") & QScriptValue::QObjectMember)) { + return QDateTimeEdit::stepEnabled(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDateTimeEdit::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QString QtScriptShell_QDateTimeEdit::textFromDateTime(const QDateTime& dt) const +{ + QScriptValue _q_function = __qtscript_self.property("textFromDateTime"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("textFromDateTime") & QScriptValue::QObjectMember)) { + return QDateTimeEdit::textFromDateTime(dt); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dt))); + } +} + +void QtScriptShell_QDateTimeEdit::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QValidator::State QtScriptShell_QDateTimeEdit::validate(QString& input, int& pos) const +{ + QScriptValue _q_function = __qtscript_self.property("validate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("validate") & QScriptValue::QObjectMember)) { + return QDateTimeEdit::validate(input, pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, input) + << qScriptValueFromValue(_q_engine, pos))); + } +} + +void QtScriptShell_QDateTimeEdit::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QDateTimeEdit::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDateTimeEdit.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDateTimeEdit.h new file mode 100644 index 00000000..5e842f6d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDateTimeEdit.h @@ -0,0 +1,72 @@ +#ifndef QTSCRIPTSHELL_QDATETIMEEDIT_H +#define QTSCRIPTSHELL_QDATETIMEEDIT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QDateTimeEdit : public QDateTimeEdit +{ +public: + QtScriptShell_QDateTimeEdit(QWidget* parent = 0); + QtScriptShell_QDateTimeEdit(const QDate& d, QWidget* parent = 0); + QtScriptShell_QDateTimeEdit(const QDateTime& dt, QWidget* parent = 0); + QtScriptShell_QDateTimeEdit(const QTime& t, QWidget* parent = 0); + QtScriptShell_QDateTimeEdit(const QVariant& val, QVariant::Type parserType, QWidget* parent = 0); + ~QtScriptShell_QDateTimeEdit(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* event); + void childEvent(QChildEvent* event); + void clear(); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + QDateTime dateTimeFromText(const QString& text) const; + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fixup(QString& input) const; + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void stepBy(int steps); + QAbstractSpinBox::StepEnabled stepEnabled() const; + void tabletEvent(QTabletEvent* event); + QString textFromDateTime(const QDateTime& dt) const; + void timerEvent(QTimerEvent* event); + QValidator::State validate(QString& input, int& pos) const; + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QDATETIMEEDIT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDesktopWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDesktopWidget.cpp new file mode 100644 index 00000000..1b4d2928 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDesktopWidget.cpp @@ -0,0 +1,671 @@ +#include "qtscriptshell_QDesktopWidget.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QDesktopWidget::QtScriptShell_QDesktopWidget() + : QDesktopWidget() {} + +QtScriptShell_QDesktopWidget::~QtScriptShell_QDesktopWidget() {} + +void QtScriptShell_QDesktopWidget::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QDesktopWidget::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QDesktopWidget::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QDesktopWidget::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDesktopWidget::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDesktopWidget::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QDesktopWidget::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QDesktopWidget::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QDesktopWidget::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QDesktopWidget::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDesktopWidget::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QDesktopWidget::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QDesktopWidget::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDesktopWidget::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QDesktopWidget::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QDesktopWidget::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QDesktopWidget::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDesktopWidget::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QDesktopWidget::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QDesktopWidget::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QDesktopWidget::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QDesktopWidget::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDesktopWidget::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QDesktopWidget::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QDesktopWidget::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QDesktopWidget::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QDesktopWidget::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDesktopWidget::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDesktopWidget::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QDesktopWidget::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QDesktopWidget::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QDesktopWidget::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDesktopWidget::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QDesktopWidget::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QDesktopWidget::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QDesktopWidget::resizeEvent(QResizeEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::resizeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QPainter* QtScriptShell_QDesktopWidget::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QDesktopWidget::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDesktopWidget::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_QDesktopWidget::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QDesktopWidget::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDesktopWidget::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDesktopWidget::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QDesktopWidget::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDesktopWidget.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDesktopWidget.h new file mode 100644 index 00000000..51f1355c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDesktopWidget.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_QDESKTOPWIDGET_H +#define QTSCRIPTSHELL_QDESKTOPWIDGET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QDesktopWidget : public QDesktopWidget +{ +public: + QtScriptShell_QDesktopWidget(); + ~QtScriptShell_QDesktopWidget(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* e); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QDESKTOPWIDGET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDial.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDial.cpp new file mode 100644 index 00000000..b39d3029 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDial.cpp @@ -0,0 +1,650 @@ +#include "qtscriptshell_QDial.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QDial::QtScriptShell_QDial(QWidget* parent) + : QDial(parent) {} + +QtScriptShell_QDial::~QtScriptShell_QDial() {} + +void QtScriptShell_QDial::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QDial::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDial::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QDial::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QDial::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QDial::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDial::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QDial::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDial::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QDial::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDial::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QDial::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QDial::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QDial::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDial::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QDial::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDial::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QDial::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDial::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QDial::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDial::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QDial::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDial::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QDial::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDial::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QDial::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QDial::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QDial::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QDial::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QDial::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDial::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QDial::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QDial::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QDial::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDial::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QDial::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QDial::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QDial::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDial::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QDial::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDial::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QDial::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QDial::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QDial::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QDial::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QDial::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDial::keyPressEvent(QKeyEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QDial::keyPressEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QDial::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QDial::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDial::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QDial::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QDial::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QDial::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDial::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QDial::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDial::mouseMoveEvent(QMouseEvent* me) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QDial::mouseMoveEvent(me); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, me)); + } +} + +void QtScriptShell_QDial::mousePressEvent(QMouseEvent* me) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QDial::mousePressEvent(me); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, me)); + } +} + +void QtScriptShell_QDial::mouseReleaseEvent(QMouseEvent* me) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QDial::mouseReleaseEvent(me); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, me)); + } +} + +void QtScriptShell_QDial::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QDial::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDial::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QDial::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QDial::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QDial::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDial::paintEvent(QPaintEvent* pe) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QDial::paintEvent(pe); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pe)); + } +} + +QPaintDevice* QtScriptShell_QDial::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QDial::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QDial::resizeEvent(QResizeEvent* re) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QDial::resizeEvent(re); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, re)); + } +} + +QPainter* QtScriptShell_QDial::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QDial::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDial::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QDial::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDial::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QDial::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDial::timerEvent(QTimerEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QDial::timerEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QDial::wheelEvent(QWheelEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QDial::wheelEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDial.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDial.h new file mode 100644 index 00000000..ab7f993d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDial.h @@ -0,0 +1,61 @@ +#ifndef QTSCRIPTSHELL_QDIAL_H +#define QTSCRIPTSHELL_QDIAL_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QDial : public QDial +{ +public: + QtScriptShell_QDial(QWidget* parent = 0); + ~QtScriptShell_QDial(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* e); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* ev); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* me); + void mousePressEvent(QMouseEvent* me); + void mouseReleaseEvent(QMouseEvent* me); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* pe); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* re); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* arg__1); + void wheelEvent(QWheelEvent* e); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QDIAL_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDialog.cpp new file mode 100644 index 00000000..b02f8464 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDialog.cpp @@ -0,0 +1,707 @@ +#include "qtscriptshell_QDialog.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QDialog::QtScriptShell_QDialog(QWidget* parent, Qt::WindowFlags f) + : QDialog(parent, f) {} + +QtScriptShell_QDialog::~QtScriptShell_QDialog() {} + +void QtScriptShell_QDialog::accept() +{ + QScriptValue _q_function = __qtscript_self.property("accept"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("accept") & QScriptValue::QObjectMember)) { + QDialog::accept(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QDialog::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QDialog::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialog::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QDialog::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QDialog::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QDialog::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialog::closeEvent(QCloseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QDialog::closeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QDialog::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QDialog::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QDialog::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QDialog::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QDialog::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QDialog::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDialog::done(int arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("done"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("done") & QScriptValue::QObjectMember)) { + QDialog::done(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QDialog::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QDialog::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialog::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QDialog::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialog::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QDialog::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialog::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QDialog::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialog::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QDialog::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDialog::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QDialog::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QDialog::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QDialog::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +int QtScriptShell_QDialog::exec() +{ + QScriptValue _q_function = __qtscript_self.property("exec"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("exec") & QScriptValue::QObjectMember)) { + return QDialog::exec(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDialog::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QDialog::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDialog::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QDialog::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QDialog::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QDialog::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDialog::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QDialog::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QDialog::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QDialog::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDialog::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QDialog::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialog::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QDialog::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QDialog::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QDialog::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QDialog::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QDialog::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDialog::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QDialog::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QDialog::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QDialog::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialog::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QDialog::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QDialog::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QDialog::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDialog::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QDialog::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialog::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QDialog::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialog::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QDialog::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialog::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QDialog::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialog::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QDialog::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDialog::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QDialog::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +void QtScriptShell_QDialog::open() +{ + QScriptValue _q_function = __qtscript_self.property("open"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("open") & QScriptValue::QObjectMember)) { + QDialog::open(); + } else { + _q_function.call(__qtscript_self); + } +} + +QPaintEngine* QtScriptShell_QDialog::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QDialog::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDialog::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QDialog::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QDialog::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QDialog::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QDialog::reject() +{ + QScriptValue _q_function = __qtscript_self.property("reject"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reject") & QScriptValue::QObjectMember)) { + QDialog::reject(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QDialog::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QDialog::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPainter* QtScriptShell_QDialog::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QDialog::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDialog::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QDialog::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QDialog::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QDialog::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialog::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QDialog::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialog::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QDialog::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDialog.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDialog.h new file mode 100644 index 00000000..26e8533c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDialog.h @@ -0,0 +1,66 @@ +#ifndef QTSCRIPTSHELL_QDIALOG_H +#define QTSCRIPTSHELL_QDIALOG_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QDialog : public QDialog +{ +public: + QtScriptShell_QDialog(QWidget* parent = 0, Qt::WindowFlags f = Qt::WindowFlags()); + ~QtScriptShell_QDialog(); + + void accept(); + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* arg__1); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void done(int arg__1); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + int exec(); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + void open(); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void reject(); + void resizeEvent(QResizeEvent* arg__1); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QDIALOG_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDialogButtonBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDialogButtonBox.cpp new file mode 100644 index 00000000..9464ac97 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDialogButtonBox.cpp @@ -0,0 +1,682 @@ +#include "qtscriptshell_QDialogButtonBox.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QDialogButtonBox::QtScriptShell_QDialogButtonBox(QDialogButtonBox::StandardButtons buttons, QWidget* parent) + : QDialogButtonBox(buttons, parent) {} + +QtScriptShell_QDialogButtonBox::QtScriptShell_QDialogButtonBox(QDialogButtonBox::StandardButtons buttons, Qt::Orientation orientation, QWidget* parent) + : QDialogButtonBox(buttons, orientation, parent) {} + +QtScriptShell_QDialogButtonBox::QtScriptShell_QDialogButtonBox(QWidget* parent) + : QDialogButtonBox(parent) {} + +QtScriptShell_QDialogButtonBox::QtScriptShell_QDialogButtonBox(Qt::Orientation orientation, QWidget* parent) + : QDialogButtonBox(orientation, parent) {} + +QtScriptShell_QDialogButtonBox::~QtScriptShell_QDialogButtonBox() {} + +void QtScriptShell_QDialogButtonBox::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::changeEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::changeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QDialogButtonBox::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QDialogButtonBox::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDialogButtonBox::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDialogButtonBox::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QDialogButtonBox::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QDialogButtonBox::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QDialogButtonBox::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QDialogButtonBox::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDialogButtonBox::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QDialogButtonBox::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QDialogButtonBox::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDialogButtonBox::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QDialogButtonBox::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QDialogButtonBox::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QDialogButtonBox::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDialogButtonBox::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QDialogButtonBox::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QDialogButtonBox::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QDialogButtonBox::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QDialogButtonBox::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDialogButtonBox::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QDialogButtonBox::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QDialogButtonBox::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QDialogButtonBox::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QDialogButtonBox::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDialogButtonBox::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDialogButtonBox::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QDialogButtonBox::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QDialogButtonBox::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QDialogButtonBox::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDialogButtonBox::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QDialogButtonBox::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QDialogButtonBox::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QDialogButtonBox::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QDialogButtonBox::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QDialogButtonBox::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDialogButtonBox::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_QDialogButtonBox::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QDialogButtonBox::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDialogButtonBox::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDialogButtonBox::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QDialogButtonBox::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDialogButtonBox.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDialogButtonBox.h new file mode 100644 index 00000000..c64e560b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDialogButtonBox.h @@ -0,0 +1,66 @@ +#ifndef QTSCRIPTSHELL_QDIALOGBUTTONBOX_H +#define QTSCRIPTSHELL_QDIALOGBUTTONBOX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QDialogButtonBox : public QDialogButtonBox +{ +public: + QtScriptShell_QDialogButtonBox(QDialogButtonBox::StandardButtons buttons, QWidget* parent = 0); + QtScriptShell_QDialogButtonBox(QDialogButtonBox::StandardButtons buttons, Qt::Orientation orientation, QWidget* parent = 0); + QtScriptShell_QDialogButtonBox(QWidget* parent = 0); + QtScriptShell_QDialogButtonBox(Qt::Orientation orientation, QWidget* parent = 0); + ~QtScriptShell_QDialogButtonBox(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* event); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QDIALOGBUTTONBOX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDockWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDockWidget.cpp new file mode 100644 index 00000000..9de1cf2c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDockWidget.cpp @@ -0,0 +1,675 @@ +#include "qtscriptshell_QDockWidget.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QDockWidget::QtScriptShell_QDockWidget(QWidget* parent, Qt::WindowFlags flags) + : QDockWidget(parent, flags) {} + +QtScriptShell_QDockWidget::QtScriptShell_QDockWidget(const QString& title, QWidget* parent, Qt::WindowFlags flags) + : QDockWidget(title, parent, flags) {} + +QtScriptShell_QDockWidget::~QtScriptShell_QDockWidget() {} + +void QtScriptShell_QDockWidget::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QDockWidget::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::changeEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QDockWidget::changeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QDockWidget::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QDockWidget::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QDockWidget::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QDockWidget::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QDockWidget::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QDockWidget::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDockWidget::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QDockWidget::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QDockWidget::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QDockWidget::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QDockWidget::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QDockWidget::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDockWidget::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QDockWidget::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QDockWidget::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QDockWidget::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QDockWidget::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QDockWidget::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDockWidget::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QDockWidget::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QDockWidget::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QDockWidget::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDockWidget::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QDockWidget::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QDockWidget::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QDockWidget::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDockWidget::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QDockWidget::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QDockWidget::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QDockWidget::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QDockWidget::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QDockWidget::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QDockWidget::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDockWidget::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QDockWidget::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QDockWidget::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QDockWidget::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QDockWidget::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QDockWidget::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QDockWidget::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QDockWidget::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDockWidget::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QDockWidget::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QDockWidget::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QDockWidget::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QDockWidget::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QDockWidget::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDockWidget::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QDockWidget::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QDockWidget::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QDockWidget::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDockWidget::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QDockWidget::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QDockWidget::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QDockWidget::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QDockWidget::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QDockWidget::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QDockWidget::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QDockWidget::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDockWidget::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QDockWidget::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_QDockWidget::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QDockWidget::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDockWidget::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QDockWidget::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QDockWidget::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDockWidget::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QDockWidget::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDockWidget.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDockWidget.h new file mode 100644 index 00000000..d44d196b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDockWidget.h @@ -0,0 +1,64 @@ +#ifndef QTSCRIPTSHELL_QDOCKWIDGET_H +#define QTSCRIPTSHELL_QDOCKWIDGET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QDockWidget : public QDockWidget +{ +public: + QtScriptShell_QDockWidget(QWidget* parent = 0, Qt::WindowFlags flags = Qt::WindowFlags()); + QtScriptShell_QDockWidget(const QString& title, QWidget* parent = 0, Qt::WindowFlags flags = Qt::WindowFlags()); + ~QtScriptShell_QDockWidget(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* event); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QDOCKWIDGET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDoubleSpinBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDoubleSpinBox.cpp new file mode 100644 index 00000000..63231e2f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDoubleSpinBox.cpp @@ -0,0 +1,746 @@ +#include "qtscriptshell_QDoubleSpinBox.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QValidator::State) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QDoubleSpinBox::QtScriptShell_QDoubleSpinBox(QWidget* parent) + : QDoubleSpinBox(parent) {} + +QtScriptShell_QDoubleSpinBox::~QtScriptShell_QDoubleSpinBox() {} + +void QtScriptShell_QDoubleSpinBox::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::changeEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::changeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::clear() +{ + QScriptValue _q_function = __qtscript_self.property("clear"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clear") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::clear(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QDoubleSpinBox::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QDoubleSpinBox::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QDoubleSpinBox::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDoubleSpinBox::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDoubleSpinBox::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QDoubleSpinBox::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QDoubleSpinBox::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QDoubleSpinBox::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QDoubleSpinBox::fixup(QString& str) const +{ + QScriptValue _q_function = __qtscript_self.property("fixup"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fixup") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::fixup(str); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, str)); + } +} + +void QtScriptShell_QDoubleSpinBox::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDoubleSpinBox::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QDoubleSpinBox::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QDoubleSpinBox::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDoubleSpinBox::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QDoubleSpinBox::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QDoubleSpinBox::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QDoubleSpinBox::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDoubleSpinBox::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QDoubleSpinBox::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QDoubleSpinBox::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QDoubleSpinBox::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDoubleSpinBox::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QDoubleSpinBox::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QDoubleSpinBox::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QDoubleSpinBox::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QDoubleSpinBox::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QDoubleSpinBox::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QDoubleSpinBox::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QDoubleSpinBox::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDoubleSpinBox::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QDoubleSpinBox::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QDoubleSpinBox::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QDoubleSpinBox::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QDoubleSpinBox::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QDoubleSpinBox::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDoubleSpinBox::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QDoubleSpinBox::stepBy(int steps) +{ + QScriptValue _q_function = __qtscript_self.property("stepBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("stepBy") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::stepBy(steps); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, steps)); + } +} + +QAbstractSpinBox::StepEnabled QtScriptShell_QDoubleSpinBox::stepEnabled() const +{ + QScriptValue _q_function = __qtscript_self.property("stepEnabled"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("stepEnabled") & QScriptValue::QObjectMember)) { + return QDoubleSpinBox::stepEnabled(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QDoubleSpinBox::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QString QtScriptShell_QDoubleSpinBox::textFromValue(double val) const +{ + QScriptValue _q_function = __qtscript_self.property("textFromValue"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("textFromValue") & QScriptValue::QObjectMember)) { + return QDoubleSpinBox::textFromValue(val); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, val))); + } +} + +void QtScriptShell_QDoubleSpinBox::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QValidator::State QtScriptShell_QDoubleSpinBox::validate(QString& input, int& pos) const +{ + QScriptValue _q_function = __qtscript_self.property("validate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("validate") & QScriptValue::QObjectMember)) { + return QDoubleSpinBox::validate(input, pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, input) + << qScriptValueFromValue(_q_engine, pos))); + } +} + +double QtScriptShell_QDoubleSpinBox::valueFromText(const QString& text) const +{ + QScriptValue _q_function = __qtscript_self.property("valueFromText"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("valueFromText") & QScriptValue::QObjectMember)) { + return QDoubleSpinBox::valueFromText(text); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, text))); + } +} + +void QtScriptShell_QDoubleSpinBox::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QDoubleSpinBox::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDoubleSpinBox.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDoubleSpinBox.h new file mode 100644 index 00000000..4bbfc392 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QDoubleSpinBox.h @@ -0,0 +1,68 @@ +#ifndef QTSCRIPTSHELL_QDOUBLESPINBOX_H +#define QTSCRIPTSHELL_QDOUBLESPINBOX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QDoubleSpinBox : public QDoubleSpinBox +{ +public: + QtScriptShell_QDoubleSpinBox(QWidget* parent = 0); + ~QtScriptShell_QDoubleSpinBox(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* event); + void childEvent(QChildEvent* event); + void clear(); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fixup(QString& str) const; + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void stepBy(int steps); + QAbstractSpinBox::StepEnabled stepEnabled() const; + void tabletEvent(QTabletEvent* event); + QString textFromValue(double val) const; + void timerEvent(QTimerEvent* event); + QValidator::State validate(QString& input, int& pos) const; + double valueFromText(const QString& text) const; + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QDOUBLESPINBOX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QErrorMessage.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QErrorMessage.cpp new file mode 100644 index 00000000..76dcee91 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QErrorMessage.cpp @@ -0,0 +1,707 @@ +#include "qtscriptshell_QErrorMessage.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QErrorMessage::QtScriptShell_QErrorMessage(QWidget* parent) + : QErrorMessage(parent) {} + +QtScriptShell_QErrorMessage::~QtScriptShell_QErrorMessage() {} + +void QtScriptShell_QErrorMessage::accept() +{ + QScriptValue _q_function = __qtscript_self.property("accept"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("accept") & QScriptValue::QObjectMember)) { + QErrorMessage::accept(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QErrorMessage::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QErrorMessage::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QErrorMessage::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QErrorMessage::closeEvent(QCloseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::closeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QErrorMessage::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QErrorMessage::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QErrorMessage::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QErrorMessage::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QErrorMessage::done(int arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("done"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("done") & QScriptValue::QObjectMember)) { + QErrorMessage::done(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QErrorMessage::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QErrorMessage::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QErrorMessage::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QErrorMessage::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QErrorMessage::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QErrorMessage::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QErrorMessage::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QErrorMessage::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QErrorMessage::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +int QtScriptShell_QErrorMessage::exec() +{ + QScriptValue _q_function = __qtscript_self.property("exec"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("exec") & QScriptValue::QObjectMember)) { + return QErrorMessage::exec(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QErrorMessage::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QErrorMessage::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QErrorMessage::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QErrorMessage::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QErrorMessage::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QErrorMessage::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QErrorMessage::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QErrorMessage::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QErrorMessage::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QErrorMessage::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QErrorMessage::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QErrorMessage::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QErrorMessage::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QErrorMessage::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QErrorMessage::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QErrorMessage::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QErrorMessage::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QErrorMessage::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QErrorMessage::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QErrorMessage::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QErrorMessage::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QErrorMessage::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QErrorMessage::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QErrorMessage::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QErrorMessage::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QErrorMessage::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +void QtScriptShell_QErrorMessage::open() +{ + QScriptValue _q_function = __qtscript_self.property("open"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("open") & QScriptValue::QObjectMember)) { + QErrorMessage::open(); + } else { + _q_function.call(__qtscript_self); + } +} + +QPaintEngine* QtScriptShell_QErrorMessage::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QErrorMessage::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QErrorMessage::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QErrorMessage::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QErrorMessage::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QErrorMessage::reject() +{ + QScriptValue _q_function = __qtscript_self.property("reject"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reject") & QScriptValue::QObjectMember)) { + QErrorMessage::reject(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QErrorMessage::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPainter* QtScriptShell_QErrorMessage::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QErrorMessage::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QErrorMessage::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QErrorMessage::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QErrorMessage::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QErrorMessage::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QErrorMessage::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QErrorMessage.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QErrorMessage.h new file mode 100644 index 00000000..9dc62749 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QErrorMessage.h @@ -0,0 +1,66 @@ +#ifndef QTSCRIPTSHELL_QERRORMESSAGE_H +#define QTSCRIPTSHELL_QERRORMESSAGE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QErrorMessage : public QErrorMessage +{ +public: + QtScriptShell_QErrorMessage(QWidget* parent = 0); + ~QtScriptShell_QErrorMessage(); + + void accept(); + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* e); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* arg__1); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void done(int arg__1); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + int exec(); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + void open(); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void reject(); + void resizeEvent(QResizeEvent* arg__1); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QERRORMESSAGE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFileDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFileDialog.cpp new file mode 100644 index 00000000..606228ec --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFileDialog.cpp @@ -0,0 +1,706 @@ +#include "qtscriptshell_QFileDialog.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QFileDialog::QtScriptShell_QFileDialog(QWidget* parent, Qt::WindowFlags f) + : QFileDialog(parent, f) {} + +QtScriptShell_QFileDialog::QtScriptShell_QFileDialog(QWidget* parent, const QString& caption, const QString& directory, const QString& filter) + : QFileDialog(parent, caption, directory, filter) {} + +QtScriptShell_QFileDialog::~QtScriptShell_QFileDialog() {} + +void QtScriptShell_QFileDialog::accept() +{ + QScriptValue _q_function = __qtscript_self.property("accept"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("accept") & QScriptValue::QObjectMember)) { + QFileDialog::accept(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QFileDialog::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QFileDialog::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFileDialog::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QFileDialog::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QFileDialog::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QFileDialog::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFileDialog::closeEvent(QCloseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QFileDialog::closeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QFileDialog::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QFileDialog::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QFileDialog::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QFileDialog::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QFileDialog::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QFileDialog::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFileDialog::done(int result) +{ + QScriptValue _q_function = __qtscript_self.property("done"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("done") & QScriptValue::QObjectMember)) { + QFileDialog::done(result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, result)); + } +} + +void QtScriptShell_QFileDialog::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QFileDialog::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFileDialog::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QFileDialog::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFileDialog::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QFileDialog::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFileDialog::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QFileDialog::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFileDialog::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QFileDialog::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFileDialog::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QFileDialog::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QFileDialog::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QFileDialog::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +int QtScriptShell_QFileDialog::exec() +{ + QScriptValue _q_function = __qtscript_self.property("exec"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("exec") & QScriptValue::QObjectMember)) { + return QFileDialog::exec(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFileDialog::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QFileDialog::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFileDialog::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QFileDialog::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QFileDialog::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QFileDialog::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFileDialog::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QFileDialog::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QFileDialog::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QFileDialog::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QFileDialog::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QFileDialog::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFileDialog::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QFileDialog::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QFileDialog::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QFileDialog::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QFileDialog::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QFileDialog::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QFileDialog::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QFileDialog::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QFileDialog::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QFileDialog::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFileDialog::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QFileDialog::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QFileDialog::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QFileDialog::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QFileDialog::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QFileDialog::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFileDialog::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QFileDialog::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFileDialog::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QFileDialog::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFileDialog::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QFileDialog::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFileDialog::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QFileDialog::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFileDialog::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QFileDialog::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QFileDialog::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QFileDialog::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFileDialog::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QFileDialog::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QFileDialog::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QFileDialog::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QFileDialog::reject() +{ + QScriptValue _q_function = __qtscript_self.property("reject"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reject") & QScriptValue::QObjectMember)) { + QFileDialog::reject(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QFileDialog::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QFileDialog::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPainter* QtScriptShell_QFileDialog::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QFileDialog::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFileDialog::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QFileDialog::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QFileDialog::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QFileDialog::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFileDialog::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QFileDialog::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFileDialog::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QFileDialog::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFileDialog.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFileDialog.h new file mode 100644 index 00000000..32070a2a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFileDialog.h @@ -0,0 +1,66 @@ +#ifndef QTSCRIPTSHELL_QFILEDIALOG_H +#define QTSCRIPTSHELL_QFILEDIALOG_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QFileDialog : public QFileDialog +{ +public: + QtScriptShell_QFileDialog(QWidget* parent, Qt::WindowFlags f); + QtScriptShell_QFileDialog(QWidget* parent = 0, const QString& caption = QString(), const QString& directory = QString(), const QString& filter = QString()); + ~QtScriptShell_QFileDialog(); + + void accept(); + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* e); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* arg__1); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void done(int result); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + int exec(); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void reject(); + void resizeEvent(QResizeEvent* arg__1); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QFILEDIALOG_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFileIconProvider.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFileIconProvider.cpp new file mode 100644 index 00000000..49be898c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFileIconProvider.cpp @@ -0,0 +1,59 @@ +#include "qtscriptshell_QFileIconProvider.h" + +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QFileIconProvider::IconType) + +QtScriptShell_QFileIconProvider::QtScriptShell_QFileIconProvider() + : QFileIconProvider() {} + +QtScriptShell_QFileIconProvider::~QtScriptShell_QFileIconProvider() {} + +QIcon QtScriptShell_QFileIconProvider::icon(QFileIconProvider::IconType type) const +{ + QScriptValue _q_function = __qtscript_self.property("icon"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("icon") & QScriptValue::QObjectMember)) { + return QFileIconProvider::icon(type); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, type))); + } +} + +QIcon QtScriptShell_QFileIconProvider::icon(const QFileInfo& info) const +{ + QScriptValue _q_function = __qtscript_self.property("icon"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("icon") & QScriptValue::QObjectMember)) { + return QFileIconProvider::icon(info); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, info))); + } +} + +QString QtScriptShell_QFileIconProvider::type(const QFileInfo& info) const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + return QFileIconProvider::type(info); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, info))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFileIconProvider.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFileIconProvider.h new file mode 100644 index 00000000..43e1c063 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFileIconProvider.h @@ -0,0 +1,22 @@ +#ifndef QTSCRIPTSHELL_QFILEICONPROVIDER_H +#define QTSCRIPTSHELL_QFILEICONPROVIDER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QFileIconProvider : public QFileIconProvider +{ +public: + QtScriptShell_QFileIconProvider(); + ~QtScriptShell_QFileIconProvider(); + + QIcon icon(QFileIconProvider::IconType type) const; + QIcon icon(const QFileInfo& info) const; + QString type(const QFileInfo& info) const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QFILEICONPROVIDER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFocusFrame.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFocusFrame.cpp new file mode 100644 index 00000000..437b672f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFocusFrame.cpp @@ -0,0 +1,672 @@ +#include "qtscriptshell_QFocusFrame.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QFocusFrame::QtScriptShell_QFocusFrame(QWidget* parent) + : QFocusFrame(parent) {} + +QtScriptShell_QFocusFrame::~QtScriptShell_QFocusFrame() {} + +void QtScriptShell_QFocusFrame::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QFocusFrame::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QFocusFrame::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QFocusFrame::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFocusFrame::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFocusFrame::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QFocusFrame::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QFocusFrame::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QFocusFrame::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QFocusFrame::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFocusFrame::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QFocusFrame::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QFocusFrame::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFocusFrame::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QFocusFrame::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QFocusFrame::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QFocusFrame::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QFocusFrame::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QFocusFrame::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QFocusFrame::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QFocusFrame::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QFocusFrame::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QFocusFrame::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QFocusFrame::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QFocusFrame::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QFocusFrame::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QFocusFrame::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFocusFrame::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFocusFrame::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QFocusFrame::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QFocusFrame::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QFocusFrame::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFocusFrame::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QFocusFrame::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QFocusFrame::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QFocusFrame::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QFocusFrame::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QFocusFrame::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFocusFrame::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_QFocusFrame::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QFocusFrame::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFocusFrame::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFocusFrame::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QFocusFrame::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFocusFrame.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFocusFrame.h new file mode 100644 index 00000000..adb8495a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFocusFrame.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_QFOCUSFRAME_H +#define QTSCRIPTSHELL_QFOCUSFRAME_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QFocusFrame : public QFocusFrame +{ +public: + QtScriptShell_QFocusFrame(QWidget* parent = 0); + ~QtScriptShell_QFocusFrame(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QFOCUSFRAME_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFontComboBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFontComboBox.cpp new file mode 100644 index 00000000..8bd3dd78 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFontComboBox.cpp @@ -0,0 +1,679 @@ +#include "qtscriptshell_QFontComboBox.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QFontComboBox::QtScriptShell_QFontComboBox(QWidget* parent) + : QFontComboBox(parent) {} + +QtScriptShell_QFontComboBox::~QtScriptShell_QFontComboBox() {} + +void QtScriptShell_QFontComboBox::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontComboBox::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QFontComboBox::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontComboBox::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontComboBox::contextMenuEvent(QContextMenuEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::contextMenuEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QFontComboBox::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QFontComboBox::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QFontComboBox::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFontComboBox::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontComboBox::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontComboBox::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontComboBox::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontComboBox::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFontComboBox::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QFontComboBox::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QFontComboBox::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QFontComboBox::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QFontComboBox::focusInEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::focusInEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QFontComboBox::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QFontComboBox::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QFontComboBox::focusOutEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::focusOutEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QFontComboBox::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QFontComboBox::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QFontComboBox::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QFontComboBox::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QFontComboBox::hideEvent(QHideEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::hideEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QFontComboBox::hidePopup() +{ + QScriptValue _q_function = __qtscript_self.property("hidePopup"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hidePopup") & QScriptValue::QObjectMember)) { + QFontComboBox::hidePopup(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QFontComboBox::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QFontComboBox::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QFontComboBox::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QFontComboBox::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QFontComboBox::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QFontComboBox::keyPressEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::keyPressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QFontComboBox::keyReleaseEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::keyReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QFontComboBox::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QFontComboBox::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QFontComboBox::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QFontComboBox::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontComboBox::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontComboBox::mousePressEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::mousePressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QFontComboBox::mouseReleaseEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::mouseReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QFontComboBox::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFontComboBox::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QFontComboBox::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QFontComboBox::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QFontComboBox::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFontComboBox::paintEvent(QPaintEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::paintEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QPaintDevice* QtScriptShell_QFontComboBox::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QFontComboBox::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QFontComboBox::resizeEvent(QResizeEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::resizeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QPainter* QtScriptShell_QFontComboBox::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QFontComboBox::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFontComboBox::showEvent(QShowEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::showEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QFontComboBox::showPopup() +{ + QScriptValue _q_function = __qtscript_self.property("showPopup"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showPopup") & QScriptValue::QObjectMember)) { + QFontComboBox::showPopup(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QFontComboBox::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontComboBox::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontComboBox::wheelEvent(QWheelEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QFontComboBox::wheelEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFontComboBox.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFontComboBox.h new file mode 100644 index 00000000..cc3a5c94 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFontComboBox.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_QFONTCOMBOBOX_H +#define QTSCRIPTSHELL_QFONTCOMBOBOX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QFontComboBox : public QFontComboBox +{ +public: + QtScriptShell_QFontComboBox(QWidget* parent = 0); + ~QtScriptShell_QFontComboBox(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* e); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* e); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* e); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* e); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* e); + void hidePopup(); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* e); + void keyReleaseEvent(QKeyEvent* e); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* e); + void mouseReleaseEvent(QMouseEvent* e); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* e); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* e); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* e); + void showPopup(); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* e); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QFONTCOMBOBOX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFontDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFontDialog.cpp new file mode 100644 index 00000000..e010fe85 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFontDialog.cpp @@ -0,0 +1,699 @@ +#include "qtscriptshell_QFontDialog.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QFontDialog::QtScriptShell_QFontDialog(QWidget* parent) + : QFontDialog(parent) {} + +QtScriptShell_QFontDialog::QtScriptShell_QFontDialog(const QFont& initial, QWidget* parent) + : QFontDialog(initial, parent) {} + +QtScriptShell_QFontDialog::~QtScriptShell_QFontDialog() {} + +void QtScriptShell_QFontDialog::accept() +{ + QScriptValue _q_function = __qtscript_self.property("accept"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("accept") & QScriptValue::QObjectMember)) { + QFontDialog::accept(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QFontDialog::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QFontDialog::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontDialog::changeEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QFontDialog::changeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontDialog::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QFontDialog::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontDialog::closeEvent(QCloseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QFontDialog::closeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QFontDialog::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QFontDialog::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QFontDialog::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QFontDialog::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QFontDialog::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QFontDialog::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFontDialog::done(int result) +{ + QScriptValue _q_function = __qtscript_self.property("done"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("done") & QScriptValue::QObjectMember)) { + QFontDialog::done(result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, result)); + } +} + +void QtScriptShell_QFontDialog::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QFontDialog::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontDialog::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QFontDialog::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontDialog::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QFontDialog::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontDialog::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QFontDialog::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontDialog::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QFontDialog::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFontDialog::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QFontDialog::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QFontDialog::eventFilter(QObject* object, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QFontDialog::eventFilter(object, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, object) + << qScriptValueFromValue(_q_engine, event))); + } +} + +int QtScriptShell_QFontDialog::exec() +{ + QScriptValue _q_function = __qtscript_self.property("exec"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("exec") & QScriptValue::QObjectMember)) { + return QFontDialog::exec(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFontDialog::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QFontDialog::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFontDialog::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QFontDialog::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QFontDialog::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QFontDialog::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFontDialog::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QFontDialog::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QFontDialog::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QFontDialog::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QFontDialog::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QFontDialog::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontDialog::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QFontDialog::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QFontDialog::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QFontDialog::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QFontDialog::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QFontDialog::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QFontDialog::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QFontDialog::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QFontDialog::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QFontDialog::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontDialog::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QFontDialog::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QFontDialog::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QFontDialog::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QFontDialog::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QFontDialog::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontDialog::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QFontDialog::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontDialog::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QFontDialog::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontDialog::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QFontDialog::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontDialog::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QFontDialog::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFontDialog::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QFontDialog::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QFontDialog::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QFontDialog::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFontDialog::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QFontDialog::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QFontDialog::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QFontDialog::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QFontDialog::reject() +{ + QScriptValue _q_function = __qtscript_self.property("reject"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reject") & QScriptValue::QObjectMember)) { + QFontDialog::reject(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QFontDialog::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QFontDialog::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPainter* QtScriptShell_QFontDialog::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QFontDialog::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFontDialog::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QFontDialog::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QFontDialog::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QFontDialog::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontDialog::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QFontDialog::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFontDialog::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QFontDialog::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFontDialog.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFontDialog.h new file mode 100644 index 00000000..e2803c63 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFontDialog.h @@ -0,0 +1,66 @@ +#ifndef QTSCRIPTSHELL_QFONTDIALOG_H +#define QTSCRIPTSHELL_QFONTDIALOG_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QFontDialog : public QFontDialog +{ +public: + QtScriptShell_QFontDialog(QWidget* parent = 0); + QtScriptShell_QFontDialog(const QFont& initial, QWidget* parent = 0); + ~QtScriptShell_QFontDialog(); + + void accept(); + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* event); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* arg__1); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void done(int result); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* object, QEvent* event); + int exec(); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void reject(); + void resizeEvent(QResizeEvent* arg__1); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QFONTDIALOG_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFormLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFormLayout.cpp new file mode 100644 index 00000000..f5687923 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFormLayout.cpp @@ -0,0 +1,344 @@ +#include "qtscriptshell_QFormLayout.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QLayoutItem*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QSpacerItem*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QFormLayout::QtScriptShell_QFormLayout(QWidget* parent) + : QFormLayout(parent) {} + +QtScriptShell_QFormLayout::~QtScriptShell_QFormLayout() {} + +void QtScriptShell_QFormLayout::addItem(QLayoutItem* item) +{ + QScriptValue _q_function = __qtscript_self.property("addItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("addItem") & QScriptValue::QObjectMember)) { + QFormLayout::addItem(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, item)); + } +} + +void QtScriptShell_QFormLayout::childEvent(QChildEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QFormLayout::childEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QSizePolicy::ControlTypes QtScriptShell_QFormLayout::controlTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("controlTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("controlTypes") & QScriptValue::QObjectMember)) { + return QFormLayout::controlTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QFormLayout::count() const +{ + QScriptValue _q_function = __qtscript_self.property("count"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("count") & QScriptValue::QObjectMember)) { + return QFormLayout::count(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFormLayout::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QFormLayout::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFormLayout::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QFormLayout::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QFormLayout::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QFormLayout::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +Qt::Orientations QtScriptShell_QFormLayout::expandingDirections() const +{ + QScriptValue _q_function = __qtscript_self.property("expandingDirections"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("expandingDirections") & QScriptValue::QObjectMember)) { + return QFormLayout::expandingDirections(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QFormLayout::geometry() const +{ + QScriptValue _q_function = __qtscript_self.property("geometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("geometry") & QScriptValue::QObjectMember)) { + return QFormLayout::geometry(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QFormLayout::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QFormLayout::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QFormLayout::heightForWidth(int width) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QFormLayout::heightForWidth(width); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, width))); + } +} + +int QtScriptShell_QFormLayout::indexOf(QWidget* arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("indexOf"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexOf") & QScriptValue::QObjectMember)) { + return QFormLayout::indexOf(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QFormLayout::invalidate() +{ + QScriptValue _q_function = __qtscript_self.property("invalidate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("invalidate") & QScriptValue::QObjectMember)) { + QFormLayout::invalidate(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QFormLayout::isEmpty() const +{ + QScriptValue _q_function = __qtscript_self.property("isEmpty"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isEmpty") & QScriptValue::QObjectMember)) { + return QFormLayout::isEmpty(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayoutItem* QtScriptShell_QFormLayout::itemAt(int index) const +{ + QScriptValue _q_function = __qtscript_self.property("itemAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemAt") & QScriptValue::QObjectMember)) { + return QFormLayout::itemAt(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QLayout* QtScriptShell_QFormLayout::layout() +{ + QScriptValue _q_function = __qtscript_self.property("layout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("layout") & QScriptValue::QObjectMember)) { + return QFormLayout::layout(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSize QtScriptShell_QFormLayout::maximumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("maximumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("maximumSize") & QScriptValue::QObjectMember)) { + return QFormLayout::maximumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QFormLayout::minimumHeightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("minimumHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumHeightForWidth") & QScriptValue::QObjectMember)) { + return QFormLayout::minimumHeightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QFormLayout::minimumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("minimumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumSize") & QScriptValue::QObjectMember)) { + return QFormLayout::minimumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFormLayout::setGeometry(const QRect& rect) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + QFormLayout::setGeometry(rect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect)); + } +} + +QSize QtScriptShell_QFormLayout::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + return QFormLayout::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSpacerItem* QtScriptShell_QFormLayout::spacerItem() +{ + QScriptValue _q_function = __qtscript_self.property("spacerItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("spacerItem") & QScriptValue::QObjectMember)) { + return QFormLayout::spacerItem(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayoutItem* QtScriptShell_QFormLayout::takeAt(int index) +{ + QScriptValue _q_function = __qtscript_self.property("takeAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("takeAt") & QScriptValue::QObjectMember)) { + return QFormLayout::takeAt(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QFormLayout::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QFormLayout::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QWidget* QtScriptShell_QFormLayout::widget() +{ + QScriptValue _q_function = __qtscript_self.property("widget"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("widget") & QScriptValue::QObjectMember)) { + return QFormLayout::widget(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFormLayout.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFormLayout.h new file mode 100644 index 00000000..19c660b9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFormLayout.h @@ -0,0 +1,44 @@ +#ifndef QTSCRIPTSHELL_QFORMLAYOUT_H +#define QTSCRIPTSHELL_QFORMLAYOUT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QFormLayout : public QFormLayout +{ +public: + QtScriptShell_QFormLayout(QWidget* parent = 0); + ~QtScriptShell_QFormLayout(); + + void addItem(QLayoutItem* item); + void childEvent(QChildEvent* e); + QSizePolicy::ControlTypes controlTypes() const; + int count() const; + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + Qt::Orientations expandingDirections() const; + QRect geometry() const; + bool hasHeightForWidth() const; + int heightForWidth(int width) const; + int indexOf(QWidget* arg__1) const; + void invalidate(); + bool isEmpty() const; + QLayoutItem* itemAt(int index) const; + QLayout* layout(); + QSize maximumSize() const; + int minimumHeightForWidth(int arg__1) const; + QSize minimumSize() const; + void setGeometry(const QRect& rect); + QSize sizeHint() const; + QSpacerItem* spacerItem(); + QLayoutItem* takeAt(int index); + void timerEvent(QTimerEvent* event); + QWidget* widget(); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QFORMLAYOUT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFrame.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFrame.cpp new file mode 100644 index 00000000..ecc54254 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFrame.cpp @@ -0,0 +1,661 @@ +#include "qtscriptshell_QFrame.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QFrame::QtScriptShell_QFrame(QWidget* parent, Qt::WindowFlags f) + : QFrame(parent, f) {} + +QtScriptShell_QFrame::~QtScriptShell_QFrame() {} + +void QtScriptShell_QFrame::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QFrame::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QFrame::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QFrame::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QFrame::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QFrame::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QFrame::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QFrame::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QFrame::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QFrame::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFrame::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QFrame::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QFrame::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QFrame::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QFrame::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QFrame::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFrame::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QFrame::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QFrame::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QFrame::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QFrame::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QFrame::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFrame::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QFrame::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QFrame::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QFrame::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFrame::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QFrame::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QFrame::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QFrame::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QFrame::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QFrame::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QFrame::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QFrame::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QFrame::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QFrame::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QFrame::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QFrame::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QFrame::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QFrame::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QFrame::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QFrame::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QFrame::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QFrame::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QFrame::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFrame::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QFrame::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QFrame::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QFrame::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QFrame::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QFrame::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QFrame::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QFrame::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QFrame::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QFrame::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFrame::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QFrame::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QFrame::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QFrame::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QFrame::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QFrame::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QFrame::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QFrame::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QFrame::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QFrame::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QFrame::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QFrame::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QFrame::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QFrame::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFrame.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFrame.h new file mode 100644 index 00000000..8a3c94a9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QFrame.h @@ -0,0 +1,62 @@ +#ifndef QTSCRIPTSHELL_QFRAME_H +#define QTSCRIPTSHELL_QFRAME_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QFrame : public QFrame +{ +public: + QtScriptShell_QFrame(QWidget* parent = 0, Qt::WindowFlags f = Qt::WindowFlags()); + ~QtScriptShell_QFrame(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QFRAME_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGesture.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGesture.cpp new file mode 100644 index 00000000..9b2bb994 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGesture.cpp @@ -0,0 +1,92 @@ +#include "qtscriptshell_QGesture.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QGesture::QtScriptShell_QGesture(QObject* parent) + : QGesture(parent) {} + +QtScriptShell_QGesture::~QtScriptShell_QGesture() {} + +void QtScriptShell_QGesture::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGesture::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGesture::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGesture::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGesture::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGesture::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGesture::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGesture::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QGesture::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGesture::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGesture.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGesture.h new file mode 100644 index 00000000..23df25c6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGesture.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QGESTURE_H +#define QTSCRIPTSHELL_QGESTURE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGesture : public QGesture +{ +public: + QtScriptShell_QGesture(QObject* parent = 0); + ~QtScriptShell_QGesture(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGESTURE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsAnchorLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsAnchorLayout.cpp new file mode 100644 index 00000000..72773710 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsAnchorLayout.cpp @@ -0,0 +1,145 @@ +#include "qtscriptshell_QGraphicsAnchorLayout.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(qreal*) +Q_DECLARE_METATYPE(QGraphicsLayoutItem*) +Q_DECLARE_METATYPE(Qt::SizeHint) +Q_DECLARE_METATYPE(QEvent*) + +QtScriptShell_QGraphicsAnchorLayout::QtScriptShell_QGraphicsAnchorLayout(QGraphicsLayoutItem* parent) + : QGraphicsAnchorLayout(parent) {} + +QtScriptShell_QGraphicsAnchorLayout::~QtScriptShell_QGraphicsAnchorLayout() {} + +int QtScriptShell_QGraphicsAnchorLayout::count() const +{ + QScriptValue _q_function = __qtscript_self.property("count"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("count") & QScriptValue::QObjectMember)) { + return QGraphicsAnchorLayout::count(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsAnchorLayout::getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const +{ + QScriptValue _q_function = __qtscript_self.property("getContentsMargins"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getContentsMargins") & QScriptValue::QObjectMember)) { + QGraphicsAnchorLayout::getContentsMargins(left, top, right, bottom); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, left) + << qScriptValueFromValue(_q_engine, top) + << qScriptValueFromValue(_q_engine, right) + << qScriptValueFromValue(_q_engine, bottom)); + } +} + +void QtScriptShell_QGraphicsAnchorLayout::invalidate() +{ + QScriptValue _q_function = __qtscript_self.property("invalidate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("invalidate") & QScriptValue::QObjectMember)) { + QGraphicsAnchorLayout::invalidate(); + } else { + _q_function.call(__qtscript_self); + } +} + +QGraphicsLayoutItem* QtScriptShell_QGraphicsAnchorLayout::itemAt(int index) const +{ + QScriptValue _q_function = __qtscript_self.property("itemAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemAt") & QScriptValue::QObjectMember)) { + return QGraphicsAnchorLayout::itemAt(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QGraphicsAnchorLayout::removeAt(int index) +{ + QScriptValue _q_function = __qtscript_self.property("removeAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeAt") & QScriptValue::QObjectMember)) { + QGraphicsAnchorLayout::removeAt(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QGraphicsAnchorLayout::setGeometry(const QRectF& rect) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + QGraphicsAnchorLayout::setGeometry(rect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect)); + } +} + +QSizeF QtScriptShell_QGraphicsAnchorLayout::sizeHint(Qt::SizeHint which, const QSizeF& constraint) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + return QGraphicsAnchorLayout::sizeHint(which, constraint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, which) + << qScriptValueFromValue(_q_engine, constraint))); + } +} + +void QtScriptShell_QGraphicsAnchorLayout::updateGeometry() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometry") & QScriptValue::QObjectMember)) { + QGraphicsAnchorLayout::updateGeometry(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QGraphicsAnchorLayout::widgetEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("widgetEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("widgetEvent") & QScriptValue::QObjectMember)) { + QGraphicsAnchorLayout::widgetEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsAnchorLayout.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsAnchorLayout.h new file mode 100644 index 00000000..20f0ac75 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsAnchorLayout.h @@ -0,0 +1,28 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSANCHORLAYOUT_H +#define QTSCRIPTSHELL_QGRAPHICSANCHORLAYOUT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsAnchorLayout : public QGraphicsAnchorLayout +{ +public: + QtScriptShell_QGraphicsAnchorLayout(QGraphicsLayoutItem* parent = 0); + ~QtScriptShell_QGraphicsAnchorLayout(); + + int count() const; + void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const; + void invalidate(); + QGraphicsLayoutItem* itemAt(int index) const; + void removeAt(int index); + void setGeometry(const QRectF& rect); + QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint = QSizeF()) const; + void updateGeometry(); + void widgetEvent(QEvent* e); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSANCHORLAYOUT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsBlurEffect.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsBlurEffect.cpp new file mode 100644 index 00000000..01601656 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsBlurEffect.cpp @@ -0,0 +1,140 @@ +#include "qtscriptshell_QGraphicsBlurEffect.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QGraphicsBlurEffect::QtScriptShell_QGraphicsBlurEffect(QObject* parent) + : QGraphicsBlurEffect(parent) {} + +QtScriptShell_QGraphicsBlurEffect::~QtScriptShell_QGraphicsBlurEffect() {} + +QRectF QtScriptShell_QGraphicsBlurEffect::boundingRectFor(const QRectF& rect) const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRectFor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRectFor") & QScriptValue::QObjectMember)) { + return QGraphicsBlurEffect::boundingRectFor(rect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect))); + } +} + +void QtScriptShell_QGraphicsBlurEffect::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGraphicsBlurEffect::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsBlurEffect::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGraphicsBlurEffect::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsBlurEffect::draw(QPainter* painter) +{ + QScriptValue _q_function = __qtscript_self.property("draw"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("draw") & QScriptValue::QObjectMember)) { + QGraphicsBlurEffect::draw(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +bool QtScriptShell_QGraphicsBlurEffect::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGraphicsBlurEffect::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsBlurEffect::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsBlurEffect::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QGraphicsBlurEffect::sourceChanged(QGraphicsEffect::ChangeFlags flags) +{ + QScriptValue _q_function = __qtscript_self.property("sourceChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sourceChanged") & QScriptValue::QObjectMember)) { + QGraphicsBlurEffect::sourceChanged(flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, flags)); + } +} + +void QtScriptShell_QGraphicsBlurEffect::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGraphicsBlurEffect::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsBlurEffect.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsBlurEffect.h new file mode 100644 index 00000000..3882dcb0 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsBlurEffect.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSBLUREFFECT_H +#define QTSCRIPTSHELL_QGRAPHICSBLUREFFECT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsBlurEffect : public QGraphicsBlurEffect +{ +public: + QtScriptShell_QGraphicsBlurEffect(QObject* parent = 0); + ~QtScriptShell_QGraphicsBlurEffect(); + + QRectF boundingRectFor(const QRectF& rect) const; + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + void draw(QPainter* painter); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void sourceChanged(QGraphicsEffect::ChangeFlags flags); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSBLUREFFECT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsColorizeEffect.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsColorizeEffect.cpp new file mode 100644 index 00000000..388c01bc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsColorizeEffect.cpp @@ -0,0 +1,141 @@ +#include "qtscriptshell_QGraphicsColorizeEffect.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QGraphicsColorizeEffect::QtScriptShell_QGraphicsColorizeEffect(QObject* parent) + : QGraphicsColorizeEffect(parent) {} + +QtScriptShell_QGraphicsColorizeEffect::~QtScriptShell_QGraphicsColorizeEffect() {} + +QRectF QtScriptShell_QGraphicsColorizeEffect::boundingRectFor(const QRectF& sourceRect) const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRectFor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRectFor") & QScriptValue::QObjectMember)) { + return QGraphicsColorizeEffect::boundingRectFor(sourceRect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceRect))); + } +} + +void QtScriptShell_QGraphicsColorizeEffect::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGraphicsColorizeEffect::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsColorizeEffect::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGraphicsColorizeEffect::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsColorizeEffect::draw(QPainter* painter) +{ + QScriptValue _q_function = __qtscript_self.property("draw"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("draw") & QScriptValue::QObjectMember)) { + QGraphicsColorizeEffect::draw(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +bool QtScriptShell_QGraphicsColorizeEffect::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGraphicsColorizeEffect::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsColorizeEffect::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsColorizeEffect::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QGraphicsColorizeEffect::sourceChanged(QGraphicsEffect::ChangeFlags flags) +{ + QScriptValue _q_function = __qtscript_self.property("sourceChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sourceChanged") & QScriptValue::QObjectMember)) { + QGraphicsColorizeEffect::sourceChanged(flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, flags)); + } +} + +void QtScriptShell_QGraphicsColorizeEffect::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGraphicsColorizeEffect::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsColorizeEffect.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsColorizeEffect.h new file mode 100644 index 00000000..b7c430fd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsColorizeEffect.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSCOLORIZEEFFECT_H +#define QTSCRIPTSHELL_QGRAPHICSCOLORIZEEFFECT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsColorizeEffect : public QGraphicsColorizeEffect +{ +public: + QtScriptShell_QGraphicsColorizeEffect(QObject* parent = 0); + ~QtScriptShell_QGraphicsColorizeEffect(); + + QRectF boundingRectFor(const QRectF& sourceRect) const; + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + void draw(QPainter* painter); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void sourceChanged(QGraphicsEffect::ChangeFlags flags); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSCOLORIZEEFFECT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsDropShadowEffect.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsDropShadowEffect.cpp new file mode 100644 index 00000000..6c439b00 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsDropShadowEffect.cpp @@ -0,0 +1,141 @@ +#include "qtscriptshell_QGraphicsDropShadowEffect.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QGraphicsDropShadowEffect::QtScriptShell_QGraphicsDropShadowEffect(QObject* parent) + : QGraphicsDropShadowEffect(parent) {} + +QtScriptShell_QGraphicsDropShadowEffect::~QtScriptShell_QGraphicsDropShadowEffect() {} + +QRectF QtScriptShell_QGraphicsDropShadowEffect::boundingRectFor(const QRectF& rect) const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRectFor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRectFor") & QScriptValue::QObjectMember)) { + return QGraphicsDropShadowEffect::boundingRectFor(rect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect))); + } +} + +void QtScriptShell_QGraphicsDropShadowEffect::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGraphicsDropShadowEffect::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsDropShadowEffect::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGraphicsDropShadowEffect::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsDropShadowEffect::draw(QPainter* painter) +{ + QScriptValue _q_function = __qtscript_self.property("draw"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("draw") & QScriptValue::QObjectMember)) { + QGraphicsDropShadowEffect::draw(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +bool QtScriptShell_QGraphicsDropShadowEffect::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGraphicsDropShadowEffect::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsDropShadowEffect::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsDropShadowEffect::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QGraphicsDropShadowEffect::sourceChanged(QGraphicsEffect::ChangeFlags flags) +{ + QScriptValue _q_function = __qtscript_self.property("sourceChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sourceChanged") & QScriptValue::QObjectMember)) { + QGraphicsDropShadowEffect::sourceChanged(flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, flags)); + } +} + +void QtScriptShell_QGraphicsDropShadowEffect::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGraphicsDropShadowEffect::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsDropShadowEffect.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsDropShadowEffect.h new file mode 100644 index 00000000..b6785cdd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsDropShadowEffect.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSDROPSHADOWEFFECT_H +#define QTSCRIPTSHELL_QGRAPHICSDROPSHADOWEFFECT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsDropShadowEffect : public QGraphicsDropShadowEffect +{ +public: + QtScriptShell_QGraphicsDropShadowEffect(QObject* parent = 0); + ~QtScriptShell_QGraphicsDropShadowEffect(); + + QRectF boundingRectFor(const QRectF& rect) const; + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + void draw(QPainter* painter); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void sourceChanged(QGraphicsEffect::ChangeFlags flags); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSDROPSHADOWEFFECT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsEffect.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsEffect.cpp new file mode 100644 index 00000000..c87b2db0 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsEffect.cpp @@ -0,0 +1,140 @@ +#include "qtscriptshell_QGraphicsEffect.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QGraphicsEffect::QtScriptShell_QGraphicsEffect(QObject* parent) + : QGraphicsEffect(parent) {} + +QtScriptShell_QGraphicsEffect::~QtScriptShell_QGraphicsEffect() {} + +QRectF QtScriptShell_QGraphicsEffect::boundingRectFor(const QRectF& sourceRect) const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRectFor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRectFor") & QScriptValue::QObjectMember)) { + return QGraphicsEffect::boundingRectFor(sourceRect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceRect))); + } +} + +void QtScriptShell_QGraphicsEffect::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGraphicsEffect::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsEffect::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGraphicsEffect::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsEffect::draw(QPainter* painter) +{ + QScriptValue _q_function = __qtscript_self.property("draw"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("draw") & QScriptValue::QObjectMember)) { + qFatal("QGraphicsEffect::draw() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +bool QtScriptShell_QGraphicsEffect::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGraphicsEffect::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsEffect::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsEffect::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QGraphicsEffect::sourceChanged(QGraphicsEffect::ChangeFlags flags) +{ + QScriptValue _q_function = __qtscript_self.property("sourceChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sourceChanged") & QScriptValue::QObjectMember)) { + QGraphicsEffect::sourceChanged(flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, flags)); + } +} + +void QtScriptShell_QGraphicsEffect::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGraphicsEffect::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsEffect.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsEffect.h new file mode 100644 index 00000000..1dc5645b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsEffect.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSEFFECT_H +#define QTSCRIPTSHELL_QGRAPHICSEFFECT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsEffect : public QGraphicsEffect +{ +public: + QtScriptShell_QGraphicsEffect(QObject* parent = 0); + ~QtScriptShell_QGraphicsEffect(); + + QRectF boundingRectFor(const QRectF& sourceRect) const; + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + void draw(QPainter* painter); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void sourceChanged(QGraphicsEffect::ChangeFlags flags); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSEFFECT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsEllipseItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsEllipseItem.cpp new file mode 100644 index 00000000..bd11e648 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsEllipseItem.cpp @@ -0,0 +1,514 @@ +#include "qtscriptshell_QGraphicsEllipseItem.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneDragDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneHoverEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemChange) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMouseEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneWheelEvent*) + +QtScriptShell_QGraphicsEllipseItem::QtScriptShell_QGraphicsEllipseItem(QGraphicsItem* parent) + : QGraphicsEllipseItem(parent) {} + +QtScriptShell_QGraphicsEllipseItem::QtScriptShell_QGraphicsEllipseItem(const QRectF& rect, QGraphicsItem* parent) + : QGraphicsEllipseItem(rect, parent) {} + +QtScriptShell_QGraphicsEllipseItem::QtScriptShell_QGraphicsEllipseItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem* parent) + : QGraphicsEllipseItem(x, y, w, h, parent) {} + +QtScriptShell_QGraphicsEllipseItem::~QtScriptShell_QGraphicsEllipseItem() {} + +void QtScriptShell_QGraphicsEllipseItem::advance(int phase) +{ + QScriptValue _q_function = __qtscript_self.property("advance"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("advance") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::advance(phase); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, phase)); + } +} + +QRectF QtScriptShell_QGraphicsEllipseItem::boundingRect() const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRect") & QScriptValue::QObjectMember)) { + return QGraphicsEllipseItem::boundingRect(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QGraphicsEllipseItem::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithItem") & QScriptValue::QObjectMember)) { + return QGraphicsEllipseItem::collidesWithItem(other, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(other)) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsEllipseItem::collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithPath"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithPath") & QScriptValue::QObjectMember)) { + return QGraphicsEllipseItem::collidesWithPath(path, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, path) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsEllipseItem::contains(const QPointF& point) const +{ + QScriptValue _q_function = __qtscript_self.property("contains"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contains") & QScriptValue::QObjectMember)) { + return QGraphicsEllipseItem::contains(point); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, point))); + } +} + +void QtScriptShell_QGraphicsEllipseItem::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsEllipseItem::dragEnterEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsEllipseItem::dragLeaveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsEllipseItem::dragMoveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsEllipseItem::dropEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsEllipseItem::extension(const QVariant& variant) const +{ + QScriptValue _q_function = __qtscript_self.property("extension"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("extension") & QScriptValue::QObjectMember)) { + return QGraphicsEllipseItem::extension(variant); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, variant))); + } +} + +void QtScriptShell_QGraphicsEllipseItem::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsEllipseItem::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsEllipseItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::hoverEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsEllipseItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::hoverLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsEllipseItem::hoverMoveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::hoverMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsEllipseItem::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsEllipseItem::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGraphicsEllipseItem::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QGraphicsEllipseItem::isObscuredBy(const QGraphicsItem* item) const +{ + QScriptValue _q_function = __qtscript_self.property("isObscuredBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isObscuredBy") & QScriptValue::QObjectMember)) { + return QGraphicsEllipseItem::isObscuredBy(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(item)))); + } +} + +QVariant QtScriptShell_QGraphicsEllipseItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("itemChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemChange") & QScriptValue::QObjectMember)) { + return QGraphicsEllipseItem::itemChange(change, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, change) + << qScriptValueFromValue(_q_engine, value))); + } +} + +void QtScriptShell_QGraphicsEllipseItem::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsEllipseItem::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsEllipseItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsEllipseItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsEllipseItem::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsEllipseItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainterPath QtScriptShell_QGraphicsEllipseItem::opaqueArea() const +{ + QScriptValue _q_function = __qtscript_self.property("opaqueArea"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("opaqueArea") & QScriptValue::QObjectMember)) { + return QGraphicsEllipseItem::opaqueArea(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsEllipseItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::paint(painter, option, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +bool QtScriptShell_QGraphicsEllipseItem::sceneEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEvent") & QScriptValue::QObjectMember)) { + return QGraphicsEllipseItem::sceneEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsEllipseItem::sceneEventFilter(QGraphicsItem* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsEllipseItem::sceneEventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QPainterPath QtScriptShell_QGraphicsEllipseItem::shape() const +{ + QScriptValue _q_function = __qtscript_self.property("shape"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("shape") & QScriptValue::QObjectMember)) { + return QGraphicsEllipseItem::shape(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QGraphicsEllipseItem::type() const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + return QGraphicsEllipseItem::type(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsEllipseItem::wheelEvent(QGraphicsSceneWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGraphicsEllipseItem::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsEllipseItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsEllipseItem.h new file mode 100644 index 00000000..b8463251 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsEllipseItem.h @@ -0,0 +1,54 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSELLIPSEITEM_H +#define QTSCRIPTSHELL_QGRAPHICSELLIPSEITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsEllipseItem : public QGraphicsEllipseItem +{ +public: + QtScriptShell_QGraphicsEllipseItem(QGraphicsItem* parent = 0); + QtScriptShell_QGraphicsEllipseItem(const QRectF& rect, QGraphicsItem* parent = 0); + QtScriptShell_QGraphicsEllipseItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem* parent = 0); + ~QtScriptShell_QGraphicsEllipseItem(); + + void advance(int phase); + QRectF boundingRect() const; + bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const; + bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const; + bool contains(const QPointF& point) const; + void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); + void dragEnterEvent(QGraphicsSceneDragDropEvent* event); + void dragLeaveEvent(QGraphicsSceneDragDropEvent* event); + void dragMoveEvent(QGraphicsSceneDragDropEvent* event); + void dropEvent(QGraphicsSceneDragDropEvent* event); + QVariant extension(const QVariant& variant) const; + void focusInEvent(QFocusEvent* event); + void focusOutEvent(QFocusEvent* event); + void hoverEnterEvent(QGraphicsSceneHoverEvent* event); + void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); + void hoverMoveEvent(QGraphicsSceneHoverEvent* event); + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isObscuredBy(const QGraphicsItem* item) const; + QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value); + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + QPainterPath opaqueArea() const; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); + bool sceneEvent(QEvent* event); + bool sceneEventFilter(QGraphicsItem* watched, QEvent* event); + QPainterPath shape() const; + int type() const; + void wheelEvent(QGraphicsSceneWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSELLIPSEITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsGridLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsGridLayout.cpp new file mode 100644 index 00000000..9ba0dfeb --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsGridLayout.cpp @@ -0,0 +1,145 @@ +#include "qtscriptshell_QGraphicsGridLayout.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(qreal*) +Q_DECLARE_METATYPE(QGraphicsLayoutItem*) +Q_DECLARE_METATYPE(Qt::SizeHint) +Q_DECLARE_METATYPE(QEvent*) + +QtScriptShell_QGraphicsGridLayout::QtScriptShell_QGraphicsGridLayout(QGraphicsLayoutItem* parent) + : QGraphicsGridLayout(parent) {} + +QtScriptShell_QGraphicsGridLayout::~QtScriptShell_QGraphicsGridLayout() {} + +int QtScriptShell_QGraphicsGridLayout::count() const +{ + QScriptValue _q_function = __qtscript_self.property("count"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("count") & QScriptValue::QObjectMember)) { + return QGraphicsGridLayout::count(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsGridLayout::getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const +{ + QScriptValue _q_function = __qtscript_self.property("getContentsMargins"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getContentsMargins") & QScriptValue::QObjectMember)) { + QGraphicsGridLayout::getContentsMargins(left, top, right, bottom); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, left) + << qScriptValueFromValue(_q_engine, top) + << qScriptValueFromValue(_q_engine, right) + << qScriptValueFromValue(_q_engine, bottom)); + } +} + +void QtScriptShell_QGraphicsGridLayout::invalidate() +{ + QScriptValue _q_function = __qtscript_self.property("invalidate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("invalidate") & QScriptValue::QObjectMember)) { + QGraphicsGridLayout::invalidate(); + } else { + _q_function.call(__qtscript_self); + } +} + +QGraphicsLayoutItem* QtScriptShell_QGraphicsGridLayout::itemAt(int index) const +{ + QScriptValue _q_function = __qtscript_self.property("itemAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemAt") & QScriptValue::QObjectMember)) { + return QGraphicsGridLayout::itemAt(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QGraphicsGridLayout::removeAt(int index) +{ + QScriptValue _q_function = __qtscript_self.property("removeAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeAt") & QScriptValue::QObjectMember)) { + QGraphicsGridLayout::removeAt(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QGraphicsGridLayout::setGeometry(const QRectF& rect) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + QGraphicsGridLayout::setGeometry(rect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect)); + } +} + +QSizeF QtScriptShell_QGraphicsGridLayout::sizeHint(Qt::SizeHint which, const QSizeF& constraint) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + return QGraphicsGridLayout::sizeHint(which, constraint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, which) + << qScriptValueFromValue(_q_engine, constraint))); + } +} + +void QtScriptShell_QGraphicsGridLayout::updateGeometry() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometry") & QScriptValue::QObjectMember)) { + QGraphicsGridLayout::updateGeometry(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QGraphicsGridLayout::widgetEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("widgetEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("widgetEvent") & QScriptValue::QObjectMember)) { + QGraphicsGridLayout::widgetEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsGridLayout.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsGridLayout.h new file mode 100644 index 00000000..0f172555 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsGridLayout.h @@ -0,0 +1,28 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSGRIDLAYOUT_H +#define QTSCRIPTSHELL_QGRAPHICSGRIDLAYOUT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsGridLayout : public QGraphicsGridLayout +{ +public: + QtScriptShell_QGraphicsGridLayout(QGraphicsLayoutItem* parent = 0); + ~QtScriptShell_QGraphicsGridLayout(); + + int count() const; + void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const; + void invalidate(); + QGraphicsLayoutItem* itemAt(int index) const; + void removeAt(int index); + void setGeometry(const QRectF& rect); + QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint = QSizeF()) const; + void updateGeometry(); + void widgetEvent(QEvent* e); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSGRIDLAYOUT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItem.cpp new file mode 100644 index 00000000..3e4891eb --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItem.cpp @@ -0,0 +1,506 @@ +#include "qtscriptshell_QGraphicsItem.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneDragDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneHoverEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemChange) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMouseEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneWheelEvent*) + +QtScriptShell_QGraphicsItem::QtScriptShell_QGraphicsItem(QGraphicsItem* parent) + : QGraphicsItem(parent) {} + +QtScriptShell_QGraphicsItem::~QtScriptShell_QGraphicsItem() {} + +void QtScriptShell_QGraphicsItem::advance(int phase) +{ + QScriptValue _q_function = __qtscript_self.property("advance"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("advance") & QScriptValue::QObjectMember)) { + QGraphicsItem::advance(phase); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, phase)); + } +} + +QRectF QtScriptShell_QGraphicsItem::boundingRect() const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRect") & QScriptValue::QObjectMember)) { + qFatal("QGraphicsItem::boundingRect() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QGraphicsItem::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithItem") & QScriptValue::QObjectMember)) { + return QGraphicsItem::collidesWithItem(other, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(other)) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsItem::collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithPath"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithPath") & QScriptValue::QObjectMember)) { + return QGraphicsItem::collidesWithPath(path, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, path) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsItem::contains(const QPointF& point) const +{ + QScriptValue _q_function = __qtscript_self.property("contains"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contains") & QScriptValue::QObjectMember)) { + return QGraphicsItem::contains(point); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, point))); + } +} + +void QtScriptShell_QGraphicsItem::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItem::dragEnterEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItem::dragLeaveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItem::dragMoveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItem::dropEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsItem::extension(const QVariant& variant) const +{ + QScriptValue _q_function = __qtscript_self.property("extension"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("extension") & QScriptValue::QObjectMember)) { + return QGraphicsItem::extension(variant); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, variant))); + } +} + +void QtScriptShell_QGraphicsItem::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItem::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::hoverEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::hoverLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItem::hoverMoveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::hoverMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItem::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsItem::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGraphicsItem::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QGraphicsItem::isObscuredBy(const QGraphicsItem* item) const +{ + QScriptValue _q_function = __qtscript_self.property("isObscuredBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isObscuredBy") & QScriptValue::QObjectMember)) { + return QGraphicsItem::isObscuredBy(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(item)))); + } +} + +QVariant QtScriptShell_QGraphicsItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("itemChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemChange") & QScriptValue::QObjectMember)) { + return QGraphicsItem::itemChange(change, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, change) + << qScriptValueFromValue(_q_engine, value))); + } +} + +void QtScriptShell_QGraphicsItem::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItem::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainterPath QtScriptShell_QGraphicsItem::opaqueArea() const +{ + QScriptValue _q_function = __qtscript_self.property("opaqueArea"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("opaqueArea") & QScriptValue::QObjectMember)) { + return QGraphicsItem::opaqueArea(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + qFatal("QGraphicsItem::paint() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +bool QtScriptShell_QGraphicsItem::sceneEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEvent") & QScriptValue::QObjectMember)) { + return QGraphicsItem::sceneEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsItem::sceneEventFilter(QGraphicsItem* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsItem::sceneEventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QPainterPath QtScriptShell_QGraphicsItem::shape() const +{ + QScriptValue _q_function = __qtscript_self.property("shape"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("shape") & QScriptValue::QObjectMember)) { + return QGraphicsItem::shape(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QGraphicsItem::type() const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + return QGraphicsItem::type(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsItem::wheelEvent(QGraphicsSceneWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGraphicsItem::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItem.h new file mode 100644 index 00000000..f980e7f7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItem.h @@ -0,0 +1,52 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSITEM_H +#define QTSCRIPTSHELL_QGRAPHICSITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsItem : public QGraphicsItem +{ +public: + QtScriptShell_QGraphicsItem(QGraphicsItem* parent = 0); + ~QtScriptShell_QGraphicsItem(); + + void advance(int phase); + QRectF boundingRect() const; + bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const; + bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape) const; + bool contains(const QPointF& point) const; + void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); + void dragEnterEvent(QGraphicsSceneDragDropEvent* event); + void dragLeaveEvent(QGraphicsSceneDragDropEvent* event); + void dragMoveEvent(QGraphicsSceneDragDropEvent* event); + void dropEvent(QGraphicsSceneDragDropEvent* event); + QVariant extension(const QVariant& variant) const; + void focusInEvent(QFocusEvent* event); + void focusOutEvent(QFocusEvent* event); + void hoverEnterEvent(QGraphicsSceneHoverEvent* event); + void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); + void hoverMoveEvent(QGraphicsSceneHoverEvent* event); + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isObscuredBy(const QGraphicsItem* item) const; + QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value); + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + QPainterPath opaqueArea() const; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); + bool sceneEvent(QEvent* event); + bool sceneEventFilter(QGraphicsItem* watched, QEvent* event); + QPainterPath shape() const; + int type() const; + void wheelEvent(QGraphicsSceneWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItemAnimation.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItemAnimation.cpp new file mode 100644 index 00000000..a2c134f5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItemAnimation.cpp @@ -0,0 +1,126 @@ +#include "qtscriptshell_QGraphicsItemAnimation.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QGraphicsItemAnimation::QtScriptShell_QGraphicsItemAnimation(QObject* parent) + : QGraphicsItemAnimation(parent) {} + +QtScriptShell_QGraphicsItemAnimation::~QtScriptShell_QGraphicsItemAnimation() {} + +void QtScriptShell_QGraphicsItemAnimation::afterAnimationStep(qreal step) +{ + QScriptValue _q_function = __qtscript_self.property("afterAnimationStep"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("afterAnimationStep") & QScriptValue::QObjectMember)) { + QGraphicsItemAnimation::afterAnimationStep(step); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, step)); + } +} + +void QtScriptShell_QGraphicsItemAnimation::beforeAnimationStep(qreal step) +{ + QScriptValue _q_function = __qtscript_self.property("beforeAnimationStep"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("beforeAnimationStep") & QScriptValue::QObjectMember)) { + QGraphicsItemAnimation::beforeAnimationStep(step); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, step)); + } +} + +void QtScriptShell_QGraphicsItemAnimation::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemAnimation::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItemAnimation::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemAnimation::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsItemAnimation::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGraphicsItemAnimation::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsItemAnimation::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsItemAnimation::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QGraphicsItemAnimation::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemAnimation::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItemAnimation.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItemAnimation.h new file mode 100644 index 00000000..ec883980 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItemAnimation.h @@ -0,0 +1,26 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSITEMANIMATION_H +#define QTSCRIPTSHELL_QGRAPHICSITEMANIMATION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsItemAnimation : public QGraphicsItemAnimation +{ +public: + QtScriptShell_QGraphicsItemAnimation(QObject* parent = 0); + ~QtScriptShell_QGraphicsItemAnimation(); + + void afterAnimationStep(qreal step); + void beforeAnimationStep(qreal step); + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSITEMANIMATION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItemGroup.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItemGroup.cpp new file mode 100644 index 00000000..2029809a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItemGroup.cpp @@ -0,0 +1,506 @@ +#include "qtscriptshell_QGraphicsItemGroup.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneDragDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneHoverEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemChange) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMouseEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneWheelEvent*) + +QtScriptShell_QGraphicsItemGroup::QtScriptShell_QGraphicsItemGroup(QGraphicsItem* parent) + : QGraphicsItemGroup(parent) {} + +QtScriptShell_QGraphicsItemGroup::~QtScriptShell_QGraphicsItemGroup() {} + +void QtScriptShell_QGraphicsItemGroup::advance(int phase) +{ + QScriptValue _q_function = __qtscript_self.property("advance"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("advance") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::advance(phase); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, phase)); + } +} + +QRectF QtScriptShell_QGraphicsItemGroup::boundingRect() const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRect") & QScriptValue::QObjectMember)) { + return QGraphicsItemGroup::boundingRect(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QGraphicsItemGroup::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithItem") & QScriptValue::QObjectMember)) { + return QGraphicsItemGroup::collidesWithItem(other, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(other)) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsItemGroup::collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithPath"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithPath") & QScriptValue::QObjectMember)) { + return QGraphicsItemGroup::collidesWithPath(path, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, path) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsItemGroup::contains(const QPointF& point) const +{ + QScriptValue _q_function = __qtscript_self.property("contains"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contains") & QScriptValue::QObjectMember)) { + return QGraphicsItemGroup::contains(point); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, point))); + } +} + +void QtScriptShell_QGraphicsItemGroup::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItemGroup::dragEnterEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItemGroup::dragLeaveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItemGroup::dragMoveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItemGroup::dropEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsItemGroup::extension(const QVariant& variant) const +{ + QScriptValue _q_function = __qtscript_self.property("extension"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("extension") & QScriptValue::QObjectMember)) { + return QGraphicsItemGroup::extension(variant); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, variant))); + } +} + +void QtScriptShell_QGraphicsItemGroup::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItemGroup::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItemGroup::hoverEnterEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::hoverEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItemGroup::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::hoverLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItemGroup::hoverMoveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::hoverMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItemGroup::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsItemGroup::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGraphicsItemGroup::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QGraphicsItemGroup::isObscuredBy(const QGraphicsItem* item) const +{ + QScriptValue _q_function = __qtscript_self.property("isObscuredBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isObscuredBy") & QScriptValue::QObjectMember)) { + return QGraphicsItemGroup::isObscuredBy(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(item)))); + } +} + +QVariant QtScriptShell_QGraphicsItemGroup::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("itemChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemChange") & QScriptValue::QObjectMember)) { + return QGraphicsItemGroup::itemChange(change, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, change) + << qScriptValueFromValue(_q_engine, value))); + } +} + +void QtScriptShell_QGraphicsItemGroup::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItemGroup::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItemGroup::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItemGroup::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItemGroup::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsItemGroup::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainterPath QtScriptShell_QGraphicsItemGroup::opaqueArea() const +{ + QScriptValue _q_function = __qtscript_self.property("opaqueArea"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("opaqueArea") & QScriptValue::QObjectMember)) { + return QGraphicsItemGroup::opaqueArea(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsItemGroup::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::paint(painter, option, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +bool QtScriptShell_QGraphicsItemGroup::sceneEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEvent") & QScriptValue::QObjectMember)) { + return QGraphicsItemGroup::sceneEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsItemGroup::sceneEventFilter(QGraphicsItem* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsItemGroup::sceneEventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QPainterPath QtScriptShell_QGraphicsItemGroup::shape() const +{ + QScriptValue _q_function = __qtscript_self.property("shape"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("shape") & QScriptValue::QObjectMember)) { + return QGraphicsItemGroup::shape(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QGraphicsItemGroup::type() const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + return QGraphicsItemGroup::type(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsItemGroup::wheelEvent(QGraphicsSceneWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGraphicsItemGroup::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItemGroup.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItemGroup.h new file mode 100644 index 00000000..20fb7b14 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsItemGroup.h @@ -0,0 +1,52 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSITEMGROUP_H +#define QTSCRIPTSHELL_QGRAPHICSITEMGROUP_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsItemGroup : public QGraphicsItemGroup +{ +public: + QtScriptShell_QGraphicsItemGroup(QGraphicsItem* parent = 0); + ~QtScriptShell_QGraphicsItemGroup(); + + void advance(int phase); + QRectF boundingRect() const; + bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const; + bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const; + bool contains(const QPointF& point) const; + void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); + void dragEnterEvent(QGraphicsSceneDragDropEvent* event); + void dragLeaveEvent(QGraphicsSceneDragDropEvent* event); + void dragMoveEvent(QGraphicsSceneDragDropEvent* event); + void dropEvent(QGraphicsSceneDragDropEvent* event); + QVariant extension(const QVariant& variant) const; + void focusInEvent(QFocusEvent* event); + void focusOutEvent(QFocusEvent* event); + void hoverEnterEvent(QGraphicsSceneHoverEvent* event); + void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); + void hoverMoveEvent(QGraphicsSceneHoverEvent* event); + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isObscuredBy(const QGraphicsItem* item) const; + QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value); + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + QPainterPath opaqueArea() const; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); + bool sceneEvent(QEvent* event); + bool sceneEventFilter(QGraphicsItem* watched, QEvent* event); + QPainterPath shape() const; + int type() const; + void wheelEvent(QGraphicsSceneWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSITEMGROUP_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLayout.cpp new file mode 100644 index 00000000..db8517ac --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLayout.cpp @@ -0,0 +1,145 @@ +#include "qtscriptshell_QGraphicsLayout.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(qreal*) +Q_DECLARE_METATYPE(QGraphicsLayoutItem*) +Q_DECLARE_METATYPE(Qt::SizeHint) +Q_DECLARE_METATYPE(QEvent*) + +QtScriptShell_QGraphicsLayout::QtScriptShell_QGraphicsLayout(QGraphicsLayoutItem* parent) + : QGraphicsLayout(parent) {} + +QtScriptShell_QGraphicsLayout::~QtScriptShell_QGraphicsLayout() {} + +int QtScriptShell_QGraphicsLayout::count() const +{ + QScriptValue _q_function = __qtscript_self.property("count"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("count") & QScriptValue::QObjectMember)) { + qFatal("QGraphicsLayout::count() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsLayout::getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const +{ + QScriptValue _q_function = __qtscript_self.property("getContentsMargins"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getContentsMargins") & QScriptValue::QObjectMember)) { + QGraphicsLayout::getContentsMargins(left, top, right, bottom); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, left) + << qScriptValueFromValue(_q_engine, top) + << qScriptValueFromValue(_q_engine, right) + << qScriptValueFromValue(_q_engine, bottom)); + } +} + +void QtScriptShell_QGraphicsLayout::invalidate() +{ + QScriptValue _q_function = __qtscript_self.property("invalidate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("invalidate") & QScriptValue::QObjectMember)) { + QGraphicsLayout::invalidate(); + } else { + _q_function.call(__qtscript_self); + } +} + +QGraphicsLayoutItem* QtScriptShell_QGraphicsLayout::itemAt(int i) const +{ + QScriptValue _q_function = __qtscript_self.property("itemAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemAt") & QScriptValue::QObjectMember)) { + qFatal("QGraphicsLayout::itemAt() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, i))); + } +} + +void QtScriptShell_QGraphicsLayout::removeAt(int index) +{ + QScriptValue _q_function = __qtscript_self.property("removeAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeAt") & QScriptValue::QObjectMember)) { + qFatal("QGraphicsLayout::removeAt() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QGraphicsLayout::setGeometry(const QRectF& rect) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + QGraphicsLayout::setGeometry(rect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect)); + } +} + +QSizeF QtScriptShell_QGraphicsLayout::sizeHint(Qt::SizeHint which, const QSizeF& constraint) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + qFatal("QGraphicsLayout::sizeHint() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, which) + << qScriptValueFromValue(_q_engine, constraint))); + } +} + +void QtScriptShell_QGraphicsLayout::updateGeometry() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometry") & QScriptValue::QObjectMember)) { + QGraphicsLayout::updateGeometry(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QGraphicsLayout::widgetEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("widgetEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("widgetEvent") & QScriptValue::QObjectMember)) { + QGraphicsLayout::widgetEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLayout.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLayout.h new file mode 100644 index 00000000..12554240 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLayout.h @@ -0,0 +1,28 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSLAYOUT_H +#define QTSCRIPTSHELL_QGRAPHICSLAYOUT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsLayout : public QGraphicsLayout +{ +public: + QtScriptShell_QGraphicsLayout(QGraphicsLayoutItem* parent = 0); + ~QtScriptShell_QGraphicsLayout(); + + int count() const; + void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const; + void invalidate(); + QGraphicsLayoutItem* itemAt(int i) const; + void removeAt(int index); + void setGeometry(const QRectF& rect); + QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint) const; + void updateGeometry(); + void widgetEvent(QEvent* e); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSLAYOUT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLayoutItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLayoutItem.cpp new file mode 100644 index 00000000..2c6c7f59 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLayoutItem.cpp @@ -0,0 +1,77 @@ +#include "qtscriptshell_QGraphicsLayoutItem.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(qreal*) +Q_DECLARE_METATYPE(Qt::SizeHint) + +QtScriptShell_QGraphicsLayoutItem::QtScriptShell_QGraphicsLayoutItem(QGraphicsLayoutItem* parent, bool isLayout) + : QGraphicsLayoutItem(parent, isLayout) {} + +QtScriptShell_QGraphicsLayoutItem::~QtScriptShell_QGraphicsLayoutItem() {} + +void QtScriptShell_QGraphicsLayoutItem::getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const +{ + QScriptValue _q_function = __qtscript_self.property("getContentsMargins"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getContentsMargins") & QScriptValue::QObjectMember)) { + QGraphicsLayoutItem::getContentsMargins(left, top, right, bottom); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, left) + << qScriptValueFromValue(_q_engine, top) + << qScriptValueFromValue(_q_engine, right) + << qScriptValueFromValue(_q_engine, bottom)); + } +} + +void QtScriptShell_QGraphicsLayoutItem::setGeometry(const QRectF& rect) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + QGraphicsLayoutItem::setGeometry(rect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect)); + } +} + +QSizeF QtScriptShell_QGraphicsLayoutItem::sizeHint(Qt::SizeHint which, const QSizeF& constraint) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + qFatal("QGraphicsLayoutItem::sizeHint() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, which) + << qScriptValueFromValue(_q_engine, constraint))); + } +} + +void QtScriptShell_QGraphicsLayoutItem::updateGeometry() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometry") & QScriptValue::QObjectMember)) { + QGraphicsLayoutItem::updateGeometry(); + } else { + _q_function.call(__qtscript_self); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLayoutItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLayoutItem.h new file mode 100644 index 00000000..a1f2d9c0 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLayoutItem.h @@ -0,0 +1,23 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSLAYOUTITEM_H +#define QTSCRIPTSHELL_QGRAPHICSLAYOUTITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsLayoutItem : public QGraphicsLayoutItem +{ +public: + QtScriptShell_QGraphicsLayoutItem(QGraphicsLayoutItem* parent = 0, bool isLayout = false); + ~QtScriptShell_QGraphicsLayoutItem(); + + void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const; + void setGeometry(const QRectF& rect); + QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint = QSizeF()) const; + void updateGeometry(); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSLAYOUTITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLineItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLineItem.cpp new file mode 100644 index 00000000..4167c957 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLineItem.cpp @@ -0,0 +1,514 @@ +#include "qtscriptshell_QGraphicsLineItem.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneDragDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneHoverEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemChange) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMouseEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneWheelEvent*) + +QtScriptShell_QGraphicsLineItem::QtScriptShell_QGraphicsLineItem(QGraphicsItem* parent) + : QGraphicsLineItem(parent) {} + +QtScriptShell_QGraphicsLineItem::QtScriptShell_QGraphicsLineItem(const QLineF& line, QGraphicsItem* parent) + : QGraphicsLineItem(line, parent) {} + +QtScriptShell_QGraphicsLineItem::QtScriptShell_QGraphicsLineItem(qreal x1, qreal y1, qreal x2, qreal y2, QGraphicsItem* parent) + : QGraphicsLineItem(x1, y1, x2, y2, parent) {} + +QtScriptShell_QGraphicsLineItem::~QtScriptShell_QGraphicsLineItem() {} + +void QtScriptShell_QGraphicsLineItem::advance(int phase) +{ + QScriptValue _q_function = __qtscript_self.property("advance"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("advance") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::advance(phase); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, phase)); + } +} + +QRectF QtScriptShell_QGraphicsLineItem::boundingRect() const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRect") & QScriptValue::QObjectMember)) { + return QGraphicsLineItem::boundingRect(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QGraphicsLineItem::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithItem") & QScriptValue::QObjectMember)) { + return QGraphicsLineItem::collidesWithItem(other, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(other)) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsLineItem::collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithPath"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithPath") & QScriptValue::QObjectMember)) { + return QGraphicsLineItem::collidesWithPath(path, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, path) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsLineItem::contains(const QPointF& point) const +{ + QScriptValue _q_function = __qtscript_self.property("contains"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contains") & QScriptValue::QObjectMember)) { + return QGraphicsLineItem::contains(point); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, point))); + } +} + +void QtScriptShell_QGraphicsLineItem::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsLineItem::dragEnterEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsLineItem::dragLeaveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsLineItem::dragMoveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsLineItem::dropEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsLineItem::extension(const QVariant& variant) const +{ + QScriptValue _q_function = __qtscript_self.property("extension"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("extension") & QScriptValue::QObjectMember)) { + return QGraphicsLineItem::extension(variant); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, variant))); + } +} + +void QtScriptShell_QGraphicsLineItem::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsLineItem::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsLineItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::hoverEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsLineItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::hoverLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsLineItem::hoverMoveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::hoverMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsLineItem::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsLineItem::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGraphicsLineItem::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QGraphicsLineItem::isObscuredBy(const QGraphicsItem* item) const +{ + QScriptValue _q_function = __qtscript_self.property("isObscuredBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isObscuredBy") & QScriptValue::QObjectMember)) { + return QGraphicsLineItem::isObscuredBy(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(item)))); + } +} + +QVariant QtScriptShell_QGraphicsLineItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("itemChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemChange") & QScriptValue::QObjectMember)) { + return QGraphicsLineItem::itemChange(change, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, change) + << qScriptValueFromValue(_q_engine, value))); + } +} + +void QtScriptShell_QGraphicsLineItem::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsLineItem::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsLineItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsLineItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsLineItem::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsLineItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainterPath QtScriptShell_QGraphicsLineItem::opaqueArea() const +{ + QScriptValue _q_function = __qtscript_self.property("opaqueArea"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("opaqueArea") & QScriptValue::QObjectMember)) { + return QGraphicsLineItem::opaqueArea(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsLineItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::paint(painter, option, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +bool QtScriptShell_QGraphicsLineItem::sceneEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEvent") & QScriptValue::QObjectMember)) { + return QGraphicsLineItem::sceneEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsLineItem::sceneEventFilter(QGraphicsItem* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsLineItem::sceneEventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QPainterPath QtScriptShell_QGraphicsLineItem::shape() const +{ + QScriptValue _q_function = __qtscript_self.property("shape"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("shape") & QScriptValue::QObjectMember)) { + return QGraphicsLineItem::shape(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QGraphicsLineItem::type() const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + return QGraphicsLineItem::type(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsLineItem::wheelEvent(QGraphicsSceneWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGraphicsLineItem::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLineItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLineItem.h new file mode 100644 index 00000000..ba921605 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLineItem.h @@ -0,0 +1,54 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSLINEITEM_H +#define QTSCRIPTSHELL_QGRAPHICSLINEITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsLineItem : public QGraphicsLineItem +{ +public: + QtScriptShell_QGraphicsLineItem(QGraphicsItem* parent = 0); + QtScriptShell_QGraphicsLineItem(const QLineF& line, QGraphicsItem* parent = 0); + QtScriptShell_QGraphicsLineItem(qreal x1, qreal y1, qreal x2, qreal y2, QGraphicsItem* parent = 0); + ~QtScriptShell_QGraphicsLineItem(); + + void advance(int phase); + QRectF boundingRect() const; + bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const; + bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const; + bool contains(const QPointF& point) const; + void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); + void dragEnterEvent(QGraphicsSceneDragDropEvent* event); + void dragLeaveEvent(QGraphicsSceneDragDropEvent* event); + void dragMoveEvent(QGraphicsSceneDragDropEvent* event); + void dropEvent(QGraphicsSceneDragDropEvent* event); + QVariant extension(const QVariant& variant) const; + void focusInEvent(QFocusEvent* event); + void focusOutEvent(QFocusEvent* event); + void hoverEnterEvent(QGraphicsSceneHoverEvent* event); + void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); + void hoverMoveEvent(QGraphicsSceneHoverEvent* event); + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isObscuredBy(const QGraphicsItem* item) const; + QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value); + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + QPainterPath opaqueArea() const; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); + bool sceneEvent(QEvent* event); + bool sceneEventFilter(QGraphicsItem* watched, QEvent* event); + QPainterPath shape() const; + int type() const; + void wheelEvent(QGraphicsSceneWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSLINEITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLinearLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLinearLayout.cpp new file mode 100644 index 00000000..a0c70a98 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLinearLayout.cpp @@ -0,0 +1,148 @@ +#include "qtscriptshell_QGraphicsLinearLayout.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(qreal*) +Q_DECLARE_METATYPE(QGraphicsLayoutItem*) +Q_DECLARE_METATYPE(Qt::SizeHint) +Q_DECLARE_METATYPE(QEvent*) + +QtScriptShell_QGraphicsLinearLayout::QtScriptShell_QGraphicsLinearLayout(QGraphicsLayoutItem* parent) + : QGraphicsLinearLayout(parent) {} + +QtScriptShell_QGraphicsLinearLayout::QtScriptShell_QGraphicsLinearLayout(Qt::Orientation orientation, QGraphicsLayoutItem* parent) + : QGraphicsLinearLayout(orientation, parent) {} + +QtScriptShell_QGraphicsLinearLayout::~QtScriptShell_QGraphicsLinearLayout() {} + +int QtScriptShell_QGraphicsLinearLayout::count() const +{ + QScriptValue _q_function = __qtscript_self.property("count"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("count") & QScriptValue::QObjectMember)) { + return QGraphicsLinearLayout::count(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsLinearLayout::getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const +{ + QScriptValue _q_function = __qtscript_self.property("getContentsMargins"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getContentsMargins") & QScriptValue::QObjectMember)) { + QGraphicsLinearLayout::getContentsMargins(left, top, right, bottom); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, left) + << qScriptValueFromValue(_q_engine, top) + << qScriptValueFromValue(_q_engine, right) + << qScriptValueFromValue(_q_engine, bottom)); + } +} + +void QtScriptShell_QGraphicsLinearLayout::invalidate() +{ + QScriptValue _q_function = __qtscript_self.property("invalidate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("invalidate") & QScriptValue::QObjectMember)) { + QGraphicsLinearLayout::invalidate(); + } else { + _q_function.call(__qtscript_self); + } +} + +QGraphicsLayoutItem* QtScriptShell_QGraphicsLinearLayout::itemAt(int index) const +{ + QScriptValue _q_function = __qtscript_self.property("itemAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemAt") & QScriptValue::QObjectMember)) { + return QGraphicsLinearLayout::itemAt(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QGraphicsLinearLayout::removeAt(int index) +{ + QScriptValue _q_function = __qtscript_self.property("removeAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeAt") & QScriptValue::QObjectMember)) { + QGraphicsLinearLayout::removeAt(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QGraphicsLinearLayout::setGeometry(const QRectF& rect) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + QGraphicsLinearLayout::setGeometry(rect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect)); + } +} + +QSizeF QtScriptShell_QGraphicsLinearLayout::sizeHint(Qt::SizeHint which, const QSizeF& constraint) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + return QGraphicsLinearLayout::sizeHint(which, constraint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, which) + << qScriptValueFromValue(_q_engine, constraint))); + } +} + +void QtScriptShell_QGraphicsLinearLayout::updateGeometry() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometry") & QScriptValue::QObjectMember)) { + QGraphicsLinearLayout::updateGeometry(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QGraphicsLinearLayout::widgetEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("widgetEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("widgetEvent") & QScriptValue::QObjectMember)) { + QGraphicsLinearLayout::widgetEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLinearLayout.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLinearLayout.h new file mode 100644 index 00000000..6c29d9a4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsLinearLayout.h @@ -0,0 +1,29 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSLINEARLAYOUT_H +#define QTSCRIPTSHELL_QGRAPHICSLINEARLAYOUT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsLinearLayout : public QGraphicsLinearLayout +{ +public: + QtScriptShell_QGraphicsLinearLayout(QGraphicsLayoutItem* parent = 0); + QtScriptShell_QGraphicsLinearLayout(Qt::Orientation orientation, QGraphicsLayoutItem* parent = 0); + ~QtScriptShell_QGraphicsLinearLayout(); + + int count() const; + void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const; + void invalidate(); + QGraphicsLayoutItem* itemAt(int index) const; + void removeAt(int index); + void setGeometry(const QRectF& rect); + QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint = QSizeF()) const; + void updateGeometry(); + void widgetEvent(QEvent* e); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSLINEARLAYOUT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsObject.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsObject.cpp new file mode 100644 index 00000000..bb5d25e5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsObject.cpp @@ -0,0 +1,582 @@ +#include "qtscriptshell_QGraphicsObject.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneDragDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneHoverEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemChange) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMouseEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneWheelEvent*) + +QtScriptShell_QGraphicsObject::QtScriptShell_QGraphicsObject(QGraphicsItem* parent) + : QGraphicsObject(parent) {} + +QtScriptShell_QGraphicsObject::~QtScriptShell_QGraphicsObject() {} + +void QtScriptShell_QGraphicsObject::advance(int phase) +{ + QScriptValue _q_function = __qtscript_self.property("advance"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("advance") & QScriptValue::QObjectMember)) { + QGraphicsObject::advance(phase); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, phase)); + } +} + +QRectF QtScriptShell_QGraphicsObject::boundingRect() const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRect") & QScriptValue::QObjectMember)) { + qFatal("QGraphicsObject::boundingRect() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsObject::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsObject::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithItem") & QScriptValue::QObjectMember)) { + return QGraphicsObject::collidesWithItem(other, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(other)) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsObject::collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithPath"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithPath") & QScriptValue::QObjectMember)) { + return QGraphicsObject::collidesWithPath(path, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, path) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsObject::contains(const QPointF& point) const +{ + QScriptValue _q_function = __qtscript_self.property("contains"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contains") & QScriptValue::QObjectMember)) { + return QGraphicsObject::contains(point); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, point))); + } +} + +void QtScriptShell_QGraphicsObject::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsObject::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsObject::dragEnterEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsObject::dragLeaveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsObject::dragMoveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsObject::dropEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsObject::event(QEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGraphicsObject::event(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev))); + } +} + +bool QtScriptShell_QGraphicsObject::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsObject::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QVariant QtScriptShell_QGraphicsObject::extension(const QVariant& variant) const +{ + QScriptValue _q_function = __qtscript_self.property("extension"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("extension") & QScriptValue::QObjectMember)) { + return QGraphicsObject::extension(variant); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, variant))); + } +} + +void QtScriptShell_QGraphicsObject::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsObject::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsObject::hoverEnterEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::hoverEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsObject::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::hoverLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsObject::hoverMoveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::hoverMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsObject::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsObject::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGraphicsObject::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QGraphicsObject::isObscuredBy(const QGraphicsItem* item) const +{ + QScriptValue _q_function = __qtscript_self.property("isObscuredBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isObscuredBy") & QScriptValue::QObjectMember)) { + return QGraphicsObject::isObscuredBy(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(item)))); + } +} + +QVariant QtScriptShell_QGraphicsObject::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("itemChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemChange") & QScriptValue::QObjectMember)) { + return QGraphicsObject::itemChange(change, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, change) + << qScriptValueFromValue(_q_engine, value))); + } +} + +void QtScriptShell_QGraphicsObject::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsObject::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsObject::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsObject::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsObject::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsObject::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainterPath QtScriptShell_QGraphicsObject::opaqueArea() const +{ + QScriptValue _q_function = __qtscript_self.property("opaqueArea"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("opaqueArea") & QScriptValue::QObjectMember)) { + return QGraphicsObject::opaqueArea(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsObject::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + qFatal("QGraphicsObject::paint() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +bool QtScriptShell_QGraphicsObject::sceneEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEvent") & QScriptValue::QObjectMember)) { + return QGraphicsObject::sceneEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsObject::sceneEventFilter(QGraphicsItem* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsObject::sceneEventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QPainterPath QtScriptShell_QGraphicsObject::shape() const +{ + QScriptValue _q_function = __qtscript_self.property("shape"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("shape") & QScriptValue::QObjectMember)) { + return QGraphicsObject::shape(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsObject::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QGraphicsObject::type() const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + return QGraphicsObject::type(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsObject::wheelEvent(QGraphicsSceneWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGraphicsObject::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsObject.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsObject.h new file mode 100644 index 00000000..1669617c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsObject.h @@ -0,0 +1,57 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSOBJECT_H +#define QTSCRIPTSHELL_QGRAPHICSOBJECT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsObject : public QGraphicsObject +{ +public: + QtScriptShell_QGraphicsObject(QGraphicsItem* parent = 0); + ~QtScriptShell_QGraphicsObject(); + + void advance(int phase); + QRectF boundingRect() const; + void childEvent(QChildEvent* event); + bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const; + bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const; + bool contains(const QPointF& point) const; + void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); + void customEvent(QEvent* event); + void dragEnterEvent(QGraphicsSceneDragDropEvent* event); + void dragLeaveEvent(QGraphicsSceneDragDropEvent* event); + void dragMoveEvent(QGraphicsSceneDragDropEvent* event); + void dropEvent(QGraphicsSceneDragDropEvent* event); + bool event(QEvent* ev); + bool eventFilter(QObject* watched, QEvent* event); + QVariant extension(const QVariant& variant) const; + void focusInEvent(QFocusEvent* event); + void focusOutEvent(QFocusEvent* event); + void hoverEnterEvent(QGraphicsSceneHoverEvent* event); + void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); + void hoverMoveEvent(QGraphicsSceneHoverEvent* event); + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isObscuredBy(const QGraphicsItem* item) const; + QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value); + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + QPainterPath opaqueArea() const; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); + bool sceneEvent(QEvent* event); + bool sceneEventFilter(QGraphicsItem* watched, QEvent* event); + QPainterPath shape() const; + void timerEvent(QTimerEvent* event); + int type() const; + void wheelEvent(QGraphicsSceneWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSOBJECT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsOpacityEffect.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsOpacityEffect.cpp new file mode 100644 index 00000000..1245f3ef --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsOpacityEffect.cpp @@ -0,0 +1,141 @@ +#include "qtscriptshell_QGraphicsOpacityEffect.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QGraphicsOpacityEffect::QtScriptShell_QGraphicsOpacityEffect(QObject* parent) + : QGraphicsOpacityEffect(parent) {} + +QtScriptShell_QGraphicsOpacityEffect::~QtScriptShell_QGraphicsOpacityEffect() {} + +QRectF QtScriptShell_QGraphicsOpacityEffect::boundingRectFor(const QRectF& sourceRect) const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRectFor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRectFor") & QScriptValue::QObjectMember)) { + return QGraphicsOpacityEffect::boundingRectFor(sourceRect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceRect))); + } +} + +void QtScriptShell_QGraphicsOpacityEffect::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGraphicsOpacityEffect::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsOpacityEffect::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGraphicsOpacityEffect::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsOpacityEffect::draw(QPainter* painter) +{ + QScriptValue _q_function = __qtscript_self.property("draw"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("draw") & QScriptValue::QObjectMember)) { + QGraphicsOpacityEffect::draw(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +bool QtScriptShell_QGraphicsOpacityEffect::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGraphicsOpacityEffect::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsOpacityEffect::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsOpacityEffect::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QGraphicsOpacityEffect::sourceChanged(QGraphicsEffect::ChangeFlags flags) +{ + QScriptValue _q_function = __qtscript_self.property("sourceChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sourceChanged") & QScriptValue::QObjectMember)) { + QGraphicsOpacityEffect::sourceChanged(flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, flags)); + } +} + +void QtScriptShell_QGraphicsOpacityEffect::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGraphicsOpacityEffect::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsOpacityEffect.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsOpacityEffect.h new file mode 100644 index 00000000..1ca8eec5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsOpacityEffect.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSOPACITYEFFECT_H +#define QTSCRIPTSHELL_QGRAPHICSOPACITYEFFECT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsOpacityEffect : public QGraphicsOpacityEffect +{ +public: + QtScriptShell_QGraphicsOpacityEffect(QObject* parent = 0); + ~QtScriptShell_QGraphicsOpacityEffect(); + + QRectF boundingRectFor(const QRectF& sourceRect) const; + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + void draw(QPainter* painter); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void sourceChanged(QGraphicsEffect::ChangeFlags flags); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSOPACITYEFFECT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPathItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPathItem.cpp new file mode 100644 index 00000000..c96964d6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPathItem.cpp @@ -0,0 +1,511 @@ +#include "qtscriptshell_QGraphicsPathItem.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneDragDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneHoverEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemChange) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMouseEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneWheelEvent*) + +QtScriptShell_QGraphicsPathItem::QtScriptShell_QGraphicsPathItem(QGraphicsItem* parent) + : QGraphicsPathItem(parent) {} + +QtScriptShell_QGraphicsPathItem::QtScriptShell_QGraphicsPathItem(const QPainterPath& path, QGraphicsItem* parent) + : QGraphicsPathItem(path, parent) {} + +QtScriptShell_QGraphicsPathItem::~QtScriptShell_QGraphicsPathItem() {} + +void QtScriptShell_QGraphicsPathItem::advance(int phase) +{ + QScriptValue _q_function = __qtscript_self.property("advance"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("advance") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::advance(phase); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, phase)); + } +} + +QRectF QtScriptShell_QGraphicsPathItem::boundingRect() const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRect") & QScriptValue::QObjectMember)) { + return QGraphicsPathItem::boundingRect(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QGraphicsPathItem::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithItem") & QScriptValue::QObjectMember)) { + return QGraphicsPathItem::collidesWithItem(other, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(other)) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsPathItem::collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithPath"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithPath") & QScriptValue::QObjectMember)) { + return QGraphicsPathItem::collidesWithPath(path, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, path) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsPathItem::contains(const QPointF& point) const +{ + QScriptValue _q_function = __qtscript_self.property("contains"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contains") & QScriptValue::QObjectMember)) { + return QGraphicsPathItem::contains(point); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, point))); + } +} + +void QtScriptShell_QGraphicsPathItem::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPathItem::dragEnterEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPathItem::dragLeaveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPathItem::dragMoveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPathItem::dropEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsPathItem::extension(const QVariant& variant) const +{ + QScriptValue _q_function = __qtscript_self.property("extension"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("extension") & QScriptValue::QObjectMember)) { + return QGraphicsPathItem::extension(variant); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, variant))); + } +} + +void QtScriptShell_QGraphicsPathItem::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPathItem::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPathItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::hoverEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPathItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::hoverLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPathItem::hoverMoveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::hoverMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPathItem::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsPathItem::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGraphicsPathItem::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QGraphicsPathItem::isObscuredBy(const QGraphicsItem* item) const +{ + QScriptValue _q_function = __qtscript_self.property("isObscuredBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isObscuredBy") & QScriptValue::QObjectMember)) { + return QGraphicsPathItem::isObscuredBy(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(item)))); + } +} + +QVariant QtScriptShell_QGraphicsPathItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("itemChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemChange") & QScriptValue::QObjectMember)) { + return QGraphicsPathItem::itemChange(change, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, change) + << qScriptValueFromValue(_q_engine, value))); + } +} + +void QtScriptShell_QGraphicsPathItem::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPathItem::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPathItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPathItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPathItem::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPathItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainterPath QtScriptShell_QGraphicsPathItem::opaqueArea() const +{ + QScriptValue _q_function = __qtscript_self.property("opaqueArea"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("opaqueArea") & QScriptValue::QObjectMember)) { + return QGraphicsPathItem::opaqueArea(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsPathItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::paint(painter, option, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +bool QtScriptShell_QGraphicsPathItem::sceneEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEvent") & QScriptValue::QObjectMember)) { + return QGraphicsPathItem::sceneEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsPathItem::sceneEventFilter(QGraphicsItem* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsPathItem::sceneEventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QPainterPath QtScriptShell_QGraphicsPathItem::shape() const +{ + QScriptValue _q_function = __qtscript_self.property("shape"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("shape") & QScriptValue::QObjectMember)) { + return QGraphicsPathItem::shape(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QGraphicsPathItem::type() const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + return QGraphicsPathItem::type(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsPathItem::wheelEvent(QGraphicsSceneWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGraphicsPathItem::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPathItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPathItem.h new file mode 100644 index 00000000..afc8f548 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPathItem.h @@ -0,0 +1,53 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSPATHITEM_H +#define QTSCRIPTSHELL_QGRAPHICSPATHITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsPathItem : public QGraphicsPathItem +{ +public: + QtScriptShell_QGraphicsPathItem(QGraphicsItem* parent = 0); + QtScriptShell_QGraphicsPathItem(const QPainterPath& path, QGraphicsItem* parent = 0); + ~QtScriptShell_QGraphicsPathItem(); + + void advance(int phase); + QRectF boundingRect() const; + bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const; + bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const; + bool contains(const QPointF& point) const; + void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); + void dragEnterEvent(QGraphicsSceneDragDropEvent* event); + void dragLeaveEvent(QGraphicsSceneDragDropEvent* event); + void dragMoveEvent(QGraphicsSceneDragDropEvent* event); + void dropEvent(QGraphicsSceneDragDropEvent* event); + QVariant extension(const QVariant& variant) const; + void focusInEvent(QFocusEvent* event); + void focusOutEvent(QFocusEvent* event); + void hoverEnterEvent(QGraphicsSceneHoverEvent* event); + void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); + void hoverMoveEvent(QGraphicsSceneHoverEvent* event); + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isObscuredBy(const QGraphicsItem* item) const; + QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value); + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + QPainterPath opaqueArea() const; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); + bool sceneEvent(QEvent* event); + bool sceneEventFilter(QGraphicsItem* watched, QEvent* event); + QPainterPath shape() const; + int type() const; + void wheelEvent(QGraphicsSceneWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSPATHITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPixmapItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPixmapItem.cpp new file mode 100644 index 00000000..6eb388d8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPixmapItem.cpp @@ -0,0 +1,510 @@ +#include "qtscriptshell_QGraphicsPixmapItem.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneDragDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneHoverEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemChange) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMouseEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneWheelEvent*) + +QtScriptShell_QGraphicsPixmapItem::QtScriptShell_QGraphicsPixmapItem(QGraphicsItem* parent) + : QGraphicsPixmapItem(parent) {} + +QtScriptShell_QGraphicsPixmapItem::QtScriptShell_QGraphicsPixmapItem(const QPixmap& pixmap, QGraphicsItem* parent) + : QGraphicsPixmapItem(pixmap, parent) {} + +QtScriptShell_QGraphicsPixmapItem::~QtScriptShell_QGraphicsPixmapItem() {} + +void QtScriptShell_QGraphicsPixmapItem::advance(int phase) +{ + QScriptValue _q_function = __qtscript_self.property("advance"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("advance") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::advance(phase); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, phase)); + } +} + +QRectF QtScriptShell_QGraphicsPixmapItem::boundingRect() const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRect") & QScriptValue::QObjectMember)) { + return QGraphicsPixmapItem::boundingRect(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QGraphicsPixmapItem::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithItem") & QScriptValue::QObjectMember)) { + return QGraphicsPixmapItem::collidesWithItem(other, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(other)) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsPixmapItem::collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithPath"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithPath") & QScriptValue::QObjectMember)) { + return QGraphicsPixmapItem::collidesWithPath(path, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, path) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsPixmapItem::contains(const QPointF& point) const +{ + QScriptValue _q_function = __qtscript_self.property("contains"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contains") & QScriptValue::QObjectMember)) { + return QGraphicsPixmapItem::contains(point); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, point))); + } +} + +void QtScriptShell_QGraphicsPixmapItem::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPixmapItem::dragEnterEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPixmapItem::dragLeaveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPixmapItem::dragMoveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPixmapItem::dropEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsPixmapItem::extension(const QVariant& variant) const +{ + QScriptValue _q_function = __qtscript_self.property("extension"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("extension") & QScriptValue::QObjectMember)) { + return QGraphicsPixmapItem::extension(variant); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, variant))); + } +} + +void QtScriptShell_QGraphicsPixmapItem::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPixmapItem::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPixmapItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::hoverEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPixmapItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::hoverLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPixmapItem::hoverMoveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::hoverMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPixmapItem::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsPixmapItem::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGraphicsPixmapItem::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QGraphicsPixmapItem::isObscuredBy(const QGraphicsItem* item) const +{ + QScriptValue _q_function = __qtscript_self.property("isObscuredBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isObscuredBy") & QScriptValue::QObjectMember)) { + return QGraphicsPixmapItem::isObscuredBy(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(item)))); + } +} + +QVariant QtScriptShell_QGraphicsPixmapItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("itemChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemChange") & QScriptValue::QObjectMember)) { + return QGraphicsPixmapItem::itemChange(change, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, change) + << qScriptValueFromValue(_q_engine, value))); + } +} + +void QtScriptShell_QGraphicsPixmapItem::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPixmapItem::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPixmapItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPixmapItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPixmapItem::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPixmapItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainterPath QtScriptShell_QGraphicsPixmapItem::opaqueArea() const +{ + QScriptValue _q_function = __qtscript_self.property("opaqueArea"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("opaqueArea") & QScriptValue::QObjectMember)) { + return QGraphicsPixmapItem::opaqueArea(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsPixmapItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::paint(painter, option, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +bool QtScriptShell_QGraphicsPixmapItem::sceneEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEvent") & QScriptValue::QObjectMember)) { + return QGraphicsPixmapItem::sceneEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsPixmapItem::sceneEventFilter(QGraphicsItem* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsPixmapItem::sceneEventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QPainterPath QtScriptShell_QGraphicsPixmapItem::shape() const +{ + QScriptValue _q_function = __qtscript_self.property("shape"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("shape") & QScriptValue::QObjectMember)) { + return QGraphicsPixmapItem::shape(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QGraphicsPixmapItem::type() const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + return QGraphicsPixmapItem::type(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsPixmapItem::wheelEvent(QGraphicsSceneWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGraphicsPixmapItem::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPixmapItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPixmapItem.h new file mode 100644 index 00000000..400712f1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPixmapItem.h @@ -0,0 +1,53 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSPIXMAPITEM_H +#define QTSCRIPTSHELL_QGRAPHICSPIXMAPITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsPixmapItem : public QGraphicsPixmapItem +{ +public: + QtScriptShell_QGraphicsPixmapItem(QGraphicsItem* parent = 0); + QtScriptShell_QGraphicsPixmapItem(const QPixmap& pixmap, QGraphicsItem* parent = 0); + ~QtScriptShell_QGraphicsPixmapItem(); + + void advance(int phase); + QRectF boundingRect() const; + bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const; + bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const; + bool contains(const QPointF& point) const; + void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); + void dragEnterEvent(QGraphicsSceneDragDropEvent* event); + void dragLeaveEvent(QGraphicsSceneDragDropEvent* event); + void dragMoveEvent(QGraphicsSceneDragDropEvent* event); + void dropEvent(QGraphicsSceneDragDropEvent* event); + QVariant extension(const QVariant& variant) const; + void focusInEvent(QFocusEvent* event); + void focusOutEvent(QFocusEvent* event); + void hoverEnterEvent(QGraphicsSceneHoverEvent* event); + void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); + void hoverMoveEvent(QGraphicsSceneHoverEvent* event); + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isObscuredBy(const QGraphicsItem* item) const; + QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value); + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + QPainterPath opaqueArea() const; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); + bool sceneEvent(QEvent* event); + bool sceneEventFilter(QGraphicsItem* watched, QEvent* event); + QPainterPath shape() const; + int type() const; + void wheelEvent(QGraphicsSceneWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSPIXMAPITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPolygonItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPolygonItem.cpp new file mode 100644 index 00000000..b0dd4872 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPolygonItem.cpp @@ -0,0 +1,511 @@ +#include "qtscriptshell_QGraphicsPolygonItem.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneDragDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneHoverEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemChange) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMouseEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneWheelEvent*) + +QtScriptShell_QGraphicsPolygonItem::QtScriptShell_QGraphicsPolygonItem(QGraphicsItem* parent) + : QGraphicsPolygonItem(parent) {} + +QtScriptShell_QGraphicsPolygonItem::QtScriptShell_QGraphicsPolygonItem(const QPolygonF& polygon, QGraphicsItem* parent) + : QGraphicsPolygonItem(polygon, parent) {} + +QtScriptShell_QGraphicsPolygonItem::~QtScriptShell_QGraphicsPolygonItem() {} + +void QtScriptShell_QGraphicsPolygonItem::advance(int phase) +{ + QScriptValue _q_function = __qtscript_self.property("advance"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("advance") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::advance(phase); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, phase)); + } +} + +QRectF QtScriptShell_QGraphicsPolygonItem::boundingRect() const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRect") & QScriptValue::QObjectMember)) { + return QGraphicsPolygonItem::boundingRect(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QGraphicsPolygonItem::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithItem") & QScriptValue::QObjectMember)) { + return QGraphicsPolygonItem::collidesWithItem(other, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(other)) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsPolygonItem::collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithPath"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithPath") & QScriptValue::QObjectMember)) { + return QGraphicsPolygonItem::collidesWithPath(path, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, path) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsPolygonItem::contains(const QPointF& point) const +{ + QScriptValue _q_function = __qtscript_self.property("contains"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contains") & QScriptValue::QObjectMember)) { + return QGraphicsPolygonItem::contains(point); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, point))); + } +} + +void QtScriptShell_QGraphicsPolygonItem::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPolygonItem::dragEnterEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPolygonItem::dragLeaveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPolygonItem::dragMoveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPolygonItem::dropEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsPolygonItem::extension(const QVariant& variant) const +{ + QScriptValue _q_function = __qtscript_self.property("extension"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("extension") & QScriptValue::QObjectMember)) { + return QGraphicsPolygonItem::extension(variant); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, variant))); + } +} + +void QtScriptShell_QGraphicsPolygonItem::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPolygonItem::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPolygonItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::hoverEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPolygonItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::hoverLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPolygonItem::hoverMoveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::hoverMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPolygonItem::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsPolygonItem::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGraphicsPolygonItem::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QGraphicsPolygonItem::isObscuredBy(const QGraphicsItem* item) const +{ + QScriptValue _q_function = __qtscript_self.property("isObscuredBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isObscuredBy") & QScriptValue::QObjectMember)) { + return QGraphicsPolygonItem::isObscuredBy(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(item)))); + } +} + +QVariant QtScriptShell_QGraphicsPolygonItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("itemChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemChange") & QScriptValue::QObjectMember)) { + return QGraphicsPolygonItem::itemChange(change, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, change) + << qScriptValueFromValue(_q_engine, value))); + } +} + +void QtScriptShell_QGraphicsPolygonItem::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPolygonItem::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPolygonItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPolygonItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPolygonItem::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsPolygonItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainterPath QtScriptShell_QGraphicsPolygonItem::opaqueArea() const +{ + QScriptValue _q_function = __qtscript_self.property("opaqueArea"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("opaqueArea") & QScriptValue::QObjectMember)) { + return QGraphicsPolygonItem::opaqueArea(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsPolygonItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::paint(painter, option, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +bool QtScriptShell_QGraphicsPolygonItem::sceneEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEvent") & QScriptValue::QObjectMember)) { + return QGraphicsPolygonItem::sceneEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsPolygonItem::sceneEventFilter(QGraphicsItem* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsPolygonItem::sceneEventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QPainterPath QtScriptShell_QGraphicsPolygonItem::shape() const +{ + QScriptValue _q_function = __qtscript_self.property("shape"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("shape") & QScriptValue::QObjectMember)) { + return QGraphicsPolygonItem::shape(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QGraphicsPolygonItem::type() const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + return QGraphicsPolygonItem::type(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsPolygonItem::wheelEvent(QGraphicsSceneWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGraphicsPolygonItem::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPolygonItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPolygonItem.h new file mode 100644 index 00000000..985d1920 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsPolygonItem.h @@ -0,0 +1,53 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSPOLYGONITEM_H +#define QTSCRIPTSHELL_QGRAPHICSPOLYGONITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsPolygonItem : public QGraphicsPolygonItem +{ +public: + QtScriptShell_QGraphicsPolygonItem(QGraphicsItem* parent = 0); + QtScriptShell_QGraphicsPolygonItem(const QPolygonF& polygon, QGraphicsItem* parent = 0); + ~QtScriptShell_QGraphicsPolygonItem(); + + void advance(int phase); + QRectF boundingRect() const; + bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const; + bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const; + bool contains(const QPointF& point) const; + void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); + void dragEnterEvent(QGraphicsSceneDragDropEvent* event); + void dragLeaveEvent(QGraphicsSceneDragDropEvent* event); + void dragMoveEvent(QGraphicsSceneDragDropEvent* event); + void dropEvent(QGraphicsSceneDragDropEvent* event); + QVariant extension(const QVariant& variant) const; + void focusInEvent(QFocusEvent* event); + void focusOutEvent(QFocusEvent* event); + void hoverEnterEvent(QGraphicsSceneHoverEvent* event); + void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); + void hoverMoveEvent(QGraphicsSceneHoverEvent* event); + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isObscuredBy(const QGraphicsItem* item) const; + QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value); + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + QPainterPath opaqueArea() const; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); + bool sceneEvent(QEvent* event); + bool sceneEventFilter(QGraphicsItem* watched, QEvent* event); + QPainterPath shape() const; + int type() const; + void wheelEvent(QGraphicsSceneWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSPOLYGONITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsProxyWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsProxyWidget.cpp new file mode 100644 index 00000000..e17b84d7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsProxyWidget.cpp @@ -0,0 +1,894 @@ +#include "qtscriptshell_QGraphicsProxyWidget.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneDragDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(qreal*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneHoverEvent*) +Q_DECLARE_METATYPE(QStyleOption*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemChange) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMouseEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMoveEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QGraphicsSceneResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(Qt::SizeHint) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneWheelEvent*) +Q_DECLARE_METATYPE(Qt::WindowFrameSection) + +QtScriptShell_QGraphicsProxyWidget::QtScriptShell_QGraphicsProxyWidget(QGraphicsItem* parent, Qt::WindowFlags wFlags) + : QGraphicsProxyWidget(parent, wFlags) {} + +QtScriptShell_QGraphicsProxyWidget::~QtScriptShell_QGraphicsProxyWidget() {} + +void QtScriptShell_QGraphicsProxyWidget::advance(int phase) +{ + QScriptValue _q_function = __qtscript_self.property("advance"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("advance") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::advance(phase); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, phase)); + } +} + +QRectF QtScriptShell_QGraphicsProxyWidget::boundingRect() const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRect") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::boundingRect(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::changeEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::changeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsProxyWidget::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithItem") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::collidesWithItem(other, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(other)) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsProxyWidget::collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithPath"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithPath") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::collidesWithPath(path, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, path) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsProxyWidget::contains(const QPointF& point) const +{ + QScriptValue _q_function = __qtscript_self.property("contains"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contains") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::contains(point); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, point))); + } +} + +void QtScriptShell_QGraphicsProxyWidget::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::dragEnterEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::dragLeaveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::dragMoveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::dropEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsProxyWidget::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsProxyWidget::eventFilter(QObject* object, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::eventFilter(object, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, object) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QVariant QtScriptShell_QGraphicsProxyWidget::extension(const QVariant& variant) const +{ + QScriptValue _q_function = __qtscript_self.property("extension"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("extension") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::extension(variant); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, variant))); + } +} + +void QtScriptShell_QGraphicsProxyWidget::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsProxyWidget::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QGraphicsProxyWidget::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const +{ + QScriptValue _q_function = __qtscript_self.property("getContentsMargins"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getContentsMargins") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::getContentsMargins(left, top, right, bottom); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, left) + << qScriptValueFromValue(_q_engine, top) + << qScriptValueFromValue(_q_engine, right) + << qScriptValueFromValue(_q_engine, bottom)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::grabKeyboardEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("grabKeyboardEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("grabKeyboardEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::grabKeyboardEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::grabMouseEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("grabMouseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("grabMouseEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::grabMouseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::hoverEnterEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::hoverEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::hoverLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::hoverMoveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::hoverMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::initStyleOption(QStyleOption* option) const +{ + QScriptValue _q_function = __qtscript_self.property("initStyleOption"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initStyleOption") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::initStyleOption(option); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, option)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsProxyWidget::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QGraphicsProxyWidget::isObscuredBy(const QGraphicsItem* item) const +{ + QScriptValue _q_function = __qtscript_self.property("isObscuredBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isObscuredBy") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::isObscuredBy(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(item)))); + } +} + +QVariant QtScriptShell_QGraphicsProxyWidget::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("itemChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemChange") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::itemChange(change, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, change) + << qScriptValueFromValue(_q_engine, value))); + } +} + +void QtScriptShell_QGraphicsProxyWidget::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::moveEvent(QGraphicsSceneMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainterPath QtScriptShell_QGraphicsProxyWidget::opaqueArea() const +{ + QScriptValue _q_function = __qtscript_self.property("opaqueArea"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("opaqueArea") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::opaqueArea(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::paint(painter, option, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::paintWindowFrame(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("paintWindowFrame"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintWindowFrame") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::paintWindowFrame(painter, option, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::polishEvent() +{ + QScriptValue _q_function = __qtscript_self.property("polishEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("polishEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::polishEvent(); + } else { + _q_function.call(__qtscript_self); + } +} + +QVariant QtScriptShell_QGraphicsProxyWidget::propertyChange(const QString& propertyName, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("propertyChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("propertyChange") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::propertyChange(propertyName, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, propertyName) + << qScriptValueFromValue(_q_engine, value))); + } +} + +void QtScriptShell_QGraphicsProxyWidget::resizeEvent(QGraphicsSceneResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsProxyWidget::sceneEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEvent") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::sceneEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsProxyWidget::sceneEventFilter(QGraphicsItem* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::sceneEventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QGraphicsProxyWidget::setGeometry(const QRectF& rect) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::setGeometry(rect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect)); + } +} + +QPainterPath QtScriptShell_QGraphicsProxyWidget::shape() const +{ + QScriptValue _q_function = __qtscript_self.property("shape"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("shape") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::shape(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSizeF QtScriptShell_QGraphicsProxyWidget::sizeHint(Qt::SizeHint which, const QSizeF& constraint) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::sizeHint(which, constraint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, which) + << qScriptValueFromValue(_q_engine, constraint))); + } +} + +void QtScriptShell_QGraphicsProxyWidget::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QGraphicsProxyWidget::type() const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::type(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::ungrabKeyboardEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("ungrabKeyboardEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("ungrabKeyboardEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::ungrabKeyboardEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::ungrabMouseEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("ungrabMouseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("ungrabMouseEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::ungrabMouseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsProxyWidget::updateGeometry() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometry") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::updateGeometry(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QGraphicsProxyWidget::wheelEvent(QGraphicsSceneWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGraphicsProxyWidget::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsProxyWidget::windowFrameEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("windowFrameEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("windowFrameEvent") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::windowFrameEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +Qt::WindowFrameSection QtScriptShell_QGraphicsProxyWidget::windowFrameSectionAt(const QPointF& pos) const +{ + QScriptValue _q_function = __qtscript_self.property("windowFrameSectionAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("windowFrameSectionAt") & QScriptValue::QObjectMember)) { + return QGraphicsProxyWidget::windowFrameSectionAt(pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pos))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsProxyWidget.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsProxyWidget.h new file mode 100644 index 00000000..10b922bd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsProxyWidget.h @@ -0,0 +1,78 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSPROXYWIDGET_H +#define QTSCRIPTSHELL_QGRAPHICSPROXYWIDGET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsProxyWidget : public QGraphicsProxyWidget +{ +public: + QtScriptShell_QGraphicsProxyWidget(QGraphicsItem* parent = 0, Qt::WindowFlags wFlags = Qt::WindowFlags()); + ~QtScriptShell_QGraphicsProxyWidget(); + + void advance(int phase); + QRectF boundingRect() const; + void changeEvent(QEvent* event); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const; + bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const; + bool contains(const QPointF& point) const; + void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); + void customEvent(QEvent* event); + void dragEnterEvent(QGraphicsSceneDragDropEvent* event); + void dragLeaveEvent(QGraphicsSceneDragDropEvent* event); + void dragMoveEvent(QGraphicsSceneDragDropEvent* event); + void dropEvent(QGraphicsSceneDragDropEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* object, QEvent* event); + QVariant extension(const QVariant& variant) const; + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const; + void grabKeyboardEvent(QEvent* event); + void grabMouseEvent(QEvent* event); + void hideEvent(QHideEvent* event); + void hoverEnterEvent(QGraphicsSceneHoverEvent* event); + void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); + void hoverMoveEvent(QGraphicsSceneHoverEvent* event); + void initStyleOption(QStyleOption* option) const; + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isObscuredBy(const QGraphicsItem* item) const; + QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value); + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + void moveEvent(QGraphicsSceneMoveEvent* event); + QPainterPath opaqueArea() const; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); + void paintWindowFrame(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); + void polishEvent(); + QVariant propertyChange(const QString& propertyName, const QVariant& value); + void resizeEvent(QGraphicsSceneResizeEvent* event); + bool sceneEvent(QEvent* event); + bool sceneEventFilter(QGraphicsItem* watched, QEvent* event); + void setGeometry(const QRectF& rect); + QPainterPath shape() const; + void showEvent(QShowEvent* event); + QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint = QSizeF()) const; + void timerEvent(QTimerEvent* event); + int type() const; + void ungrabKeyboardEvent(QEvent* event); + void ungrabMouseEvent(QEvent* event); + void updateGeometry(); + void wheelEvent(QGraphicsSceneWheelEvent* event); + bool windowFrameEvent(QEvent* e); + Qt::WindowFrameSection windowFrameSectionAt(const QPointF& pos) const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSPROXYWIDGET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsRectItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsRectItem.cpp new file mode 100644 index 00000000..eb2d6e6b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsRectItem.cpp @@ -0,0 +1,514 @@ +#include "qtscriptshell_QGraphicsRectItem.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneDragDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneHoverEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemChange) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMouseEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneWheelEvent*) + +QtScriptShell_QGraphicsRectItem::QtScriptShell_QGraphicsRectItem(QGraphicsItem* parent) + : QGraphicsRectItem(parent) {} + +QtScriptShell_QGraphicsRectItem::QtScriptShell_QGraphicsRectItem(const QRectF& rect, QGraphicsItem* parent) + : QGraphicsRectItem(rect, parent) {} + +QtScriptShell_QGraphicsRectItem::QtScriptShell_QGraphicsRectItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem* parent) + : QGraphicsRectItem(x, y, w, h, parent) {} + +QtScriptShell_QGraphicsRectItem::~QtScriptShell_QGraphicsRectItem() {} + +void QtScriptShell_QGraphicsRectItem::advance(int phase) +{ + QScriptValue _q_function = __qtscript_self.property("advance"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("advance") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::advance(phase); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, phase)); + } +} + +QRectF QtScriptShell_QGraphicsRectItem::boundingRect() const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRect") & QScriptValue::QObjectMember)) { + return QGraphicsRectItem::boundingRect(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QGraphicsRectItem::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithItem") & QScriptValue::QObjectMember)) { + return QGraphicsRectItem::collidesWithItem(other, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(other)) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsRectItem::collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithPath"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithPath") & QScriptValue::QObjectMember)) { + return QGraphicsRectItem::collidesWithPath(path, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, path) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsRectItem::contains(const QPointF& point) const +{ + QScriptValue _q_function = __qtscript_self.property("contains"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contains") & QScriptValue::QObjectMember)) { + return QGraphicsRectItem::contains(point); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, point))); + } +} + +void QtScriptShell_QGraphicsRectItem::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsRectItem::dragEnterEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsRectItem::dragLeaveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsRectItem::dragMoveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsRectItem::dropEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsRectItem::extension(const QVariant& variant) const +{ + QScriptValue _q_function = __qtscript_self.property("extension"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("extension") & QScriptValue::QObjectMember)) { + return QGraphicsRectItem::extension(variant); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, variant))); + } +} + +void QtScriptShell_QGraphicsRectItem::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsRectItem::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsRectItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::hoverEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsRectItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::hoverLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsRectItem::hoverMoveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::hoverMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsRectItem::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsRectItem::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGraphicsRectItem::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QGraphicsRectItem::isObscuredBy(const QGraphicsItem* item) const +{ + QScriptValue _q_function = __qtscript_self.property("isObscuredBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isObscuredBy") & QScriptValue::QObjectMember)) { + return QGraphicsRectItem::isObscuredBy(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(item)))); + } +} + +QVariant QtScriptShell_QGraphicsRectItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("itemChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemChange") & QScriptValue::QObjectMember)) { + return QGraphicsRectItem::itemChange(change, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, change) + << qScriptValueFromValue(_q_engine, value))); + } +} + +void QtScriptShell_QGraphicsRectItem::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsRectItem::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsRectItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsRectItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsRectItem::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsRectItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainterPath QtScriptShell_QGraphicsRectItem::opaqueArea() const +{ + QScriptValue _q_function = __qtscript_self.property("opaqueArea"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("opaqueArea") & QScriptValue::QObjectMember)) { + return QGraphicsRectItem::opaqueArea(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsRectItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::paint(painter, option, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +bool QtScriptShell_QGraphicsRectItem::sceneEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEvent") & QScriptValue::QObjectMember)) { + return QGraphicsRectItem::sceneEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsRectItem::sceneEventFilter(QGraphicsItem* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsRectItem::sceneEventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QPainterPath QtScriptShell_QGraphicsRectItem::shape() const +{ + QScriptValue _q_function = __qtscript_self.property("shape"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("shape") & QScriptValue::QObjectMember)) { + return QGraphicsRectItem::shape(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QGraphicsRectItem::type() const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + return QGraphicsRectItem::type(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsRectItem::wheelEvent(QGraphicsSceneWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGraphicsRectItem::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsRectItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsRectItem.h new file mode 100644 index 00000000..2c2256ee --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsRectItem.h @@ -0,0 +1,54 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSRECTITEM_H +#define QTSCRIPTSHELL_QGRAPHICSRECTITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsRectItem : public QGraphicsRectItem +{ +public: + QtScriptShell_QGraphicsRectItem(QGraphicsItem* parent = 0); + QtScriptShell_QGraphicsRectItem(const QRectF& rect, QGraphicsItem* parent = 0); + QtScriptShell_QGraphicsRectItem(qreal x, qreal y, qreal w, qreal h, QGraphicsItem* parent = 0); + ~QtScriptShell_QGraphicsRectItem(); + + void advance(int phase); + QRectF boundingRect() const; + bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const; + bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const; + bool contains(const QPointF& point) const; + void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); + void dragEnterEvent(QGraphicsSceneDragDropEvent* event); + void dragLeaveEvent(QGraphicsSceneDragDropEvent* event); + void dragMoveEvent(QGraphicsSceneDragDropEvent* event); + void dropEvent(QGraphicsSceneDragDropEvent* event); + QVariant extension(const QVariant& variant) const; + void focusInEvent(QFocusEvent* event); + void focusOutEvent(QFocusEvent* event); + void hoverEnterEvent(QGraphicsSceneHoverEvent* event); + void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); + void hoverMoveEvent(QGraphicsSceneHoverEvent* event); + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isObscuredBy(const QGraphicsItem* item) const; + QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value); + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + QPainterPath opaqueArea() const; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); + bool sceneEvent(QEvent* event); + bool sceneEventFilter(QGraphicsItem* watched, QEvent* event); + QPainterPath shape() const; + int type() const; + void wheelEvent(QGraphicsSceneWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSRECTITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsRotation.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsRotation.cpp new file mode 100644 index 00000000..7660a77d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsRotation.cpp @@ -0,0 +1,108 @@ +#include "qtscriptshell_QGraphicsRotation.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QMatrix4x4*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QGraphicsRotation::QtScriptShell_QGraphicsRotation(QObject* parent) + : QGraphicsRotation(parent) {} + +QtScriptShell_QGraphicsRotation::~QtScriptShell_QGraphicsRotation() {} + +void QtScriptShell_QGraphicsRotation::applyTo(QMatrix4x4* matrix) const +{ + QScriptValue _q_function = __qtscript_self.property("applyTo"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("applyTo") & QScriptValue::QObjectMember)) { + QGraphicsRotation::applyTo(matrix); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, matrix)); + } +} + +void QtScriptShell_QGraphicsRotation::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGraphicsRotation::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsRotation::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGraphicsRotation::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsRotation::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGraphicsRotation::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsRotation::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsRotation::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QGraphicsRotation::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGraphicsRotation::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsRotation.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsRotation.h new file mode 100644 index 00000000..dac6dac0 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsRotation.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSROTATION_H +#define QTSCRIPTSHELL_QGRAPHICSROTATION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsRotation : public QGraphicsRotation +{ +public: + QtScriptShell_QGraphicsRotation(QObject* parent = 0); + ~QtScriptShell_QGraphicsRotation(); + + void applyTo(QMatrix4x4* matrix) const; + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSROTATION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsScale.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsScale.cpp new file mode 100644 index 00000000..11c6d609 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsScale.cpp @@ -0,0 +1,108 @@ +#include "qtscriptshell_QGraphicsScale.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QMatrix4x4*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QGraphicsScale::QtScriptShell_QGraphicsScale(QObject* parent) + : QGraphicsScale(parent) {} + +QtScriptShell_QGraphicsScale::~QtScriptShell_QGraphicsScale() {} + +void QtScriptShell_QGraphicsScale::applyTo(QMatrix4x4* matrix) const +{ + QScriptValue _q_function = __qtscript_self.property("applyTo"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("applyTo") & QScriptValue::QObjectMember)) { + QGraphicsScale::applyTo(matrix); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, matrix)); + } +} + +void QtScriptShell_QGraphicsScale::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGraphicsScale::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScale::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGraphicsScale::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsScale::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGraphicsScale::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsScale::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsScale::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QGraphicsScale::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGraphicsScale::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsScale.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsScale.h new file mode 100644 index 00000000..a0501a38 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsScale.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSSCALE_H +#define QTSCRIPTSHELL_QGRAPHICSSCALE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsScale : public QGraphicsScale +{ +public: + QtScriptShell_QGraphicsScale(QObject* parent = 0); + ~QtScriptShell_QGraphicsScale(); + + void applyTo(QMatrix4x4* matrix) const; + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSSCALE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsScene.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsScene.cpp new file mode 100644 index 00000000..55edf3a6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsScene.cpp @@ -0,0 +1,419 @@ +#include "qtscriptshell_QGraphicsScene.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneDragDropEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QGraphicsItem**) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneHelpEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMouseEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneWheelEvent*) + +QtScriptShell_QGraphicsScene::QtScriptShell_QGraphicsScene(QObject* parent) + : QGraphicsScene(parent) {} + +QtScriptShell_QGraphicsScene::QtScriptShell_QGraphicsScene(const QRectF& sceneRect, QObject* parent) + : QGraphicsScene(sceneRect, parent) {} + +QtScriptShell_QGraphicsScene::QtScriptShell_QGraphicsScene(qreal x, qreal y, qreal width, qreal height, QObject* parent) + : QGraphicsScene(x, y, width, height, parent) {} + +QtScriptShell_QGraphicsScene::~QtScriptShell_QGraphicsScene() {} + +void QtScriptShell_QGraphicsScene::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScene::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScene::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScene::dragEnterEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScene::dragLeaveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScene::dragMoveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScene::drawBackground(QPainter* painter, const QRectF& rect) +{ + QScriptValue _q_function = __qtscript_self.property("drawBackground"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawBackground") & QScriptValue::QObjectMember)) { + QGraphicsScene::drawBackground(painter, rect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, rect)); + } +} + +void QtScriptShell_QGraphicsScene::drawForeground(QPainter* painter, const QRectF& rect) +{ + QScriptValue _q_function = __qtscript_self.property("drawForeground"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawForeground") & QScriptValue::QObjectMember)) { + QGraphicsScene::drawForeground(painter, rect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, rect)); + } +} + +void QtScriptShell_QGraphicsScene::drawItems(QPainter* painter, int numItems, QGraphicsItem** items, const QStyleOptionGraphicsItem* options, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("drawItems"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawItems") & QScriptValue::QObjectMember)) { + QGraphicsScene::drawItems(painter, numItems, items, options, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, numItems) + << qScriptValueFromValue(_q_engine, items) + << qScriptValueFromValue(_q_engine, const_cast(options)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +void QtScriptShell_QGraphicsScene::dropEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsScene::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGraphicsScene::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsScene::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsScene::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QGraphicsScene::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScene::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScene::helpEvent(QGraphicsSceneHelpEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("helpEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("helpEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::helpEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScene::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsScene::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGraphicsScene::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +void QtScriptShell_QGraphicsScene::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScene::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScene::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScene::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScene::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsScene::wheelEvent(QGraphicsSceneWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGraphicsScene::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsScene.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsScene.h new file mode 100644 index 00000000..9b16e911 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsScene.h @@ -0,0 +1,46 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSSCENE_H +#define QTSCRIPTSHELL_QGRAPHICSSCENE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsScene : public QGraphicsScene +{ +public: + QtScriptShell_QGraphicsScene(QObject* parent = 0); + QtScriptShell_QGraphicsScene(const QRectF& sceneRect, QObject* parent = 0); + QtScriptShell_QGraphicsScene(qreal x, qreal y, qreal width, qreal height, QObject* parent = 0); + ~QtScriptShell_QGraphicsScene(); + + void childEvent(QChildEvent* event); + void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); + void customEvent(QEvent* event); + void dragEnterEvent(QGraphicsSceneDragDropEvent* event); + void dragLeaveEvent(QGraphicsSceneDragDropEvent* event); + void dragMoveEvent(QGraphicsSceneDragDropEvent* event); + void drawBackground(QPainter* painter, const QRectF& rect); + void drawForeground(QPainter* painter, const QRectF& rect); + void drawItems(QPainter* painter, int numItems, QGraphicsItem** items, const QStyleOptionGraphicsItem* options, QWidget* widget = 0); + void dropEvent(QGraphicsSceneDragDropEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + void focusOutEvent(QFocusEvent* event); + void helpEvent(QGraphicsSceneHelpEvent* event); + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QGraphicsSceneWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSSCENE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsSimpleTextItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsSimpleTextItem.cpp new file mode 100644 index 00000000..b325b112 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsSimpleTextItem.cpp @@ -0,0 +1,512 @@ +#include "qtscriptshell_QGraphicsSimpleTextItem.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneDragDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneHoverEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemChange) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMouseEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneWheelEvent*) + +QtScriptShell_QGraphicsSimpleTextItem::QtScriptShell_QGraphicsSimpleTextItem(QGraphicsItem* parent) + : QGraphicsSimpleTextItem(parent) {} + +QtScriptShell_QGraphicsSimpleTextItem::QtScriptShell_QGraphicsSimpleTextItem(const QString& text, QGraphicsItem* parent) + : QGraphicsSimpleTextItem(text, parent) {} + +QtScriptShell_QGraphicsSimpleTextItem::~QtScriptShell_QGraphicsSimpleTextItem() {} + +void QtScriptShell_QGraphicsSimpleTextItem::advance(int phase) +{ + QScriptValue _q_function = __qtscript_self.property("advance"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("advance") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::advance(phase); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, phase)); + } +} + +QRectF QtScriptShell_QGraphicsSimpleTextItem::boundingRect() const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRect") & QScriptValue::QObjectMember)) { + return QGraphicsSimpleTextItem::boundingRect(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QGraphicsSimpleTextItem::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithItem") & QScriptValue::QObjectMember)) { + return QGraphicsSimpleTextItem::collidesWithItem(other, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(other)) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsSimpleTextItem::collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithPath"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithPath") & QScriptValue::QObjectMember)) { + return QGraphicsSimpleTextItem::collidesWithPath(path, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, path) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsSimpleTextItem::contains(const QPointF& point) const +{ + QScriptValue _q_function = __qtscript_self.property("contains"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contains") & QScriptValue::QObjectMember)) { + return QGraphicsSimpleTextItem::contains(point); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, point))); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::dragEnterEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::dragLeaveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::dragMoveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::dropEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsSimpleTextItem::extension(const QVariant& variant) const +{ + QScriptValue _q_function = __qtscript_self.property("extension"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("extension") & QScriptValue::QObjectMember)) { + return QGraphicsSimpleTextItem::extension(variant); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, variant))); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::hoverEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::hoverLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::hoverMoveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::hoverMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsSimpleTextItem::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGraphicsSimpleTextItem::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QGraphicsSimpleTextItem::isObscuredBy(const QGraphicsItem* item) const +{ + QScriptValue _q_function = __qtscript_self.property("isObscuredBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isObscuredBy") & QScriptValue::QObjectMember)) { + return QGraphicsSimpleTextItem::isObscuredBy(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(item)))); + } +} + +QVariant QtScriptShell_QGraphicsSimpleTextItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("itemChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemChange") & QScriptValue::QObjectMember)) { + return QGraphicsSimpleTextItem::itemChange(change, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, change) + << qScriptValueFromValue(_q_engine, value))); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainterPath QtScriptShell_QGraphicsSimpleTextItem::opaqueArea() const +{ + QScriptValue _q_function = __qtscript_self.property("opaqueArea"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("opaqueArea") & QScriptValue::QObjectMember)) { + return QGraphicsSimpleTextItem::opaqueArea(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::paint(painter, option, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +bool QtScriptShell_QGraphicsSimpleTextItem::sceneEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEvent") & QScriptValue::QObjectMember)) { + return QGraphicsSimpleTextItem::sceneEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsSimpleTextItem::sceneEventFilter(QGraphicsItem* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsSimpleTextItem::sceneEventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QPainterPath QtScriptShell_QGraphicsSimpleTextItem::shape() const +{ + QScriptValue _q_function = __qtscript_self.property("shape"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("shape") & QScriptValue::QObjectMember)) { + return QGraphicsSimpleTextItem::shape(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QGraphicsSimpleTextItem::type() const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + return QGraphicsSimpleTextItem::type(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsSimpleTextItem::wheelEvent(QGraphicsSceneWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGraphicsSimpleTextItem::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsSimpleTextItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsSimpleTextItem.h new file mode 100644 index 00000000..6e96af26 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsSimpleTextItem.h @@ -0,0 +1,53 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSSIMPLETEXTITEM_H +#define QTSCRIPTSHELL_QGRAPHICSSIMPLETEXTITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsSimpleTextItem : public QGraphicsSimpleTextItem +{ +public: + QtScriptShell_QGraphicsSimpleTextItem(QGraphicsItem* parent = 0); + QtScriptShell_QGraphicsSimpleTextItem(const QString& text, QGraphicsItem* parent = 0); + ~QtScriptShell_QGraphicsSimpleTextItem(); + + void advance(int phase); + QRectF boundingRect() const; + bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const; + bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const; + bool contains(const QPointF& point) const; + void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); + void dragEnterEvent(QGraphicsSceneDragDropEvent* event); + void dragLeaveEvent(QGraphicsSceneDragDropEvent* event); + void dragMoveEvent(QGraphicsSceneDragDropEvent* event); + void dropEvent(QGraphicsSceneDragDropEvent* event); + QVariant extension(const QVariant& variant) const; + void focusInEvent(QFocusEvent* event); + void focusOutEvent(QFocusEvent* event); + void hoverEnterEvent(QGraphicsSceneHoverEvent* event); + void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); + void hoverMoveEvent(QGraphicsSceneHoverEvent* event); + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isObscuredBy(const QGraphicsItem* item) const; + QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value); + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + QPainterPath opaqueArea() const; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); + bool sceneEvent(QEvent* event); + bool sceneEventFilter(QGraphicsItem* watched, QEvent* event); + QPainterPath shape() const; + int type() const; + void wheelEvent(QGraphicsSceneWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSSIMPLETEXTITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsTextItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsTextItem.cpp new file mode 100644 index 00000000..cabce33a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsTextItem.cpp @@ -0,0 +1,589 @@ +#include "qtscriptshell_QGraphicsTextItem.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneDragDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneHoverEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemChange) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMouseEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneWheelEvent*) + +QtScriptShell_QGraphicsTextItem::QtScriptShell_QGraphicsTextItem(QGraphicsItem* parent) + : QGraphicsTextItem(parent) {} + +QtScriptShell_QGraphicsTextItem::QtScriptShell_QGraphicsTextItem(const QString& text, QGraphicsItem* parent) + : QGraphicsTextItem(text, parent) {} + +QtScriptShell_QGraphicsTextItem::~QtScriptShell_QGraphicsTextItem() {} + +void QtScriptShell_QGraphicsTextItem::advance(int phase) +{ + QScriptValue _q_function = __qtscript_self.property("advance"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("advance") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::advance(phase); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, phase)); + } +} + +QRectF QtScriptShell_QGraphicsTextItem::boundingRect() const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRect") & QScriptValue::QObjectMember)) { + return QGraphicsTextItem::boundingRect(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsTextItem::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsTextItem::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithItem") & QScriptValue::QObjectMember)) { + return QGraphicsTextItem::collidesWithItem(other, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(other)) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsTextItem::collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithPath"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithPath") & QScriptValue::QObjectMember)) { + return QGraphicsTextItem::collidesWithPath(path, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, path) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsTextItem::contains(const QPointF& point) const +{ + QScriptValue _q_function = __qtscript_self.property("contains"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contains") & QScriptValue::QObjectMember)) { + return QGraphicsTextItem::contains(point); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, point))); + } +} + +void QtScriptShell_QGraphicsTextItem::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsTextItem::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsTextItem::dragEnterEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsTextItem::dragLeaveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsTextItem::dragMoveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsTextItem::dropEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsTextItem::event(QEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGraphicsTextItem::event(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev))); + } +} + +bool QtScriptShell_QGraphicsTextItem::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsTextItem::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QVariant QtScriptShell_QGraphicsTextItem::extension(const QVariant& variant) const +{ + QScriptValue _q_function = __qtscript_self.property("extension"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("extension") & QScriptValue::QObjectMember)) { + return QGraphicsTextItem::extension(variant); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, variant))); + } +} + +void QtScriptShell_QGraphicsTextItem::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsTextItem::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsTextItem::hoverEnterEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::hoverEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsTextItem::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::hoverLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsTextItem::hoverMoveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::hoverMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsTextItem::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsTextItem::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGraphicsTextItem::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QGraphicsTextItem::isObscuredBy(const QGraphicsItem* item) const +{ + QScriptValue _q_function = __qtscript_self.property("isObscuredBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isObscuredBy") & QScriptValue::QObjectMember)) { + return QGraphicsTextItem::isObscuredBy(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(item)))); + } +} + +QVariant QtScriptShell_QGraphicsTextItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("itemChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemChange") & QScriptValue::QObjectMember)) { + return QGraphicsTextItem::itemChange(change, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, change) + << qScriptValueFromValue(_q_engine, value))); + } +} + +void QtScriptShell_QGraphicsTextItem::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsTextItem::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsTextItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsTextItem::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsTextItem::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsTextItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainterPath QtScriptShell_QGraphicsTextItem::opaqueArea() const +{ + QScriptValue _q_function = __qtscript_self.property("opaqueArea"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("opaqueArea") & QScriptValue::QObjectMember)) { + return QGraphicsTextItem::opaqueArea(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsTextItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::paint(painter, option, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +bool QtScriptShell_QGraphicsTextItem::sceneEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEvent") & QScriptValue::QObjectMember)) { + return QGraphicsTextItem::sceneEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsTextItem::sceneEventFilter(QGraphicsItem* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsTextItem::sceneEventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QPainterPath QtScriptShell_QGraphicsTextItem::shape() const +{ + QScriptValue _q_function = __qtscript_self.property("shape"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("shape") & QScriptValue::QObjectMember)) { + return QGraphicsTextItem::shape(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsTextItem::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QGraphicsTextItem::type() const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + return QGraphicsTextItem::type(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsTextItem::wheelEvent(QGraphicsSceneWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGraphicsTextItem::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsTextItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsTextItem.h new file mode 100644 index 00000000..d8576e2e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsTextItem.h @@ -0,0 +1,58 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSTEXTITEM_H +#define QTSCRIPTSHELL_QGRAPHICSTEXTITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsTextItem : public QGraphicsTextItem +{ +public: + QtScriptShell_QGraphicsTextItem(QGraphicsItem* parent = 0); + QtScriptShell_QGraphicsTextItem(const QString& text, QGraphicsItem* parent = 0); + ~QtScriptShell_QGraphicsTextItem(); + + void advance(int phase); + QRectF boundingRect() const; + void childEvent(QChildEvent* event); + bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const; + bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const; + bool contains(const QPointF& point) const; + void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); + void customEvent(QEvent* event); + void dragEnterEvent(QGraphicsSceneDragDropEvent* event); + void dragLeaveEvent(QGraphicsSceneDragDropEvent* event); + void dragMoveEvent(QGraphicsSceneDragDropEvent* event); + void dropEvent(QGraphicsSceneDragDropEvent* event); + bool event(QEvent* ev); + bool eventFilter(QObject* watched, QEvent* event); + QVariant extension(const QVariant& variant) const; + void focusInEvent(QFocusEvent* event); + void focusOutEvent(QFocusEvent* event); + void hoverEnterEvent(QGraphicsSceneHoverEvent* event); + void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); + void hoverMoveEvent(QGraphicsSceneHoverEvent* event); + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isObscuredBy(const QGraphicsItem* item) const; + QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value); + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + QPainterPath opaqueArea() const; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); + bool sceneEvent(QEvent* event); + bool sceneEventFilter(QGraphicsItem* watched, QEvent* event); + QPainterPath shape() const; + void timerEvent(QTimerEvent* event); + int type() const; + void wheelEvent(QGraphicsSceneWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSTEXTITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsTransform.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsTransform.cpp new file mode 100644 index 00000000..8fd8695c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsTransform.cpp @@ -0,0 +1,107 @@ +#include "qtscriptshell_QGraphicsTransform.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QMatrix4x4*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QGraphicsTransform::QtScriptShell_QGraphicsTransform(QObject* parent) + : QGraphicsTransform(parent) {} + +QtScriptShell_QGraphicsTransform::~QtScriptShell_QGraphicsTransform() {} + +void QtScriptShell_QGraphicsTransform::applyTo(QMatrix4x4* matrix) const +{ + QScriptValue _q_function = __qtscript_self.property("applyTo"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("applyTo") & QScriptValue::QObjectMember)) { + qFatal("QGraphicsTransform::applyTo() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, matrix)); + } +} + +void QtScriptShell_QGraphicsTransform::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGraphicsTransform::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsTransform::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGraphicsTransform::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsTransform::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGraphicsTransform::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsTransform::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsTransform::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QGraphicsTransform::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGraphicsTransform::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsTransform.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsTransform.h new file mode 100644 index 00000000..de8596bc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsTransform.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSTRANSFORM_H +#define QTSCRIPTSHELL_QGRAPHICSTRANSFORM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsTransform : public QGraphicsTransform +{ +public: + QtScriptShell_QGraphicsTransform(QObject* parent = 0); + ~QtScriptShell_QGraphicsTransform(); + + void applyTo(QMatrix4x4* matrix) const; + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSTRANSFORM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsView.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsView.cpp new file mode 100644 index 00000000..6cdad1fc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsView.cpp @@ -0,0 +1,767 @@ +#include "qtscriptshell_QGraphicsView.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QGraphicsItem**) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QGraphicsView::QtScriptShell_QGraphicsView(QGraphicsScene* scene, QWidget* parent) + : QGraphicsView(scene, parent) {} + +QtScriptShell_QGraphicsView::QtScriptShell_QGraphicsView(QWidget* parent) + : QGraphicsView(parent) {} + +QtScriptShell_QGraphicsView::~QtScriptShell_QGraphicsView() {} + +void QtScriptShell_QGraphicsView::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QGraphicsView::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QGraphicsView::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QGraphicsView::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsView::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::drawBackground(QPainter* painter, const QRectF& rect) +{ + QScriptValue _q_function = __qtscript_self.property("drawBackground"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawBackground") & QScriptValue::QObjectMember)) { + QGraphicsView::drawBackground(painter, rect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, rect)); + } +} + +void QtScriptShell_QGraphicsView::drawForeground(QPainter* painter, const QRectF& rect) +{ + QScriptValue _q_function = __qtscript_self.property("drawForeground"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawForeground") & QScriptValue::QObjectMember)) { + QGraphicsView::drawForeground(painter, rect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, rect)); + } +} + +void QtScriptShell_QGraphicsView::drawItems(QPainter* painter, int numItems, QGraphicsItem** items, const QStyleOptionGraphicsItem* options) +{ + QScriptValue _q_function = __qtscript_self.property("drawItems"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawItems") & QScriptValue::QObjectMember)) { + QGraphicsView::drawItems(painter, numItems, items, options); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, numItems) + << qScriptValueFromValue(_q_engine, items) + << qScriptValueFromValue(_q_engine, const_cast(options))); + } +} + +void QtScriptShell_QGraphicsView::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsView::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGraphicsView::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsView::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsView::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QGraphicsView::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsView::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QGraphicsView::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QGraphicsView::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsView::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QGraphicsView::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QGraphicsView::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QGraphicsView::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QGraphicsView::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QGraphicsView::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QGraphicsView::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsView::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGraphicsView::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +void QtScriptShell_QGraphicsView::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QGraphicsView::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QGraphicsView::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QGraphicsView::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsView::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QGraphicsView::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QGraphicsView::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QGraphicsView::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsView::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QGraphicsView::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QGraphicsView::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QGraphicsView::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QGraphicsView::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QGraphicsView::setupViewport(QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QGraphicsView::setupViewport(widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, widget)); + } +} + +QPainter* QtScriptShell_QGraphicsView::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QGraphicsView::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsView::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsView::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsView::viewportEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QGraphicsView::viewportEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +QSize QtScriptShell_QGraphicsView::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QGraphicsView::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsView::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGraphicsView::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsView.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsView.h new file mode 100644 index 00000000..ec548d4e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsView.h @@ -0,0 +1,69 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSVIEW_H +#define QTSCRIPTSHELL_QGRAPHICSVIEW_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsView : public QGraphicsView +{ +public: + QtScriptShell_QGraphicsView(QGraphicsScene* scene, QWidget* parent = 0); + QtScriptShell_QGraphicsView(QWidget* parent = 0); + ~QtScriptShell_QGraphicsView(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void drawBackground(QPainter* painter, const QRectF& rect); + void drawForeground(QPainter* painter, const QRectF& rect); + void drawItems(QPainter* painter, int numItems, QGraphicsItem** items, const QStyleOptionGraphicsItem* options); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + void scrollContentsBy(int dx, int dy); + void setupViewport(QWidget* widget); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + bool viewportEvent(QEvent* event); + QSize viewportSizeHint() const; + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSVIEW_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsWidget.cpp new file mode 100644 index 00000000..65deaf7c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsWidget.cpp @@ -0,0 +1,893 @@ +#include "qtscriptshell_QGraphicsWidget.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(const QGraphicsItem*) +Q_DECLARE_METATYPE(Qt::ItemSelectionMode) +Q_DECLARE_METATYPE(QPainterPath) +Q_DECLARE_METATYPE(QGraphicsSceneContextMenuEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneDragDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(qreal*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneHoverEvent*) +Q_DECLARE_METATYPE(QStyleOption*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QGraphicsItem::GraphicsItemChange) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMouseEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneMoveEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QStyleOptionGraphicsItem*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QGraphicsSceneResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(Qt::SizeHint) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QGraphicsSceneWheelEvent*) +Q_DECLARE_METATYPE(Qt::WindowFrameSection) + +QtScriptShell_QGraphicsWidget::QtScriptShell_QGraphicsWidget(QGraphicsItem* parent, Qt::WindowFlags wFlags) + : QGraphicsWidget(parent, wFlags) {} + +QtScriptShell_QGraphicsWidget::~QtScriptShell_QGraphicsWidget() {} + +void QtScriptShell_QGraphicsWidget::advance(int phase) +{ + QScriptValue _q_function = __qtscript_self.property("advance"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("advance") & QScriptValue::QObjectMember)) { + QGraphicsWidget::advance(phase); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, phase)); + } +} + +QRectF QtScriptShell_QGraphicsWidget::boundingRect() const +{ + QScriptValue _q_function = __qtscript_self.property("boundingRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("boundingRect") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::boundingRect(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsWidget::changeEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::changeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsWidget::collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithItem") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::collidesWithItem(other, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(other)) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsWidget::collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const +{ + QScriptValue _q_function = __qtscript_self.property("collidesWithPath"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("collidesWithPath") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::collidesWithPath(path, mode); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, path) + << qScriptValueFromValue(_q_engine, mode))); + } +} + +bool QtScriptShell_QGraphicsWidget::contains(const QPointF& point) const +{ + QScriptValue _q_function = __qtscript_self.property("contains"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contains") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::contains(point); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, point))); + } +} + +void QtScriptShell_QGraphicsWidget::contextMenuEvent(QGraphicsSceneContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::dragEnterEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::dragLeaveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::dragMoveEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::dropEvent(QGraphicsSceneDragDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsWidget::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsWidget::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QVariant QtScriptShell_QGraphicsWidget::extension(const QVariant& variant) const +{ + QScriptValue _q_function = __qtscript_self.property("extension"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("extension") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::extension(variant); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, variant))); + } +} + +void QtScriptShell_QGraphicsWidget::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsWidget::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QGraphicsWidget::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const +{ + QScriptValue _q_function = __qtscript_self.property("getContentsMargins"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getContentsMargins") & QScriptValue::QObjectMember)) { + QGraphicsWidget::getContentsMargins(left, top, right, bottom); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, left) + << qScriptValueFromValue(_q_engine, top) + << qScriptValueFromValue(_q_engine, right) + << qScriptValueFromValue(_q_engine, bottom)); + } +} + +void QtScriptShell_QGraphicsWidget::grabKeyboardEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("grabKeyboardEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("grabKeyboardEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::grabKeyboardEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::grabMouseEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("grabMouseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("grabMouseEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::grabMouseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::hoverEnterEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverEnterEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::hoverEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverLeaveEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::hoverLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::hoverMoveEvent(QGraphicsSceneHoverEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hoverMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hoverMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::hoverMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::initStyleOption(QStyleOption* option) const +{ + QScriptValue _q_function = __qtscript_self.property("initStyleOption"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initStyleOption") & QScriptValue::QObjectMember)) { + QGraphicsWidget::initStyleOption(option); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, option)); + } +} + +void QtScriptShell_QGraphicsWidget::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QGraphicsWidget::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QGraphicsWidget::isObscuredBy(const QGraphicsItem* item) const +{ + QScriptValue _q_function = __qtscript_self.property("isObscuredBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isObscuredBy") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::isObscuredBy(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(item)))); + } +} + +QVariant QtScriptShell_QGraphicsWidget::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("itemChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemChange") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::itemChange(change, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, change) + << qScriptValueFromValue(_q_engine, value))); + } +} + +void QtScriptShell_QGraphicsWidget::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::mouseMoveEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::mousePressEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::moveEvent(QGraphicsSceneMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainterPath QtScriptShell_QGraphicsWidget::opaqueArea() const +{ + QScriptValue _q_function = __qtscript_self.property("opaqueArea"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("opaqueArea") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::opaqueArea(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsWidget::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + QGraphicsWidget::paint(painter, option, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +void QtScriptShell_QGraphicsWidget::paintWindowFrame(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("paintWindowFrame"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintWindowFrame") & QScriptValue::QObjectMember)) { + QGraphicsWidget::paintWindowFrame(painter, option, widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, widget)); + } +} + +void QtScriptShell_QGraphicsWidget::polishEvent() +{ + QScriptValue _q_function = __qtscript_self.property("polishEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("polishEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::polishEvent(); + } else { + _q_function.call(__qtscript_self); + } +} + +QVariant QtScriptShell_QGraphicsWidget::propertyChange(const QString& propertyName, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("propertyChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("propertyChange") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::propertyChange(propertyName, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, propertyName) + << qScriptValueFromValue(_q_engine, value))); + } +} + +void QtScriptShell_QGraphicsWidget::resizeEvent(QGraphicsSceneResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsWidget::sceneEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEvent") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::sceneEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGraphicsWidget::sceneEventFilter(QGraphicsItem* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("sceneEventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sceneEventFilter") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::sceneEventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QGraphicsWidget::setGeometry(const QRectF& rect) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + QGraphicsWidget::setGeometry(rect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect)); + } +} + +QPainterPath QtScriptShell_QGraphicsWidget::shape() const +{ + QScriptValue _q_function = __qtscript_self.property("shape"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("shape") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::shape(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsWidget::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSizeF QtScriptShell_QGraphicsWidget::sizeHint(Qt::SizeHint which, const QSizeF& constraint) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::sizeHint(which, constraint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, which) + << qScriptValueFromValue(_q_engine, constraint))); + } +} + +void QtScriptShell_QGraphicsWidget::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QGraphicsWidget::type() const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::type(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGraphicsWidget::ungrabKeyboardEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("ungrabKeyboardEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("ungrabKeyboardEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::ungrabKeyboardEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::ungrabMouseEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("ungrabMouseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("ungrabMouseEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::ungrabMouseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGraphicsWidget::updateGeometry() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometry") & QScriptValue::QObjectMember)) { + QGraphicsWidget::updateGeometry(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QGraphicsWidget::wheelEvent(QGraphicsSceneWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGraphicsWidget::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGraphicsWidget::windowFrameEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("windowFrameEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("windowFrameEvent") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::windowFrameEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +Qt::WindowFrameSection QtScriptShell_QGraphicsWidget::windowFrameSectionAt(const QPointF& pos) const +{ + QScriptValue _q_function = __qtscript_self.property("windowFrameSectionAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("windowFrameSectionAt") & QScriptValue::QObjectMember)) { + return QGraphicsWidget::windowFrameSectionAt(pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pos))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsWidget.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsWidget.h new file mode 100644 index 00000000..a63c4f19 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGraphicsWidget.h @@ -0,0 +1,78 @@ +#ifndef QTSCRIPTSHELL_QGRAPHICSWIDGET_H +#define QTSCRIPTSHELL_QGRAPHICSWIDGET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGraphicsWidget : public QGraphicsWidget +{ +public: + QtScriptShell_QGraphicsWidget(QGraphicsItem* parent = 0, Qt::WindowFlags wFlags = Qt::WindowFlags()); + ~QtScriptShell_QGraphicsWidget(); + + void advance(int phase); + QRectF boundingRect() const; + void changeEvent(QEvent* event); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + bool collidesWithItem(const QGraphicsItem* other, Qt::ItemSelectionMode mode) const; + bool collidesWithPath(const QPainterPath& path, Qt::ItemSelectionMode mode) const; + bool contains(const QPointF& point) const; + void contextMenuEvent(QGraphicsSceneContextMenuEvent* event); + void customEvent(QEvent* event); + void dragEnterEvent(QGraphicsSceneDragDropEvent* event); + void dragLeaveEvent(QGraphicsSceneDragDropEvent* event); + void dragMoveEvent(QGraphicsSceneDragDropEvent* event); + void dropEvent(QGraphicsSceneDragDropEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + QVariant extension(const QVariant& variant) const; + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + void getContentsMargins(qreal* left, qreal* top, qreal* right, qreal* bottom) const; + void grabKeyboardEvent(QEvent* event); + void grabMouseEvent(QEvent* event); + void hideEvent(QHideEvent* event); + void hoverEnterEvent(QGraphicsSceneHoverEvent* event); + void hoverLeaveEvent(QGraphicsSceneHoverEvent* event); + void hoverMoveEvent(QGraphicsSceneHoverEvent* event); + void initStyleOption(QStyleOption* option) const; + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isObscuredBy(const QGraphicsItem* item) const; + QVariant itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant& value); + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event); + void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + void mousePressEvent(QGraphicsSceneMouseEvent* event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent* event); + void moveEvent(QGraphicsSceneMoveEvent* event); + QPainterPath opaqueArea() const; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); + void paintWindowFrame(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0); + void polishEvent(); + QVariant propertyChange(const QString& propertyName, const QVariant& value); + void resizeEvent(QGraphicsSceneResizeEvent* event); + bool sceneEvent(QEvent* event); + bool sceneEventFilter(QGraphicsItem* watched, QEvent* event); + void setGeometry(const QRectF& rect); + QPainterPath shape() const; + void showEvent(QShowEvent* event); + QSizeF sizeHint(Qt::SizeHint which, const QSizeF& constraint = QSizeF()) const; + void timerEvent(QTimerEvent* event); + int type() const; + void ungrabKeyboardEvent(QEvent* event); + void ungrabMouseEvent(QEvent* event); + void updateGeometry(); + void wheelEvent(QGraphicsSceneWheelEvent* event); + bool windowFrameEvent(QEvent* e); + Qt::WindowFrameSection windowFrameSectionAt(const QPointF& pos) const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRAPHICSWIDGET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGridLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGridLayout.cpp new file mode 100644 index 00000000..14a9b88c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGridLayout.cpp @@ -0,0 +1,348 @@ +#include "qtscriptshell_QGridLayout.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QLayoutItem*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QSpacerItem*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QGridLayout::QtScriptShell_QGridLayout() + : QGridLayout() {} + +QtScriptShell_QGridLayout::QtScriptShell_QGridLayout(QWidget* parent) + : QGridLayout(parent) {} + +QtScriptShell_QGridLayout::~QtScriptShell_QGridLayout() {} + +void QtScriptShell_QGridLayout::addItem(QLayoutItem* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("addItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("addItem") & QScriptValue::QObjectMember)) { + QGridLayout::addItem(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QGridLayout::childEvent(QChildEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGridLayout::childEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QSizePolicy::ControlTypes QtScriptShell_QGridLayout::controlTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("controlTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("controlTypes") & QScriptValue::QObjectMember)) { + return QGridLayout::controlTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QGridLayout::count() const +{ + QScriptValue _q_function = __qtscript_self.property("count"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("count") & QScriptValue::QObjectMember)) { + return QGridLayout::count(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGridLayout::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGridLayout::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGridLayout::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGridLayout::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGridLayout::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGridLayout::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +Qt::Orientations QtScriptShell_QGridLayout::expandingDirections() const +{ + QScriptValue _q_function = __qtscript_self.property("expandingDirections"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("expandingDirections") & QScriptValue::QObjectMember)) { + return QGridLayout::expandingDirections(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QGridLayout::geometry() const +{ + QScriptValue _q_function = __qtscript_self.property("geometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("geometry") & QScriptValue::QObjectMember)) { + return QGridLayout::geometry(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QGridLayout::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QGridLayout::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QGridLayout::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QGridLayout::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +int QtScriptShell_QGridLayout::indexOf(QWidget* arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("indexOf"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexOf") & QScriptValue::QObjectMember)) { + return QGridLayout::indexOf(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QGridLayout::invalidate() +{ + QScriptValue _q_function = __qtscript_self.property("invalidate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("invalidate") & QScriptValue::QObjectMember)) { + QGridLayout::invalidate(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QGridLayout::isEmpty() const +{ + QScriptValue _q_function = __qtscript_self.property("isEmpty"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isEmpty") & QScriptValue::QObjectMember)) { + return QGridLayout::isEmpty(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayoutItem* QtScriptShell_QGridLayout::itemAt(int index) const +{ + QScriptValue _q_function = __qtscript_self.property("itemAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemAt") & QScriptValue::QObjectMember)) { + return QGridLayout::itemAt(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QLayout* QtScriptShell_QGridLayout::layout() +{ + QScriptValue _q_function = __qtscript_self.property("layout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("layout") & QScriptValue::QObjectMember)) { + return QGridLayout::layout(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSize QtScriptShell_QGridLayout::maximumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("maximumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("maximumSize") & QScriptValue::QObjectMember)) { + return QGridLayout::maximumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QGridLayout::minimumHeightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("minimumHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumHeightForWidth") & QScriptValue::QObjectMember)) { + return QGridLayout::minimumHeightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QGridLayout::minimumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("minimumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumSize") & QScriptValue::QObjectMember)) { + return QGridLayout::minimumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGridLayout::setGeometry(const QRect& arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + QGridLayout::setGeometry(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QSize QtScriptShell_QGridLayout::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + return QGridLayout::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSpacerItem* QtScriptShell_QGridLayout::spacerItem() +{ + QScriptValue _q_function = __qtscript_self.property("spacerItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("spacerItem") & QScriptValue::QObjectMember)) { + return QGridLayout::spacerItem(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayoutItem* QtScriptShell_QGridLayout::takeAt(int index) +{ + QScriptValue _q_function = __qtscript_self.property("takeAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("takeAt") & QScriptValue::QObjectMember)) { + return QGridLayout::takeAt(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QGridLayout::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGridLayout::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QWidget* QtScriptShell_QGridLayout::widget() +{ + QScriptValue _q_function = __qtscript_self.property("widget"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("widget") & QScriptValue::QObjectMember)) { + return QGridLayout::widget(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGridLayout.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGridLayout.h new file mode 100644 index 00000000..568f1690 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGridLayout.h @@ -0,0 +1,45 @@ +#ifndef QTSCRIPTSHELL_QGRIDLAYOUT_H +#define QTSCRIPTSHELL_QGRIDLAYOUT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGridLayout : public QGridLayout +{ +public: + QtScriptShell_QGridLayout(); + QtScriptShell_QGridLayout(QWidget* parent); + ~QtScriptShell_QGridLayout(); + + void addItem(QLayoutItem* arg__1); + void childEvent(QChildEvent* e); + QSizePolicy::ControlTypes controlTypes() const; + int count() const; + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + Qt::Orientations expandingDirections() const; + QRect geometry() const; + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + int indexOf(QWidget* arg__1) const; + void invalidate(); + bool isEmpty() const; + QLayoutItem* itemAt(int index) const; + QLayout* layout(); + QSize maximumSize() const; + int minimumHeightForWidth(int arg__1) const; + QSize minimumSize() const; + void setGeometry(const QRect& arg__1); + QSize sizeHint() const; + QSpacerItem* spacerItem(); + QLayoutItem* takeAt(int index); + void timerEvent(QTimerEvent* event); + QWidget* widget(); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGRIDLAYOUT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGroupBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGroupBox.cpp new file mode 100644 index 00000000..f9868ee6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGroupBox.cpp @@ -0,0 +1,664 @@ +#include "qtscriptshell_QGroupBox.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QGroupBox::QtScriptShell_QGroupBox(QWidget* parent) + : QGroupBox(parent) {} + +QtScriptShell_QGroupBox::QtScriptShell_QGroupBox(const QString& title, QWidget* parent) + : QGroupBox(title, parent) {} + +QtScriptShell_QGroupBox::~QtScriptShell_QGroupBox() {} + +void QtScriptShell_QGroupBox::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QGroupBox::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::changeEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QGroupBox::changeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QGroupBox::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QGroupBox::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QGroupBox::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QGroupBox::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QGroupBox::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QGroupBox::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGroupBox::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QGroupBox::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QGroupBox::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QGroupBox::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QGroupBox::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QGroupBox::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGroupBox::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QGroupBox::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QGroupBox::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QGroupBox::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QGroupBox::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QGroupBox::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGroupBox::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QGroupBox::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QGroupBox::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QGroupBox::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGroupBox::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QGroupBox::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QGroupBox::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QGroupBox::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QGroupBox::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QGroupBox::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QGroupBox::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QGroupBox::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QGroupBox::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QGroupBox::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QGroupBox::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QGroupBox::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QGroupBox::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QGroupBox::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QGroupBox::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QGroupBox::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QGroupBox::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QGroupBox::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QGroupBox::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QGroupBox::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QGroupBox::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QGroupBox::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QGroupBox::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QGroupBox::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QGroupBox::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QGroupBox::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QGroupBox::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGroupBox::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QGroupBox::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QGroupBox::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QGroupBox::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QGroupBox::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QGroupBox::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QGroupBox::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QGroupBox::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGroupBox::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QGroupBox::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_QGroupBox::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QGroupBox::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QGroupBox::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QGroupBox::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QGroupBox::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QGroupBox::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QGroupBox::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGroupBox.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGroupBox.h new file mode 100644 index 00000000..2704791b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QGroupBox.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_QGROUPBOX_H +#define QTSCRIPTSHELL_QGROUPBOX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QGroupBox : public QGroupBox +{ +public: + QtScriptShell_QGroupBox(QWidget* parent = 0); + QtScriptShell_QGroupBox(const QString& title, QWidget* parent = 0); + ~QtScriptShell_QGroupBox(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* event); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QGROUPBOX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QHBoxLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QHBoxLayout.cpp new file mode 100644 index 00000000..3cf1242a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QHBoxLayout.cpp @@ -0,0 +1,348 @@ +#include "qtscriptshell_QHBoxLayout.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QLayoutItem*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QSpacerItem*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QHBoxLayout::QtScriptShell_QHBoxLayout() + : QHBoxLayout() {} + +QtScriptShell_QHBoxLayout::QtScriptShell_QHBoxLayout(QWidget* parent) + : QHBoxLayout(parent) {} + +QtScriptShell_QHBoxLayout::~QtScriptShell_QHBoxLayout() {} + +void QtScriptShell_QHBoxLayout::addItem(QLayoutItem* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("addItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("addItem") & QScriptValue::QObjectMember)) { + QHBoxLayout::addItem(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QHBoxLayout::childEvent(QChildEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QHBoxLayout::childEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QSizePolicy::ControlTypes QtScriptShell_QHBoxLayout::controlTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("controlTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("controlTypes") & QScriptValue::QObjectMember)) { + return QHBoxLayout::controlTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QHBoxLayout::count() const +{ + QScriptValue _q_function = __qtscript_self.property("count"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("count") & QScriptValue::QObjectMember)) { + return QHBoxLayout::count(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QHBoxLayout::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QHBoxLayout::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QHBoxLayout::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QHBoxLayout::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QHBoxLayout::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QHBoxLayout::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +Qt::Orientations QtScriptShell_QHBoxLayout::expandingDirections() const +{ + QScriptValue _q_function = __qtscript_self.property("expandingDirections"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("expandingDirections") & QScriptValue::QObjectMember)) { + return QHBoxLayout::expandingDirections(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QHBoxLayout::geometry() const +{ + QScriptValue _q_function = __qtscript_self.property("geometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("geometry") & QScriptValue::QObjectMember)) { + return QHBoxLayout::geometry(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QHBoxLayout::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QHBoxLayout::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QHBoxLayout::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QHBoxLayout::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +int QtScriptShell_QHBoxLayout::indexOf(QWidget* arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("indexOf"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexOf") & QScriptValue::QObjectMember)) { + return QHBoxLayout::indexOf(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QHBoxLayout::invalidate() +{ + QScriptValue _q_function = __qtscript_self.property("invalidate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("invalidate") & QScriptValue::QObjectMember)) { + QHBoxLayout::invalidate(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QHBoxLayout::isEmpty() const +{ + QScriptValue _q_function = __qtscript_self.property("isEmpty"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isEmpty") & QScriptValue::QObjectMember)) { + return QHBoxLayout::isEmpty(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayoutItem* QtScriptShell_QHBoxLayout::itemAt(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("itemAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemAt") & QScriptValue::QObjectMember)) { + return QHBoxLayout::itemAt(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QLayout* QtScriptShell_QHBoxLayout::layout() +{ + QScriptValue _q_function = __qtscript_self.property("layout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("layout") & QScriptValue::QObjectMember)) { + return QHBoxLayout::layout(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSize QtScriptShell_QHBoxLayout::maximumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("maximumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("maximumSize") & QScriptValue::QObjectMember)) { + return QHBoxLayout::maximumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QHBoxLayout::minimumHeightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("minimumHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumHeightForWidth") & QScriptValue::QObjectMember)) { + return QHBoxLayout::minimumHeightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QHBoxLayout::minimumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("minimumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumSize") & QScriptValue::QObjectMember)) { + return QHBoxLayout::minimumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QHBoxLayout::setGeometry(const QRect& arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + QHBoxLayout::setGeometry(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QSize QtScriptShell_QHBoxLayout::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + return QHBoxLayout::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSpacerItem* QtScriptShell_QHBoxLayout::spacerItem() +{ + QScriptValue _q_function = __qtscript_self.property("spacerItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("spacerItem") & QScriptValue::QObjectMember)) { + return QHBoxLayout::spacerItem(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayoutItem* QtScriptShell_QHBoxLayout::takeAt(int arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("takeAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("takeAt") & QScriptValue::QObjectMember)) { + return QHBoxLayout::takeAt(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QHBoxLayout::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QHBoxLayout::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QWidget* QtScriptShell_QHBoxLayout::widget() +{ + QScriptValue _q_function = __qtscript_self.property("widget"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("widget") & QScriptValue::QObjectMember)) { + return QHBoxLayout::widget(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QHBoxLayout.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QHBoxLayout.h new file mode 100644 index 00000000..ea15eca9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QHBoxLayout.h @@ -0,0 +1,45 @@ +#ifndef QTSCRIPTSHELL_QHBOXLAYOUT_H +#define QTSCRIPTSHELL_QHBOXLAYOUT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QHBoxLayout : public QHBoxLayout +{ +public: + QtScriptShell_QHBoxLayout(); + QtScriptShell_QHBoxLayout(QWidget* parent); + ~QtScriptShell_QHBoxLayout(); + + void addItem(QLayoutItem* arg__1); + void childEvent(QChildEvent* e); + QSizePolicy::ControlTypes controlTypes() const; + int count() const; + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + Qt::Orientations expandingDirections() const; + QRect geometry() const; + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + int indexOf(QWidget* arg__1) const; + void invalidate(); + bool isEmpty() const; + QLayoutItem* itemAt(int arg__1) const; + QLayout* layout(); + QSize maximumSize() const; + int minimumHeightForWidth(int arg__1) const; + QSize minimumSize() const; + void setGeometry(const QRect& arg__1); + QSize sizeHint() const; + QSpacerItem* spacerItem(); + QLayoutItem* takeAt(int arg__1); + void timerEvent(QTimerEvent* event); + QWidget* widget(); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QHBOXLAYOUT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QHeaderView.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QHeaderView.cpp new file mode 100644 index 00000000..6cdb6b02 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QHeaderView.cpp @@ -0,0 +1,1252 @@ +#include "qtscriptshell_QHeaderView.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::EditTrigger) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::ScrollHint) +Q_DECLARE_METATYPE(const QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAbstractItemModel*) +Q_DECLARE_METATYPE(QItemSelectionModel*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QStyleOptionViewItem) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QHeaderView::QtScriptShell_QHeaderView(Qt::Orientation orientation, QWidget* parent) + : QHeaderView(orientation, parent) {} + +QtScriptShell_QHeaderView::~QtScriptShell_QHeaderView() {} + +void QtScriptShell_QHeaderView::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QHeaderView::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QHeaderView::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QHeaderView::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QHeaderView::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QHeaderView::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QHeaderView::closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("closeEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEditor") & QScriptValue::QObjectMember)) { + QHeaderView::closeEditor(editor, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QHeaderView::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QHeaderView::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QHeaderView::commitData(QWidget* editor) +{ + QScriptValue _q_function = __qtscript_self.property("commitData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("commitData") & QScriptValue::QObjectMember)) { + QHeaderView::commitData(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QHeaderView::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QHeaderView::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QHeaderView::currentChanged(const QModelIndex& current, const QModelIndex& old) +{ + QScriptValue _q_function = __qtscript_self.property("currentChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("currentChanged") & QScriptValue::QObjectMember)) { + QHeaderView::currentChanged(current, old); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, current) + << qScriptValueFromValue(_q_engine, old)); + } +} + +void QtScriptShell_QHeaderView::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QHeaderView::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QHeaderView::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) +{ + QScriptValue _q_function = __qtscript_self.property("dataChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dataChanged") & QScriptValue::QObjectMember)) { + QHeaderView::dataChanged(topLeft, bottomRight, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, topLeft) + << qScriptValueFromValue(_q_engine, bottomRight) + << qScriptValueFromValue(_q_engine, roles)); + } +} + +int QtScriptShell_QHeaderView::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QHeaderView::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QHeaderView::doItemsLayout() +{ + QScriptValue _q_function = __qtscript_self.property("doItemsLayout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("doItemsLayout") & QScriptValue::QObjectMember)) { + QHeaderView::doItemsLayout(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QHeaderView::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QHeaderView::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QHeaderView::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QHeaderView::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QHeaderView::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QHeaderView::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QHeaderView::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QHeaderView::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QHeaderView::edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("edit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("edit") & QScriptValue::QObjectMember)) { + return QHeaderView::edit(index, trigger, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, trigger) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QHeaderView::editorDestroyed(QObject* editor) +{ + QScriptValue _q_function = __qtscript_self.property("editorDestroyed"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("editorDestroyed") & QScriptValue::QObjectMember)) { + QHeaderView::editorDestroyed(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QHeaderView::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QHeaderView::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QHeaderView::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QHeaderView::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QHeaderView::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QHeaderView::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QHeaderView::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QHeaderView::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QHeaderView::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QHeaderView::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QHeaderView::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QHeaderView::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QHeaderView::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QHeaderView::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QHeaderView::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QHeaderView::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QHeaderView::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QHeaderView::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QHeaderView::horizontalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("horizontalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalOffset") & QScriptValue::QObjectMember)) { + return QHeaderView::horizontalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QHeaderView::horizontalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarAction") & QScriptValue::QObjectMember)) { + QHeaderView::horizontalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QHeaderView::horizontalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QHeaderView::horizontalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QModelIndex QtScriptShell_QHeaderView::indexAt(const QPoint& p) const +{ + QScriptValue _q_function = __qtscript_self.property("indexAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexAt") & QScriptValue::QObjectMember)) { + return QHeaderView::indexAt(p); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, p))); + } +} + +void QtScriptShell_QHeaderView::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QHeaderView::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QHeaderView::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QHeaderView::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QHeaderView::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QHeaderView::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QHeaderView::isIndexHidden(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("isIndexHidden"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isIndexHidden") & QScriptValue::QObjectMember)) { + return QHeaderView::isIndexHidden(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QHeaderView::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QHeaderView::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QHeaderView::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QHeaderView::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QHeaderView::keyboardSearch(const QString& search) +{ + QScriptValue _q_function = __qtscript_self.property("keyboardSearch"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyboardSearch") & QScriptValue::QObjectMember)) { + QHeaderView::keyboardSearch(search); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, search)); + } +} + +void QtScriptShell_QHeaderView::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QHeaderView::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QHeaderView::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QHeaderView::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QHeaderView::mouseDoubleClickEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QHeaderView::mouseDoubleClickEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QHeaderView::mouseMoveEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QHeaderView::mouseMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QHeaderView::mousePressEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QHeaderView::mousePressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QHeaderView::mouseReleaseEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QHeaderView::mouseReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QHeaderView::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QHeaderView::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QHeaderView::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QHeaderView::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QHeaderView::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QHeaderView::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QHeaderView::paintEvent(QPaintEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QHeaderView::paintEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QHeaderView::paintSection(QPainter* painter, const QRect& rect, int logicalIndex) const +{ + QScriptValue _q_function = __qtscript_self.property("paintSection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintSection") & QScriptValue::QObjectMember)) { + QHeaderView::paintSection(painter, rect, logicalIndex); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, logicalIndex)); + } +} + +QPaintDevice* QtScriptShell_QHeaderView::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QHeaderView::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QHeaderView::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + QHeaderView::reset(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QHeaderView::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QHeaderView::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QHeaderView::rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsAboutToBeRemoved"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsAboutToBeRemoved") & QScriptValue::QObjectMember)) { + QHeaderView::rowsAboutToBeRemoved(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QHeaderView::rowsInserted(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsInserted"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsInserted") & QScriptValue::QObjectMember)) { + QHeaderView::rowsInserted(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QHeaderView::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QHeaderView::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QHeaderView::scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("scrollTo"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollTo") & QScriptValue::QObjectMember)) { + QHeaderView::scrollTo(index, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +QSize QtScriptShell_QHeaderView::sectionSizeFromContents(int logicalIndex) const +{ + QScriptValue _q_function = __qtscript_self.property("sectionSizeFromContents"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sectionSizeFromContents") & QScriptValue::QObjectMember)) { + return QHeaderView::sectionSizeFromContents(logicalIndex); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, logicalIndex))); + } +} + +void QtScriptShell_QHeaderView::selectAll() +{ + QScriptValue _q_function = __qtscript_self.property("selectAll"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectAll") & QScriptValue::QObjectMember)) { + QHeaderView::selectAll(); + } else { + _q_function.call(__qtscript_self); + } +} + +QList QtScriptShell_QHeaderView::selectedIndexes() const +{ + QScriptValue _q_function = __qtscript_self.property("selectedIndexes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectedIndexes") & QScriptValue::QObjectMember)) { + return QHeaderView::selectedIndexes(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QHeaderView::selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) +{ + QScriptValue _q_function = __qtscript_self.property("selectionChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionChanged") & QScriptValue::QObjectMember)) { + QHeaderView::selectionChanged(selected, deselected); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selected) + << qScriptValueFromValue(_q_engine, deselected)); + } +} + +QItemSelectionModel::SelectionFlags QtScriptShell_QHeaderView::selectionCommand(const QModelIndex& index, const QEvent* event) const +{ + QScriptValue _q_function = __qtscript_self.property("selectionCommand"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionCommand") & QScriptValue::QObjectMember)) { + return QHeaderView::selectionCommand(index, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, const_cast(event)))); + } +} + +void QtScriptShell_QHeaderView::setModel(QAbstractItemModel* model) +{ + QScriptValue _q_function = __qtscript_self.property("setModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setModel") & QScriptValue::QObjectMember)) { + QHeaderView::setModel(model); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, model)); + } +} + +void QtScriptShell_QHeaderView::setRootIndex(const QModelIndex& index) +{ + QScriptValue _q_function = __qtscript_self.property("setRootIndex"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setRootIndex") & QScriptValue::QObjectMember)) { + QHeaderView::setRootIndex(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QHeaderView::setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags flags) +{ + QScriptValue _q_function = __qtscript_self.property("setSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelection") & QScriptValue::QObjectMember)) { + QHeaderView::setSelection(rect, flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, flags)); + } +} + +void QtScriptShell_QHeaderView::setSelectionModel(QItemSelectionModel* selectionModel) +{ + QScriptValue _q_function = __qtscript_self.property("setSelectionModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelectionModel") & QScriptValue::QObjectMember)) { + QHeaderView::setSelectionModel(selectionModel); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selectionModel)); + } +} + +void QtScriptShell_QHeaderView::setupViewport(QWidget* viewport) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QHeaderView::setupViewport(viewport); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, viewport)); + } +} + +QPainter* QtScriptShell_QHeaderView::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QHeaderView::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QHeaderView::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QHeaderView::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QHeaderView::sizeHintForColumn(int column) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForColumn"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForColumn") & QScriptValue::QObjectMember)) { + return QHeaderView::sizeHintForColumn(column); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column))); + } +} + +int QtScriptShell_QHeaderView::sizeHintForRow(int row) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForRow"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForRow") & QScriptValue::QObjectMember)) { + return QHeaderView::sizeHintForRow(row); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row))); + } +} + +void QtScriptShell_QHeaderView::startDrag(Qt::DropActions supportedActions) +{ + QScriptValue _q_function = __qtscript_self.property("startDrag"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startDrag") & QScriptValue::QObjectMember)) { + QHeaderView::startDrag(supportedActions); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, supportedActions)); + } +} + +void QtScriptShell_QHeaderView::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QHeaderView::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QHeaderView::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QHeaderView::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QHeaderView::updateEditorData() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorData") & QScriptValue::QObjectMember)) { + QHeaderView::updateEditorData(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QHeaderView::updateEditorGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorGeometries") & QScriptValue::QObjectMember)) { + QHeaderView::updateEditorGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QHeaderView::updateGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometries") & QScriptValue::QObjectMember)) { + QHeaderView::updateGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +int QtScriptShell_QHeaderView::verticalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("verticalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalOffset") & QScriptValue::QObjectMember)) { + return QHeaderView::verticalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QHeaderView::verticalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarAction") & QScriptValue::QObjectMember)) { + QHeaderView::verticalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QHeaderView::verticalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QHeaderView::verticalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QStyleOptionViewItem QtScriptShell_QHeaderView::viewOptions() const +{ + QScriptValue _q_function = __qtscript_self.property("viewOptions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewOptions") & QScriptValue::QObjectMember)) { + return QHeaderView::viewOptions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QHeaderView::viewportEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QHeaderView::viewportEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +QSize QtScriptShell_QHeaderView::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QHeaderView::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QHeaderView::visualRect(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRect") & QScriptValue::QObjectMember)) { + return QHeaderView::visualRect(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QRegion QtScriptShell_QHeaderView::visualRegionForSelection(const QItemSelection& selection) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRegionForSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRegionForSelection") & QScriptValue::QObjectMember)) { + return QHeaderView::visualRegionForSelection(selection); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selection))); + } +} + +void QtScriptShell_QHeaderView::wheelEvent(QWheelEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QHeaderView::wheelEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QHeaderView.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QHeaderView.h new file mode 100644 index 00000000..ee8459ab --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QHeaderView.h @@ -0,0 +1,104 @@ +#ifndef QTSCRIPTSHELL_QHEADERVIEW_H +#define QTSCRIPTSHELL_QHEADERVIEW_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QHeaderView : public QHeaderView +{ +public: + QtScriptShell_QHeaderView(Qt::Orientation orientation, QWidget* parent = 0); + ~QtScriptShell_QHeaderView(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint); + void closeEvent(QCloseEvent* event); + void commitData(QWidget* editor); + void contextMenuEvent(QContextMenuEvent* arg__1); + void currentChanged(const QModelIndex& current, const QModelIndex& old); + void customEvent(QEvent* event); + void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles = QVector()); + int devType() const; + void doItemsLayout(); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event); + void editorDestroyed(QObject* editor); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + int horizontalOffset() const; + void horizontalScrollbarAction(int action); + void horizontalScrollbarValueChanged(int value); + QModelIndex indexAt(const QPoint& p) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isIndexHidden(const QModelIndex& index) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void keyboardSearch(const QString& search); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* e); + void mouseMoveEvent(QMouseEvent* e); + void mousePressEvent(QMouseEvent* e); + void mouseReleaseEvent(QMouseEvent* e); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* e); + void paintSection(QPainter* painter, const QRect& rect, int logicalIndex) const; + QPaintDevice* redirected(QPoint* offset) const; + void reset(); + void resizeEvent(QResizeEvent* event); + void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end); + void rowsInserted(const QModelIndex& parent, int start, int end); + void scrollContentsBy(int dx, int dy); + void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint); + QSize sectionSizeFromContents(int logicalIndex) const; + void selectAll(); + QList selectedIndexes() const; + void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected); + QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const; + void setModel(QAbstractItemModel* model); + void setRootIndex(const QModelIndex& index); + void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags flags); + void setSelectionModel(QItemSelectionModel* selectionModel); + void setupViewport(QWidget* viewport); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + int sizeHintForColumn(int column) const; + int sizeHintForRow(int row) const; + void startDrag(Qt::DropActions supportedActions); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void updateEditorData(); + void updateEditorGeometries(); + void updateGeometries(); + int verticalOffset() const; + void verticalScrollbarAction(int action); + void verticalScrollbarValueChanged(int value); + QStyleOptionViewItem viewOptions() const; + bool viewportEvent(QEvent* e); + QSize viewportSizeHint() const; + QRect visualRect(const QModelIndex& index) const; + QRegion visualRegionForSelection(const QItemSelection& selection) const; + void wheelEvent(QWheelEvent* arg__1); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QHEADERVIEW_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QInputDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QInputDialog.cpp new file mode 100644 index 00000000..28b442db --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QInputDialog.cpp @@ -0,0 +1,697 @@ +#include "qtscriptshell_QInputDialog.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QInputDialog::QtScriptShell_QInputDialog(QWidget* parent, Qt::WindowFlags flags) + : QInputDialog(parent, flags) {} + +QtScriptShell_QInputDialog::~QtScriptShell_QInputDialog() {} + +void QtScriptShell_QInputDialog::accept() +{ + QScriptValue _q_function = __qtscript_self.property("accept"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("accept") & QScriptValue::QObjectMember)) { + QInputDialog::accept(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QInputDialog::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QInputDialog::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QInputDialog::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QInputDialog::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QInputDialog::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QInputDialog::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QInputDialog::closeEvent(QCloseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QInputDialog::closeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QInputDialog::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QInputDialog::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QInputDialog::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QInputDialog::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QInputDialog::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QInputDialog::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QInputDialog::done(int result) +{ + QScriptValue _q_function = __qtscript_self.property("done"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("done") & QScriptValue::QObjectMember)) { + QInputDialog::done(result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, result)); + } +} + +void QtScriptShell_QInputDialog::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QInputDialog::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QInputDialog::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QInputDialog::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QInputDialog::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QInputDialog::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QInputDialog::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QInputDialog::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QInputDialog::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QInputDialog::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QInputDialog::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QInputDialog::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QInputDialog::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QInputDialog::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +int QtScriptShell_QInputDialog::exec() +{ + QScriptValue _q_function = __qtscript_self.property("exec"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("exec") & QScriptValue::QObjectMember)) { + return QInputDialog::exec(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QInputDialog::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QInputDialog::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QInputDialog::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QInputDialog::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QInputDialog::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QInputDialog::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QInputDialog::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QInputDialog::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QInputDialog::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QInputDialog::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QInputDialog::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QInputDialog::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QInputDialog::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QInputDialog::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QInputDialog::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QInputDialog::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QInputDialog::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QInputDialog::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QInputDialog::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QInputDialog::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QInputDialog::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QInputDialog::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QInputDialog::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QInputDialog::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QInputDialog::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QInputDialog::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QInputDialog::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QInputDialog::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QInputDialog::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QInputDialog::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QInputDialog::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QInputDialog::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QInputDialog::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QInputDialog::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QInputDialog::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QInputDialog::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QInputDialog::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QInputDialog::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QInputDialog::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QInputDialog::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QInputDialog::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QInputDialog::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QInputDialog::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QInputDialog::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QInputDialog::reject() +{ + QScriptValue _q_function = __qtscript_self.property("reject"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reject") & QScriptValue::QObjectMember)) { + QInputDialog::reject(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QInputDialog::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QInputDialog::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPainter* QtScriptShell_QInputDialog::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QInputDialog::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QInputDialog::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QInputDialog::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QInputDialog::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QInputDialog::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QInputDialog::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QInputDialog::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QInputDialog::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QInputDialog::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QInputDialog.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QInputDialog.h new file mode 100644 index 00000000..5e971fdd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QInputDialog.h @@ -0,0 +1,65 @@ +#ifndef QTSCRIPTSHELL_QINPUTDIALOG_H +#define QTSCRIPTSHELL_QINPUTDIALOG_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QInputDialog : public QInputDialog +{ +public: + QtScriptShell_QInputDialog(QWidget* parent = 0, Qt::WindowFlags flags = Qt::WindowFlags()); + ~QtScriptShell_QInputDialog(); + + void accept(); + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* arg__1); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void done(int result); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + int exec(); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void reject(); + void resizeEvent(QResizeEvent* arg__1); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QINPUTDIALOG_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemDelegate.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemDelegate.cpp new file mode 100644 index 00000000..32c06402 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemDelegate.cpp @@ -0,0 +1,333 @@ +#include "qtscriptshell_QItemDelegate.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QStyleOptionViewItem) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(Qt::CheckState) +Q_DECLARE_METATYPE(QAbstractItemModel*) +Q_DECLARE_METATYPE(QHelpEvent*) +Q_DECLARE_METATYPE(QAbstractItemView*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QItemDelegate::QtScriptShell_QItemDelegate(QObject* parent) + : QItemDelegate(parent) {} + +QtScriptShell_QItemDelegate::~QtScriptShell_QItemDelegate() {} + +void QtScriptShell_QItemDelegate::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QItemDelegate::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QWidget* QtScriptShell_QItemDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("createEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createEditor") & QScriptValue::QObjectMember)) { + return QItemDelegate::createEditor(parent, option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QItemDelegate::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QItemDelegate::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QItemDelegate::destroyEditor(QWidget* editor, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("destroyEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("destroyEditor") & QScriptValue::QObjectMember)) { + QItemDelegate::destroyEditor(editor, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QItemDelegate::drawCheck(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, Qt::CheckState state) const +{ + QScriptValue _q_function = __qtscript_self.property("drawCheck"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawCheck") & QScriptValue::QObjectMember)) { + QItemDelegate::drawCheck(painter, option, rect, state); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, state)); + } +} + +void QtScriptShell_QItemDelegate::drawDecoration(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QPixmap& pixmap) const +{ + QScriptValue _q_function = __qtscript_self.property("drawDecoration"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawDecoration") & QScriptValue::QObjectMember)) { + QItemDelegate::drawDecoration(painter, option, rect, pixmap); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, pixmap)); + } +} + +void QtScriptShell_QItemDelegate::drawDisplay(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QString& text) const +{ + QScriptValue _q_function = __qtscript_self.property("drawDisplay"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawDisplay") & QScriptValue::QObjectMember)) { + QItemDelegate::drawDisplay(painter, option, rect, text); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, text)); + } +} + +void QtScriptShell_QItemDelegate::drawFocus(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect) const +{ + QScriptValue _q_function = __qtscript_self.property("drawFocus"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawFocus") & QScriptValue::QObjectMember)) { + QItemDelegate::drawFocus(painter, option, rect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, rect)); + } +} + +bool QtScriptShell_QItemDelegate::editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) +{ + QScriptValue _q_function = __qtscript_self.property("editorEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("editorEvent") & QScriptValue::QObjectMember)) { + return QItemDelegate::editorEvent(event, model, option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event) + << qScriptValueFromValue(_q_engine, model) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QItemDelegate::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QItemDelegate::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QItemDelegate::eventFilter(QObject* object, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QItemDelegate::eventFilter(object, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, object) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QItemDelegate::helpEvent(QHelpEvent* event, QAbstractItemView* view, const QStyleOptionViewItem& option, const QModelIndex& index) +{ + QScriptValue _q_function = __qtscript_self.property("helpEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("helpEvent") & QScriptValue::QObjectMember)) { + return QItemDelegate::helpEvent(event, view, option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event) + << qScriptValueFromValue(_q_engine, view) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + QItemDelegate::paint(painter, option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index)); + } +} + +QVector QtScriptShell_QItemDelegate::paintingRoles() const +{ + QScriptValue _q_function = __qtscript_self.property("paintingRoles"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintingRoles") & QScriptValue::QObjectMember)) { + return QItemDelegate::paintingRoles(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QItemDelegate::setEditorData(QWidget* editor, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("setEditorData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setEditorData") & QScriptValue::QObjectMember)) { + QItemDelegate::setEditorData(editor, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QItemDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("setModelData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setModelData") & QScriptValue::QObjectMember)) { + QItemDelegate::setModelData(editor, model, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, model) + << qScriptValueFromValue(_q_engine, index)); + } +} + +QSize QtScriptShell_QItemDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + return QItemDelegate::sizeHint(option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QItemDelegate::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QItemDelegate::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QItemDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorGeometry") & QScriptValue::QObjectMember)) { + QItemDelegate::updateEditorGeometry(editor, option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemDelegate.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemDelegate.h new file mode 100644 index 00000000..becd7214 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemDelegate.h @@ -0,0 +1,38 @@ +#ifndef QTSCRIPTSHELL_QITEMDELEGATE_H +#define QTSCRIPTSHELL_QITEMDELEGATE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QItemDelegate : public QItemDelegate +{ +public: + QtScriptShell_QItemDelegate(QObject* parent = 0); + ~QtScriptShell_QItemDelegate(); + + void childEvent(QChildEvent* event); + QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const; + void customEvent(QEvent* event); + void destroyEditor(QWidget* editor, const QModelIndex& index) const; + void drawCheck(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, Qt::CheckState state) const; + void drawDecoration(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QPixmap& pixmap) const; + void drawDisplay(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect, const QString& text) const; + void drawFocus(QPainter* painter, const QStyleOptionViewItem& option, const QRect& rect) const; + bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index); + bool event(QEvent* event); + bool eventFilter(QObject* object, QEvent* event); + bool helpEvent(QHelpEvent* event, QAbstractItemView* view, const QStyleOptionViewItem& option, const QModelIndex& index); + void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; + QVector paintingRoles() const; + void setEditorData(QWidget* editor, const QModelIndex& index) const; + void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const; + QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const; + void timerEvent(QTimerEvent* event); + void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QITEMDELEGATE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemEditorCreatorBase.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemEditorCreatorBase.cpp new file mode 100644 index 00000000..4215c4d0 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemEditorCreatorBase.cpp @@ -0,0 +1,41 @@ +#include "qtscriptshell_QItemEditorCreatorBase.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QWidget*) + +QtScriptShell_QItemEditorCreatorBase::QtScriptShell_QItemEditorCreatorBase() + : QItemEditorCreatorBase() {} + +QtScriptShell_QItemEditorCreatorBase::~QtScriptShell_QItemEditorCreatorBase() {} + +QWidget* QtScriptShell_QItemEditorCreatorBase::createWidget(QWidget* parent) const +{ + QScriptValue _q_function = __qtscript_self.property("createWidget"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createWidget") & QScriptValue::QObjectMember)) { + qFatal("QItemEditorCreatorBase::createWidget() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +QByteArray QtScriptShell_QItemEditorCreatorBase::valuePropertyName() const +{ + QScriptValue _q_function = __qtscript_self.property("valuePropertyName"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("valuePropertyName") & QScriptValue::QObjectMember)) { + qFatal("QItemEditorCreatorBase::valuePropertyName() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemEditorCreatorBase.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemEditorCreatorBase.h new file mode 100644 index 00000000..e3f20d5a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemEditorCreatorBase.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QITEMEDITORCREATORBASE_H +#define QTSCRIPTSHELL_QITEMEDITORCREATORBASE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QItemEditorCreatorBase : public QItemEditorCreatorBase +{ +public: + QtScriptShell_QItemEditorCreatorBase(); + ~QtScriptShell_QItemEditorCreatorBase(); + + QWidget* createWidget(QWidget* parent) const; + QByteArray valuePropertyName() const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QITEMEDITORCREATORBASE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemEditorFactory.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemEditorFactory.cpp new file mode 100644 index 00000000..5bfbe422 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemEditorFactory.cpp @@ -0,0 +1,46 @@ +#include "qtscriptshell_QItemEditorFactory.h" + +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QWidget*) + +QtScriptShell_QItemEditorFactory::QtScriptShell_QItemEditorFactory() + : QItemEditorFactory() {} + +QtScriptShell_QItemEditorFactory::~QtScriptShell_QItemEditorFactory() {} + +QWidget* QtScriptShell_QItemEditorFactory::createEditor(int userType, QWidget* parent) const +{ + QScriptValue _q_function = __qtscript_self.property("createEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createEditor") & QScriptValue::QObjectMember)) { + return QItemEditorFactory::createEditor(userType, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, userType) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +QByteArray QtScriptShell_QItemEditorFactory::valuePropertyName(int userType) const +{ + QScriptValue _q_function = __qtscript_self.property("valuePropertyName"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("valuePropertyName") & QScriptValue::QObjectMember)) { + return QItemEditorFactory::valuePropertyName(userType); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, userType))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemEditorFactory.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemEditorFactory.h new file mode 100644 index 00000000..178e9201 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemEditorFactory.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QITEMEDITORFACTORY_H +#define QTSCRIPTSHELL_QITEMEDITORFACTORY_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QItemEditorFactory : public QItemEditorFactory +{ +public: + QtScriptShell_QItemEditorFactory(); + ~QtScriptShell_QItemEditorFactory(); + + QWidget* createEditor(int userType, QWidget* parent) const; + QByteArray valuePropertyName(int userType) const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QITEMEDITORFACTORY_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemSelectionModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemSelectionModel.cpp new file mode 100644 index 00000000..cef2ff86 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemSelectionModel.cpp @@ -0,0 +1,175 @@ +#include "qtscriptshell_QItemSelectionModel.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QItemSelectionModel::QtScriptShell_QItemSelectionModel(QAbstractItemModel* model) + : QItemSelectionModel(model) {} + +QtScriptShell_QItemSelectionModel::QtScriptShell_QItemSelectionModel(QAbstractItemModel* model, QObject* parent) + : QItemSelectionModel(model, parent) {} + +QtScriptShell_QItemSelectionModel::~QtScriptShell_QItemSelectionModel() {} + +void QtScriptShell_QItemSelectionModel::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QItemSelectionModel::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QItemSelectionModel::clear() +{ + QScriptValue _q_function = __qtscript_self.property("clear"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clear") & QScriptValue::QObjectMember)) { + QItemSelectionModel::clear(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QItemSelectionModel::clearCurrentIndex() +{ + QScriptValue _q_function = __qtscript_self.property("clearCurrentIndex"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clearCurrentIndex") & QScriptValue::QObjectMember)) { + QItemSelectionModel::clearCurrentIndex(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QItemSelectionModel::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QItemSelectionModel::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QItemSelectionModel::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QItemSelectionModel::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QItemSelectionModel::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QItemSelectionModel::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QItemSelectionModel::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + QItemSelectionModel::reset(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QItemSelectionModel::select(const QItemSelection& selection, QItemSelectionModel::SelectionFlags command) +{ + QScriptValue _q_function = __qtscript_self.property("select"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("select") & QScriptValue::QObjectMember)) { + QItemSelectionModel::select(selection, command); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selection) + << qScriptValueFromValue(_q_engine, command)); + } +} + +void QtScriptShell_QItemSelectionModel::select(const QModelIndex& index, QItemSelectionModel::SelectionFlags command) +{ + QScriptValue _q_function = __qtscript_self.property("select"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("select") & QScriptValue::QObjectMember)) { + QItemSelectionModel::select(index, command); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, command)); + } +} + +void QtScriptShell_QItemSelectionModel::setCurrentIndex(const QModelIndex& index, QItemSelectionModel::SelectionFlags command) +{ + QScriptValue _q_function = __qtscript_self.property("setCurrentIndex"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setCurrentIndex") & QScriptValue::QObjectMember)) { + QItemSelectionModel::setCurrentIndex(index, command); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, command)); + } +} + +void QtScriptShell_QItemSelectionModel::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QItemSelectionModel::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemSelectionModel.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemSelectionModel.h new file mode 100644 index 00000000..ad8cc229 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QItemSelectionModel.h @@ -0,0 +1,31 @@ +#ifndef QTSCRIPTSHELL_QITEMSELECTIONMODEL_H +#define QTSCRIPTSHELL_QITEMSELECTIONMODEL_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QItemSelectionModel : public QItemSelectionModel +{ +public: + QtScriptShell_QItemSelectionModel(QAbstractItemModel* model = 0); + QtScriptShell_QItemSelectionModel(QAbstractItemModel* model, QObject* parent); + ~QtScriptShell_QItemSelectionModel(); + + void childEvent(QChildEvent* event); + void clear(); + void clearCurrentIndex(); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void reset(); + void select(const QItemSelection& selection, QItemSelectionModel::SelectionFlags command); + void select(const QModelIndex& index, QItemSelectionModel::SelectionFlags command); + void setCurrentIndex(const QModelIndex& index, QItemSelectionModel::SelectionFlags command); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QITEMSELECTIONMODEL_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QKeyEventTransition.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QKeyEventTransition.cpp new file mode 100644 index 00000000..ffcdfba9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QKeyEventTransition.cpp @@ -0,0 +1,127 @@ +#include "qtscriptshell_QKeyEventTransition.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QKeyEventTransition::QtScriptShell_QKeyEventTransition(QObject* object, QEvent::Type type, int key, QState* sourceState) + : QKeyEventTransition(object, type, key, sourceState) {} + +QtScriptShell_QKeyEventTransition::QtScriptShell_QKeyEventTransition(QState* sourceState) + : QKeyEventTransition(sourceState) {} + +QtScriptShell_QKeyEventTransition::~QtScriptShell_QKeyEventTransition() {} + +void QtScriptShell_QKeyEventTransition::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QKeyEventTransition::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QKeyEventTransition::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QKeyEventTransition::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QKeyEventTransition::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QKeyEventTransition::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QKeyEventTransition::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QKeyEventTransition::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QKeyEventTransition::eventTest(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventTest"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventTest") & QScriptValue::QObjectMember)) { + return QKeyEventTransition::eventTest(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QKeyEventTransition::onTransition(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("onTransition"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("onTransition") & QScriptValue::QObjectMember)) { + QKeyEventTransition::onTransition(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QKeyEventTransition::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QKeyEventTransition::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QKeyEventTransition.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QKeyEventTransition.h new file mode 100644 index 00000000..d0a78f67 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QKeyEventTransition.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QKEYEVENTTRANSITION_H +#define QTSCRIPTSHELL_QKEYEVENTTRANSITION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QKeyEventTransition : public QKeyEventTransition +{ +public: + QtScriptShell_QKeyEventTransition(QObject* object, QEvent::Type type, int key, QState* sourceState = 0); + QtScriptShell_QKeyEventTransition(QState* sourceState = 0); + ~QtScriptShell_QKeyEventTransition(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + bool eventTest(QEvent* event); + void onTransition(QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QKEYEVENTTRANSITION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLCDNumber.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLCDNumber.cpp new file mode 100644 index 00000000..f31ec197 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLCDNumber.cpp @@ -0,0 +1,664 @@ +#include "qtscriptshell_QLCDNumber.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QLCDNumber::QtScriptShell_QLCDNumber(QWidget* parent) + : QLCDNumber(parent) {} + +QtScriptShell_QLCDNumber::QtScriptShell_QLCDNumber(uint numDigits, QWidget* parent) + : QLCDNumber(numDigits, parent) {} + +QtScriptShell_QLCDNumber::~QtScriptShell_QLCDNumber() {} + +void QtScriptShell_QLCDNumber::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QLCDNumber::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QLCDNumber::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QLCDNumber::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLCDNumber::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QLCDNumber::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QLCDNumber::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QLCDNumber::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QLCDNumber::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QLCDNumber::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QLCDNumber::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QLCDNumber::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QLCDNumber::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QLCDNumber::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QLCDNumber::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QLCDNumber::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QLCDNumber::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QLCDNumber::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QLCDNumber::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QLCDNumber::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QLCDNumber::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QLCDNumber::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QLCDNumber::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QLCDNumber::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QLCDNumber::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QLCDNumber::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QLCDNumber::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLCDNumber::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QLCDNumber::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QLCDNumber::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QLCDNumber::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QLCDNumber::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLCDNumber::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QLCDNumber::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QLCDNumber::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QLCDNumber::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QLCDNumber::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QLCDNumber::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLCDNumber::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLCDNumber::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QLCDNumber::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLCDNumber.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLCDNumber.h new file mode 100644 index 00000000..1bb3ac47 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLCDNumber.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_QLCDNUMBER_H +#define QTSCRIPTSHELL_QLCDNUMBER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QLCDNumber : public QLCDNumber +{ +public: + QtScriptShell_QLCDNumber(QWidget* parent = 0); + QtScriptShell_QLCDNumber(uint numDigits, QWidget* parent = 0); + ~QtScriptShell_QLCDNumber(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QLCDNUMBER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLabel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLabel.cpp new file mode 100644 index 00000000..e0fcc4d1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLabel.cpp @@ -0,0 +1,655 @@ +#include "qtscriptshell_QLabel.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QLabel::QtScriptShell_QLabel(QWidget* parent, Qt::WindowFlags f) + : QLabel(parent, f) {} + +QtScriptShell_QLabel::QtScriptShell_QLabel(const QString& text, QWidget* parent, Qt::WindowFlags f) + : QLabel(text, parent, f) {} + +QtScriptShell_QLabel::~QtScriptShell_QLabel() {} + +void QtScriptShell_QLabel::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QLabel::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLabel::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QLabel::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QLabel::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QLabel::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLabel::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QLabel::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLabel::contextMenuEvent(QContextMenuEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QLabel::contextMenuEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QLabel::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QLabel::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QLabel::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QLabel::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLabel::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QLabel::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLabel::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QLabel::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLabel::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QLabel::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLabel::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QLabel::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLabel::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QLabel::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QLabel::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QLabel::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QLabel::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QLabel::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QLabel::focusInEvent(QFocusEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QLabel::focusInEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +bool QtScriptShell_QLabel::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QLabel::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QLabel::focusOutEvent(QFocusEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QLabel::focusOutEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +bool QtScriptShell_QLabel::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QLabel::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QLabel::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QLabel::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QLabel::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QLabel::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLabel::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QLabel::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QLabel::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QLabel::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QLabel::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QLabel::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QLabel::keyPressEvent(QKeyEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QLabel::keyPressEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QLabel::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QLabel::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLabel::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QLabel::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QLabel::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QLabel::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QLabel::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QLabel::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLabel::mouseMoveEvent(QMouseEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QLabel::mouseMoveEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QLabel::mousePressEvent(QMouseEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QLabel::mousePressEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QLabel::mouseReleaseEvent(QMouseEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QLabel::mouseReleaseEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QLabel::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QLabel::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QLabel::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QLabel::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QLabel::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QLabel::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLabel::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QLabel::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QLabel::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QLabel::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QLabel::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QLabel::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QLabel::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QLabel::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLabel::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QLabel::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLabel::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QLabel::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLabel::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QLabel::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLabel::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QLabel::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLabel.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLabel.h new file mode 100644 index 00000000..fe0689b5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLabel.h @@ -0,0 +1,62 @@ +#ifndef QTSCRIPTSHELL_QLABEL_H +#define QTSCRIPTSHELL_QLABEL_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QLabel : public QLabel +{ +public: + QtScriptShell_QLabel(QWidget* parent = 0, Qt::WindowFlags f = Qt::WindowFlags()); + QtScriptShell_QLabel(const QString& text, QWidget* parent = 0, Qt::WindowFlags f = Qt::WindowFlags()); + ~QtScriptShell_QLabel(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* ev); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* ev); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* ev); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* ev); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* ev); + void mousePressEvent(QMouseEvent* ev); + void mouseReleaseEvent(QMouseEvent* ev); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QLABEL_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLayout.cpp new file mode 100644 index 00000000..983f5894 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLayout.cpp @@ -0,0 +1,347 @@ +#include "qtscriptshell_QLayout.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QLayoutItem*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QSpacerItem*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QLayout::QtScriptShell_QLayout() + : QLayout() {} + +QtScriptShell_QLayout::QtScriptShell_QLayout(QWidget* parent) + : QLayout(parent) {} + +QtScriptShell_QLayout::~QtScriptShell_QLayout() {} + +void QtScriptShell_QLayout::addItem(QLayoutItem* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("addItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("addItem") & QScriptValue::QObjectMember)) { + qFatal("QLayout::addItem() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QLayout::childEvent(QChildEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QLayout::childEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QSizePolicy::ControlTypes QtScriptShell_QLayout::controlTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("controlTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("controlTypes") & QScriptValue::QObjectMember)) { + return QLayout::controlTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QLayout::count() const +{ + QScriptValue _q_function = __qtscript_self.property("count"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("count") & QScriptValue::QObjectMember)) { + qFatal("QLayout::count() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLayout::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QLayout::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QLayout::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QLayout::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QLayout::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QLayout::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +Qt::Orientations QtScriptShell_QLayout::expandingDirections() const +{ + QScriptValue _q_function = __qtscript_self.property("expandingDirections"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("expandingDirections") & QScriptValue::QObjectMember)) { + return QLayout::expandingDirections(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QLayout::geometry() const +{ + QScriptValue _q_function = __qtscript_self.property("geometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("geometry") & QScriptValue::QObjectMember)) { + return QLayout::geometry(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QLayout::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QLayout::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QLayout::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QLayout::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +int QtScriptShell_QLayout::indexOf(QWidget* arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("indexOf"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexOf") & QScriptValue::QObjectMember)) { + return QLayout::indexOf(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QLayout::invalidate() +{ + QScriptValue _q_function = __qtscript_self.property("invalidate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("invalidate") & QScriptValue::QObjectMember)) { + QLayout::invalidate(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QLayout::isEmpty() const +{ + QScriptValue _q_function = __qtscript_self.property("isEmpty"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isEmpty") & QScriptValue::QObjectMember)) { + return QLayout::isEmpty(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayoutItem* QtScriptShell_QLayout::itemAt(int index) const +{ + QScriptValue _q_function = __qtscript_self.property("itemAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemAt") & QScriptValue::QObjectMember)) { + qFatal("QLayout::itemAt() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QLayout* QtScriptShell_QLayout::layout() +{ + QScriptValue _q_function = __qtscript_self.property("layout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("layout") & QScriptValue::QObjectMember)) { + return QLayout::layout(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSize QtScriptShell_QLayout::maximumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("maximumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("maximumSize") & QScriptValue::QObjectMember)) { + return QLayout::maximumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QLayout::minimumHeightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("minimumHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumHeightForWidth") & QScriptValue::QObjectMember)) { + return QLayout::minimumHeightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QLayout::minimumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("minimumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumSize") & QScriptValue::QObjectMember)) { + return QLayout::minimumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLayout::setGeometry(const QRect& arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + QLayout::setGeometry(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QSize QtScriptShell_QLayout::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + qFatal("QLayout::sizeHint() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSpacerItem* QtScriptShell_QLayout::spacerItem() +{ + QScriptValue _q_function = __qtscript_self.property("spacerItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("spacerItem") & QScriptValue::QObjectMember)) { + return QLayout::spacerItem(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayoutItem* QtScriptShell_QLayout::takeAt(int index) +{ + QScriptValue _q_function = __qtscript_self.property("takeAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("takeAt") & QScriptValue::QObjectMember)) { + qFatal("QLayout::takeAt() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QLayout::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QLayout::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QWidget* QtScriptShell_QLayout::widget() +{ + QScriptValue _q_function = __qtscript_self.property("widget"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("widget") & QScriptValue::QObjectMember)) { + return QLayout::widget(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLayout.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLayout.h new file mode 100644 index 00000000..6651f586 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLayout.h @@ -0,0 +1,45 @@ +#ifndef QTSCRIPTSHELL_QLAYOUT_H +#define QTSCRIPTSHELL_QLAYOUT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QLayout : public QLayout +{ +public: + QtScriptShell_QLayout(); + QtScriptShell_QLayout(QWidget* parent); + ~QtScriptShell_QLayout(); + + void addItem(QLayoutItem* arg__1); + void childEvent(QChildEvent* e); + QSizePolicy::ControlTypes controlTypes() const; + int count() const; + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + Qt::Orientations expandingDirections() const; + QRect geometry() const; + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + int indexOf(QWidget* arg__1) const; + void invalidate(); + bool isEmpty() const; + QLayoutItem* itemAt(int index) const; + QLayout* layout(); + QSize maximumSize() const; + int minimumHeightForWidth(int arg__1) const; + QSize minimumSize() const; + void setGeometry(const QRect& arg__1); + QSize sizeHint() const; + QSpacerItem* spacerItem(); + QLayoutItem* takeAt(int index); + void timerEvent(QTimerEvent* event); + QWidget* widget(); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QLAYOUT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLayoutItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLayoutItem.cpp new file mode 100644 index 00000000..39e90bbd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLayoutItem.cpp @@ -0,0 +1,197 @@ +#include "qtscriptshell_QLayoutItem.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QSpacerItem*) +Q_DECLARE_METATYPE(QWidget*) + +QtScriptShell_QLayoutItem::QtScriptShell_QLayoutItem(Qt::Alignment alignment) + : QLayoutItem(alignment) {} + +QtScriptShell_QLayoutItem::~QtScriptShell_QLayoutItem() {} + +QSizePolicy::ControlTypes QtScriptShell_QLayoutItem::controlTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("controlTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("controlTypes") & QScriptValue::QObjectMember)) { + return QLayoutItem::controlTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::Orientations QtScriptShell_QLayoutItem::expandingDirections() const +{ + QScriptValue _q_function = __qtscript_self.property("expandingDirections"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("expandingDirections") & QScriptValue::QObjectMember)) { + qFatal("QLayoutItem::expandingDirections() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QLayoutItem::geometry() const +{ + QScriptValue _q_function = __qtscript_self.property("geometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("geometry") & QScriptValue::QObjectMember)) { + qFatal("QLayoutItem::geometry() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QLayoutItem::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QLayoutItem::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QLayoutItem::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QLayoutItem::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QLayoutItem::invalidate() +{ + QScriptValue _q_function = __qtscript_self.property("invalidate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("invalidate") & QScriptValue::QObjectMember)) { + QLayoutItem::invalidate(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QLayoutItem::isEmpty() const +{ + QScriptValue _q_function = __qtscript_self.property("isEmpty"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isEmpty") & QScriptValue::QObjectMember)) { + qFatal("QLayoutItem::isEmpty() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayout* QtScriptShell_QLayoutItem::layout() +{ + QScriptValue _q_function = __qtscript_self.property("layout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("layout") & QScriptValue::QObjectMember)) { + return QLayoutItem::layout(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSize QtScriptShell_QLayoutItem::maximumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("maximumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("maximumSize") & QScriptValue::QObjectMember)) { + qFatal("QLayoutItem::maximumSize() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QLayoutItem::minimumHeightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("minimumHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumHeightForWidth") & QScriptValue::QObjectMember)) { + return QLayoutItem::minimumHeightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QLayoutItem::minimumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("minimumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumSize") & QScriptValue::QObjectMember)) { + qFatal("QLayoutItem::minimumSize() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLayoutItem::setGeometry(const QRect& arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + qFatal("QLayoutItem::setGeometry() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QSize QtScriptShell_QLayoutItem::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + qFatal("QLayoutItem::sizeHint() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSpacerItem* QtScriptShell_QLayoutItem::spacerItem() +{ + QScriptValue _q_function = __qtscript_self.property("spacerItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("spacerItem") & QScriptValue::QObjectMember)) { + return QLayoutItem::spacerItem(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QWidget* QtScriptShell_QLayoutItem::widget() +{ + QScriptValue _q_function = __qtscript_self.property("widget"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("widget") & QScriptValue::QObjectMember)) { + return QLayoutItem::widget(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLayoutItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLayoutItem.h new file mode 100644 index 00000000..9fe41f48 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLayoutItem.h @@ -0,0 +1,34 @@ +#ifndef QTSCRIPTSHELL_QLAYOUTITEM_H +#define QTSCRIPTSHELL_QLAYOUTITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QLayoutItem : public QLayoutItem +{ +public: + QtScriptShell_QLayoutItem(Qt::Alignment alignment = Qt::Alignment()); + ~QtScriptShell_QLayoutItem(); + + QSizePolicy::ControlTypes controlTypes() const; + Qt::Orientations expandingDirections() const; + QRect geometry() const; + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void invalidate(); + bool isEmpty() const; + QLayout* layout(); + QSize maximumSize() const; + int minimumHeightForWidth(int arg__1) const; + QSize minimumSize() const; + void setGeometry(const QRect& arg__1); + QSize sizeHint() const; + QSpacerItem* spacerItem(); + QWidget* widget(); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QLAYOUTITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLineEdit.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLineEdit.cpp new file mode 100644 index 00000000..2b887dbe --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLineEdit.cpp @@ -0,0 +1,656 @@ +#include "qtscriptshell_QLineEdit.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QLineEdit::QtScriptShell_QLineEdit(QWidget* parent) + : QLineEdit(parent) {} + +QtScriptShell_QLineEdit::QtScriptShell_QLineEdit(const QString& arg__1, QWidget* parent) + : QLineEdit(arg__1, parent) {} + +QtScriptShell_QLineEdit::~QtScriptShell_QLineEdit() {} + +void QtScriptShell_QLineEdit::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QLineEdit::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLineEdit::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QLineEdit::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QLineEdit::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QLineEdit::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLineEdit::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QLineEdit::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLineEdit::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QLineEdit::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QLineEdit::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QLineEdit::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QLineEdit::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QLineEdit::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLineEdit::dragEnterEvent(QDragEnterEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QLineEdit::dragEnterEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QLineEdit::dragLeaveEvent(QDragLeaveEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QLineEdit::dragLeaveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QLineEdit::dragMoveEvent(QDragMoveEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QLineEdit::dragMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QLineEdit::dropEvent(QDropEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QLineEdit::dropEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QLineEdit::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QLineEdit::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QLineEdit::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QLineEdit::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QLineEdit::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QLineEdit::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QLineEdit::focusInEvent(QFocusEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QLineEdit::focusInEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +bool QtScriptShell_QLineEdit::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QLineEdit::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QLineEdit::focusOutEvent(QFocusEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QLineEdit::focusOutEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +bool QtScriptShell_QLineEdit::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QLineEdit::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QLineEdit::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QLineEdit::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QLineEdit::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QLineEdit::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLineEdit::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QLineEdit::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QLineEdit::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QLineEdit::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QLineEdit::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QLineEdit::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QLineEdit::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QLineEdit::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QLineEdit::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QLineEdit::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLineEdit::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QLineEdit::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QLineEdit::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QLineEdit::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QLineEdit::mouseDoubleClickEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QLineEdit::mouseDoubleClickEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QLineEdit::mouseMoveEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QLineEdit::mouseMoveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QLineEdit::mousePressEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QLineEdit::mousePressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QLineEdit::mouseReleaseEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QLineEdit::mouseReleaseEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QLineEdit::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QLineEdit::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QLineEdit::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QLineEdit::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QLineEdit::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QLineEdit::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLineEdit::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QLineEdit::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QLineEdit::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QLineEdit::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QLineEdit::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QLineEdit::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QLineEdit::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QLineEdit::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QLineEdit::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QLineEdit::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLineEdit::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QLineEdit::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLineEdit::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QLineEdit::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QLineEdit::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QLineEdit::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLineEdit.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLineEdit.h new file mode 100644 index 00000000..c314b91f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QLineEdit.h @@ -0,0 +1,62 @@ +#ifndef QTSCRIPTSHELL_QLINEEDIT_H +#define QTSCRIPTSHELL_QLINEEDIT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QLineEdit : public QLineEdit +{ +public: + QtScriptShell_QLineEdit(QWidget* parent = 0); + QtScriptShell_QLineEdit(const QString& arg__1, QWidget* parent = 0); + ~QtScriptShell_QLineEdit(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* arg__1); + void dragLeaveEvent(QDragLeaveEvent* e); + void dragMoveEvent(QDragMoveEvent* e); + void dropEvent(QDropEvent* arg__1); + void enterEvent(QEvent* event); + bool event(QEvent* arg__1); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* arg__1); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* arg__1); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* arg__1); + void mouseMoveEvent(QMouseEvent* arg__1); + void mousePressEvent(QMouseEvent* arg__1); + void mouseReleaseEvent(QMouseEvent* arg__1); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QLINEEDIT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListView.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListView.cpp new file mode 100644 index 00000000..5e201a20 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListView.cpp @@ -0,0 +1,1222 @@ +#include "qtscriptshell_QListView.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::EditTrigger) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::ScrollHint) +Q_DECLARE_METATYPE(const QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAbstractItemModel*) +Q_DECLARE_METATYPE(QItemSelectionModel*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QStyleOptionViewItem) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QListView::QtScriptShell_QListView(QWidget* parent) + : QListView(parent) {} + +QtScriptShell_QListView::~QtScriptShell_QListView() {} + +void QtScriptShell_QListView::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QListView::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListView::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QListView::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QListView::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QListView::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListView::closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("closeEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEditor") & QScriptValue::QObjectMember)) { + QListView::closeEditor(editor, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QListView::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QListView::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListView::commitData(QWidget* editor) +{ + QScriptValue _q_function = __qtscript_self.property("commitData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("commitData") & QScriptValue::QObjectMember)) { + QListView::commitData(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QListView::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QListView::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QListView::currentChanged(const QModelIndex& current, const QModelIndex& previous) +{ + QScriptValue _q_function = __qtscript_self.property("currentChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("currentChanged") & QScriptValue::QObjectMember)) { + QListView::currentChanged(current, previous); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, current) + << qScriptValueFromValue(_q_engine, previous)); + } +} + +void QtScriptShell_QListView::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QListView::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListView::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) +{ + QScriptValue _q_function = __qtscript_self.property("dataChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dataChanged") & QScriptValue::QObjectMember)) { + QListView::dataChanged(topLeft, bottomRight, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, topLeft) + << qScriptValueFromValue(_q_engine, bottomRight) + << qScriptValueFromValue(_q_engine, roles)); + } +} + +int QtScriptShell_QListView::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QListView::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QListView::doItemsLayout() +{ + QScriptValue _q_function = __qtscript_self.property("doItemsLayout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("doItemsLayout") & QScriptValue::QObjectMember)) { + QListView::doItemsLayout(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QListView::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QListView::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListView::dragLeaveEvent(QDragLeaveEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QListView::dragLeaveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QListView::dragMoveEvent(QDragMoveEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QListView::dragMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QListView::dropEvent(QDropEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QListView::dropEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QListView::edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("edit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("edit") & QScriptValue::QObjectMember)) { + return QListView::edit(index, trigger, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, trigger) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QListView::editorDestroyed(QObject* editor) +{ + QScriptValue _q_function = __qtscript_self.property("editorDestroyed"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("editorDestroyed") & QScriptValue::QObjectMember)) { + QListView::editorDestroyed(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QListView::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QListView::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QListView::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QListView::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QListView::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QListView::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QListView::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QListView::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QListView::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QListView::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QListView::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QListView::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QListView::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QListView::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QListView::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QListView::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QListView::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QListView::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QListView::horizontalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("horizontalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalOffset") & QScriptValue::QObjectMember)) { + return QListView::horizontalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QListView::horizontalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarAction") & QScriptValue::QObjectMember)) { + QListView::horizontalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QListView::horizontalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QListView::horizontalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QModelIndex QtScriptShell_QListView::indexAt(const QPoint& p) const +{ + QScriptValue _q_function = __qtscript_self.property("indexAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexAt") & QScriptValue::QObjectMember)) { + return QListView::indexAt(p); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, p))); + } +} + +void QtScriptShell_QListView::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QListView::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QListView::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QListView::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QListView::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QListView::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QListView::isIndexHidden(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("isIndexHidden"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isIndexHidden") & QScriptValue::QObjectMember)) { + return QListView::isIndexHidden(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QListView::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QListView::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListView::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QListView::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListView::keyboardSearch(const QString& search) +{ + QScriptValue _q_function = __qtscript_self.property("keyboardSearch"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyboardSearch") & QScriptValue::QObjectMember)) { + QListView::keyboardSearch(search); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, search)); + } +} + +void QtScriptShell_QListView::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QListView::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QListView::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QListView::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QListView::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QListView::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListView::mouseMoveEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QListView::mouseMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QListView::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QListView::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListView::mouseReleaseEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QListView::mouseReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QListView::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QListView::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QListView::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QListView::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QListView::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QListView::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QListView::paintEvent(QPaintEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QListView::paintEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QPaintDevice* QtScriptShell_QListView::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QListView::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QListView::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + QListView::reset(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QListView::resizeEvent(QResizeEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QListView::resizeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QListView::rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsAboutToBeRemoved"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsAboutToBeRemoved") & QScriptValue::QObjectMember)) { + QListView::rowsAboutToBeRemoved(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QListView::rowsInserted(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsInserted"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsInserted") & QScriptValue::QObjectMember)) { + QListView::rowsInserted(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QListView::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QListView::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QListView::scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("scrollTo"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollTo") & QScriptValue::QObjectMember)) { + QListView::scrollTo(index, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QListView::selectAll() +{ + QScriptValue _q_function = __qtscript_self.property("selectAll"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectAll") & QScriptValue::QObjectMember)) { + QListView::selectAll(); + } else { + _q_function.call(__qtscript_self); + } +} + +QList QtScriptShell_QListView::selectedIndexes() const +{ + QScriptValue _q_function = __qtscript_self.property("selectedIndexes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectedIndexes") & QScriptValue::QObjectMember)) { + return QListView::selectedIndexes(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QListView::selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) +{ + QScriptValue _q_function = __qtscript_self.property("selectionChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionChanged") & QScriptValue::QObjectMember)) { + QListView::selectionChanged(selected, deselected); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selected) + << qScriptValueFromValue(_q_engine, deselected)); + } +} + +QItemSelectionModel::SelectionFlags QtScriptShell_QListView::selectionCommand(const QModelIndex& index, const QEvent* event) const +{ + QScriptValue _q_function = __qtscript_self.property("selectionCommand"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionCommand") & QScriptValue::QObjectMember)) { + return QListView::selectionCommand(index, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, const_cast(event)))); + } +} + +void QtScriptShell_QListView::setModel(QAbstractItemModel* model) +{ + QScriptValue _q_function = __qtscript_self.property("setModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setModel") & QScriptValue::QObjectMember)) { + QListView::setModel(model); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, model)); + } +} + +void QtScriptShell_QListView::setRootIndex(const QModelIndex& index) +{ + QScriptValue _q_function = __qtscript_self.property("setRootIndex"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setRootIndex") & QScriptValue::QObjectMember)) { + QListView::setRootIndex(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QListView::setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) +{ + QScriptValue _q_function = __qtscript_self.property("setSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelection") & QScriptValue::QObjectMember)) { + QListView::setSelection(rect, command); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, command)); + } +} + +void QtScriptShell_QListView::setSelectionModel(QItemSelectionModel* selectionModel) +{ + QScriptValue _q_function = __qtscript_self.property("setSelectionModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelectionModel") & QScriptValue::QObjectMember)) { + QListView::setSelectionModel(selectionModel); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selectionModel)); + } +} + +void QtScriptShell_QListView::setupViewport(QWidget* viewport) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QListView::setupViewport(viewport); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, viewport)); + } +} + +QPainter* QtScriptShell_QListView::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QListView::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QListView::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QListView::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QListView::sizeHintForColumn(int column) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForColumn"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForColumn") & QScriptValue::QObjectMember)) { + return QListView::sizeHintForColumn(column); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column))); + } +} + +int QtScriptShell_QListView::sizeHintForRow(int row) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForRow"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForRow") & QScriptValue::QObjectMember)) { + return QListView::sizeHintForRow(row); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row))); + } +} + +void QtScriptShell_QListView::startDrag(Qt::DropActions supportedActions) +{ + QScriptValue _q_function = __qtscript_self.property("startDrag"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startDrag") & QScriptValue::QObjectMember)) { + QListView::startDrag(supportedActions); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, supportedActions)); + } +} + +void QtScriptShell_QListView::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QListView::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListView::timerEvent(QTimerEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QListView::timerEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QListView::updateEditorData() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorData") & QScriptValue::QObjectMember)) { + QListView::updateEditorData(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QListView::updateEditorGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorGeometries") & QScriptValue::QObjectMember)) { + QListView::updateEditorGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QListView::updateGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometries") & QScriptValue::QObjectMember)) { + QListView::updateGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +int QtScriptShell_QListView::verticalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("verticalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalOffset") & QScriptValue::QObjectMember)) { + return QListView::verticalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QListView::verticalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarAction") & QScriptValue::QObjectMember)) { + QListView::verticalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QListView::verticalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QListView::verticalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QStyleOptionViewItem QtScriptShell_QListView::viewOptions() const +{ + QScriptValue _q_function = __qtscript_self.property("viewOptions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewOptions") & QScriptValue::QObjectMember)) { + return QListView::viewOptions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QListView::viewportEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QListView::viewportEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +QSize QtScriptShell_QListView::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QListView::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QListView::visualRect(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRect") & QScriptValue::QObjectMember)) { + return QListView::visualRect(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QRegion QtScriptShell_QListView::visualRegionForSelection(const QItemSelection& selection) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRegionForSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRegionForSelection") & QScriptValue::QObjectMember)) { + return QListView::visualRegionForSelection(selection); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selection))); + } +} + +void QtScriptShell_QListView::wheelEvent(QWheelEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QListView::wheelEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListView.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListView.h new file mode 100644 index 00000000..c17cf8c9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListView.h @@ -0,0 +1,102 @@ +#ifndef QTSCRIPTSHELL_QLISTVIEW_H +#define QTSCRIPTSHELL_QLISTVIEW_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QListView : public QListView +{ +public: + QtScriptShell_QListView(QWidget* parent = 0); + ~QtScriptShell_QListView(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint); + void closeEvent(QCloseEvent* event); + void commitData(QWidget* editor); + void contextMenuEvent(QContextMenuEvent* arg__1); + void currentChanged(const QModelIndex& current, const QModelIndex& previous); + void customEvent(QEvent* event); + void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles = QVector()); + int devType() const; + void doItemsLayout(); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* e); + void dragMoveEvent(QDragMoveEvent* e); + void dropEvent(QDropEvent* e); + bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event); + void editorDestroyed(QObject* editor); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + int horizontalOffset() const; + void horizontalScrollbarAction(int action); + void horizontalScrollbarValueChanged(int value); + QModelIndex indexAt(const QPoint& p) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isIndexHidden(const QModelIndex& index) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void keyboardSearch(const QString& search); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* e); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* e); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* e); + QPaintDevice* redirected(QPoint* offset) const; + void reset(); + void resizeEvent(QResizeEvent* e); + void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end); + void rowsInserted(const QModelIndex& parent, int start, int end); + void scrollContentsBy(int dx, int dy); + void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint = QAbstractItemView::EnsureVisible); + void selectAll(); + QList selectedIndexes() const; + void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected); + QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const; + void setModel(QAbstractItemModel* model); + void setRootIndex(const QModelIndex& index); + void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command); + void setSelectionModel(QItemSelectionModel* selectionModel); + void setupViewport(QWidget* viewport); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + int sizeHintForColumn(int column) const; + int sizeHintForRow(int row) const; + void startDrag(Qt::DropActions supportedActions); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* e); + void updateEditorData(); + void updateEditorGeometries(); + void updateGeometries(); + int verticalOffset() const; + void verticalScrollbarAction(int action); + void verticalScrollbarValueChanged(int value); + QStyleOptionViewItem viewOptions() const; + bool viewportEvent(QEvent* event); + QSize viewportSizeHint() const; + QRect visualRect(const QModelIndex& index) const; + QRegion visualRegionForSelection(const QItemSelection& selection) const; + void wheelEvent(QWheelEvent* e); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QLISTVIEW_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListWidget.cpp new file mode 100644 index 00000000..f3eb9907 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListWidget.cpp @@ -0,0 +1,1249 @@ +#include "qtscriptshell_QListWidget.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(Qt::DropAction) +Q_DECLARE_METATYPE(QAbstractItemView::EditTrigger) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::ScrollHint) +Q_DECLARE_METATYPE(const QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QItemSelectionModel*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QStyleOptionViewItem) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QListWidget::QtScriptShell_QListWidget(QWidget* parent) + : QListWidget(parent) {} + +QtScriptShell_QListWidget::~QtScriptShell_QListWidget() {} + +void QtScriptShell_QListWidget::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QListWidget::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListWidget::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QListWidget::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QListWidget::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QListWidget::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListWidget::closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("closeEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEditor") & QScriptValue::QObjectMember)) { + QListWidget::closeEditor(editor, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QListWidget::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QListWidget::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListWidget::commitData(QWidget* editor) +{ + QScriptValue _q_function = __qtscript_self.property("commitData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("commitData") & QScriptValue::QObjectMember)) { + QListWidget::commitData(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QListWidget::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QListWidget::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QListWidget::currentChanged(const QModelIndex& current, const QModelIndex& previous) +{ + QScriptValue _q_function = __qtscript_self.property("currentChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("currentChanged") & QScriptValue::QObjectMember)) { + QListWidget::currentChanged(current, previous); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, current) + << qScriptValueFromValue(_q_engine, previous)); + } +} + +void QtScriptShell_QListWidget::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QListWidget::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListWidget::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) +{ + QScriptValue _q_function = __qtscript_self.property("dataChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dataChanged") & QScriptValue::QObjectMember)) { + QListWidget::dataChanged(topLeft, bottomRight, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, topLeft) + << qScriptValueFromValue(_q_engine, bottomRight) + << qScriptValueFromValue(_q_engine, roles)); + } +} + +int QtScriptShell_QListWidget::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QListWidget::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QListWidget::doItemsLayout() +{ + QScriptValue _q_function = __qtscript_self.property("doItemsLayout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("doItemsLayout") & QScriptValue::QObjectMember)) { + QListWidget::doItemsLayout(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QListWidget::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QListWidget::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListWidget::dragLeaveEvent(QDragLeaveEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QListWidget::dragLeaveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QListWidget::dragMoveEvent(QDragMoveEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QListWidget::dragMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QListWidget::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QListWidget::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QListWidget::dropMimeData(int index, const QMimeData* data, Qt::DropAction action) +{ + QScriptValue _q_function = __qtscript_self.property("dropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropMimeData") & QScriptValue::QObjectMember)) { + return QListWidget::dropMimeData(index, data, action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action))); + } +} + +bool QtScriptShell_QListWidget::edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("edit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("edit") & QScriptValue::QObjectMember)) { + return QListWidget::edit(index, trigger, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, trigger) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QListWidget::editorDestroyed(QObject* editor) +{ + QScriptValue _q_function = __qtscript_self.property("editorDestroyed"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("editorDestroyed") & QScriptValue::QObjectMember)) { + QListWidget::editorDestroyed(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QListWidget::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QListWidget::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QListWidget::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QListWidget::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QListWidget::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QListWidget::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QListWidget::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QListWidget::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QListWidget::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QListWidget::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QListWidget::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QListWidget::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QListWidget::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QListWidget::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QListWidget::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QListWidget::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QListWidget::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QListWidget::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QListWidget::horizontalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("horizontalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalOffset") & QScriptValue::QObjectMember)) { + return QListWidget::horizontalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QListWidget::horizontalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarAction") & QScriptValue::QObjectMember)) { + QListWidget::horizontalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QListWidget::horizontalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QListWidget::horizontalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QModelIndex QtScriptShell_QListWidget::indexAt(const QPoint& p) const +{ + QScriptValue _q_function = __qtscript_self.property("indexAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexAt") & QScriptValue::QObjectMember)) { + return QListWidget::indexAt(p); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, p))); + } +} + +void QtScriptShell_QListWidget::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QListWidget::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QListWidget::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QListWidget::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QListWidget::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QListWidget::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QListWidget::isIndexHidden(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("isIndexHidden"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isIndexHidden") & QScriptValue::QObjectMember)) { + return QListWidget::isIndexHidden(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QListWidget::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QListWidget::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListWidget::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QListWidget::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListWidget::keyboardSearch(const QString& search) +{ + QScriptValue _q_function = __qtscript_self.property("keyboardSearch"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyboardSearch") & QScriptValue::QObjectMember)) { + QListWidget::keyboardSearch(search); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, search)); + } +} + +void QtScriptShell_QListWidget::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QListWidget::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QListWidget::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QListWidget::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QStringList QtScriptShell_QListWidget::mimeTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("mimeTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeTypes") & QScriptValue::QObjectMember)) { + return QListWidget::mimeTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QListWidget::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QListWidget::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListWidget::mouseMoveEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QListWidget::mouseMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QListWidget::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QListWidget::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListWidget::mouseReleaseEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QListWidget::mouseReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QListWidget::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QListWidget::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QListWidget::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QListWidget::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QListWidget::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QListWidget::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QListWidget::paintEvent(QPaintEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QListWidget::paintEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QPaintDevice* QtScriptShell_QListWidget::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QListWidget::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QListWidget::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + QListWidget::reset(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QListWidget::resizeEvent(QResizeEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QListWidget::resizeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QListWidget::rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsAboutToBeRemoved"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsAboutToBeRemoved") & QScriptValue::QObjectMember)) { + QListWidget::rowsAboutToBeRemoved(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QListWidget::rowsInserted(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsInserted"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsInserted") & QScriptValue::QObjectMember)) { + QListWidget::rowsInserted(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QListWidget::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QListWidget::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QListWidget::scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("scrollTo"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollTo") & QScriptValue::QObjectMember)) { + QListWidget::scrollTo(index, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QListWidget::selectAll() +{ + QScriptValue _q_function = __qtscript_self.property("selectAll"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectAll") & QScriptValue::QObjectMember)) { + QListWidget::selectAll(); + } else { + _q_function.call(__qtscript_self); + } +} + +QList QtScriptShell_QListWidget::selectedIndexes() const +{ + QScriptValue _q_function = __qtscript_self.property("selectedIndexes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectedIndexes") & QScriptValue::QObjectMember)) { + return QListWidget::selectedIndexes(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QListWidget::selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) +{ + QScriptValue _q_function = __qtscript_self.property("selectionChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionChanged") & QScriptValue::QObjectMember)) { + QListWidget::selectionChanged(selected, deselected); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selected) + << qScriptValueFromValue(_q_engine, deselected)); + } +} + +QItemSelectionModel::SelectionFlags QtScriptShell_QListWidget::selectionCommand(const QModelIndex& index, const QEvent* event) const +{ + QScriptValue _q_function = __qtscript_self.property("selectionCommand"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionCommand") & QScriptValue::QObjectMember)) { + return QListWidget::selectionCommand(index, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, const_cast(event)))); + } +} + +void QtScriptShell_QListWidget::setRootIndex(const QModelIndex& index) +{ + QScriptValue _q_function = __qtscript_self.property("setRootIndex"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setRootIndex") & QScriptValue::QObjectMember)) { + QListWidget::setRootIndex(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QListWidget::setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) +{ + QScriptValue _q_function = __qtscript_self.property("setSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelection") & QScriptValue::QObjectMember)) { + QListWidget::setSelection(rect, command); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, command)); + } +} + +void QtScriptShell_QListWidget::setSelectionModel(QItemSelectionModel* selectionModel) +{ + QScriptValue _q_function = __qtscript_self.property("setSelectionModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelectionModel") & QScriptValue::QObjectMember)) { + QListWidget::setSelectionModel(selectionModel); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selectionModel)); + } +} + +void QtScriptShell_QListWidget::setupViewport(QWidget* viewport) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QListWidget::setupViewport(viewport); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, viewport)); + } +} + +QPainter* QtScriptShell_QListWidget::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QListWidget::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QListWidget::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QListWidget::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QListWidget::sizeHintForColumn(int column) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForColumn"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForColumn") & QScriptValue::QObjectMember)) { + return QListWidget::sizeHintForColumn(column); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column))); + } +} + +int QtScriptShell_QListWidget::sizeHintForRow(int row) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForRow"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForRow") & QScriptValue::QObjectMember)) { + return QListWidget::sizeHintForRow(row); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row))); + } +} + +void QtScriptShell_QListWidget::startDrag(Qt::DropActions supportedActions) +{ + QScriptValue _q_function = __qtscript_self.property("startDrag"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startDrag") & QScriptValue::QObjectMember)) { + QListWidget::startDrag(supportedActions); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, supportedActions)); + } +} + +Qt::DropActions QtScriptShell_QListWidget::supportedDropActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDropActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDropActions") & QScriptValue::QObjectMember)) { + return QListWidget::supportedDropActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QListWidget::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QListWidget::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QListWidget::timerEvent(QTimerEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QListWidget::timerEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QListWidget::updateEditorData() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorData") & QScriptValue::QObjectMember)) { + QListWidget::updateEditorData(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QListWidget::updateEditorGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorGeometries") & QScriptValue::QObjectMember)) { + QListWidget::updateEditorGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QListWidget::updateGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometries") & QScriptValue::QObjectMember)) { + QListWidget::updateGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +int QtScriptShell_QListWidget::verticalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("verticalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalOffset") & QScriptValue::QObjectMember)) { + return QListWidget::verticalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QListWidget::verticalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarAction") & QScriptValue::QObjectMember)) { + QListWidget::verticalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QListWidget::verticalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QListWidget::verticalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QStyleOptionViewItem QtScriptShell_QListWidget::viewOptions() const +{ + QScriptValue _q_function = __qtscript_self.property("viewOptions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewOptions") & QScriptValue::QObjectMember)) { + return QListWidget::viewOptions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QListWidget::viewportEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QListWidget::viewportEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +QSize QtScriptShell_QListWidget::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QListWidget::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QListWidget::visualRect(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRect") & QScriptValue::QObjectMember)) { + return QListWidget::visualRect(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QRegion QtScriptShell_QListWidget::visualRegionForSelection(const QItemSelection& selection) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRegionForSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRegionForSelection") & QScriptValue::QObjectMember)) { + return QListWidget::visualRegionForSelection(selection); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selection))); + } +} + +void QtScriptShell_QListWidget::wheelEvent(QWheelEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QListWidget::wheelEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListWidget.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListWidget.h new file mode 100644 index 00000000..a319a659 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListWidget.h @@ -0,0 +1,104 @@ +#ifndef QTSCRIPTSHELL_QLISTWIDGET_H +#define QTSCRIPTSHELL_QLISTWIDGET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QListWidget : public QListWidget +{ +public: + QtScriptShell_QListWidget(QWidget* parent = 0); + ~QtScriptShell_QListWidget(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint); + void closeEvent(QCloseEvent* event); + void commitData(QWidget* editor); + void contextMenuEvent(QContextMenuEvent* arg__1); + void currentChanged(const QModelIndex& current, const QModelIndex& previous); + void customEvent(QEvent* event); + void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles); + int devType() const; + void doItemsLayout(); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* e); + void dragMoveEvent(QDragMoveEvent* e); + void dropEvent(QDropEvent* event); + bool dropMimeData(int index, const QMimeData* data, Qt::DropAction action); + bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event); + void editorDestroyed(QObject* editor); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + int horizontalOffset() const; + void horizontalScrollbarAction(int action); + void horizontalScrollbarValueChanged(int value); + QModelIndex indexAt(const QPoint& p) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isIndexHidden(const QModelIndex& index) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void keyboardSearch(const QString& search); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QStringList mimeTypes() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* e); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* e); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* e); + QPaintDevice* redirected(QPoint* offset) const; + void reset(); + void resizeEvent(QResizeEvent* e); + void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end); + void rowsInserted(const QModelIndex& parent, int start, int end); + void scrollContentsBy(int dx, int dy); + void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint); + void selectAll(); + QList selectedIndexes() const; + void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected); + QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const; + void setRootIndex(const QModelIndex& index); + void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command); + void setSelectionModel(QItemSelectionModel* selectionModel); + void setupViewport(QWidget* viewport); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + int sizeHintForColumn(int column) const; + int sizeHintForRow(int row) const; + void startDrag(Qt::DropActions supportedActions); + Qt::DropActions supportedDropActions() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* e); + void updateEditorData(); + void updateEditorGeometries(); + void updateGeometries(); + int verticalOffset() const; + void verticalScrollbarAction(int action); + void verticalScrollbarValueChanged(int value); + QStyleOptionViewItem viewOptions() const; + bool viewportEvent(QEvent* event); + QSize viewportSizeHint() const; + QRect visualRect(const QModelIndex& index) const; + QRegion visualRegionForSelection(const QItemSelection& selection) const; + void wheelEvent(QWheelEvent* e); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QLISTWIDGET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListWidgetItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListWidgetItem.cpp new file mode 100644 index 00000000..a113adf2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListWidgetItem.cpp @@ -0,0 +1,65 @@ +#include "qtscriptshell_QListWidgetItem.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QListWidgetItem*) + +QtScriptShell_QListWidgetItem::QtScriptShell_QListWidgetItem(QListWidget* view, int type) + : QListWidgetItem(view, type) {} + +QtScriptShell_QListWidgetItem::QtScriptShell_QListWidgetItem(const QIcon& icon, const QString& text, QListWidget* view, int type) + : QListWidgetItem(icon, text, view, type) {} + +QtScriptShell_QListWidgetItem::QtScriptShell_QListWidgetItem(const QString& text, QListWidget* view, int type) + : QListWidgetItem(text, view, type) {} + +QtScriptShell_QListWidgetItem::~QtScriptShell_QListWidgetItem() {} + +QListWidgetItem* QtScriptShell_QListWidgetItem::clone() const +{ + QScriptValue _q_function = __qtscript_self.property("clone"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clone") & QScriptValue::QObjectMember)) { + return QListWidgetItem::clone(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QVariant QtScriptShell_QListWidgetItem::data(int role) const +{ + QScriptValue _q_function = __qtscript_self.property("data"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("data") & QScriptValue::QObjectMember)) { + return QListWidgetItem::data(role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, role))); + } +} + +void QtScriptShell_QListWidgetItem::setData(int role, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("setData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setData") & QScriptValue::QObjectMember)) { + QListWidgetItem::setData(role, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, role) + << qScriptValueFromValue(_q_engine, value)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListWidgetItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListWidgetItem.h new file mode 100644 index 00000000..7ce500cd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QListWidgetItem.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QLISTWIDGETITEM_H +#define QTSCRIPTSHELL_QLISTWIDGETITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QListWidgetItem : public QListWidgetItem +{ +public: + QtScriptShell_QListWidgetItem(QListWidget* view = 0, int type = Type); + QtScriptShell_QListWidgetItem(const QIcon& icon, const QString& text, QListWidget* view = 0, int type = Type); + QtScriptShell_QListWidgetItem(const QListWidgetItem& other); + QtScriptShell_QListWidgetItem(const QString& text, QListWidget* view = 0, int type = Type); + ~QtScriptShell_QListWidgetItem(); + + QListWidgetItem* clone() const; + QVariant data(int role) const; + void setData(int role, const QVariant& value); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QLISTWIDGETITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMainWindow.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMainWindow.cpp new file mode 100644 index 00000000..141b5eba --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMainWindow.cpp @@ -0,0 +1,688 @@ +#include "qtscriptshell_QMainWindow.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QMenu*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QMainWindow::QtScriptShell_QMainWindow(QWidget* parent, Qt::WindowFlags flags) + : QMainWindow(parent, flags) {} + +QtScriptShell_QMainWindow::~QtScriptShell_QMainWindow() {} + +void QtScriptShell_QMainWindow::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QMainWindow::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMainWindow::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QMainWindow::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMainWindow::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QMainWindow::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMainWindow::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QMainWindow::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMainWindow::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QMainWindow::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QMenu* QtScriptShell_QMainWindow::createPopupMenu() +{ + QScriptValue _q_function = __qtscript_self.property("createPopupMenu"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createPopupMenu") & QScriptValue::QObjectMember)) { + return QMainWindow::createPopupMenu(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMainWindow::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QMainWindow::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QMainWindow::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QMainWindow::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMainWindow::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QMainWindow::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMainWindow::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QMainWindow::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMainWindow::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QMainWindow::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMainWindow::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QMainWindow::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMainWindow::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QMainWindow::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMainWindow::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QMainWindow::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QMainWindow::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QMainWindow::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QMainWindow::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QMainWindow::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMainWindow::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QMainWindow::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QMainWindow::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QMainWindow::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMainWindow::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QMainWindow::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QMainWindow::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QMainWindow::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QMainWindow::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QMainWindow::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMainWindow::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QMainWindow::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QMainWindow::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QMainWindow::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QMainWindow::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QMainWindow::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QMainWindow::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QMainWindow::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMainWindow::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QMainWindow::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMainWindow::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QMainWindow::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QMainWindow::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QMainWindow::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QMainWindow::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QMainWindow::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMainWindow::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QMainWindow::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMainWindow::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QMainWindow::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMainWindow::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QMainWindow::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMainWindow::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QMainWindow::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMainWindow::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QMainWindow::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMainWindow::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QMainWindow::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QMainWindow::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QMainWindow::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMainWindow::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QMainWindow::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QMainWindow::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QMainWindow::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QMainWindow::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QMainWindow::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QMainWindow::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QMainWindow::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMainWindow::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QMainWindow::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_QMainWindow::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QMainWindow::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMainWindow::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QMainWindow::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMainWindow::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QMainWindow::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMainWindow::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QMainWindow::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMainWindow.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMainWindow.h new file mode 100644 index 00000000..0d511fff --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMainWindow.h @@ -0,0 +1,64 @@ +#ifndef QTSCRIPTSHELL_QMAINWINDOW_H +#define QTSCRIPTSHELL_QMAINWINDOW_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QMainWindow : public QMainWindow +{ +public: + QtScriptShell_QMainWindow(QWidget* parent = 0, Qt::WindowFlags flags = Qt::WindowFlags()); + ~QtScriptShell_QMainWindow(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + QMenu* createPopupMenu(); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QMAINWINDOW_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMdiArea.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMdiArea.cpp new file mode 100644 index 00000000..88ca4cfd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMdiArea.cpp @@ -0,0 +1,708 @@ +#include "qtscriptshell_QMdiArea.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QMdiArea::QtScriptShell_QMdiArea(QWidget* parent) + : QMdiArea(parent) {} + +QtScriptShell_QMdiArea::~QtScriptShell_QMdiArea() {} + +void QtScriptShell_QMdiArea::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QMdiArea::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMdiArea::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QMdiArea::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMdiArea::childEvent(QChildEvent* childEvent) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QMdiArea::childEvent(childEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, childEvent)); + } +} + +void QtScriptShell_QMdiArea::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QMdiArea::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMdiArea::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QMdiArea::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMdiArea::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QMdiArea::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QMdiArea::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QMdiArea::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMdiArea::dragEnterEvent(QDragEnterEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QMdiArea::dragEnterEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMdiArea::dragLeaveEvent(QDragLeaveEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QMdiArea::dragLeaveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMdiArea::dragMoveEvent(QDragMoveEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QMdiArea::dragMoveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMdiArea::dropEvent(QDropEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QMdiArea::dropEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMdiArea::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QMdiArea::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMdiArea::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QMdiArea::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QMdiArea::eventFilter(QObject* object, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QMdiArea::eventFilter(object, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, object) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QMdiArea::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QMdiArea::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMdiArea::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QMdiArea::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QMdiArea::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QMdiArea::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMdiArea::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QMdiArea::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QMdiArea::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QMdiArea::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QMdiArea::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QMdiArea::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMdiArea::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QMdiArea::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QMdiArea::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QMdiArea::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QMdiArea::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QMdiArea::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QMdiArea::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QMdiArea::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMdiArea::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QMdiArea::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMdiArea::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QMdiArea::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QMdiArea::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QMdiArea::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QMdiArea::mouseDoubleClickEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QMdiArea::mouseDoubleClickEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMdiArea::mouseMoveEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QMdiArea::mouseMoveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMdiArea::mousePressEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QMdiArea::mousePressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMdiArea::mouseReleaseEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QMdiArea::mouseReleaseEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMdiArea::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QMdiArea::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMdiArea::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QMdiArea::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QMdiArea::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QMdiArea::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMdiArea::paintEvent(QPaintEvent* paintEvent) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QMdiArea::paintEvent(paintEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, paintEvent)); + } +} + +QPaintDevice* QtScriptShell_QMdiArea::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QMdiArea::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QMdiArea::resizeEvent(QResizeEvent* resizeEvent) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QMdiArea::resizeEvent(resizeEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, resizeEvent)); + } +} + +void QtScriptShell_QMdiArea::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QMdiArea::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QMdiArea::setupViewport(QWidget* viewport) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QMdiArea::setupViewport(viewport); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, viewport)); + } +} + +QPainter* QtScriptShell_QMdiArea::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QMdiArea::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMdiArea::showEvent(QShowEvent* showEvent) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QMdiArea::showEvent(showEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, showEvent)); + } +} + +void QtScriptShell_QMdiArea::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QMdiArea::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMdiArea::timerEvent(QTimerEvent* timerEvent) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QMdiArea::timerEvent(timerEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, timerEvent)); + } +} + +bool QtScriptShell_QMdiArea::viewportEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QMdiArea::viewportEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +QSize QtScriptShell_QMdiArea::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QMdiArea::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMdiArea::wheelEvent(QWheelEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QMdiArea::wheelEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMdiArea.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMdiArea.h new file mode 100644 index 00000000..9e445876 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMdiArea.h @@ -0,0 +1,65 @@ +#ifndef QTSCRIPTSHELL_QMDIAREA_H +#define QTSCRIPTSHELL_QMDIAREA_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QMdiArea : public QMdiArea +{ +public: + QtScriptShell_QMdiArea(QWidget* parent = 0); + ~QtScriptShell_QMdiArea(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* childEvent); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* arg__1); + void dragLeaveEvent(QDragLeaveEvent* arg__1); + void dragMoveEvent(QDragMoveEvent* arg__1); + void dropEvent(QDropEvent* arg__1); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* object, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* arg__1); + void mouseMoveEvent(QMouseEvent* arg__1); + void mousePressEvent(QMouseEvent* arg__1); + void mouseReleaseEvent(QMouseEvent* arg__1); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* paintEvent); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* resizeEvent); + void scrollContentsBy(int dx, int dy); + void setupViewport(QWidget* viewport); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* showEvent); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* timerEvent); + bool viewportEvent(QEvent* event); + QSize viewportSizeHint() const; + void wheelEvent(QWheelEvent* arg__1); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QMDIAREA_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMdiSubWindow.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMdiSubWindow.cpp new file mode 100644 index 00000000..7e509a83 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMdiSubWindow.cpp @@ -0,0 +1,651 @@ +#include "qtscriptshell_QMdiSubWindow.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QMdiSubWindow::QtScriptShell_QMdiSubWindow(QWidget* parent, Qt::WindowFlags flags) + : QMdiSubWindow(parent, flags) {} + +QtScriptShell_QMdiSubWindow::~QtScriptShell_QMdiSubWindow() {} + +void QtScriptShell_QMdiSubWindow::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMdiSubWindow::changeEvent(QEvent* changeEvent) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::changeEvent(changeEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, changeEvent)); + } +} + +void QtScriptShell_QMdiSubWindow::childEvent(QChildEvent* childEvent) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::childEvent(childEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, childEvent)); + } +} + +void QtScriptShell_QMdiSubWindow::closeEvent(QCloseEvent* closeEvent) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::closeEvent(closeEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, closeEvent)); + } +} + +void QtScriptShell_QMdiSubWindow::contextMenuEvent(QContextMenuEvent* contextMenuEvent) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::contextMenuEvent(contextMenuEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, contextMenuEvent)); + } +} + +void QtScriptShell_QMdiSubWindow::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QMdiSubWindow::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QMdiSubWindow::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMdiSubWindow::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMdiSubWindow::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMdiSubWindow::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMdiSubWindow::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMdiSubWindow::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMdiSubWindow::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QMdiSubWindow::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QMdiSubWindow::eventFilter(QObject* object, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QMdiSubWindow::eventFilter(object, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, object) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QMdiSubWindow::focusInEvent(QFocusEvent* focusInEvent) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::focusInEvent(focusInEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, focusInEvent)); + } +} + +bool QtScriptShell_QMdiSubWindow::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QMdiSubWindow::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QMdiSubWindow::focusOutEvent(QFocusEvent* focusOutEvent) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::focusOutEvent(focusOutEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, focusOutEvent)); + } +} + +bool QtScriptShell_QMdiSubWindow::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QMdiSubWindow::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QMdiSubWindow::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QMdiSubWindow::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QMdiSubWindow::hideEvent(QHideEvent* hideEvent) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::hideEvent(hideEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, hideEvent)); + } +} + +void QtScriptShell_QMdiSubWindow::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QMdiSubWindow::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QMdiSubWindow::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QMdiSubWindow::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QMdiSubWindow::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QMdiSubWindow::keyPressEvent(QKeyEvent* keyEvent) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::keyPressEvent(keyEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, keyEvent)); + } +} + +void QtScriptShell_QMdiSubWindow::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMdiSubWindow::leaveEvent(QEvent* leaveEvent) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::leaveEvent(leaveEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, leaveEvent)); + } +} + +int QtScriptShell_QMdiSubWindow::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QMdiSubWindow::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QMdiSubWindow::mouseDoubleClickEvent(QMouseEvent* mouseEvent) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::mouseDoubleClickEvent(mouseEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, mouseEvent)); + } +} + +void QtScriptShell_QMdiSubWindow::mouseMoveEvent(QMouseEvent* mouseEvent) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::mouseMoveEvent(mouseEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, mouseEvent)); + } +} + +void QtScriptShell_QMdiSubWindow::mousePressEvent(QMouseEvent* mouseEvent) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::mousePressEvent(mouseEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, mouseEvent)); + } +} + +void QtScriptShell_QMdiSubWindow::mouseReleaseEvent(QMouseEvent* mouseEvent) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::mouseReleaseEvent(mouseEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, mouseEvent)); + } +} + +void QtScriptShell_QMdiSubWindow::moveEvent(QMoveEvent* moveEvent) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::moveEvent(moveEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, moveEvent)); + } +} + +bool QtScriptShell_QMdiSubWindow::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QMdiSubWindow::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QMdiSubWindow::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QMdiSubWindow::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMdiSubWindow::paintEvent(QPaintEvent* paintEvent) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::paintEvent(paintEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, paintEvent)); + } +} + +QPaintDevice* QtScriptShell_QMdiSubWindow::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QMdiSubWindow::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QMdiSubWindow::resizeEvent(QResizeEvent* resizeEvent) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::resizeEvent(resizeEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, resizeEvent)); + } +} + +QPainter* QtScriptShell_QMdiSubWindow::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QMdiSubWindow::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMdiSubWindow::showEvent(QShowEvent* showEvent) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::showEvent(showEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, showEvent)); + } +} + +void QtScriptShell_QMdiSubWindow::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMdiSubWindow::timerEvent(QTimerEvent* timerEvent) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::timerEvent(timerEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, timerEvent)); + } +} + +void QtScriptShell_QMdiSubWindow::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QMdiSubWindow::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMdiSubWindow.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMdiSubWindow.h new file mode 100644 index 00000000..c83ae782 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMdiSubWindow.h @@ -0,0 +1,61 @@ +#ifndef QTSCRIPTSHELL_QMDISUBWINDOW_H +#define QTSCRIPTSHELL_QMDISUBWINDOW_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QMdiSubWindow : public QMdiSubWindow +{ +public: + QtScriptShell_QMdiSubWindow(QWidget* parent = 0, Qt::WindowFlags flags = Qt::WindowFlags()); + ~QtScriptShell_QMdiSubWindow(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* changeEvent); + void childEvent(QChildEvent* childEvent); + void closeEvent(QCloseEvent* closeEvent); + void contextMenuEvent(QContextMenuEvent* contextMenuEvent); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* object, QEvent* event); + void focusInEvent(QFocusEvent* focusInEvent); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* focusOutEvent); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* hideEvent); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* keyEvent); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* leaveEvent); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* mouseEvent); + void mouseMoveEvent(QMouseEvent* mouseEvent); + void mousePressEvent(QMouseEvent* mouseEvent); + void mouseReleaseEvent(QMouseEvent* mouseEvent); + void moveEvent(QMoveEvent* moveEvent); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* paintEvent); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* resizeEvent); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* showEvent); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* timerEvent); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QMDISUBWINDOW_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMenu.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMenu.cpp new file mode 100644 index 00000000..16f31fdb --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMenu.cpp @@ -0,0 +1,664 @@ +#include "qtscriptshell_QMenu.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QMenu::QtScriptShell_QMenu(QWidget* parent) + : QMenu(parent) {} + +QtScriptShell_QMenu::QtScriptShell_QMenu(const QString& title, QWidget* parent) + : QMenu(title, parent) {} + +QtScriptShell_QMenu::~QtScriptShell_QMenu() {} + +void QtScriptShell_QMenu::actionEvent(QActionEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QMenu::actionEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMenu::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QMenu::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMenu::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QMenu::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenu::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QMenu::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenu::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QMenu::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenu::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QMenu::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QMenu::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QMenu::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMenu::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QMenu::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenu::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QMenu::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenu::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QMenu::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenu::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QMenu::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenu::enterEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QMenu::enterEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +bool QtScriptShell_QMenu::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QMenu::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QMenu::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QMenu::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QMenu::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QMenu::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMenu::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QMenu::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QMenu::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QMenu::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMenu::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QMenu::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QMenu::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QMenu::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QMenu::hideEvent(QHideEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QMenu::hideEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMenu::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QMenu::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QMenu::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QMenu::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QMenu::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QMenu::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QMenu::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QMenu::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMenu::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QMenu::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenu::leaveEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QMenu::leaveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +int QtScriptShell_QMenu::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QMenu::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QMenu::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QMenu::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMenu::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QMenu::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenu::mouseMoveEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QMenu::mouseMoveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMenu::mousePressEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QMenu::mousePressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMenu::mouseReleaseEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QMenu::mouseReleaseEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMenu::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QMenu::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMenu::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QMenu::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QMenu::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QMenu::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMenu::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QMenu::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QMenu::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QMenu::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QMenu::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QMenu::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QMenu::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QMenu::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMenu::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QMenu::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenu::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QMenu::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenu::timerEvent(QTimerEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QMenu::timerEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMenu::wheelEvent(QWheelEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QMenu::wheelEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMenu.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMenu.h new file mode 100644 index 00000000..c15e4f81 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMenu.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_QMENU_H +#define QTSCRIPTSHELL_QMENU_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QMenu : public QMenu +{ +public: + QtScriptShell_QMenu(QWidget* parent = 0); + QtScriptShell_QMenu(const QString& title, QWidget* parent = 0); + ~QtScriptShell_QMenu(); + + void actionEvent(QActionEvent* arg__1); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* arg__1); + bool event(QEvent* arg__1); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* arg__1); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* arg__1); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* arg__1); + void mousePressEvent(QMouseEvent* arg__1); + void mouseReleaseEvent(QMouseEvent* arg__1); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* arg__1); + void wheelEvent(QWheelEvent* arg__1); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QMENU_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMenuBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMenuBar.cpp new file mode 100644 index 00000000..7d733c12 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMenuBar.cpp @@ -0,0 +1,665 @@ +#include "qtscriptshell_QMenuBar.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QMenuBar::QtScriptShell_QMenuBar(QWidget* parent) + : QMenuBar(parent) {} + +QtScriptShell_QMenuBar::~QtScriptShell_QMenuBar() {} + +void QtScriptShell_QMenuBar::actionEvent(QActionEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QMenuBar::actionEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMenuBar::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QMenuBar::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMenuBar::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QMenuBar::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenuBar::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QMenuBar::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenuBar::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QMenuBar::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenuBar::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QMenuBar::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QMenuBar::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QMenuBar::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMenuBar::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QMenuBar::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenuBar::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QMenuBar::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenuBar::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QMenuBar::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenuBar::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QMenuBar::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenuBar::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QMenuBar::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMenuBar::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QMenuBar::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QMenuBar::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QMenuBar::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QMenuBar::focusInEvent(QFocusEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QMenuBar::focusInEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +bool QtScriptShell_QMenuBar::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QMenuBar::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QMenuBar::focusOutEvent(QFocusEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QMenuBar::focusOutEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +bool QtScriptShell_QMenuBar::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QMenuBar::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QMenuBar::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QMenuBar::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QMenuBar::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QMenuBar::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenuBar::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QMenuBar::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QMenuBar::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QMenuBar::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QMenuBar::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QMenuBar::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QMenuBar::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QMenuBar::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMenuBar::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QMenuBar::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenuBar::leaveEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QMenuBar::leaveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +int QtScriptShell_QMenuBar::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QMenuBar::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QMenuBar::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QMenuBar::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenuBar::mouseMoveEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QMenuBar::mouseMoveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMenuBar::mousePressEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QMenuBar::mousePressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMenuBar::mouseReleaseEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QMenuBar::mouseReleaseEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMenuBar::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QMenuBar::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMenuBar::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QMenuBar::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QMenuBar::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QMenuBar::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMenuBar::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QMenuBar::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QMenuBar::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QMenuBar::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QMenuBar::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QMenuBar::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMenuBar::setVisible(bool visible) +{ + QScriptValue _q_function = __qtscript_self.property("setVisible"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setVisible") & QScriptValue::QObjectMember)) { + QMenuBar::setVisible(visible); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, visible)); + } +} + +QPainter* QtScriptShell_QMenuBar::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QMenuBar::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMenuBar::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QMenuBar::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenuBar::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QMenuBar::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMenuBar::timerEvent(QTimerEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QMenuBar::timerEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMenuBar::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QMenuBar::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMenuBar.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMenuBar.h new file mode 100644 index 00000000..416763e5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMenuBar.h @@ -0,0 +1,62 @@ +#ifndef QTSCRIPTSHELL_QMENUBAR_H +#define QTSCRIPTSHELL_QMENUBAR_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QMenuBar : public QMenuBar +{ +public: + QtScriptShell_QMenuBar(QWidget* parent = 0); + ~QtScriptShell_QMenuBar(); + + void actionEvent(QActionEvent* arg__1); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* arg__1); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* arg__1); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* arg__1); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* arg__1); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* arg__1); + void mousePressEvent(QMouseEvent* arg__1); + void mouseReleaseEvent(QMouseEvent* arg__1); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* arg__1); + void setVisible(bool visible); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* arg__1); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QMENUBAR_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMessageBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMessageBox.cpp new file mode 100644 index 00000000..e36d7871 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMessageBox.cpp @@ -0,0 +1,703 @@ +#include "qtscriptshell_QMessageBox.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QMessageBox::QtScriptShell_QMessageBox(QMessageBox::Icon icon, const QString& title, const QString& text, QMessageBox::StandardButtons buttons, QWidget* parent, Qt::WindowFlags flags) + : QMessageBox(icon, title, text, buttons, parent, flags) {} + +QtScriptShell_QMessageBox::QtScriptShell_QMessageBox(QWidget* parent) + : QMessageBox(parent) {} + +QtScriptShell_QMessageBox::~QtScriptShell_QMessageBox() {} + +void QtScriptShell_QMessageBox::accept() +{ + QScriptValue _q_function = __qtscript_self.property("accept"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("accept") & QScriptValue::QObjectMember)) { + QMessageBox::accept(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QMessageBox::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QMessageBox::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::changeEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QMessageBox::changeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QMessageBox::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QMessageBox::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QMessageBox::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMessageBox::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QMessageBox::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QMessageBox::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QMessageBox::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMessageBox::done(int arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("done"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("done") & QScriptValue::QObjectMember)) { + QMessageBox::done(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QMessageBox::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QMessageBox::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QMessageBox::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QMessageBox::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QMessageBox::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QMessageBox::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMessageBox::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QMessageBox::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QMessageBox::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QMessageBox::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +int QtScriptShell_QMessageBox::exec() +{ + QScriptValue _q_function = __qtscript_self.property("exec"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("exec") & QScriptValue::QObjectMember)) { + return QMessageBox::exec(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMessageBox::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QMessageBox::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMessageBox::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QMessageBox::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QMessageBox::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QMessageBox::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMessageBox::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QMessageBox::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QMessageBox::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QMessageBox::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QMessageBox::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QMessageBox::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QMessageBox::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QMessageBox::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QMessageBox::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QMessageBox::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QMessageBox::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QMessageBox::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QMessageBox::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QMessageBox::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QMessageBox::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QMessageBox::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QMessageBox::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QMessageBox::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QMessageBox::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QMessageBox::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QMessageBox::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QMessageBox::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QMessageBox::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMessageBox::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QMessageBox::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QMessageBox::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QMessageBox::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMessageBox::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QMessageBox::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QMessageBox::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QMessageBox::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QMessageBox::reject() +{ + QScriptValue _q_function = __qtscript_self.property("reject"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reject") & QScriptValue::QObjectMember)) { + QMessageBox::reject(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QMessageBox::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QMessageBox::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QMessageBox::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QMessageBox::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QMessageBox::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QMessageBox::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QMessageBox::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QMessageBox::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMessageBox::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QMessageBox::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMessageBox.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMessageBox.h new file mode 100644 index 00000000..c240aeae --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMessageBox.h @@ -0,0 +1,67 @@ +#ifndef QTSCRIPTSHELL_QMESSAGEBOX_H +#define QTSCRIPTSHELL_QMESSAGEBOX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QMessageBox : public QMessageBox +{ +public: + QtScriptShell_QMessageBox(QMessageBox::Icon icon, const QString& title, const QString& text, QMessageBox::StandardButtons buttons = NoButton, QWidget* parent = 0, Qt::WindowFlags flags = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint); + QtScriptShell_QMessageBox(QWidget* parent = 0); + QtScriptShell_QMessageBox(const QString& title, const QString& text, QMessageBox::Icon icon, int button0, int button1, int button2, QWidget* parent = 0, Qt::WindowFlags f = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint); + ~QtScriptShell_QMessageBox(); + + void accept(); + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* event); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void done(int arg__1); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + int exec(); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void reject(); + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QMESSAGEBOX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMouseEventTransition.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMouseEventTransition.cpp new file mode 100644 index 00000000..72ce35b7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMouseEventTransition.cpp @@ -0,0 +1,128 @@ +#include "qtscriptshell_QMouseEventTransition.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QMouseEventTransition::QtScriptShell_QMouseEventTransition(QObject* object, QEvent::Type type, Qt::MouseButton button, QState* sourceState) + : QMouseEventTransition(object, type, button, sourceState) {} + +QtScriptShell_QMouseEventTransition::QtScriptShell_QMouseEventTransition(QState* sourceState) + : QMouseEventTransition(sourceState) {} + +QtScriptShell_QMouseEventTransition::~QtScriptShell_QMouseEventTransition() {} + +void QtScriptShell_QMouseEventTransition::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QMouseEventTransition::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMouseEventTransition::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QMouseEventTransition::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QMouseEventTransition::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QMouseEventTransition::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QMouseEventTransition::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QMouseEventTransition::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QMouseEventTransition::eventTest(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventTest"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventTest") & QScriptValue::QObjectMember)) { + return QMouseEventTransition::eventTest(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QMouseEventTransition::onTransition(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("onTransition"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("onTransition") & QScriptValue::QObjectMember)) { + QMouseEventTransition::onTransition(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QMouseEventTransition::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QMouseEventTransition::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMouseEventTransition.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMouseEventTransition.h new file mode 100644 index 00000000..b8aab0a8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QMouseEventTransition.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QMOUSEEVENTTRANSITION_H +#define QTSCRIPTSHELL_QMOUSEEVENTTRANSITION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QMouseEventTransition : public QMouseEventTransition +{ +public: + QtScriptShell_QMouseEventTransition(QObject* object, QEvent::Type type, Qt::MouseButton button, QState* sourceState = 0); + QtScriptShell_QMouseEventTransition(QState* sourceState = 0); + ~QtScriptShell_QMouseEventTransition(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + bool eventTest(QEvent* event); + void onTransition(QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QMOUSEEVENTTRANSITION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPaintDevice.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPaintDevice.cpp new file mode 100644 index 00000000..a03bd1ba --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPaintDevice.cpp @@ -0,0 +1,97 @@ +#include "qtscriptshell_QPaintDevice.h" + +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) + +QtScriptShell_QPaintDevice::QtScriptShell_QPaintDevice() + : QPaintDevice() {} + +QtScriptShell_QPaintDevice::~QtScriptShell_QPaintDevice() {} + +int QtScriptShell_QPaintDevice::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QPaintDevice::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPaintDevice::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QPaintDevice::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +int QtScriptShell_QPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QPaintDevice::metric(metric); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, metric))); + } +} + +QPaintEngine* QtScriptShell_QPaintDevice::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + qFatal("QPaintDevice::paintEngine() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QPaintDevice* QtScriptShell_QPaintDevice::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QPaintDevice::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +QPainter* QtScriptShell_QPaintDevice::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QPaintDevice::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPaintDevice.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPaintDevice.h new file mode 100644 index 00000000..2693d085 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPaintDevice.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QPAINTDEVICE_H +#define QTSCRIPTSHELL_QPAINTDEVICE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPaintDevice : public QPaintDevice +{ +public: + QtScriptShell_QPaintDevice(); + ~QtScriptShell_QPaintDevice(); + + int devType() const; + void initPainter(QPainter* painter) const; + int metric(QPaintDevice::PaintDeviceMetric metric) const; + QPaintEngine* paintEngine() const; + QPaintDevice* redirected(QPoint* offset) const; + QPainter* sharedPainter() const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPAINTDEVICE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPanGesture.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPanGesture.cpp new file mode 100644 index 00000000..a292a4b9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPanGesture.cpp @@ -0,0 +1,92 @@ +#include "qtscriptshell_QPanGesture.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QPanGesture::QtScriptShell_QPanGesture(QObject* parent) + : QPanGesture(parent) {} + +QtScriptShell_QPanGesture::~QtScriptShell_QPanGesture() {} + +void QtScriptShell_QPanGesture::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QPanGesture::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPanGesture::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QPanGesture::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPanGesture::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QPanGesture::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QPanGesture::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QPanGesture::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QPanGesture::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QPanGesture::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPanGesture.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPanGesture.h new file mode 100644 index 00000000..1bc1c49f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPanGesture.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QPANGESTURE_H +#define QTSCRIPTSHELL_QPANGESTURE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPanGesture : public QPanGesture +{ +public: + QtScriptShell_QPanGesture(QObject* parent = 0); + ~QtScriptShell_QPanGesture(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPANGESTURE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPictureFormatPlugin.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPictureFormatPlugin.cpp new file mode 100644 index 00000000..470be369 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPictureFormatPlugin.cpp @@ -0,0 +1,140 @@ +#include "qtscriptshell_QPictureFormatPlugin.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QPicture*) +Q_DECLARE_METATYPE(QPicture) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QPictureFormatPlugin::QtScriptShell_QPictureFormatPlugin(QObject* parent) + : QPictureFormatPlugin(parent) {} + +QtScriptShell_QPictureFormatPlugin::~QtScriptShell_QPictureFormatPlugin() {} + +void QtScriptShell_QPictureFormatPlugin::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QPictureFormatPlugin::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPictureFormatPlugin::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QPictureFormatPlugin::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPictureFormatPlugin::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QPictureFormatPlugin::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QPictureFormatPlugin::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QPictureFormatPlugin::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QPictureFormatPlugin::installIOHandler(const QString& format) +{ + QScriptValue _q_function = __qtscript_self.property("installIOHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("installIOHandler") & QScriptValue::QObjectMember)) { + qFatal("QPictureFormatPlugin::installIOHandler() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, format))); + } +} + +bool QtScriptShell_QPictureFormatPlugin::loadPicture(const QString& format, const QString& filename, QPicture* pic) +{ + QScriptValue _q_function = __qtscript_self.property("loadPicture"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("loadPicture") & QScriptValue::QObjectMember)) { + return QPictureFormatPlugin::loadPicture(format, filename, pic); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, format) + << qScriptValueFromValue(_q_engine, filename) + << qScriptValueFromValue(_q_engine, pic))); + } +} + +bool QtScriptShell_QPictureFormatPlugin::savePicture(const QString& format, const QString& filename, const QPicture& pic) +{ + QScriptValue _q_function = __qtscript_self.property("savePicture"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("savePicture") & QScriptValue::QObjectMember)) { + return QPictureFormatPlugin::savePicture(format, filename, pic); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, format) + << qScriptValueFromValue(_q_engine, filename) + << qScriptValueFromValue(_q_engine, pic))); + } +} + +void QtScriptShell_QPictureFormatPlugin::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QPictureFormatPlugin::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPictureFormatPlugin.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPictureFormatPlugin.h new file mode 100644 index 00000000..b26a18de --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPictureFormatPlugin.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QPICTUREFORMATPLUGIN_H +#define QTSCRIPTSHELL_QPICTUREFORMATPLUGIN_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPictureFormatPlugin : public QPictureFormatPlugin +{ +public: + QtScriptShell_QPictureFormatPlugin(QObject* parent = 0); + ~QtScriptShell_QPictureFormatPlugin(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + bool installIOHandler(const QString& format); + bool loadPicture(const QString& format, const QString& filename, QPicture* pic); + bool savePicture(const QString& format, const QString& filename, const QPicture& pic); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPICTUREFORMATPLUGIN_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPlainTextDocumentLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPlainTextDocumentLayout.cpp new file mode 100644 index 00000000..81d1c67f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPlainTextDocumentLayout.cpp @@ -0,0 +1,20 @@ +#include "qtscriptshell_QPlainTextDocumentLayout.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QPlainTextDocumentLayout::QtScriptShell_QPlainTextDocumentLayout(QTextDocument* document) + : QPlainTextDocumentLayout(document) {} + +QtScriptShell_QPlainTextDocumentLayout::~QtScriptShell_QPlainTextDocumentLayout() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPlainTextDocumentLayout.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPlainTextDocumentLayout.h new file mode 100644 index 00000000..b996f2a7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPlainTextDocumentLayout.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QPLAINTEXTDOCUMENTLAYOUT_H +#define QTSCRIPTSHELL_QPLAINTEXTDOCUMENTLAYOUT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPlainTextDocumentLayout : public QPlainTextDocumentLayout +{ +public: + QtScriptShell_QPlainTextDocumentLayout(QTextDocument* document); + ~QtScriptShell_QPlainTextDocumentLayout(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPLAINTEXTDOCUMENTLAYOUT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPlainTextEdit.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPlainTextEdit.cpp new file mode 100644 index 00000000..2234166b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPlainTextEdit.cpp @@ -0,0 +1,790 @@ +#include "qtscriptshell_QPlainTextEdit.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QMimeData*) +Q_DECLARE_METATYPE(QTextCursor) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QPlainTextEdit::QtScriptShell_QPlainTextEdit(QWidget* parent) + : QPlainTextEdit(parent) {} + +QtScriptShell_QPlainTextEdit::QtScriptShell_QPlainTextEdit(const QString& text, QWidget* parent) + : QPlainTextEdit(text, parent) {} + +QtScriptShell_QPlainTextEdit::~QtScriptShell_QPlainTextEdit() {} + +void QtScriptShell_QPlainTextEdit::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPlainTextEdit::canInsertFromMimeData(const QMimeData* source) const +{ + QScriptValue _q_function = __qtscript_self.property("canInsertFromMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canInsertFromMimeData") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::canInsertFromMimeData(source); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(source)))); + } +} + +void QtScriptShell_QPlainTextEdit::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPlainTextEdit::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPlainTextEdit::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPlainTextEdit::contextMenuEvent(QContextMenuEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::contextMenuEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QMimeData* QtScriptShell_QPlainTextEdit::createMimeDataFromSelection() const +{ + QScriptValue _q_function = __qtscript_self.property("createMimeDataFromSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createMimeDataFromSelection") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::createMimeDataFromSelection(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPlainTextEdit::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QPlainTextEdit::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPlainTextEdit::doSetTextCursor(const QTextCursor& cursor) +{ + QScriptValue _q_function = __qtscript_self.property("doSetTextCursor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("doSetTextCursor") & QScriptValue::QObjectMember)) { + QPlainTextEdit::doSetTextCursor(cursor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, cursor)); + } +} + +void QtScriptShell_QPlainTextEdit::dragEnterEvent(QDragEnterEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::dragEnterEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPlainTextEdit::dragLeaveEvent(QDragLeaveEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::dragLeaveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPlainTextEdit::dragMoveEvent(QDragMoveEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::dragMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPlainTextEdit::dropEvent(QDropEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::dropEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPlainTextEdit::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPlainTextEdit::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QPlainTextEdit::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QPlainTextEdit::focusInEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::focusInEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QPlainTextEdit::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QPlainTextEdit::focusOutEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::focusOutEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QPlainTextEdit::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QPlainTextEdit::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QPlainTextEdit::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPlainTextEdit::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QPlainTextEdit::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QPlainTextEdit::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QPlainTextEdit::inputMethodQuery(Qt::InputMethodQuery property) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::inputMethodQuery(property); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, property))); + } +} + +void QtScriptShell_QPlainTextEdit::insertFromMimeData(const QMimeData* source) +{ + QScriptValue _q_function = __qtscript_self.property("insertFromMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertFromMimeData") & QScriptValue::QObjectMember)) { + QPlainTextEdit::insertFromMimeData(source); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(source))); + } +} + +void QtScriptShell_QPlainTextEdit::keyPressEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::keyPressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPlainTextEdit::keyReleaseEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::keyReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPlainTextEdit::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QPlainTextEdit::loadResource(int type, const QUrl& name) +{ + QScriptValue _q_function = __qtscript_self.property("loadResource"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("loadResource") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::loadResource(type, name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, type) + << qScriptValueFromValue(_q_engine, name))); + } +} + +int QtScriptShell_QPlainTextEdit::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QPlainTextEdit::mouseDoubleClickEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::mouseDoubleClickEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPlainTextEdit::mouseMoveEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::mouseMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPlainTextEdit::mousePressEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::mousePressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPlainTextEdit::mouseReleaseEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::mouseReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPlainTextEdit::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPlainTextEdit::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QPlainTextEdit::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPlainTextEdit::paintEvent(QPaintEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::paintEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QPaintDevice* QtScriptShell_QPlainTextEdit::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QPlainTextEdit::resizeEvent(QResizeEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::resizeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPlainTextEdit::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QPlainTextEdit::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QPlainTextEdit::setupViewport(QWidget* viewport) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QPlainTextEdit::setupViewport(viewport); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, viewport)); + } +} + +QPainter* QtScriptShell_QPlainTextEdit::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPlainTextEdit::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPlainTextEdit::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPlainTextEdit::timerEvent(QTimerEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::timerEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QPlainTextEdit::viewportEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::viewportEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QPlainTextEdit::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QPlainTextEdit::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPlainTextEdit::wheelEvent(QWheelEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QPlainTextEdit::wheelEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPlainTextEdit.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPlainTextEdit.h new file mode 100644 index 00000000..6d7e09d2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPlainTextEdit.h @@ -0,0 +1,71 @@ +#ifndef QTSCRIPTSHELL_QPLAINTEXTEDIT_H +#define QTSCRIPTSHELL_QPLAINTEXTEDIT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPlainTextEdit : public QPlainTextEdit +{ +public: + QtScriptShell_QPlainTextEdit(QWidget* parent = 0); + QtScriptShell_QPlainTextEdit(const QString& text, QWidget* parent = 0); + ~QtScriptShell_QPlainTextEdit(); + + void actionEvent(QActionEvent* event); + bool canInsertFromMimeData(const QMimeData* source) const; + void changeEvent(QEvent* e); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* e); + QMimeData* createMimeDataFromSelection() const; + void customEvent(QEvent* event); + int devType() const; + void doSetTextCursor(const QTextCursor& cursor); + void dragEnterEvent(QDragEnterEvent* e); + void dragLeaveEvent(QDragLeaveEvent* e); + void dragMoveEvent(QDragMoveEvent* e); + void dropEvent(QDropEvent* e); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* e); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* e); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery property) const; + void insertFromMimeData(const QMimeData* source); + void keyPressEvent(QKeyEvent* e); + void keyReleaseEvent(QKeyEvent* e); + void leaveEvent(QEvent* event); + QVariant loadResource(int type, const QUrl& name); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* e); + void mouseMoveEvent(QMouseEvent* e); + void mousePressEvent(QMouseEvent* e); + void mouseReleaseEvent(QMouseEvent* e); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* e); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* e); + void scrollContentsBy(int dx, int dy); + void setupViewport(QWidget* viewport); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* e); + bool viewportEvent(QEvent* arg__1); + QSize viewportSizeHint() const; + void wheelEvent(QWheelEvent* e); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPLAINTEXTEDIT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QProgressBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QProgressBar.cpp new file mode 100644 index 00000000..0f4fdef3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QProgressBar.cpp @@ -0,0 +1,661 @@ +#include "qtscriptshell_QProgressBar.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QProgressBar::QtScriptShell_QProgressBar(QWidget* parent) + : QProgressBar(parent) {} + +QtScriptShell_QProgressBar::~QtScriptShell_QProgressBar() {} + +void QtScriptShell_QProgressBar::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QProgressBar::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QProgressBar::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QProgressBar::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QProgressBar::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QProgressBar::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QProgressBar::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QProgressBar::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QProgressBar::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QProgressBar::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QProgressBar::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QProgressBar::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QProgressBar::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QProgressBar::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QProgressBar::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QProgressBar::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QProgressBar::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QProgressBar::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QProgressBar::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QProgressBar::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QProgressBar::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QProgressBar::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QProgressBar::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QProgressBar::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QProgressBar::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QProgressBar::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QProgressBar::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QProgressBar::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QProgressBar::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QProgressBar::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QProgressBar::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QProgressBar::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QProgressBar::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QProgressBar::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QProgressBar::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QProgressBar::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QProgressBar::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QProgressBar::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QProgressBar::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QProgressBar::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QProgressBar::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QProgressBar::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QProgressBar::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QProgressBar::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QProgressBar::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QProgressBar::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QProgressBar::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QProgressBar::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QProgressBar::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QProgressBar::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QProgressBar::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QProgressBar::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QProgressBar::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QProgressBar::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QProgressBar::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QProgressBar::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QProgressBar::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QProgressBar::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QProgressBar::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QProgressBar::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QProgressBar::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QProgressBar::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QProgressBar::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QProgressBar::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QString QtScriptShell_QProgressBar::text() const +{ + QScriptValue _q_function = __qtscript_self.property("_qs_text"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("_qs_text") & QScriptValue::QObjectMember)) { + return QProgressBar::text(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QProgressBar::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QProgressBar::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressBar::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QProgressBar::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QProgressBar.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QProgressBar.h new file mode 100644 index 00000000..802cc318 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QProgressBar.h @@ -0,0 +1,62 @@ +#ifndef QTSCRIPTSHELL_QPROGRESSBAR_H +#define QTSCRIPTSHELL_QPROGRESSBAR_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QProgressBar : public QProgressBar +{ +public: + QtScriptShell_QProgressBar(QWidget* parent = 0); + ~QtScriptShell_QProgressBar(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + QString text() const; + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPROGRESSBAR_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QProgressDialog.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QProgressDialog.cpp new file mode 100644 index 00000000..070ef8f5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QProgressDialog.cpp @@ -0,0 +1,702 @@ +#include "qtscriptshell_QProgressDialog.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QProgressDialog::QtScriptShell_QProgressDialog(QWidget* parent, Qt::WindowFlags flags) + : QProgressDialog(parent, flags) {} + +QtScriptShell_QProgressDialog::QtScriptShell_QProgressDialog(const QString& labelText, const QString& cancelButtonText, int minimum, int maximum, QWidget* parent, Qt::WindowFlags flags) + : QProgressDialog(labelText, cancelButtonText, minimum, maximum, parent, flags) {} + +QtScriptShell_QProgressDialog::~QtScriptShell_QProgressDialog() {} + +void QtScriptShell_QProgressDialog::accept() +{ + QScriptValue _q_function = __qtscript_self.property("accept"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("accept") & QScriptValue::QObjectMember)) { + QProgressDialog::accept(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QProgressDialog::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::changeEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::changeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QProgressDialog::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QProgressDialog::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QProgressDialog::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QProgressDialog::done(int arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("done"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("done") & QScriptValue::QObjectMember)) { + QProgressDialog::done(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QProgressDialog::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QProgressDialog::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QProgressDialog::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QProgressDialog::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QProgressDialog::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +int QtScriptShell_QProgressDialog::exec() +{ + QScriptValue _q_function = __qtscript_self.property("exec"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("exec") & QScriptValue::QObjectMember)) { + return QProgressDialog::exec(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QProgressDialog::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QProgressDialog::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QProgressDialog::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QProgressDialog::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QProgressDialog::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QProgressDialog::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QProgressDialog::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QProgressDialog::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QProgressDialog::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QProgressDialog::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QProgressDialog::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QProgressDialog::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QProgressDialog::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QProgressDialog::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QProgressDialog::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QProgressDialog::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QProgressDialog::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QProgressDialog::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QProgressDialog::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QProgressDialog::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QProgressDialog::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QProgressDialog::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QProgressDialog::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QProgressDialog::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QProgressDialog::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QProgressDialog::reject() +{ + QScriptValue _q_function = __qtscript_self.property("reject"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reject") & QScriptValue::QObjectMember)) { + QProgressDialog::reject(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QProgressDialog::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QProgressDialog::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QProgressDialog::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QProgressDialog::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QProgressDialog::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QProgressDialog::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QProgressDialog.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QProgressDialog.h new file mode 100644 index 00000000..2bb3c7ea --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QProgressDialog.h @@ -0,0 +1,66 @@ +#ifndef QTSCRIPTSHELL_QPROGRESSDIALOG_H +#define QTSCRIPTSHELL_QPROGRESSDIALOG_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QProgressDialog : public QProgressDialog +{ +public: + QtScriptShell_QProgressDialog(QWidget* parent = 0, Qt::WindowFlags flags = Qt::WindowFlags()); + QtScriptShell_QProgressDialog(const QString& labelText, const QString& cancelButtonText, int minimum, int maximum, QWidget* parent = 0, Qt::WindowFlags flags = Qt::WindowFlags()); + ~QtScriptShell_QProgressDialog(); + + void accept(); + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* event); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void done(int arg__1); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + int exec(); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void reject(); + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPROGRESSDIALOG_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPushButton.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPushButton.cpp new file mode 100644 index 00000000..0c59f8ab --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPushButton.cpp @@ -0,0 +1,694 @@ +#include "qtscriptshell_QPushButton.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QPushButton::QtScriptShell_QPushButton(QWidget* parent) + : QPushButton(parent) {} + +QtScriptShell_QPushButton::QtScriptShell_QPushButton(const QIcon& icon, const QString& text, QWidget* parent) + : QPushButton(icon, text, parent) {} + +QtScriptShell_QPushButton::QtScriptShell_QPushButton(const QString& text, QWidget* parent) + : QPushButton(text, parent) {} + +QtScriptShell_QPushButton::~QtScriptShell_QPushButton() {} + +void QtScriptShell_QPushButton::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QPushButton::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPushButton::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QPushButton::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPushButton::checkStateSet() +{ + QScriptValue _q_function = __qtscript_self.property("checkStateSet"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("checkStateSet") & QScriptValue::QObjectMember)) { + QPushButton::checkStateSet(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QPushButton::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QPushButton::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPushButton::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QPushButton::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPushButton::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QPushButton::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPushButton::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QPushButton::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QPushButton::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QPushButton::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPushButton::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QPushButton::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPushButton::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QPushButton::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPushButton::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QPushButton::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPushButton::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QPushButton::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPushButton::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QPushButton::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPushButton::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QPushButton::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QPushButton::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QPushButton::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QPushButton::focusInEvent(QFocusEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QPushButton::focusInEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +bool QtScriptShell_QPushButton::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QPushButton::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QPushButton::focusOutEvent(QFocusEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QPushButton::focusOutEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +bool QtScriptShell_QPushButton::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QPushButton::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QPushButton::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QPushButton::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QPushButton::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QPushButton::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPushButton::hitButton(const QPoint& pos) const +{ + QScriptValue _q_function = __qtscript_self.property("hitButton"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hitButton") & QScriptValue::QObjectMember)) { + return QPushButton::hitButton(pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pos))); + } +} + +void QtScriptShell_QPushButton::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QPushButton::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QPushButton::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QPushButton::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QPushButton::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QPushButton::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QPushButton::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QPushButton::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QPushButton::keyReleaseEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QPushButton::keyReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPushButton::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QPushButton::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QPushButton::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QPushButton::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QPushButton::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QPushButton::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPushButton::mouseMoveEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QPushButton::mouseMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPushButton::mousePressEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QPushButton::mousePressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPushButton::mouseReleaseEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QPushButton::mouseReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPushButton::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QPushButton::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QPushButton::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QPushButton::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +void QtScriptShell_QPushButton::nextCheckState() +{ + QScriptValue _q_function = __qtscript_self.property("nextCheckState"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nextCheckState") & QScriptValue::QObjectMember)) { + QPushButton::nextCheckState(); + } else { + _q_function.call(__qtscript_self); + } +} + +QPaintEngine* QtScriptShell_QPushButton::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QPushButton::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPushButton::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QPushButton::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QPushButton::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QPushButton::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QPushButton::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QPushButton::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QPushButton::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QPushButton::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QPushButton::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QPushButton::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPushButton::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QPushButton::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QPushButton::timerEvent(QTimerEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QPushButton::timerEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QPushButton::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QPushButton::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPushButton.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPushButton.h new file mode 100644 index 00000000..fcc7b04d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QPushButton.h @@ -0,0 +1,66 @@ +#ifndef QTSCRIPTSHELL_QPUSHBUTTON_H +#define QTSCRIPTSHELL_QPUSHBUTTON_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QPushButton : public QPushButton +{ +public: + QtScriptShell_QPushButton(QWidget* parent = 0); + QtScriptShell_QPushButton(const QIcon& icon, const QString& text, QWidget* parent = 0); + QtScriptShell_QPushButton(const QString& text, QWidget* parent = 0); + ~QtScriptShell_QPushButton(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* e); + void checkStateSet(); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* arg__1); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* arg__1); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + bool hitButton(const QPoint& pos) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* e); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* e); + void mousePressEvent(QMouseEvent* e); + void mouseReleaseEvent(QMouseEvent* e); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + void nextCheckState(); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* e); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QPUSHBUTTON_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QRadioButton.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QRadioButton.cpp new file mode 100644 index 00000000..09142151 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QRadioButton.cpp @@ -0,0 +1,690 @@ +#include "qtscriptshell_QRadioButton.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QRadioButton::QtScriptShell_QRadioButton(QWidget* parent) + : QRadioButton(parent) {} + +QtScriptShell_QRadioButton::QtScriptShell_QRadioButton(const QString& text, QWidget* parent) + : QRadioButton(text, parent) {} + +QtScriptShell_QRadioButton::~QtScriptShell_QRadioButton() {} + +void QtScriptShell_QRadioButton::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QRadioButton::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRadioButton::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QRadioButton::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QRadioButton::checkStateSet() +{ + QScriptValue _q_function = __qtscript_self.property("checkStateSet"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("checkStateSet") & QScriptValue::QObjectMember)) { + QRadioButton::checkStateSet(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QRadioButton::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QRadioButton::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRadioButton::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QRadioButton::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRadioButton::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QRadioButton::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRadioButton::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QRadioButton::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QRadioButton::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QRadioButton::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QRadioButton::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QRadioButton::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRadioButton::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QRadioButton::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRadioButton::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QRadioButton::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRadioButton::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QRadioButton::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRadioButton::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QRadioButton::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QRadioButton::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QRadioButton::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QRadioButton::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QRadioButton::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QRadioButton::focusInEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QRadioButton::focusInEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QRadioButton::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QRadioButton::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QRadioButton::focusOutEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QRadioButton::focusOutEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QRadioButton::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QRadioButton::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QRadioButton::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QRadioButton::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QRadioButton::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QRadioButton::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QRadioButton::hitButton(const QPoint& arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("hitButton"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hitButton") & QScriptValue::QObjectMember)) { + return QRadioButton::hitButton(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QRadioButton::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QRadioButton::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QRadioButton::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QRadioButton::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QRadioButton::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QRadioButton::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QRadioButton::keyPressEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QRadioButton::keyPressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QRadioButton::keyReleaseEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QRadioButton::keyReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QRadioButton::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QRadioButton::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QRadioButton::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QRadioButton::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QRadioButton::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QRadioButton::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRadioButton::mouseMoveEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QRadioButton::mouseMoveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QRadioButton::mousePressEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QRadioButton::mousePressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QRadioButton::mouseReleaseEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QRadioButton::mouseReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QRadioButton::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QRadioButton::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QRadioButton::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QRadioButton::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +void QtScriptShell_QRadioButton::nextCheckState() +{ + QScriptValue _q_function = __qtscript_self.property("nextCheckState"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nextCheckState") & QScriptValue::QObjectMember)) { + QRadioButton::nextCheckState(); + } else { + _q_function.call(__qtscript_self); + } +} + +QPaintEngine* QtScriptShell_QRadioButton::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QRadioButton::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QRadioButton::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QRadioButton::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QRadioButton::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QRadioButton::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QRadioButton::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QRadioButton::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QRadioButton::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QRadioButton::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QRadioButton::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QRadioButton::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRadioButton::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QRadioButton::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRadioButton::timerEvent(QTimerEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QRadioButton::timerEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QRadioButton::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QRadioButton::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QRadioButton.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QRadioButton.h new file mode 100644 index 00000000..e3c38c5b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QRadioButton.h @@ -0,0 +1,65 @@ +#ifndef QTSCRIPTSHELL_QRADIOBUTTON_H +#define QTSCRIPTSHELL_QRADIOBUTTON_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QRadioButton : public QRadioButton +{ +public: + QtScriptShell_QRadioButton(QWidget* parent = 0); + QtScriptShell_QRadioButton(const QString& text, QWidget* parent = 0); + ~QtScriptShell_QRadioButton(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* e); + void checkStateSet(); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* e); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* e); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + bool hitButton(const QPoint& arg__1) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* e); + void keyReleaseEvent(QKeyEvent* e); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* arg__1); + void mousePressEvent(QMouseEvent* e); + void mouseReleaseEvent(QMouseEvent* e); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + void nextCheckState(); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* e); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QRADIOBUTTON_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QRubberBand.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QRubberBand.cpp new file mode 100644 index 00000000..eb4d2f16 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QRubberBand.cpp @@ -0,0 +1,671 @@ +#include "qtscriptshell_QRubberBand.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QRubberBand::QtScriptShell_QRubberBand(QRubberBand::Shape arg__1, QWidget* arg__2) + : QRubberBand(arg__1, arg__2) {} + +QtScriptShell_QRubberBand::~QtScriptShell_QRubberBand() {} + +void QtScriptShell_QRubberBand::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QRubberBand::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QRubberBand::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QRubberBand::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QRubberBand::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QRubberBand::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QRubberBand::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QRubberBand::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QRubberBand::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QRubberBand::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QRubberBand::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QRubberBand::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QRubberBand::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QRubberBand::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QRubberBand::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QRubberBand::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QRubberBand::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QRubberBand::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QRubberBand::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QRubberBand::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QRubberBand::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QRubberBand::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QRubberBand::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QRubberBand::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QRubberBand::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QRubberBand::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QRubberBand::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QRubberBand::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QRubberBand::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QRubberBand::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QRubberBand::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QRubberBand::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QRubberBand::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QRubberBand::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QRubberBand::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QRubberBand::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QRubberBand::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QRubberBand::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QRubberBand::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QRubberBand::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QRubberBand::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QRubberBand::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QRubberBand::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QRubberBand::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QRubberBand::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QRubberBand::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QRubberBand::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QRubberBand::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QRubberBand::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QRubberBand::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::moveEvent(QMoveEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QRubberBand::moveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +bool QtScriptShell_QRubberBand::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QRubberBand::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QRubberBand::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QRubberBand::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QRubberBand::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QRubberBand::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QRubberBand::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QRubberBand::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QRubberBand::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QRubberBand::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPainter* QtScriptShell_QRubberBand::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QRubberBand::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QRubberBand::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QRubberBand::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QSize QtScriptShell_QRubberBand::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QRubberBand::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QRubberBand::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QRubberBand::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QRubberBand::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QRubberBand::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QRubberBand::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QRubberBand.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QRubberBand.h new file mode 100644 index 00000000..2e142430 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QRubberBand.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_QRUBBERBAND_H +#define QTSCRIPTSHELL_QRUBBERBAND_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QRubberBand : public QRubberBand +{ +public: + QtScriptShell_QRubberBand(QRubberBand::Shape arg__1, QWidget* arg__2 = 0); + ~QtScriptShell_QRubberBand(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* arg__1); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* arg__1); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QRUBBERBAND_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QScrollArea.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QScrollArea.cpp new file mode 100644 index 00000000..4c06a332 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QScrollArea.cpp @@ -0,0 +1,706 @@ +#include "qtscriptshell_QScrollArea.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QScrollArea::QtScriptShell_QScrollArea(QWidget* parent) + : QScrollArea(parent) {} + +QtScriptShell_QScrollArea::~QtScriptShell_QScrollArea() {} + +void QtScriptShell_QScrollArea::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QScrollArea::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollArea::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QScrollArea::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollArea::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QScrollArea::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollArea::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QScrollArea::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollArea::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QScrollArea::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollArea::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QScrollArea::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QScrollArea::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QScrollArea::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QScrollArea::dragEnterEvent(QDragEnterEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QScrollArea::dragEnterEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollArea::dragLeaveEvent(QDragLeaveEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QScrollArea::dragLeaveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollArea::dragMoveEvent(QDragMoveEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QScrollArea::dragMoveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollArea::dropEvent(QDropEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QScrollArea::dropEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollArea::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QScrollArea::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QScrollArea::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QScrollArea::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QScrollArea::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QScrollArea::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QScrollArea::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QScrollArea::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QScrollArea::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QScrollArea::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QScrollArea::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QScrollArea::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QScrollArea::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QScrollArea::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QScrollArea::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QScrollArea::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QScrollArea::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QScrollArea::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollArea::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QScrollArea::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QScrollArea::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QScrollArea::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QScrollArea::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QScrollArea::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QScrollArea::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QScrollArea::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollArea::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QScrollArea::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollArea::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QScrollArea::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QScrollArea::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QScrollArea::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QScrollArea::mouseDoubleClickEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QScrollArea::mouseDoubleClickEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollArea::mouseMoveEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QScrollArea::mouseMoveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollArea::mousePressEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QScrollArea::mousePressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollArea::mouseReleaseEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QScrollArea::mouseReleaseEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollArea::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QScrollArea::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QScrollArea::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QScrollArea::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QScrollArea::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QScrollArea::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QScrollArea::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QScrollArea::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QScrollArea::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QScrollArea::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QScrollArea::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QScrollArea::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollArea::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QScrollArea::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QScrollArea::setupViewport(QWidget* viewport) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QScrollArea::setupViewport(viewport); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, viewport)); + } +} + +QPainter* QtScriptShell_QScrollArea::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QScrollArea::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QScrollArea::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QScrollArea::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollArea::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QScrollArea::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollArea::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QScrollArea::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QScrollArea::viewportEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QScrollArea::viewportEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QScrollArea::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QScrollArea::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QScrollArea::wheelEvent(QWheelEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QScrollArea::wheelEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QScrollArea.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QScrollArea.h new file mode 100644 index 00000000..b6e11b71 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QScrollArea.h @@ -0,0 +1,65 @@ +#ifndef QTSCRIPTSHELL_QSCROLLAREA_H +#define QTSCRIPTSHELL_QSCROLLAREA_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QScrollArea : public QScrollArea +{ +public: + QtScriptShell_QScrollArea(QWidget* parent = 0); + ~QtScriptShell_QScrollArea(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* arg__1); + void dragLeaveEvent(QDragLeaveEvent* arg__1); + void dragMoveEvent(QDragMoveEvent* arg__1); + void dropEvent(QDropEvent* arg__1); + void enterEvent(QEvent* event); + bool event(QEvent* arg__1); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* arg__1); + void mouseMoveEvent(QMouseEvent* arg__1); + void mousePressEvent(QMouseEvent* arg__1); + void mouseReleaseEvent(QMouseEvent* arg__1); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* arg__1); + void scrollContentsBy(int dx, int dy); + void setupViewport(QWidget* viewport); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + bool viewportEvent(QEvent* arg__1); + QSize viewportSizeHint() const; + void wheelEvent(QWheelEvent* arg__1); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSCROLLAREA_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QScrollBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QScrollBar.cpp new file mode 100644 index 00000000..80b77dff --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QScrollBar.cpp @@ -0,0 +1,664 @@ +#include "qtscriptshell_QScrollBar.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QScrollBar::QtScriptShell_QScrollBar(QWidget* parent) + : QScrollBar(parent) {} + +QtScriptShell_QScrollBar::QtScriptShell_QScrollBar(Qt::Orientation arg__1, QWidget* parent) + : QScrollBar(arg__1, parent) {} + +QtScriptShell_QScrollBar::~QtScriptShell_QScrollBar() {} + +void QtScriptShell_QScrollBar::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QScrollBar::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollBar::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QScrollBar::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QScrollBar::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QScrollBar::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollBar::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QScrollBar::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollBar::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QScrollBar::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollBar::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QScrollBar::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QScrollBar::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QScrollBar::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QScrollBar::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QScrollBar::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollBar::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QScrollBar::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollBar::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QScrollBar::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollBar::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QScrollBar::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollBar::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QScrollBar::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QScrollBar::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QScrollBar::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QScrollBar::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QScrollBar::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QScrollBar::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QScrollBar::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QScrollBar::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QScrollBar::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QScrollBar::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QScrollBar::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QScrollBar::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QScrollBar::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QScrollBar::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QScrollBar::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QScrollBar::hideEvent(QHideEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QScrollBar::hideEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollBar::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QScrollBar::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QScrollBar::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QScrollBar::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QScrollBar::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QScrollBar::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QScrollBar::keyPressEvent(QKeyEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QScrollBar::keyPressEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QScrollBar::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QScrollBar::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollBar::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QScrollBar::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QScrollBar::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QScrollBar::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QScrollBar::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QScrollBar::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QScrollBar::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QScrollBar::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollBar::mouseMoveEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QScrollBar::mouseMoveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollBar::mousePressEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QScrollBar::mousePressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollBar::mouseReleaseEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QScrollBar::mouseReleaseEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollBar::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QScrollBar::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QScrollBar::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QScrollBar::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QScrollBar::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QScrollBar::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QScrollBar::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QScrollBar::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QScrollBar::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QScrollBar::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QScrollBar::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QScrollBar::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QScrollBar::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QScrollBar::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QScrollBar::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QScrollBar::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollBar::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QScrollBar::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QScrollBar::timerEvent(QTimerEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QScrollBar::timerEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QScrollBar::wheelEvent(QWheelEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QScrollBar::wheelEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QScrollBar.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QScrollBar.h new file mode 100644 index 00000000..68f9deb2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QScrollBar.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_QSCROLLBAR_H +#define QTSCRIPTSHELL_QSCROLLBAR_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QScrollBar : public QScrollBar +{ +public: + QtScriptShell_QScrollBar(QWidget* parent = 0); + QtScriptShell_QScrollBar(Qt::Orientation arg__1, QWidget* parent = 0); + ~QtScriptShell_QScrollBar(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* e); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* arg__1); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* ev); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* arg__1); + void mousePressEvent(QMouseEvent* arg__1); + void mouseReleaseEvent(QMouseEvent* arg__1); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* arg__1); + void wheelEvent(QWheelEvent* arg__1); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSCROLLBAR_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QShortcut.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QShortcut.cpp new file mode 100644 index 00000000..ca2e50d1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QShortcut.cpp @@ -0,0 +1,96 @@ +#include "qtscriptshell_QShortcut.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QShortcut::QtScriptShell_QShortcut(QWidget* parent) + : QShortcut(parent) {} + +QtScriptShell_QShortcut::QtScriptShell_QShortcut(const QKeySequence& key, QWidget* parent, const char* member, const char* ambiguousMember, Qt::ShortcutContext context) + : QShortcut(key, parent, member, ambiguousMember, context) {} + +QtScriptShell_QShortcut::~QtScriptShell_QShortcut() {} + +void QtScriptShell_QShortcut::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QShortcut::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QShortcut::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QShortcut::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QShortcut::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QShortcut::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QShortcut::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QShortcut::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QShortcut::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QShortcut::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QShortcut.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QShortcut.h new file mode 100644 index 00000000..ff970be6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QShortcut.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QSHORTCUT_H +#define QTSCRIPTSHELL_QSHORTCUT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QShortcut : public QShortcut +{ +public: + QtScriptShell_QShortcut(QWidget* parent); + QtScriptShell_QShortcut(const QKeySequence& key, QWidget* parent, const char* member = 0, const char* ambiguousMember = 0, Qt::ShortcutContext context = Qt::WindowShortcut); + ~QtScriptShell_QShortcut(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSHORTCUT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSizeGrip.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSizeGrip.cpp new file mode 100644 index 00000000..ec6b9fbf --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSizeGrip.cpp @@ -0,0 +1,660 @@ +#include "qtscriptshell_QSizeGrip.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QSizeGrip::QtScriptShell_QSizeGrip(QWidget* parent) + : QSizeGrip(parent) {} + +QtScriptShell_QSizeGrip::~QtScriptShell_QSizeGrip() {} + +void QtScriptShell_QSizeGrip::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSizeGrip::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QSizeGrip::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSizeGrip::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSizeGrip::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSizeGrip::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QSizeGrip::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QSizeGrip::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSizeGrip::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSizeGrip::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSizeGrip::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSizeGrip::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSizeGrip::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSizeGrip::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSizeGrip::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QSizeGrip::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSizeGrip::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QSizeGrip::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSizeGrip::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QSizeGrip::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QSizeGrip::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSizeGrip::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QSizeGrip::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QSizeGrip::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QSizeGrip::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QSizeGrip::hideEvent(QHideEvent* hideEvent) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::hideEvent(hideEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, hideEvent)); + } +} + +void QtScriptShell_QSizeGrip::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QSizeGrip::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QSizeGrip::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QSizeGrip::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QSizeGrip::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QSizeGrip::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSizeGrip::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSizeGrip::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QSizeGrip::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QSizeGrip::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QSizeGrip::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QSizeGrip::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSizeGrip::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSizeGrip::mouseMoveEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::mouseMoveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QSizeGrip::mousePressEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::mousePressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QSizeGrip::mouseReleaseEvent(QMouseEvent* mouseEvent) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::mouseReleaseEvent(mouseEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, mouseEvent)); + } +} + +void QtScriptShell_QSizeGrip::moveEvent(QMoveEvent* moveEvent) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::moveEvent(moveEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, moveEvent)); + } +} + +bool QtScriptShell_QSizeGrip::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QSizeGrip::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QSizeGrip::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QSizeGrip::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSizeGrip::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QSizeGrip::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QSizeGrip::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QSizeGrip::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QSizeGrip::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QSizeGrip::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSizeGrip::showEvent(QShowEvent* showEvent) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::showEvent(showEvent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, showEvent)); + } +} + +void QtScriptShell_QSizeGrip::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSizeGrip::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSizeGrip::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QSizeGrip::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSizeGrip.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSizeGrip.h new file mode 100644 index 00000000..edaadcff --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSizeGrip.h @@ -0,0 +1,62 @@ +#ifndef QTSCRIPTSHELL_QSIZEGRIP_H +#define QTSCRIPTSHELL_QSIZEGRIP_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSizeGrip : public QSizeGrip +{ +public: + QtScriptShell_QSizeGrip(QWidget* parent); + ~QtScriptShell_QSizeGrip(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* arg__1); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* hideEvent); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* arg__1); + void mousePressEvent(QMouseEvent* arg__1); + void mouseReleaseEvent(QMouseEvent* mouseEvent); + void moveEvent(QMoveEvent* moveEvent); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* showEvent); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSIZEGRIP_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSlider.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSlider.cpp new file mode 100644 index 00000000..d71e0402 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSlider.cpp @@ -0,0 +1,653 @@ +#include "qtscriptshell_QSlider.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QSlider::QtScriptShell_QSlider(QWidget* parent) + : QSlider(parent) {} + +QtScriptShell_QSlider::QtScriptShell_QSlider(Qt::Orientation orientation, QWidget* parent) + : QSlider(orientation, parent) {} + +QtScriptShell_QSlider::~QtScriptShell_QSlider() {} + +void QtScriptShell_QSlider::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QSlider::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSlider::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QSlider::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QSlider::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSlider::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSlider::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QSlider::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSlider::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QSlider::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSlider::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSlider::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QSlider::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QSlider::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSlider::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QSlider::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSlider::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QSlider::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSlider::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QSlider::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSlider::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QSlider::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSlider::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QSlider::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSlider::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSlider::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QSlider::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSlider::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSlider::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QSlider::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSlider::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QSlider::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QSlider::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QSlider::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSlider::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QSlider::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QSlider::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QSlider::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QSlider::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QSlider::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSlider::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QSlider::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QSlider::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QSlider::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QSlider::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QSlider::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QSlider::keyPressEvent(QKeyEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QSlider::keyPressEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QSlider::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QSlider::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSlider::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QSlider::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QSlider::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QSlider::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QSlider::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QSlider::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSlider::mouseMoveEvent(QMouseEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QSlider::mouseMoveEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QSlider::mousePressEvent(QMouseEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QSlider::mousePressEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QSlider::mouseReleaseEvent(QMouseEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QSlider::mouseReleaseEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QSlider::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QSlider::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSlider::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QSlider::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QSlider::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QSlider::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSlider::paintEvent(QPaintEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QSlider::paintEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +QPaintDevice* QtScriptShell_QSlider::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QSlider::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QSlider::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QSlider::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QSlider::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QSlider::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSlider::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QSlider::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSlider::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QSlider::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSlider::timerEvent(QTimerEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSlider::timerEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QSlider::wheelEvent(QWheelEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QSlider::wheelEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSlider.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSlider.h new file mode 100644 index 00000000..be6f0ce8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSlider.h @@ -0,0 +1,62 @@ +#ifndef QTSCRIPTSHELL_QSLIDER_H +#define QTSCRIPTSHELL_QSLIDER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSlider : public QSlider +{ +public: + QtScriptShell_QSlider(QWidget* parent = 0); + QtScriptShell_QSlider(Qt::Orientation orientation, QWidget* parent = 0); + ~QtScriptShell_QSlider(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* e); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* ev); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* ev); + void mousePressEvent(QMouseEvent* ev); + void mouseReleaseEvent(QMouseEvent* ev); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* ev); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* arg__1); + void wheelEvent(QWheelEvent* e); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSLIDER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSpacerItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSpacerItem.cpp new file mode 100644 index 00000000..f848474f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSpacerItem.cpp @@ -0,0 +1,198 @@ +#include "qtscriptshell_QSpacerItem.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QSpacerItem*) +Q_DECLARE_METATYPE(QWidget*) + +QtScriptShell_QSpacerItem::QtScriptShell_QSpacerItem(int w, int h, QSizePolicy::Policy hData, QSizePolicy::Policy vData) + : QSpacerItem(w, h, hData, vData) {} + +QtScriptShell_QSpacerItem::~QtScriptShell_QSpacerItem() {} + +QSizePolicy::ControlTypes QtScriptShell_QSpacerItem::controlTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("controlTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("controlTypes") & QScriptValue::QObjectMember)) { + return QSpacerItem::controlTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::Orientations QtScriptShell_QSpacerItem::expandingDirections() const +{ + QScriptValue _q_function = __qtscript_self.property("expandingDirections"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("expandingDirections") & QScriptValue::QObjectMember)) { + return QSpacerItem::expandingDirections(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QSpacerItem::geometry() const +{ + QScriptValue _q_function = __qtscript_self.property("geometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("geometry") & QScriptValue::QObjectMember)) { + return QSpacerItem::geometry(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QSpacerItem::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QSpacerItem::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QSpacerItem::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QSpacerItem::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QSpacerItem::invalidate() +{ + QScriptValue _q_function = __qtscript_self.property("invalidate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("invalidate") & QScriptValue::QObjectMember)) { + QSpacerItem::invalidate(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QSpacerItem::isEmpty() const +{ + QScriptValue _q_function = __qtscript_self.property("isEmpty"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isEmpty") & QScriptValue::QObjectMember)) { + return QSpacerItem::isEmpty(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayout* QtScriptShell_QSpacerItem::layout() +{ + QScriptValue _q_function = __qtscript_self.property("layout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("layout") & QScriptValue::QObjectMember)) { + return QSpacerItem::layout(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSize QtScriptShell_QSpacerItem::maximumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("maximumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("maximumSize") & QScriptValue::QObjectMember)) { + return QSpacerItem::maximumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QSpacerItem::minimumHeightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("minimumHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumHeightForWidth") & QScriptValue::QObjectMember)) { + return QSpacerItem::minimumHeightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QSpacerItem::minimumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("minimumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumSize") & QScriptValue::QObjectMember)) { + return QSpacerItem::minimumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSpacerItem::setGeometry(const QRect& arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + QSpacerItem::setGeometry(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QSize QtScriptShell_QSpacerItem::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + return QSpacerItem::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSpacerItem* QtScriptShell_QSpacerItem::spacerItem() +{ + QScriptValue _q_function = __qtscript_self.property("spacerItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("spacerItem") & QScriptValue::QObjectMember)) { + return QSpacerItem::spacerItem(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QWidget* QtScriptShell_QSpacerItem::widget() +{ + QScriptValue _q_function = __qtscript_self.property("widget"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("widget") & QScriptValue::QObjectMember)) { + return QSpacerItem::widget(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSpacerItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSpacerItem.h new file mode 100644 index 00000000..b595fe53 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSpacerItem.h @@ -0,0 +1,34 @@ +#ifndef QTSCRIPTSHELL_QSPACERITEM_H +#define QTSCRIPTSHELL_QSPACERITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSpacerItem : public QSpacerItem +{ +public: + QtScriptShell_QSpacerItem(int w, int h, QSizePolicy::Policy hData = QSizePolicy::Minimum, QSizePolicy::Policy vData = QSizePolicy::Minimum); + ~QtScriptShell_QSpacerItem(); + + QSizePolicy::ControlTypes controlTypes() const; + Qt::Orientations expandingDirections() const; + QRect geometry() const; + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void invalidate(); + bool isEmpty() const; + QLayout* layout(); + QSize maximumSize() const; + int minimumHeightForWidth(int arg__1) const; + QSize minimumSize() const; + void setGeometry(const QRect& arg__1); + QSize sizeHint() const; + QSpacerItem* spacerItem(); + QWidget* widget(); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSPACERITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSpinBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSpinBox.cpp new file mode 100644 index 00000000..e5e05e12 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSpinBox.cpp @@ -0,0 +1,746 @@ +#include "qtscriptshell_QSpinBox.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QValidator::State) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QSpinBox::QtScriptShell_QSpinBox(QWidget* parent) + : QSpinBox(parent) {} + +QtScriptShell_QSpinBox::~QtScriptShell_QSpinBox() {} + +void QtScriptShell_QSpinBox::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QSpinBox::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::changeEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QSpinBox::changeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSpinBox::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::clear() +{ + QScriptValue _q_function = __qtscript_self.property("clear"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clear") & QScriptValue::QObjectMember)) { + QSpinBox::clear(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QSpinBox::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QSpinBox::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QSpinBox::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSpinBox::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QSpinBox::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QSpinBox::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSpinBox::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QSpinBox::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QSpinBox::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QSpinBox::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QSpinBox::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QSpinBox::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSpinBox::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSpinBox::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QSpinBox::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSpinBox::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSpinBox::fixup(QString& str) const +{ + QScriptValue _q_function = __qtscript_self.property("fixup"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fixup") & QScriptValue::QObjectMember)) { + QSpinBox::fixup(str); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, str)); + } +} + +void QtScriptShell_QSpinBox::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QSpinBox::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSpinBox::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QSpinBox::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QSpinBox::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QSpinBox::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSpinBox::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QSpinBox::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QSpinBox::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QSpinBox::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QSpinBox::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QSpinBox::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QSpinBox::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QSpinBox::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QSpinBox::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QSpinBox::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QSpinBox::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QSpinBox::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QSpinBox::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QSpinBox::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QSpinBox::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QSpinBox::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QSpinBox::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QSpinBox::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QSpinBox::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QSpinBox::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QSpinBox::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QSpinBox::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QSpinBox::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSpinBox::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QSpinBox::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QSpinBox::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QSpinBox::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSpinBox::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QSpinBox::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QSpinBox::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QSpinBox::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QSpinBox::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QSpinBox::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QSpinBox::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QSpinBox::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSpinBox::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QSpinBox::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSpinBox::stepBy(int steps) +{ + QScriptValue _q_function = __qtscript_self.property("stepBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("stepBy") & QScriptValue::QObjectMember)) { + QSpinBox::stepBy(steps); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, steps)); + } +} + +QAbstractSpinBox::StepEnabled QtScriptShell_QSpinBox::stepEnabled() const +{ + QScriptValue _q_function = __qtscript_self.property("stepEnabled"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("stepEnabled") & QScriptValue::QObjectMember)) { + return QSpinBox::stepEnabled(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSpinBox::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QSpinBox::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QString QtScriptShell_QSpinBox::textFromValue(int val) const +{ + QScriptValue _q_function = __qtscript_self.property("textFromValue"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("textFromValue") & QScriptValue::QObjectMember)) { + return QSpinBox::textFromValue(val); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, val))); + } +} + +void QtScriptShell_QSpinBox::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSpinBox::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QValidator::State QtScriptShell_QSpinBox::validate(QString& input, int& pos) const +{ + QScriptValue _q_function = __qtscript_self.property("validate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("validate") & QScriptValue::QObjectMember)) { + return QSpinBox::validate(input, pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, input) + << qScriptValueFromValue(_q_engine, pos))); + } +} + +int QtScriptShell_QSpinBox::valueFromText(const QString& text) const +{ + QScriptValue _q_function = __qtscript_self.property("valueFromText"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("valueFromText") & QScriptValue::QObjectMember)) { + return QSpinBox::valueFromText(text); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, text))); + } +} + +void QtScriptShell_QSpinBox::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QSpinBox::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSpinBox.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSpinBox.h new file mode 100644 index 00000000..6fb12b4c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSpinBox.h @@ -0,0 +1,68 @@ +#ifndef QTSCRIPTSHELL_QSPINBOX_H +#define QTSCRIPTSHELL_QSPINBOX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSpinBox : public QSpinBox +{ +public: + QtScriptShell_QSpinBox(QWidget* parent = 0); + ~QtScriptShell_QSpinBox(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* event); + void childEvent(QChildEvent* event); + void clear(); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fixup(QString& str) const; + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void stepBy(int steps); + QAbstractSpinBox::StepEnabled stepEnabled() const; + void tabletEvent(QTabletEvent* event); + QString textFromValue(int val) const; + void timerEvent(QTimerEvent* event); + QValidator::State validate(QString& input, int& pos) const; + int valueFromText(const QString& text) const; + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSPINBOX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplashScreen.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplashScreen.cpp new file mode 100644 index 00000000..6f50e574 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplashScreen.cpp @@ -0,0 +1,689 @@ +#include "qtscriptshell_QSplashScreen.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QSplashScreen::QtScriptShell_QSplashScreen(QWidget* parent, const QPixmap& pixmap, Qt::WindowFlags f) + : QSplashScreen(parent, pixmap, f) {} + +QtScriptShell_QSplashScreen::QtScriptShell_QSplashScreen(const QPixmap& pixmap, Qt::WindowFlags f) + : QSplashScreen(pixmap, f) {} + +QtScriptShell_QSplashScreen::~QtScriptShell_QSplashScreen() {} + +void QtScriptShell_QSplashScreen::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplashScreen::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QSplashScreen::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplashScreen::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplashScreen::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplashScreen::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QSplashScreen::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QSplashScreen::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSplashScreen::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplashScreen::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplashScreen::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplashScreen::drawContents(QPainter* painter) +{ + QScriptValue _q_function = __qtscript_self.property("drawContents"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawContents") & QScriptValue::QObjectMember)) { + QSplashScreen::drawContents(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QSplashScreen::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplashScreen::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSplashScreen::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSplashScreen::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QSplashScreen::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSplashScreen::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSplashScreen::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSplashScreen::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QSplashScreen::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QSplashScreen::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSplashScreen::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QSplashScreen::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QSplashScreen::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QSplashScreen::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QSplashScreen::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplashScreen::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QSplashScreen::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QSplashScreen::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QSplashScreen::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QSplashScreen::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QSplashScreen::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplashScreen::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplashScreen::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QSplashScreen::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QSplashScreen::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QSplashScreen::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QSplashScreen::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSplashScreen::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplashScreen::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplashScreen::mousePressEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::mousePressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QSplashScreen::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplashScreen::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSplashScreen::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QSplashScreen::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QSplashScreen::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QSplashScreen::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSplashScreen::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QSplashScreen::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QSplashScreen::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QSplashScreen::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QSplashScreen::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QSplashScreen::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSplashScreen::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_QSplashScreen::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QSplashScreen::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSplashScreen::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplashScreen::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplashScreen::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QSplashScreen::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplashScreen.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplashScreen.h new file mode 100644 index 00000000..85792a88 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplashScreen.h @@ -0,0 +1,65 @@ +#ifndef QTSCRIPTSHELL_QSPLASHSCREEN_H +#define QTSCRIPTSHELL_QSPLASHSCREEN_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSplashScreen : public QSplashScreen +{ +public: + QtScriptShell_QSplashScreen(QWidget* parent, const QPixmap& pixmap = QPixmap(), Qt::WindowFlags f = Qt::WindowFlags()); + QtScriptShell_QSplashScreen(const QPixmap& pixmap = QPixmap(), Qt::WindowFlags f = Qt::WindowFlags()); + ~QtScriptShell_QSplashScreen(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void drawContents(QPainter* painter); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* arg__1); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSPLASHSCREEN_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplitter.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplitter.cpp new file mode 100644 index 00000000..15aa777d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplitter.cpp @@ -0,0 +1,666 @@ +#include "qtscriptshell_QSplitter.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QSplitterHandle*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QSplitter::QtScriptShell_QSplitter(QWidget* parent) + : QSplitter(parent) {} + +QtScriptShell_QSplitter::QtScriptShell_QSplitter(Qt::Orientation arg__1, QWidget* parent) + : QSplitter(arg__1, parent) {} + +QtScriptShell_QSplitter::~QtScriptShell_QSplitter() {} + +void QtScriptShell_QSplitter::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QSplitter::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitter::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QSplitter::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QSplitter::childEvent(QChildEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSplitter::childEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QSplitter::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QSplitter::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitter::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QSplitter::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSplitterHandle* QtScriptShell_QSplitter::createHandle() +{ + QScriptValue _q_function = __qtscript_self.property("createHandle"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createHandle") & QScriptValue::QObjectMember)) { + return QSplitter::createHandle(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSplitter::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSplitter::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QSplitter::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QSplitter::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSplitter::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QSplitter::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitter::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QSplitter::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitter::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QSplitter::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitter::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QSplitter::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitter::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QSplitter::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSplitter::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSplitter::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QSplitter::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSplitter::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSplitter::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QSplitter::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSplitter::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QSplitter::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QSplitter::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QSplitter::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSplitter::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QSplitter::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QSplitter::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QSplitter::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QSplitter::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QSplitter::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitter::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QSplitter::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QSplitter::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QSplitter::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QSplitter::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QSplitter::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QSplitter::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QSplitter::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitter::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QSplitter::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitter::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QSplitter::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QSplitter::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QSplitter::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QSplitter::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QSplitter::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitter::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QSplitter::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitter::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QSplitter::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitter::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QSplitter::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitter::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QSplitter::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSplitter::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QSplitter::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QSplitter::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QSplitter::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSplitter::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QSplitter::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QSplitter::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QSplitter::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QSplitter::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QSplitter::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPainter* QtScriptShell_QSplitter::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QSplitter::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSplitter::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QSplitter::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitter::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QSplitter::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitter::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSplitter::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitter::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QSplitter::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplitter.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplitter.h new file mode 100644 index 00000000..da9af560 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplitter.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_QSPLITTER_H +#define QTSCRIPTSHELL_QSPLITTER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSplitter : public QSplitter +{ +public: + QtScriptShell_QSplitter(QWidget* parent = 0); + QtScriptShell_QSplitter(Qt::Orientation arg__1, QWidget* parent = 0); + ~QtScriptShell_QSplitter(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* arg__1); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + QSplitterHandle* createHandle(); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* arg__1); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* arg__1); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSPLITTER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplitterHandle.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplitterHandle.cpp new file mode 100644 index 00000000..6c901ad2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplitterHandle.cpp @@ -0,0 +1,660 @@ +#include "qtscriptshell_QSplitterHandle.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QSplitterHandle::QtScriptShell_QSplitterHandle(Qt::Orientation o, QSplitter* parent) + : QSplitterHandle(o, parent) {} + +QtScriptShell_QSplitterHandle::~QtScriptShell_QSplitterHandle() {} + +void QtScriptShell_QSplitterHandle::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitterHandle::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QSplitterHandle::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitterHandle::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitterHandle::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitterHandle::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QSplitterHandle::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QSplitterHandle::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSplitterHandle::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitterHandle::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitterHandle::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitterHandle::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitterHandle::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSplitterHandle::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSplitterHandle::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QSplitterHandle::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSplitterHandle::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSplitterHandle::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSplitterHandle::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QSplitterHandle::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QSplitterHandle::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSplitterHandle::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QSplitterHandle::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QSplitterHandle::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QSplitterHandle::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QSplitterHandle::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitterHandle::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QSplitterHandle::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QSplitterHandle::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QSplitterHandle::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QSplitterHandle::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QSplitterHandle::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitterHandle::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitterHandle::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QSplitterHandle::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QSplitterHandle::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QSplitterHandle::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QSplitterHandle::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSplitterHandle::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitterHandle::mouseMoveEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::mouseMoveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QSplitterHandle::mousePressEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::mousePressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QSplitterHandle::mouseReleaseEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::mouseReleaseEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QSplitterHandle::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSplitterHandle::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QSplitterHandle::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QSplitterHandle::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QSplitterHandle::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSplitterHandle::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QSplitterHandle::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QSplitterHandle::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QSplitterHandle::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPainter* QtScriptShell_QSplitterHandle::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QSplitterHandle::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QSplitterHandle::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitterHandle::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitterHandle::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSplitterHandle::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QSplitterHandle::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplitterHandle.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplitterHandle.h new file mode 100644 index 00000000..9bf1a99e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSplitterHandle.h @@ -0,0 +1,62 @@ +#ifndef QTSCRIPTSHELL_QSPLITTERHANDLE_H +#define QTSCRIPTSHELL_QSPLITTERHANDLE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSplitterHandle : public QSplitterHandle +{ +public: + QtScriptShell_QSplitterHandle(Qt::Orientation o, QSplitter* parent); + ~QtScriptShell_QSplitterHandle(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* arg__1); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* arg__1); + void mousePressEvent(QMouseEvent* arg__1); + void mouseReleaseEvent(QMouseEvent* arg__1); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* arg__1); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSPLITTERHANDLE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStackedLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStackedLayout.cpp new file mode 100644 index 00000000..fdbd3d07 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStackedLayout.cpp @@ -0,0 +1,340 @@ +#include "qtscriptshell_QStackedLayout.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QLayoutItem*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QSpacerItem*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QStackedLayout::QtScriptShell_QStackedLayout() + : QStackedLayout() {} + +QtScriptShell_QStackedLayout::QtScriptShell_QStackedLayout(QLayout* parentLayout) + : QStackedLayout(parentLayout) {} + +QtScriptShell_QStackedLayout::QtScriptShell_QStackedLayout(QWidget* parent) + : QStackedLayout(parent) {} + +QtScriptShell_QStackedLayout::~QtScriptShell_QStackedLayout() {} + +void QtScriptShell_QStackedLayout::addItem(QLayoutItem* item) +{ + QScriptValue _q_function = __qtscript_self.property("addItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("addItem") & QScriptValue::QObjectMember)) { + QStackedLayout::addItem(item); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, item)); + } +} + +void QtScriptShell_QStackedLayout::childEvent(QChildEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QStackedLayout::childEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QSizePolicy::ControlTypes QtScriptShell_QStackedLayout::controlTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("controlTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("controlTypes") & QScriptValue::QObjectMember)) { + return QStackedLayout::controlTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QStackedLayout::count() const +{ + QScriptValue _q_function = __qtscript_self.property("count"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("count") & QScriptValue::QObjectMember)) { + return QStackedLayout::count(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QStackedLayout::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QStackedLayout::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QStackedLayout::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QStackedLayout::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QStackedLayout::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QStackedLayout::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +Qt::Orientations QtScriptShell_QStackedLayout::expandingDirections() const +{ + QScriptValue _q_function = __qtscript_self.property("expandingDirections"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("expandingDirections") & QScriptValue::QObjectMember)) { + return QStackedLayout::expandingDirections(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QStackedLayout::geometry() const +{ + QScriptValue _q_function = __qtscript_self.property("geometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("geometry") & QScriptValue::QObjectMember)) { + return QStackedLayout::geometry(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QStackedLayout::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QStackedLayout::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QStackedLayout::heightForWidth(int width) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QStackedLayout::heightForWidth(width); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, width))); + } +} + +int QtScriptShell_QStackedLayout::indexOf(QWidget* arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("indexOf"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexOf") & QScriptValue::QObjectMember)) { + return QStackedLayout::indexOf(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QStackedLayout::invalidate() +{ + QScriptValue _q_function = __qtscript_self.property("invalidate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("invalidate") & QScriptValue::QObjectMember)) { + QStackedLayout::invalidate(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QStackedLayout::isEmpty() const +{ + QScriptValue _q_function = __qtscript_self.property("isEmpty"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isEmpty") & QScriptValue::QObjectMember)) { + return QStackedLayout::isEmpty(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayoutItem* QtScriptShell_QStackedLayout::itemAt(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("itemAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemAt") & QScriptValue::QObjectMember)) { + return QStackedLayout::itemAt(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QLayout* QtScriptShell_QStackedLayout::layout() +{ + QScriptValue _q_function = __qtscript_self.property("layout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("layout") & QScriptValue::QObjectMember)) { + return QStackedLayout::layout(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSize QtScriptShell_QStackedLayout::maximumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("maximumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("maximumSize") & QScriptValue::QObjectMember)) { + return QStackedLayout::maximumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QStackedLayout::minimumHeightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("minimumHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumHeightForWidth") & QScriptValue::QObjectMember)) { + return QStackedLayout::minimumHeightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QStackedLayout::minimumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("minimumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumSize") & QScriptValue::QObjectMember)) { + return QStackedLayout::minimumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QStackedLayout::setGeometry(const QRect& rect) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + QStackedLayout::setGeometry(rect); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect)); + } +} + +QSize QtScriptShell_QStackedLayout::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + return QStackedLayout::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSpacerItem* QtScriptShell_QStackedLayout::spacerItem() +{ + QScriptValue _q_function = __qtscript_self.property("spacerItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("spacerItem") & QScriptValue::QObjectMember)) { + return QStackedLayout::spacerItem(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayoutItem* QtScriptShell_QStackedLayout::takeAt(int arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("takeAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("takeAt") & QScriptValue::QObjectMember)) { + return QStackedLayout::takeAt(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QStackedLayout::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QStackedLayout::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStackedLayout.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStackedLayout.h new file mode 100644 index 00000000..ad66bb3e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStackedLayout.h @@ -0,0 +1,45 @@ +#ifndef QTSCRIPTSHELL_QSTACKEDLAYOUT_H +#define QTSCRIPTSHELL_QSTACKEDLAYOUT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStackedLayout : public QStackedLayout +{ +public: + QtScriptShell_QStackedLayout(); + QtScriptShell_QStackedLayout(QLayout* parentLayout); + QtScriptShell_QStackedLayout(QWidget* parent); + ~QtScriptShell_QStackedLayout(); + + void addItem(QLayoutItem* item); + void childEvent(QChildEvent* e); + QSizePolicy::ControlTypes controlTypes() const; + int count() const; + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + Qt::Orientations expandingDirections() const; + QRect geometry() const; + bool hasHeightForWidth() const; + int heightForWidth(int width) const; + int indexOf(QWidget* arg__1) const; + void invalidate(); + bool isEmpty() const; + QLayoutItem* itemAt(int arg__1) const; + QLayout* layout(); + QSize maximumSize() const; + int minimumHeightForWidth(int arg__1) const; + QSize minimumSize() const; + void setGeometry(const QRect& rect); + QSize sizeHint() const; + QSpacerItem* spacerItem(); + QLayoutItem* takeAt(int arg__1); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTACKEDLAYOUT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStackedWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStackedWidget.cpp new file mode 100644 index 00000000..2785f5ad --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStackedWidget.cpp @@ -0,0 +1,661 @@ +#include "qtscriptshell_QStackedWidget.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QStackedWidget::QtScriptShell_QStackedWidget(QWidget* parent) + : QStackedWidget(parent) {} + +QtScriptShell_QStackedWidget::~QtScriptShell_QStackedWidget() {} + +void QtScriptShell_QStackedWidget::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QStackedWidget::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QStackedWidget::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QStackedWidget::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QStackedWidget::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QStackedWidget::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QStackedWidget::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QStackedWidget::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QStackedWidget::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QStackedWidget::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QStackedWidget::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QStackedWidget::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QStackedWidget::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QStackedWidget::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QStackedWidget::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QStackedWidget::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QStackedWidget::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QStackedWidget::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QStackedWidget::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QStackedWidget::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QStackedWidget::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QStackedWidget::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QStackedWidget::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QStackedWidget::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QStackedWidget::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QStackedWidget::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QStackedWidget::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QStackedWidget::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QStackedWidget::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QStackedWidget::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QStackedWidget::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QStackedWidget::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QStackedWidget::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QStackedWidget::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QStackedWidget::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QStackedWidget::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QStackedWidget::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QStackedWidget::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QStackedWidget::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStackedWidget::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QStackedWidget::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStackedWidget.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStackedWidget.h new file mode 100644 index 00000000..965a876c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStackedWidget.h @@ -0,0 +1,62 @@ +#ifndef QTSCRIPTSHELL_QSTACKEDWIDGET_H +#define QTSCRIPTSHELL_QSTACKEDWIDGET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStackedWidget : public QStackedWidget +{ +public: + QtScriptShell_QStackedWidget(QWidget* parent = 0); + ~QtScriptShell_QStackedWidget(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTACKEDWIDGET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStandardItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStandardItem.cpp new file mode 100644 index 00000000..4d274155 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStandardItem.cpp @@ -0,0 +1,84 @@ +#include "qtscriptshell_QStandardItem.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QStandardItem*) + +QtScriptShell_QStandardItem::QtScriptShell_QStandardItem() + : QStandardItem() {} + +QtScriptShell_QStandardItem::QtScriptShell_QStandardItem(const QIcon& icon, const QString& text) + : QStandardItem(icon, text) {} + +QtScriptShell_QStandardItem::QtScriptShell_QStandardItem(const QStandardItem& other) + : QStandardItem(other) {} + +QtScriptShell_QStandardItem::QtScriptShell_QStandardItem(const QString& text) + : QStandardItem(text) {} + +QtScriptShell_QStandardItem::QtScriptShell_QStandardItem(int rows, int columns) + : QStandardItem(rows, columns) {} + +QtScriptShell_QStandardItem::~QtScriptShell_QStandardItem() {} + +QStandardItem* QtScriptShell_QStandardItem::clone() const +{ + QScriptValue _q_function = __qtscript_self.property("clone"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clone") & QScriptValue::QObjectMember)) { + return QStandardItem::clone(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QVariant QtScriptShell_QStandardItem::data(int role) const +{ + QScriptValue _q_function = __qtscript_self.property("data"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("data") & QScriptValue::QObjectMember)) { + return QStandardItem::data(role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, role))); + } +} + +void QtScriptShell_QStandardItem::setData(const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setData") & QScriptValue::QObjectMember)) { + QStandardItem::setData(value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role)); + } +} + +int QtScriptShell_QStandardItem::type() const +{ + QScriptValue _q_function = __qtscript_self.property("type"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("type") & QScriptValue::QObjectMember)) { + return QStandardItem::type(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStandardItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStandardItem.h new file mode 100644 index 00000000..5f86fe01 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStandardItem.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QSTANDARDITEM_H +#define QTSCRIPTSHELL_QSTANDARDITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStandardItem : public QStandardItem +{ +public: + QtScriptShell_QStandardItem(); + QtScriptShell_QStandardItem(const QIcon& icon, const QString& text); + QtScriptShell_QStandardItem(const QStandardItem& other); + QtScriptShell_QStandardItem(const QString& text); + QtScriptShell_QStandardItem(int rows, int columns = 1); + ~QtScriptShell_QStandardItem(); + + QStandardItem* clone() const; + QVariant data(int role = Qt::UserRole + 1) const; + void setData(const QVariant& value, int role = Qt::UserRole + 1); + int type() const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTANDARDITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStandardItemModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStandardItemModel.cpp new file mode 100644 index 00000000..947045f9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStandardItemModel.cpp @@ -0,0 +1,634 @@ +#include "qtscriptshell_QStandardItemModel.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(Qt::DropAction) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::Orientation) +template <> \ +struct QMetaTypeId< QMap > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QMap >("QMap")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QMimeData*) +template <> \ +struct QMetaTypeId< QHash > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QHash >("QHash")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QStandardItemModel::QtScriptShell_QStandardItemModel(QObject* parent) + : QStandardItemModel(parent) {} + +QtScriptShell_QStandardItemModel::QtScriptShell_QStandardItemModel(int rows, int columns, QObject* parent) + : QStandardItemModel(rows, columns, parent) {} + +QtScriptShell_QStandardItemModel::~QtScriptShell_QStandardItemModel() {} + +QModelIndex QtScriptShell_QStandardItemModel::buddy(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("buddy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("buddy") & QScriptValue::QObjectMember)) { + return QStandardItemModel::buddy(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QStandardItemModel::canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("canDropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canDropMimeData") & QScriptValue::QObjectMember)) { + return QStandardItemModel::canDropMimeData(data, action, row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action) + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QStandardItemModel::canFetchMore(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("canFetchMore"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canFetchMore") & QScriptValue::QObjectMember)) { + return QStandardItemModel::canFetchMore(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QStandardItemModel::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QStandardItemModel::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QStandardItemModel::columnCount(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("columnCount"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("columnCount") & QScriptValue::QObjectMember)) { + return QStandardItemModel::columnCount(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QStandardItemModel::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QStandardItemModel::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QStandardItemModel::data(const QModelIndex& index, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("data"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("data") & QScriptValue::QObjectMember)) { + return QStandardItemModel::data(index, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QStandardItemModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("dropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropMimeData") & QScriptValue::QObjectMember)) { + return QStandardItemModel::dropMimeData(data, action, row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action) + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QStandardItemModel::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QStandardItemModel::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QStandardItemModel::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QStandardItemModel::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QStandardItemModel::fetchMore(const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("fetchMore"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fetchMore") & QScriptValue::QObjectMember)) { + QStandardItemModel::fetchMore(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent)); + } +} + +Qt::ItemFlags QtScriptShell_QStandardItemModel::flags(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("flags"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("flags") & QScriptValue::QObjectMember)) { + return QStandardItemModel::flags(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QStandardItemModel::hasChildren(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("hasChildren"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasChildren") & QScriptValue::QObjectMember)) { + return QStandardItemModel::hasChildren(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +QVariant QtScriptShell_QStandardItemModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("headerData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("headerData") & QScriptValue::QObjectMember)) { + return QStandardItemModel::headerData(section, orientation, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, section) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, role))); + } +} + +QModelIndex QtScriptShell_QStandardItemModel::index(int row, int column, const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("index"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("index") & QScriptValue::QObjectMember)) { + return QStandardItemModel::index(row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QStandardItemModel::insertColumns(int column, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("insertColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertColumns") & QScriptValue::QObjectMember)) { + return QStandardItemModel::insertColumns(column, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QStandardItemModel::insertRows(int row, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("insertRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertRows") & QScriptValue::QObjectMember)) { + return QStandardItemModel::insertRows(row, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +QMap QtScriptShell_QStandardItemModel::itemData(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("itemData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemData") & QScriptValue::QObjectMember)) { + return QStandardItemModel::itemData(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QList QtScriptShell_QStandardItemModel::match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const +{ + QScriptValue _q_function = __qtscript_self.property("match"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("match") & QScriptValue::QObjectMember)) { + return QStandardItemModel::match(start, role, value, hits, flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, role) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, hits) + << qScriptValueFromValue(_q_engine, flags))); + } +} + +QMimeData* QtScriptShell_QStandardItemModel::mimeData(const QList& indexes) const +{ + QScriptValue _q_function = __qtscript_self.property("mimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeData") & QScriptValue::QObjectMember)) { + return QStandardItemModel::mimeData(indexes); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, indexes))); + } +} + +QStringList QtScriptShell_QStandardItemModel::mimeTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("mimeTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeTypes") & QScriptValue::QObjectMember)) { + return QStandardItemModel::mimeTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QStandardItemModel::moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) +{ + QScriptValue _q_function = __qtscript_self.property("moveColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveColumns") & QScriptValue::QObjectMember)) { + return QStandardItemModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceParent) + << qScriptValueFromValue(_q_engine, sourceColumn) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, destinationParent) + << qScriptValueFromValue(_q_engine, destinationChild))); + } +} + +bool QtScriptShell_QStandardItemModel::moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) +{ + QScriptValue _q_function = __qtscript_self.property("moveRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveRows") & QScriptValue::QObjectMember)) { + return QStandardItemModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceParent) + << qScriptValueFromValue(_q_engine, sourceRow) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, destinationParent) + << qScriptValueFromValue(_q_engine, destinationChild))); + } +} + +QModelIndex QtScriptShell_QStandardItemModel::parent(const QModelIndex& child) const +{ + QScriptValue _q_function = __qtscript_self.property("parent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("parent") & QScriptValue::QObjectMember)) { + return QStandardItemModel::parent(child); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, child))); + } +} + +bool QtScriptShell_QStandardItemModel::removeColumns(int column, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("removeColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeColumns") & QScriptValue::QObjectMember)) { + return QStandardItemModel::removeColumns(column, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QStandardItemModel::removeRows(int row, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("removeRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeRows") & QScriptValue::QObjectMember)) { + return QStandardItemModel::removeRows(row, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QStandardItemModel::revert() +{ + QScriptValue _q_function = __qtscript_self.property("revert"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("revert") & QScriptValue::QObjectMember)) { + QStandardItemModel::revert(); + } else { + _q_function.call(__qtscript_self); + } +} + +QHash QtScriptShell_QStandardItemModel::roleNames() const +{ + QScriptValue _q_function = __qtscript_self.property("roleNames"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("roleNames") & QScriptValue::QObjectMember)) { + return QStandardItemModel::roleNames(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QStandardItemModel::rowCount(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("rowCount"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowCount") & QScriptValue::QObjectMember)) { + return QStandardItemModel::rowCount(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QStandardItemModel::setData(const QModelIndex& index, const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setData") & QScriptValue::QObjectMember)) { + return QStandardItemModel::setData(index, value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QStandardItemModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setHeaderData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setHeaderData") & QScriptValue::QObjectMember)) { + return QStandardItemModel::setHeaderData(section, orientation, value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, section) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QStandardItemModel::setItemData(const QModelIndex& index, const QMap& roles) +{ + QScriptValue _q_function = __qtscript_self.property("setItemData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setItemData") & QScriptValue::QObjectMember)) { + return QStandardItemModel::setItemData(index, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, roles))); + } +} + +QModelIndex QtScriptShell_QStandardItemModel::sibling(int row, int column, const QModelIndex& idx) const +{ + QScriptValue _q_function = __qtscript_self.property("sibling"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sibling") & QScriptValue::QObjectMember)) { + return QStandardItemModel::sibling(row, column, idx); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, idx))); + } +} + +void QtScriptShell_QStandardItemModel::sort(int column, Qt::SortOrder order) +{ + QScriptValue _q_function = __qtscript_self.property("sort"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sort") & QScriptValue::QObjectMember)) { + QStandardItemModel::sort(column, order); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, order)); + } +} + +QSize QtScriptShell_QStandardItemModel::span(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("span"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("span") & QScriptValue::QObjectMember)) { + return QStandardItemModel::span(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QStandardItemModel::submit() +{ + QScriptValue _q_function = __qtscript_self.property("submit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("submit") & QScriptValue::QObjectMember)) { + return QStandardItemModel::submit(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::DropActions QtScriptShell_QStandardItemModel::supportedDragActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDragActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDragActions") & QScriptValue::QObjectMember)) { + return QStandardItemModel::supportedDragActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::DropActions QtScriptShell_QStandardItemModel::supportedDropActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDropActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDropActions") & QScriptValue::QObjectMember)) { + return QStandardItemModel::supportedDropActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QStandardItemModel::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QStandardItemModel::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStandardItemModel.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStandardItemModel.h new file mode 100644 index 00000000..68ace549 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStandardItemModel.h @@ -0,0 +1,59 @@ +#ifndef QTSCRIPTSHELL_QSTANDARDITEMMODEL_H +#define QTSCRIPTSHELL_QSTANDARDITEMMODEL_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStandardItemModel : public QStandardItemModel +{ +public: + QtScriptShell_QStandardItemModel(QObject* parent = 0); + QtScriptShell_QStandardItemModel(int rows, int columns, QObject* parent = 0); + ~QtScriptShell_QStandardItemModel(); + + QModelIndex buddy(const QModelIndex& index) const; + bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const; + bool canFetchMore(const QModelIndex& parent) const; + void childEvent(QChildEvent* event); + int columnCount(const QModelIndex& parent = QModelIndex()) const; + void customEvent(QEvent* event); + QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const; + bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fetchMore(const QModelIndex& parent); + Qt::ItemFlags flags(const QModelIndex& index) const; + bool hasChildren(const QModelIndex& parent = QModelIndex()) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; + QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const; + bool insertColumns(int column, int count, const QModelIndex& parent = QModelIndex()); + bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex()); + QMap itemData(const QModelIndex& index) const; + QList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const; + QMimeData* mimeData(const QList& indexes) const; + QStringList mimeTypes() const; + bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild); + bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild); + QModelIndex parent(const QModelIndex& child) const; + bool removeColumns(int column, int count, const QModelIndex& parent = QModelIndex()); + bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()); + void revert(); + QHash roleNames() const; + int rowCount(const QModelIndex& parent = QModelIndex()) const; + bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); + bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role = Qt::EditRole); + bool setItemData(const QModelIndex& index, const QMap& roles); + QModelIndex sibling(int row, int column, const QModelIndex& idx) const; + void sort(int column, Qt::SortOrder order = Qt::AscendingOrder); + QSize span(const QModelIndex& index) const; + bool submit(); + Qt::DropActions supportedDragActions() const; + Qt::DropActions supportedDropActions() const; + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTANDARDITEMMODEL_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStatusBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStatusBar.cpp new file mode 100644 index 00000000..7c85f85b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStatusBar.cpp @@ -0,0 +1,671 @@ +#include "qtscriptshell_QStatusBar.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QStatusBar::QtScriptShell_QStatusBar(QWidget* parent) + : QStatusBar(parent) {} + +QtScriptShell_QStatusBar::~QtScriptShell_QStatusBar() {} + +void QtScriptShell_QStatusBar::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QStatusBar::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QStatusBar::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QStatusBar::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QStatusBar::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QStatusBar::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QStatusBar::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QStatusBar::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QStatusBar::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QStatusBar::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QStatusBar::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QStatusBar::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QStatusBar::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QStatusBar::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QStatusBar::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QStatusBar::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QStatusBar::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QStatusBar::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QStatusBar::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QStatusBar::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QStatusBar::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QStatusBar::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QStatusBar::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QStatusBar::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QStatusBar::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QStatusBar::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QStatusBar::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QStatusBar::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QStatusBar::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QStatusBar::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QStatusBar::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QStatusBar::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QStatusBar::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QStatusBar::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QStatusBar::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QStatusBar::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QStatusBar::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QStatusBar::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QStatusBar::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QStatusBar::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QStatusBar::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QStatusBar::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QStatusBar::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QStatusBar::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QStatusBar::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QStatusBar::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QStatusBar::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QStatusBar::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QStatusBar::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QStatusBar::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QStatusBar::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QStatusBar::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QStatusBar::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QStatusBar::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QStatusBar::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QStatusBar::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QStatusBar::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QStatusBar::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QStatusBar::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QStatusBar::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QStatusBar::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPainter* QtScriptShell_QStatusBar::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QStatusBar::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QStatusBar::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QStatusBar::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QSize QtScriptShell_QStatusBar::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QStatusBar::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QStatusBar::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QStatusBar::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QStatusBar::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStatusBar::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QStatusBar::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStatusBar.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStatusBar.h new file mode 100644 index 00000000..90df7896 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStatusBar.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_QSTATUSBAR_H +#define QTSCRIPTSHELL_QSTATUSBAR_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStatusBar : public QStatusBar +{ +public: + QtScriptShell_QStatusBar(QWidget* parent = 0); + ~QtScriptShell_QStatusBar(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* arg__1); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* arg__1); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTATUSBAR_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStringListModel.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStringListModel.cpp new file mode 100644 index 00000000..04434cb1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStringListModel.cpp @@ -0,0 +1,590 @@ +#include "qtscriptshell_QStringListModel.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(Qt::DropAction) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(Qt::Orientation) +template <> \ +struct QMetaTypeId< QMap > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QMap >("QMap")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QMimeData*) +template <> \ +struct QMetaTypeId< QHash > \ +{ \ + enum { Defined = 1 }; \ + static int qt_metatype_id() \ + { \ + static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0); \ + if (!metatype_id.load()) \ + metatype_id.store(qRegisterMetaType< QHash >("QHash")); \ + return metatype_id.load(); \ + } \ +}; +Q_DECLARE_METATYPE(Qt::SortOrder) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QStringListModel::QtScriptShell_QStringListModel(QObject* parent) + : QStringListModel(parent) {} + +QtScriptShell_QStringListModel::QtScriptShell_QStringListModel(const QStringList& strings, QObject* parent) + : QStringListModel(strings, parent) {} + +QtScriptShell_QStringListModel::~QtScriptShell_QStringListModel() {} + +QModelIndex QtScriptShell_QStringListModel::buddy(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("buddy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("buddy") & QScriptValue::QObjectMember)) { + return QStringListModel::buddy(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QStringListModel::canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("canDropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canDropMimeData") & QScriptValue::QObjectMember)) { + return QStringListModel::canDropMimeData(data, action, row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action) + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QStringListModel::canFetchMore(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("canFetchMore"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canFetchMore") & QScriptValue::QObjectMember)) { + return QStringListModel::canFetchMore(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QStringListModel::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QStringListModel::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStringListModel::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QStringListModel::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QStringListModel::data(const QModelIndex& index, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("data"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("data") & QScriptValue::QObjectMember)) { + return QStringListModel::data(index, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QStringListModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("dropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropMimeData") & QScriptValue::QObjectMember)) { + return QStringListModel::dropMimeData(data, action, row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action) + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QStringListModel::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QStringListModel::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QStringListModel::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QStringListModel::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QStringListModel::fetchMore(const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("fetchMore"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fetchMore") & QScriptValue::QObjectMember)) { + QStringListModel::fetchMore(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent)); + } +} + +Qt::ItemFlags QtScriptShell_QStringListModel::flags(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("flags"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("flags") & QScriptValue::QObjectMember)) { + return QStringListModel::flags(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QVariant QtScriptShell_QStringListModel::headerData(int section, Qt::Orientation orientation, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("headerData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("headerData") & QScriptValue::QObjectMember)) { + return QStringListModel::headerData(section, orientation, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, section) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, role))); + } +} + +QModelIndex QtScriptShell_QStringListModel::index(int row, int column, const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("index"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("index") & QScriptValue::QObjectMember)) { + return QStringListModel::index(row, column, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QStringListModel::insertColumns(int column, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("insertColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertColumns") & QScriptValue::QObjectMember)) { + return QStringListModel::insertColumns(column, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QStringListModel::insertRows(int row, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("insertRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertRows") & QScriptValue::QObjectMember)) { + return QStringListModel::insertRows(row, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +QMap QtScriptShell_QStringListModel::itemData(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("itemData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemData") & QScriptValue::QObjectMember)) { + return QStringListModel::itemData(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QList QtScriptShell_QStringListModel::match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const +{ + QScriptValue _q_function = __qtscript_self.property("match"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("match") & QScriptValue::QObjectMember)) { + return QStringListModel::match(start, role, value, hits, flags); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast >(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, role) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, hits) + << qScriptValueFromValue(_q_engine, flags))); + } +} + +QMimeData* QtScriptShell_QStringListModel::mimeData(const QList& indexes) const +{ + QScriptValue _q_function = __qtscript_self.property("mimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeData") & QScriptValue::QObjectMember)) { + return QStringListModel::mimeData(indexes); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, indexes))); + } +} + +QStringList QtScriptShell_QStringListModel::mimeTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("mimeTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeTypes") & QScriptValue::QObjectMember)) { + return QStringListModel::mimeTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QStringListModel::moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild) +{ + QScriptValue _q_function = __qtscript_self.property("moveColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveColumns") & QScriptValue::QObjectMember)) { + return QStringListModel::moveColumns(sourceParent, sourceColumn, count, destinationParent, destinationChild); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceParent) + << qScriptValueFromValue(_q_engine, sourceColumn) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, destinationParent) + << qScriptValueFromValue(_q_engine, destinationChild))); + } +} + +bool QtScriptShell_QStringListModel::moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild) +{ + QScriptValue _q_function = __qtscript_self.property("moveRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveRows") & QScriptValue::QObjectMember)) { + return QStringListModel::moveRows(sourceParent, sourceRow, count, destinationParent, destinationChild); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, sourceParent) + << qScriptValueFromValue(_q_engine, sourceRow) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, destinationParent) + << qScriptValueFromValue(_q_engine, destinationChild))); + } +} + +bool QtScriptShell_QStringListModel::removeColumns(int column, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("removeColumns"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeColumns") & QScriptValue::QObjectMember)) { + return QStringListModel::removeColumns(column, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QStringListModel::removeRows(int row, int count, const QModelIndex& parent) +{ + QScriptValue _q_function = __qtscript_self.property("removeRows"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("removeRows") & QScriptValue::QObjectMember)) { + return QStringListModel::removeRows(row, count, parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, count) + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QStringListModel::revert() +{ + QScriptValue _q_function = __qtscript_self.property("revert"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("revert") & QScriptValue::QObjectMember)) { + QStringListModel::revert(); + } else { + _q_function.call(__qtscript_self); + } +} + +QHash QtScriptShell_QStringListModel::roleNames() const +{ + QScriptValue _q_function = __qtscript_self.property("roleNames"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("roleNames") & QScriptValue::QObjectMember)) { + return QStringListModel::roleNames(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QStringListModel::rowCount(const QModelIndex& parent) const +{ + QScriptValue _q_function = __qtscript_self.property("rowCount"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowCount") & QScriptValue::QObjectMember)) { + return QStringListModel::rowCount(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +bool QtScriptShell_QStringListModel::setData(const QModelIndex& index, const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setData") & QScriptValue::QObjectMember)) { + return QStringListModel::setData(index, value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QStringListModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role) +{ + QScriptValue _q_function = __qtscript_self.property("setHeaderData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setHeaderData") & QScriptValue::QObjectMember)) { + return QStringListModel::setHeaderData(section, orientation, value, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, section) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, role))); + } +} + +bool QtScriptShell_QStringListModel::setItemData(const QModelIndex& index, const QMap& roles) +{ + QScriptValue _q_function = __qtscript_self.property("setItemData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setItemData") & QScriptValue::QObjectMember)) { + return QStringListModel::setItemData(index, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, roles))); + } +} + +QModelIndex QtScriptShell_QStringListModel::sibling(int row, int column, const QModelIndex& idx) const +{ + QScriptValue _q_function = __qtscript_self.property("sibling"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sibling") & QScriptValue::QObjectMember)) { + return QStringListModel::sibling(row, column, idx); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, idx))); + } +} + +void QtScriptShell_QStringListModel::sort(int column, Qt::SortOrder order) +{ + QScriptValue _q_function = __qtscript_self.property("sort"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sort") & QScriptValue::QObjectMember)) { + QStringListModel::sort(column, order); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, order)); + } +} + +QSize QtScriptShell_QStringListModel::span(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("span"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("span") & QScriptValue::QObjectMember)) { + return QStringListModel::span(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QStringListModel::submit() +{ + QScriptValue _q_function = __qtscript_self.property("submit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("submit") & QScriptValue::QObjectMember)) { + return QStringListModel::submit(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::DropActions QtScriptShell_QStringListModel::supportedDragActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDragActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDragActions") & QScriptValue::QObjectMember)) { + return QStringListModel::supportedDragActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::DropActions QtScriptShell_QStringListModel::supportedDropActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDropActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDropActions") & QScriptValue::QObjectMember)) { + return QStringListModel::supportedDropActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QStringListModel::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QStringListModel::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStringListModel.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStringListModel.h new file mode 100644 index 00000000..29f8da96 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStringListModel.h @@ -0,0 +1,56 @@ +#ifndef QTSCRIPTSHELL_QSTRINGLISTMODEL_H +#define QTSCRIPTSHELL_QSTRINGLISTMODEL_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStringListModel : public QStringListModel +{ +public: + QtScriptShell_QStringListModel(QObject* parent = 0); + QtScriptShell_QStringListModel(const QStringList& strings, QObject* parent = 0); + ~QtScriptShell_QStringListModel(); + + QModelIndex buddy(const QModelIndex& index) const; + bool canDropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) const; + bool canFetchMore(const QModelIndex& parent) const; + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + QVariant data(const QModelIndex& index, int role) const; + bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fetchMore(const QModelIndex& parent); + Qt::ItemFlags flags(const QModelIndex& index) const; + QVariant headerData(int section, Qt::Orientation orientation, int role) const; + QModelIndex index(int row, int column, const QModelIndex& parent) const; + bool insertColumns(int column, int count, const QModelIndex& parent); + bool insertRows(int row, int count, const QModelIndex& parent = QModelIndex()); + QMap itemData(const QModelIndex& index) const; + QList match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const; + QMimeData* mimeData(const QList& indexes) const; + QStringList mimeTypes() const; + bool moveColumns(const QModelIndex& sourceParent, int sourceColumn, int count, const QModelIndex& destinationParent, int destinationChild); + bool moveRows(const QModelIndex& sourceParent, int sourceRow, int count, const QModelIndex& destinationParent, int destinationChild); + bool removeColumns(int column, int count, const QModelIndex& parent); + bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex()); + void revert(); + QHash roleNames() const; + int rowCount(const QModelIndex& parent = QModelIndex()) const; + bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole); + bool setHeaderData(int section, Qt::Orientation orientation, const QVariant& value, int role); + bool setItemData(const QModelIndex& index, const QMap& roles); + QModelIndex sibling(int row, int column, const QModelIndex& idx) const; + void sort(int column, Qt::SortOrder order = Qt::AscendingOrder); + QSize span(const QModelIndex& index) const; + bool submit(); + Qt::DropActions supportedDragActions() const; + Qt::DropActions supportedDropActions() const; + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTRINGLISTMODEL_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyle.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyle.cpp new file mode 100644 index 00000000..ab24e4e4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyle.cpp @@ -0,0 +1,473 @@ +#include "qtscriptshell_QStyle.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QStyle::ComplexControl) +Q_DECLARE_METATYPE(const QStyleOptionComplex*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(const QWidget*) +Q_DECLARE_METATYPE(QStyle::ControlElement) +Q_DECLARE_METATYPE(const QStyleOption*) +Q_DECLARE_METATYPE(QPalette::ColorRole) +Q_DECLARE_METATYPE(QStyle::PrimitiveElement) +Q_DECLARE_METATYPE(QIcon::Mode) +Q_DECLARE_METATYPE(QStyle::SubControl) +Q_DECLARE_METATYPE(QSizePolicy::ControlType) +Q_DECLARE_METATYPE(Qt::Orientation) +Q_DECLARE_METATYPE(QStyle::PixelMetric) +Q_DECLARE_METATYPE(QApplication*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QStyle::ContentsType) +Q_DECLARE_METATYPE(QStyle::StandardPixmap) +Q_DECLARE_METATYPE(QStyle::StyleHint) +Q_DECLARE_METATYPE(QStyleHintReturn*) +Q_DECLARE_METATYPE(QStyle::SubElement) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QStyle::QtScriptShell_QStyle() + : QStyle() {} + +QtScriptShell_QStyle::~QtScriptShell_QStyle() {} + +void QtScriptShell_QStyle::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QStyle::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStyle::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QStyle::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStyle::drawComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QPainter* p, const QWidget* widget) const +{ + QScriptValue _q_function = __qtscript_self.property("drawComplexControl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawComplexControl") & QScriptValue::QObjectMember)) { + qFatal("QStyle::drawComplexControl() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, cc) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, p) + << qScriptValueFromValue(_q_engine, const_cast(widget))); + } +} + +void QtScriptShell_QStyle::drawControl(QStyle::ControlElement element, const QStyleOption* opt, QPainter* p, const QWidget* w) const +{ + QScriptValue _q_function = __qtscript_self.property("drawControl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawControl") & QScriptValue::QObjectMember)) { + qFatal("QStyle::drawControl() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, element) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, p) + << qScriptValueFromValue(_q_engine, const_cast(w))); + } +} + +void QtScriptShell_QStyle::drawItemPixmap(QPainter* painter, const QRect& rect, int alignment, const QPixmap& pixmap) const +{ + QScriptValue _q_function = __qtscript_self.property("drawItemPixmap"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawItemPixmap") & QScriptValue::QObjectMember)) { + QStyle::drawItemPixmap(painter, rect, alignment, pixmap); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, alignment) + << qScriptValueFromValue(_q_engine, pixmap)); + } +} + +void QtScriptShell_QStyle::drawItemText(QPainter* painter, const QRect& rect, int flags, const QPalette& pal, bool enabled, const QString& text, QPalette::ColorRole textRole) const +{ + QScriptValue _q_function = __qtscript_self.property("drawItemText"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawItemText") & QScriptValue::QObjectMember)) { + QStyle::drawItemText(painter, rect, flags, pal, enabled, text, textRole); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, flags) + << qScriptValueFromValue(_q_engine, pal) + << qScriptValueFromValue(_q_engine, enabled) + << qScriptValueFromValue(_q_engine, text) + << qScriptValueFromValue(_q_engine, textRole)); + } +} + +void QtScriptShell_QStyle::drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOption* opt, QPainter* p, const QWidget* w) const +{ + QScriptValue _q_function = __qtscript_self.property("drawPrimitive"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawPrimitive") & QScriptValue::QObjectMember)) { + qFatal("QStyle::drawPrimitive() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pe) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, p) + << qScriptValueFromValue(_q_engine, const_cast(w))); + } +} + +bool QtScriptShell_QStyle::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QStyle::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QStyle::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QStyle::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +QPixmap QtScriptShell_QStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap& pixmap, const QStyleOption* opt) const +{ + QScriptValue _q_function = __qtscript_self.property("generatedIconPixmap"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("generatedIconPixmap") & QScriptValue::QObjectMember)) { + qFatal("QStyle::generatedIconPixmap() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, iconMode) + << qScriptValueFromValue(_q_engine, pixmap) + << qScriptValueFromValue(_q_engine, const_cast(opt)))); + } +} + +QStyle::SubControl QtScriptShell_QStyle::hitTestComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, const QPoint& pt, const QWidget* widget) const +{ + QScriptValue _q_function = __qtscript_self.property("hitTestComplexControl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hitTestComplexControl") & QScriptValue::QObjectMember)) { + qFatal("QStyle::hitTestComplexControl() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, cc) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, pt) + << qScriptValueFromValue(_q_engine, const_cast(widget)))); + } +} + +QRect QtScriptShell_QStyle::itemPixmapRect(const QRect& r, int flags, const QPixmap& pixmap) const +{ + QScriptValue _q_function = __qtscript_self.property("itemPixmapRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemPixmapRect") & QScriptValue::QObjectMember)) { + return QStyle::itemPixmapRect(r, flags, pixmap); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, r) + << qScriptValueFromValue(_q_engine, flags) + << qScriptValueFromValue(_q_engine, pixmap))); + } +} + +int QtScriptShell_QStyle::layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption* option, const QWidget* widget) const +{ + QScriptValue _q_function = __qtscript_self.property("layoutSpacing"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("layoutSpacing") & QScriptValue::QObjectMember)) { + qFatal("QStyle::layoutSpacing() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, control1) + << qScriptValueFromValue(_q_engine, control2) + << qScriptValueFromValue(_q_engine, orientation) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, const_cast(widget)))); + } +} + +int QtScriptShell_QStyle::pixelMetric(QStyle::PixelMetric metric, const QStyleOption* option, const QWidget* widget) const +{ + QScriptValue _q_function = __qtscript_self.property("pixelMetric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("pixelMetric") & QScriptValue::QObjectMember)) { + qFatal("QStyle::pixelMetric() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, metric) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, const_cast(widget)))); + } +} + +void QtScriptShell_QStyle::polish(QApplication* application) +{ + QScriptValue _q_function = __qtscript_self.property("polish"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("polish") & QScriptValue::QObjectMember)) { + QStyle::polish(application); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, application)); + } +} + +void QtScriptShell_QStyle::polish(QPalette& palette) +{ + QScriptValue _q_function = __qtscript_self.property("polish"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("polish") & QScriptValue::QObjectMember)) { + QStyle::polish(palette); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, palette)); + } +} + +void QtScriptShell_QStyle::polish(QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("polish"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("polish") & QScriptValue::QObjectMember)) { + QStyle::polish(widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, widget)); + } +} + +QSize QtScriptShell_QStyle::sizeFromContents(QStyle::ContentsType ct, const QStyleOption* opt, const QSize& contentsSize, const QWidget* w) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeFromContents"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeFromContents") & QScriptValue::QObjectMember)) { + qFatal("QStyle::sizeFromContents() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ct) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, contentsSize) + << qScriptValueFromValue(_q_engine, const_cast(w)))); + } +} + +QIcon QtScriptShell_QStyle::standardIcon(QStyle::StandardPixmap standardIcon, const QStyleOption* option, const QWidget* widget) const +{ + QScriptValue _q_function = __qtscript_self.property("standardIcon"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("standardIcon") & QScriptValue::QObjectMember)) { + qFatal("QStyle::standardIcon() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, standardIcon) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, const_cast(widget)))); + } +} + +QPalette QtScriptShell_QStyle::standardPalette() const +{ + QScriptValue _q_function = __qtscript_self.property("standardPalette"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("standardPalette") & QScriptValue::QObjectMember)) { + return QStyle::standardPalette(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QPixmap QtScriptShell_QStyle::standardPixmap(QStyle::StandardPixmap standardPixmap, const QStyleOption* opt, const QWidget* widget) const +{ + QScriptValue _q_function = __qtscript_self.property("standardPixmap"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("standardPixmap") & QScriptValue::QObjectMember)) { + qFatal("QStyle::standardPixmap() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, standardPixmap) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, const_cast(widget)))); + } +} + +int QtScriptShell_QStyle::styleHint(QStyle::StyleHint stylehint, const QStyleOption* opt, const QWidget* widget, QStyleHintReturn* returnData) const +{ + QScriptValue _q_function = __qtscript_self.property("styleHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("styleHint") & QScriptValue::QObjectMember)) { + qFatal("QStyle::styleHint() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, stylehint) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, const_cast(widget)) + << qScriptValueFromValue(_q_engine, returnData))); + } +} + +QRect QtScriptShell_QStyle::subControlRect(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QStyle::SubControl sc, const QWidget* widget) const +{ + QScriptValue _q_function = __qtscript_self.property("subControlRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("subControlRect") & QScriptValue::QObjectMember)) { + qFatal("QStyle::subControlRect() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, cc) + << qScriptValueFromValue(_q_engine, const_cast(opt)) + << qScriptValueFromValue(_q_engine, sc) + << qScriptValueFromValue(_q_engine, const_cast(widget)))); + } +} + +QRect QtScriptShell_QStyle::subElementRect(QStyle::SubElement subElement, const QStyleOption* option, const QWidget* widget) const +{ + QScriptValue _q_function = __qtscript_self.property("subElementRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("subElementRect") & QScriptValue::QObjectMember)) { + qFatal("QStyle::subElementRect() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, subElement) + << qScriptValueFromValue(_q_engine, const_cast(option)) + << qScriptValueFromValue(_q_engine, const_cast(widget)))); + } +} + +void QtScriptShell_QStyle::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QStyle::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStyle::unpolish(QApplication* application) +{ + QScriptValue _q_function = __qtscript_self.property("unpolish"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("unpolish") & QScriptValue::QObjectMember)) { + QStyle::unpolish(application); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, application)); + } +} + +void QtScriptShell_QStyle::unpolish(QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("unpolish"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("unpolish") & QScriptValue::QObjectMember)) { + QStyle::unpolish(widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, widget)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyle.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyle.h new file mode 100644 index 00000000..42ffdac9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyle.h @@ -0,0 +1,46 @@ +#ifndef QTSCRIPTSHELL_QSTYLE_H +#define QTSCRIPTSHELL_QSTYLE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyle : public QStyle +{ +public: + QtScriptShell_QStyle(); + ~QtScriptShell_QStyle(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + void drawComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QPainter* p, const QWidget* widget = 0) const; + void drawControl(QStyle::ControlElement element, const QStyleOption* opt, QPainter* p, const QWidget* w = 0) const; + void drawItemPixmap(QPainter* painter, const QRect& rect, int alignment, const QPixmap& pixmap) const; + void drawItemText(QPainter* painter, const QRect& rect, int flags, const QPalette& pal, bool enabled, const QString& text, QPalette::ColorRole textRole = QPalette::NoRole) const; + void drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOption* opt, QPainter* p, const QWidget* w = 0) const; + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap& pixmap, const QStyleOption* opt) const; + QStyle::SubControl hitTestComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, const QPoint& pt, const QWidget* widget = 0) const; + QRect itemPixmapRect(const QRect& r, int flags, const QPixmap& pixmap) const; + int layoutSpacing(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption* option = 0, const QWidget* widget = 0) const; + int pixelMetric(QStyle::PixelMetric metric, const QStyleOption* option = 0, const QWidget* widget = 0) const; + void polish(QApplication* application); + void polish(QPalette& palette); + void polish(QWidget* widget); + QSize sizeFromContents(QStyle::ContentsType ct, const QStyleOption* opt, const QSize& contentsSize, const QWidget* w = 0) const; + QIcon standardIcon(QStyle::StandardPixmap standardIcon, const QStyleOption* option = 0, const QWidget* widget = 0) const; + QPalette standardPalette() const; + QPixmap standardPixmap(QStyle::StandardPixmap standardPixmap, const QStyleOption* opt = 0, const QWidget* widget = 0) const; + int styleHint(QStyle::StyleHint stylehint, const QStyleOption* opt = 0, const QWidget* widget = 0, QStyleHintReturn* returnData = 0) const; + QRect subControlRect(QStyle::ComplexControl cc, const QStyleOptionComplex* opt, QStyle::SubControl sc, const QWidget* widget = 0) const; + QRect subElementRect(QStyle::SubElement subElement, const QStyleOption* option, const QWidget* widget = 0) const; + void timerEvent(QTimerEvent* event); + void unpolish(QApplication* application); + void unpolish(QWidget* widget); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleFactory.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleFactory.cpp new file mode 100644 index 00000000..08660cc8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleFactory.cpp @@ -0,0 +1,15 @@ +#include "qtscriptshell_QStyleFactory.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleFactory::QtScriptShell_QStyleFactory() + : QStyleFactory() {} + +QtScriptShell_QStyleFactory::~QtScriptShell_QStyleFactory() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleFactory.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleFactory.h new file mode 100644 index 00000000..1f4742f2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleFactory.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QSTYLEFACTORY_H +#define QTSCRIPTSHELL_QSTYLEFACTORY_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleFactory : public QStyleFactory +{ +public: + QtScriptShell_QStyleFactory(); + ~QtScriptShell_QStyleFactory(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEFACTORY_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturn.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturn.cpp new file mode 100644 index 00000000..4165f8aa --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturn.cpp @@ -0,0 +1,13 @@ +#include "qtscriptshell_QStyleHintReturn.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleHintReturn::QtScriptShell_QStyleHintReturn(int version, int type) + : QStyleHintReturn(version, type) {} + +QtScriptShell_QStyleHintReturn::~QtScriptShell_QStyleHintReturn() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturn.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturn.h new file mode 100644 index 00000000..e7ab2c9c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturn.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QSTYLEHINTRETURN_H +#define QTSCRIPTSHELL_QSTYLEHINTRETURN_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleHintReturn : public QStyleHintReturn +{ +public: + QtScriptShell_QStyleHintReturn(int version = QStyleOption::Version, int type = SH_Default); + ~QtScriptShell_QStyleHintReturn(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEHINTRETURN_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturnMask.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturnMask.cpp new file mode 100644 index 00000000..14e800c6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturnMask.cpp @@ -0,0 +1,13 @@ +#include "qtscriptshell_QStyleHintReturnMask.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleHintReturnMask::QtScriptShell_QStyleHintReturnMask() + : QStyleHintReturnMask() {} + +QtScriptShell_QStyleHintReturnMask::~QtScriptShell_QStyleHintReturnMask() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturnMask.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturnMask.h new file mode 100644 index 00000000..bfc550c2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturnMask.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QSTYLEHINTRETURNMASK_H +#define QTSCRIPTSHELL_QSTYLEHINTRETURNMASK_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleHintReturnMask : public QStyleHintReturnMask +{ +public: + QtScriptShell_QStyleHintReturnMask(); + ~QtScriptShell_QStyleHintReturnMask(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEHINTRETURNMASK_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturnVariant.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturnVariant.cpp new file mode 100644 index 00000000..fbd17dcc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturnVariant.cpp @@ -0,0 +1,13 @@ +#include "qtscriptshell_QStyleHintReturnVariant.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleHintReturnVariant::QtScriptShell_QStyleHintReturnVariant() + : QStyleHintReturnVariant() {} + +QtScriptShell_QStyleHintReturnVariant::~QtScriptShell_QStyleHintReturnVariant() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturnVariant.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturnVariant.h new file mode 100644 index 00000000..cd6c92c1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleHintReturnVariant.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QSTYLEHINTRETURNVARIANT_H +#define QTSCRIPTSHELL_QSTYLEHINTRETURNVARIANT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleHintReturnVariant : public QStyleHintReturnVariant +{ +public: + QtScriptShell_QStyleHintReturnVariant(); + ~QtScriptShell_QStyleHintReturnVariant(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEHINTRETURNVARIANT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOption.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOption.cpp new file mode 100644 index 00000000..ef0af56b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOption.cpp @@ -0,0 +1,18 @@ +#include "qtscriptshell_QStyleOption.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOption::QtScriptShell_QStyleOption(const QStyleOption& other) + : QStyleOption(other) {} + +QtScriptShell_QStyleOption::QtScriptShell_QStyleOption(int version, int type) + : QStyleOption(version, type) {} + +QtScriptShell_QStyleOption::~QtScriptShell_QStyleOption() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOption.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOption.h new file mode 100644 index 00000000..a28b2c19 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOption.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTION_H +#define QTSCRIPTSHELL_QSTYLEOPTION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOption : public QStyleOption +{ +public: + QtScriptShell_QStyleOption(const QStyleOption& other); + QtScriptShell_QStyleOption(int version = QStyleOption::Version, int type = SO_Default); + ~QtScriptShell_QStyleOption(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionButton.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionButton.cpp new file mode 100644 index 00000000..6e34fe1d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionButton.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionButton.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionButton::QtScriptShell_QStyleOptionButton() + : QStyleOptionButton() {} + +QtScriptShell_QStyleOptionButton::QtScriptShell_QStyleOptionButton(const QStyleOptionButton& other) + : QStyleOptionButton(other) {} + +QtScriptShell_QStyleOptionButton::QtScriptShell_QStyleOptionButton(int version) + : QStyleOptionButton(version) {} + +QtScriptShell_QStyleOptionButton::~QtScriptShell_QStyleOptionButton() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionButton.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionButton.h new file mode 100644 index 00000000..572a6160 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionButton.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONBUTTON_H +#define QTSCRIPTSHELL_QSTYLEOPTIONBUTTON_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionButton : public QStyleOptionButton +{ +public: + QtScriptShell_QStyleOptionButton(); + QtScriptShell_QStyleOptionButton(const QStyleOptionButton& other); + QtScriptShell_QStyleOptionButton(int version); + ~QtScriptShell_QStyleOptionButton(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONBUTTON_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionComboBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionComboBox.cpp new file mode 100644 index 00000000..3eed2e5c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionComboBox.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionComboBox.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionComboBox::QtScriptShell_QStyleOptionComboBox() + : QStyleOptionComboBox() {} + +QtScriptShell_QStyleOptionComboBox::QtScriptShell_QStyleOptionComboBox(const QStyleOptionComboBox& other) + : QStyleOptionComboBox(other) {} + +QtScriptShell_QStyleOptionComboBox::QtScriptShell_QStyleOptionComboBox(int version) + : QStyleOptionComboBox(version) {} + +QtScriptShell_QStyleOptionComboBox::~QtScriptShell_QStyleOptionComboBox() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionComboBox.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionComboBox.h new file mode 100644 index 00000000..4b3fde62 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionComboBox.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONCOMBOBOX_H +#define QTSCRIPTSHELL_QSTYLEOPTIONCOMBOBOX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionComboBox : public QStyleOptionComboBox +{ +public: + QtScriptShell_QStyleOptionComboBox(); + QtScriptShell_QStyleOptionComboBox(const QStyleOptionComboBox& other); + QtScriptShell_QStyleOptionComboBox(int version); + ~QtScriptShell_QStyleOptionComboBox(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONCOMBOBOX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionComplex.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionComplex.cpp new file mode 100644 index 00000000..ac7aa695 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionComplex.cpp @@ -0,0 +1,18 @@ +#include "qtscriptshell_QStyleOptionComplex.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionComplex::QtScriptShell_QStyleOptionComplex(const QStyleOptionComplex& other) + : QStyleOptionComplex(other) {} + +QtScriptShell_QStyleOptionComplex::QtScriptShell_QStyleOptionComplex(int version, int type) + : QStyleOptionComplex(version, type) {} + +QtScriptShell_QStyleOptionComplex::~QtScriptShell_QStyleOptionComplex() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionComplex.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionComplex.h new file mode 100644 index 00000000..3681c303 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionComplex.h @@ -0,0 +1,20 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONCOMPLEX_H +#define QTSCRIPTSHELL_QSTYLEOPTIONCOMPLEX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionComplex : public QStyleOptionComplex +{ +public: + QtScriptShell_QStyleOptionComplex(const QStyleOptionComplex& other); + QtScriptShell_QStyleOptionComplex(int version = QStyleOptionComplex::Version, int type = SO_Complex); + ~QtScriptShell_QStyleOptionComplex(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONCOMPLEX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionDockWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionDockWidget.cpp new file mode 100644 index 00000000..63827def --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionDockWidget.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionDockWidget.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionDockWidget::QtScriptShell_QStyleOptionDockWidget() + : QStyleOptionDockWidget() {} + +QtScriptShell_QStyleOptionDockWidget::QtScriptShell_QStyleOptionDockWidget(const QStyleOptionDockWidget& other) + : QStyleOptionDockWidget(other) {} + +QtScriptShell_QStyleOptionDockWidget::QtScriptShell_QStyleOptionDockWidget(int version) + : QStyleOptionDockWidget(version) {} + +QtScriptShell_QStyleOptionDockWidget::~QtScriptShell_QStyleOptionDockWidget() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionDockWidget.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionDockWidget.h new file mode 100644 index 00000000..9d167761 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionDockWidget.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONDOCKWIDGET_H +#define QTSCRIPTSHELL_QSTYLEOPTIONDOCKWIDGET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionDockWidget : public QStyleOptionDockWidget +{ +public: + QtScriptShell_QStyleOptionDockWidget(); + QtScriptShell_QStyleOptionDockWidget(const QStyleOptionDockWidget& other); + QtScriptShell_QStyleOptionDockWidget(int version); + ~QtScriptShell_QStyleOptionDockWidget(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONDOCKWIDGET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionFocusRect.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionFocusRect.cpp new file mode 100644 index 00000000..783786f0 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionFocusRect.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionFocusRect.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionFocusRect::QtScriptShell_QStyleOptionFocusRect() + : QStyleOptionFocusRect() {} + +QtScriptShell_QStyleOptionFocusRect::QtScriptShell_QStyleOptionFocusRect(const QStyleOptionFocusRect& other) + : QStyleOptionFocusRect(other) {} + +QtScriptShell_QStyleOptionFocusRect::QtScriptShell_QStyleOptionFocusRect(int version) + : QStyleOptionFocusRect(version) {} + +QtScriptShell_QStyleOptionFocusRect::~QtScriptShell_QStyleOptionFocusRect() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionFocusRect.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionFocusRect.h new file mode 100644 index 00000000..e6da8f87 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionFocusRect.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONFOCUSRECT_H +#define QTSCRIPTSHELL_QSTYLEOPTIONFOCUSRECT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionFocusRect : public QStyleOptionFocusRect +{ +public: + QtScriptShell_QStyleOptionFocusRect(); + QtScriptShell_QStyleOptionFocusRect(const QStyleOptionFocusRect& other); + QtScriptShell_QStyleOptionFocusRect(int version); + ~QtScriptShell_QStyleOptionFocusRect(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONFOCUSRECT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionFrame.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionFrame.cpp new file mode 100644 index 00000000..cf90b560 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionFrame.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionFrame.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionFrame::QtScriptShell_QStyleOptionFrame() + : QStyleOptionFrame() {} + +QtScriptShell_QStyleOptionFrame::QtScriptShell_QStyleOptionFrame(const QStyleOptionFrame& other) + : QStyleOptionFrame(other) {} + +QtScriptShell_QStyleOptionFrame::QtScriptShell_QStyleOptionFrame(int version) + : QStyleOptionFrame(version) {} + +QtScriptShell_QStyleOptionFrame::~QtScriptShell_QStyleOptionFrame() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionFrame.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionFrame.h new file mode 100644 index 00000000..7ddc5d0e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionFrame.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONFRAME_H +#define QTSCRIPTSHELL_QSTYLEOPTIONFRAME_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionFrame : public QStyleOptionFrame +{ +public: + QtScriptShell_QStyleOptionFrame(); + QtScriptShell_QStyleOptionFrame(const QStyleOptionFrame& other); + QtScriptShell_QStyleOptionFrame(int version); + ~QtScriptShell_QStyleOptionFrame(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONFRAME_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionGraphicsItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionGraphicsItem.cpp new file mode 100644 index 00000000..016a92da --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionGraphicsItem.cpp @@ -0,0 +1,22 @@ +#include "qtscriptshell_QStyleOptionGraphicsItem.h" + +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionGraphicsItem::QtScriptShell_QStyleOptionGraphicsItem() + : QStyleOptionGraphicsItem() {} + +QtScriptShell_QStyleOptionGraphicsItem::QtScriptShell_QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem& other) + : QStyleOptionGraphicsItem(other) {} + +QtScriptShell_QStyleOptionGraphicsItem::QtScriptShell_QStyleOptionGraphicsItem(int version) + : QStyleOptionGraphicsItem(version) {} + +QtScriptShell_QStyleOptionGraphicsItem::~QtScriptShell_QStyleOptionGraphicsItem() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionGraphicsItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionGraphicsItem.h new file mode 100644 index 00000000..58dc2faf --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionGraphicsItem.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONGRAPHICSITEM_H +#define QTSCRIPTSHELL_QSTYLEOPTIONGRAPHICSITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionGraphicsItem : public QStyleOptionGraphicsItem +{ +public: + QtScriptShell_QStyleOptionGraphicsItem(); + QtScriptShell_QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem& other); + QtScriptShell_QStyleOptionGraphicsItem(int version); + ~QtScriptShell_QStyleOptionGraphicsItem(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONGRAPHICSITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionGroupBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionGroupBox.cpp new file mode 100644 index 00000000..1bbf4dd8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionGroupBox.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionGroupBox.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionGroupBox::QtScriptShell_QStyleOptionGroupBox() + : QStyleOptionGroupBox() {} + +QtScriptShell_QStyleOptionGroupBox::QtScriptShell_QStyleOptionGroupBox(const QStyleOptionGroupBox& other) + : QStyleOptionGroupBox(other) {} + +QtScriptShell_QStyleOptionGroupBox::QtScriptShell_QStyleOptionGroupBox(int version) + : QStyleOptionGroupBox(version) {} + +QtScriptShell_QStyleOptionGroupBox::~QtScriptShell_QStyleOptionGroupBox() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionGroupBox.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionGroupBox.h new file mode 100644 index 00000000..549ebacc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionGroupBox.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONGROUPBOX_H +#define QTSCRIPTSHELL_QSTYLEOPTIONGROUPBOX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionGroupBox : public QStyleOptionGroupBox +{ +public: + QtScriptShell_QStyleOptionGroupBox(); + QtScriptShell_QStyleOptionGroupBox(const QStyleOptionGroupBox& other); + QtScriptShell_QStyleOptionGroupBox(int version); + ~QtScriptShell_QStyleOptionGroupBox(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONGROUPBOX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionHeader.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionHeader.cpp new file mode 100644 index 00000000..907f5692 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionHeader.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionHeader.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionHeader::QtScriptShell_QStyleOptionHeader() + : QStyleOptionHeader() {} + +QtScriptShell_QStyleOptionHeader::QtScriptShell_QStyleOptionHeader(const QStyleOptionHeader& other) + : QStyleOptionHeader(other) {} + +QtScriptShell_QStyleOptionHeader::QtScriptShell_QStyleOptionHeader(int version) + : QStyleOptionHeader(version) {} + +QtScriptShell_QStyleOptionHeader::~QtScriptShell_QStyleOptionHeader() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionHeader.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionHeader.h new file mode 100644 index 00000000..514f7f36 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionHeader.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONHEADER_H +#define QTSCRIPTSHELL_QSTYLEOPTIONHEADER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionHeader : public QStyleOptionHeader +{ +public: + QtScriptShell_QStyleOptionHeader(); + QtScriptShell_QStyleOptionHeader(const QStyleOptionHeader& other); + QtScriptShell_QStyleOptionHeader(int version); + ~QtScriptShell_QStyleOptionHeader(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONHEADER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionMenuItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionMenuItem.cpp new file mode 100644 index 00000000..f9b6a6e2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionMenuItem.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionMenuItem.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionMenuItem::QtScriptShell_QStyleOptionMenuItem() + : QStyleOptionMenuItem() {} + +QtScriptShell_QStyleOptionMenuItem::QtScriptShell_QStyleOptionMenuItem(const QStyleOptionMenuItem& other) + : QStyleOptionMenuItem(other) {} + +QtScriptShell_QStyleOptionMenuItem::QtScriptShell_QStyleOptionMenuItem(int version) + : QStyleOptionMenuItem(version) {} + +QtScriptShell_QStyleOptionMenuItem::~QtScriptShell_QStyleOptionMenuItem() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionMenuItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionMenuItem.h new file mode 100644 index 00000000..492ec447 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionMenuItem.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONMENUITEM_H +#define QTSCRIPTSHELL_QSTYLEOPTIONMENUITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionMenuItem : public QStyleOptionMenuItem +{ +public: + QtScriptShell_QStyleOptionMenuItem(); + QtScriptShell_QStyleOptionMenuItem(const QStyleOptionMenuItem& other); + QtScriptShell_QStyleOptionMenuItem(int version); + ~QtScriptShell_QStyleOptionMenuItem(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONMENUITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionProgressBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionProgressBar.cpp new file mode 100644 index 00000000..270f9972 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionProgressBar.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionProgressBar.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionProgressBar::QtScriptShell_QStyleOptionProgressBar() + : QStyleOptionProgressBar() {} + +QtScriptShell_QStyleOptionProgressBar::QtScriptShell_QStyleOptionProgressBar(const QStyleOptionProgressBar& other) + : QStyleOptionProgressBar(other) {} + +QtScriptShell_QStyleOptionProgressBar::QtScriptShell_QStyleOptionProgressBar(int version) + : QStyleOptionProgressBar(version) {} + +QtScriptShell_QStyleOptionProgressBar::~QtScriptShell_QStyleOptionProgressBar() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionProgressBar.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionProgressBar.h new file mode 100644 index 00000000..ee584bbb --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionProgressBar.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONPROGRESSBAR_H +#define QTSCRIPTSHELL_QSTYLEOPTIONPROGRESSBAR_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionProgressBar : public QStyleOptionProgressBar +{ +public: + QtScriptShell_QStyleOptionProgressBar(); + QtScriptShell_QStyleOptionProgressBar(const QStyleOptionProgressBar& other); + QtScriptShell_QStyleOptionProgressBar(int version); + ~QtScriptShell_QStyleOptionProgressBar(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONPROGRESSBAR_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionRubberBand.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionRubberBand.cpp new file mode 100644 index 00000000..1c2ba37d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionRubberBand.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionRubberBand.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionRubberBand::QtScriptShell_QStyleOptionRubberBand() + : QStyleOptionRubberBand() {} + +QtScriptShell_QStyleOptionRubberBand::QtScriptShell_QStyleOptionRubberBand(const QStyleOptionRubberBand& other) + : QStyleOptionRubberBand(other) {} + +QtScriptShell_QStyleOptionRubberBand::QtScriptShell_QStyleOptionRubberBand(int version) + : QStyleOptionRubberBand(version) {} + +QtScriptShell_QStyleOptionRubberBand::~QtScriptShell_QStyleOptionRubberBand() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionRubberBand.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionRubberBand.h new file mode 100644 index 00000000..6e376031 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionRubberBand.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONRUBBERBAND_H +#define QTSCRIPTSHELL_QSTYLEOPTIONRUBBERBAND_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionRubberBand : public QStyleOptionRubberBand +{ +public: + QtScriptShell_QStyleOptionRubberBand(); + QtScriptShell_QStyleOptionRubberBand(const QStyleOptionRubberBand& other); + QtScriptShell_QStyleOptionRubberBand(int version); + ~QtScriptShell_QStyleOptionRubberBand(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONRUBBERBAND_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSizeGrip.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSizeGrip.cpp new file mode 100644 index 00000000..cc9d26ff --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSizeGrip.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionSizeGrip.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionSizeGrip::QtScriptShell_QStyleOptionSizeGrip() + : QStyleOptionSizeGrip() {} + +QtScriptShell_QStyleOptionSizeGrip::QtScriptShell_QStyleOptionSizeGrip(const QStyleOptionSizeGrip& other) + : QStyleOptionSizeGrip(other) {} + +QtScriptShell_QStyleOptionSizeGrip::QtScriptShell_QStyleOptionSizeGrip(int version) + : QStyleOptionSizeGrip(version) {} + +QtScriptShell_QStyleOptionSizeGrip::~QtScriptShell_QStyleOptionSizeGrip() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSizeGrip.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSizeGrip.h new file mode 100644 index 00000000..ba60028f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSizeGrip.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONSIZEGRIP_H +#define QTSCRIPTSHELL_QSTYLEOPTIONSIZEGRIP_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionSizeGrip : public QStyleOptionSizeGrip +{ +public: + QtScriptShell_QStyleOptionSizeGrip(); + QtScriptShell_QStyleOptionSizeGrip(const QStyleOptionSizeGrip& other); + QtScriptShell_QStyleOptionSizeGrip(int version); + ~QtScriptShell_QStyleOptionSizeGrip(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONSIZEGRIP_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSlider.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSlider.cpp new file mode 100644 index 00000000..748b5a2c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSlider.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionSlider.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionSlider::QtScriptShell_QStyleOptionSlider() + : QStyleOptionSlider() {} + +QtScriptShell_QStyleOptionSlider::QtScriptShell_QStyleOptionSlider(const QStyleOptionSlider& other) + : QStyleOptionSlider(other) {} + +QtScriptShell_QStyleOptionSlider::QtScriptShell_QStyleOptionSlider(int version) + : QStyleOptionSlider(version) {} + +QtScriptShell_QStyleOptionSlider::~QtScriptShell_QStyleOptionSlider() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSlider.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSlider.h new file mode 100644 index 00000000..5de77b38 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSlider.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONSLIDER_H +#define QTSCRIPTSHELL_QSTYLEOPTIONSLIDER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionSlider : public QStyleOptionSlider +{ +public: + QtScriptShell_QStyleOptionSlider(); + QtScriptShell_QStyleOptionSlider(const QStyleOptionSlider& other); + QtScriptShell_QStyleOptionSlider(int version); + ~QtScriptShell_QStyleOptionSlider(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONSLIDER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSpinBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSpinBox.cpp new file mode 100644 index 00000000..f35d5ca1 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSpinBox.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionSpinBox.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionSpinBox::QtScriptShell_QStyleOptionSpinBox() + : QStyleOptionSpinBox() {} + +QtScriptShell_QStyleOptionSpinBox::QtScriptShell_QStyleOptionSpinBox(const QStyleOptionSpinBox& other) + : QStyleOptionSpinBox(other) {} + +QtScriptShell_QStyleOptionSpinBox::QtScriptShell_QStyleOptionSpinBox(int version) + : QStyleOptionSpinBox(version) {} + +QtScriptShell_QStyleOptionSpinBox::~QtScriptShell_QStyleOptionSpinBox() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSpinBox.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSpinBox.h new file mode 100644 index 00000000..52eb489d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionSpinBox.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONSPINBOX_H +#define QTSCRIPTSHELL_QSTYLEOPTIONSPINBOX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionSpinBox : public QStyleOptionSpinBox +{ +public: + QtScriptShell_QStyleOptionSpinBox(); + QtScriptShell_QStyleOptionSpinBox(const QStyleOptionSpinBox& other); + QtScriptShell_QStyleOptionSpinBox(int version); + ~QtScriptShell_QStyleOptionSpinBox(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONSPINBOX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTab.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTab.cpp new file mode 100644 index 00000000..25b6877a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTab.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionTab.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionTab::QtScriptShell_QStyleOptionTab() + : QStyleOptionTab() {} + +QtScriptShell_QStyleOptionTab::QtScriptShell_QStyleOptionTab(const QStyleOptionTab& other) + : QStyleOptionTab(other) {} + +QtScriptShell_QStyleOptionTab::QtScriptShell_QStyleOptionTab(int version) + : QStyleOptionTab(version) {} + +QtScriptShell_QStyleOptionTab::~QtScriptShell_QStyleOptionTab() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTab.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTab.h new file mode 100644 index 00000000..12a4ea3c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTab.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONTAB_H +#define QTSCRIPTSHELL_QSTYLEOPTIONTAB_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionTab : public QStyleOptionTab +{ +public: + QtScriptShell_QStyleOptionTab(); + QtScriptShell_QStyleOptionTab(const QStyleOptionTab& other); + QtScriptShell_QStyleOptionTab(int version); + ~QtScriptShell_QStyleOptionTab(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONTAB_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTabBarBase.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTabBarBase.cpp new file mode 100644 index 00000000..9e21c2e8 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTabBarBase.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionTabBarBase.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionTabBarBase::QtScriptShell_QStyleOptionTabBarBase() + : QStyleOptionTabBarBase() {} + +QtScriptShell_QStyleOptionTabBarBase::QtScriptShell_QStyleOptionTabBarBase(const QStyleOptionTabBarBase& other) + : QStyleOptionTabBarBase(other) {} + +QtScriptShell_QStyleOptionTabBarBase::QtScriptShell_QStyleOptionTabBarBase(int version) + : QStyleOptionTabBarBase(version) {} + +QtScriptShell_QStyleOptionTabBarBase::~QtScriptShell_QStyleOptionTabBarBase() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTabBarBase.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTabBarBase.h new file mode 100644 index 00000000..847e5166 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTabBarBase.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONTABBARBASE_H +#define QTSCRIPTSHELL_QSTYLEOPTIONTABBARBASE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionTabBarBase : public QStyleOptionTabBarBase +{ +public: + QtScriptShell_QStyleOptionTabBarBase(); + QtScriptShell_QStyleOptionTabBarBase(const QStyleOptionTabBarBase& other); + QtScriptShell_QStyleOptionTabBarBase(int version); + ~QtScriptShell_QStyleOptionTabBarBase(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONTABBARBASE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTabWidgetFrame.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTabWidgetFrame.cpp new file mode 100644 index 00000000..da45af94 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTabWidgetFrame.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionTabWidgetFrame.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionTabWidgetFrame::QtScriptShell_QStyleOptionTabWidgetFrame() + : QStyleOptionTabWidgetFrame() {} + +QtScriptShell_QStyleOptionTabWidgetFrame::QtScriptShell_QStyleOptionTabWidgetFrame(const QStyleOptionTabWidgetFrame& other) + : QStyleOptionTabWidgetFrame(other) {} + +QtScriptShell_QStyleOptionTabWidgetFrame::QtScriptShell_QStyleOptionTabWidgetFrame(int version) + : QStyleOptionTabWidgetFrame(version) {} + +QtScriptShell_QStyleOptionTabWidgetFrame::~QtScriptShell_QStyleOptionTabWidgetFrame() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTabWidgetFrame.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTabWidgetFrame.h new file mode 100644 index 00000000..9baf0deb --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTabWidgetFrame.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONTABWIDGETFRAME_H +#define QTSCRIPTSHELL_QSTYLEOPTIONTABWIDGETFRAME_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionTabWidgetFrame : public QStyleOptionTabWidgetFrame +{ +public: + QtScriptShell_QStyleOptionTabWidgetFrame(); + QtScriptShell_QStyleOptionTabWidgetFrame(const QStyleOptionTabWidgetFrame& other); + QtScriptShell_QStyleOptionTabWidgetFrame(int version); + ~QtScriptShell_QStyleOptionTabWidgetFrame(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONTABWIDGETFRAME_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTitleBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTitleBar.cpp new file mode 100644 index 00000000..4f01e35a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTitleBar.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionTitleBar.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionTitleBar::QtScriptShell_QStyleOptionTitleBar() + : QStyleOptionTitleBar() {} + +QtScriptShell_QStyleOptionTitleBar::QtScriptShell_QStyleOptionTitleBar(const QStyleOptionTitleBar& other) + : QStyleOptionTitleBar(other) {} + +QtScriptShell_QStyleOptionTitleBar::QtScriptShell_QStyleOptionTitleBar(int version) + : QStyleOptionTitleBar(version) {} + +QtScriptShell_QStyleOptionTitleBar::~QtScriptShell_QStyleOptionTitleBar() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTitleBar.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTitleBar.h new file mode 100644 index 00000000..df9cc494 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionTitleBar.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONTITLEBAR_H +#define QTSCRIPTSHELL_QSTYLEOPTIONTITLEBAR_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionTitleBar : public QStyleOptionTitleBar +{ +public: + QtScriptShell_QStyleOptionTitleBar(); + QtScriptShell_QStyleOptionTitleBar(const QStyleOptionTitleBar& other); + QtScriptShell_QStyleOptionTitleBar(int version); + ~QtScriptShell_QStyleOptionTitleBar(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONTITLEBAR_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolBar.cpp new file mode 100644 index 00000000..aaa13623 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolBar.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionToolBar.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionToolBar::QtScriptShell_QStyleOptionToolBar() + : QStyleOptionToolBar() {} + +QtScriptShell_QStyleOptionToolBar::QtScriptShell_QStyleOptionToolBar(const QStyleOptionToolBar& other) + : QStyleOptionToolBar(other) {} + +QtScriptShell_QStyleOptionToolBar::QtScriptShell_QStyleOptionToolBar(int version) + : QStyleOptionToolBar(version) {} + +QtScriptShell_QStyleOptionToolBar::~QtScriptShell_QStyleOptionToolBar() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolBar.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolBar.h new file mode 100644 index 00000000..489cd87b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolBar.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONTOOLBAR_H +#define QTSCRIPTSHELL_QSTYLEOPTIONTOOLBAR_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionToolBar : public QStyleOptionToolBar +{ +public: + QtScriptShell_QStyleOptionToolBar(); + QtScriptShell_QStyleOptionToolBar(const QStyleOptionToolBar& other); + QtScriptShell_QStyleOptionToolBar(int version); + ~QtScriptShell_QStyleOptionToolBar(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONTOOLBAR_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolBox.cpp new file mode 100644 index 00000000..0c8bd633 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolBox.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionToolBox.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionToolBox::QtScriptShell_QStyleOptionToolBox() + : QStyleOptionToolBox() {} + +QtScriptShell_QStyleOptionToolBox::QtScriptShell_QStyleOptionToolBox(const QStyleOptionToolBox& other) + : QStyleOptionToolBox(other) {} + +QtScriptShell_QStyleOptionToolBox::QtScriptShell_QStyleOptionToolBox(int version) + : QStyleOptionToolBox(version) {} + +QtScriptShell_QStyleOptionToolBox::~QtScriptShell_QStyleOptionToolBox() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolBox.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolBox.h new file mode 100644 index 00000000..e38bbd08 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolBox.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONTOOLBOX_H +#define QTSCRIPTSHELL_QSTYLEOPTIONTOOLBOX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionToolBox : public QStyleOptionToolBox +{ +public: + QtScriptShell_QStyleOptionToolBox(); + QtScriptShell_QStyleOptionToolBox(const QStyleOptionToolBox& other); + QtScriptShell_QStyleOptionToolBox(int version); + ~QtScriptShell_QStyleOptionToolBox(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONTOOLBOX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolButton.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolButton.cpp new file mode 100644 index 00000000..04b67652 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolButton.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionToolButton.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionToolButton::QtScriptShell_QStyleOptionToolButton() + : QStyleOptionToolButton() {} + +QtScriptShell_QStyleOptionToolButton::QtScriptShell_QStyleOptionToolButton(const QStyleOptionToolButton& other) + : QStyleOptionToolButton(other) {} + +QtScriptShell_QStyleOptionToolButton::QtScriptShell_QStyleOptionToolButton(int version) + : QStyleOptionToolButton(version) {} + +QtScriptShell_QStyleOptionToolButton::~QtScriptShell_QStyleOptionToolButton() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolButton.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolButton.h new file mode 100644 index 00000000..63c95266 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionToolButton.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONTOOLBUTTON_H +#define QTSCRIPTSHELL_QSTYLEOPTIONTOOLBUTTON_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionToolButton : public QStyleOptionToolButton +{ +public: + QtScriptShell_QStyleOptionToolButton(); + QtScriptShell_QStyleOptionToolButton(const QStyleOptionToolButton& other); + QtScriptShell_QStyleOptionToolButton(int version); + ~QtScriptShell_QStyleOptionToolButton(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONTOOLBUTTON_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionViewItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionViewItem.cpp new file mode 100644 index 00000000..443fb930 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionViewItem.cpp @@ -0,0 +1,21 @@ +#include "qtscriptshell_QStyleOptionViewItem.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QStyleOptionViewItem::QtScriptShell_QStyleOptionViewItem() + : QStyleOptionViewItem() {} + +QtScriptShell_QStyleOptionViewItem::QtScriptShell_QStyleOptionViewItem(const QStyleOptionViewItem& other) + : QStyleOptionViewItem(other) {} + +QtScriptShell_QStyleOptionViewItem::QtScriptShell_QStyleOptionViewItem(int version) + : QStyleOptionViewItem(version) {} + +QtScriptShell_QStyleOptionViewItem::~QtScriptShell_QStyleOptionViewItem() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionViewItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionViewItem.h new file mode 100644 index 00000000..fe7522a3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyleOptionViewItem.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QSTYLEOPTIONVIEWITEM_H +#define QTSCRIPTSHELL_QSTYLEOPTIONVIEWITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyleOptionViewItem : public QStyleOptionViewItem +{ +public: + QtScriptShell_QStyleOptionViewItem(); + QtScriptShell_QStyleOptionViewItem(const QStyleOptionViewItem& other); + QtScriptShell_QStyleOptionViewItem(int version); + ~QtScriptShell_QStyleOptionViewItem(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEOPTIONVIEWITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStylePlugin.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStylePlugin.cpp new file mode 100644 index 00000000..f2acf720 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStylePlugin.cpp @@ -0,0 +1,107 @@ +#include "qtscriptshell_QStylePlugin.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QStyle*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QStylePlugin::QtScriptShell_QStylePlugin(QObject* parent) + : QStylePlugin(parent) {} + +QtScriptShell_QStylePlugin::~QtScriptShell_QStylePlugin() {} + +void QtScriptShell_QStylePlugin::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QStylePlugin::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QStyle* QtScriptShell_QStylePlugin::create(const QString& key) +{ + QScriptValue _q_function = __qtscript_self.property("create"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("create") & QScriptValue::QObjectMember)) { + qFatal("QStylePlugin::create() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, key))); + } +} + +void QtScriptShell_QStylePlugin::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QStylePlugin::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QStylePlugin::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QStylePlugin::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QStylePlugin::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QStylePlugin::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QStylePlugin::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QStylePlugin::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStylePlugin.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStylePlugin.h new file mode 100644 index 00000000..989ba06d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStylePlugin.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QSTYLEPLUGIN_H +#define QTSCRIPTSHELL_QSTYLEPLUGIN_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStylePlugin : public QStylePlugin +{ +public: + QtScriptShell_QStylePlugin(QObject* parent = 0); + ~QtScriptShell_QStylePlugin(); + + void childEvent(QChildEvent* event); + QStyle* create(const QString& key); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEPLUGIN_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyledItemDelegate.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyledItemDelegate.cpp new file mode 100644 index 00000000..ca897d35 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyledItemDelegate.cpp @@ -0,0 +1,294 @@ +#include "qtscriptshell_QStyledItemDelegate.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QStyleOptionViewItem) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QAbstractItemModel*) +Q_DECLARE_METATYPE(QHelpEvent*) +Q_DECLARE_METATYPE(QAbstractItemView*) +Q_DECLARE_METATYPE(QStyleOptionViewItem*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QStyledItemDelegate::QtScriptShell_QStyledItemDelegate(QObject* parent) + : QStyledItemDelegate(parent) {} + +QtScriptShell_QStyledItemDelegate::~QtScriptShell_QStyledItemDelegate() {} + +void QtScriptShell_QStyledItemDelegate::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QStyledItemDelegate::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QWidget* QtScriptShell_QStyledItemDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("createEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createEditor") & QScriptValue::QObjectMember)) { + return QStyledItemDelegate::createEditor(parent, option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QStyledItemDelegate::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QStyledItemDelegate::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStyledItemDelegate::destroyEditor(QWidget* editor, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("destroyEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("destroyEditor") & QScriptValue::QObjectMember)) { + QStyledItemDelegate::destroyEditor(editor, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, index)); + } +} + +QString QtScriptShell_QStyledItemDelegate::displayText(const QVariant& value, const QLocale& locale) const +{ + QScriptValue _q_function = __qtscript_self.property("displayText"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("displayText") & QScriptValue::QObjectMember)) { + return QStyledItemDelegate::displayText(value, locale); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value) + << qScriptValueFromValue(_q_engine, locale))); + } +} + +bool QtScriptShell_QStyledItemDelegate::editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) +{ + QScriptValue _q_function = __qtscript_self.property("editorEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("editorEvent") & QScriptValue::QObjectMember)) { + return QStyledItemDelegate::editorEvent(event, model, option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event) + << qScriptValueFromValue(_q_engine, model) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index))); + } +} + +bool QtScriptShell_QStyledItemDelegate::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QStyledItemDelegate::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QStyledItemDelegate::eventFilter(QObject* object, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QStyledItemDelegate::eventFilter(object, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, object) + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QStyledItemDelegate::helpEvent(QHelpEvent* event, QAbstractItemView* view, const QStyleOptionViewItem& option, const QModelIndex& index) +{ + QScriptValue _q_function = __qtscript_self.property("helpEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("helpEvent") & QScriptValue::QObjectMember)) { + return QStyledItemDelegate::helpEvent(event, view, option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event) + << qScriptValueFromValue(_q_engine, view) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QStyledItemDelegate::initStyleOption(QStyleOptionViewItem* option, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("initStyleOption"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initStyleOption") & QScriptValue::QObjectMember)) { + QStyledItemDelegate::initStyleOption(option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QStyledItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("paint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paint") & QScriptValue::QObjectMember)) { + QStyledItemDelegate::paint(painter, option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index)); + } +} + +QVector QtScriptShell_QStyledItemDelegate::paintingRoles() const +{ + QScriptValue _q_function = __qtscript_self.property("paintingRoles"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintingRoles") & QScriptValue::QObjectMember)) { + return QStyledItemDelegate::paintingRoles(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QStyledItemDelegate::setEditorData(QWidget* editor, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("setEditorData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setEditorData") & QScriptValue::QObjectMember)) { + QStyledItemDelegate::setEditorData(editor, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QStyledItemDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("setModelData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setModelData") & QScriptValue::QObjectMember)) { + QStyledItemDelegate::setModelData(editor, model, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, model) + << qScriptValueFromValue(_q_engine, index)); + } +} + +QSize QtScriptShell_QStyledItemDelegate::sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + return QStyledItemDelegate::sizeHint(option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QStyledItemDelegate::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QStyledItemDelegate::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QStyledItemDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorGeometry") & QScriptValue::QObjectMember)) { + QStyledItemDelegate::updateEditorGeometry(editor, option, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, option) + << qScriptValueFromValue(_q_engine, index)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyledItemDelegate.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyledItemDelegate.h new file mode 100644 index 00000000..66dd5ef4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QStyledItemDelegate.h @@ -0,0 +1,36 @@ +#ifndef QTSCRIPTSHELL_QSTYLEDITEMDELEGATE_H +#define QTSCRIPTSHELL_QSTYLEDITEMDELEGATE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QStyledItemDelegate : public QStyledItemDelegate +{ +public: + QtScriptShell_QStyledItemDelegate(QObject* parent = 0); + ~QtScriptShell_QStyledItemDelegate(); + + void childEvent(QChildEvent* event); + QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const; + void customEvent(QEvent* event); + void destroyEditor(QWidget* editor, const QModelIndex& index) const; + QString displayText(const QVariant& value, const QLocale& locale) const; + bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index); + bool event(QEvent* event); + bool eventFilter(QObject* object, QEvent* event); + bool helpEvent(QHelpEvent* event, QAbstractItemView* view, const QStyleOptionViewItem& option, const QModelIndex& index); + void initStyleOption(QStyleOptionViewItem* option, const QModelIndex& index) const; + void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const; + QVector paintingRoles() const; + void setEditorData(QWidget* editor, const QModelIndex& index) const; + void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const; + QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const; + void timerEvent(QTimerEvent* event); + void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSTYLEDITEMDELEGATE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSwipeGesture.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSwipeGesture.cpp new file mode 100644 index 00000000..4d1a192c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSwipeGesture.cpp @@ -0,0 +1,92 @@ +#include "qtscriptshell_QSwipeGesture.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QSwipeGesture::QtScriptShell_QSwipeGesture(QObject* parent) + : QSwipeGesture(parent) {} + +QtScriptShell_QSwipeGesture::~QtScriptShell_QSwipeGesture() {} + +void QtScriptShell_QSwipeGesture::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSwipeGesture::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSwipeGesture::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSwipeGesture::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSwipeGesture::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSwipeGesture::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QSwipeGesture::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSwipeGesture::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSwipeGesture::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSwipeGesture::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSwipeGesture.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSwipeGesture.h new file mode 100644 index 00000000..ed7729a6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSwipeGesture.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QSWIPEGESTURE_H +#define QTSCRIPTSHELL_QSWIPEGESTURE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSwipeGesture : public QSwipeGesture +{ +public: + QtScriptShell_QSwipeGesture(QObject* parent = 0); + ~QtScriptShell_QSwipeGesture(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSWIPEGESTURE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSystemTrayIcon.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSystemTrayIcon.cpp new file mode 100644 index 00000000..b9646060 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSystemTrayIcon.cpp @@ -0,0 +1,98 @@ +#include "qtscriptshell_QSystemTrayIcon.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QSystemTrayIcon::QtScriptShell_QSystemTrayIcon(QObject* parent) + : QSystemTrayIcon(parent) {} + +QtScriptShell_QSystemTrayIcon::QtScriptShell_QSystemTrayIcon(const QIcon& icon, QObject* parent) + : QSystemTrayIcon(icon, parent) {} + +QtScriptShell_QSystemTrayIcon::~QtScriptShell_QSystemTrayIcon() {} + +void QtScriptShell_QSystemTrayIcon::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QSystemTrayIcon::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QSystemTrayIcon::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QSystemTrayIcon::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QSystemTrayIcon::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QSystemTrayIcon::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QSystemTrayIcon::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QSystemTrayIcon::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QSystemTrayIcon::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QSystemTrayIcon::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSystemTrayIcon.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSystemTrayIcon.h new file mode 100644 index 00000000..fece5c94 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QSystemTrayIcon.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QSYSTEMTRAYICON_H +#define QTSCRIPTSHELL_QSYSTEMTRAYICON_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QSystemTrayIcon : public QSystemTrayIcon +{ +public: + QtScriptShell_QSystemTrayIcon(QObject* parent = 0); + QtScriptShell_QSystemTrayIcon(const QIcon& icon, QObject* parent = 0); + ~QtScriptShell_QSystemTrayIcon(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QSYSTEMTRAYICON_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTabBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTabBar.cpp new file mode 100644 index 00000000..63062906 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTabBar.cpp @@ -0,0 +1,719 @@ +#include "qtscriptshell_QTabBar.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QTabBar::QtScriptShell_QTabBar(QWidget* parent) + : QTabBar(parent) {} + +QtScriptShell_QTabBar::~QtScriptShell_QTabBar() {} + +void QtScriptShell_QTabBar::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QTabBar::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabBar::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QTabBar::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTabBar::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTabBar::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabBar::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QTabBar::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabBar::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QTabBar::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabBar::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTabBar::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTabBar::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QTabBar::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTabBar::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QTabBar::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabBar::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QTabBar::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabBar::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QTabBar::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabBar::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QTabBar::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabBar::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QTabBar::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTabBar::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTabBar::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QTabBar::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTabBar::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QTabBar::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QTabBar::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTabBar::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QTabBar::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QTabBar::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QTabBar::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTabBar::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QTabBar::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QTabBar::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QTabBar::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTabBar::hideEvent(QHideEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QTabBar::hideEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTabBar::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QTabBar::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QTabBar::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QTabBar::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QTabBar::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QTabBar::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTabBar::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QTabBar::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTabBar::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QTabBar::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabBar::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QTabBar::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTabBar::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QTabBar::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QTabBar::minimumTabSizeHint(int index) const +{ + QScriptValue _q_function = __qtscript_self.property("minimumTabSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumTabSizeHint") & QScriptValue::QObjectMember)) { + return QTabBar::minimumTabSizeHint(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QTabBar::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QTabBar::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabBar::mouseMoveEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QTabBar::mouseMoveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTabBar::mousePressEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QTabBar::mousePressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTabBar::mouseReleaseEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QTabBar::mouseReleaseEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTabBar::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QTabBar::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTabBar::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QTabBar::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QTabBar::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QTabBar::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTabBar::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QTabBar::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QTabBar::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QTabBar::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QTabBar::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QTabBar::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPainter* QtScriptShell_QTabBar::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QTabBar::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTabBar::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QTabBar::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTabBar::tabInserted(int index) +{ + QScriptValue _q_function = __qtscript_self.property("tabInserted"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabInserted") & QScriptValue::QObjectMember)) { + QTabBar::tabInserted(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QTabBar::tabLayoutChange() +{ + QScriptValue _q_function = __qtscript_self.property("tabLayoutChange"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabLayoutChange") & QScriptValue::QObjectMember)) { + QTabBar::tabLayoutChange(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTabBar::tabRemoved(int index) +{ + QScriptValue _q_function = __qtscript_self.property("tabRemoved"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabRemoved") & QScriptValue::QObjectMember)) { + QTabBar::tabRemoved(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +QSize QtScriptShell_QTabBar::tabSizeHint(int index) const +{ + QScriptValue _q_function = __qtscript_self.property("tabSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabSizeHint") & QScriptValue::QObjectMember)) { + return QTabBar::tabSizeHint(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QTabBar::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QTabBar::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabBar::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTabBar::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabBar::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QTabBar::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTabBar.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTabBar.h new file mode 100644 index 00000000..fc9c3fce --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTabBar.h @@ -0,0 +1,66 @@ +#ifndef QTSCRIPTSHELL_QTABBAR_H +#define QTSCRIPTSHELL_QTABBAR_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTabBar : public QTabBar +{ +public: + QtScriptShell_QTabBar(QWidget* parent = 0); + ~QtScriptShell_QTabBar(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* arg__1); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* arg__1); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumTabSizeHint(int index) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* arg__1); + void mousePressEvent(QMouseEvent* arg__1); + void mouseReleaseEvent(QMouseEvent* arg__1); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* arg__1); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + void tabInserted(int index); + void tabLayoutChange(); + void tabRemoved(int index); + QSize tabSizeHint(int index) const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTABBAR_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTabWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTabWidget.cpp new file mode 100644 index 00000000..cd499f98 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTabWidget.cpp @@ -0,0 +1,679 @@ +#include "qtscriptshell_QTabWidget.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QTabWidget::QtScriptShell_QTabWidget(QWidget* parent) + : QTabWidget(parent) {} + +QtScriptShell_QTabWidget::~QtScriptShell_QTabWidget() {} + +void QtScriptShell_QTabWidget::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QTabWidget::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabWidget::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QTabWidget::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTabWidget::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTabWidget::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabWidget::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QTabWidget::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabWidget::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QTabWidget::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabWidget::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTabWidget::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTabWidget::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QTabWidget::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTabWidget::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QTabWidget::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabWidget::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QTabWidget::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabWidget::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QTabWidget::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabWidget::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QTabWidget::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabWidget::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QTabWidget::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTabWidget::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTabWidget::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QTabWidget::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTabWidget::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QTabWidget::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QTabWidget::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTabWidget::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QTabWidget::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QTabWidget::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QTabWidget::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTabWidget::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QTabWidget::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QTabWidget::heightForWidth(int width) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QTabWidget::heightForWidth(width); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, width))); + } +} + +void QtScriptShell_QTabWidget::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QTabWidget::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabWidget::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QTabWidget::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QTabWidget::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QTabWidget::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QTabWidget::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QTabWidget::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTabWidget::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QTabWidget::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTabWidget::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QTabWidget::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabWidget::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QTabWidget::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTabWidget::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QTabWidget::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTabWidget::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QTabWidget::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabWidget::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QTabWidget::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabWidget::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QTabWidget::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabWidget::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QTabWidget::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabWidget::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QTabWidget::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTabWidget::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QTabWidget::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QTabWidget::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QTabWidget::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTabWidget::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QTabWidget::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QTabWidget::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QTabWidget::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QTabWidget::resizeEvent(QResizeEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QTabWidget::resizeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPainter* QtScriptShell_QTabWidget::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QTabWidget::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTabWidget::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QTabWidget::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTabWidget::tabInserted(int index) +{ + QScriptValue _q_function = __qtscript_self.property("tabInserted"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabInserted") & QScriptValue::QObjectMember)) { + QTabWidget::tabInserted(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QTabWidget::tabRemoved(int index) +{ + QScriptValue _q_function = __qtscript_self.property("tabRemoved"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabRemoved") & QScriptValue::QObjectMember)) { + QTabWidget::tabRemoved(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QTabWidget::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QTabWidget::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabWidget::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTabWidget::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTabWidget::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QTabWidget::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTabWidget.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTabWidget.h new file mode 100644 index 00000000..3b682a3b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTabWidget.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_QTABWIDGET_H +#define QTSCRIPTSHELL_QTABWIDGET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTabWidget : public QTabWidget +{ +public: + QtScriptShell_QTabWidget(QWidget* parent = 0); + ~QtScriptShell_QTabWidget(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* arg__1); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int width) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* arg__1); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + void tabInserted(int index); + void tabRemoved(int index); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTABWIDGET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableView.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableView.cpp new file mode 100644 index 00000000..2d1eba9f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableView.cpp @@ -0,0 +1,1223 @@ +#include "qtscriptshell_QTableView.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::EditTrigger) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::ScrollHint) +Q_DECLARE_METATYPE(const QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAbstractItemModel*) +Q_DECLARE_METATYPE(QItemSelectionModel*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QStyleOptionViewItem) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QTableView::QtScriptShell_QTableView(QWidget* parent) + : QTableView(parent) {} + +QtScriptShell_QTableView::~QtScriptShell_QTableView() {} + +void QtScriptShell_QTableView::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QTableView::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableView::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QTableView::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTableView::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTableView::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableView::closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("closeEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEditor") & QScriptValue::QObjectMember)) { + QTableView::closeEditor(editor, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QTableView::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QTableView::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableView::commitData(QWidget* editor) +{ + QScriptValue _q_function = __qtscript_self.property("commitData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("commitData") & QScriptValue::QObjectMember)) { + QTableView::commitData(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QTableView::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QTableView::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTableView::currentChanged(const QModelIndex& current, const QModelIndex& previous) +{ + QScriptValue _q_function = __qtscript_self.property("currentChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("currentChanged") & QScriptValue::QObjectMember)) { + QTableView::currentChanged(current, previous); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, current) + << qScriptValueFromValue(_q_engine, previous)); + } +} + +void QtScriptShell_QTableView::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTableView::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableView::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) +{ + QScriptValue _q_function = __qtscript_self.property("dataChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dataChanged") & QScriptValue::QObjectMember)) { + QTableView::dataChanged(topLeft, bottomRight, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, topLeft) + << qScriptValueFromValue(_q_engine, bottomRight) + << qScriptValueFromValue(_q_engine, roles)); + } +} + +int QtScriptShell_QTableView::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QTableView::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTableView::doItemsLayout() +{ + QScriptValue _q_function = __qtscript_self.property("doItemsLayout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("doItemsLayout") & QScriptValue::QObjectMember)) { + QTableView::doItemsLayout(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTableView::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QTableView::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableView::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QTableView::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableView::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QTableView::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableView::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QTableView::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTableView::edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("edit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("edit") & QScriptValue::QObjectMember)) { + return QTableView::edit(index, trigger, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, trigger) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QTableView::editorDestroyed(QObject* editor) +{ + QScriptValue _q_function = __qtscript_self.property("editorDestroyed"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("editorDestroyed") & QScriptValue::QObjectMember)) { + QTableView::editorDestroyed(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QTableView::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QTableView::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTableView::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTableView::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTableView::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTableView::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QTableView::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QTableView::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTableView::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QTableView::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QTableView::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QTableView::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTableView::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QTableView::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QTableView::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QTableView::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTableView::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QTableView::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTableView::horizontalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("horizontalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalOffset") & QScriptValue::QObjectMember)) { + return QTableView::horizontalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTableView::horizontalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarAction") & QScriptValue::QObjectMember)) { + QTableView::horizontalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QTableView::horizontalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QTableView::horizontalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QModelIndex QtScriptShell_QTableView::indexAt(const QPoint& p) const +{ + QScriptValue _q_function = __qtscript_self.property("indexAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexAt") & QScriptValue::QObjectMember)) { + return QTableView::indexAt(p); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, p))); + } +} + +void QtScriptShell_QTableView::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QTableView::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QTableView::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QTableView::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QTableView::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QTableView::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QTableView::isIndexHidden(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("isIndexHidden"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isIndexHidden") & QScriptValue::QObjectMember)) { + return QTableView::isIndexHidden(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QTableView::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QTableView::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableView::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QTableView::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableView::keyboardSearch(const QString& search) +{ + QScriptValue _q_function = __qtscript_self.property("keyboardSearch"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyboardSearch") & QScriptValue::QObjectMember)) { + QTableView::keyboardSearch(search); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, search)); + } +} + +void QtScriptShell_QTableView::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QTableView::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTableView::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QTableView::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTableView::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QTableView::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableView::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QTableView::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableView::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QTableView::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableView::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QTableView::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableView::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QTableView::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTableView::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QTableView::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QTableView::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QTableView::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTableView::paintEvent(QPaintEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QTableView::paintEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QPaintDevice* QtScriptShell_QTableView::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QTableView::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QTableView::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + QTableView::reset(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTableView::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QTableView::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableView::rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsAboutToBeRemoved"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsAboutToBeRemoved") & QScriptValue::QObjectMember)) { + QTableView::rowsAboutToBeRemoved(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QTableView::rowsInserted(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsInserted"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsInserted") & QScriptValue::QObjectMember)) { + QTableView::rowsInserted(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QTableView::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QTableView::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QTableView::scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("scrollTo"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollTo") & QScriptValue::QObjectMember)) { + QTableView::scrollTo(index, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QTableView::selectAll() +{ + QScriptValue _q_function = __qtscript_self.property("selectAll"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectAll") & QScriptValue::QObjectMember)) { + QTableView::selectAll(); + } else { + _q_function.call(__qtscript_self); + } +} + +QList QtScriptShell_QTableView::selectedIndexes() const +{ + QScriptValue _q_function = __qtscript_self.property("selectedIndexes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectedIndexes") & QScriptValue::QObjectMember)) { + return QTableView::selectedIndexes(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTableView::selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) +{ + QScriptValue _q_function = __qtscript_self.property("selectionChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionChanged") & QScriptValue::QObjectMember)) { + QTableView::selectionChanged(selected, deselected); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selected) + << qScriptValueFromValue(_q_engine, deselected)); + } +} + +QItemSelectionModel::SelectionFlags QtScriptShell_QTableView::selectionCommand(const QModelIndex& index, const QEvent* event) const +{ + QScriptValue _q_function = __qtscript_self.property("selectionCommand"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionCommand") & QScriptValue::QObjectMember)) { + return QTableView::selectionCommand(index, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, const_cast(event)))); + } +} + +void QtScriptShell_QTableView::setModel(QAbstractItemModel* model) +{ + QScriptValue _q_function = __qtscript_self.property("setModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setModel") & QScriptValue::QObjectMember)) { + QTableView::setModel(model); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, model)); + } +} + +void QtScriptShell_QTableView::setRootIndex(const QModelIndex& index) +{ + QScriptValue _q_function = __qtscript_self.property("setRootIndex"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setRootIndex") & QScriptValue::QObjectMember)) { + QTableView::setRootIndex(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QTableView::setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) +{ + QScriptValue _q_function = __qtscript_self.property("setSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelection") & QScriptValue::QObjectMember)) { + QTableView::setSelection(rect, command); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, command)); + } +} + +void QtScriptShell_QTableView::setSelectionModel(QItemSelectionModel* selectionModel) +{ + QScriptValue _q_function = __qtscript_self.property("setSelectionModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelectionModel") & QScriptValue::QObjectMember)) { + QTableView::setSelectionModel(selectionModel); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selectionModel)); + } +} + +void QtScriptShell_QTableView::setupViewport(QWidget* viewport) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QTableView::setupViewport(viewport); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, viewport)); + } +} + +QPainter* QtScriptShell_QTableView::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QTableView::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTableView::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QTableView::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTableView::sizeHintForColumn(int column) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForColumn"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForColumn") & QScriptValue::QObjectMember)) { + return QTableView::sizeHintForColumn(column); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column))); + } +} + +int QtScriptShell_QTableView::sizeHintForRow(int row) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForRow"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForRow") & QScriptValue::QObjectMember)) { + return QTableView::sizeHintForRow(row); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row))); + } +} + +void QtScriptShell_QTableView::startDrag(Qt::DropActions supportedActions) +{ + QScriptValue _q_function = __qtscript_self.property("startDrag"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startDrag") & QScriptValue::QObjectMember)) { + QTableView::startDrag(supportedActions); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, supportedActions)); + } +} + +void QtScriptShell_QTableView::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QTableView::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableView::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTableView::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableView::updateEditorData() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorData") & QScriptValue::QObjectMember)) { + QTableView::updateEditorData(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTableView::updateEditorGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorGeometries") & QScriptValue::QObjectMember)) { + QTableView::updateEditorGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTableView::updateGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometries") & QScriptValue::QObjectMember)) { + QTableView::updateGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +int QtScriptShell_QTableView::verticalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("verticalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalOffset") & QScriptValue::QObjectMember)) { + return QTableView::verticalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTableView::verticalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarAction") & QScriptValue::QObjectMember)) { + QTableView::verticalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QTableView::verticalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QTableView::verticalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QStyleOptionViewItem QtScriptShell_QTableView::viewOptions() const +{ + QScriptValue _q_function = __qtscript_self.property("viewOptions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewOptions") & QScriptValue::QObjectMember)) { + return QTableView::viewOptions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QTableView::viewportEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QTableView::viewportEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +QSize QtScriptShell_QTableView::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QTableView::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QTableView::visualRect(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRect") & QScriptValue::QObjectMember)) { + return QTableView::visualRect(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QRegion QtScriptShell_QTableView::visualRegionForSelection(const QItemSelection& selection) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRegionForSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRegionForSelection") & QScriptValue::QObjectMember)) { + return QTableView::visualRegionForSelection(selection); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selection))); + } +} + +void QtScriptShell_QTableView::wheelEvent(QWheelEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QTableView::wheelEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableView.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableView.h new file mode 100644 index 00000000..4ed02463 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableView.h @@ -0,0 +1,102 @@ +#ifndef QTSCRIPTSHELL_QTABLEVIEW_H +#define QTSCRIPTSHELL_QTABLEVIEW_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTableView : public QTableView +{ +public: + QtScriptShell_QTableView(QWidget* parent = 0); + ~QtScriptShell_QTableView(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint); + void closeEvent(QCloseEvent* event); + void commitData(QWidget* editor); + void contextMenuEvent(QContextMenuEvent* arg__1); + void currentChanged(const QModelIndex& current, const QModelIndex& previous); + void customEvent(QEvent* event); + void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles); + int devType() const; + void doItemsLayout(); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event); + void editorDestroyed(QObject* editor); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + int horizontalOffset() const; + void horizontalScrollbarAction(int action); + void horizontalScrollbarValueChanged(int value); + QModelIndex indexAt(const QPoint& p) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isIndexHidden(const QModelIndex& index) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void keyboardSearch(const QString& search); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* e); + QPaintDevice* redirected(QPoint* offset) const; + void reset(); + void resizeEvent(QResizeEvent* event); + void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end); + void rowsInserted(const QModelIndex& parent, int start, int end); + void scrollContentsBy(int dx, int dy); + void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint = QAbstractItemView::EnsureVisible); + void selectAll(); + QList selectedIndexes() const; + void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected); + QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const; + void setModel(QAbstractItemModel* model); + void setRootIndex(const QModelIndex& index); + void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command); + void setSelectionModel(QItemSelectionModel* selectionModel); + void setupViewport(QWidget* viewport); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + int sizeHintForColumn(int column) const; + int sizeHintForRow(int row) const; + void startDrag(Qt::DropActions supportedActions); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void updateEditorData(); + void updateEditorGeometries(); + void updateGeometries(); + int verticalOffset() const; + void verticalScrollbarAction(int action); + void verticalScrollbarValueChanged(int value); + QStyleOptionViewItem viewOptions() const; + bool viewportEvent(QEvent* event); + QSize viewportSizeHint() const; + QRect visualRect(const QModelIndex& index) const; + QRegion visualRegionForSelection(const QItemSelection& selection) const; + void wheelEvent(QWheelEvent* arg__1); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTABLEVIEW_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableWidget.cpp new file mode 100644 index 00000000..6af56f23 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableWidget.cpp @@ -0,0 +1,1254 @@ +#include "qtscriptshell_QTableWidget.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(Qt::DropAction) +Q_DECLARE_METATYPE(QAbstractItemView::EditTrigger) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::ScrollHint) +Q_DECLARE_METATYPE(const QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QItemSelectionModel*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QStyleOptionViewItem) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QTableWidget::QtScriptShell_QTableWidget(QWidget* parent) + : QTableWidget(parent) {} + +QtScriptShell_QTableWidget::QtScriptShell_QTableWidget(int rows, int columns, QWidget* parent) + : QTableWidget(rows, columns, parent) {} + +QtScriptShell_QTableWidget::~QtScriptShell_QTableWidget() {} + +void QtScriptShell_QTableWidget::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QTableWidget::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableWidget::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QTableWidget::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTableWidget::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTableWidget::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableWidget::closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("closeEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEditor") & QScriptValue::QObjectMember)) { + QTableWidget::closeEditor(editor, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QTableWidget::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QTableWidget::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableWidget::commitData(QWidget* editor) +{ + QScriptValue _q_function = __qtscript_self.property("commitData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("commitData") & QScriptValue::QObjectMember)) { + QTableWidget::commitData(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QTableWidget::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QTableWidget::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTableWidget::currentChanged(const QModelIndex& current, const QModelIndex& previous) +{ + QScriptValue _q_function = __qtscript_self.property("currentChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("currentChanged") & QScriptValue::QObjectMember)) { + QTableWidget::currentChanged(current, previous); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, current) + << qScriptValueFromValue(_q_engine, previous)); + } +} + +void QtScriptShell_QTableWidget::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTableWidget::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableWidget::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) +{ + QScriptValue _q_function = __qtscript_self.property("dataChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dataChanged") & QScriptValue::QObjectMember)) { + QTableWidget::dataChanged(topLeft, bottomRight, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, topLeft) + << qScriptValueFromValue(_q_engine, bottomRight) + << qScriptValueFromValue(_q_engine, roles)); + } +} + +int QtScriptShell_QTableWidget::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QTableWidget::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTableWidget::doItemsLayout() +{ + QScriptValue _q_function = __qtscript_self.property("doItemsLayout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("doItemsLayout") & QScriptValue::QObjectMember)) { + QTableWidget::doItemsLayout(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTableWidget::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QTableWidget::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableWidget::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QTableWidget::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableWidget::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QTableWidget::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableWidget::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QTableWidget::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTableWidget::dropMimeData(int row, int column, const QMimeData* data, Qt::DropAction action) +{ + QScriptValue _q_function = __qtscript_self.property("dropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropMimeData") & QScriptValue::QObjectMember)) { + return QTableWidget::dropMimeData(row, column, data, action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row) + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action))); + } +} + +bool QtScriptShell_QTableWidget::edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("edit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("edit") & QScriptValue::QObjectMember)) { + return QTableWidget::edit(index, trigger, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, trigger) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QTableWidget::editorDestroyed(QObject* editor) +{ + QScriptValue _q_function = __qtscript_self.property("editorDestroyed"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("editorDestroyed") & QScriptValue::QObjectMember)) { + QTableWidget::editorDestroyed(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QTableWidget::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QTableWidget::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTableWidget::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTableWidget::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QTableWidget::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTableWidget::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QTableWidget::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QTableWidget::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTableWidget::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QTableWidget::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QTableWidget::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QTableWidget::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTableWidget::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QTableWidget::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QTableWidget::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QTableWidget::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTableWidget::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QTableWidget::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTableWidget::horizontalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("horizontalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalOffset") & QScriptValue::QObjectMember)) { + return QTableWidget::horizontalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTableWidget::horizontalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarAction") & QScriptValue::QObjectMember)) { + QTableWidget::horizontalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QTableWidget::horizontalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QTableWidget::horizontalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QModelIndex QtScriptShell_QTableWidget::indexAt(const QPoint& p) const +{ + QScriptValue _q_function = __qtscript_self.property("indexAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexAt") & QScriptValue::QObjectMember)) { + return QTableWidget::indexAt(p); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, p))); + } +} + +void QtScriptShell_QTableWidget::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QTableWidget::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QTableWidget::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QTableWidget::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QTableWidget::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QTableWidget::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QTableWidget::isIndexHidden(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("isIndexHidden"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isIndexHidden") & QScriptValue::QObjectMember)) { + return QTableWidget::isIndexHidden(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QTableWidget::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QTableWidget::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableWidget::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QTableWidget::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableWidget::keyboardSearch(const QString& search) +{ + QScriptValue _q_function = __qtscript_self.property("keyboardSearch"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyboardSearch") & QScriptValue::QObjectMember)) { + QTableWidget::keyboardSearch(search); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, search)); + } +} + +void QtScriptShell_QTableWidget::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QTableWidget::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTableWidget::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QTableWidget::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QStringList QtScriptShell_QTableWidget::mimeTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("mimeTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeTypes") & QScriptValue::QObjectMember)) { + return QTableWidget::mimeTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTableWidget::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QTableWidget::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableWidget::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QTableWidget::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableWidget::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QTableWidget::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableWidget::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QTableWidget::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableWidget::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QTableWidget::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTableWidget::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QTableWidget::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QTableWidget::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QTableWidget::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTableWidget::paintEvent(QPaintEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QTableWidget::paintEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QPaintDevice* QtScriptShell_QTableWidget::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QTableWidget::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QTableWidget::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + QTableWidget::reset(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTableWidget::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QTableWidget::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableWidget::rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsAboutToBeRemoved"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsAboutToBeRemoved") & QScriptValue::QObjectMember)) { + QTableWidget::rowsAboutToBeRemoved(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QTableWidget::rowsInserted(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsInserted"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsInserted") & QScriptValue::QObjectMember)) { + QTableWidget::rowsInserted(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QTableWidget::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QTableWidget::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QTableWidget::scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("scrollTo"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollTo") & QScriptValue::QObjectMember)) { + QTableWidget::scrollTo(index, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QTableWidget::selectAll() +{ + QScriptValue _q_function = __qtscript_self.property("selectAll"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectAll") & QScriptValue::QObjectMember)) { + QTableWidget::selectAll(); + } else { + _q_function.call(__qtscript_self); + } +} + +QList QtScriptShell_QTableWidget::selectedIndexes() const +{ + QScriptValue _q_function = __qtscript_self.property("selectedIndexes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectedIndexes") & QScriptValue::QObjectMember)) { + return QTableWidget::selectedIndexes(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTableWidget::selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) +{ + QScriptValue _q_function = __qtscript_self.property("selectionChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionChanged") & QScriptValue::QObjectMember)) { + QTableWidget::selectionChanged(selected, deselected); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selected) + << qScriptValueFromValue(_q_engine, deselected)); + } +} + +QItemSelectionModel::SelectionFlags QtScriptShell_QTableWidget::selectionCommand(const QModelIndex& index, const QEvent* event) const +{ + QScriptValue _q_function = __qtscript_self.property("selectionCommand"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionCommand") & QScriptValue::QObjectMember)) { + return QTableWidget::selectionCommand(index, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, const_cast(event)))); + } +} + +void QtScriptShell_QTableWidget::setRootIndex(const QModelIndex& index) +{ + QScriptValue _q_function = __qtscript_self.property("setRootIndex"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setRootIndex") & QScriptValue::QObjectMember)) { + QTableWidget::setRootIndex(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QTableWidget::setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) +{ + QScriptValue _q_function = __qtscript_self.property("setSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelection") & QScriptValue::QObjectMember)) { + QTableWidget::setSelection(rect, command); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, command)); + } +} + +void QtScriptShell_QTableWidget::setSelectionModel(QItemSelectionModel* selectionModel) +{ + QScriptValue _q_function = __qtscript_self.property("setSelectionModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelectionModel") & QScriptValue::QObjectMember)) { + QTableWidget::setSelectionModel(selectionModel); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selectionModel)); + } +} + +void QtScriptShell_QTableWidget::setupViewport(QWidget* viewport) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QTableWidget::setupViewport(viewport); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, viewport)); + } +} + +QPainter* QtScriptShell_QTableWidget::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QTableWidget::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTableWidget::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QTableWidget::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTableWidget::sizeHintForColumn(int column) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForColumn"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForColumn") & QScriptValue::QObjectMember)) { + return QTableWidget::sizeHintForColumn(column); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column))); + } +} + +int QtScriptShell_QTableWidget::sizeHintForRow(int row) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForRow"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForRow") & QScriptValue::QObjectMember)) { + return QTableWidget::sizeHintForRow(row); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row))); + } +} + +void QtScriptShell_QTableWidget::startDrag(Qt::DropActions supportedActions) +{ + QScriptValue _q_function = __qtscript_self.property("startDrag"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startDrag") & QScriptValue::QObjectMember)) { + QTableWidget::startDrag(supportedActions); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, supportedActions)); + } +} + +Qt::DropActions QtScriptShell_QTableWidget::supportedDropActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDropActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDropActions") & QScriptValue::QObjectMember)) { + return QTableWidget::supportedDropActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTableWidget::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QTableWidget::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableWidget::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTableWidget::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTableWidget::updateEditorData() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorData") & QScriptValue::QObjectMember)) { + QTableWidget::updateEditorData(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTableWidget::updateEditorGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorGeometries") & QScriptValue::QObjectMember)) { + QTableWidget::updateEditorGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTableWidget::updateGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometries") & QScriptValue::QObjectMember)) { + QTableWidget::updateGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +int QtScriptShell_QTableWidget::verticalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("verticalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalOffset") & QScriptValue::QObjectMember)) { + return QTableWidget::verticalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTableWidget::verticalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarAction") & QScriptValue::QObjectMember)) { + QTableWidget::verticalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QTableWidget::verticalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QTableWidget::verticalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QStyleOptionViewItem QtScriptShell_QTableWidget::viewOptions() const +{ + QScriptValue _q_function = __qtscript_self.property("viewOptions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewOptions") & QScriptValue::QObjectMember)) { + return QTableWidget::viewOptions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QTableWidget::viewportEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QTableWidget::viewportEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +QSize QtScriptShell_QTableWidget::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QTableWidget::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QTableWidget::visualRect(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRect") & QScriptValue::QObjectMember)) { + return QTableWidget::visualRect(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QRegion QtScriptShell_QTableWidget::visualRegionForSelection(const QItemSelection& selection) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRegionForSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRegionForSelection") & QScriptValue::QObjectMember)) { + return QTableWidget::visualRegionForSelection(selection); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selection))); + } +} + +void QtScriptShell_QTableWidget::wheelEvent(QWheelEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QTableWidget::wheelEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableWidget.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableWidget.h new file mode 100644 index 00000000..e29ac906 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableWidget.h @@ -0,0 +1,105 @@ +#ifndef QTSCRIPTSHELL_QTABLEWIDGET_H +#define QTSCRIPTSHELL_QTABLEWIDGET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTableWidget : public QTableWidget +{ +public: + QtScriptShell_QTableWidget(QWidget* parent = 0); + QtScriptShell_QTableWidget(int rows, int columns, QWidget* parent = 0); + ~QtScriptShell_QTableWidget(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint); + void closeEvent(QCloseEvent* event); + void commitData(QWidget* editor); + void contextMenuEvent(QContextMenuEvent* arg__1); + void currentChanged(const QModelIndex& current, const QModelIndex& previous); + void customEvent(QEvent* event); + void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles); + int devType() const; + void doItemsLayout(); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + bool dropMimeData(int row, int column, const QMimeData* data, Qt::DropAction action); + bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event); + void editorDestroyed(QObject* editor); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + int horizontalOffset() const; + void horizontalScrollbarAction(int action); + void horizontalScrollbarValueChanged(int value); + QModelIndex indexAt(const QPoint& p) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isIndexHidden(const QModelIndex& index) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void keyboardSearch(const QString& search); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QStringList mimeTypes() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* e); + QPaintDevice* redirected(QPoint* offset) const; + void reset(); + void resizeEvent(QResizeEvent* event); + void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end); + void rowsInserted(const QModelIndex& parent, int start, int end); + void scrollContentsBy(int dx, int dy); + void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint); + void selectAll(); + QList selectedIndexes() const; + void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected); + QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const; + void setRootIndex(const QModelIndex& index); + void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command); + void setSelectionModel(QItemSelectionModel* selectionModel); + void setupViewport(QWidget* viewport); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + int sizeHintForColumn(int column) const; + int sizeHintForRow(int row) const; + void startDrag(Qt::DropActions supportedActions); + Qt::DropActions supportedDropActions() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void updateEditorData(); + void updateEditorGeometries(); + void updateGeometries(); + int verticalOffset() const; + void verticalScrollbarAction(int action); + void verticalScrollbarValueChanged(int value); + QStyleOptionViewItem viewOptions() const; + bool viewportEvent(QEvent* event); + QSize viewportSizeHint() const; + QRect visualRect(const QModelIndex& index) const; + QRegion visualRegionForSelection(const QItemSelection& selection) const; + void wheelEvent(QWheelEvent* arg__1); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTABLEWIDGET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableWidgetItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableWidgetItem.cpp new file mode 100644 index 00000000..70370c1a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableWidgetItem.cpp @@ -0,0 +1,65 @@ +#include "qtscriptshell_QTableWidgetItem.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QTableWidgetItem*) + +QtScriptShell_QTableWidgetItem::QtScriptShell_QTableWidgetItem(const QIcon& icon, const QString& text, int type) + : QTableWidgetItem(icon, text, type) {} + +QtScriptShell_QTableWidgetItem::QtScriptShell_QTableWidgetItem(const QString& text, int type) + : QTableWidgetItem(text, type) {} + +QtScriptShell_QTableWidgetItem::QtScriptShell_QTableWidgetItem(int type) + : QTableWidgetItem(type) {} + +QtScriptShell_QTableWidgetItem::~QtScriptShell_QTableWidgetItem() {} + +QTableWidgetItem* QtScriptShell_QTableWidgetItem::clone() const +{ + QScriptValue _q_function = __qtscript_self.property("clone"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clone") & QScriptValue::QObjectMember)) { + return QTableWidgetItem::clone(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QVariant QtScriptShell_QTableWidgetItem::data(int role) const +{ + QScriptValue _q_function = __qtscript_self.property("data"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("data") & QScriptValue::QObjectMember)) { + return QTableWidgetItem::data(role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, role))); + } +} + +void QtScriptShell_QTableWidgetItem::setData(int role, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("setData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setData") & QScriptValue::QObjectMember)) { + QTableWidgetItem::setData(role, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, role) + << qScriptValueFromValue(_q_engine, value)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableWidgetItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableWidgetItem.h new file mode 100644 index 00000000..b21f4c50 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTableWidgetItem.h @@ -0,0 +1,25 @@ +#ifndef QTSCRIPTSHELL_QTABLEWIDGETITEM_H +#define QTSCRIPTSHELL_QTABLEWIDGETITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTableWidgetItem : public QTableWidgetItem +{ +public: + QtScriptShell_QTableWidgetItem(const QIcon& icon, const QString& text, int type = Type); + QtScriptShell_QTableWidgetItem(const QString& text, int type = Type); + QtScriptShell_QTableWidgetItem(const QTableWidgetItem& other); + QtScriptShell_QTableWidgetItem(int type = Type); + ~QtScriptShell_QTableWidgetItem(); + + QTableWidgetItem* clone() const; + QVariant data(int role) const; + void setData(int role, const QVariant& value); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTABLEWIDGETITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextBrowser.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextBrowser.cpp new file mode 100644 index 00000000..52e4df0e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextBrowser.cpp @@ -0,0 +1,845 @@ +#include "qtscriptshell_QTextBrowser.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QMimeData*) +Q_DECLARE_METATYPE(QTextCursor) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QTextBrowser::QtScriptShell_QTextBrowser(QWidget* parent) + : QTextBrowser(parent) {} + +QtScriptShell_QTextBrowser::~QtScriptShell_QTextBrowser() {} + +void QtScriptShell_QTextBrowser::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTextBrowser::backward() +{ + QScriptValue _q_function = __qtscript_self.property("backward"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("backward") & QScriptValue::QObjectMember)) { + QTextBrowser::backward(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QTextBrowser::canInsertFromMimeData(const QMimeData* source) const +{ + QScriptValue _q_function = __qtscript_self.property("canInsertFromMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canInsertFromMimeData") & QScriptValue::QObjectMember)) { + return QTextBrowser::canInsertFromMimeData(source); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(source)))); + } +} + +void QtScriptShell_QTextBrowser::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextBrowser::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTextBrowser::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTextBrowser::contextMenuEvent(QContextMenuEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::contextMenuEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QMimeData* QtScriptShell_QTextBrowser::createMimeDataFromSelection() const +{ + QScriptValue _q_function = __qtscript_self.property("createMimeDataFromSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createMimeDataFromSelection") & QScriptValue::QObjectMember)) { + return QTextBrowser::createMimeDataFromSelection(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTextBrowser::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTextBrowser::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QTextBrowser::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTextBrowser::doSetTextCursor(const QTextCursor& cursor) +{ + QScriptValue _q_function = __qtscript_self.property("doSetTextCursor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("doSetTextCursor") & QScriptValue::QObjectMember)) { + QTextBrowser::doSetTextCursor(cursor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, cursor)); + } +} + +void QtScriptShell_QTextBrowser::dragEnterEvent(QDragEnterEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::dragEnterEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextBrowser::dragLeaveEvent(QDragLeaveEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::dragLeaveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextBrowser::dragMoveEvent(QDragMoveEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::dragMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextBrowser::dropEvent(QDropEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::dropEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextBrowser::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTextBrowser::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTextBrowser::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QTextBrowser::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTextBrowser::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QTextBrowser::focusInEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::focusInEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QTextBrowser::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QTextBrowser::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QTextBrowser::focusOutEvent(QFocusEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::focusOutEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QTextBrowser::forward() +{ + QScriptValue _q_function = __qtscript_self.property("forward"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("forward") & QScriptValue::QObjectMember)) { + QTextBrowser::forward(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QTextBrowser::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QTextBrowser::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QTextBrowser::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QTextBrowser::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTextBrowser::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTextBrowser::home() +{ + QScriptValue _q_function = __qtscript_self.property("home"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("home") & QScriptValue::QObjectMember)) { + QTextBrowser::home(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTextBrowser::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QTextBrowser::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QTextBrowser::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QTextBrowser::inputMethodQuery(Qt::InputMethodQuery property) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QTextBrowser::inputMethodQuery(property); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, property))); + } +} + +void QtScriptShell_QTextBrowser::insertFromMimeData(const QMimeData* source) +{ + QScriptValue _q_function = __qtscript_self.property("insertFromMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertFromMimeData") & QScriptValue::QObjectMember)) { + QTextBrowser::insertFromMimeData(source); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(source))); + } +} + +void QtScriptShell_QTextBrowser::keyPressEvent(QKeyEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::keyPressEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QTextBrowser::keyReleaseEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::keyReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextBrowser::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QTextBrowser::loadResource(int type, const QUrl& name) +{ + QScriptValue _q_function = __qtscript_self.property("loadResource"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("loadResource") & QScriptValue::QObjectMember)) { + return QTextBrowser::loadResource(type, name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, type) + << qScriptValueFromValue(_q_engine, name))); + } +} + +int QtScriptShell_QTextBrowser::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QTextBrowser::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTextBrowser::mouseDoubleClickEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::mouseDoubleClickEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextBrowser::mouseMoveEvent(QMouseEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::mouseMoveEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QTextBrowser::mousePressEvent(QMouseEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::mousePressEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QTextBrowser::mouseReleaseEvent(QMouseEvent* ev) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::mouseReleaseEvent(ev); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ev)); + } +} + +void QtScriptShell_QTextBrowser::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTextBrowser::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QTextBrowser::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QTextBrowser::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QTextBrowser::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTextBrowser::paintEvent(QPaintEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::paintEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QPaintDevice* QtScriptShell_QTextBrowser::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QTextBrowser::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QTextBrowser::reload() +{ + QScriptValue _q_function = __qtscript_self.property("reload"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reload") & QScriptValue::QObjectMember)) { + QTextBrowser::reload(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTextBrowser::resizeEvent(QResizeEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::resizeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextBrowser::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QTextBrowser::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QTextBrowser::setSource(const QUrl& name) +{ + QScriptValue _q_function = __qtscript_self.property("setSource"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSource") & QScriptValue::QObjectMember)) { + QTextBrowser::setSource(name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name)); + } +} + +void QtScriptShell_QTextBrowser::setupViewport(QWidget* viewport) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QTextBrowser::setupViewport(viewport); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, viewport)); + } +} + +QPainter* QtScriptShell_QTextBrowser::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QTextBrowser::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTextBrowser::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTextBrowser::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTextBrowser::timerEvent(QTimerEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::timerEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QTextBrowser::viewportEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QTextBrowser::viewportEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QTextBrowser::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QTextBrowser::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTextBrowser::wheelEvent(QWheelEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QTextBrowser::wheelEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextBrowser.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextBrowser.h new file mode 100644 index 00000000..c8c87188 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextBrowser.h @@ -0,0 +1,75 @@ +#ifndef QTSCRIPTSHELL_QTEXTBROWSER_H +#define QTSCRIPTSHELL_QTEXTBROWSER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextBrowser : public QTextBrowser +{ +public: + QtScriptShell_QTextBrowser(QWidget* parent = 0); + ~QtScriptShell_QTextBrowser(); + + void actionEvent(QActionEvent* event); + void backward(); + bool canInsertFromMimeData(const QMimeData* source) const; + void changeEvent(QEvent* e); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* e); + QMimeData* createMimeDataFromSelection() const; + void customEvent(QEvent* event); + int devType() const; + void doSetTextCursor(const QTextCursor& cursor); + void dragEnterEvent(QDragEnterEvent* e); + void dragLeaveEvent(QDragLeaveEvent* e); + void dragMoveEvent(QDragMoveEvent* e); + void dropEvent(QDropEvent* e); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* e); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* ev); + void forward(); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void home(); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery property) const; + void insertFromMimeData(const QMimeData* source); + void keyPressEvent(QKeyEvent* ev); + void keyReleaseEvent(QKeyEvent* e); + void leaveEvent(QEvent* event); + QVariant loadResource(int type, const QUrl& name); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* e); + void mouseMoveEvent(QMouseEvent* ev); + void mousePressEvent(QMouseEvent* ev); + void mouseReleaseEvent(QMouseEvent* ev); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* e); + QPaintDevice* redirected(QPoint* offset) const; + void reload(); + void resizeEvent(QResizeEvent* e); + void scrollContentsBy(int dx, int dy); + void setSource(const QUrl& name); + void setupViewport(QWidget* viewport); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* e); + bool viewportEvent(QEvent* arg__1); + QSize viewportSizeHint() const; + void wheelEvent(QWheelEvent* e); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTBROWSER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextEdit.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextEdit.cpp new file mode 100644 index 00000000..29b46b2a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextEdit.cpp @@ -0,0 +1,790 @@ +#include "qtscriptshell_QTextEdit.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QMimeData*) +Q_DECLARE_METATYPE(QTextCursor) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QTextEdit::QtScriptShell_QTextEdit(QWidget* parent) + : QTextEdit(parent) {} + +QtScriptShell_QTextEdit::QtScriptShell_QTextEdit(const QString& text, QWidget* parent) + : QTextEdit(text, parent) {} + +QtScriptShell_QTextEdit::~QtScriptShell_QTextEdit() {} + +void QtScriptShell_QTextEdit::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QTextEdit::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTextEdit::canInsertFromMimeData(const QMimeData* source) const +{ + QScriptValue _q_function = __qtscript_self.property("canInsertFromMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("canInsertFromMimeData") & QScriptValue::QObjectMember)) { + return QTextEdit::canInsertFromMimeData(source); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(source)))); + } +} + +void QtScriptShell_QTextEdit::changeEvent(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QTextEdit::changeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextEdit::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTextEdit::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTextEdit::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QTextEdit::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTextEdit::contextMenuEvent(QContextMenuEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QTextEdit::contextMenuEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QMimeData* QtScriptShell_QTextEdit::createMimeDataFromSelection() const +{ + QScriptValue _q_function = __qtscript_self.property("createMimeDataFromSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createMimeDataFromSelection") & QScriptValue::QObjectMember)) { + return QTextEdit::createMimeDataFromSelection(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTextEdit::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTextEdit::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTextEdit::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QTextEdit::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTextEdit::doSetTextCursor(const QTextCursor& cursor) +{ + QScriptValue _q_function = __qtscript_self.property("doSetTextCursor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("doSetTextCursor") & QScriptValue::QObjectMember)) { + QTextEdit::doSetTextCursor(cursor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, cursor)); + } +} + +void QtScriptShell_QTextEdit::dragEnterEvent(QDragEnterEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QTextEdit::dragEnterEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextEdit::dragLeaveEvent(QDragLeaveEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QTextEdit::dragLeaveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextEdit::dragMoveEvent(QDragMoveEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QTextEdit::dragMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextEdit::dropEvent(QDropEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QTextEdit::dropEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextEdit::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QTextEdit::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTextEdit::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTextEdit::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QTextEdit::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTextEdit::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QTextEdit::focusInEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QTextEdit::focusInEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QTextEdit::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QTextEdit::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QTextEdit::focusOutEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QTextEdit::focusOutEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QTextEdit::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QTextEdit::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QTextEdit::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QTextEdit::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTextEdit::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QTextEdit::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTextEdit::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QTextEdit::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QTextEdit::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QTextEdit::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QTextEdit::inputMethodQuery(Qt::InputMethodQuery property) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QTextEdit::inputMethodQuery(property); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, property))); + } +} + +void QtScriptShell_QTextEdit::insertFromMimeData(const QMimeData* source) +{ + QScriptValue _q_function = __qtscript_self.property("insertFromMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("insertFromMimeData") & QScriptValue::QObjectMember)) { + QTextEdit::insertFromMimeData(source); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(source))); + } +} + +void QtScriptShell_QTextEdit::keyPressEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QTextEdit::keyPressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextEdit::keyReleaseEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QTextEdit::keyReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextEdit::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QTextEdit::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QTextEdit::loadResource(int type, const QUrl& name) +{ + QScriptValue _q_function = __qtscript_self.property("loadResource"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("loadResource") & QScriptValue::QObjectMember)) { + return QTextEdit::loadResource(type, name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, type) + << qScriptValueFromValue(_q_engine, name))); + } +} + +int QtScriptShell_QTextEdit::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QTextEdit::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTextEdit::mouseDoubleClickEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QTextEdit::mouseDoubleClickEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextEdit::mouseMoveEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QTextEdit::mouseMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextEdit::mousePressEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QTextEdit::mousePressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextEdit::mouseReleaseEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QTextEdit::mouseReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextEdit::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QTextEdit::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTextEdit::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QTextEdit::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QTextEdit::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QTextEdit::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTextEdit::paintEvent(QPaintEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QTextEdit::paintEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QPaintDevice* QtScriptShell_QTextEdit::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QTextEdit::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QTextEdit::resizeEvent(QResizeEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QTextEdit::resizeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QTextEdit::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QTextEdit::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QTextEdit::setupViewport(QWidget* viewport) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QTextEdit::setupViewport(viewport); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, viewport)); + } +} + +QPainter* QtScriptShell_QTextEdit::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QTextEdit::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTextEdit::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QTextEdit::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTextEdit::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QTextEdit::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTextEdit::timerEvent(QTimerEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTextEdit::timerEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QTextEdit::viewportEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QTextEdit::viewportEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QTextEdit::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QTextEdit::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTextEdit::wheelEvent(QWheelEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QTextEdit::wheelEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextEdit.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextEdit.h new file mode 100644 index 00000000..fadd63dc --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextEdit.h @@ -0,0 +1,71 @@ +#ifndef QTSCRIPTSHELL_QTEXTEDIT_H +#define QTSCRIPTSHELL_QTEXTEDIT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextEdit : public QTextEdit +{ +public: + QtScriptShell_QTextEdit(QWidget* parent = 0); + QtScriptShell_QTextEdit(const QString& text, QWidget* parent = 0); + ~QtScriptShell_QTextEdit(); + + void actionEvent(QActionEvent* event); + bool canInsertFromMimeData(const QMimeData* source) const; + void changeEvent(QEvent* e); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* e); + QMimeData* createMimeDataFromSelection() const; + void customEvent(QEvent* event); + int devType() const; + void doSetTextCursor(const QTextCursor& cursor); + void dragEnterEvent(QDragEnterEvent* e); + void dragLeaveEvent(QDragLeaveEvent* e); + void dragMoveEvent(QDragMoveEvent* e); + void dropEvent(QDropEvent* e); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* e); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* e); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery property) const; + void insertFromMimeData(const QMimeData* source); + void keyPressEvent(QKeyEvent* e); + void keyReleaseEvent(QKeyEvent* e); + void leaveEvent(QEvent* event); + QVariant loadResource(int type, const QUrl& name); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* e); + void mouseMoveEvent(QMouseEvent* e); + void mousePressEvent(QMouseEvent* e); + void mouseReleaseEvent(QMouseEvent* e); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* e); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* e); + void scrollContentsBy(int dx, int dy); + void setupViewport(QWidget* viewport); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* e); + bool viewportEvent(QEvent* arg__1); + QSize viewportSizeHint() const; + void wheelEvent(QWheelEvent* e); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTEDIT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextEdit_ExtraSelection.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextEdit_ExtraSelection.cpp new file mode 100644 index 00000000..48e36c4f --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextEdit_ExtraSelection.cpp @@ -0,0 +1,13 @@ +#include "qtscriptshell_QTextEdit_ExtraSelection.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QTextEdit_ExtraSelection::QtScriptShell_QTextEdit_ExtraSelection() + : QTextEdit::ExtraSelection() {} + +QtScriptShell_QTextEdit_ExtraSelection::~QtScriptShell_QTextEdit_ExtraSelection() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextEdit_ExtraSelection.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextEdit_ExtraSelection.h new file mode 100644 index 00000000..10e703a3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTextEdit_ExtraSelection.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QTEXTEDIT_EXTRASELECTION_H +#define QTSCRIPTSHELL_QTEXTEDIT_EXTRASELECTION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTextEdit_ExtraSelection : public QTextEdit::ExtraSelection +{ +public: + QtScriptShell_QTextEdit_ExtraSelection(); + ~QtScriptShell_QTextEdit_ExtraSelection(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTEXTEDIT_EXTRASELECTION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTimeEdit.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTimeEdit.cpp new file mode 100644 index 00000000..f85ded90 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTimeEdit.cpp @@ -0,0 +1,751 @@ +#include "qtscriptshell_QTimeEdit.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QValidator::State) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QTimeEdit::QtScriptShell_QTimeEdit(QWidget* parent) + : QTimeEdit(parent) {} + +QtScriptShell_QTimeEdit::QtScriptShell_QTimeEdit(const QTime& time, QWidget* parent) + : QTimeEdit(time, parent) {} + +QtScriptShell_QTimeEdit::~QtScriptShell_QTimeEdit() {} + +void QtScriptShell_QTimeEdit::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::changeEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::changeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::clear() +{ + QScriptValue _q_function = __qtscript_self.property("clear"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clear") & QScriptValue::QObjectMember)) { + QTimeEdit::clear(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTimeEdit::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QDateTime QtScriptShell_QTimeEdit::dateTimeFromText(const QString& text) const +{ + QScriptValue _q_function = __qtscript_self.property("dateTimeFromText"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dateTimeFromText") & QScriptValue::QObjectMember)) { + return QTimeEdit::dateTimeFromText(text); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, text))); + } +} + +int QtScriptShell_QTimeEdit::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QTimeEdit::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTimeEdit::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTimeEdit::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTimeEdit::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTimeEdit::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTimeEdit::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QTimeEdit::fixup(QString& input) const +{ + QScriptValue _q_function = __qtscript_self.property("fixup"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fixup") & QScriptValue::QObjectMember)) { + QTimeEdit::fixup(input); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, input)); + } +} + +void QtScriptShell_QTimeEdit::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTimeEdit::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QTimeEdit::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QTimeEdit::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTimeEdit::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QTimeEdit::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QTimeEdit::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QTimeEdit::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTimeEdit::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QTimeEdit::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QTimeEdit::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QTimeEdit::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QTimeEdit::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTimeEdit::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTimeEdit::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QTimeEdit::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTimeEdit::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTimeEdit::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QTimeEdit::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QTimeEdit::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QTimeEdit::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTimeEdit::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QTimeEdit::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QTimeEdit::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QTimeEdit::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QTimeEdit::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QTimeEdit::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTimeEdit::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTimeEdit::stepBy(int steps) +{ + QScriptValue _q_function = __qtscript_self.property("stepBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("stepBy") & QScriptValue::QObjectMember)) { + QTimeEdit::stepBy(steps); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, steps)); + } +} + +QAbstractSpinBox::StepEnabled QtScriptShell_QTimeEdit::stepEnabled() const +{ + QScriptValue _q_function = __qtscript_self.property("stepEnabled"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("stepEnabled") & QScriptValue::QObjectMember)) { + return QTimeEdit::stepEnabled(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTimeEdit::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QString QtScriptShell_QTimeEdit::textFromDateTime(const QDateTime& dt) const +{ + QScriptValue _q_function = __qtscript_self.property("textFromDateTime"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("textFromDateTime") & QScriptValue::QObjectMember)) { + return QTimeEdit::textFromDateTime(dt); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dt))); + } +} + +void QtScriptShell_QTimeEdit::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QValidator::State QtScriptShell_QTimeEdit::validate(QString& input, int& pos) const +{ + QScriptValue _q_function = __qtscript_self.property("validate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("validate") & QScriptValue::QObjectMember)) { + return QTimeEdit::validate(input, pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, input) + << qScriptValueFromValue(_q_engine, pos))); + } +} + +void QtScriptShell_QTimeEdit::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QTimeEdit::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTimeEdit.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTimeEdit.h new file mode 100644 index 00000000..7d7f2e07 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTimeEdit.h @@ -0,0 +1,69 @@ +#ifndef QTSCRIPTSHELL_QTIMEEDIT_H +#define QTSCRIPTSHELL_QTIMEEDIT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTimeEdit : public QTimeEdit +{ +public: + QtScriptShell_QTimeEdit(QWidget* parent = 0); + QtScriptShell_QTimeEdit(const QTime& time, QWidget* parent = 0); + ~QtScriptShell_QTimeEdit(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* event); + void childEvent(QChildEvent* event); + void clear(); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + QDateTime dateTimeFromText(const QString& text) const; + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void fixup(QString& input) const; + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void stepBy(int steps); + QAbstractSpinBox::StepEnabled stepEnabled() const; + void tabletEvent(QTabletEvent* event); + QString textFromDateTime(const QDateTime& dt) const; + void timerEvent(QTimerEvent* event); + QValidator::State validate(QString& input, int& pos) const; + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTIMEEDIT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolBar.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolBar.cpp new file mode 100644 index 00000000..3bbddcde --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolBar.cpp @@ -0,0 +1,675 @@ +#include "qtscriptshell_QToolBar.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QToolBar::QtScriptShell_QToolBar(QWidget* parent) + : QToolBar(parent) {} + +QtScriptShell_QToolBar::QtScriptShell_QToolBar(const QString& title, QWidget* parent) + : QToolBar(title, parent) {} + +QtScriptShell_QToolBar::~QtScriptShell_QToolBar() {} + +void QtScriptShell_QToolBar::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QToolBar::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::changeEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QToolBar::changeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QToolBar::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QToolBar::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QToolBar::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QToolBar::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QToolBar::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QToolBar::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QToolBar::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QToolBar::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QToolBar::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QToolBar::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QToolBar::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QToolBar::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QToolBar::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QToolBar::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QToolBar::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QToolBar::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QToolBar::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QToolBar::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QToolBar::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QToolBar::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QToolBar::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QToolBar::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QToolBar::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QToolBar::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QToolBar::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QToolBar::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QToolBar::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QToolBar::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QToolBar::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QToolBar::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QToolBar::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QToolBar::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QToolBar::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QToolBar::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QToolBar::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QToolBar::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QToolBar::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QToolBar::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QToolBar::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QToolBar::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QToolBar::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QToolBar::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QToolBar::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QToolBar::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QToolBar::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QToolBar::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QToolBar::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QToolBar::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QToolBar::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QToolBar::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QToolBar::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QToolBar::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QToolBar::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QToolBar::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QToolBar::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QToolBar::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QToolBar::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QToolBar::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QToolBar::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QToolBar::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QToolBar::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_QToolBar::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QToolBar::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QToolBar::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QToolBar::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QToolBar::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBar::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QToolBar::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolBar.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolBar.h new file mode 100644 index 00000000..af119377 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolBar.h @@ -0,0 +1,64 @@ +#ifndef QTSCRIPTSHELL_QTOOLBAR_H +#define QTSCRIPTSHELL_QTOOLBAR_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QToolBar : public QToolBar +{ +public: + QtScriptShell_QToolBar(QWidget* parent = 0); + QtScriptShell_QToolBar(const QString& title, QWidget* parent = 0); + ~QtScriptShell_QToolBar(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* event); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTOOLBAR_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolBox.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolBox.cpp new file mode 100644 index 00000000..e06149a5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolBox.cpp @@ -0,0 +1,689 @@ +#include "qtscriptshell_QToolBox.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QToolBox::QtScriptShell_QToolBox(QWidget* parent, Qt::WindowFlags f) + : QToolBox(parent, f) {} + +QtScriptShell_QToolBox::~QtScriptShell_QToolBox() {} + +void QtScriptShell_QToolBox::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QToolBox::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QToolBox::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QToolBox::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QToolBox::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QToolBox::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QToolBox::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QToolBox::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QToolBox::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QToolBox::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QToolBox::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QToolBox::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QToolBox::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QToolBox::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QToolBox::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QToolBox::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QToolBox::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QToolBox::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QToolBox::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QToolBox::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QToolBox::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QToolBox::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QToolBox::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QToolBox::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QToolBox::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QToolBox::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QToolBox::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QToolBox::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QToolBox::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QToolBox::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QToolBox::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QToolBox::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QToolBox::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QToolBox::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QToolBox::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QToolBox::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QToolBox::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QToolBox::itemInserted(int index) +{ + QScriptValue _q_function = __qtscript_self.property("itemInserted"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemInserted") & QScriptValue::QObjectMember)) { + QToolBox::itemInserted(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QToolBox::itemRemoved(int index) +{ + QScriptValue _q_function = __qtscript_self.property("itemRemoved"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemRemoved") & QScriptValue::QObjectMember)) { + QToolBox::itemRemoved(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QToolBox::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QToolBox::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QToolBox::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QToolBox::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QToolBox::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QToolBox::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QToolBox::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QToolBox::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QToolBox::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QToolBox::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QToolBox::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QToolBox::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QToolBox::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QToolBox::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QToolBox::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QToolBox::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QToolBox::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QToolBox::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QToolBox::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QToolBox::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QToolBox::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QToolBox::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QToolBox::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QToolBox::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QToolBox::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QToolBox::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QToolBox::showEvent(QShowEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QToolBox::showEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QToolBox::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QToolBox::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QToolBox::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolBox::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QToolBox::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolBox.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolBox.h new file mode 100644 index 00000000..7bd7b534 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolBox.h @@ -0,0 +1,64 @@ +#ifndef QTSCRIPTSHELL_QTOOLBOX_H +#define QTSCRIPTSHELL_QTOOLBOX_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QToolBox : public QToolBox +{ +public: + QtScriptShell_QToolBox(QWidget* parent = 0, Qt::WindowFlags f = Qt::WindowFlags()); + ~QtScriptShell_QToolBox(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void itemInserted(int index); + void itemRemoved(int index); + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* e); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTOOLBOX_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolButton.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolButton.cpp new file mode 100644 index 00000000..ff30c744 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolButton.cpp @@ -0,0 +1,688 @@ +#include "qtscriptshell_QToolButton.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QToolButton::QtScriptShell_QToolButton(QWidget* parent) + : QToolButton(parent) {} + +QtScriptShell_QToolButton::~QtScriptShell_QToolButton() {} + +void QtScriptShell_QToolButton::actionEvent(QActionEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QToolButton::actionEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QToolButton::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QToolButton::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QToolButton::checkStateSet() +{ + QScriptValue _q_function = __qtscript_self.property("checkStateSet"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("checkStateSet") & QScriptValue::QObjectMember)) { + QToolButton::checkStateSet(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QToolButton::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QToolButton::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolButton::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QToolButton::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolButton::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QToolButton::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolButton::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QToolButton::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QToolButton::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QToolButton::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QToolButton::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QToolButton::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolButton::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QToolButton::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolButton::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QToolButton::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolButton::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QToolButton::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolButton::enterEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QToolButton::enterEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +bool QtScriptShell_QToolButton::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QToolButton::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QToolButton::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QToolButton::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QToolButton::focusInEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QToolButton::focusInEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QToolButton::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QToolButton::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QToolButton::focusOutEvent(QFocusEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QToolButton::focusOutEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QToolButton::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QToolButton::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QToolButton::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QToolButton::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QToolButton::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QToolButton::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QToolButton::hitButton(const QPoint& pos) const +{ + QScriptValue _q_function = __qtscript_self.property("hitButton"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hitButton") & QScriptValue::QObjectMember)) { + return QToolButton::hitButton(pos); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, pos))); + } +} + +void QtScriptShell_QToolButton::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QToolButton::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QToolButton::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QToolButton::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QToolButton::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QToolButton::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QToolButton::keyPressEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QToolButton::keyPressEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QToolButton::keyReleaseEvent(QKeyEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QToolButton::keyReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QToolButton::leaveEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QToolButton::leaveEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +int QtScriptShell_QToolButton::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QToolButton::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QToolButton::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QToolButton::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolButton::mouseMoveEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QToolButton::mouseMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QToolButton::mousePressEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QToolButton::mousePressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QToolButton::mouseReleaseEvent(QMouseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QToolButton::mouseReleaseEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QToolButton::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QToolButton::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QToolButton::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QToolButton::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +void QtScriptShell_QToolButton::nextCheckState() +{ + QScriptValue _q_function = __qtscript_self.property("nextCheckState"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nextCheckState") & QScriptValue::QObjectMember)) { + QToolButton::nextCheckState(); + } else { + _q_function.call(__qtscript_self); + } +} + +QPaintEngine* QtScriptShell_QToolButton::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QToolButton::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QToolButton::paintEvent(QPaintEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QToolButton::paintEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QPaintDevice* QtScriptShell_QToolButton::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QToolButton::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QToolButton::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QToolButton::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QToolButton::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QToolButton::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QToolButton::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QToolButton::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolButton::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QToolButton::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QToolButton::timerEvent(QTimerEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QToolButton::timerEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QToolButton::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QToolButton::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolButton.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolButton.h new file mode 100644 index 00000000..6d57bfcd --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QToolButton.h @@ -0,0 +1,64 @@ +#ifndef QTSCRIPTSHELL_QTOOLBUTTON_H +#define QTSCRIPTSHELL_QTOOLBUTTON_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QToolButton : public QToolButton +{ +public: + QtScriptShell_QToolButton(QWidget* parent = 0); + ~QtScriptShell_QToolButton(); + + void actionEvent(QActionEvent* arg__1); + void changeEvent(QEvent* arg__1); + void checkStateSet(); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* arg__1); + bool event(QEvent* e); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* e); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* e); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + bool hitButton(const QPoint& pos) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* e); + void keyReleaseEvent(QKeyEvent* e); + void leaveEvent(QEvent* arg__1); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* e); + void mousePressEvent(QMouseEvent* arg__1); + void mouseReleaseEvent(QMouseEvent* arg__1); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + void nextCheckState(); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* arg__1); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* arg__1); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTOOLBUTTON_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeView.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeView.cpp new file mode 100644 index 00000000..7c9a58a9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeView.cpp @@ -0,0 +1,1255 @@ +#include "qtscriptshell_QTreeView.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QStyleOptionViewItem) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::EditTrigger) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::ScrollHint) +Q_DECLARE_METATYPE(const QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAbstractItemModel*) +Q_DECLARE_METATYPE(QItemSelectionModel*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QTreeView::QtScriptShell_QTreeView(QWidget* parent) + : QTreeView(parent) {} + +QtScriptShell_QTreeView::~QtScriptShell_QTreeView() {} + +void QtScriptShell_QTreeView::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QTreeView::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeView::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QTreeView::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTreeView::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTreeView::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeView::closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("closeEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEditor") & QScriptValue::QObjectMember)) { + QTreeView::closeEditor(editor, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QTreeView::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QTreeView::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeView::commitData(QWidget* editor) +{ + QScriptValue _q_function = __qtscript_self.property("commitData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("commitData") & QScriptValue::QObjectMember)) { + QTreeView::commitData(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QTreeView::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QTreeView::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTreeView::currentChanged(const QModelIndex& current, const QModelIndex& previous) +{ + QScriptValue _q_function = __qtscript_self.property("currentChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("currentChanged") & QScriptValue::QObjectMember)) { + QTreeView::currentChanged(current, previous); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, current) + << qScriptValueFromValue(_q_engine, previous)); + } +} + +void QtScriptShell_QTreeView::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTreeView::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeView::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) +{ + QScriptValue _q_function = __qtscript_self.property("dataChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dataChanged") & QScriptValue::QObjectMember)) { + QTreeView::dataChanged(topLeft, bottomRight, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, topLeft) + << qScriptValueFromValue(_q_engine, bottomRight) + << qScriptValueFromValue(_q_engine, roles)); + } +} + +int QtScriptShell_QTreeView::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QTreeView::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTreeView::doItemsLayout() +{ + QScriptValue _q_function = __qtscript_self.property("doItemsLayout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("doItemsLayout") & QScriptValue::QObjectMember)) { + QTreeView::doItemsLayout(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTreeView::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QTreeView::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeView::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QTreeView::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeView::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QTreeView::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeView::drawBranches(QPainter* painter, const QRect& rect, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("drawBranches"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawBranches") & QScriptValue::QObjectMember)) { + QTreeView::drawBranches(painter, rect, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QTreeView::drawRow(QPainter* painter, const QStyleOptionViewItem& options, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("drawRow"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawRow") & QScriptValue::QObjectMember)) { + QTreeView::drawRow(painter, options, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, options) + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QTreeView::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QTreeView::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTreeView::edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("edit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("edit") & QScriptValue::QObjectMember)) { + return QTreeView::edit(index, trigger, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, trigger) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QTreeView::editorDestroyed(QObject* editor) +{ + QScriptValue _q_function = __qtscript_self.property("editorDestroyed"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("editorDestroyed") & QScriptValue::QObjectMember)) { + QTreeView::editorDestroyed(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QTreeView::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QTreeView::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTreeView::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTreeView::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QTreeView::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTreeView::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QTreeView::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QTreeView::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTreeView::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QTreeView::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QTreeView::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QTreeView::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTreeView::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QTreeView::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QTreeView::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QTreeView::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTreeView::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QTreeView::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTreeView::horizontalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("horizontalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalOffset") & QScriptValue::QObjectMember)) { + return QTreeView::horizontalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTreeView::horizontalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarAction") & QScriptValue::QObjectMember)) { + QTreeView::horizontalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QTreeView::horizontalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QTreeView::horizontalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QModelIndex QtScriptShell_QTreeView::indexAt(const QPoint& p) const +{ + QScriptValue _q_function = __qtscript_self.property("indexAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexAt") & QScriptValue::QObjectMember)) { + return QTreeView::indexAt(p); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, p))); + } +} + +void QtScriptShell_QTreeView::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QTreeView::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QTreeView::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QTreeView::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QTreeView::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QTreeView::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QTreeView::isIndexHidden(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("isIndexHidden"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isIndexHidden") & QScriptValue::QObjectMember)) { + return QTreeView::isIndexHidden(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QTreeView::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QTreeView::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeView::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QTreeView::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeView::keyboardSearch(const QString& search) +{ + QScriptValue _q_function = __qtscript_self.property("keyboardSearch"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyboardSearch") & QScriptValue::QObjectMember)) { + QTreeView::keyboardSearch(search); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, search)); + } +} + +void QtScriptShell_QTreeView::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QTreeView::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTreeView::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QTreeView::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTreeView::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QTreeView::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeView::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QTreeView::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeView::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QTreeView::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeView::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QTreeView::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeView::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QTreeView::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTreeView::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QTreeView::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QTreeView::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QTreeView::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTreeView::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QTreeView::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QTreeView::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QTreeView::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QTreeView::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + QTreeView::reset(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTreeView::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QTreeView::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeView::rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsAboutToBeRemoved"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsAboutToBeRemoved") & QScriptValue::QObjectMember)) { + QTreeView::rowsAboutToBeRemoved(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QTreeView::rowsInserted(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsInserted"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsInserted") & QScriptValue::QObjectMember)) { + QTreeView::rowsInserted(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QTreeView::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QTreeView::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QTreeView::scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("scrollTo"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollTo") & QScriptValue::QObjectMember)) { + QTreeView::scrollTo(index, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QTreeView::selectAll() +{ + QScriptValue _q_function = __qtscript_self.property("selectAll"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectAll") & QScriptValue::QObjectMember)) { + QTreeView::selectAll(); + } else { + _q_function.call(__qtscript_self); + } +} + +QList QtScriptShell_QTreeView::selectedIndexes() const +{ + QScriptValue _q_function = __qtscript_self.property("selectedIndexes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectedIndexes") & QScriptValue::QObjectMember)) { + return QTreeView::selectedIndexes(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTreeView::selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) +{ + QScriptValue _q_function = __qtscript_self.property("selectionChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionChanged") & QScriptValue::QObjectMember)) { + QTreeView::selectionChanged(selected, deselected); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selected) + << qScriptValueFromValue(_q_engine, deselected)); + } +} + +QItemSelectionModel::SelectionFlags QtScriptShell_QTreeView::selectionCommand(const QModelIndex& index, const QEvent* event) const +{ + QScriptValue _q_function = __qtscript_self.property("selectionCommand"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionCommand") & QScriptValue::QObjectMember)) { + return QTreeView::selectionCommand(index, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, const_cast(event)))); + } +} + +void QtScriptShell_QTreeView::setModel(QAbstractItemModel* model) +{ + QScriptValue _q_function = __qtscript_self.property("setModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setModel") & QScriptValue::QObjectMember)) { + QTreeView::setModel(model); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, model)); + } +} + +void QtScriptShell_QTreeView::setRootIndex(const QModelIndex& index) +{ + QScriptValue _q_function = __qtscript_self.property("setRootIndex"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setRootIndex") & QScriptValue::QObjectMember)) { + QTreeView::setRootIndex(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QTreeView::setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) +{ + QScriptValue _q_function = __qtscript_self.property("setSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelection") & QScriptValue::QObjectMember)) { + QTreeView::setSelection(rect, command); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, command)); + } +} + +void QtScriptShell_QTreeView::setSelectionModel(QItemSelectionModel* selectionModel) +{ + QScriptValue _q_function = __qtscript_self.property("setSelectionModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelectionModel") & QScriptValue::QObjectMember)) { + QTreeView::setSelectionModel(selectionModel); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selectionModel)); + } +} + +void QtScriptShell_QTreeView::setupViewport(QWidget* viewport) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QTreeView::setupViewport(viewport); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, viewport)); + } +} + +QPainter* QtScriptShell_QTreeView::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QTreeView::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTreeView::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QTreeView::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTreeView::sizeHintForColumn(int column) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForColumn"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForColumn") & QScriptValue::QObjectMember)) { + return QTreeView::sizeHintForColumn(column); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column))); + } +} + +int QtScriptShell_QTreeView::sizeHintForRow(int row) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForRow"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForRow") & QScriptValue::QObjectMember)) { + return QTreeView::sizeHintForRow(row); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row))); + } +} + +void QtScriptShell_QTreeView::startDrag(Qt::DropActions supportedActions) +{ + QScriptValue _q_function = __qtscript_self.property("startDrag"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startDrag") & QScriptValue::QObjectMember)) { + QTreeView::startDrag(supportedActions); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, supportedActions)); + } +} + +void QtScriptShell_QTreeView::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QTreeView::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeView::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTreeView::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeView::updateEditorData() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorData") & QScriptValue::QObjectMember)) { + QTreeView::updateEditorData(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTreeView::updateEditorGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorGeometries") & QScriptValue::QObjectMember)) { + QTreeView::updateEditorGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTreeView::updateGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometries") & QScriptValue::QObjectMember)) { + QTreeView::updateGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +int QtScriptShell_QTreeView::verticalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("verticalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalOffset") & QScriptValue::QObjectMember)) { + return QTreeView::verticalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTreeView::verticalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarAction") & QScriptValue::QObjectMember)) { + QTreeView::verticalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QTreeView::verticalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QTreeView::verticalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QStyleOptionViewItem QtScriptShell_QTreeView::viewOptions() const +{ + QScriptValue _q_function = __qtscript_self.property("viewOptions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewOptions") & QScriptValue::QObjectMember)) { + return QTreeView::viewOptions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QTreeView::viewportEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QTreeView::viewportEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +QSize QtScriptShell_QTreeView::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QTreeView::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QTreeView::visualRect(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRect") & QScriptValue::QObjectMember)) { + return QTreeView::visualRect(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QRegion QtScriptShell_QTreeView::visualRegionForSelection(const QItemSelection& selection) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRegionForSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRegionForSelection") & QScriptValue::QObjectMember)) { + return QTreeView::visualRegionForSelection(selection); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selection))); + } +} + +void QtScriptShell_QTreeView::wheelEvent(QWheelEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QTreeView::wheelEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeView.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeView.h new file mode 100644 index 00000000..3e719ba5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeView.h @@ -0,0 +1,104 @@ +#ifndef QTSCRIPTSHELL_QTREEVIEW_H +#define QTSCRIPTSHELL_QTREEVIEW_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTreeView : public QTreeView +{ +public: + QtScriptShell_QTreeView(QWidget* parent = 0); + ~QtScriptShell_QTreeView(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint); + void closeEvent(QCloseEvent* event); + void commitData(QWidget* editor); + void contextMenuEvent(QContextMenuEvent* arg__1); + void currentChanged(const QModelIndex& current, const QModelIndex& previous); + void customEvent(QEvent* event); + void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles = QVector()); + int devType() const; + void doItemsLayout(); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void drawBranches(QPainter* painter, const QRect& rect, const QModelIndex& index) const; + void drawRow(QPainter* painter, const QStyleOptionViewItem& options, const QModelIndex& index) const; + void dropEvent(QDropEvent* event); + bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event); + void editorDestroyed(QObject* editor); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + int horizontalOffset() const; + void horizontalScrollbarAction(int action); + void horizontalScrollbarValueChanged(int value); + QModelIndex indexAt(const QPoint& p) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isIndexHidden(const QModelIndex& index) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void keyboardSearch(const QString& search); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void reset(); + void resizeEvent(QResizeEvent* event); + void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end); + void rowsInserted(const QModelIndex& parent, int start, int end); + void scrollContentsBy(int dx, int dy); + void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint = QAbstractItemView::EnsureVisible); + void selectAll(); + QList selectedIndexes() const; + void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected); + QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const; + void setModel(QAbstractItemModel* model); + void setRootIndex(const QModelIndex& index); + void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command); + void setSelectionModel(QItemSelectionModel* selectionModel); + void setupViewport(QWidget* viewport); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + int sizeHintForColumn(int column) const; + int sizeHintForRow(int row) const; + void startDrag(Qt::DropActions supportedActions); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void updateEditorData(); + void updateEditorGeometries(); + void updateGeometries(); + int verticalOffset() const; + void verticalScrollbarAction(int action); + void verticalScrollbarValueChanged(int value); + QStyleOptionViewItem viewOptions() const; + bool viewportEvent(QEvent* event); + QSize viewportSizeHint() const; + QRect visualRect(const QModelIndex& index) const; + QRegion visualRegionForSelection(const QItemSelection& selection) const; + void wheelEvent(QWheelEvent* arg__1); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTREEVIEW_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeWidget.cpp new file mode 100644 index 00000000..0d62a450 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeWidget.cpp @@ -0,0 +1,1284 @@ +#include "qtscriptshell_QTreeWidget.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QStyleOptionViewItem) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QTreeWidgetItem*) +Q_DECLARE_METATYPE(const QMimeData*) +Q_DECLARE_METATYPE(Qt::DropAction) +Q_DECLARE_METATYPE(QAbstractItemView::EditTrigger) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::ScrollHint) +Q_DECLARE_METATYPE(const QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QItemSelectionModel*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QTreeWidget::QtScriptShell_QTreeWidget(QWidget* parent) + : QTreeWidget(parent) {} + +QtScriptShell_QTreeWidget::~QtScriptShell_QTreeWidget() {} + +void QtScriptShell_QTreeWidget::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeWidget::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTreeWidget::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeWidget::closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("closeEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEditor") & QScriptValue::QObjectMember)) { + QTreeWidget::closeEditor(editor, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QTreeWidget::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeWidget::commitData(QWidget* editor) +{ + QScriptValue _q_function = __qtscript_self.property("commitData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("commitData") & QScriptValue::QObjectMember)) { + QTreeWidget::commitData(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QTreeWidget::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QTreeWidget::currentChanged(const QModelIndex& current, const QModelIndex& previous) +{ + QScriptValue _q_function = __qtscript_self.property("currentChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("currentChanged") & QScriptValue::QObjectMember)) { + QTreeWidget::currentChanged(current, previous); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, current) + << qScriptValueFromValue(_q_engine, previous)); + } +} + +void QtScriptShell_QTreeWidget::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeWidget::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) +{ + QScriptValue _q_function = __qtscript_self.property("dataChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dataChanged") & QScriptValue::QObjectMember)) { + QTreeWidget::dataChanged(topLeft, bottomRight, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, topLeft) + << qScriptValueFromValue(_q_engine, bottomRight) + << qScriptValueFromValue(_q_engine, roles)); + } +} + +int QtScriptShell_QTreeWidget::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QTreeWidget::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTreeWidget::doItemsLayout() +{ + QScriptValue _q_function = __qtscript_self.property("doItemsLayout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("doItemsLayout") & QScriptValue::QObjectMember)) { + QTreeWidget::doItemsLayout(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTreeWidget::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeWidget::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeWidget::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeWidget::drawBranches(QPainter* painter, const QRect& rect, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("drawBranches"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawBranches") & QScriptValue::QObjectMember)) { + QTreeWidget::drawBranches(painter, rect, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QTreeWidget::drawRow(QPainter* painter, const QStyleOptionViewItem& options, const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("drawRow"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("drawRow") & QScriptValue::QObjectMember)) { + QTreeWidget::drawRow(painter, options, index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter) + << qScriptValueFromValue(_q_engine, options) + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QTreeWidget::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTreeWidget::dropMimeData(QTreeWidgetItem* parent, int index, const QMimeData* data, Qt::DropAction action) +{ + QScriptValue _q_function = __qtscript_self.property("dropMimeData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropMimeData") & QScriptValue::QObjectMember)) { + return QTreeWidget::dropMimeData(parent, index, data, action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, const_cast(data)) + << qScriptValueFromValue(_q_engine, action))); + } +} + +bool QtScriptShell_QTreeWidget::edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("edit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("edit") & QScriptValue::QObjectMember)) { + return QTreeWidget::edit(index, trigger, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, trigger) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QTreeWidget::editorDestroyed(QObject* editor) +{ + QScriptValue _q_function = __qtscript_self.property("editorDestroyed"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("editorDestroyed") & QScriptValue::QObjectMember)) { + QTreeWidget::editorDestroyed(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QTreeWidget::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTreeWidget::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QTreeWidget::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QTreeWidget::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QTreeWidget::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QTreeWidget::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTreeWidget::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QTreeWidget::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QTreeWidget::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTreeWidget::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QTreeWidget::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QTreeWidget::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QTreeWidget::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QTreeWidget::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTreeWidget::horizontalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("horizontalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalOffset") & QScriptValue::QObjectMember)) { + return QTreeWidget::horizontalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTreeWidget::horizontalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarAction") & QScriptValue::QObjectMember)) { + QTreeWidget::horizontalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QTreeWidget::horizontalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QTreeWidget::horizontalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QModelIndex QtScriptShell_QTreeWidget::indexAt(const QPoint& p) const +{ + QScriptValue _q_function = __qtscript_self.property("indexAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexAt") & QScriptValue::QObjectMember)) { + return QTreeWidget::indexAt(p); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, p))); + } +} + +void QtScriptShell_QTreeWidget::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QTreeWidget::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QTreeWidget::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QTreeWidget::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QTreeWidget::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QTreeWidget::isIndexHidden(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("isIndexHidden"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isIndexHidden") & QScriptValue::QObjectMember)) { + return QTreeWidget::isIndexHidden(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QTreeWidget::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeWidget::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeWidget::keyboardSearch(const QString& search) +{ + QScriptValue _q_function = __qtscript_self.property("keyboardSearch"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyboardSearch") & QScriptValue::QObjectMember)) { + QTreeWidget::keyboardSearch(search); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, search)); + } +} + +void QtScriptShell_QTreeWidget::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTreeWidget::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QTreeWidget::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QStringList QtScriptShell_QTreeWidget::mimeTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("mimeTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mimeTypes") & QScriptValue::QObjectMember)) { + return QTreeWidget::mimeTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTreeWidget::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeWidget::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeWidget::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeWidget::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeWidget::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QTreeWidget::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QTreeWidget::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QTreeWidget::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QTreeWidget::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTreeWidget::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QTreeWidget::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QTreeWidget::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QTreeWidget::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + QTreeWidget::reset(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTreeWidget::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeWidget::rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsAboutToBeRemoved"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsAboutToBeRemoved") & QScriptValue::QObjectMember)) { + QTreeWidget::rowsAboutToBeRemoved(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QTreeWidget::rowsInserted(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsInserted"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsInserted") & QScriptValue::QObjectMember)) { + QTreeWidget::rowsInserted(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QTreeWidget::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QTreeWidget::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QTreeWidget::scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("scrollTo"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollTo") & QScriptValue::QObjectMember)) { + QTreeWidget::scrollTo(index, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QTreeWidget::selectAll() +{ + QScriptValue _q_function = __qtscript_self.property("selectAll"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectAll") & QScriptValue::QObjectMember)) { + QTreeWidget::selectAll(); + } else { + _q_function.call(__qtscript_self); + } +} + +QList QtScriptShell_QTreeWidget::selectedIndexes() const +{ + QScriptValue _q_function = __qtscript_self.property("selectedIndexes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectedIndexes") & QScriptValue::QObjectMember)) { + return QTreeWidget::selectedIndexes(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTreeWidget::selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) +{ + QScriptValue _q_function = __qtscript_self.property("selectionChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionChanged") & QScriptValue::QObjectMember)) { + QTreeWidget::selectionChanged(selected, deselected); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selected) + << qScriptValueFromValue(_q_engine, deselected)); + } +} + +QItemSelectionModel::SelectionFlags QtScriptShell_QTreeWidget::selectionCommand(const QModelIndex& index, const QEvent* event) const +{ + QScriptValue _q_function = __qtscript_self.property("selectionCommand"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionCommand") & QScriptValue::QObjectMember)) { + return QTreeWidget::selectionCommand(index, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, const_cast(event)))); + } +} + +void QtScriptShell_QTreeWidget::setRootIndex(const QModelIndex& index) +{ + QScriptValue _q_function = __qtscript_self.property("setRootIndex"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setRootIndex") & QScriptValue::QObjectMember)) { + QTreeWidget::setRootIndex(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QTreeWidget::setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) +{ + QScriptValue _q_function = __qtscript_self.property("setSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelection") & QScriptValue::QObjectMember)) { + QTreeWidget::setSelection(rect, command); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, command)); + } +} + +void QtScriptShell_QTreeWidget::setSelectionModel(QItemSelectionModel* selectionModel) +{ + QScriptValue _q_function = __qtscript_self.property("setSelectionModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelectionModel") & QScriptValue::QObjectMember)) { + QTreeWidget::setSelectionModel(selectionModel); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selectionModel)); + } +} + +void QtScriptShell_QTreeWidget::setupViewport(QWidget* viewport) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QTreeWidget::setupViewport(viewport); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, viewport)); + } +} + +QPainter* QtScriptShell_QTreeWidget::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QTreeWidget::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTreeWidget::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QTreeWidget::sizeHintForColumn(int column) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForColumn"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForColumn") & QScriptValue::QObjectMember)) { + return QTreeWidget::sizeHintForColumn(column); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column))); + } +} + +int QtScriptShell_QTreeWidget::sizeHintForRow(int row) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForRow"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForRow") & QScriptValue::QObjectMember)) { + return QTreeWidget::sizeHintForRow(row); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row))); + } +} + +void QtScriptShell_QTreeWidget::startDrag(Qt::DropActions supportedActions) +{ + QScriptValue _q_function = __qtscript_self.property("startDrag"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startDrag") & QScriptValue::QObjectMember)) { + QTreeWidget::startDrag(supportedActions); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, supportedActions)); + } +} + +Qt::DropActions QtScriptShell_QTreeWidget::supportedDropActions() const +{ + QScriptValue _q_function = __qtscript_self.property("supportedDropActions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("supportedDropActions") & QScriptValue::QObjectMember)) { + return QTreeWidget::supportedDropActions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTreeWidget::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeWidget::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QTreeWidget::updateEditorData() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorData") & QScriptValue::QObjectMember)) { + QTreeWidget::updateEditorData(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTreeWidget::updateEditorGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorGeometries") & QScriptValue::QObjectMember)) { + QTreeWidget::updateEditorGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QTreeWidget::updateGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometries") & QScriptValue::QObjectMember)) { + QTreeWidget::updateGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +int QtScriptShell_QTreeWidget::verticalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("verticalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalOffset") & QScriptValue::QObjectMember)) { + return QTreeWidget::verticalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QTreeWidget::verticalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarAction") & QScriptValue::QObjectMember)) { + QTreeWidget::verticalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QTreeWidget::verticalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QTreeWidget::verticalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QStyleOptionViewItem QtScriptShell_QTreeWidget::viewOptions() const +{ + QScriptValue _q_function = __qtscript_self.property("viewOptions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewOptions") & QScriptValue::QObjectMember)) { + return QTreeWidget::viewOptions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QTreeWidget::viewportEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QTreeWidget::viewportEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +QSize QtScriptShell_QTreeWidget::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QTreeWidget::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QTreeWidget::visualRect(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRect") & QScriptValue::QObjectMember)) { + return QTreeWidget::visualRect(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QRegion QtScriptShell_QTreeWidget::visualRegionForSelection(const QItemSelection& selection) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRegionForSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRegionForSelection") & QScriptValue::QObjectMember)) { + return QTreeWidget::visualRegionForSelection(selection); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selection))); + } +} + +void QtScriptShell_QTreeWidget::wheelEvent(QWheelEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QTreeWidget::wheelEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeWidget.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeWidget.h new file mode 100644 index 00000000..9e37f841 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeWidget.h @@ -0,0 +1,106 @@ +#ifndef QTSCRIPTSHELL_QTREEWIDGET_H +#define QTSCRIPTSHELL_QTREEWIDGET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTreeWidget : public QTreeWidget +{ +public: + QtScriptShell_QTreeWidget(QWidget* parent = 0); + ~QtScriptShell_QTreeWidget(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint); + void closeEvent(QCloseEvent* event); + void commitData(QWidget* editor); + void contextMenuEvent(QContextMenuEvent* arg__1); + void currentChanged(const QModelIndex& current, const QModelIndex& previous); + void customEvent(QEvent* event); + void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles); + int devType() const; + void doItemsLayout(); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void drawBranches(QPainter* painter, const QRect& rect, const QModelIndex& index) const; + void drawRow(QPainter* painter, const QStyleOptionViewItem& options, const QModelIndex& index) const; + void dropEvent(QDropEvent* event); + bool dropMimeData(QTreeWidgetItem* parent, int index, const QMimeData* data, Qt::DropAction action); + bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event); + void editorDestroyed(QObject* editor); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + int horizontalOffset() const; + void horizontalScrollbarAction(int action); + void horizontalScrollbarValueChanged(int value); + QModelIndex indexAt(const QPoint& p) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isIndexHidden(const QModelIndex& index) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void keyboardSearch(const QString& search); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QStringList mimeTypes() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void reset(); + void resizeEvent(QResizeEvent* event); + void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end); + void rowsInserted(const QModelIndex& parent, int start, int end); + void scrollContentsBy(int dx, int dy); + void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint); + void selectAll(); + QList selectedIndexes() const; + void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected); + QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const; + void setRootIndex(const QModelIndex& index); + void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command); + void setSelectionModel(QItemSelectionModel* selectionModel); + void setupViewport(QWidget* viewport); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + int sizeHintForColumn(int column) const; + int sizeHintForRow(int row) const; + void startDrag(Qt::DropActions supportedActions); + Qt::DropActions supportedDropActions() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void updateEditorData(); + void updateEditorGeometries(); + void updateGeometries(); + int verticalOffset() const; + void verticalScrollbarAction(int action); + void verticalScrollbarValueChanged(int value); + QStyleOptionViewItem viewOptions() const; + bool viewportEvent(QEvent* event); + QSize viewportSizeHint() const; + QRect visualRect(const QModelIndex& index) const; + QRegion visualRegionForSelection(const QItemSelection& selection) const; + void wheelEvent(QWheelEvent* arg__1); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTREEWIDGET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeWidgetItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeWidgetItem.cpp new file mode 100644 index 00000000..6f0fe9ee --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeWidgetItem.cpp @@ -0,0 +1,84 @@ +#include "qtscriptshell_QTreeWidgetItem.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QTreeWidgetItem*) + +QtScriptShell_QTreeWidgetItem::QtScriptShell_QTreeWidgetItem(QTreeWidget* view, QTreeWidgetItem* after, int type) + : QTreeWidgetItem(view, after, type) {} + +QtScriptShell_QTreeWidgetItem::QtScriptShell_QTreeWidgetItem(QTreeWidget* view, const QStringList& strings, int type) + : QTreeWidgetItem(view, strings, type) {} + +QtScriptShell_QTreeWidgetItem::QtScriptShell_QTreeWidgetItem(QTreeWidget* view, int type) + : QTreeWidgetItem(view, type) {} + +QtScriptShell_QTreeWidgetItem::QtScriptShell_QTreeWidgetItem(QTreeWidgetItem* parent, QTreeWidgetItem* after, int type) + : QTreeWidgetItem(parent, after, type) {} + +QtScriptShell_QTreeWidgetItem::QtScriptShell_QTreeWidgetItem(QTreeWidgetItem* parent, const QStringList& strings, int type) + : QTreeWidgetItem(parent, strings, type) {} + +QtScriptShell_QTreeWidgetItem::QtScriptShell_QTreeWidgetItem(QTreeWidgetItem* parent, int type) + : QTreeWidgetItem(parent, type) {} + +QtScriptShell_QTreeWidgetItem::QtScriptShell_QTreeWidgetItem(const QStringList& strings, int type) + : QTreeWidgetItem(strings, type) {} + +QtScriptShell_QTreeWidgetItem::QtScriptShell_QTreeWidgetItem(int type) + : QTreeWidgetItem(type) {} + +QtScriptShell_QTreeWidgetItem::~QtScriptShell_QTreeWidgetItem() {} + +QTreeWidgetItem* QtScriptShell_QTreeWidgetItem::clone() const +{ + QScriptValue _q_function = __qtscript_self.property("clone"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("clone") & QScriptValue::QObjectMember)) { + return QTreeWidgetItem::clone(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QVariant QtScriptShell_QTreeWidgetItem::data(int column, int role) const +{ + QScriptValue _q_function = __qtscript_self.property("data"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("data") & QScriptValue::QObjectMember)) { + return QTreeWidgetItem::data(column, role); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, role))); + } +} + +void QtScriptShell_QTreeWidgetItem::setData(int column, int role, const QVariant& value) +{ + QScriptValue _q_function = __qtscript_self.property("setData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setData") & QScriptValue::QObjectMember)) { + QTreeWidgetItem::setData(column, role, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column) + << qScriptValueFromValue(_q_engine, role) + << qScriptValueFromValue(_q_engine, value)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeWidgetItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeWidgetItem.h new file mode 100644 index 00000000..dbfcdb5b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QTreeWidgetItem.h @@ -0,0 +1,30 @@ +#ifndef QTSCRIPTSHELL_QTREEWIDGETITEM_H +#define QTSCRIPTSHELL_QTREEWIDGETITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QTreeWidgetItem : public QTreeWidgetItem +{ +public: + QtScriptShell_QTreeWidgetItem(QTreeWidget* view, QTreeWidgetItem* after, int type = Type); + QtScriptShell_QTreeWidgetItem(QTreeWidget* view, const QStringList& strings, int type = Type); + QtScriptShell_QTreeWidgetItem(QTreeWidget* view, int type = Type); + QtScriptShell_QTreeWidgetItem(QTreeWidgetItem* parent, QTreeWidgetItem* after, int type = Type); + QtScriptShell_QTreeWidgetItem(QTreeWidgetItem* parent, const QStringList& strings, int type = Type); + QtScriptShell_QTreeWidgetItem(QTreeWidgetItem* parent, int type = Type); + QtScriptShell_QTreeWidgetItem(const QStringList& strings, int type = Type); + QtScriptShell_QTreeWidgetItem(const QTreeWidgetItem& other); + QtScriptShell_QTreeWidgetItem(int type = Type); + ~QtScriptShell_QTreeWidgetItem(); + + QTreeWidgetItem* clone() const; + QVariant data(int column, int role) const; + void setData(int column, int role, const QVariant& value); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QTREEWIDGETITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoCommand.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoCommand.cpp new file mode 100644 index 00000000..07679884 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoCommand.cpp @@ -0,0 +1,65 @@ +#include "qtscriptshell_QUndoCommand.h" + +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(const QUndoCommand*) + +QtScriptShell_QUndoCommand::QtScriptShell_QUndoCommand(QUndoCommand* parent) + : QUndoCommand(parent) {} + +QtScriptShell_QUndoCommand::QtScriptShell_QUndoCommand(const QString& text, QUndoCommand* parent) + : QUndoCommand(text, parent) {} + +QtScriptShell_QUndoCommand::~QtScriptShell_QUndoCommand() {} + +int QtScriptShell_QUndoCommand::id() const +{ + QScriptValue _q_function = __qtscript_self.property("id"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("id") & QScriptValue::QObjectMember)) { + return QUndoCommand::id(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QUndoCommand::mergeWith(const QUndoCommand* other) +{ + QScriptValue _q_function = __qtscript_self.property("mergeWith"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mergeWith") & QScriptValue::QObjectMember)) { + return QUndoCommand::mergeWith(other); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(other)))); + } +} + +void QtScriptShell_QUndoCommand::redo() +{ + QScriptValue _q_function = __qtscript_self.property("redo"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redo") & QScriptValue::QObjectMember)) { + QUndoCommand::redo(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QUndoCommand::undo() +{ + QScriptValue _q_function = __qtscript_self.property("undo"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("undo") & QScriptValue::QObjectMember)) { + QUndoCommand::undo(); + } else { + _q_function.call(__qtscript_self); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoCommand.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoCommand.h new file mode 100644 index 00000000..daef44ae --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoCommand.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QUNDOCOMMAND_H +#define QTSCRIPTSHELL_QUNDOCOMMAND_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QUndoCommand : public QUndoCommand +{ +public: + QtScriptShell_QUndoCommand(QUndoCommand* parent = 0); + QtScriptShell_QUndoCommand(const QString& text, QUndoCommand* parent = 0); + ~QtScriptShell_QUndoCommand(); + + int id() const; + bool mergeWith(const QUndoCommand* other); + void redo(); + void undo(); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QUNDOCOMMAND_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoGroup.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoGroup.cpp new file mode 100644 index 00000000..e195eb9a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoGroup.cpp @@ -0,0 +1,94 @@ +#include "qtscriptshell_QUndoGroup.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QUndoGroup::QtScriptShell_QUndoGroup(QObject* parent) + : QUndoGroup(parent) {} + +QtScriptShell_QUndoGroup::~QtScriptShell_QUndoGroup() {} + +void QtScriptShell_QUndoGroup::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QUndoGroup::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QUndoGroup::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QUndoGroup::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QUndoGroup::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QUndoGroup::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QUndoGroup::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QUndoGroup::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QUndoGroup::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QUndoGroup::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoGroup.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoGroup.h new file mode 100644 index 00000000..0276c7db --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoGroup.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QUNDOGROUP_H +#define QTSCRIPTSHELL_QUNDOGROUP_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QUndoGroup : public QUndoGroup +{ +public: + QtScriptShell_QUndoGroup(QObject* parent = 0); + ~QtScriptShell_QUndoGroup(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QUNDOGROUP_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoStack.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoStack.cpp new file mode 100644 index 00000000..10df6597 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoStack.cpp @@ -0,0 +1,93 @@ +#include "qtscriptshell_QUndoStack.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QUndoStack::QtScriptShell_QUndoStack(QObject* parent) + : QUndoStack(parent) {} + +QtScriptShell_QUndoStack::~QtScriptShell_QUndoStack() {} + +void QtScriptShell_QUndoStack::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QUndoStack::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QUndoStack::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QUndoStack::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QUndoStack::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QUndoStack::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QUndoStack::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QUndoStack::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QUndoStack::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QUndoStack::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoStack.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoStack.h new file mode 100644 index 00000000..864a788d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoStack.h @@ -0,0 +1,24 @@ +#ifndef QTSCRIPTSHELL_QUNDOSTACK_H +#define QTSCRIPTSHELL_QUNDOSTACK_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QUndoStack : public QUndoStack +{ +public: + QtScriptShell_QUndoStack(QObject* parent = 0); + ~QtScriptShell_QUndoStack(); + + void childEvent(QChildEvent* event); + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QUNDOSTACK_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoView.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoView.cpp new file mode 100644 index 00000000..a2e15a03 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoView.cpp @@ -0,0 +1,1230 @@ +#include "qtscriptshell_QUndoView.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QVector) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::EditTrigger) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QAbstractItemView::ScrollHint) +Q_DECLARE_METATYPE(const QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QAbstractItemModel*) +Q_DECLARE_METATYPE(QItemSelectionModel*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QStyleOptionViewItem) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QUndoView::QtScriptShell_QUndoView(QUndoGroup* group, QWidget* parent) + : QUndoView(group, parent) {} + +QtScriptShell_QUndoView::QtScriptShell_QUndoView(QUndoStack* stack, QWidget* parent) + : QUndoView(stack, parent) {} + +QtScriptShell_QUndoView::QtScriptShell_QUndoView(QWidget* parent) + : QUndoView(parent) {} + +QtScriptShell_QUndoView::~QtScriptShell_QUndoView() {} + +void QtScriptShell_QUndoView::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QUndoView::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QUndoView::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QUndoView::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QUndoView::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QUndoView::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QUndoView::closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("closeEditor"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEditor") & QScriptValue::QObjectMember)) { + QUndoView::closeEditor(editor, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QUndoView::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QUndoView::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QUndoView::commitData(QWidget* editor) +{ + QScriptValue _q_function = __qtscript_self.property("commitData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("commitData") & QScriptValue::QObjectMember)) { + QUndoView::commitData(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QUndoView::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QUndoView::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QUndoView::currentChanged(const QModelIndex& current, const QModelIndex& previous) +{ + QScriptValue _q_function = __qtscript_self.property("currentChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("currentChanged") & QScriptValue::QObjectMember)) { + QUndoView::currentChanged(current, previous); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, current) + << qScriptValueFromValue(_q_engine, previous)); + } +} + +void QtScriptShell_QUndoView::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QUndoView::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QUndoView::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles) +{ + QScriptValue _q_function = __qtscript_self.property("dataChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dataChanged") & QScriptValue::QObjectMember)) { + QUndoView::dataChanged(topLeft, bottomRight, roles); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, topLeft) + << qScriptValueFromValue(_q_engine, bottomRight) + << qScriptValueFromValue(_q_engine, roles)); + } +} + +int QtScriptShell_QUndoView::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QUndoView::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QUndoView::doItemsLayout() +{ + QScriptValue _q_function = __qtscript_self.property("doItemsLayout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("doItemsLayout") & QScriptValue::QObjectMember)) { + QUndoView::doItemsLayout(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QUndoView::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QUndoView::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QUndoView::dragLeaveEvent(QDragLeaveEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QUndoView::dragLeaveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QUndoView::dragMoveEvent(QDragMoveEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QUndoView::dragMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QUndoView::dropEvent(QDropEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QUndoView::dropEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +bool QtScriptShell_QUndoView::edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("edit"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("edit") & QScriptValue::QObjectMember)) { + return QUndoView::edit(index, trigger, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, trigger) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QUndoView::editorDestroyed(QObject* editor) +{ + QScriptValue _q_function = __qtscript_self.property("editorDestroyed"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("editorDestroyed") & QScriptValue::QObjectMember)) { + QUndoView::editorDestroyed(editor); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, editor)); + } +} + +void QtScriptShell_QUndoView::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QUndoView::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QUndoView::event(QEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QUndoView::event(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e))); + } +} + +bool QtScriptShell_QUndoView::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QUndoView::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QUndoView::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QUndoView::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QUndoView::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QUndoView::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QUndoView::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QUndoView::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QUndoView::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QUndoView::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QUndoView::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QUndoView::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QUndoView::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QUndoView::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QUndoView::horizontalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("horizontalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalOffset") & QScriptValue::QObjectMember)) { + return QUndoView::horizontalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QUndoView::horizontalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarAction") & QScriptValue::QObjectMember)) { + QUndoView::horizontalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QUndoView::horizontalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("horizontalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("horizontalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QUndoView::horizontalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QModelIndex QtScriptShell_QUndoView::indexAt(const QPoint& p) const +{ + QScriptValue _q_function = __qtscript_self.property("indexAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexAt") & QScriptValue::QObjectMember)) { + return QUndoView::indexAt(p); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, p))); + } +} + +void QtScriptShell_QUndoView::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QUndoView::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QUndoView::inputMethodEvent(QInputMethodEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QUndoView::inputMethodEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QVariant QtScriptShell_QUndoView::inputMethodQuery(Qt::InputMethodQuery query) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QUndoView::inputMethodQuery(query); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, query))); + } +} + +bool QtScriptShell_QUndoView::isIndexHidden(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("isIndexHidden"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isIndexHidden") & QScriptValue::QObjectMember)) { + return QUndoView::isIndexHidden(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +void QtScriptShell_QUndoView::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QUndoView::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QUndoView::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QUndoView::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QUndoView::keyboardSearch(const QString& search) +{ + QScriptValue _q_function = __qtscript_self.property("keyboardSearch"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyboardSearch") & QScriptValue::QObjectMember)) { + QUndoView::keyboardSearch(search); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, search)); + } +} + +void QtScriptShell_QUndoView::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QUndoView::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QUndoView::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QUndoView::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QUndoView::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QUndoView::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QUndoView::mouseMoveEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QUndoView::mouseMoveEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QUndoView::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QUndoView::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QUndoView::mouseReleaseEvent(QMouseEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QUndoView::mouseReleaseEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QUndoView::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QUndoView::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QUndoView::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QUndoView::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QUndoView::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QUndoView::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QUndoView::paintEvent(QPaintEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QUndoView::paintEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QPaintDevice* QtScriptShell_QUndoView::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QUndoView::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QUndoView::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + QUndoView::reset(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QUndoView::resizeEvent(QResizeEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QUndoView::resizeEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QUndoView::rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsAboutToBeRemoved"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsAboutToBeRemoved") & QScriptValue::QObjectMember)) { + QUndoView::rowsAboutToBeRemoved(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QUndoView::rowsInserted(const QModelIndex& parent, int start, int end) +{ + QScriptValue _q_function = __qtscript_self.property("rowsInserted"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("rowsInserted") & QScriptValue::QObjectMember)) { + QUndoView::rowsInserted(parent, start, end); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent) + << qScriptValueFromValue(_q_engine, start) + << qScriptValueFromValue(_q_engine, end)); + } +} + +void QtScriptShell_QUndoView::scrollContentsBy(int dx, int dy) +{ + QScriptValue _q_function = __qtscript_self.property("scrollContentsBy"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollContentsBy") & QScriptValue::QObjectMember)) { + QUndoView::scrollContentsBy(dx, dy); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dx) + << qScriptValueFromValue(_q_engine, dy)); + } +} + +void QtScriptShell_QUndoView::scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint) +{ + QScriptValue _q_function = __qtscript_self.property("scrollTo"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("scrollTo") & QScriptValue::QObjectMember)) { + QUndoView::scrollTo(index, hint); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, hint)); + } +} + +void QtScriptShell_QUndoView::selectAll() +{ + QScriptValue _q_function = __qtscript_self.property("selectAll"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectAll") & QScriptValue::QObjectMember)) { + QUndoView::selectAll(); + } else { + _q_function.call(__qtscript_self); + } +} + +QList QtScriptShell_QUndoView::selectedIndexes() const +{ + QScriptValue _q_function = __qtscript_self.property("selectedIndexes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectedIndexes") & QScriptValue::QObjectMember)) { + return QUndoView::selectedIndexes(); + } else { + return qscriptvalue_cast >(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QUndoView::selectionChanged(const QItemSelection& selected, const QItemSelection& deselected) +{ + QScriptValue _q_function = __qtscript_self.property("selectionChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionChanged") & QScriptValue::QObjectMember)) { + QUndoView::selectionChanged(selected, deselected); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selected) + << qScriptValueFromValue(_q_engine, deselected)); + } +} + +QItemSelectionModel::SelectionFlags QtScriptShell_QUndoView::selectionCommand(const QModelIndex& index, const QEvent* event) const +{ + QScriptValue _q_function = __qtscript_self.property("selectionCommand"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("selectionCommand") & QScriptValue::QObjectMember)) { + return QUndoView::selectionCommand(index, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index) + << qScriptValueFromValue(_q_engine, const_cast(event)))); + } +} + +void QtScriptShell_QUndoView::setModel(QAbstractItemModel* model) +{ + QScriptValue _q_function = __qtscript_self.property("setModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setModel") & QScriptValue::QObjectMember)) { + QUndoView::setModel(model); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, model)); + } +} + +void QtScriptShell_QUndoView::setRootIndex(const QModelIndex& index) +{ + QScriptValue _q_function = __qtscript_self.property("setRootIndex"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setRootIndex") & QScriptValue::QObjectMember)) { + QUndoView::setRootIndex(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index)); + } +} + +void QtScriptShell_QUndoView::setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command) +{ + QScriptValue _q_function = __qtscript_self.property("setSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelection") & QScriptValue::QObjectMember)) { + QUndoView::setSelection(rect, command); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, rect) + << qScriptValueFromValue(_q_engine, command)); + } +} + +void QtScriptShell_QUndoView::setSelectionModel(QItemSelectionModel* selectionModel) +{ + QScriptValue _q_function = __qtscript_self.property("setSelectionModel"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setSelectionModel") & QScriptValue::QObjectMember)) { + QUndoView::setSelectionModel(selectionModel); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selectionModel)); + } +} + +void QtScriptShell_QUndoView::setupViewport(QWidget* viewport) +{ + QScriptValue _q_function = __qtscript_self.property("setupViewport"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setupViewport") & QScriptValue::QObjectMember)) { + QUndoView::setupViewport(viewport); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, viewport)); + } +} + +QPainter* QtScriptShell_QUndoView::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QUndoView::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QUndoView::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QUndoView::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QUndoView::sizeHintForColumn(int column) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForColumn"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForColumn") & QScriptValue::QObjectMember)) { + return QUndoView::sizeHintForColumn(column); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, column))); + } +} + +int QtScriptShell_QUndoView::sizeHintForRow(int row) const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHintForRow"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHintForRow") & QScriptValue::QObjectMember)) { + return QUndoView::sizeHintForRow(row); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, row))); + } +} + +void QtScriptShell_QUndoView::startDrag(Qt::DropActions supportedActions) +{ + QScriptValue _q_function = __qtscript_self.property("startDrag"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startDrag") & QScriptValue::QObjectMember)) { + QUndoView::startDrag(supportedActions); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, supportedActions)); + } +} + +void QtScriptShell_QUndoView::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QUndoView::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QUndoView::timerEvent(QTimerEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QUndoView::timerEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +void QtScriptShell_QUndoView::updateEditorData() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorData") & QScriptValue::QObjectMember)) { + QUndoView::updateEditorData(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QUndoView::updateEditorGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateEditorGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateEditorGeometries") & QScriptValue::QObjectMember)) { + QUndoView::updateEditorGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QUndoView::updateGeometries() +{ + QScriptValue _q_function = __qtscript_self.property("updateGeometries"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("updateGeometries") & QScriptValue::QObjectMember)) { + QUndoView::updateGeometries(); + } else { + _q_function.call(__qtscript_self); + } +} + +int QtScriptShell_QUndoView::verticalOffset() const +{ + QScriptValue _q_function = __qtscript_self.property("verticalOffset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalOffset") & QScriptValue::QObjectMember)) { + return QUndoView::verticalOffset(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QUndoView::verticalScrollbarAction(int action) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarAction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarAction") & QScriptValue::QObjectMember)) { + QUndoView::verticalScrollbarAction(action); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, action)); + } +} + +void QtScriptShell_QUndoView::verticalScrollbarValueChanged(int value) +{ + QScriptValue _q_function = __qtscript_self.property("verticalScrollbarValueChanged"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("verticalScrollbarValueChanged") & QScriptValue::QObjectMember)) { + QUndoView::verticalScrollbarValueChanged(value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, value)); + } +} + +QStyleOptionViewItem QtScriptShell_QUndoView::viewOptions() const +{ + QScriptValue _q_function = __qtscript_self.property("viewOptions"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewOptions") & QScriptValue::QObjectMember)) { + return QUndoView::viewOptions(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QUndoView::viewportEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("viewportEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportEvent") & QScriptValue::QObjectMember)) { + return QUndoView::viewportEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +QSize QtScriptShell_QUndoView::viewportSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("viewportSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("viewportSizeHint") & QScriptValue::QObjectMember)) { + return QUndoView::viewportSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QUndoView::visualRect(const QModelIndex& index) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRect"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRect") & QScriptValue::QObjectMember)) { + return QUndoView::visualRect(index); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, index))); + } +} + +QRegion QtScriptShell_QUndoView::visualRegionForSelection(const QItemSelection& selection) const +{ + QScriptValue _q_function = __qtscript_self.property("visualRegionForSelection"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("visualRegionForSelection") & QScriptValue::QObjectMember)) { + return QUndoView::visualRegionForSelection(selection); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, selection))); + } +} + +void QtScriptShell_QUndoView::wheelEvent(QWheelEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QUndoView::wheelEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoView.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoView.h new file mode 100644 index 00000000..4407f77e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QUndoView.h @@ -0,0 +1,104 @@ +#ifndef QTSCRIPTSHELL_QUNDOVIEW_H +#define QTSCRIPTSHELL_QUNDOVIEW_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QUndoView : public QUndoView +{ +public: + QtScriptShell_QUndoView(QUndoGroup* group, QWidget* parent = 0); + QtScriptShell_QUndoView(QUndoStack* stack, QWidget* parent = 0); + QtScriptShell_QUndoView(QWidget* parent = 0); + ~QtScriptShell_QUndoView(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint); + void closeEvent(QCloseEvent* event); + void commitData(QWidget* editor); + void contextMenuEvent(QContextMenuEvent* arg__1); + void currentChanged(const QModelIndex& current, const QModelIndex& previous); + void customEvent(QEvent* event); + void dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector& roles); + int devType() const; + void doItemsLayout(); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* e); + void dragMoveEvent(QDragMoveEvent* e); + void dropEvent(QDropEvent* e); + bool edit(const QModelIndex& index, QAbstractItemView::EditTrigger trigger, QEvent* event); + void editorDestroyed(QObject* editor); + void enterEvent(QEvent* event); + bool event(QEvent* e); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + int horizontalOffset() const; + void horizontalScrollbarAction(int action); + void horizontalScrollbarValueChanged(int value); + QModelIndex indexAt(const QPoint& p) const; + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* event); + QVariant inputMethodQuery(Qt::InputMethodQuery query) const; + bool isIndexHidden(const QModelIndex& index) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void keyboardSearch(const QString& search); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* e); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* e); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* e); + QPaintDevice* redirected(QPoint* offset) const; + void reset(); + void resizeEvent(QResizeEvent* e); + void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end); + void rowsInserted(const QModelIndex& parent, int start, int end); + void scrollContentsBy(int dx, int dy); + void scrollTo(const QModelIndex& index, QAbstractItemView::ScrollHint hint); + void selectAll(); + QList selectedIndexes() const; + void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected); + QItemSelectionModel::SelectionFlags selectionCommand(const QModelIndex& index, const QEvent* event) const; + void setModel(QAbstractItemModel* model); + void setRootIndex(const QModelIndex& index); + void setSelection(const QRect& rect, QItemSelectionModel::SelectionFlags command); + void setSelectionModel(QItemSelectionModel* selectionModel); + void setupViewport(QWidget* viewport); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + int sizeHintForColumn(int column) const; + int sizeHintForRow(int row) const; + void startDrag(Qt::DropActions supportedActions); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* e); + void updateEditorData(); + void updateEditorGeometries(); + void updateGeometries(); + int verticalOffset() const; + void verticalScrollbarAction(int action); + void verticalScrollbarValueChanged(int value); + QStyleOptionViewItem viewOptions() const; + bool viewportEvent(QEvent* event); + QSize viewportSizeHint() const; + QRect visualRect(const QModelIndex& index) const; + QRegion visualRegionForSelection(const QItemSelection& selection) const; + void wheelEvent(QWheelEvent* e); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QUNDOVIEW_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QVBoxLayout.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QVBoxLayout.cpp new file mode 100644 index 00000000..78e7663e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QVBoxLayout.cpp @@ -0,0 +1,348 @@ +#include "qtscriptshell_QVBoxLayout.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QLayoutItem*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QSpacerItem*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QVBoxLayout::QtScriptShell_QVBoxLayout() + : QVBoxLayout() {} + +QtScriptShell_QVBoxLayout::QtScriptShell_QVBoxLayout(QWidget* parent) + : QVBoxLayout(parent) {} + +QtScriptShell_QVBoxLayout::~QtScriptShell_QVBoxLayout() {} + +void QtScriptShell_QVBoxLayout::addItem(QLayoutItem* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("addItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("addItem") & QScriptValue::QObjectMember)) { + QVBoxLayout::addItem(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QVBoxLayout::childEvent(QChildEvent* e) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QVBoxLayout::childEvent(e); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, e)); + } +} + +QSizePolicy::ControlTypes QtScriptShell_QVBoxLayout::controlTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("controlTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("controlTypes") & QScriptValue::QObjectMember)) { + return QVBoxLayout::controlTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QVBoxLayout::count() const +{ + QScriptValue _q_function = __qtscript_self.property("count"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("count") & QScriptValue::QObjectMember)) { + return QVBoxLayout::count(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QVBoxLayout::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QVBoxLayout::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QVBoxLayout::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QVBoxLayout::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QVBoxLayout::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QVBoxLayout::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +Qt::Orientations QtScriptShell_QVBoxLayout::expandingDirections() const +{ + QScriptValue _q_function = __qtscript_self.property("expandingDirections"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("expandingDirections") & QScriptValue::QObjectMember)) { + return QVBoxLayout::expandingDirections(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QVBoxLayout::geometry() const +{ + QScriptValue _q_function = __qtscript_self.property("geometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("geometry") & QScriptValue::QObjectMember)) { + return QVBoxLayout::geometry(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QVBoxLayout::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QVBoxLayout::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QVBoxLayout::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QVBoxLayout::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +int QtScriptShell_QVBoxLayout::indexOf(QWidget* arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("indexOf"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("indexOf") & QScriptValue::QObjectMember)) { + return QVBoxLayout::indexOf(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QVBoxLayout::invalidate() +{ + QScriptValue _q_function = __qtscript_self.property("invalidate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("invalidate") & QScriptValue::QObjectMember)) { + QVBoxLayout::invalidate(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QVBoxLayout::isEmpty() const +{ + QScriptValue _q_function = __qtscript_self.property("isEmpty"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isEmpty") & QScriptValue::QObjectMember)) { + return QVBoxLayout::isEmpty(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayoutItem* QtScriptShell_QVBoxLayout::itemAt(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("itemAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("itemAt") & QScriptValue::QObjectMember)) { + return QVBoxLayout::itemAt(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QLayout* QtScriptShell_QVBoxLayout::layout() +{ + QScriptValue _q_function = __qtscript_self.property("layout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("layout") & QScriptValue::QObjectMember)) { + return QVBoxLayout::layout(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSize QtScriptShell_QVBoxLayout::maximumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("maximumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("maximumSize") & QScriptValue::QObjectMember)) { + return QVBoxLayout::maximumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QVBoxLayout::minimumHeightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("minimumHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumHeightForWidth") & QScriptValue::QObjectMember)) { + return QVBoxLayout::minimumHeightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QVBoxLayout::minimumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("minimumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumSize") & QScriptValue::QObjectMember)) { + return QVBoxLayout::minimumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QVBoxLayout::setGeometry(const QRect& arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + QVBoxLayout::setGeometry(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QSize QtScriptShell_QVBoxLayout::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + return QVBoxLayout::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSpacerItem* QtScriptShell_QVBoxLayout::spacerItem() +{ + QScriptValue _q_function = __qtscript_self.property("spacerItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("spacerItem") & QScriptValue::QObjectMember)) { + return QVBoxLayout::spacerItem(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayoutItem* QtScriptShell_QVBoxLayout::takeAt(int arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("takeAt"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("takeAt") & QScriptValue::QObjectMember)) { + return QVBoxLayout::takeAt(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QVBoxLayout::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QVBoxLayout::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QWidget* QtScriptShell_QVBoxLayout::widget() +{ + QScriptValue _q_function = __qtscript_self.property("widget"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("widget") & QScriptValue::QObjectMember)) { + return QVBoxLayout::widget(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QVBoxLayout.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QVBoxLayout.h new file mode 100644 index 00000000..4590a5c4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QVBoxLayout.h @@ -0,0 +1,45 @@ +#ifndef QTSCRIPTSHELL_QVBOXLAYOUT_H +#define QTSCRIPTSHELL_QVBOXLAYOUT_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QVBoxLayout : public QVBoxLayout +{ +public: + QtScriptShell_QVBoxLayout(); + QtScriptShell_QVBoxLayout(QWidget* parent); + ~QtScriptShell_QVBoxLayout(); + + void addItem(QLayoutItem* arg__1); + void childEvent(QChildEvent* e); + QSizePolicy::ControlTypes controlTypes() const; + int count() const; + void customEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + Qt::Orientations expandingDirections() const; + QRect geometry() const; + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + int indexOf(QWidget* arg__1) const; + void invalidate(); + bool isEmpty() const; + QLayoutItem* itemAt(int arg__1) const; + QLayout* layout(); + QSize maximumSize() const; + int minimumHeightForWidth(int arg__1) const; + QSize minimumSize() const; + void setGeometry(const QRect& arg__1); + QSize sizeHint() const; + QSpacerItem* spacerItem(); + QLayoutItem* takeAt(int arg__1); + void timerEvent(QTimerEvent* event); + QWidget* widget(); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QVBOXLAYOUT_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidget.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidget.cpp new file mode 100644 index 00000000..5af63100 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidget.cpp @@ -0,0 +1,673 @@ +#include "qtscriptshell_QWidget.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QWidget::QtScriptShell_QWidget(QWidget* parent, Qt::WindowFlags f) + : QWidget(parent, f) {} + +QtScriptShell_QWidget::~QtScriptShell_QWidget() {} + +void QtScriptShell_QWidget::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QWidget::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QWidget::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QWidget::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QWidget::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QWidget::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QWidget::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QWidget::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QWidget::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QWidget::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWidget::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QWidget::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QWidget::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QWidget::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QWidget::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QWidget::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QWidget::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QWidget::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QWidget::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QWidget::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QWidget::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QWidget::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QWidget::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QWidget::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QWidget::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QWidget::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QWidget::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QWidget::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QWidget::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QWidget::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QWidget::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QWidget::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QWidget::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QWidget::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QWidget::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QWidget::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QWidget::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QWidget::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QWidget::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QWidget::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QWidget::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QWidget::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QWidget::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QWidget::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QWidget::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWidget::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QWidget::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QWidget::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QWidget::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QWidget::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QWidget::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QWidget::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QWidget::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +QPaintEngine* QtScriptShell_QWidget::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QWidget::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWidget::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QWidget::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QWidget::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QWidget::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QWidget::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QWidget::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QWidget::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QWidget::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWidget::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QWidget::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_QWidget::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QWidget::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWidget::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QWidget::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QWidget::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidget::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QWidget::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidget.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidget.h new file mode 100644 index 00000000..31b87464 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidget.h @@ -0,0 +1,63 @@ +#ifndef QTSCRIPTSHELL_QWIDGET_H +#define QTSCRIPTSHELL_QWIDGET_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QWidget : public QWidget +{ +public: + QtScriptShell_QWidget(QWidget* parent = 0, Qt::WindowFlags f = Qt::WindowFlags()); + ~QtScriptShell_QWidget(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QWIDGET_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidgetAction.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidgetAction.cpp new file mode 100644 index 00000000..957665d2 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidgetAction.cpp @@ -0,0 +1,128 @@ +#include "qtscriptshell_QWidgetAction.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QWidget*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) + +QtScriptShell_QWidgetAction::QtScriptShell_QWidgetAction(QObject* parent) + : QWidgetAction(parent) {} + +QtScriptShell_QWidgetAction::~QtScriptShell_QWidgetAction() {} + +void QtScriptShell_QWidgetAction::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QWidgetAction::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QWidget* QtScriptShell_QWidgetAction::createWidget(QWidget* parent) +{ + QScriptValue _q_function = __qtscript_self.property("createWidget"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("createWidget") & QScriptValue::QObjectMember)) { + return QWidgetAction::createWidget(parent); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, parent))); + } +} + +void QtScriptShell_QWidgetAction::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QWidgetAction::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWidgetAction::deleteWidget(QWidget* widget) +{ + QScriptValue _q_function = __qtscript_self.property("deleteWidget"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("deleteWidget") & QScriptValue::QObjectMember)) { + QWidgetAction::deleteWidget(widget); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, widget)); + } +} + +bool QtScriptShell_QWidgetAction::event(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QWidgetAction::event(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QWidgetAction::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QWidgetAction::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +void QtScriptShell_QWidgetAction::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QWidgetAction::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidgetAction.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidgetAction.h new file mode 100644 index 00000000..20499022 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidgetAction.h @@ -0,0 +1,26 @@ +#ifndef QTSCRIPTSHELL_QWIDGETACTION_H +#define QTSCRIPTSHELL_QWIDGETACTION_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QWidgetAction : public QWidgetAction +{ +public: + QtScriptShell_QWidgetAction(QObject* parent); + ~QtScriptShell_QWidgetAction(); + + void childEvent(QChildEvent* event); + QWidget* createWidget(QWidget* parent); + void customEvent(QEvent* event); + void deleteWidget(QWidget* widget); + bool event(QEvent* arg__1); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + void timerEvent(QTimerEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QWIDGETACTION_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidgetItem.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidgetItem.cpp new file mode 100644 index 00000000..3e02d41b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidgetItem.cpp @@ -0,0 +1,197 @@ +#include "qtscriptshell_QWidgetItem.h" + +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QFlags) +Q_DECLARE_METATYPE(QLayout*) +Q_DECLARE_METATYPE(QSpacerItem*) +Q_DECLARE_METATYPE(QWidget*) + +QtScriptShell_QWidgetItem::QtScriptShell_QWidgetItem(QWidget* w) + : QWidgetItem(w) {} + +QtScriptShell_QWidgetItem::~QtScriptShell_QWidgetItem() {} + +QSizePolicy::ControlTypes QtScriptShell_QWidgetItem::controlTypes() const +{ + QScriptValue _q_function = __qtscript_self.property("controlTypes"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("controlTypes") & QScriptValue::QObjectMember)) { + return QWidgetItem::controlTypes(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +Qt::Orientations QtScriptShell_QWidgetItem::expandingDirections() const +{ + QScriptValue _q_function = __qtscript_self.property("expandingDirections"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("expandingDirections") & QScriptValue::QObjectMember)) { + return QWidgetItem::expandingDirections(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QRect QtScriptShell_QWidgetItem::geometry() const +{ + QScriptValue _q_function = __qtscript_self.property("geometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("geometry") & QScriptValue::QObjectMember)) { + return QWidgetItem::geometry(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QWidgetItem::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QWidgetItem::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QWidgetItem::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QWidgetItem::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QWidgetItem::invalidate() +{ + QScriptValue _q_function = __qtscript_self.property("invalidate"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("invalidate") & QScriptValue::QObjectMember)) { + QWidgetItem::invalidate(); + } else { + _q_function.call(__qtscript_self); + } +} + +bool QtScriptShell_QWidgetItem::isEmpty() const +{ + QScriptValue _q_function = __qtscript_self.property("isEmpty"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isEmpty") & QScriptValue::QObjectMember)) { + return QWidgetItem::isEmpty(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QLayout* QtScriptShell_QWidgetItem::layout() +{ + QScriptValue _q_function = __qtscript_self.property("layout"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("layout") & QScriptValue::QObjectMember)) { + return QWidgetItem::layout(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSize QtScriptShell_QWidgetItem::maximumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("maximumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("maximumSize") & QScriptValue::QObjectMember)) { + return QWidgetItem::maximumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QWidgetItem::minimumHeightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("minimumHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumHeightForWidth") & QScriptValue::QObjectMember)) { + return QWidgetItem::minimumHeightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QWidgetItem::minimumSize() const +{ + QScriptValue _q_function = __qtscript_self.property("minimumSize"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("minimumSize") & QScriptValue::QObjectMember)) { + return QWidgetItem::minimumSize(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWidgetItem::setGeometry(const QRect& arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("setGeometry"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setGeometry") & QScriptValue::QObjectMember)) { + QWidgetItem::setGeometry(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QSize QtScriptShell_QWidgetItem::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("sizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sizeHint") & QScriptValue::QObjectMember)) { + return QWidgetItem::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QSpacerItem* QtScriptShell_QWidgetItem::spacerItem() +{ + QScriptValue _q_function = __qtscript_self.property("spacerItem"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("spacerItem") & QScriptValue::QObjectMember)) { + return QWidgetItem::spacerItem(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QWidget* QtScriptShell_QWidgetItem::widget() +{ + QScriptValue _q_function = __qtscript_self.property("widget"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("widget") & QScriptValue::QObjectMember)) { + return QWidgetItem::widget(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidgetItem.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidgetItem.h new file mode 100644 index 00000000..56ca18ae --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWidgetItem.h @@ -0,0 +1,34 @@ +#ifndef QTSCRIPTSHELL_QWIDGETITEM_H +#define QTSCRIPTSHELL_QWIDGETITEM_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QWidgetItem : public QWidgetItem +{ +public: + QtScriptShell_QWidgetItem(QWidget* w); + ~QtScriptShell_QWidgetItem(); + + QSizePolicy::ControlTypes controlTypes() const; + Qt::Orientations expandingDirections() const; + QRect geometry() const; + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void invalidate(); + bool isEmpty() const; + QLayout* layout(); + QSize maximumSize() const; + int minimumHeightForWidth(int arg__1) const; + QSize minimumSize() const; + void setGeometry(const QRect& arg__1); + QSize sizeHint() const; + QSpacerItem* spacerItem(); + QWidget* widget(); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QWIDGETITEM_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWizard.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWizard.cpp new file mode 100644 index 00000000..47b789d6 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWizard.cpp @@ -0,0 +1,758 @@ +#include "qtscriptshell_QWizard.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QWizard::QtScriptShell_QWizard(QWidget* parent, Qt::WindowFlags flags) + : QWizard(parent, flags) {} + +QtScriptShell_QWizard::~QtScriptShell_QWizard() {} + +void QtScriptShell_QWizard::accept() +{ + QScriptValue _q_function = __qtscript_self.property("accept"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("accept") & QScriptValue::QObjectMember)) { + QWizard::accept(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QWizard::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QWizard::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizard::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QWizard::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QWizard::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QWizard::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizard::cleanupPage(int id) +{ + QScriptValue _q_function = __qtscript_self.property("cleanupPage"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("cleanupPage") & QScriptValue::QObjectMember)) { + QWizard::cleanupPage(id); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, id)); + } +} + +void QtScriptShell_QWizard::closeEvent(QCloseEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QWizard::closeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QWizard::contextMenuEvent(QContextMenuEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QWizard::contextMenuEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QWizard::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QWizard::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QWizard::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QWizard::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWizard::done(int result) +{ + QScriptValue _q_function = __qtscript_self.property("done"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("done") & QScriptValue::QObjectMember)) { + QWizard::done(result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, result)); + } +} + +void QtScriptShell_QWizard::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QWizard::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizard::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QWizard::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizard::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QWizard::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizard::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QWizard::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizard::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QWizard::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QWizard::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QWizard::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QWizard::eventFilter(QObject* arg__1, QEvent* arg__2) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QWizard::eventFilter(arg__1, arg__2); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1) + << qScriptValueFromValue(_q_engine, arg__2))); + } +} + +int QtScriptShell_QWizard::exec() +{ + QScriptValue _q_function = __qtscript_self.property("exec"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("exec") & QScriptValue::QObjectMember)) { + return QWizard::exec(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWizard::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QWizard::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QWizard::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QWizard::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QWizard::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QWizard::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QWizard::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QWizard::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QWizard::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QWizard::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QWizard::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QWizard::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizard::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QWizard::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QWizard::initializePage(int id) +{ + QScriptValue _q_function = __qtscript_self.property("initializePage"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initializePage") & QScriptValue::QObjectMember)) { + QWizard::initializePage(id); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, id)); + } +} + +void QtScriptShell_QWizard::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QWizard::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QWizard::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QWizard::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QWizard::keyPressEvent(QKeyEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QWizard::keyPressEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QWizard::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QWizard::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizard::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QWizard::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QWizard::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QWizard::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QWizard::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QWizard::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizard::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QWizard::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizard::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QWizard::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizard::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QWizard::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizard::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QWizard::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QWizard::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QWizard::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +int QtScriptShell_QWizard::nextId() const +{ + QScriptValue _q_function = __qtscript_self.property("nextId"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nextId") & QScriptValue::QObjectMember)) { + return QWizard::nextId(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWizard::open() +{ + QScriptValue _q_function = __qtscript_self.property("open"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("open") & QScriptValue::QObjectMember)) { + QWizard::open(); + } else { + _q_function.call(__qtscript_self); + } +} + +QPaintEngine* QtScriptShell_QWizard::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QWizard::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWizard::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QWizard::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QWizard::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QWizard::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QWizard::reject() +{ + QScriptValue _q_function = __qtscript_self.property("reject"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reject") & QScriptValue::QObjectMember)) { + QWizard::reject(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QWizard::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QWizard::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QWizard::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QWizard::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWizard::showEvent(QShowEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QWizard::showEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QWizard::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QWizard::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizard::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QWizard::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QWizard::validateCurrentPage() +{ + QScriptValue _q_function = __qtscript_self.property("validateCurrentPage"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("validateCurrentPage") & QScriptValue::QObjectMember)) { + return QWizard::validateCurrentPage(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWizard::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QWizard::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWizard.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWizard.h new file mode 100644 index 00000000..455cd774 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWizard.h @@ -0,0 +1,70 @@ +#ifndef QTSCRIPTSHELL_QWIZARD_H +#define QTSCRIPTSHELL_QWIZARD_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QWizard : public QWizard +{ +public: + QtScriptShell_QWizard(QWidget* parent = 0, Qt::WindowFlags flags = Qt::WindowFlags()); + ~QtScriptShell_QWizard(); + + void accept(); + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void cleanupPage(int id); + void closeEvent(QCloseEvent* arg__1); + void contextMenuEvent(QContextMenuEvent* arg__1); + void customEvent(QEvent* event); + int devType() const; + void done(int result); + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* arg__1, QEvent* arg__2); + int exec(); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void initializePage(int id); + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + void keyPressEvent(QKeyEvent* arg__1); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + int nextId() const; + void open(); + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void reject(); + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* arg__1); + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + bool validateCurrentPage(); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QWIZARD_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWizardPage.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWizardPage.cpp new file mode 100644 index 00000000..f550fbbf --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWizardPage.cpp @@ -0,0 +1,726 @@ +#include "qtscriptshell_QWizardPage.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QActionEvent*) +Q_DECLARE_METATYPE(QEvent*) +Q_DECLARE_METATYPE(QChildEvent*) +Q_DECLARE_METATYPE(QCloseEvent*) +Q_DECLARE_METATYPE(QContextMenuEvent*) +Q_DECLARE_METATYPE(QDragEnterEvent*) +Q_DECLARE_METATYPE(QDragLeaveEvent*) +Q_DECLARE_METATYPE(QDragMoveEvent*) +Q_DECLARE_METATYPE(QDropEvent*) +Q_DECLARE_METATYPE(QFocusEvent*) +Q_DECLARE_METATYPE(QHideEvent*) +Q_DECLARE_METATYPE(QPainter*) +Q_DECLARE_METATYPE(QInputMethodEvent*) +Q_DECLARE_METATYPE(Qt::InputMethodQuery) +Q_DECLARE_METATYPE(QKeyEvent*) +Q_DECLARE_METATYPE(QPaintDevice::PaintDeviceMetric) +Q_DECLARE_METATYPE(QMouseEvent*) +Q_DECLARE_METATYPE(QMoveEvent*) +Q_DECLARE_METATYPE(long*) +Q_DECLARE_METATYPE(QPaintEngine*) +Q_DECLARE_METATYPE(QPaintEvent*) +Q_DECLARE_METATYPE(QPoint*) +Q_DECLARE_METATYPE(QPaintDevice*) +Q_DECLARE_METATYPE(QResizeEvent*) +Q_DECLARE_METATYPE(QShowEvent*) +Q_DECLARE_METATYPE(QTabletEvent*) +Q_DECLARE_METATYPE(QTimerEvent*) +Q_DECLARE_METATYPE(QWheelEvent*) + +QtScriptShell_QWizardPage::QtScriptShell_QWizardPage(QWidget* parent) + : QWizardPage(parent) {} + +QtScriptShell_QWizardPage::~QtScriptShell_QWizardPage() {} + +void QtScriptShell_QWizardPage::actionEvent(QActionEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("actionEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("actionEvent") & QScriptValue::QObjectMember)) { + QWizardPage::actionEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizardPage::changeEvent(QEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("changeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("changeEvent") & QScriptValue::QObjectMember)) { + QWizardPage::changeEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +void QtScriptShell_QWizardPage::childEvent(QChildEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("childEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("childEvent") & QScriptValue::QObjectMember)) { + QWizardPage::childEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizardPage::cleanupPage() +{ + QScriptValue _q_function = __qtscript_self.property("cleanupPage"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("cleanupPage") & QScriptValue::QObjectMember)) { + QWizardPage::cleanupPage(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QWizardPage::closeEvent(QCloseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("closeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("closeEvent") & QScriptValue::QObjectMember)) { + QWizardPage::closeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizardPage::contextMenuEvent(QContextMenuEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("contextMenuEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contextMenuEvent") & QScriptValue::QObjectMember)) { + QWizardPage::contextMenuEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizardPage::customEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("customEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("customEvent") & QScriptValue::QObjectMember)) { + QWizardPage::customEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QWizardPage::devType() const +{ + QScriptValue _q_function = __qtscript_self.property("devType"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("devType") & QScriptValue::QObjectMember)) { + return QWizardPage::devType(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWizardPage::dragEnterEvent(QDragEnterEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragEnterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragEnterEvent") & QScriptValue::QObjectMember)) { + QWizardPage::dragEnterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizardPage::dragLeaveEvent(QDragLeaveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragLeaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragLeaveEvent") & QScriptValue::QObjectMember)) { + QWizardPage::dragLeaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizardPage::dragMoveEvent(QDragMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dragMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dragMoveEvent") & QScriptValue::QObjectMember)) { + QWizardPage::dragMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizardPage::dropEvent(QDropEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("dropEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("dropEvent") & QScriptValue::QObjectMember)) { + QWizardPage::dropEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizardPage::enterEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("enterEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("enterEvent") & QScriptValue::QObjectMember)) { + QWizardPage::enterEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QWizardPage::event(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("event"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("event") & QScriptValue::QObjectMember)) { + return QWizardPage::event(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event))); + } +} + +bool QtScriptShell_QWizardPage::eventFilter(QObject* watched, QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("eventFilter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("eventFilter") & QScriptValue::QObjectMember)) { + return QWizardPage::eventFilter(watched, event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, watched) + << qScriptValueFromValue(_q_engine, event))); + } +} + +void QtScriptShell_QWizardPage::focusInEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusInEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusInEvent") & QScriptValue::QObjectMember)) { + QWizardPage::focusInEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QWizardPage::focusNextPrevChild(bool next) +{ + QScriptValue _q_function = __qtscript_self.property("focusNextPrevChild"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusNextPrevChild") & QScriptValue::QObjectMember)) { + return QWizardPage::focusNextPrevChild(next); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, next))); + } +} + +void QtScriptShell_QWizardPage::focusOutEvent(QFocusEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("focusOutEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("focusOutEvent") & QScriptValue::QObjectMember)) { + QWizardPage::focusOutEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QWizardPage::hasHeightForWidth() const +{ + QScriptValue _q_function = __qtscript_self.property("hasHeightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasHeightForWidth") & QScriptValue::QObjectMember)) { + return QWizardPage::hasHeightForWidth(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QWizardPage::heightForWidth(int arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("heightForWidth"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("heightForWidth") & QScriptValue::QObjectMember)) { + return QWizardPage::heightForWidth(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +void QtScriptShell_QWizardPage::hideEvent(QHideEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("hideEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hideEvent") & QScriptValue::QObjectMember)) { + QWizardPage::hideEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizardPage::initPainter(QPainter* painter) const +{ + QScriptValue _q_function = __qtscript_self.property("initPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initPainter") & QScriptValue::QObjectMember)) { + QWizardPage::initPainter(painter); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, painter)); + } +} + +void QtScriptShell_QWizardPage::initializePage() +{ + QScriptValue _q_function = __qtscript_self.property("initializePage"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("initializePage") & QScriptValue::QObjectMember)) { + QWizardPage::initializePage(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QWizardPage::inputMethodEvent(QInputMethodEvent* arg__1) +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodEvent") & QScriptValue::QObjectMember)) { + QWizardPage::inputMethodEvent(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1)); + } +} + +QVariant QtScriptShell_QWizardPage::inputMethodQuery(Qt::InputMethodQuery arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("inputMethodQuery"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("inputMethodQuery") & QScriptValue::QObjectMember)) { + return QWizardPage::inputMethodQuery(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +bool QtScriptShell_QWizardPage::isComplete() const +{ + QScriptValue _q_function = __qtscript_self.property("isComplete"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("isComplete") & QScriptValue::QObjectMember)) { + return QWizardPage::isComplete(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWizardPage::keyPressEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyPressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyPressEvent") & QScriptValue::QObjectMember)) { + QWizardPage::keyPressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizardPage::keyReleaseEvent(QKeyEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("keyReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("keyReleaseEvent") & QScriptValue::QObjectMember)) { + QWizardPage::keyReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizardPage::leaveEvent(QEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("leaveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("leaveEvent") & QScriptValue::QObjectMember)) { + QWizardPage::leaveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +int QtScriptShell_QWizardPage::metric(QPaintDevice::PaintDeviceMetric arg__1) const +{ + QScriptValue _q_function = __qtscript_self.property("metric"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("metric") & QScriptValue::QObjectMember)) { + return QWizardPage::metric(arg__1); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, arg__1))); + } +} + +QSize QtScriptShell_QWizardPage::minimumSizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getMinimumSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getMinimumSizeHint") & QScriptValue::QObjectMember)) { + return QWizardPage::minimumSizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWizardPage::mouseDoubleClickEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseDoubleClickEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseDoubleClickEvent") & QScriptValue::QObjectMember)) { + QWizardPage::mouseDoubleClickEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizardPage::mouseMoveEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseMoveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseMoveEvent") & QScriptValue::QObjectMember)) { + QWizardPage::mouseMoveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizardPage::mousePressEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mousePressEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mousePressEvent") & QScriptValue::QObjectMember)) { + QWizardPage::mousePressEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizardPage::mouseReleaseEvent(QMouseEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("mouseReleaseEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("mouseReleaseEvent") & QScriptValue::QObjectMember)) { + QWizardPage::mouseReleaseEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizardPage::moveEvent(QMoveEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("moveEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("moveEvent") & QScriptValue::QObjectMember)) { + QWizardPage::moveEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QWizardPage::nativeEvent(const QByteArray& eventType, void* message, long* result) +{ + QScriptValue _q_function = __qtscript_self.property("nativeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nativeEvent") & QScriptValue::QObjectMember)) { + return QWizardPage::nativeEvent(eventType, message, result); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eventType) + << qScriptValueFromValue(_q_engine, message) + << qScriptValueFromValue(_q_engine, result))); + } +} + +int QtScriptShell_QWizardPage::nextId() const +{ + QScriptValue _q_function = __qtscript_self.property("nextId"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("nextId") & QScriptValue::QObjectMember)) { + return QWizardPage::nextId(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QPaintEngine* QtScriptShell_QWizardPage::paintEngine() const +{ + QScriptValue _q_function = __qtscript_self.property("paintEngine"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEngine") & QScriptValue::QObjectMember)) { + return QWizardPage::paintEngine(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWizardPage::paintEvent(QPaintEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("paintEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("paintEvent") & QScriptValue::QObjectMember)) { + QWizardPage::paintEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPaintDevice* QtScriptShell_QWizardPage::redirected(QPoint* offset) const +{ + QScriptValue _q_function = __qtscript_self.property("redirected"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("redirected") & QScriptValue::QObjectMember)) { + return QWizardPage::redirected(offset); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, offset))); + } +} + +void QtScriptShell_QWizardPage::resizeEvent(QResizeEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("resizeEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resizeEvent") & QScriptValue::QObjectMember)) { + QWizardPage::resizeEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QPainter* QtScriptShell_QWizardPage::sharedPainter() const +{ + QScriptValue _q_function = __qtscript_self.property("sharedPainter"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("sharedPainter") & QScriptValue::QObjectMember)) { + return QWizardPage::sharedPainter(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWizardPage::showEvent(QShowEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("showEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("showEvent") & QScriptValue::QObjectMember)) { + QWizardPage::showEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +QSize QtScriptShell_QWizardPage::sizeHint() const +{ + QScriptValue _q_function = __qtscript_self.property("getSizeHint"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("getSizeHint") & QScriptValue::QObjectMember)) { + return QWizardPage::sizeHint(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWizardPage::tabletEvent(QTabletEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("tabletEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("tabletEvent") & QScriptValue::QObjectMember)) { + QWizardPage::tabletEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +void QtScriptShell_QWizardPage::timerEvent(QTimerEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("timerEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("timerEvent") & QScriptValue::QObjectMember)) { + QWizardPage::timerEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + +bool QtScriptShell_QWizardPage::validatePage() +{ + QScriptValue _q_function = __qtscript_self.property("validatePage"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("validatePage") & QScriptValue::QObjectMember)) { + return QWizardPage::validatePage(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QWizardPage::wheelEvent(QWheelEvent* event) +{ + QScriptValue _q_function = __qtscript_self.property("wheelEvent"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("wheelEvent") & QScriptValue::QObjectMember)) { + QWizardPage::wheelEvent(event); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, event)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWizardPage.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWizardPage.h new file mode 100644 index 00000000..e3bb2a05 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_widgets/qtscriptshell_QWizardPage.h @@ -0,0 +1,68 @@ +#ifndef QTSCRIPTSHELL_QWIZARDPAGE_H +#define QTSCRIPTSHELL_QWIZARDPAGE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QWizardPage : public QWizardPage +{ +public: + QtScriptShell_QWizardPage(QWidget* parent = 0); + ~QtScriptShell_QWizardPage(); + + void actionEvent(QActionEvent* event); + void changeEvent(QEvent* arg__1); + void childEvent(QChildEvent* event); + void cleanupPage(); + void closeEvent(QCloseEvent* event); + void contextMenuEvent(QContextMenuEvent* event); + void customEvent(QEvent* event); + int devType() const; + void dragEnterEvent(QDragEnterEvent* event); + void dragLeaveEvent(QDragLeaveEvent* event); + void dragMoveEvent(QDragMoveEvent* event); + void dropEvent(QDropEvent* event); + void enterEvent(QEvent* event); + bool event(QEvent* event); + bool eventFilter(QObject* watched, QEvent* event); + void focusInEvent(QFocusEvent* event); + bool focusNextPrevChild(bool next); + void focusOutEvent(QFocusEvent* event); + bool hasHeightForWidth() const; + int heightForWidth(int arg__1) const; + void hideEvent(QHideEvent* event); + void initPainter(QPainter* painter) const; + void initializePage(); + void inputMethodEvent(QInputMethodEvent* arg__1); + QVariant inputMethodQuery(Qt::InputMethodQuery arg__1) const; + bool isComplete() const; + void keyPressEvent(QKeyEvent* event); + void keyReleaseEvent(QKeyEvent* event); + void leaveEvent(QEvent* event); + int metric(QPaintDevice::PaintDeviceMetric arg__1) const; + QSize minimumSizeHint() const; + void mouseDoubleClickEvent(QMouseEvent* event); + void mouseMoveEvent(QMouseEvent* event); + void mousePressEvent(QMouseEvent* event); + void mouseReleaseEvent(QMouseEvent* event); + void moveEvent(QMoveEvent* event); + bool nativeEvent(const QByteArray& eventType, void* message, long* result); + int nextId() const; + QPaintEngine* paintEngine() const; + void paintEvent(QPaintEvent* event); + QPaintDevice* redirected(QPoint* offset) const; + void resizeEvent(QResizeEvent* event); + QPainter* sharedPainter() const; + void showEvent(QShowEvent* event); + QSize sizeHint() const; + void tabletEvent(QTabletEvent* event); + void timerEvent(QTimerEvent* event); + bool validatePage(); + void wheelEvent(QWheelEvent* event); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QWIZARDPAGE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/com_trolltech_qt_xml.pri b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/com_trolltech_qt_xml.pri new file mode 100644 index 00000000..7db6cc2d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/com_trolltech_qt_xml.pri @@ -0,0 +1,58 @@ +HEADERS += \ + $$PWD/qtscriptshell_QXmlAttributes.h \ + $$PWD/qtscriptshell_QXmlContentHandler.h \ + $$PWD/qtscriptshell_QXmlDTDHandler.h \ + $$PWD/qtscriptshell_QXmlDeclHandler.h \ + $$PWD/qtscriptshell_QXmlDefaultHandler.h \ + $$PWD/qtscriptshell_QXmlEntityResolver.h \ + $$PWD/qtscriptshell_QXmlErrorHandler.h \ + $$PWD/qtscriptshell_QXmlInputSource.h \ + $$PWD/qtscriptshell_QXmlLexicalHandler.h \ + $$PWD/qtscriptshell_QXmlLocator.h \ + $$PWD/qtscriptshell_QXmlReader.h \ + $$PWD/qtscriptshell_QXmlSimpleReader.h \ + +SOURCES += \ + $$PWD/qtscript_QDomAttr.cpp \ + $$PWD/qtscript_QDomCDATASection.cpp \ + $$PWD/qtscript_QDomCharacterData.cpp \ + $$PWD/qtscript_QDomComment.cpp \ + $$PWD/qtscript_QDomDocument.cpp \ + $$PWD/qtscript_QDomDocumentFragment.cpp \ + $$PWD/qtscript_QDomDocumentType.cpp \ + $$PWD/qtscript_QDomElement.cpp \ + $$PWD/qtscript_QDomEntity.cpp \ + $$PWD/qtscript_QDomEntityReference.cpp \ + $$PWD/qtscript_QDomImplementation.cpp \ + $$PWD/qtscript_QDomNamedNodeMap.cpp \ + $$PWD/qtscript_QDomNode.cpp \ + $$PWD/qtscript_QDomNodeList.cpp \ + $$PWD/qtscript_QDomNotation.cpp \ + $$PWD/qtscript_QDomProcessingInstruction.cpp \ + $$PWD/qtscript_QDomText.cpp \ + $$PWD/qtscript_QXmlAttributes.cpp \ + $$PWD/qtscript_QXmlContentHandler.cpp \ + $$PWD/qtscript_QXmlDTDHandler.cpp \ + $$PWD/qtscript_QXmlDeclHandler.cpp \ + $$PWD/qtscript_QXmlDefaultHandler.cpp \ + $$PWD/qtscript_QXmlEntityResolver.cpp \ + $$PWD/qtscript_QXmlErrorHandler.cpp \ + $$PWD/qtscript_QXmlInputSource.cpp \ + $$PWD/qtscript_QXmlLexicalHandler.cpp \ + $$PWD/qtscript_QXmlLocator.cpp \ + $$PWD/qtscript_QXmlParseException.cpp \ + $$PWD/qtscript_QXmlReader.cpp \ + $$PWD/qtscript_QXmlSimpleReader.cpp \ + $$PWD/qtscriptshell_QXmlAttributes.cpp \ + $$PWD/qtscriptshell_QXmlContentHandler.cpp \ + $$PWD/qtscriptshell_QXmlDTDHandler.cpp \ + $$PWD/qtscriptshell_QXmlDeclHandler.cpp \ + $$PWD/qtscriptshell_QXmlDefaultHandler.cpp \ + $$PWD/qtscriptshell_QXmlEntityResolver.cpp \ + $$PWD/qtscriptshell_QXmlErrorHandler.cpp \ + $$PWD/qtscriptshell_QXmlInputSource.cpp \ + $$PWD/qtscriptshell_QXmlLexicalHandler.cpp \ + $$PWD/qtscriptshell_QXmlLocator.cpp \ + $$PWD/qtscriptshell_QXmlReader.cpp \ + $$PWD/qtscriptshell_QXmlSimpleReader.cpp \ + $$PWD/com_trolltech_qt_xml_init.cpp diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/com_trolltech_qt_xml_init.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/com_trolltech_qt_xml_init.cpp new file mode 100644 index 00000000..f87b1a8a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/com_trolltech_qt_xml_init.cpp @@ -0,0 +1,110 @@ +#include +#include + +QScriptValue qtscript_create_QXmlDTDHandler_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlLexicalHandler_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomImplementation_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlLocator_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlErrorHandler_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlAttributes_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlReader_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomNodeList_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlParseException_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlInputSource_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlDeclHandler_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomNamedNodeMap_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlContentHandler_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlEntityResolver_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomNode_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomElement_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomEntityReference_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomAttr_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomDocument_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomProcessingInstruction_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomNotation_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomDocumentType_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomCharacterData_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlDefaultHandler_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomEntity_class(QScriptEngine *engine); +QScriptValue qtscript_create_QXmlSimpleReader_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomDocumentFragment_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomText_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomComment_class(QScriptEngine *engine); +QScriptValue qtscript_create_QDomCDATASection_class(QScriptEngine *engine); + +static const char * const qtscript_com_trolltech_qt_xml_class_names[] = { + "QXmlDTDHandler" + , "QXmlLexicalHandler" + , "QDomImplementation" + , "QXmlLocator" + , "QXmlErrorHandler" + , "QXmlAttributes" + , "QXmlReader" + , "QDomNodeList" + , "QXmlParseException" + , "QXmlInputSource" + , "QXmlDeclHandler" + , "QDomNamedNodeMap" + , "QXmlContentHandler" + , "QXmlEntityResolver" + , "QDomNode" + , "QDomElement" + , "QDomEntityReference" + , "QDomAttr" + , "QDomDocument" + , "QDomProcessingInstruction" + , "QDomNotation" + , "QDomDocumentType" + , "QDomCharacterData" + , "QXmlDefaultHandler" + , "QDomEntity" + , "QXmlSimpleReader" + , "QDomDocumentFragment" + , "QDomText" + , "QDomComment" + , "QDomCDATASection" +}; + +typedef QScriptValue (*QtBindingCreator)(QScriptEngine *engine); +static const QtBindingCreator qtscript_com_trolltech_qt_xml_class_functions[] = { + qtscript_create_QXmlDTDHandler_class + , qtscript_create_QXmlLexicalHandler_class + , qtscript_create_QDomImplementation_class + , qtscript_create_QXmlLocator_class + , qtscript_create_QXmlErrorHandler_class + , qtscript_create_QXmlAttributes_class + , qtscript_create_QXmlReader_class + , qtscript_create_QDomNodeList_class + , qtscript_create_QXmlParseException_class + , qtscript_create_QXmlInputSource_class + , qtscript_create_QXmlDeclHandler_class + , qtscript_create_QDomNamedNodeMap_class + , qtscript_create_QXmlContentHandler_class + , qtscript_create_QXmlEntityResolver_class + , qtscript_create_QDomNode_class + , qtscript_create_QDomElement_class + , qtscript_create_QDomEntityReference_class + , qtscript_create_QDomAttr_class + , qtscript_create_QDomDocument_class + , qtscript_create_QDomProcessingInstruction_class + , qtscript_create_QDomNotation_class + , qtscript_create_QDomDocumentType_class + , qtscript_create_QDomCharacterData_class + , qtscript_create_QXmlDefaultHandler_class + , qtscript_create_QDomEntity_class + , qtscript_create_QXmlSimpleReader_class + , qtscript_create_QDomDocumentFragment_class + , qtscript_create_QDomText_class + , qtscript_create_QDomComment_class + , qtscript_create_QDomCDATASection_class +}; + +void qtscript_initialize_com_trolltech_qt_xml_bindings(QScriptValue &extensionObject) +{ + QScriptEngine *engine = extensionObject.engine(); + for (int i = 0; i < 30; ++i) { + extensionObject.setProperty(qtscript_com_trolltech_qt_xml_class_names[i], + qtscript_com_trolltech_qt_xml_class_functions[i](engine), + QScriptValue::SkipInEnumeration); + } +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomAttr.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomAttr.cpp new file mode 100644 index 00000000..053f84e5 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomAttr.cpp @@ -0,0 +1,190 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QDomAttr_function_names[] = { + "QDomAttr" + // static + // prototype + , "name" + , "ownerElement" + , "setValue" + , "specified" + , "value" + , "toString" +}; + +static const char * const qtscript_QDomAttr_function_signatures[] = { + "\nQDomAttr x" + // static + // prototype + , "" + , "" + , "String arg__1" + , "" + , "" +"" +}; + +static const int qtscript_QDomAttr_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QDomAttr_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomAttr::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomAttr) +Q_DECLARE_METATYPE(QDomAttr*) +Q_DECLARE_METATYPE(QDomElement) +Q_DECLARE_METATYPE(QDomNode*) + +// +// QDomAttr +// + +static QScriptValue qtscript_QDomAttr_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomAttr* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomAttr.%0(): this object is not a QDomAttr") + .arg(qtscript_QDomAttr_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->name(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QDomElement _q_result = _q_self->ownerElement(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setValue(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->specified(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->value(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: { + QString result = QString::fromLatin1("QDomAttr"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDomAttr_throw_ambiguity_error_helper(context, + qtscript_QDomAttr_function_names[_id+1], + qtscript_QDomAttr_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDomAttr_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomAttr(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomAttr _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QDomAttr _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomAttr _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomAttr_throw_ambiguity_error_helper(context, + qtscript_QDomAttr_function_names[_id], + qtscript_QDomAttr_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomAttr_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomAttr*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDomAttr_prototype_call, qtscript_QDomAttr_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDomAttr_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomAttr_static_call, proto, qtscript_QDomAttr_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomCDATASection.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomCDATASection.cpp new file mode 100644 index 00000000..0daaa3bb --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomCDATASection.cpp @@ -0,0 +1,132 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QDomCDATASection_function_names[] = { + "QDomCDATASection" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QDomCDATASection_function_signatures[] = { + "\nQDomCDATASection x" + // static + // prototype +"" +}; + +static const int qtscript_QDomCDATASection_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QDomCDATASection_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomCDATASection::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomCDATASection) +Q_DECLARE_METATYPE(QDomCDATASection*) +Q_DECLARE_METATYPE(QDomText*) + +// +// QDomCDATASection +// + +static QScriptValue qtscript_QDomCDATASection_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomCDATASection* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomCDATASection.%0(): this object is not a QDomCDATASection") + .arg(qtscript_QDomCDATASection_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QDomCDATASection"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDomCDATASection_throw_ambiguity_error_helper(context, + qtscript_QDomCDATASection_function_names[_id+1], + qtscript_QDomCDATASection_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDomCDATASection_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomCDATASection(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomCDATASection _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QDomCDATASection _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomCDATASection _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomCDATASection_throw_ambiguity_error_helper(context, + qtscript_QDomCDATASection_function_names[_id], + qtscript_QDomCDATASection_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomCDATASection_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomCDATASection*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomCDATASection_static_call, proto, qtscript_QDomCDATASection_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomCharacterData.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomCharacterData.cpp new file mode 100644 index 00000000..dbadebbb --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomCharacterData.cpp @@ -0,0 +1,229 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QDomCharacterData_function_names[] = { + "QDomCharacterData" + // static + // prototype + , "appendData" + , "data" + , "deleteData" + , "insertData" + , "length" + , "replaceData" + , "setData" + , "substringData" + , "toString" +}; + +static const char * const qtscript_QDomCharacterData_function_signatures[] = { + "\nQDomCharacterData x" + // static + // prototype + , "String arg" + , "" + , "unsigned long offset, unsigned long count" + , "unsigned long offset, String arg" + , "" + , "unsigned long offset, unsigned long count, String arg" + , "String arg__1" + , "unsigned long offset, unsigned long count" +"" +}; + +static const int qtscript_QDomCharacterData_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 2 + , 2 + , 0 + , 3 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QDomCharacterData_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomCharacterData::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomCharacterData) +Q_DECLARE_METATYPE(QDomCharacterData*) +Q_DECLARE_METATYPE(QDomNode*) + +// +// QDomCharacterData +// + +static QScriptValue qtscript_QDomCharacterData_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomCharacterData* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomCharacterData.%0(): this object is not a QDomCharacterData") + .arg(qtscript_QDomCharacterData_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->appendData(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->data(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 2) { + ulong _q_arg0 = qscriptvalue_cast(context->argument(0)); + ulong _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->deleteData(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 2) { + ulong _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString _q_arg1 = context->argument(1).toString(); + _q_self->insertData(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->length(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 3) { + ulong _q_arg0 = qscriptvalue_cast(context->argument(0)); + ulong _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_arg2 = context->argument(2).toString(); + _q_self->replaceData(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setData(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 7: + if (context->argumentCount() == 2) { + ulong _q_arg0 = qscriptvalue_cast(context->argument(0)); + ulong _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString _q_result = _q_self->substringData(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: { + QString result = QString::fromLatin1("QDomCharacterData"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDomCharacterData_throw_ambiguity_error_helper(context, + qtscript_QDomCharacterData_function_names[_id+1], + qtscript_QDomCharacterData_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDomCharacterData_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomCharacterData(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomCharacterData _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QDomCharacterData _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomCharacterData _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomCharacterData_throw_ambiguity_error_helper(context, + qtscript_QDomCharacterData_function_names[_id], + qtscript_QDomCharacterData_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomCharacterData_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomCharacterData*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDomCharacterData_prototype_call, qtscript_QDomCharacterData_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDomCharacterData_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomCharacterData_static_call, proto, qtscript_QDomCharacterData_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomComment.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomComment.cpp new file mode 100644 index 00000000..29a2d377 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomComment.cpp @@ -0,0 +1,132 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QDomComment_function_names[] = { + "QDomComment" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QDomComment_function_signatures[] = { + "\nQDomComment x" + // static + // prototype +"" +}; + +static const int qtscript_QDomComment_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QDomComment_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomComment::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomComment) +Q_DECLARE_METATYPE(QDomComment*) +Q_DECLARE_METATYPE(QDomCharacterData*) + +// +// QDomComment +// + +static QScriptValue qtscript_QDomComment_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomComment* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomComment.%0(): this object is not a QDomComment") + .arg(qtscript_QDomComment_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QDomComment"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDomComment_throw_ambiguity_error_helper(context, + qtscript_QDomComment_function_names[_id+1], + qtscript_QDomComment_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDomComment_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomComment(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomComment _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QDomComment _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomComment _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomComment_throw_ambiguity_error_helper(context, + qtscript_QDomComment_function_names[_id], + qtscript_QDomComment_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomComment_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomComment*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomComment_static_call, proto, qtscript_QDomComment_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomDocument.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomDocument.cpp new file mode 100644 index 00000000..cd210e7e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomDocument.cpp @@ -0,0 +1,665 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include +#include +#include +#include + +static const char * const qtscript_QDomDocument_function_names[] = { + "QDomDocument" + // static + // prototype + , "createAttribute" + , "createAttributeNS" + , "createCDATASection" + , "createComment" + , "createDocumentFragment" + , "createElement" + , "createElementNS" + , "createEntityReference" + , "createProcessingInstruction" + , "createTextNode" + , "doctype" + , "documentElement" + , "elementById" + , "elementsByTagName" + , "elementsByTagNameNS" + , "implementation" + , "importNode" + , "setContent" + , "toByteArray" + , "toString" +}; + +static const char * const qtscript_QDomDocument_function_signatures[] = { + "\nQDomDocument x\nQDomDocumentType doctype\nString name" + // static + // prototype + , "String name" + , "String nsURI, String qName" + , "String data" + , "String data" + , "" + , "String tagName" + , "String nsURI, String qName" + , "String name" + , "String target, String data" + , "String data" + , "" + , "" + , "String elementId" + , "String tagname" + , "String nsURI, String localName" + , "" + , "QDomNode importedNode, bool deep" + , "QIODevice dev, String errorMsg, int errorLine, int errorColumn\nQIODevice dev, bool namespaceProcessing, String errorMsg, int errorLine, int errorColumn\nQXmlInputSource source, QXmlReader reader, String errorMsg, int errorLine, int errorColumn\nQXmlInputSource source, bool namespaceProcessing, String errorMsg, int errorLine, int errorColumn\nQByteArray text, String errorMsg, int errorLine, int errorColumn\nQByteArray text, bool namespaceProcessing, String errorMsg, int errorLine, int errorColumn\nString text, String errorMsg, int errorLine, int errorColumn\nString text, bool namespaceProcessing, String errorMsg, int errorLine, int errorColumn" + , "int arg__1" + , "int arg__1" +}; + +static const int qtscript_QDomDocument_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 2 + , 1 + , 1 + , 0 + , 1 + , 2 + , 1 + , 2 + , 1 + , 0 + , 0 + , 1 + , 1 + , 2 + , 0 + , 2 + , 5 + , 1 + , 1 +}; + +static QScriptValue qtscript_QDomDocument_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomDocument::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomDocument) +Q_DECLARE_METATYPE(QDomDocument*) +Q_DECLARE_METATYPE(QDomAttr) +Q_DECLARE_METATYPE(QDomCDATASection) +Q_DECLARE_METATYPE(QDomComment) +Q_DECLARE_METATYPE(QDomDocumentFragment) +Q_DECLARE_METATYPE(QDomElement) +Q_DECLARE_METATYPE(QDomEntityReference) +Q_DECLARE_METATYPE(QDomProcessingInstruction) +Q_DECLARE_METATYPE(QDomText) +Q_DECLARE_METATYPE(QDomDocumentType) +Q_DECLARE_METATYPE(QDomNodeList) +Q_DECLARE_METATYPE(QDomImplementation) +Q_DECLARE_METATYPE(QDomNode) +Q_DECLARE_METATYPE(QIODevice*) +Q_DECLARE_METATYPE(QString*) +Q_DECLARE_METATYPE(int*) +Q_DECLARE_METATYPE(QXmlInputSource*) +Q_DECLARE_METATYPE(QXmlReader*) +Q_DECLARE_METATYPE(QDomNode*) + +// +// QDomDocument +// + +static QScriptValue qtscript_QDomDocument_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 20; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomDocument* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomDocument.%0(): this object is not a QDomDocument") + .arg(qtscript_QDomDocument_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomAttr _q_result = _q_self->createAttribute(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QDomAttr _q_result = _q_self->createAttributeNS(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomCDATASection _q_result = _q_self->createCDATASection(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomComment _q_result = _q_self->createComment(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QDomDocumentFragment _q_result = _q_self->createDocumentFragment(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomElement _q_result = _q_self->createElement(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QDomElement _q_result = _q_self->createElementNS(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomEntityReference _q_result = _q_self->createEntityReference(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QDomProcessingInstruction _q_result = _q_self->createProcessingInstruction(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomText _q_result = _q_self->createTextNode(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 0) { + QDomDocumentType _q_result = _q_self->doctype(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + QDomElement _q_result = _q_self->documentElement(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomElement _q_result = _q_self->elementById(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomNodeList _q_result = _q_self->elementsByTagName(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QDomNodeList _q_result = _q_self->elementsByTagNameNS(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + QDomImplementation _q_result = _q_self->implementation(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 2) { + QDomNode _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + QDomNode _q_result = _q_self->importNode(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 1) { + if (qscriptvalue_cast(context->argument(0))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->setContent(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->setContent(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->setContent(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString* _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isBoolean()) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1))) { + QXmlInputSource* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QXmlReader* _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isBoolean()) { + QXmlInputSource* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1))) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString* _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isBoolean()) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1))) { + QString _q_arg0 = context->argument(0).toString(); + QString* _q_arg1 = qscriptvalue_cast(context->argument(1)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isBoolean()) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_arg1 = context->argument(1).toBoolean(); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 3) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && qscriptvalue_cast(context->argument(2))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int* _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isBoolean() + && qscriptvalue_cast(context->argument(2))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + QString* _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && qscriptvalue_cast(context->argument(2))) { + QXmlInputSource* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QXmlReader* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString* _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isBoolean() + && qscriptvalue_cast(context->argument(2))) { + QXmlInputSource* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + QString* _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1)) + && qscriptvalue_cast(context->argument(2))) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int* _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isBoolean() + && qscriptvalue_cast(context->argument(2))) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + QString* _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1)) + && qscriptvalue_cast(context->argument(2))) { + QString _q_arg0 = context->argument(0).toString(); + QString* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int* _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isBoolean() + && qscriptvalue_cast(context->argument(2))) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_arg1 = context->argument(1).toBoolean(); + QString* _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 4) { + if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && qscriptvalue_cast(context->argument(2)) + && qscriptvalue_cast(context->argument(3))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isBoolean() + && qscriptvalue_cast(context->argument(2)) + && qscriptvalue_cast(context->argument(3))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + QString* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && qscriptvalue_cast(context->argument(2)) + && qscriptvalue_cast(context->argument(3))) { + QXmlInputSource* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QXmlReader* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isBoolean() + && qscriptvalue_cast(context->argument(2)) + && qscriptvalue_cast(context->argument(3))) { + QXmlInputSource* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + QString* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && qscriptvalue_cast(context->argument(1)) + && qscriptvalue_cast(context->argument(2)) + && qscriptvalue_cast(context->argument(3))) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + QString* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isBoolean() + && qscriptvalue_cast(context->argument(2)) + && qscriptvalue_cast(context->argument(3))) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + QString* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && qscriptvalue_cast(context->argument(1)) + && qscriptvalue_cast(context->argument(2)) + && qscriptvalue_cast(context->argument(3))) { + QString _q_arg0 = context->argument(0).toString(); + QString* _q_arg1 = qscriptvalue_cast(context->argument(1)); + int* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isBoolean() + && qscriptvalue_cast(context->argument(2)) + && qscriptvalue_cast(context->argument(3))) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_arg1 = context->argument(1).toBoolean(); + QString* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 5) { + if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isBoolean() + && qscriptvalue_cast(context->argument(2)) + && qscriptvalue_cast(context->argument(3)) + && qscriptvalue_cast(context->argument(4))) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + QString* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + int* _q_arg4 = qscriptvalue_cast(context->argument(4)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && qscriptvalue_cast(context->argument(1)) + && qscriptvalue_cast(context->argument(2)) + && qscriptvalue_cast(context->argument(3)) + && qscriptvalue_cast(context->argument(4))) { + QXmlInputSource* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QXmlReader* _q_arg1 = qscriptvalue_cast(context->argument(1)); + QString* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + int* _q_arg4 = qscriptvalue_cast(context->argument(4)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0)) + && context->argument(1).isBoolean() + && qscriptvalue_cast(context->argument(2)) + && qscriptvalue_cast(context->argument(3)) + && qscriptvalue_cast(context->argument(4))) { + QXmlInputSource* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + QString* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + int* _q_arg4 = qscriptvalue_cast(context->argument(4)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType()) + && context->argument(1).isBoolean() + && qscriptvalue_cast(context->argument(2)) + && qscriptvalue_cast(context->argument(3)) + && qscriptvalue_cast(context->argument(4))) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + QString* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + int* _q_arg4 = qscriptvalue_cast(context->argument(4)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isString() + && context->argument(1).isBoolean() + && qscriptvalue_cast(context->argument(2)) + && qscriptvalue_cast(context->argument(3)) + && qscriptvalue_cast(context->argument(4))) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_arg1 = context->argument(1).toBoolean(); + QString* _q_arg2 = qscriptvalue_cast(context->argument(2)); + int* _q_arg3 = qscriptvalue_cast(context->argument(3)); + int* _q_arg4 = qscriptvalue_cast(context->argument(4)); + bool _q_result = _q_self->setContent(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 18: + if (context->argumentCount() == 0) { + QByteArray _q_result = _q_self->toByteArray(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QByteArray _q_result = _q_self->toByteArray(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->toString(); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->toString(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomDocument_throw_ambiguity_error_helper(context, + qtscript_QDomDocument_function_names[_id+1], + qtscript_QDomDocument_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDomDocument_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomDocument(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomDocument _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QDomDocument _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomDocument _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QDomDocumentType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomDocument _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QDomDocument _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomDocument_throw_ambiguity_error_helper(context, + qtscript_QDomDocument_function_names[_id], + qtscript_QDomDocument_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomDocument_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomDocument*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 20; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDomDocument_prototype_call, qtscript_QDomDocument_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDomDocument_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomDocument_static_call, proto, qtscript_QDomDocument_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomDocumentFragment.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomDocumentFragment.cpp new file mode 100644 index 00000000..8655f67c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomDocumentFragment.cpp @@ -0,0 +1,132 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QDomDocumentFragment_function_names[] = { + "QDomDocumentFragment" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QDomDocumentFragment_function_signatures[] = { + "\nQDomDocumentFragment x" + // static + // prototype +"" +}; + +static const int qtscript_QDomDocumentFragment_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QDomDocumentFragment_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomDocumentFragment::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomDocumentFragment) +Q_DECLARE_METATYPE(QDomDocumentFragment*) +Q_DECLARE_METATYPE(QDomNode*) + +// +// QDomDocumentFragment +// + +static QScriptValue qtscript_QDomDocumentFragment_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomDocumentFragment* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomDocumentFragment.%0(): this object is not a QDomDocumentFragment") + .arg(qtscript_QDomDocumentFragment_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QDomDocumentFragment"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDomDocumentFragment_throw_ambiguity_error_helper(context, + qtscript_QDomDocumentFragment_function_names[_id+1], + qtscript_QDomDocumentFragment_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDomDocumentFragment_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomDocumentFragment(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomDocumentFragment _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QDomDocumentFragment _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomDocumentFragment _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomDocumentFragment_throw_ambiguity_error_helper(context, + qtscript_QDomDocumentFragment_function_names[_id], + qtscript_QDomDocumentFragment_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomDocumentFragment_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomDocumentFragment*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomDocumentFragment_static_call, proto, qtscript_QDomDocumentFragment_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomDocumentType.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomDocumentType.cpp new file mode 100644 index 00000000..af1f8d98 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomDocumentType.cpp @@ -0,0 +1,199 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QDomDocumentType_function_names[] = { + "QDomDocumentType" + // static + // prototype + , "entities" + , "internalSubset" + , "name" + , "notations" + , "publicId" + , "systemId" + , "toString" +}; + +static const char * const qtscript_QDomDocumentType_function_signatures[] = { + "\nQDomDocumentType x" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QDomDocumentType_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QDomDocumentType_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomDocumentType::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomDocumentType) +Q_DECLARE_METATYPE(QDomDocumentType*) +Q_DECLARE_METATYPE(QDomNamedNodeMap) +Q_DECLARE_METATYPE(QDomNode*) + +// +// QDomDocumentType +// + +static QScriptValue qtscript_QDomDocumentType_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 6; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomDocumentType* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomDocumentType.%0(): this object is not a QDomDocumentType") + .arg(qtscript_QDomDocumentType_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QDomNamedNodeMap _q_result = _q_self->entities(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->internalSubset(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->name(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QDomNamedNodeMap _q_result = _q_self->notations(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->publicId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->systemId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: { + QString result = QString::fromLatin1("QDomDocumentType"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDomDocumentType_throw_ambiguity_error_helper(context, + qtscript_QDomDocumentType_function_names[_id+1], + qtscript_QDomDocumentType_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDomDocumentType_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomDocumentType(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomDocumentType _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QDomDocumentType _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomDocumentType _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomDocumentType_throw_ambiguity_error_helper(context, + qtscript_QDomDocumentType_function_names[_id], + qtscript_QDomDocumentType_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomDocumentType_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomDocumentType*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 7; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDomDocumentType_prototype_call, qtscript_QDomDocumentType_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDomDocumentType_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomDocumentType_static_call, proto, qtscript_QDomDocumentType_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomElement.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomElement.cpp new file mode 100644 index 00000000..64a37b2c --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomElement.cpp @@ -0,0 +1,423 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QDomElement_function_names[] = { + "QDomElement" + // static + // prototype + , "attribute" + , "attributeNS" + , "attributeNode" + , "attributeNodeNS" + , "attributes" + , "elementsByTagName" + , "elementsByTagNameNS" + , "hasAttribute" + , "hasAttributeNS" + , "removeAttribute" + , "removeAttributeNS" + , "removeAttributeNode" + , "setAttribute" + , "setAttributeNS" + , "setAttributeNode" + , "setAttributeNodeNS" + , "setTagName" + , "tagName" + , "text" + , "toString" +}; + +static const char * const qtscript_QDomElement_function_signatures[] = { + "\nQDomElement x" + // static + // prototype + , "String name, String defValue" + , "String nsURI, String localName, String defValue" + , "String name" + , "String nsURI, String localName" + , "" + , "String tagname" + , "String nsURI, String localName" + , "String name" + , "String nsURI, String localName" + , "String name" + , "String nsURI, String localName" + , "QDomAttr oldAttr" + , "String name, String value\nString name, double value\nString name, float value\nString name, int value\nString name, qlonglong value" + , "String nsURI, String qName, String value\nString nsURI, String qName, double value\nString nsURI, String qName, int value\nString nsURI, String qName, qlonglong value" + , "QDomAttr newAttr" + , "QDomAttr newAttr" + , "String name" + , "" + , "" +"" +}; + +static const int qtscript_QDomElement_function_lengths[] = { + 1 + // static + // prototype + , 2 + , 3 + , 1 + , 2 + , 0 + , 1 + , 2 + , 1 + , 2 + , 1 + , 2 + , 1 + , 2 + , 3 + , 1 + , 1 + , 1 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QDomElement_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomElement::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomElement) +Q_DECLARE_METATYPE(QDomElement*) +Q_DECLARE_METATYPE(QDomAttr) +Q_DECLARE_METATYPE(QDomNamedNodeMap) +Q_DECLARE_METATYPE(QDomNodeList) +Q_DECLARE_METATYPE(QDomNode*) + +// +// QDomElement +// + +static QScriptValue qtscript_QDomElement_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 19; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomElement* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomElement.%0(): this object is not a QDomElement") + .arg(qtscript_QDomElement_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = _q_self->attribute(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->attribute(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->attributeNS(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_result = _q_self->attributeNS(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomAttr _q_result = _q_self->attributeNode(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QDomAttr _q_result = _q_self->attributeNodeNS(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QDomNamedNodeMap _q_result = _q_self->attributes(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomNodeList _q_result = _q_self->elementsByTagName(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QDomNodeList _q_result = _q_self->elementsByTagNameNS(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->hasAttribute(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = _q_self->hasAttributeNS(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->removeAttribute(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 10: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->removeAttributeNS(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QDomAttr _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomAttr _q_result = _q_self->removeAttributeNode(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 2) { + if (context->argument(0).isString() + && context->argument(1).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + _q_self->setAttribute(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && context->argument(1).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + double _q_arg1 = context->argument(1).toNumber(); + _q_self->setAttribute(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && context->argument(1).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + float _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttribute(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && context->argument(1).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->setAttribute(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && (qMetaTypeId() == context->argument(1).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + qlonglong _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setAttribute(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + } + break; + + case 13: + if (context->argumentCount() == 3) { + if (context->argument(0).isString() + && context->argument(1).isString() + && context->argument(2).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + _q_self->setAttributeNS(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && context->argument(1).isString() + && context->argument(2).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + double _q_arg2 = context->argument(2).toNumber(); + _q_self->setAttributeNS(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && context->argument(1).isString() + && context->argument(2).isNumber()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + int _q_arg2 = context->argument(2).toInt32(); + _q_self->setAttributeNS(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString() + && context->argument(1).isString() + && (qMetaTypeId() == context->argument(2).toVariant().userType())) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + qlonglong _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->setAttributeNS(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + } + break; + + case 14: + if (context->argumentCount() == 1) { + QDomAttr _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomAttr _q_result = _q_self->setAttributeNode(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QDomAttr _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomAttr _q_result = _q_self->setAttributeNodeNS(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setTagName(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->tagName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->text(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: { + QString result = QString::fromLatin1("QDomElement"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDomElement_throw_ambiguity_error_helper(context, + qtscript_QDomElement_function_names[_id+1], + qtscript_QDomElement_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDomElement_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomElement(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomElement _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QDomElement _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomElement _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomElement_throw_ambiguity_error_helper(context, + qtscript_QDomElement_function_names[_id], + qtscript_QDomElement_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomElement_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomElement*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 20; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDomElement_prototype_call, qtscript_QDomElement_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDomElement_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomElement_static_call, proto, qtscript_QDomElement_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomEntity.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomEntity.cpp new file mode 100644 index 00000000..b5f42410 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomEntity.cpp @@ -0,0 +1,168 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QDomEntity_function_names[] = { + "QDomEntity" + // static + // prototype + , "notationName" + , "publicId" + , "systemId" + , "toString" +}; + +static const char * const qtscript_QDomEntity_function_signatures[] = { + "\nQDomEntity x" + // static + // prototype + , "" + , "" + , "" +"" +}; + +static const int qtscript_QDomEntity_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QDomEntity_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomEntity::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomEntity) +Q_DECLARE_METATYPE(QDomEntity*) +Q_DECLARE_METATYPE(QDomNode*) + +// +// QDomEntity +// + +static QScriptValue qtscript_QDomEntity_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomEntity* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomEntity.%0(): this object is not a QDomEntity") + .arg(qtscript_QDomEntity_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->notationName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->publicId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->systemId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: { + QString result = QString::fromLatin1("QDomEntity"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDomEntity_throw_ambiguity_error_helper(context, + qtscript_QDomEntity_function_names[_id+1], + qtscript_QDomEntity_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDomEntity_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomEntity(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomEntity _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QDomEntity _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomEntity _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomEntity_throw_ambiguity_error_helper(context, + qtscript_QDomEntity_function_names[_id], + qtscript_QDomEntity_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomEntity_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomEntity*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDomEntity_prototype_call, qtscript_QDomEntity_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDomEntity_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomEntity_static_call, proto, qtscript_QDomEntity_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomEntityReference.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomEntityReference.cpp new file mode 100644 index 00000000..cfc6dcfe --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomEntityReference.cpp @@ -0,0 +1,132 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QDomEntityReference_function_names[] = { + "QDomEntityReference" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QDomEntityReference_function_signatures[] = { + "\nQDomEntityReference x" + // static + // prototype +"" +}; + +static const int qtscript_QDomEntityReference_function_lengths[] = { + 1 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QDomEntityReference_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomEntityReference::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomEntityReference) +Q_DECLARE_METATYPE(QDomEntityReference*) +Q_DECLARE_METATYPE(QDomNode*) + +// +// QDomEntityReference +// + +static QScriptValue qtscript_QDomEntityReference_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomEntityReference* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomEntityReference.%0(): this object is not a QDomEntityReference") + .arg(qtscript_QDomEntityReference_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QDomEntityReference"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDomEntityReference_throw_ambiguity_error_helper(context, + qtscript_QDomEntityReference_function_names[_id+1], + qtscript_QDomEntityReference_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDomEntityReference_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomEntityReference(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomEntityReference _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QDomEntityReference _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomEntityReference _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomEntityReference_throw_ambiguity_error_helper(context, + qtscript_QDomEntityReference_function_names[_id], + qtscript_QDomEntityReference_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomEntityReference_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomEntityReference*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomEntityReference_static_call, proto, qtscript_QDomEntityReference_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomImplementation.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomImplementation.cpp new file mode 100644 index 00000000..5739789a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomImplementation.cpp @@ -0,0 +1,310 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QDomImplementation_function_names[] = { + "QDomImplementation" + // static + , "invalidDataPolicy" + , "setInvalidDataPolicy" + // prototype + , "createDocument" + , "createDocumentType" + , "hasFeature" + , "isNull" + , "equals" + , "toString" +}; + +static const char * const qtscript_QDomImplementation_function_signatures[] = { + "\nQDomImplementation arg__1" + // static + , "" + , "InvalidDataPolicy policy" + // prototype + , "String nsURI, String qName, QDomDocumentType doctype" + , "String qName, String publicId, String systemId" + , "String feature, String version" + , "" + , "QDomImplementation arg__1" +"" +}; + +static const int qtscript_QDomImplementation_function_lengths[] = { + 1 + // static + , 0 + , 1 + // prototype + , 3 + , 3 + , 2 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QDomImplementation_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomImplementation::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomImplementation) +Q_DECLARE_METATYPE(QDomImplementation*) +Q_DECLARE_METATYPE(QDomImplementation::InvalidDataPolicy) +Q_DECLARE_METATYPE(QDomDocumentType) +Q_DECLARE_METATYPE(QDomDocument) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QDomImplementation::InvalidDataPolicy +// + +static const QDomImplementation::InvalidDataPolicy qtscript_QDomImplementation_InvalidDataPolicy_values[] = { + QDomImplementation::AcceptInvalidChars + , QDomImplementation::DropInvalidChars + , QDomImplementation::ReturnNullNode +}; + +static const char * const qtscript_QDomImplementation_InvalidDataPolicy_keys[] = { + "AcceptInvalidChars" + , "DropInvalidChars" + , "ReturnNullNode" +}; + +static QString qtscript_QDomImplementation_InvalidDataPolicy_toStringHelper(QDomImplementation::InvalidDataPolicy value) +{ + if ((value >= QDomImplementation::AcceptInvalidChars) && (value <= QDomImplementation::ReturnNullNode)) + return qtscript_QDomImplementation_InvalidDataPolicy_keys[static_cast(value)-static_cast(QDomImplementation::AcceptInvalidChars)]; + return QString(); +} + +static QScriptValue qtscript_QDomImplementation_InvalidDataPolicy_toScriptValue(QScriptEngine *engine, const QDomImplementation::InvalidDataPolicy &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QDomImplementation")); + return clazz.property(qtscript_QDomImplementation_InvalidDataPolicy_toStringHelper(value)); +} + +static void qtscript_QDomImplementation_InvalidDataPolicy_fromScriptValue(const QScriptValue &value, QDomImplementation::InvalidDataPolicy &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QDomImplementation_InvalidDataPolicy(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QDomImplementation::AcceptInvalidChars) && (arg <= QDomImplementation::ReturnNullNode)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("InvalidDataPolicy(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QDomImplementation_InvalidDataPolicy_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDomImplementation::InvalidDataPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDomImplementation_InvalidDataPolicy_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDomImplementation::InvalidDataPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QDomImplementation_InvalidDataPolicy_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QDomImplementation_InvalidDataPolicy_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QDomImplementation_InvalidDataPolicy, + qtscript_QDomImplementation_InvalidDataPolicy_valueOf, qtscript_QDomImplementation_InvalidDataPolicy_toString); + qScriptRegisterMetaType(engine, qtscript_QDomImplementation_InvalidDataPolicy_toScriptValue, + qtscript_QDomImplementation_InvalidDataPolicy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 3; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QDomImplementation_InvalidDataPolicy_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QDomImplementation_InvalidDataPolicy_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QDomImplementation +// + +static QScriptValue qtscript_QDomImplementation_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomImplementation* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomImplementation.%0(): this object is not a QDomImplementation") + .arg(qtscript_QDomImplementation_function_names[_id+3])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QDomDocumentType _q_arg2 = qscriptvalue_cast(context->argument(2)); + QDomDocument _q_result = _q_self->createDocument(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QDomDocumentType _q_result = _q_self->createDocumentType(_q_arg0, _q_arg1, _q_arg2); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = _q_self->hasFeature(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 1) { + QDomImplementation _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: { + QString result = QString::fromLatin1("QDomImplementation"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDomImplementation_throw_ambiguity_error_helper(context, + qtscript_QDomImplementation_function_names[_id+3], + qtscript_QDomImplementation_function_signatures[_id+3]); +} + +static QScriptValue qtscript_QDomImplementation_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomImplementation(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomImplementation _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QDomImplementation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomImplementation _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + case 1: + if (context->argumentCount() == 0) { + QDomImplementation::InvalidDataPolicy _q_result = QDomImplementation::invalidDataPolicy(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QDomImplementation::InvalidDataPolicy _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomImplementation::setInvalidDataPolicy(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomImplementation_throw_ambiguity_error_helper(context, + qtscript_QDomImplementation_function_names[_id], + qtscript_QDomImplementation_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomImplementation_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomImplementation*)0)); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDomImplementation_prototype_call, qtscript_QDomImplementation_function_lengths[i+3]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDomImplementation_function_names[i+3]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomImplementation_static_call, proto, qtscript_QDomImplementation_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDomImplementation_static_call, + qtscript_QDomImplementation_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i+1))); + ctor.setProperty(QString::fromLatin1(qtscript_QDomImplementation_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + ctor.setProperty(QString::fromLatin1("InvalidDataPolicy"), + qtscript_create_QDomImplementation_InvalidDataPolicy_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomNamedNodeMap.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomNamedNodeMap.cpp new file mode 100644 index 00000000..d6a39126 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomNamedNodeMap.cpp @@ -0,0 +1,277 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QDomNamedNodeMap_function_names[] = { + "QDomNamedNodeMap" + // static + // prototype + , "contains" + , "count" + , "isEmpty" + , "item" + , "length" + , "namedItem" + , "namedItemNS" + , "equals" + , "removeNamedItem" + , "removeNamedItemNS" + , "setNamedItem" + , "setNamedItemNS" + , "size" + , "toString" +}; + +static const char * const qtscript_QDomNamedNodeMap_function_signatures[] = { + "\nQDomNamedNodeMap arg__1" + // static + // prototype + , "String name" + , "" + , "" + , "int index" + , "" + , "String name" + , "String nsURI, String localName" + , "QDomNamedNodeMap arg__1" + , "String name" + , "String nsURI, String localName" + , "QDomNode newNode" + , "QDomNode newNode" + , "" +"" +}; + +static const int qtscript_QDomNamedNodeMap_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 0 + , 1 + , 0 + , 1 + , 2 + , 1 + , 1 + , 2 + , 1 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QDomNamedNodeMap_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomNamedNodeMap::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomNamedNodeMap) +Q_DECLARE_METATYPE(QDomNamedNodeMap*) +Q_DECLARE_METATYPE(QDomNode) + +// +// QDomNamedNodeMap +// + +static QScriptValue qtscript_QDomNamedNodeMap_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 13; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomNamedNodeMap* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomNamedNodeMap.%0(): this object is not a QDomNamedNodeMap") + .arg(qtscript_QDomNamedNodeMap_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->contains(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QDomNode _q_result = _q_self->item(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->length(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomNode _q_result = _q_self->namedItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QDomNode _q_result = _q_self->namedItemNS(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QDomNamedNodeMap _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomNode _q_result = _q_self->removeNamedItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QDomNode _q_result = _q_self->removeNamedItemNS(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 1) { + QDomNode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomNode _q_result = _q_self->setNamedItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QDomNode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomNode _q_result = _q_self->setNamedItemNS(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + int _q_result = _q_self->size(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: { + QString result = QString::fromLatin1("QDomNamedNodeMap"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDomNamedNodeMap_throw_ambiguity_error_helper(context, + qtscript_QDomNamedNodeMap_function_names[_id+1], + qtscript_QDomNamedNodeMap_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDomNamedNodeMap_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomNamedNodeMap(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomNamedNodeMap _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QDomNamedNodeMap _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomNamedNodeMap _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomNamedNodeMap_throw_ambiguity_error_helper(context, + qtscript_QDomNamedNodeMap_function_names[_id], + qtscript_QDomNamedNodeMap_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomNamedNodeMap_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomNamedNodeMap*)0)); + for (int i = 0; i < 14; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDomNamedNodeMap_prototype_call, qtscript_QDomNamedNodeMap_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDomNamedNodeMap_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomNamedNodeMap_static_call, proto, qtscript_QDomNamedNodeMap_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomNode.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomNode.cpp new file mode 100644 index 00000000..f8516e9d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomNode.cpp @@ -0,0 +1,1014 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QDomNode_function_names[] = { + "QDomNode" + // static + // prototype + , "appendChild" + , "childNodes" + , "clear" + , "cloneNode" + , "columnNumber" + , "firstChild" + , "firstChildElement" + , "hasAttributes" + , "hasChildNodes" + , "insertAfter" + , "insertBefore" + , "isAttr" + , "isCDATASection" + , "isCharacterData" + , "isComment" + , "isDocument" + , "isDocumentFragment" + , "isDocumentType" + , "isElement" + , "isEntity" + , "isEntityReference" + , "isNotation" + , "isNull" + , "isProcessingInstruction" + , "isSupported" + , "isText" + , "lastChild" + , "lastChildElement" + , "lineNumber" + , "localName" + , "namedItem" + , "namespaceURI" + , "nextSibling" + , "nextSiblingElement" + , "nodeName" + , "nodeType" + , "nodeValue" + , "normalize" + , "equals" + , "ownerDocument" + , "parentNode" + , "prefix" + , "previousSibling" + , "previousSiblingElement" + , "removeChild" + , "replaceChild" + , "save" + , "setNodeValue" + , "setPrefix" + , "toAttr" + , "toCDATASection" + , "toCharacterData" + , "toComment" + , "toDocument" + , "toDocumentFragment" + , "toDocumentType" + , "toElement" + , "toEntity" + , "toEntityReference" + , "toNotation" + , "toProcessingInstruction" + , "toText" + , "writeTo" + , "toString" +}; + +static const char * const qtscript_QDomNode_function_signatures[] = { + "\nQDomNode arg__1" + // static + // prototype + , "QDomNode newChild" + , "" + , "" + , "bool deep" + , "" + , "" + , "String tagName" + , "" + , "" + , "QDomNode newChild, QDomNode refChild" + , "QDomNode newChild, QDomNode refChild" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "String feature, String version" + , "" + , "" + , "String tagName" + , "" + , "" + , "String name" + , "" + , "" + , "String taName" + , "" + , "" + , "" + , "" + , "QDomNode arg__1" + , "" + , "" + , "" + , "" + , "String tagName" + , "QDomNode oldChild" + , "QDomNode newChild, QDomNode oldChild" + , "QTextStream arg__1, int arg__2, EncodingPolicy arg__3" + , "String arg__1" + , "String pre" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "" + , "QTextStream arg__1" +"" +}; + +static const int qtscript_QDomNode_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 0 + , 0 + , 2 + , 2 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 2 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 + , 0 + , 0 + , 0 + , 1 + , 1 + , 2 + , 3 + , 1 + , 1 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QDomNode_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomNode::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomNode) +Q_DECLARE_METATYPE(QDomNode*) +Q_DECLARE_METATYPE(QDomNode::EncodingPolicy) +Q_DECLARE_METATYPE(QDomNode::NodeType) +Q_DECLARE_METATYPE(QDomNodeList) +Q_DECLARE_METATYPE(QDomElement) +Q_DECLARE_METATYPE(QDomDocument) +Q_DECLARE_METATYPE(QTextStream*) +Q_DECLARE_METATYPE(QDomAttr) +Q_DECLARE_METATYPE(QDomCDATASection) +Q_DECLARE_METATYPE(QDomCharacterData) +Q_DECLARE_METATYPE(QDomComment) +Q_DECLARE_METATYPE(QDomDocumentFragment) +Q_DECLARE_METATYPE(QDomDocumentType) +Q_DECLARE_METATYPE(QDomEntity) +Q_DECLARE_METATYPE(QDomEntityReference) +Q_DECLARE_METATYPE(QDomNotation) +Q_DECLARE_METATYPE(QDomProcessingInstruction) +Q_DECLARE_METATYPE(QDomText) + +static QScriptValue qtscript_create_enum_class_helper( + QScriptEngine *engine, + QScriptEngine::FunctionSignature construct, + QScriptEngine::FunctionSignature valueOf, + QScriptEngine::FunctionSignature toString) +{ + QScriptValue proto = engine->newObject(); + proto.setProperty(QString::fromLatin1("valueOf"), + engine->newFunction(valueOf), QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("toString"), + engine->newFunction(toString), QScriptValue::SkipInEnumeration); + return engine->newFunction(construct, proto, 1); +} + +// +// QDomNode::EncodingPolicy +// + +static const QDomNode::EncodingPolicy qtscript_QDomNode_EncodingPolicy_values[] = { + QDomNode::EncodingFromDocument + , QDomNode::EncodingFromTextStream +}; + +static const char * const qtscript_QDomNode_EncodingPolicy_keys[] = { + "EncodingFromDocument" + , "EncodingFromTextStream" +}; + +static QString qtscript_QDomNode_EncodingPolicy_toStringHelper(QDomNode::EncodingPolicy value) +{ + if ((value >= QDomNode::EncodingFromDocument) && (value <= QDomNode::EncodingFromTextStream)) + return qtscript_QDomNode_EncodingPolicy_keys[static_cast(value)-static_cast(QDomNode::EncodingFromDocument)]; + return QString(); +} + +static QScriptValue qtscript_QDomNode_EncodingPolicy_toScriptValue(QScriptEngine *engine, const QDomNode::EncodingPolicy &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QDomNode")); + return clazz.property(qtscript_QDomNode_EncodingPolicy_toStringHelper(value)); +} + +static void qtscript_QDomNode_EncodingPolicy_fromScriptValue(const QScriptValue &value, QDomNode::EncodingPolicy &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QDomNode_EncodingPolicy(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + if ((arg >= QDomNode::EncodingFromDocument) && (arg <= QDomNode::EncodingFromTextStream)) + return qScriptValueFromValue(engine, static_cast(arg)); + return context->throwError(QString::fromLatin1("EncodingPolicy(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QDomNode_EncodingPolicy_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDomNode::EncodingPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDomNode_EncodingPolicy_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDomNode::EncodingPolicy value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QDomNode_EncodingPolicy_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QDomNode_EncodingPolicy_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QDomNode_EncodingPolicy, + qtscript_QDomNode_EncodingPolicy_valueOf, qtscript_QDomNode_EncodingPolicy_toString); + qScriptRegisterMetaType(engine, qtscript_QDomNode_EncodingPolicy_toScriptValue, + qtscript_QDomNode_EncodingPolicy_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 2; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QDomNode_EncodingPolicy_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QDomNode_EncodingPolicy_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QDomNode::NodeType +// + +static const QDomNode::NodeType qtscript_QDomNode_NodeType_values[] = { + QDomNode::ElementNode + , QDomNode::AttributeNode + , QDomNode::TextNode + , QDomNode::CDATASectionNode + , QDomNode::EntityReferenceNode + , QDomNode::EntityNode + , QDomNode::ProcessingInstructionNode + , QDomNode::CommentNode + , QDomNode::DocumentNode + , QDomNode::DocumentTypeNode + , QDomNode::DocumentFragmentNode + , QDomNode::NotationNode + , QDomNode::BaseNode + , QDomNode::CharacterDataNode +}; + +static const char * const qtscript_QDomNode_NodeType_keys[] = { + "ElementNode" + , "AttributeNode" + , "TextNode" + , "CDATASectionNode" + , "EntityReferenceNode" + , "EntityNode" + , "ProcessingInstructionNode" + , "CommentNode" + , "DocumentNode" + , "DocumentTypeNode" + , "DocumentFragmentNode" + , "NotationNode" + , "BaseNode" + , "CharacterDataNode" +}; + +static QString qtscript_QDomNode_NodeType_toStringHelper(QDomNode::NodeType value) +{ + for (int i = 0; i < 14; ++i) { + if (qtscript_QDomNode_NodeType_values[i] == value) + return QString::fromLatin1(qtscript_QDomNode_NodeType_keys[i]); + } + return QString(); +} + +static QScriptValue qtscript_QDomNode_NodeType_toScriptValue(QScriptEngine *engine, const QDomNode::NodeType &value) +{ + QScriptValue clazz = engine->globalObject().property(QString::fromLatin1("QDomNode")); + return clazz.property(qtscript_QDomNode_NodeType_toStringHelper(value)); +} + +static void qtscript_QDomNode_NodeType_fromScriptValue(const QScriptValue &value, QDomNode::NodeType &out) +{ + out = qvariant_cast(value.toVariant()); +} + +static QScriptValue qtscript_construct_QDomNode_NodeType(QScriptContext *context, QScriptEngine *engine) +{ + int arg = context->argument(0).toInt32(); + for (int i = 0; i < 14; ++i) { + if (qtscript_QDomNode_NodeType_values[i] == arg) + return qScriptValueFromValue(engine, static_cast(arg)); + } + return context->throwError(QString::fromLatin1("NodeType(): invalid enum value (%0)").arg(arg)); +} + +static QScriptValue qtscript_QDomNode_NodeType_valueOf(QScriptContext *context, QScriptEngine *engine) +{ + QDomNode::NodeType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, static_cast(value)); +} + +static QScriptValue qtscript_QDomNode_NodeType_toString(QScriptContext *context, QScriptEngine *engine) +{ + QDomNode::NodeType value = qscriptvalue_cast(context->thisObject()); + return QScriptValue(engine, qtscript_QDomNode_NodeType_toStringHelper(value)); +} + +static QScriptValue qtscript_create_QDomNode_NodeType_class(QScriptEngine *engine, QScriptValue &clazz) +{ + QScriptValue ctor = qtscript_create_enum_class_helper( + engine, qtscript_construct_QDomNode_NodeType, + qtscript_QDomNode_NodeType_valueOf, qtscript_QDomNode_NodeType_toString); + qScriptRegisterMetaType(engine, qtscript_QDomNode_NodeType_toScriptValue, + qtscript_QDomNode_NodeType_fromScriptValue, ctor.property(QString::fromLatin1("prototype"))); + for (int i = 0; i < 14; ++i) { + clazz.setProperty(QString::fromLatin1(qtscript_QDomNode_NodeType_keys[i]), + engine->newVariant(qVariantFromValue(qtscript_QDomNode_NodeType_values[i])), + QScriptValue::ReadOnly | QScriptValue::Undeletable); + } + return ctor; +} + +// +// QDomNode +// + +static QScriptValue qtscript_QDomNode_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 63; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomNode* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomNode.%0(): this object is not a QDomNode") + .arg(qtscript_QDomNode_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QDomNode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomNode _q_result = _q_self->appendChild(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QDomNodeList _q_result = _q_self->childNodes(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QDomNode _q_result = _q_self->cloneNode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + bool _q_arg0 = context->argument(0).toBoolean(); + QDomNode _q_result = _q_self->cloneNode(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->columnNumber(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + QDomNode _q_result = _q_self->firstChild(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + QDomElement _q_result = _q_self->firstChildElement(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomElement _q_result = _q_self->firstChildElement(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasAttributes(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->hasChildNodes(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 2) { + QDomNode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomNode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QDomNode _q_result = _q_self->insertAfter(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 2) { + QDomNode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomNode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QDomNode _q_result = _q_self->insertBefore(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isAttr(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isCDATASection(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 13: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isCharacterData(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 14: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isComment(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 15: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isDocument(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 16: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isDocumentFragment(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 17: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isDocumentType(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 18: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isElement(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 19: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEntity(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 20: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEntityReference(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 21: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNotation(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 22: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isNull(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 23: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isProcessingInstruction(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 24: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = _q_self->isSupported(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 25: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isText(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 26: + if (context->argumentCount() == 0) { + QDomNode _q_result = _q_self->lastChild(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 27: + if (context->argumentCount() == 0) { + QDomElement _q_result = _q_self->lastChildElement(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomElement _q_result = _q_self->lastChildElement(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 28: + if (context->argumentCount() == 0) { + int _q_result = _q_self->lineNumber(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 29: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->localName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 30: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomNode _q_result = _q_self->namedItem(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 31: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->namespaceURI(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 32: + if (context->argumentCount() == 0) { + QDomNode _q_result = _q_self->nextSibling(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 33: + if (context->argumentCount() == 0) { + QDomElement _q_result = _q_self->nextSiblingElement(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomElement _q_result = _q_self->nextSiblingElement(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 34: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->nodeName(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 35: + if (context->argumentCount() == 0) { + QDomNode::NodeType _q_result = _q_self->nodeType(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 36: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->nodeValue(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 37: + if (context->argumentCount() == 0) { + _q_self->normalize(); + return context->engine()->undefinedValue(); + } + break; + + case 38: + if (context->argumentCount() == 1) { + QDomNode _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 39: + if (context->argumentCount() == 0) { + QDomDocument _q_result = _q_self->ownerDocument(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 40: + if (context->argumentCount() == 0) { + QDomNode _q_result = _q_self->parentNode(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 41: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->prefix(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 42: + if (context->argumentCount() == 0) { + QDomNode _q_result = _q_self->previousSibling(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 43: + if (context->argumentCount() == 0) { + QDomElement _q_result = _q_self->previousSiblingElement(); + return qScriptValueFromValue(context->engine(), _q_result); + } + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + QDomElement _q_result = _q_self->previousSiblingElement(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 44: + if (context->argumentCount() == 1) { + QDomNode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomNode _q_result = _q_self->removeChild(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 45: + if (context->argumentCount() == 2) { + QDomNode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomNode _q_arg1 = qscriptvalue_cast(context->argument(1)); + QDomNode _q_result = _q_self->replaceChild(_q_arg0, _q_arg1); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 46: + if (context->argumentCount() == 2) { + + QTextStream & _q_arg0 = *qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + _q_self->save(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + if (context->argumentCount() == 3) { + + QTextStream & _q_arg0 = *qscriptvalue_cast(context->argument(0)); + int _q_arg1 = context->argument(1).toInt32(); + QDomNode::EncodingPolicy _q_arg2 = qscriptvalue_cast(context->argument(2)); + _q_self->save(_q_arg0, _q_arg1, _q_arg2); + return context->engine()->undefinedValue(); + } + break; + + case 47: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setNodeValue(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 48: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setPrefix(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 49: + if (context->argumentCount() == 0) { + QDomAttr _q_result = _q_self->toAttr(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 50: + if (context->argumentCount() == 0) { + QDomCDATASection _q_result = _q_self->toCDATASection(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 51: + if (context->argumentCount() == 0) { + QDomCharacterData _q_result = _q_self->toCharacterData(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 52: + if (context->argumentCount() == 0) { + QDomComment _q_result = _q_self->toComment(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 53: + if (context->argumentCount() == 0) { + QDomDocument _q_result = _q_self->toDocument(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 54: + if (context->argumentCount() == 0) { + QDomDocumentFragment _q_result = _q_self->toDocumentFragment(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 55: + if (context->argumentCount() == 0) { + QDomDocumentType _q_result = _q_self->toDocumentType(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 56: + if (context->argumentCount() == 0) { + QDomElement _q_result = _q_self->toElement(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 57: + if (context->argumentCount() == 0) { + QDomEntity _q_result = _q_self->toEntity(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 58: + if (context->argumentCount() == 0) { + QDomEntityReference _q_result = _q_self->toEntityReference(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 59: + if (context->argumentCount() == 0) { + QDomNotation _q_result = _q_self->toNotation(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 60: + if (context->argumentCount() == 0) { + QDomProcessingInstruction _q_result = _q_self->toProcessingInstruction(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 61: + if (context->argumentCount() == 0) { + QDomText _q_result = _q_self->toText(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 62: + if (context->argumentCount() == 1) { + QTextStream* _q_arg0 = qscriptvalue_cast(context->argument(0)); + operator<<(*_q_arg0, *_q_self); + return context->engine()->undefinedValue(); + } + break; + + case 63: { + QString result = QString::fromLatin1("QDomNode"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDomNode_throw_ambiguity_error_helper(context, + qtscript_QDomNode_function_names[_id+1], + qtscript_QDomNode_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDomNode_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomNode(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomNode _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QDomNode _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomNode _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomNode_throw_ambiguity_error_helper(context, + qtscript_QDomNode_function_names[_id], + qtscript_QDomNode_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomNode_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomNode*)0)); + for (int i = 0; i < 64; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDomNode_prototype_call, qtscript_QDomNode_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDomNode_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomNode_static_call, proto, qtscript_QDomNode_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + ctor.setProperty(QString::fromLatin1("EncodingPolicy"), + qtscript_create_QDomNode_EncodingPolicy_class(engine, ctor)); + ctor.setProperty(QString::fromLatin1("NodeType"), + qtscript_create_QDomNode_NodeType_class(engine, ctor)); + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomNodeList.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomNodeList.cpp new file mode 100644 index 00000000..2d06b564 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomNodeList.cpp @@ -0,0 +1,209 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QDomNodeList_function_names[] = { + "QDomNodeList" + // static + // prototype + , "at" + , "count" + , "isEmpty" + , "item" + , "length" + , "equals" + , "size" + , "toString" +}; + +static const char * const qtscript_QDomNodeList_function_signatures[] = { + "\nQDomNodeList arg__1" + // static + // prototype + , "int index" + , "" + , "" + , "int index" + , "" + , "QDomNodeList arg__1" + , "" +"" +}; + +static const int qtscript_QDomNodeList_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 + , 0 + , 1 + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QDomNodeList_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomNodeList::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomNodeList) +Q_DECLARE_METATYPE(QDomNodeList*) +Q_DECLARE_METATYPE(QDomNode) + +// +// QDomNodeList +// + +static QScriptValue qtscript_QDomNodeList_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 7; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomNodeList* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomNodeList.%0(): this object is not a QDomNodeList") + .arg(qtscript_QDomNodeList_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QDomNode _q_result = _q_self->at(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->isEmpty(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QDomNode _q_result = _q_self->item(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->length(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QDomNodeList _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->operator==(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 0) { + int _q_result = _q_self->size(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: { + QString result = QString::fromLatin1("QDomNodeList"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDomNodeList_throw_ambiguity_error_helper(context, + qtscript_QDomNodeList_function_names[_id+1], + qtscript_QDomNodeList_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDomNodeList_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomNodeList(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomNodeList _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QDomNodeList _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomNodeList _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomNodeList_throw_ambiguity_error_helper(context, + qtscript_QDomNodeList_function_names[_id], + qtscript_QDomNodeList_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomNodeList_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomNodeList*)0)); + for (int i = 0; i < 8; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDomNodeList_prototype_call, qtscript_QDomNodeList_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDomNodeList_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomNodeList_static_call, proto, qtscript_QDomNodeList_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomNotation.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomNotation.cpp new file mode 100644 index 00000000..f3391d23 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomNotation.cpp @@ -0,0 +1,158 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QDomNotation_function_names[] = { + "QDomNotation" + // static + // prototype + , "publicId" + , "systemId" + , "toString" +}; + +static const char * const qtscript_QDomNotation_function_signatures[] = { + "\nQDomNotation x" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QDomNotation_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QDomNotation_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomNotation::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomNotation) +Q_DECLARE_METATYPE(QDomNotation*) +Q_DECLARE_METATYPE(QDomNode*) + +// +// QDomNotation +// + +static QScriptValue qtscript_QDomNotation_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomNotation* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomNotation.%0(): this object is not a QDomNotation") + .arg(qtscript_QDomNotation_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->publicId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->systemId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QDomNotation"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDomNotation_throw_ambiguity_error_helper(context, + qtscript_QDomNotation_function_names[_id+1], + qtscript_QDomNotation_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDomNotation_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomNotation(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomNotation _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QDomNotation _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomNotation _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomNotation_throw_ambiguity_error_helper(context, + qtscript_QDomNotation_function_names[_id], + qtscript_QDomNotation_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomNotation_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomNotation*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDomNotation_prototype_call, qtscript_QDomNotation_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDomNotation_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomNotation_static_call, proto, qtscript_QDomNotation_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomProcessingInstruction.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomProcessingInstruction.cpp new file mode 100644 index 00000000..d3de8b35 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomProcessingInstruction.cpp @@ -0,0 +1,169 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QDomProcessingInstruction_function_names[] = { + "QDomProcessingInstruction" + // static + // prototype + , "data" + , "setData" + , "target" + , "toString" +}; + +static const char * const qtscript_QDomProcessingInstruction_function_signatures[] = { + "\nQDomProcessingInstruction x" + // static + // prototype + , "" + , "String d" + , "" +"" +}; + +static const int qtscript_QDomProcessingInstruction_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 1 + , 0 + , 0 +}; + +static QScriptValue qtscript_QDomProcessingInstruction_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomProcessingInstruction::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomProcessingInstruction) +Q_DECLARE_METATYPE(QDomProcessingInstruction*) +Q_DECLARE_METATYPE(QDomNode*) + +// +// QDomProcessingInstruction +// + +static QScriptValue qtscript_QDomProcessingInstruction_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomProcessingInstruction* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomProcessingInstruction.%0(): this object is not a QDomProcessingInstruction") + .arg(qtscript_QDomProcessingInstruction_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->data(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setData(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->target(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: { + QString result = QString::fromLatin1("QDomProcessingInstruction"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDomProcessingInstruction_throw_ambiguity_error_helper(context, + qtscript_QDomProcessingInstruction_function_names[_id+1], + qtscript_QDomProcessingInstruction_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDomProcessingInstruction_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomProcessingInstruction(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomProcessingInstruction _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QDomProcessingInstruction _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomProcessingInstruction _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomProcessingInstruction_throw_ambiguity_error_helper(context, + qtscript_QDomProcessingInstruction_function_names[_id], + qtscript_QDomProcessingInstruction_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomProcessingInstruction_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomProcessingInstruction*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDomProcessingInstruction_prototype_call, qtscript_QDomProcessingInstruction_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDomProcessingInstruction_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomProcessingInstruction_static_call, proto, qtscript_QDomProcessingInstruction_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomText.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomText.cpp new file mode 100644 index 00000000..cdc98455 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QDomText.cpp @@ -0,0 +1,149 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +static const char * const qtscript_QDomText_function_names[] = { + "QDomText" + // static + // prototype + , "splitText" + , "toString" +}; + +static const char * const qtscript_QDomText_function_signatures[] = { + "\nQDomText x" + // static + // prototype + , "int offset" +"" +}; + +static const int qtscript_QDomText_function_lengths[] = { + 1 + // static + // prototype + , 1 + , 0 +}; + +static QScriptValue qtscript_QDomText_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QDomText::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QDomText) +Q_DECLARE_METATYPE(QDomText*) +Q_DECLARE_METATYPE(QDomCharacterData*) + +// +// QDomText +// + +static QScriptValue qtscript_QDomText_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 1; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QDomText* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QDomText.%0(): this object is not a QDomText") + .arg(qtscript_QDomText_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QDomText _q_result = _q_self->splitText(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: { + QString result = QString::fromLatin1("QDomText"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QDomText_throw_ambiguity_error_helper(context, + qtscript_QDomText_function_names[_id+1], + qtscript_QDomText_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QDomText_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QDomText(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QDomText _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + QDomText _q_arg0 = qscriptvalue_cast(context->argument(0)); + QDomText _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QDomText_throw_ambiguity_error_helper(context, + qtscript_QDomText_function_names[_id], + qtscript_QDomText_function_signatures[_id]); +} + +QScriptValue qtscript_create_QDomText_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QDomText*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 2; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QDomText_prototype_call, qtscript_QDomText_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QDomText_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QDomText_static_call, proto, qtscript_QDomText_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlAttributes.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlAttributes.cpp new file mode 100644 index 00000000..43da69b3 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlAttributes.cpp @@ -0,0 +1,274 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QXmlAttributes.h" + +static const char * const qtscript_QXmlAttributes_function_names[] = { + "QXmlAttributes" + // static + // prototype + , "append" + , "clear" + , "count" + , "index" + , "length" + , "localName" + , "qName" + , "type" + , "uri" + , "value" + , "toString" +}; + +static const char * const qtscript_QXmlAttributes_function_signatures[] = { + "" + // static + // prototype + , "String qName, String uri, String localPart, String value" + , "" + , "" + , "String qName\nString uri, String localPart" + , "" + , "int index" + , "int index" + , "String qName\nString uri, String localName\nint index" + , "int index" + , "String qName\nString uri, String localName\nint index" +"" +}; + +static const int qtscript_QXmlAttributes_function_lengths[] = { + 0 + // static + // prototype + , 4 + , 0 + , 0 + , 2 + , 0 + , 1 + , 1 + , 2 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QXmlAttributes_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlAttributes::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlAttributes) +Q_DECLARE_METATYPE(QXmlAttributes*) +Q_DECLARE_METATYPE(QtScriptShell_QXmlAttributes) +Q_DECLARE_METATYPE(QtScriptShell_QXmlAttributes*) + +// +// QXmlAttributes +// + +static QScriptValue qtscript_QXmlAttributes_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 10; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlAttributes* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlAttributes.%0(): this object is not a QXmlAttributes") + .arg(qtscript_QXmlAttributes_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 4) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + _q_self->append(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return context->engine()->undefinedValue(); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->clear(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + int _q_result = _q_self->count(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + int _q_result = _q_self->index(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + int _q_result = _q_self->index(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + int _q_result = _q_self->length(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->localName(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->qName(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = _q_self->type(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->type(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->type(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 1) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->uri(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_result = _q_self->value(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (context->argument(0).isNumber()) { + int _q_arg0 = context->argument(0).toInt32(); + QString _q_result = _q_self->value(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_result = _q_self->value(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: { + QString result = QString::fromLatin1("QXmlAttributes"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlAttributes_throw_ambiguity_error_helper(context, + qtscript_QXmlAttributes_function_names[_id+1], + qtscript_QXmlAttributes_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlAttributes_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlAttributes(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QXmlAttributes _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QXmlAttributes)_q_cpp_result)); + _q_cpp_result.__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlAttributes_throw_ambiguity_error_helper(context, + qtscript_QXmlAttributes_function_names[_id], + qtscript_QXmlAttributes_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlAttributes_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlAttributes*)0)); + for (int i = 0; i < 11; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlAttributes_prototype_call, qtscript_QXmlAttributes_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlAttributes_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlAttributes_static_call, proto, qtscript_QXmlAttributes_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlContentHandler.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlContentHandler.cpp new file mode 100644 index 00000000..98531b2b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlContentHandler.cpp @@ -0,0 +1,270 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +#include "qtscriptshell_QXmlContentHandler.h" + +static const char * const qtscript_QXmlContentHandler_function_names[] = { + "QXmlContentHandler" + // static + // prototype + , "characters" + , "endDocument" + , "endElement" + , "endPrefixMapping" + , "errorString" + , "ignorableWhitespace" + , "processingInstruction" + , "setDocumentLocator" + , "skippedEntity" + , "startDocument" + , "startElement" + , "startPrefixMapping" + , "toString" +}; + +static const char * const qtscript_QXmlContentHandler_function_signatures[] = { + "" + // static + // prototype + , "String ch" + , "" + , "String namespaceURI, String localName, String qName" + , "String prefix" + , "" + , "String ch" + , "String target, String data" + , "QXmlLocator locator" + , "String name" + , "" + , "String namespaceURI, String localName, String qName, QXmlAttributes atts" + , "String prefix, String uri" +"" +}; + +static const int qtscript_QXmlContentHandler_function_lengths[] = { + 0 + // static + // prototype + , 1 + , 0 + , 3 + , 1 + , 0 + , 1 + , 2 + , 1 + , 1 + , 0 + , 4 + , 2 + , 0 +}; + +static QScriptValue qtscript_QXmlContentHandler_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlContentHandler::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlContentHandler*) +Q_DECLARE_METATYPE(QtScriptShell_QXmlContentHandler*) +Q_DECLARE_METATYPE(QXmlLocator*) +Q_DECLARE_METATYPE(QXmlAttributes) + +// +// QXmlContentHandler +// + +static QScriptValue qtscript_QXmlContentHandler_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 12; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlContentHandler* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlContentHandler.%0(): this object is not a QXmlContentHandler") + .arg(qtscript_QXmlContentHandler_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->characters(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->endDocument(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + bool _q_result = _q_self->endElement(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->endPrefixMapping(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->ignorableWhitespace(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = _q_self->processingInstruction(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QXmlLocator* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDocumentLocator(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 8: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->skippedEntity(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->startDocument(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 10: + if (context->argumentCount() == 4) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QXmlAttributes _q_arg3 = qscriptvalue_cast(context->argument(3)); + bool _q_result = _q_self->startElement(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = _q_self->startPrefixMapping(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 12: { + QString result = QString::fromLatin1("QXmlContentHandler"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlContentHandler_throw_ambiguity_error_helper(context, + qtscript_QXmlContentHandler_function_names[_id+1], + qtscript_QXmlContentHandler_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlContentHandler_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlContentHandler(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QXmlContentHandler* _q_cpp_result = new QtScriptShell_QXmlContentHandler(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QXmlContentHandler*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlContentHandler_throw_ambiguity_error_helper(context, + qtscript_QXmlContentHandler_function_names[_id], + qtscript_QXmlContentHandler_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlContentHandler_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlContentHandler*)0)); + for (int i = 0; i < 13; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlContentHandler_prototype_call, qtscript_QXmlContentHandler_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlContentHandler_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlContentHandler_static_call, proto, qtscript_QXmlContentHandler_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlDTDHandler.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlDTDHandler.cpp new file mode 100644 index 00000000..089faa4b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlDTDHandler.cpp @@ -0,0 +1,168 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QXmlDTDHandler.h" + +static const char * const qtscript_QXmlDTDHandler_function_names[] = { + "QXmlDTDHandler" + // static + // prototype + , "errorString" + , "notationDecl" + , "unparsedEntityDecl" + , "toString" +}; + +static const char * const qtscript_QXmlDTDHandler_function_signatures[] = { + "" + // static + // prototype + , "" + , "String name, String publicId, String systemId" + , "String name, String publicId, String systemId, String notationName" +"" +}; + +static const int qtscript_QXmlDTDHandler_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 3 + , 4 + , 0 +}; + +static QScriptValue qtscript_QXmlDTDHandler_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlDTDHandler::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlDTDHandler*) +Q_DECLARE_METATYPE(QtScriptShell_QXmlDTDHandler*) + +// +// QXmlDTDHandler +// + +static QScriptValue qtscript_QXmlDTDHandler_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 3; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlDTDHandler* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlDTDHandler.%0(): this object is not a QXmlDTDHandler") + .arg(qtscript_QXmlDTDHandler_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + bool _q_result = _q_self->notationDecl(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 4) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + bool _q_result = _q_self->unparsedEntityDecl(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: { + QString result = QString::fromLatin1("QXmlDTDHandler"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlDTDHandler_throw_ambiguity_error_helper(context, + qtscript_QXmlDTDHandler_function_names[_id+1], + qtscript_QXmlDTDHandler_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlDTDHandler_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlDTDHandler(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QXmlDTDHandler* _q_cpp_result = new QtScriptShell_QXmlDTDHandler(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QXmlDTDHandler*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlDTDHandler_throw_ambiguity_error_helper(context, + qtscript_QXmlDTDHandler_function_names[_id], + qtscript_QXmlDTDHandler_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlDTDHandler_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlDTDHandler*)0)); + for (int i = 0; i < 4; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlDTDHandler_prototype_call, qtscript_QXmlDTDHandler_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlDTDHandler_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlDTDHandler_static_call, proto, qtscript_QXmlDTDHandler_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlDeclHandler.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlDeclHandler.cpp new file mode 100644 index 00000000..c96700d0 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlDeclHandler.cpp @@ -0,0 +1,181 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QXmlDeclHandler.h" + +static const char * const qtscript_QXmlDeclHandler_function_names[] = { + "QXmlDeclHandler" + // static + // prototype + , "attributeDecl" + , "errorString" + , "externalEntityDecl" + , "internalEntityDecl" + , "toString" +}; + +static const char * const qtscript_QXmlDeclHandler_function_signatures[] = { + "" + // static + // prototype + , "String eName, String aName, String type, String valueDefault, String value" + , "" + , "String name, String publicId, String systemId" + , "String name, String value" +"" +}; + +static const int qtscript_QXmlDeclHandler_function_lengths[] = { + 0 + // static + // prototype + , 5 + , 0 + , 3 + , 2 + , 0 +}; + +static QScriptValue qtscript_QXmlDeclHandler_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlDeclHandler::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlDeclHandler*) +Q_DECLARE_METATYPE(QtScriptShell_QXmlDeclHandler*) + +// +// QXmlDeclHandler +// + +static QScriptValue qtscript_QXmlDeclHandler_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlDeclHandler* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlDeclHandler.%0(): this object is not a QXmlDeclHandler") + .arg(qtscript_QXmlDeclHandler_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 5) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + QString _q_arg3 = context->argument(3).toString(); + QString _q_arg4 = context->argument(4).toString(); + bool _q_result = _q_self->attributeDecl(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + bool _q_result = _q_self->externalEntityDecl(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + bool _q_result = _q_self->internalEntityDecl(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QXmlDeclHandler"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlDeclHandler_throw_ambiguity_error_helper(context, + qtscript_QXmlDeclHandler_function_names[_id+1], + qtscript_QXmlDeclHandler_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlDeclHandler_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlDeclHandler(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QXmlDeclHandler* _q_cpp_result = new QtScriptShell_QXmlDeclHandler(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QXmlDeclHandler*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlDeclHandler_throw_ambiguity_error_helper(context, + qtscript_QXmlDeclHandler_function_names[_id], + qtscript_QXmlDeclHandler_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlDeclHandler_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlDeclHandler*)0)); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlDeclHandler_prototype_call, qtscript_QXmlDeclHandler_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlDeclHandler_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlDeclHandler_static_call, proto, qtscript_QXmlDeclHandler_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlDefaultHandler.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlDefaultHandler.cpp new file mode 100644 index 00000000..e7b11622 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlDefaultHandler.cpp @@ -0,0 +1,148 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +#include "qtscriptshell_QXmlDefaultHandler.h" + +static const char * const qtscript_QXmlDefaultHandler_function_names[] = { + "QXmlDefaultHandler" + // static + // prototype + , "toString" +}; + +static const char * const qtscript_QXmlDefaultHandler_function_signatures[] = { + "" + // static + // prototype +"" +}; + +static const int qtscript_QXmlDefaultHandler_function_lengths[] = { + 0 + // static + // prototype + , 0 +}; + +static QScriptValue qtscript_QXmlDefaultHandler_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlDefaultHandler::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlDefaultHandler*) +Q_DECLARE_METATYPE(QtScriptShell_QXmlDefaultHandler*) +Q_DECLARE_METATYPE(QXmlContentHandler*) +Q_DECLARE_METATYPE(QXmlErrorHandler*) +Q_DECLARE_METATYPE(QXmlDTDHandler*) +Q_DECLARE_METATYPE(QXmlEntityResolver*) +Q_DECLARE_METATYPE(QXmlLexicalHandler*) +Q_DECLARE_METATYPE(QXmlDeclHandler*) + +// +// QXmlDefaultHandler +// + +static QScriptValue qtscript_QXmlDefaultHandler_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 0; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlDefaultHandler* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlDefaultHandler.%0(): this object is not a QXmlDefaultHandler") + .arg(qtscript_QXmlDefaultHandler_function_names[_id+1])); + } + + switch (_id) { + case 0: { + QString result = QString::fromLatin1("QXmlDefaultHandler"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlDefaultHandler_throw_ambiguity_error_helper(context, + qtscript_QXmlDefaultHandler_function_names[_id+1], + qtscript_QXmlDefaultHandler_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlDefaultHandler_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlDefaultHandler(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QXmlDefaultHandler* _q_cpp_result = new QtScriptShell_QXmlDefaultHandler(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QXmlDefaultHandler*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlDefaultHandler_throw_ambiguity_error_helper(context, + qtscript_QXmlDefaultHandler_function_names[_id], + qtscript_QXmlDefaultHandler_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlDefaultHandler_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlDefaultHandler*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + proto.setProperty(QString::fromLatin1("__QXmlErrorHandler__"), + engine->defaultPrototype(qMetaTypeId()), + QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("__QXmlDTDHandler__"), + engine->defaultPrototype(qMetaTypeId()), + QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("__QXmlEntityResolver__"), + engine->defaultPrototype(qMetaTypeId()), + QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("__QXmlLexicalHandler__"), + engine->defaultPrototype(qMetaTypeId()), + QScriptValue::SkipInEnumeration); + proto.setProperty(QString::fromLatin1("__QXmlDeclHandler__"), + engine->defaultPrototype(qMetaTypeId()), + QScriptValue::SkipInEnumeration); + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlDefaultHandler_static_call, proto, qtscript_QXmlDefaultHandler_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlEntityResolver.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlEntityResolver.cpp new file mode 100644 index 00000000..5e9ad871 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlEntityResolver.cpp @@ -0,0 +1,156 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +#include "qtscriptshell_QXmlEntityResolver.h" + +static const char * const qtscript_QXmlEntityResolver_function_names[] = { + "QXmlEntityResolver" + // static + // prototype + , "errorString" + , "resolveEntity" + , "toString" +}; + +static const char * const qtscript_QXmlEntityResolver_function_signatures[] = { + "" + // static + // prototype + , "" + , "String publicId, String systemId, QXmlInputSource ret" +"" +}; + +static const int qtscript_QXmlEntityResolver_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 3 + , 0 +}; + +static QScriptValue qtscript_QXmlEntityResolver_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlEntityResolver::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlEntityResolver*) +Q_DECLARE_METATYPE(QtScriptShell_QXmlEntityResolver*) +Q_DECLARE_METATYPE(QXmlInputSource*) + +// +// QXmlEntityResolver +// + +static QScriptValue qtscript_QXmlEntityResolver_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlEntityResolver* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlEntityResolver.%0(): this object is not a QXmlEntityResolver") + .arg(qtscript_QXmlEntityResolver_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QXmlInputSource* _q_arg2 = qscriptvalue_cast(context->argument(2)); + bool _q_result = _q_self->resolveEntity(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QXmlEntityResolver"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlEntityResolver_throw_ambiguity_error_helper(context, + qtscript_QXmlEntityResolver_function_names[_id+1], + qtscript_QXmlEntityResolver_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlEntityResolver_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlEntityResolver(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QXmlEntityResolver* _q_cpp_result = new QtScriptShell_QXmlEntityResolver(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QXmlEntityResolver*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlEntityResolver_throw_ambiguity_error_helper(context, + qtscript_QXmlEntityResolver_function_names[_id], + qtscript_QXmlEntityResolver_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlEntityResolver_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlEntityResolver*)0)); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlEntityResolver_prototype_call, qtscript_QXmlEntityResolver_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlEntityResolver_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlEntityResolver_static_call, proto, qtscript_QXmlEntityResolver_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlErrorHandler.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlErrorHandler.cpp new file mode 100644 index 00000000..afc0da28 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlErrorHandler.cpp @@ -0,0 +1,176 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +#include "qtscriptshell_QXmlErrorHandler.h" + +static const char * const qtscript_QXmlErrorHandler_function_names[] = { + "QXmlErrorHandler" + // static + // prototype + , "error" + , "errorString" + , "fatalError" + , "warning" + , "toString" +}; + +static const char * const qtscript_QXmlErrorHandler_function_signatures[] = { + "" + // static + // prototype + , "QXmlParseException exception" + , "" + , "QXmlParseException exception" + , "QXmlParseException exception" +"" +}; + +static const int qtscript_QXmlErrorHandler_function_lengths[] = { + 0 + // static + // prototype + , 1 + , 0 + , 1 + , 1 + , 0 +}; + +static QScriptValue qtscript_QXmlErrorHandler_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlErrorHandler::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlErrorHandler*) +Q_DECLARE_METATYPE(QtScriptShell_QXmlErrorHandler*) +Q_DECLARE_METATYPE(QXmlParseException) + +// +// QXmlErrorHandler +// + +static QScriptValue qtscript_QXmlErrorHandler_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 4; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlErrorHandler* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlErrorHandler.%0(): this object is not a QXmlErrorHandler") + .arg(qtscript_QXmlErrorHandler_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QXmlParseException _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->error(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 1) { + QXmlParseException _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->fatalError(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QXmlParseException _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->warning(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: { + QString result = QString::fromLatin1("QXmlErrorHandler"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlErrorHandler_throw_ambiguity_error_helper(context, + qtscript_QXmlErrorHandler_function_names[_id+1], + qtscript_QXmlErrorHandler_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlErrorHandler_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlErrorHandler(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QXmlErrorHandler* _q_cpp_result = new QtScriptShell_QXmlErrorHandler(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QXmlErrorHandler*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlErrorHandler_throw_ambiguity_error_helper(context, + qtscript_QXmlErrorHandler_function_names[_id], + qtscript_QXmlErrorHandler_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlErrorHandler_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlErrorHandler*)0)); + for (int i = 0; i < 5; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlErrorHandler_prototype_call, qtscript_QXmlErrorHandler_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlErrorHandler_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlErrorHandler_static_call, proto, qtscript_QXmlErrorHandler_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlInputSource.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlInputSource.cpp new file mode 100644 index 00000000..83724801 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlInputSource.cpp @@ -0,0 +1,197 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include +#include + +#include "qtscriptshell_QXmlInputSource.h" + +static const char * const qtscript_QXmlInputSource_function_names[] = { + "QXmlInputSource" + // static + // prototype + , "data" + , "fetchData" + , "next" + , "reset" + , "setData" + , "toString" +}; + +static const char * const qtscript_QXmlInputSource_function_signatures[] = { + "\nQIODevice dev" + // static + // prototype + , "" + , "" + , "" + , "" + , "QByteArray dat\nString dat" +"" +}; + +static const int qtscript_QXmlInputSource_function_lengths[] = { + 1 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 1 + , 0 +}; + +static QScriptValue qtscript_QXmlInputSource_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlInputSource::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlInputSource*) +Q_DECLARE_METATYPE(QtScriptShell_QXmlInputSource*) +Q_DECLARE_METATYPE(QIODevice*) + +// +// QXmlInputSource +// + +static QScriptValue qtscript_QXmlInputSource_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlInputSource* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlInputSource.%0(): this object is not a QXmlInputSource") + .arg(qtscript_QXmlInputSource_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->data(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + _q_self->fetchData(); + return context->engine()->undefinedValue(); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QChar _q_result = _q_self->next(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + _q_self->reset(); + return context->engine()->undefinedValue(); + } + break; + + case 4: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QByteArray _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setData(_q_arg0); + return context->engine()->undefinedValue(); + } else if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + _q_self->setData(_q_arg0); + return context->engine()->undefinedValue(); + } + } + break; + + case 5: { + QString result = QString::fromLatin1("QXmlInputSource"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlInputSource_throw_ambiguity_error_helper(context, + qtscript_QXmlInputSource_function_names[_id+1], + qtscript_QXmlInputSource_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlInputSource_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlInputSource(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QXmlInputSource* _q_cpp_result = new QtScriptShell_QXmlInputSource(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QXmlInputSource*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } else if (context->argumentCount() == 1) { + QIODevice* _q_arg0 = qscriptvalue_cast(context->argument(0)); + QtScriptShell_QXmlInputSource* _q_cpp_result = new QtScriptShell_QXmlInputSource(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QXmlInputSource*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlInputSource_throw_ambiguity_error_helper(context, + qtscript_QXmlInputSource_function_names[_id], + qtscript_QXmlInputSource_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlInputSource_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlInputSource*)0)); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlInputSource_prototype_call, qtscript_QXmlInputSource_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlInputSource_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlInputSource_static_call, proto, qtscript_QXmlInputSource_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlLexicalHandler.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlLexicalHandler.cpp new file mode 100644 index 00000000..0dde5e2b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlLexicalHandler.cpp @@ -0,0 +1,217 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QXmlLexicalHandler.h" + +static const char * const qtscript_QXmlLexicalHandler_function_names[] = { + "QXmlLexicalHandler" + // static + // prototype + , "comment" + , "endCDATA" + , "endDTD" + , "endEntity" + , "errorString" + , "startCDATA" + , "startDTD" + , "startEntity" + , "toString" +}; + +static const char * const qtscript_QXmlLexicalHandler_function_signatures[] = { + "" + // static + // prototype + , "String ch" + , "" + , "" + , "String name" + , "" + , "" + , "String name, String publicId, String systemId" + , "String name" +"" +}; + +static const int qtscript_QXmlLexicalHandler_function_lengths[] = { + 0 + // static + // prototype + , 1 + , 0 + , 0 + , 1 + , 0 + , 0 + , 3 + , 1 + , 0 +}; + +static QScriptValue qtscript_QXmlLexicalHandler_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlLexicalHandler::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlLexicalHandler*) +Q_DECLARE_METATYPE(QtScriptShell_QXmlLexicalHandler*) + +// +// QXmlLexicalHandler +// + +static QScriptValue qtscript_QXmlLexicalHandler_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 8; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlLexicalHandler* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlLexicalHandler.%0(): this object is not a QXmlLexicalHandler") + .arg(qtscript_QXmlLexicalHandler_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->comment(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->endCDATA(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->endDTD(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->endEntity(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->errorString(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->startCDATA(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + QString _q_arg1 = context->argument(1).toString(); + QString _q_arg2 = context->argument(2).toString(); + bool _q_result = _q_self->startDTD(_q_arg0, _q_arg1, _q_arg2); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->startEntity(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: { + QString result = QString::fromLatin1("QXmlLexicalHandler"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlLexicalHandler_throw_ambiguity_error_helper(context, + qtscript_QXmlLexicalHandler_function_names[_id+1], + qtscript_QXmlLexicalHandler_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlLexicalHandler_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlLexicalHandler(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QXmlLexicalHandler* _q_cpp_result = new QtScriptShell_QXmlLexicalHandler(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QXmlLexicalHandler*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlLexicalHandler_throw_ambiguity_error_helper(context, + qtscript_QXmlLexicalHandler_function_names[_id], + qtscript_QXmlLexicalHandler_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlLexicalHandler_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlLexicalHandler*)0)); + for (int i = 0; i < 9; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlLexicalHandler_prototype_call, qtscript_QXmlLexicalHandler_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlLexicalHandler_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlLexicalHandler_static_call, proto, qtscript_QXmlLexicalHandler_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlLocator.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlLocator.cpp new file mode 100644 index 00000000..9d774855 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlLocator.cpp @@ -0,0 +1,151 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include + +#include "qtscriptshell_QXmlLocator.h" + +static const char * const qtscript_QXmlLocator_function_names[] = { + "QXmlLocator" + // static + // prototype + , "columnNumber" + , "lineNumber" + , "toString" +}; + +static const char * const qtscript_QXmlLocator_function_signatures[] = { + "" + // static + // prototype + , "" + , "" +"" +}; + +static const int qtscript_QXmlLocator_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QXmlLocator_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlLocator::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlLocator*) +Q_DECLARE_METATYPE(QtScriptShell_QXmlLocator*) + +// +// QXmlLocator +// + +static QScriptValue qtscript_QXmlLocator_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlLocator* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlLocator.%0(): this object is not a QXmlLocator") + .arg(qtscript_QXmlLocator_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->columnNumber(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->lineNumber(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QXmlLocator"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlLocator_throw_ambiguity_error_helper(context, + qtscript_QXmlLocator_function_names[_id+1], + qtscript_QXmlLocator_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlLocator_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlLocator(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QXmlLocator* _q_cpp_result = new QtScriptShell_QXmlLocator(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QXmlLocator*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlLocator_throw_ambiguity_error_helper(context, + qtscript_QXmlLocator_function_names[_id], + qtscript_QXmlLocator_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlLocator_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlLocator*)0)); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlLocator_prototype_call, qtscript_QXmlLocator_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlLocator_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlLocator_static_call, proto, qtscript_QXmlLocator_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlParseException.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlParseException.cpp new file mode 100644 index 00000000..fc1d7909 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlParseException.cpp @@ -0,0 +1,222 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +static const char * const qtscript_QXmlParseException_function_names[] = { + "QXmlParseException" + // static + // prototype + , "columnNumber" + , "lineNumber" + , "message" + , "publicId" + , "systemId" + , "toString" +}; + +static const char * const qtscript_QXmlParseException_function_signatures[] = { + "String name, int c, int l, String p, String s\nQXmlParseException other" + // static + // prototype + , "" + , "" + , "" + , "" + , "" +"" +}; + +static const int qtscript_QXmlParseException_function_lengths[] = { + 5 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 0 +}; + +static QScriptValue qtscript_QXmlParseException_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlParseException::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlParseException) +Q_DECLARE_METATYPE(QXmlParseException*) + +// +// QXmlParseException +// + +static QScriptValue qtscript_QXmlParseException_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 5; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlParseException* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlParseException.%0(): this object is not a QXmlParseException") + .arg(qtscript_QXmlParseException_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + int _q_result = _q_self->columnNumber(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + int _q_result = _q_self->lineNumber(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->message(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->publicId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QString _q_result = _q_self->systemId(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 5: { + QString result = QString::fromLatin1("QXmlParseException"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlParseException_throw_ambiguity_error_helper(context, + qtscript_QXmlParseException_function_names[_id+1], + qtscript_QXmlParseException_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlParseException_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlParseException(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QXmlParseException _q_cpp_result; + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 1) { + if (context->argument(0).isString()) { + QString _q_arg0 = context->argument(0).toString(); + QXmlParseException _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QXmlParseException _q_arg0 = qscriptvalue_cast(context->argument(0)); + QXmlParseException _q_cpp_result(_q_arg0); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + } else if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + QXmlParseException _q_cpp_result(_q_arg0, _q_arg1); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 3) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QXmlParseException _q_cpp_result(_q_arg0, _q_arg1, _q_arg2); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 4) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QString _q_arg3 = context->argument(3).toString(); + QXmlParseException _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } else if (context->argumentCount() == 5) { + QString _q_arg0 = context->argument(0).toString(); + int _q_arg1 = context->argument(1).toInt32(); + int _q_arg2 = context->argument(2).toInt32(); + QString _q_arg3 = context->argument(3).toString(); + QString _q_arg4 = context->argument(4).toString(); + QXmlParseException _q_cpp_result(_q_arg0, _q_arg1, _q_arg2, _q_arg3, _q_arg4); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue(_q_cpp_result)); + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlParseException_throw_ambiguity_error_helper(context, + qtscript_QXmlParseException_function_names[_id], + qtscript_QXmlParseException_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlParseException_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlParseException*)0)); + for (int i = 0; i < 6; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlParseException_prototype_call, qtscript_QXmlParseException_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlParseException_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlParseException_static_call, proto, qtscript_QXmlParseException_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlReader.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlReader.cpp new file mode 100644 index 00000000..7caa50bf --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlReader.cpp @@ -0,0 +1,351 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +#include "qtscriptshell_QXmlReader.h" + +static const char * const qtscript_QXmlReader_function_names[] = { + "QXmlReader" + // static + // prototype + , "DTDHandler" + , "contentHandler" + , "declHandler" + , "entityResolver" + , "errorHandler" + , "feature" + , "hasFeature" + , "hasProperty" + , "lexicalHandler" + , "parse" + , "property" + , "setContentHandler" + , "setDTDHandler" + , "setDeclHandler" + , "setEntityResolver" + , "setErrorHandler" + , "setFeature" + , "setLexicalHandler" + , "setProperty" + , "toString" +}; + +static const char * const qtscript_QXmlReader_function_signatures[] = { + "" + // static + // prototype + , "" + , "" + , "" + , "" + , "" + , "String name" + , "String name" + , "String name" + , "" + , "QXmlInputSource input\nQXmlInputSource input" + , "String name" + , "QXmlContentHandler handler" + , "QXmlDTDHandler handler" + , "QXmlDeclHandler handler" + , "QXmlEntityResolver handler" + , "QXmlErrorHandler handler" + , "String name, bool value" + , "QXmlLexicalHandler handler" + , "String name, void value" +"" +}; + +static const int qtscript_QXmlReader_function_lengths[] = { + 0 + // static + // prototype + , 0 + , 0 + , 0 + , 0 + , 0 + , 2 + , 1 + , 1 + , 0 + , 1 + , 2 + , 1 + , 1 + , 1 + , 1 + , 1 + , 2 + , 1 + , 2 + , 0 +}; + +static QScriptValue qtscript_QXmlReader_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlReader::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlReader*) +Q_DECLARE_METATYPE(QtScriptShell_QXmlReader*) +Q_DECLARE_METATYPE(QXmlDTDHandler*) +Q_DECLARE_METATYPE(QXmlContentHandler*) +Q_DECLARE_METATYPE(QXmlDeclHandler*) +Q_DECLARE_METATYPE(QXmlEntityResolver*) +Q_DECLARE_METATYPE(QXmlErrorHandler*) +Q_DECLARE_METATYPE(QXmlLexicalHandler*) +Q_DECLARE_METATYPE(QXmlInputSource) +Q_DECLARE_METATYPE(const QXmlInputSource*) + +// +// QXmlReader +// + +static QScriptValue qtscript_QXmlReader_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 19; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlReader* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlReader.%0(): this object is not a QXmlReader") + .arg(qtscript_QXmlReader_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 0) { + QXmlDTDHandler* _q_result = _q_self->DTDHandler(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + QXmlContentHandler* _q_result = _q_self->contentHandler(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 2: + if (context->argumentCount() == 0) { + QXmlDeclHandler* _q_result = _q_self->declHandler(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 3: + if (context->argumentCount() == 0) { + QXmlEntityResolver* _q_result = _q_self->entityResolver(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 4: + if (context->argumentCount() == 0) { + QXmlErrorHandler* _q_result = _q_self->errorHandler(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 5: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->feature(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 6: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->hasFeature(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 7: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_result = _q_self->hasProperty(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 8: + if (context->argumentCount() == 0) { + QXmlLexicalHandler* _q_result = _q_self->lexicalHandler(); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 9: + if (context->argumentCount() == 1) { + if ((qMetaTypeId() == context->argument(0).toVariant().userType())) { + QXmlInputSource _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->parse(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } else if (qscriptvalue_cast(context->argument(0))) { + const QXmlInputSource* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_result = _q_self->parse(_q_arg0); + return QScriptValue(context->engine(), _q_result); + } + } + break; + + case 10: + if (context->argumentCount() == 1) { + QString _q_arg0 = context->argument(0).toString(); + void* _q_result = _q_self->property(_q_arg0); + return qScriptValueFromValue(context->engine(), _q_result); + } + break; + + case 11: + if (context->argumentCount() == 1) { + QXmlContentHandler* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setContentHandler(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 12: + if (context->argumentCount() == 1) { + QXmlDTDHandler* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDTDHandler(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 13: + if (context->argumentCount() == 1) { + QXmlDeclHandler* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setDeclHandler(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 14: + if (context->argumentCount() == 1) { + QXmlEntityResolver* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setEntityResolver(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 15: + if (context->argumentCount() == 1) { + QXmlErrorHandler* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setErrorHandler(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 16: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + bool _q_arg1 = context->argument(1).toBoolean(); + _q_self->setFeature(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 17: + if (context->argumentCount() == 1) { + QXmlLexicalHandler* _q_arg0 = qscriptvalue_cast(context->argument(0)); + _q_self->setLexicalHandler(_q_arg0); + return context->engine()->undefinedValue(); + } + break; + + case 18: + if (context->argumentCount() == 2) { + QString _q_arg0 = context->argument(0).toString(); + void* _q_arg1 = qscriptvalue_cast(context->argument(1)); + _q_self->setProperty(_q_arg0, _q_arg1); + return context->engine()->undefinedValue(); + } + break; + + case 19: { + QString result = QString::fromLatin1("QXmlReader"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlReader_throw_ambiguity_error_helper(context, + qtscript_QXmlReader_function_names[_id+1], + qtscript_QXmlReader_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlReader_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlReader(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QXmlReader* _q_cpp_result = new QtScriptShell_QXmlReader(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QXmlReader*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlReader_throw_ambiguity_error_helper(context, + qtscript_QXmlReader_function_names[_id], + qtscript_QXmlReader_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlReader_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlReader*)0)); + for (int i = 0; i < 20; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlReader_prototype_call, qtscript_QXmlReader_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlReader_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlReader_static_call, proto, qtscript_QXmlReader_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlSimpleReader.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlSimpleReader.cpp new file mode 100644 index 00000000..62ac08d0 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscript_QXmlSimpleReader.cpp @@ -0,0 +1,157 @@ +#include +#include +#include +#include +#include +#include +#include <__package_shared.h> + +#include +#include +#include + +#include "qtscriptshell_QXmlSimpleReader.h" + +static const char * const qtscript_QXmlSimpleReader_function_names[] = { + "QXmlSimpleReader" + // static + // prototype + , "parse" + , "parseContinue" + , "toString" +}; + +static const char * const qtscript_QXmlSimpleReader_function_signatures[] = { + "" + // static + // prototype + , "QXmlInputSource input, bool incremental" + , "" +"" +}; + +static const int qtscript_QXmlSimpleReader_function_lengths[] = { + 0 + // static + // prototype + , 2 + , 0 + , 0 +}; + +static QScriptValue qtscript_QXmlSimpleReader_throw_ambiguity_error_helper( + QScriptContext *context, const char *functionName, const char *signatures) +{ + QStringList lines = QString::fromLatin1(signatures).split(QLatin1Char('\n')); + QStringList fullSignatures; + for (int i = 0; i < lines.size(); ++i) + fullSignatures.append(QString::fromLatin1("%0(%1)").arg(functionName).arg(lines.at(i))); + return context->throwError(QString::fromLatin1("QXmlSimpleReader::%0(): could not find a function match; candidates are:\n%1") + .arg(functionName).arg(fullSignatures.join(QLatin1String("\n")))); +} + +Q_DECLARE_METATYPE(QXmlSimpleReader*) +Q_DECLARE_METATYPE(QtScriptShell_QXmlSimpleReader*) +Q_DECLARE_METATYPE(const QXmlInputSource*) +Q_DECLARE_METATYPE(QXmlReader*) + +// +// QXmlSimpleReader +// + +static QScriptValue qtscript_QXmlSimpleReader_prototype_call(QScriptContext *context, QScriptEngine *) +{ +#if QT_VERSION > 0x040400 + Q_ASSERT(context->callee().isFunction()); + uint _id = context->callee().data().toUInt32(); +#else + uint _id; + if (context->callee().isFunction()) + _id = context->callee().data().toUInt32(); + else + _id = 0xBABE0000 + 2; +#endif + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + QXmlSimpleReader* _q_self = qscriptvalue_cast(context->thisObject()); + if (!_q_self) { + return context->throwError(QScriptContext::TypeError, + QString::fromLatin1("QXmlSimpleReader.%0(): this object is not a QXmlSimpleReader") + .arg(qtscript_QXmlSimpleReader_function_names[_id+1])); + } + + switch (_id) { + case 0: + if (context->argumentCount() == 2) { + const QXmlInputSource* _q_arg0 = qscriptvalue_cast(context->argument(0)); + bool _q_arg1 = context->argument(1).toBoolean(); + bool _q_result = _q_self->parse(_q_arg0, _q_arg1); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 1: + if (context->argumentCount() == 0) { + bool _q_result = _q_self->parseContinue(); + return QScriptValue(context->engine(), _q_result); + } + break; + + case 2: { + QString result = QString::fromLatin1("QXmlSimpleReader"); + return QScriptValue(context->engine(), result); + } + + default: + Q_ASSERT(false); + } + return qtscript_QXmlSimpleReader_throw_ambiguity_error_helper(context, + qtscript_QXmlSimpleReader_function_names[_id+1], + qtscript_QXmlSimpleReader_function_signatures[_id+1]); +} + +static QScriptValue qtscript_QXmlSimpleReader_static_call(QScriptContext *context, QScriptEngine *) +{ + uint _id = context->callee().data().toUInt32(); + Q_ASSERT((_id & 0xFFFF0000) == 0xBABE0000); + _id &= 0x0000FFFF; + switch (_id) { + case 0: + if (context->thisObject().strictlyEquals(context->engine()->globalObject())) { + return context->throwError(QString::fromLatin1("QXmlSimpleReader(): Did you forget to construct with 'new'?")); + } + if (context->argumentCount() == 0) { + QtScriptShell_QXmlSimpleReader* _q_cpp_result = new QtScriptShell_QXmlSimpleReader(); + QScriptValue _q_result = context->engine()->newVariant(context->thisObject(), qVariantFromValue((QXmlSimpleReader*)_q_cpp_result)); + _q_cpp_result->__qtscript_self = _q_result; + return _q_result; + } + break; + + default: + Q_ASSERT(false); + } + return qtscript_QXmlSimpleReader_throw_ambiguity_error_helper(context, + qtscript_QXmlSimpleReader_function_names[_id], + qtscript_QXmlSimpleReader_function_signatures[_id]); +} + +QScriptValue qtscript_create_QXmlSimpleReader_class(QScriptEngine *engine) +{ + engine->setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QScriptValue proto = engine->newVariant(qVariantFromValue((QXmlSimpleReader*)0)); + proto.setPrototype(engine->defaultPrototype(qMetaTypeId())); + for (int i = 0; i < 3; ++i) { + QScriptValue fun = engine->newFunction(qtscript_QXmlSimpleReader_prototype_call, qtscript_QXmlSimpleReader_function_lengths[i+1]); + fun.setData(QScriptValue(engine, uint(0xBABE0000 + i))); + proto.setProperty(QString::fromLatin1(qtscript_QXmlSimpleReader_function_names[i+1]), + fun, QScriptValue::SkipInEnumeration); + } + + engine->setDefaultPrototype(qMetaTypeId(), proto); + + QScriptValue ctor = engine->newFunction(qtscript_QXmlSimpleReader_static_call, proto, qtscript_QXmlSimpleReader_function_lengths[0]); + ctor.setData(QScriptValue(engine, uint(0xBABE0000 + 0))); + + return ctor; +} diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlAttributes.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlAttributes.cpp new file mode 100644 index 00000000..b1c2f0d7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlAttributes.cpp @@ -0,0 +1,13 @@ +#include "qtscriptshell_QXmlAttributes.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QXmlAttributes::QtScriptShell_QXmlAttributes() + : QXmlAttributes() {} + +QtScriptShell_QXmlAttributes::~QtScriptShell_QXmlAttributes() {} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlAttributes.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlAttributes.h new file mode 100644 index 00000000..bbfeb8d7 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlAttributes.h @@ -0,0 +1,19 @@ +#ifndef QTSCRIPTSHELL_QXMLATTRIBUTES_H +#define QTSCRIPTSHELL_QXMLATTRIBUTES_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QXmlAttributes : public QXmlAttributes +{ +public: + QtScriptShell_QXmlAttributes(); + ~QtScriptShell_QXmlAttributes(); + + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QXMLATTRIBUTES_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlContentHandler.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlContentHandler.cpp new file mode 100644 index 00000000..4ac9d69e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlContentHandler.cpp @@ -0,0 +1,182 @@ +#include "qtscriptshell_QXmlContentHandler.h" + +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QXmlLocator*) +Q_DECLARE_METATYPE(QXmlAttributes) + +QtScriptShell_QXmlContentHandler::QtScriptShell_QXmlContentHandler() + : QXmlContentHandler() {} + +QtScriptShell_QXmlContentHandler::~QtScriptShell_QXmlContentHandler() {} + +bool QtScriptShell_QXmlContentHandler::characters(const QString& ch) +{ + QScriptValue _q_function = __qtscript_self.property("characters"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("characters") & QScriptValue::QObjectMember)) { + qFatal("QXmlContentHandler::characters() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ch))); + } +} + +bool QtScriptShell_QXmlContentHandler::endDocument() +{ + QScriptValue _q_function = __qtscript_self.property("endDocument"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("endDocument") & QScriptValue::QObjectMember)) { + qFatal("QXmlContentHandler::endDocument() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlContentHandler::endElement(const QString& namespaceURI, const QString& localName, const QString& qName) +{ + QScriptValue _q_function = __qtscript_self.property("endElement"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("endElement") & QScriptValue::QObjectMember)) { + qFatal("QXmlContentHandler::endElement() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, namespaceURI) + << qScriptValueFromValue(_q_engine, localName) + << qScriptValueFromValue(_q_engine, qName))); + } +} + +bool QtScriptShell_QXmlContentHandler::endPrefixMapping(const QString& prefix) +{ + QScriptValue _q_function = __qtscript_self.property("endPrefixMapping"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("endPrefixMapping") & QScriptValue::QObjectMember)) { + qFatal("QXmlContentHandler::endPrefixMapping() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, prefix))); + } +} + +QString QtScriptShell_QXmlContentHandler::errorString() const +{ + QScriptValue _q_function = __qtscript_self.property("errorString"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("errorString") & QScriptValue::QObjectMember)) { + qFatal("QXmlContentHandler::errorString() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlContentHandler::ignorableWhitespace(const QString& ch) +{ + QScriptValue _q_function = __qtscript_self.property("ignorableWhitespace"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("ignorableWhitespace") & QScriptValue::QObjectMember)) { + qFatal("QXmlContentHandler::ignorableWhitespace() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ch))); + } +} + +bool QtScriptShell_QXmlContentHandler::processingInstruction(const QString& target, const QString& data) +{ + QScriptValue _q_function = __qtscript_self.property("processingInstruction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("processingInstruction") & QScriptValue::QObjectMember)) { + qFatal("QXmlContentHandler::processingInstruction() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, target) + << qScriptValueFromValue(_q_engine, data))); + } +} + +void QtScriptShell_QXmlContentHandler::setDocumentLocator(QXmlLocator* locator) +{ + QScriptValue _q_function = __qtscript_self.property("setDocumentLocator"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setDocumentLocator") & QScriptValue::QObjectMember)) { + qFatal("QXmlContentHandler::setDocumentLocator() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, locator)); + } +} + +bool QtScriptShell_QXmlContentHandler::skippedEntity(const QString& name) +{ + QScriptValue _q_function = __qtscript_self.property("skippedEntity"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("skippedEntity") & QScriptValue::QObjectMember)) { + qFatal("QXmlContentHandler::skippedEntity() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + +bool QtScriptShell_QXmlContentHandler::startDocument() +{ + QScriptValue _q_function = __qtscript_self.property("startDocument"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startDocument") & QScriptValue::QObjectMember)) { + qFatal("QXmlContentHandler::startDocument() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlContentHandler::startElement(const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts) +{ + QScriptValue _q_function = __qtscript_self.property("startElement"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startElement") & QScriptValue::QObjectMember)) { + qFatal("QXmlContentHandler::startElement() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, namespaceURI) + << qScriptValueFromValue(_q_engine, localName) + << qScriptValueFromValue(_q_engine, qName) + << qScriptValueFromValue(_q_engine, atts))); + } +} + +bool QtScriptShell_QXmlContentHandler::startPrefixMapping(const QString& prefix, const QString& uri) +{ + QScriptValue _q_function = __qtscript_self.property("startPrefixMapping"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startPrefixMapping") & QScriptValue::QObjectMember)) { + qFatal("QXmlContentHandler::startPrefixMapping() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, prefix) + << qScriptValueFromValue(_q_engine, uri))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlContentHandler.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlContentHandler.h new file mode 100644 index 00000000..73620755 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlContentHandler.h @@ -0,0 +1,31 @@ +#ifndef QTSCRIPTSHELL_QXMLCONTENTHANDLER_H +#define QTSCRIPTSHELL_QXMLCONTENTHANDLER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QXmlContentHandler : public QXmlContentHandler +{ +public: + QtScriptShell_QXmlContentHandler(); + ~QtScriptShell_QXmlContentHandler(); + + bool characters(const QString& ch); + bool endDocument(); + bool endElement(const QString& namespaceURI, const QString& localName, const QString& qName); + bool endPrefixMapping(const QString& prefix); + QString errorString() const; + bool ignorableWhitespace(const QString& ch); + bool processingInstruction(const QString& target, const QString& data); + void setDocumentLocator(QXmlLocator* locator); + bool skippedEntity(const QString& name); + bool startDocument(); + bool startElement(const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts); + bool startPrefixMapping(const QString& prefix, const QString& uri); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QXMLCONTENTHANDLER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDTDHandler.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDTDHandler.cpp new file mode 100644 index 00000000..37c10068 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDTDHandler.cpp @@ -0,0 +1,57 @@ +#include "qtscriptshell_QXmlDTDHandler.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QXmlDTDHandler::QtScriptShell_QXmlDTDHandler() + : QXmlDTDHandler() {} + +QtScriptShell_QXmlDTDHandler::~QtScriptShell_QXmlDTDHandler() {} + +QString QtScriptShell_QXmlDTDHandler::errorString() const +{ + QScriptValue _q_function = __qtscript_self.property("errorString"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("errorString") & QScriptValue::QObjectMember)) { + qFatal("QXmlDTDHandler::errorString() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlDTDHandler::notationDecl(const QString& name, const QString& publicId, const QString& systemId) +{ + QScriptValue _q_function = __qtscript_self.property("notationDecl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("notationDecl") & QScriptValue::QObjectMember)) { + qFatal("QXmlDTDHandler::notationDecl() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name) + << qScriptValueFromValue(_q_engine, publicId) + << qScriptValueFromValue(_q_engine, systemId))); + } +} + +bool QtScriptShell_QXmlDTDHandler::unparsedEntityDecl(const QString& name, const QString& publicId, const QString& systemId, const QString& notationName) +{ + QScriptValue _q_function = __qtscript_self.property("unparsedEntityDecl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("unparsedEntityDecl") & QScriptValue::QObjectMember)) { + qFatal("QXmlDTDHandler::unparsedEntityDecl() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name) + << qScriptValueFromValue(_q_engine, publicId) + << qScriptValueFromValue(_q_engine, systemId) + << qScriptValueFromValue(_q_engine, notationName))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDTDHandler.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDTDHandler.h new file mode 100644 index 00000000..cca9b145 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDTDHandler.h @@ -0,0 +1,22 @@ +#ifndef QTSCRIPTSHELL_QXMLDTDHANDLER_H +#define QTSCRIPTSHELL_QXMLDTDHANDLER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QXmlDTDHandler : public QXmlDTDHandler +{ +public: + QtScriptShell_QXmlDTDHandler(); + ~QtScriptShell_QXmlDTDHandler(); + + QString errorString() const; + bool notationDecl(const QString& name, const QString& publicId, const QString& systemId); + bool unparsedEntityDecl(const QString& name, const QString& publicId, const QString& systemId, const QString& notationName); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QXMLDTDHANDLER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDeclHandler.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDeclHandler.cpp new file mode 100644 index 00000000..f48ad616 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDeclHandler.cpp @@ -0,0 +1,73 @@ +#include "qtscriptshell_QXmlDeclHandler.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QXmlDeclHandler::QtScriptShell_QXmlDeclHandler() + : QXmlDeclHandler() {} + +QtScriptShell_QXmlDeclHandler::~QtScriptShell_QXmlDeclHandler() {} + +bool QtScriptShell_QXmlDeclHandler::attributeDecl(const QString& eName, const QString& aName, const QString& type, const QString& valueDefault, const QString& value) +{ + QScriptValue _q_function = __qtscript_self.property("attributeDecl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("attributeDecl") & QScriptValue::QObjectMember)) { + qFatal("QXmlDeclHandler::attributeDecl() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eName) + << qScriptValueFromValue(_q_engine, aName) + << qScriptValueFromValue(_q_engine, type) + << qScriptValueFromValue(_q_engine, valueDefault) + << qScriptValueFromValue(_q_engine, value))); + } +} + +QString QtScriptShell_QXmlDeclHandler::errorString() const +{ + QScriptValue _q_function = __qtscript_self.property("errorString"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("errorString") & QScriptValue::QObjectMember)) { + qFatal("QXmlDeclHandler::errorString() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlDeclHandler::externalEntityDecl(const QString& name, const QString& publicId, const QString& systemId) +{ + QScriptValue _q_function = __qtscript_self.property("externalEntityDecl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("externalEntityDecl") & QScriptValue::QObjectMember)) { + qFatal("QXmlDeclHandler::externalEntityDecl() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name) + << qScriptValueFromValue(_q_engine, publicId) + << qScriptValueFromValue(_q_engine, systemId))); + } +} + +bool QtScriptShell_QXmlDeclHandler::internalEntityDecl(const QString& name, const QString& value) +{ + QScriptValue _q_function = __qtscript_self.property("internalEntityDecl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("internalEntityDecl") & QScriptValue::QObjectMember)) { + qFatal("QXmlDeclHandler::internalEntityDecl() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name) + << qScriptValueFromValue(_q_engine, value))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDeclHandler.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDeclHandler.h new file mode 100644 index 00000000..3df4e68d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDeclHandler.h @@ -0,0 +1,23 @@ +#ifndef QTSCRIPTSHELL_QXMLDECLHANDLER_H +#define QTSCRIPTSHELL_QXMLDECLHANDLER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QXmlDeclHandler : public QXmlDeclHandler +{ +public: + QtScriptShell_QXmlDeclHandler(); + ~QtScriptShell_QXmlDeclHandler(); + + bool attributeDecl(const QString& eName, const QString& aName, const QString& type, const QString& valueDefault, const QString& value); + QString errorString() const; + bool externalEntityDecl(const QString& name, const QString& publicId, const QString& systemId); + bool internalEntityDecl(const QString& name, const QString& value); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QXMLDECLHANDLER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDefaultHandler.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDefaultHandler.cpp new file mode 100644 index 00000000..6ecdce17 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDefaultHandler.cpp @@ -0,0 +1,415 @@ +#include "qtscriptshell_QXmlDefaultHandler.h" + +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QXmlParseException) +Q_DECLARE_METATYPE(QXmlInputSource*) +Q_DECLARE_METATYPE(QXmlLocator*) +Q_DECLARE_METATYPE(QXmlAttributes) + +QtScriptShell_QXmlDefaultHandler::QtScriptShell_QXmlDefaultHandler() + : QXmlDefaultHandler() {} + +QtScriptShell_QXmlDefaultHandler::~QtScriptShell_QXmlDefaultHandler() {} + +bool QtScriptShell_QXmlDefaultHandler::attributeDecl(const QString& eName, const QString& aName, const QString& type, const QString& valueDefault, const QString& value) +{ + QScriptValue _q_function = __qtscript_self.property("attributeDecl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("attributeDecl") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::attributeDecl(eName, aName, type, valueDefault, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, eName) + << qScriptValueFromValue(_q_engine, aName) + << qScriptValueFromValue(_q_engine, type) + << qScriptValueFromValue(_q_engine, valueDefault) + << qScriptValueFromValue(_q_engine, value))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::characters(const QString& ch) +{ + QScriptValue _q_function = __qtscript_self.property("characters"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("characters") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::characters(ch); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ch))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::comment(const QString& ch) +{ + QScriptValue _q_function = __qtscript_self.property("comment"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("comment") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::comment(ch); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ch))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::endCDATA() +{ + QScriptValue _q_function = __qtscript_self.property("endCDATA"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("endCDATA") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::endCDATA(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlDefaultHandler::endDTD() +{ + QScriptValue _q_function = __qtscript_self.property("endDTD"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("endDTD") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::endDTD(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlDefaultHandler::endDocument() +{ + QScriptValue _q_function = __qtscript_self.property("endDocument"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("endDocument") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::endDocument(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlDefaultHandler::endElement(const QString& namespaceURI, const QString& localName, const QString& qName) +{ + QScriptValue _q_function = __qtscript_self.property("endElement"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("endElement") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::endElement(namespaceURI, localName, qName); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, namespaceURI) + << qScriptValueFromValue(_q_engine, localName) + << qScriptValueFromValue(_q_engine, qName))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::endEntity(const QString& name) +{ + QScriptValue _q_function = __qtscript_self.property("endEntity"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("endEntity") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::endEntity(name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::endPrefixMapping(const QString& prefix) +{ + QScriptValue _q_function = __qtscript_self.property("endPrefixMapping"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("endPrefixMapping") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::endPrefixMapping(prefix); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, prefix))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::error(const QXmlParseException& exception) +{ + QScriptValue _q_function = __qtscript_self.property("error"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("error") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::error(exception); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, exception))); + } +} + +QString QtScriptShell_QXmlDefaultHandler::errorString() const +{ + QScriptValue _q_function = __qtscript_self.property("errorString"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("errorString") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::errorString(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlDefaultHandler::externalEntityDecl(const QString& name, const QString& publicId, const QString& systemId) +{ + QScriptValue _q_function = __qtscript_self.property("externalEntityDecl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("externalEntityDecl") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::externalEntityDecl(name, publicId, systemId); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name) + << qScriptValueFromValue(_q_engine, publicId) + << qScriptValueFromValue(_q_engine, systemId))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::fatalError(const QXmlParseException& exception) +{ + QScriptValue _q_function = __qtscript_self.property("fatalError"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fatalError") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::fatalError(exception); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, exception))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::ignorableWhitespace(const QString& ch) +{ + QScriptValue _q_function = __qtscript_self.property("ignorableWhitespace"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("ignorableWhitespace") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::ignorableWhitespace(ch); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ch))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::internalEntityDecl(const QString& name, const QString& value) +{ + QScriptValue _q_function = __qtscript_self.property("internalEntityDecl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("internalEntityDecl") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::internalEntityDecl(name, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name) + << qScriptValueFromValue(_q_engine, value))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::notationDecl(const QString& name, const QString& publicId, const QString& systemId) +{ + QScriptValue _q_function = __qtscript_self.property("notationDecl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("notationDecl") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::notationDecl(name, publicId, systemId); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name) + << qScriptValueFromValue(_q_engine, publicId) + << qScriptValueFromValue(_q_engine, systemId))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::processingInstruction(const QString& target, const QString& data) +{ + QScriptValue _q_function = __qtscript_self.property("processingInstruction"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("processingInstruction") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::processingInstruction(target, data); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, target) + << qScriptValueFromValue(_q_engine, data))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::resolveEntity(const QString& publicId, const QString& systemId, QXmlInputSource*& ret) +{ + QScriptValue _q_function = __qtscript_self.property("resolveEntity"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resolveEntity") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::resolveEntity(publicId, systemId, ret); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, publicId) + << qScriptValueFromValue(_q_engine, systemId) + << qScriptValueFromValue(_q_engine, ret))); + } +} + +void QtScriptShell_QXmlDefaultHandler::setDocumentLocator(QXmlLocator* locator) +{ + QScriptValue _q_function = __qtscript_self.property("setDocumentLocator"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setDocumentLocator") & QScriptValue::QObjectMember)) { + QXmlDefaultHandler::setDocumentLocator(locator); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, locator)); + } +} + +bool QtScriptShell_QXmlDefaultHandler::skippedEntity(const QString& name) +{ + QScriptValue _q_function = __qtscript_self.property("skippedEntity"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("skippedEntity") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::skippedEntity(name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::startCDATA() +{ + QScriptValue _q_function = __qtscript_self.property("startCDATA"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startCDATA") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::startCDATA(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlDefaultHandler::startDTD(const QString& name, const QString& publicId, const QString& systemId) +{ + QScriptValue _q_function = __qtscript_self.property("startDTD"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startDTD") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::startDTD(name, publicId, systemId); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name) + << qScriptValueFromValue(_q_engine, publicId) + << qScriptValueFromValue(_q_engine, systemId))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::startDocument() +{ + QScriptValue _q_function = __qtscript_self.property("startDocument"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startDocument") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::startDocument(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlDefaultHandler::startElement(const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts) +{ + QScriptValue _q_function = __qtscript_self.property("startElement"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startElement") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::startElement(namespaceURI, localName, qName, atts); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, namespaceURI) + << qScriptValueFromValue(_q_engine, localName) + << qScriptValueFromValue(_q_engine, qName) + << qScriptValueFromValue(_q_engine, atts))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::startEntity(const QString& name) +{ + QScriptValue _q_function = __qtscript_self.property("startEntity"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startEntity") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::startEntity(name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::startPrefixMapping(const QString& prefix, const QString& uri) +{ + QScriptValue _q_function = __qtscript_self.property("startPrefixMapping"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startPrefixMapping") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::startPrefixMapping(prefix, uri); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, prefix) + << qScriptValueFromValue(_q_engine, uri))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::unparsedEntityDecl(const QString& name, const QString& publicId, const QString& systemId, const QString& notationName) +{ + QScriptValue _q_function = __qtscript_self.property("unparsedEntityDecl"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("unparsedEntityDecl") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::unparsedEntityDecl(name, publicId, systemId, notationName); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name) + << qScriptValueFromValue(_q_engine, publicId) + << qScriptValueFromValue(_q_engine, systemId) + << qScriptValueFromValue(_q_engine, notationName))); + } +} + +bool QtScriptShell_QXmlDefaultHandler::warning(const QXmlParseException& exception) +{ + QScriptValue _q_function = __qtscript_self.property("warning"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("warning") & QScriptValue::QObjectMember)) { + return QXmlDefaultHandler::warning(exception); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, exception))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDefaultHandler.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDefaultHandler.h new file mode 100644 index 00000000..5374265d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlDefaultHandler.h @@ -0,0 +1,47 @@ +#ifndef QTSCRIPTSHELL_QXMLDEFAULTHANDLER_H +#define QTSCRIPTSHELL_QXMLDEFAULTHANDLER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QXmlDefaultHandler : public QXmlDefaultHandler +{ +public: + QtScriptShell_QXmlDefaultHandler(); + ~QtScriptShell_QXmlDefaultHandler(); + + bool attributeDecl(const QString& eName, const QString& aName, const QString& type, const QString& valueDefault, const QString& value); + bool characters(const QString& ch); + bool comment(const QString& ch); + bool endCDATA(); + bool endDTD(); + bool endDocument(); + bool endElement(const QString& namespaceURI, const QString& localName, const QString& qName); + bool endEntity(const QString& name); + bool endPrefixMapping(const QString& prefix); + bool error(const QXmlParseException& exception); + QString errorString() const; + bool externalEntityDecl(const QString& name, const QString& publicId, const QString& systemId); + bool fatalError(const QXmlParseException& exception); + bool ignorableWhitespace(const QString& ch); + bool internalEntityDecl(const QString& name, const QString& value); + bool notationDecl(const QString& name, const QString& publicId, const QString& systemId); + bool processingInstruction(const QString& target, const QString& data); + bool resolveEntity(const QString& publicId, const QString& systemId, QXmlInputSource*& ret); + void setDocumentLocator(QXmlLocator* locator); + bool skippedEntity(const QString& name); + bool startCDATA(); + bool startDTD(const QString& name, const QString& publicId, const QString& systemId); + bool startDocument(); + bool startElement(const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts); + bool startEntity(const QString& name); + bool startPrefixMapping(const QString& prefix, const QString& uri); + bool unparsedEntityDecl(const QString& name, const QString& publicId, const QString& systemId, const QString& notationName); + bool warning(const QXmlParseException& exception); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QXMLDEFAULTHANDLER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlEntityResolver.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlEntityResolver.cpp new file mode 100644 index 00000000..c6365353 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlEntityResolver.cpp @@ -0,0 +1,42 @@ +#include "qtscriptshell_QXmlEntityResolver.h" + +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QXmlInputSource*) + +QtScriptShell_QXmlEntityResolver::QtScriptShell_QXmlEntityResolver() + : QXmlEntityResolver() {} + +QtScriptShell_QXmlEntityResolver::~QtScriptShell_QXmlEntityResolver() {} + +QString QtScriptShell_QXmlEntityResolver::errorString() const +{ + QScriptValue _q_function = __qtscript_self.property("errorString"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("errorString") & QScriptValue::QObjectMember)) { + qFatal("QXmlEntityResolver::errorString() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlEntityResolver::resolveEntity(const QString& publicId, const QString& systemId, QXmlInputSource*& ret) +{ + QScriptValue _q_function = __qtscript_self.property("resolveEntity"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("resolveEntity") & QScriptValue::QObjectMember)) { + qFatal("QXmlEntityResolver::resolveEntity() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, publicId) + << qScriptValueFromValue(_q_engine, systemId) + << qScriptValueFromValue(_q_engine, ret))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlEntityResolver.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlEntityResolver.h new file mode 100644 index 00000000..5b4e7d86 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlEntityResolver.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QXMLENTITYRESOLVER_H +#define QTSCRIPTSHELL_QXMLENTITYRESOLVER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QXmlEntityResolver : public QXmlEntityResolver +{ +public: + QtScriptShell_QXmlEntityResolver(); + ~QtScriptShell_QXmlEntityResolver(); + + QString errorString() const; + bool resolveEntity(const QString& publicId, const QString& systemId, QXmlInputSource*& ret); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QXMLENTITYRESOLVER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlErrorHandler.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlErrorHandler.cpp new file mode 100644 index 00000000..4dd30e47 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlErrorHandler.cpp @@ -0,0 +1,68 @@ +#include "qtscriptshell_QXmlErrorHandler.h" + +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QXmlParseException) + +QtScriptShell_QXmlErrorHandler::QtScriptShell_QXmlErrorHandler() + : QXmlErrorHandler() {} + +QtScriptShell_QXmlErrorHandler::~QtScriptShell_QXmlErrorHandler() {} + +bool QtScriptShell_QXmlErrorHandler::error(const QXmlParseException& exception) +{ + QScriptValue _q_function = __qtscript_self.property("error"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("error") & QScriptValue::QObjectMember)) { + qFatal("QXmlErrorHandler::error() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, exception))); + } +} + +QString QtScriptShell_QXmlErrorHandler::errorString() const +{ + QScriptValue _q_function = __qtscript_self.property("errorString"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("errorString") & QScriptValue::QObjectMember)) { + qFatal("QXmlErrorHandler::errorString() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlErrorHandler::fatalError(const QXmlParseException& exception) +{ + QScriptValue _q_function = __qtscript_self.property("fatalError"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fatalError") & QScriptValue::QObjectMember)) { + qFatal("QXmlErrorHandler::fatalError() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, exception))); + } +} + +bool QtScriptShell_QXmlErrorHandler::warning(const QXmlParseException& exception) +{ + QScriptValue _q_function = __qtscript_self.property("warning"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("warning") & QScriptValue::QObjectMember)) { + qFatal("QXmlErrorHandler::warning() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, exception))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlErrorHandler.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlErrorHandler.h new file mode 100644 index 00000000..fd9dbd1a --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlErrorHandler.h @@ -0,0 +1,23 @@ +#ifndef QTSCRIPTSHELL_QXMLERRORHANDLER_H +#define QTSCRIPTSHELL_QXMLERRORHANDLER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QXmlErrorHandler : public QXmlErrorHandler +{ +public: + QtScriptShell_QXmlErrorHandler(); + ~QtScriptShell_QXmlErrorHandler(); + + bool error(const QXmlParseException& exception); + QString errorString() const; + bool fatalError(const QXmlParseException& exception); + bool warning(const QXmlParseException& exception); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QXMLERRORHANDLER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlInputSource.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlInputSource.cpp new file mode 100644 index 00000000..483fc95d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlInputSource.cpp @@ -0,0 +1,105 @@ +#include "qtscriptshell_QXmlInputSource.h" + +#include +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QXmlInputSource::QtScriptShell_QXmlInputSource() + : QXmlInputSource() {} + +QtScriptShell_QXmlInputSource::QtScriptShell_QXmlInputSource(QIODevice* dev) + : QXmlInputSource(dev) {} + +QtScriptShell_QXmlInputSource::~QtScriptShell_QXmlInputSource() {} + +QString QtScriptShell_QXmlInputSource::data() const +{ + QScriptValue _q_function = __qtscript_self.property("data"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("data") & QScriptValue::QObjectMember)) { + return QXmlInputSource::data(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QXmlInputSource::fetchData() +{ + QScriptValue _q_function = __qtscript_self.property("fetchData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fetchData") & QScriptValue::QObjectMember)) { + QXmlInputSource::fetchData(); + } else { + _q_function.call(__qtscript_self); + } +} + +QString QtScriptShell_QXmlInputSource::fromRawData(const QByteArray& data, bool beginning) +{ + QScriptValue _q_function = __qtscript_self.property("fromRawData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("fromRawData") & QScriptValue::QObjectMember)) { + return QXmlInputSource::fromRawData(data, beginning); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, data) + << qScriptValueFromValue(_q_engine, beginning))); + } +} + +QChar QtScriptShell_QXmlInputSource::next() +{ + QScriptValue _q_function = __qtscript_self.property("next"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("next") & QScriptValue::QObjectMember)) { + return QXmlInputSource::next(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void QtScriptShell_QXmlInputSource::reset() +{ + QScriptValue _q_function = __qtscript_self.property("reset"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("reset") & QScriptValue::QObjectMember)) { + QXmlInputSource::reset(); + } else { + _q_function.call(__qtscript_self); + } +} + +void QtScriptShell_QXmlInputSource::setData(const QByteArray& dat) +{ + QScriptValue _q_function = __qtscript_self.property("setData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setData") & QScriptValue::QObjectMember)) { + QXmlInputSource::setData(dat); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dat)); + } +} + +void QtScriptShell_QXmlInputSource::setData(const QString& dat) +{ + QScriptValue _q_function = __qtscript_self.property("setData"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setData") & QScriptValue::QObjectMember)) { + QXmlInputSource::setData(dat); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, dat)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlInputSource.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlInputSource.h new file mode 100644 index 00000000..edd4d22b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlInputSource.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QXMLINPUTSOURCE_H +#define QTSCRIPTSHELL_QXMLINPUTSOURCE_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QXmlInputSource : public QXmlInputSource +{ +public: + QtScriptShell_QXmlInputSource(); + QtScriptShell_QXmlInputSource(QIODevice* dev); + ~QtScriptShell_QXmlInputSource(); + + QString data() const; + void fetchData(); + QString fromRawData(const QByteArray& data, bool beginning = false); + QChar next(); + void reset(); + void setData(const QByteArray& dat); + void setData(const QString& dat); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QXMLINPUTSOURCE_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlLexicalHandler.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlLexicalHandler.cpp new file mode 100644 index 00000000..4186483b --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlLexicalHandler.cpp @@ -0,0 +1,115 @@ +#include "qtscriptshell_QXmlLexicalHandler.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QXmlLexicalHandler::QtScriptShell_QXmlLexicalHandler() + : QXmlLexicalHandler() {} + +QtScriptShell_QXmlLexicalHandler::~QtScriptShell_QXmlLexicalHandler() {} + +bool QtScriptShell_QXmlLexicalHandler::comment(const QString& ch) +{ + QScriptValue _q_function = __qtscript_self.property("comment"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("comment") & QScriptValue::QObjectMember)) { + qFatal("QXmlLexicalHandler::comment() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, ch))); + } +} + +bool QtScriptShell_QXmlLexicalHandler::endCDATA() +{ + QScriptValue _q_function = __qtscript_self.property("endCDATA"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("endCDATA") & QScriptValue::QObjectMember)) { + qFatal("QXmlLexicalHandler::endCDATA() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlLexicalHandler::endDTD() +{ + QScriptValue _q_function = __qtscript_self.property("endDTD"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("endDTD") & QScriptValue::QObjectMember)) { + qFatal("QXmlLexicalHandler::endDTD() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlLexicalHandler::endEntity(const QString& name) +{ + QScriptValue _q_function = __qtscript_self.property("endEntity"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("endEntity") & QScriptValue::QObjectMember)) { + qFatal("QXmlLexicalHandler::endEntity() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + +QString QtScriptShell_QXmlLexicalHandler::errorString() const +{ + QScriptValue _q_function = __qtscript_self.property("errorString"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("errorString") & QScriptValue::QObjectMember)) { + qFatal("QXmlLexicalHandler::errorString() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlLexicalHandler::startCDATA() +{ + QScriptValue _q_function = __qtscript_self.property("startCDATA"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startCDATA") & QScriptValue::QObjectMember)) { + qFatal("QXmlLexicalHandler::startCDATA() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlLexicalHandler::startDTD(const QString& name, const QString& publicId, const QString& systemId) +{ + QScriptValue _q_function = __qtscript_self.property("startDTD"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startDTD") & QScriptValue::QObjectMember)) { + qFatal("QXmlLexicalHandler::startDTD() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name) + << qScriptValueFromValue(_q_engine, publicId) + << qScriptValueFromValue(_q_engine, systemId))); + } +} + +bool QtScriptShell_QXmlLexicalHandler::startEntity(const QString& name) +{ + QScriptValue _q_function = __qtscript_self.property("startEntity"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("startEntity") & QScriptValue::QObjectMember)) { + qFatal("QXmlLexicalHandler::startEntity() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlLexicalHandler.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlLexicalHandler.h new file mode 100644 index 00000000..5e5e4995 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlLexicalHandler.h @@ -0,0 +1,27 @@ +#ifndef QTSCRIPTSHELL_QXMLLEXICALHANDLER_H +#define QTSCRIPTSHELL_QXMLLEXICALHANDLER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QXmlLexicalHandler : public QXmlLexicalHandler +{ +public: + QtScriptShell_QXmlLexicalHandler(); + ~QtScriptShell_QXmlLexicalHandler(); + + bool comment(const QString& ch); + bool endCDATA(); + bool endDTD(); + bool endEntity(const QString& name); + QString errorString() const; + bool startCDATA(); + bool startDTD(const QString& name, const QString& publicId, const QString& systemId); + bool startEntity(const QString& name); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QXMLLEXICALHANDLER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlLocator.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlLocator.cpp new file mode 100644 index 00000000..7827dddb --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlLocator.cpp @@ -0,0 +1,35 @@ +#include "qtscriptshell_QXmlLocator.h" + +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + + +QtScriptShell_QXmlLocator::QtScriptShell_QXmlLocator() + : QXmlLocator() {} + +QtScriptShell_QXmlLocator::~QtScriptShell_QXmlLocator() {} + +int QtScriptShell_QXmlLocator::columnNumber() const +{ + QScriptValue _q_function = __qtscript_self.property("columnNumber"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("columnNumber") & QScriptValue::QObjectMember)) { + qFatal("QXmlLocator::columnNumber() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +int QtScriptShell_QXmlLocator::lineNumber() const +{ + QScriptValue _q_function = __qtscript_self.property("lineNumber"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("lineNumber") & QScriptValue::QObjectMember)) { + qFatal("QXmlLocator::lineNumber() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlLocator.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlLocator.h new file mode 100644 index 00000000..b0ab329e --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlLocator.h @@ -0,0 +1,21 @@ +#ifndef QTSCRIPTSHELL_QXMLLOCATOR_H +#define QTSCRIPTSHELL_QXMLLOCATOR_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QXmlLocator : public QXmlLocator +{ +public: + QtScriptShell_QXmlLocator(); + ~QtScriptShell_QXmlLocator(); + + int columnNumber() const; + int lineNumber() const; + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QXMLLOCATOR_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlReader.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlReader.cpp new file mode 100644 index 00000000..50cd353d --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlReader.cpp @@ -0,0 +1,286 @@ +#include "qtscriptshell_QXmlReader.h" + +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QXmlDTDHandler*) +Q_DECLARE_METATYPE(QXmlContentHandler*) +Q_DECLARE_METATYPE(QXmlDeclHandler*) +Q_DECLARE_METATYPE(QXmlEntityResolver*) +Q_DECLARE_METATYPE(QXmlErrorHandler*) +Q_DECLARE_METATYPE(QXmlLexicalHandler*) +Q_DECLARE_METATYPE(QXmlInputSource) +Q_DECLARE_METATYPE(const QXmlInputSource*) + +QtScriptShell_QXmlReader::QtScriptShell_QXmlReader() + : QXmlReader() {} + +QtScriptShell_QXmlReader::~QtScriptShell_QXmlReader() {} + +QXmlDTDHandler* QtScriptShell_QXmlReader::DTDHandler() const +{ + QScriptValue _q_function = __qtscript_self.property("DTDHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("DTDHandler") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::DTDHandler() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QXmlContentHandler* QtScriptShell_QXmlReader::contentHandler() const +{ + QScriptValue _q_function = __qtscript_self.property("contentHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contentHandler") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::contentHandler() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QXmlDeclHandler* QtScriptShell_QXmlReader::declHandler() const +{ + QScriptValue _q_function = __qtscript_self.property("declHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("declHandler") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::declHandler() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QXmlEntityResolver* QtScriptShell_QXmlReader::entityResolver() const +{ + QScriptValue _q_function = __qtscript_self.property("entityResolver"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("entityResolver") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::entityResolver() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QXmlErrorHandler* QtScriptShell_QXmlReader::errorHandler() const +{ + QScriptValue _q_function = __qtscript_self.property("errorHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("errorHandler") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::errorHandler() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlReader::feature(const QString& name, bool* ok) const +{ + QScriptValue _q_function = __qtscript_self.property("feature"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("feature") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::feature() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + +bool QtScriptShell_QXmlReader::hasFeature(const QString& name) const +{ + QScriptValue _q_function = __qtscript_self.property("hasFeature"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasFeature") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::hasFeature() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + +bool QtScriptShell_QXmlReader::hasProperty(const QString& name) const +{ + QScriptValue _q_function = __qtscript_self.property("hasProperty"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasProperty") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::hasProperty() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + +QXmlLexicalHandler* QtScriptShell_QXmlReader::lexicalHandler() const +{ + QScriptValue _q_function = __qtscript_self.property("lexicalHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("lexicalHandler") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::lexicalHandler() is abstract!"); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlReader::parse(const QXmlInputSource& input) +{ + QScriptValue _q_function = __qtscript_self.property("parse"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("parse") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::parse() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, input))); + } +} + +bool QtScriptShell_QXmlReader::parse(const QXmlInputSource* input) +{ + QScriptValue _q_function = __qtscript_self.property("parse"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("parse") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::parse() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(input)))); + } +} + +void* QtScriptShell_QXmlReader::property(const QString& name, bool* ok) const +{ + QScriptValue _q_function = __qtscript_self.property("property"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("property") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::property() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + +void QtScriptShell_QXmlReader::setContentHandler(QXmlContentHandler* handler) +{ + QScriptValue _q_function = __qtscript_self.property("setContentHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setContentHandler") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::setContentHandler() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, handler)); + } +} + +void QtScriptShell_QXmlReader::setDTDHandler(QXmlDTDHandler* handler) +{ + QScriptValue _q_function = __qtscript_self.property("setDTDHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setDTDHandler") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::setDTDHandler() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, handler)); + } +} + +void QtScriptShell_QXmlReader::setDeclHandler(QXmlDeclHandler* handler) +{ + QScriptValue _q_function = __qtscript_self.property("setDeclHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setDeclHandler") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::setDeclHandler() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, handler)); + } +} + +void QtScriptShell_QXmlReader::setEntityResolver(QXmlEntityResolver* handler) +{ + QScriptValue _q_function = __qtscript_self.property("setEntityResolver"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setEntityResolver") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::setEntityResolver() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, handler)); + } +} + +void QtScriptShell_QXmlReader::setErrorHandler(QXmlErrorHandler* handler) +{ + QScriptValue _q_function = __qtscript_self.property("setErrorHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setErrorHandler") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::setErrorHandler() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, handler)); + } +} + +void QtScriptShell_QXmlReader::setFeature(const QString& name, bool value) +{ + QScriptValue _q_function = __qtscript_self.property("setFeature"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setFeature") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::setFeature() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name) + << qScriptValueFromValue(_q_engine, value)); + } +} + +void QtScriptShell_QXmlReader::setLexicalHandler(QXmlLexicalHandler* handler) +{ + QScriptValue _q_function = __qtscript_self.property("setLexicalHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setLexicalHandler") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::setLexicalHandler() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, handler)); + } +} + +void QtScriptShell_QXmlReader::setProperty(const QString& name, void* value) +{ + QScriptValue _q_function = __qtscript_self.property("setProperty"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setProperty") & QScriptValue::QObjectMember)) { + qFatal("QXmlReader::setProperty() is abstract!"); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name) + << qScriptValueFromValue(_q_engine, value)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlReader.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlReader.h new file mode 100644 index 00000000..58361baf --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlReader.h @@ -0,0 +1,39 @@ +#ifndef QTSCRIPTSHELL_QXMLREADER_H +#define QTSCRIPTSHELL_QXMLREADER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QXmlReader : public QXmlReader +{ +public: + QtScriptShell_QXmlReader(); + ~QtScriptShell_QXmlReader(); + + QXmlDTDHandler* DTDHandler() const; + QXmlContentHandler* contentHandler() const; + QXmlDeclHandler* declHandler() const; + QXmlEntityResolver* entityResolver() const; + QXmlErrorHandler* errorHandler() const; + bool feature(const QString& name, bool* ok = 0) const; + bool hasFeature(const QString& name) const; + bool hasProperty(const QString& name) const; + QXmlLexicalHandler* lexicalHandler() const; + bool parse(const QXmlInputSource& input); + bool parse(const QXmlInputSource* input); + void* property(const QString& name, bool* ok = 0) const; + void setContentHandler(QXmlContentHandler* handler); + void setDTDHandler(QXmlDTDHandler* handler); + void setDeclHandler(QXmlDeclHandler* handler); + void setEntityResolver(QXmlEntityResolver* handler); + void setErrorHandler(QXmlErrorHandler* handler); + void setFeature(const QString& name, bool value); + void setLexicalHandler(QXmlLexicalHandler* handler); + void setProperty(const QString& name, void* value); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QXMLREADER_H diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlSimpleReader.cpp b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlSimpleReader.cpp new file mode 100644 index 00000000..5fe486e9 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlSimpleReader.cpp @@ -0,0 +1,312 @@ +#include "qtscriptshell_QXmlSimpleReader.h" + +#include +#include +#include + +#define QTSCRIPT_IS_GENERATED_FUNCTION(fun) ((fun.data().toUInt32() & 0xFFFF0000) == 0xBABE0000) + +Q_DECLARE_METATYPE(QXmlDTDHandler*) +Q_DECLARE_METATYPE(QXmlContentHandler*) +Q_DECLARE_METATYPE(QXmlDeclHandler*) +Q_DECLARE_METATYPE(QXmlEntityResolver*) +Q_DECLARE_METATYPE(QXmlErrorHandler*) +Q_DECLARE_METATYPE(QXmlLexicalHandler*) +Q_DECLARE_METATYPE(QXmlInputSource) +Q_DECLARE_METATYPE(const QXmlInputSource*) + +QtScriptShell_QXmlSimpleReader::QtScriptShell_QXmlSimpleReader() + : QXmlSimpleReader() {} + +QtScriptShell_QXmlSimpleReader::~QtScriptShell_QXmlSimpleReader() {} + +QXmlDTDHandler* QtScriptShell_QXmlSimpleReader::DTDHandler() const +{ + QScriptValue _q_function = __qtscript_self.property("DTDHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("DTDHandler") & QScriptValue::QObjectMember)) { + return QXmlSimpleReader::DTDHandler(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QXmlContentHandler* QtScriptShell_QXmlSimpleReader::contentHandler() const +{ + QScriptValue _q_function = __qtscript_self.property("contentHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("contentHandler") & QScriptValue::QObjectMember)) { + return QXmlSimpleReader::contentHandler(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QXmlDeclHandler* QtScriptShell_QXmlSimpleReader::declHandler() const +{ + QScriptValue _q_function = __qtscript_self.property("declHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("declHandler") & QScriptValue::QObjectMember)) { + return QXmlSimpleReader::declHandler(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QXmlEntityResolver* QtScriptShell_QXmlSimpleReader::entityResolver() const +{ + QScriptValue _q_function = __qtscript_self.property("entityResolver"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("entityResolver") & QScriptValue::QObjectMember)) { + return QXmlSimpleReader::entityResolver(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +QXmlErrorHandler* QtScriptShell_QXmlSimpleReader::errorHandler() const +{ + QScriptValue _q_function = __qtscript_self.property("errorHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("errorHandler") & QScriptValue::QObjectMember)) { + return QXmlSimpleReader::errorHandler(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlSimpleReader::feature(const QString& name, bool* ok) const +{ + QScriptValue _q_function = __qtscript_self.property("feature"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("feature") & QScriptValue::QObjectMember)) { + return QXmlSimpleReader::feature(name, ok); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + +bool QtScriptShell_QXmlSimpleReader::hasFeature(const QString& name) const +{ + QScriptValue _q_function = __qtscript_self.property("hasFeature"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasFeature") & QScriptValue::QObjectMember)) { + return QXmlSimpleReader::hasFeature(name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + +bool QtScriptShell_QXmlSimpleReader::hasProperty(const QString& name) const +{ + QScriptValue _q_function = __qtscript_self.property("hasProperty"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("hasProperty") & QScriptValue::QObjectMember)) { + return QXmlSimpleReader::hasProperty(name); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + +QXmlLexicalHandler* QtScriptShell_QXmlSimpleReader::lexicalHandler() const +{ + QScriptValue _q_function = __qtscript_self.property("lexicalHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("lexicalHandler") & QScriptValue::QObjectMember)) { + return QXmlSimpleReader::lexicalHandler(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +bool QtScriptShell_QXmlSimpleReader::parse(const QXmlInputSource& input) +{ + QScriptValue _q_function = __qtscript_self.property("parse"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("parse") & QScriptValue::QObjectMember)) { + return QXmlSimpleReader::parse(input); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, input))); + } +} + +bool QtScriptShell_QXmlSimpleReader::parse(const QXmlInputSource* input) +{ + QScriptValue _q_function = __qtscript_self.property("parse"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("parse") & QScriptValue::QObjectMember)) { + return QXmlSimpleReader::parse(input); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(input)))); + } +} + +bool QtScriptShell_QXmlSimpleReader::parse(const QXmlInputSource* input, bool incremental) +{ + QScriptValue _q_function = __qtscript_self.property("parse"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("parse") & QScriptValue::QObjectMember)) { + return QXmlSimpleReader::parse(input, incremental); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, const_cast(input)) + << qScriptValueFromValue(_q_engine, incremental))); + } +} + +bool QtScriptShell_QXmlSimpleReader::parseContinue() +{ + QScriptValue _q_function = __qtscript_self.property("parseContinue"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("parseContinue") & QScriptValue::QObjectMember)) { + return QXmlSimpleReader::parseContinue(); + } else { + return qscriptvalue_cast(_q_function.call(__qtscript_self)); + } +} + +void* QtScriptShell_QXmlSimpleReader::property(const QString& name, bool* ok) const +{ + QScriptValue _q_function = __qtscript_self.property("property"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("property") & QScriptValue::QObjectMember)) { + return QXmlSimpleReader::property(name, ok); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + return qscriptvalue_cast(_q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name))); + } +} + +void QtScriptShell_QXmlSimpleReader::setContentHandler(QXmlContentHandler* handler) +{ + QScriptValue _q_function = __qtscript_self.property("setContentHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setContentHandler") & QScriptValue::QObjectMember)) { + QXmlSimpleReader::setContentHandler(handler); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, handler)); + } +} + +void QtScriptShell_QXmlSimpleReader::setDTDHandler(QXmlDTDHandler* handler) +{ + QScriptValue _q_function = __qtscript_self.property("setDTDHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setDTDHandler") & QScriptValue::QObjectMember)) { + QXmlSimpleReader::setDTDHandler(handler); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, handler)); + } +} + +void QtScriptShell_QXmlSimpleReader::setDeclHandler(QXmlDeclHandler* handler) +{ + QScriptValue _q_function = __qtscript_self.property("setDeclHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setDeclHandler") & QScriptValue::QObjectMember)) { + QXmlSimpleReader::setDeclHandler(handler); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, handler)); + } +} + +void QtScriptShell_QXmlSimpleReader::setEntityResolver(QXmlEntityResolver* handler) +{ + QScriptValue _q_function = __qtscript_self.property("setEntityResolver"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setEntityResolver") & QScriptValue::QObjectMember)) { + QXmlSimpleReader::setEntityResolver(handler); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, handler)); + } +} + +void QtScriptShell_QXmlSimpleReader::setErrorHandler(QXmlErrorHandler* handler) +{ + QScriptValue _q_function = __qtscript_self.property("setErrorHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setErrorHandler") & QScriptValue::QObjectMember)) { + QXmlSimpleReader::setErrorHandler(handler); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, handler)); + } +} + +void QtScriptShell_QXmlSimpleReader::setFeature(const QString& name, bool value) +{ + QScriptValue _q_function = __qtscript_self.property("setFeature"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setFeature") & QScriptValue::QObjectMember)) { + QXmlSimpleReader::setFeature(name, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name) + << qScriptValueFromValue(_q_engine, value)); + } +} + +void QtScriptShell_QXmlSimpleReader::setLexicalHandler(QXmlLexicalHandler* handler) +{ + QScriptValue _q_function = __qtscript_self.property("setLexicalHandler"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setLexicalHandler") & QScriptValue::QObjectMember)) { + QXmlSimpleReader::setLexicalHandler(handler); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, handler)); + } +} + +void QtScriptShell_QXmlSimpleReader::setProperty(const QString& name, void* value) +{ + QScriptValue _q_function = __qtscript_self.property("setProperty"); + if (!_q_function.isFunction() || QTSCRIPT_IS_GENERATED_FUNCTION(_q_function) + || (__qtscript_self.propertyFlags("setProperty") & QScriptValue::QObjectMember)) { + QXmlSimpleReader::setProperty(name, value); + } else { + QScriptEngine *_q_engine = __qtscript_self.engine(); + _q_function.call(__qtscript_self, + QScriptValueList() + << qScriptValueFromValue(_q_engine, name) + << qScriptValueFromValue(_q_engine, value)); + } +} + diff --git a/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlSimpleReader.h b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlSimpleReader.h new file mode 100644 index 00000000..cf31e2e4 --- /dev/null +++ b/src/scriptbindings/generated_cpp/com_trolltech_qt_xml/qtscriptshell_QXmlSimpleReader.h @@ -0,0 +1,41 @@ +#ifndef QTSCRIPTSHELL_QXMLSIMPLEREADER_H +#define QTSCRIPTSHELL_QXMLSIMPLEREADER_H + +#include + +#include +#include <__package_shared.h> + +class QtScriptShell_QXmlSimpleReader : public QXmlSimpleReader +{ +public: + QtScriptShell_QXmlSimpleReader(); + ~QtScriptShell_QXmlSimpleReader(); + + QXmlDTDHandler* DTDHandler() const; + QXmlContentHandler* contentHandler() const; + QXmlDeclHandler* declHandler() const; + QXmlEntityResolver* entityResolver() const; + QXmlErrorHandler* errorHandler() const; + bool feature(const QString& name, bool* ok = 0) const; + bool hasFeature(const QString& name) const; + bool hasProperty(const QString& name) const; + QXmlLexicalHandler* lexicalHandler() const; + bool parse(const QXmlInputSource& input); + bool parse(const QXmlInputSource* input); + bool parse(const QXmlInputSource* input, bool incremental); + bool parseContinue(); + void* property(const QString& name, bool* ok = 0) const; + void setContentHandler(QXmlContentHandler* handler); + void setDTDHandler(QXmlDTDHandler* handler); + void setDeclHandler(QXmlDeclHandler* handler); + void setEntityResolver(QXmlEntityResolver* handler); + void setErrorHandler(QXmlErrorHandler* handler); + void setFeature(const QString& name, bool value); + void setLexicalHandler(QXmlLexicalHandler* handler); + void setProperty(const QString& name, void* value); + + QScriptValue __qtscript_self; +}; + +#endif // QTSCRIPTSHELL_QXMLSIMPLEREADER_H diff --git a/src/scriptbindings/qtbindings/qtbindings.pro b/src/scriptbindings/qtbindings/qtbindings.pro new file mode 100644 index 00000000..3ab87e77 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtbindings.pro @@ -0,0 +1,13 @@ +TEMPLATE = subdirs +SUBDIRS = qtscript_core \ + qtscript_gui \ + qtscript_widgets \ + qtscript_printsupport \ + qtscript_multimedia \ + qtscript_network \ + qtscript_opengl \ + qtscript_sql \ + qtscript_xml \ + qtscript_uitools \ + qtscript_custom + diff --git a/src/scriptbindings/qtbindings/qtbindingsbase.pri b/src/scriptbindings/qtbindings/qtbindingsbase.pri new file mode 100644 index 00000000..eefbcbd9 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtbindingsbase.pri @@ -0,0 +1,19 @@ +TEMPLATE = lib +DEPENDPATH += . +INCLUDEPATH += . + +CONFIG(debug, debug|release) { + DESTDIR = $$PWD/../plugins/script_debug +} else { + DESTDIR = $$PWD/../plugins/script +} + +win32:{ + QMAKE_CXXFLAGS += /MP /GS /Zi + QMAKE_LFLAGS += /DEBUG /OPT:REF /OPT:ICF +} + +QT += script +CONFIG += plugin release build_all +GENERATEDCPP = $$PWD/../generated_cpp +TARGET=$$qtLibraryTarget($$TARGET) diff --git a/src/scriptbindings/qtbindings/qtscript_core/include/__package_shared.h b/src/scriptbindings/qtbindings/qtscript_core/include/__package_shared.h new file mode 100644 index 00000000..5db4253f --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_core/include/__package_shared.h @@ -0,0 +1,40 @@ + +#pragma once + +#include + +#include +#include + + +#include + + +Q_DECLARE_METATYPE(QEvent) + +namespace QtMetaTypePrivate { + +template <> +inline void *QMetaTypeFunctionHelper::Construct(void *where, const void *t) +{ + if (t) + return new (where) QEvent(*static_cast(t)); + return new (where) QEvent(QEvent::None); +}; + + +} + +template <> +inline QEvent qscriptvalue_cast(const QScriptValue &value) +{ + QEvent t(QEvent::None); + const int id = qMetaTypeId(); + + if (qscriptvalue_cast_helper(value, id, &t)) + return t; + + return QEvent(QEvent::None); +} + + diff --git a/src/scriptbindings/qtbindings/qtscript_core/plugin.cpp b/src/scriptbindings/qtbindings/qtscript_core/plugin.cpp new file mode 100644 index 00000000..5507573d --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_core/plugin.cpp @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#include "plugin.h" + + +QStringList com_trolltech_qt_core_ScriptPlugin::keys() const +{ + QStringList list; + list << QLatin1String("qt"); + list << QLatin1String("qt.core"); + return list; +} + +void com_trolltech_qt_core_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine) +{ + if (key == QLatin1String("qt")) { + } else if (key == QLatin1String("qt.core")) { + QScriptValue extensionObject = engine->globalObject(); + qtscript_initialize_com_trolltech_qt_core_bindings(extensionObject); + } else { + Q_ASSERT_X(false, "com_trolltech_qt_core::initialize", qPrintable(key)); + } +} + diff --git a/src/scriptbindings/qtbindings/qtscript_core/plugin.h b/src/scriptbindings/qtbindings/qtscript_core/plugin.h new file mode 100644 index 00000000..538d13c9 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_core/plugin.h @@ -0,0 +1,17 @@ +#include +#include +#include +#include + + +void qtscript_initialize_com_trolltech_qt_core_bindings(QScriptValue &); + +class com_trolltech_qt_core_ScriptPlugin : public QScriptExtensionPlugin +{ +Q_OBJECT +Q_PLUGIN_METADATA(IID "com.trolltech.qt.core.scriptPlugin") +public: + QStringList keys() const; + void initialize(const QString &key, QScriptEngine *engine); +}; + diff --git a/src/scriptbindings/qtbindings/qtscript_core/qtscript_core.pro b/src/scriptbindings/qtbindings/qtscript_core/qtscript_core.pro new file mode 100644 index 00000000..b8a878a5 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_core/qtscript_core.pro @@ -0,0 +1,7 @@ +TARGET = qtscript_core +include(../qtbindingsbase.pri) +SOURCES += plugin.cpp +HEADERS += qtscriptconcurrent.h plugin.h +INCLUDEPATH += ./include/ +QT += concurrent widgets +include($$GENERATEDCPP/com_trolltech_qt_core/com_trolltech_qt_core.pri) diff --git a/src/scriptbindings/qtbindings/qtscript_core/qtscriptconcurrent.h b/src/scriptbindings/qtbindings/qtscript_core/qtscriptconcurrent.h new file mode 100644 index 00000000..0500294f --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_core/qtscriptconcurrent.h @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the Qt Script Generator project on Qt Labs. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTSCRIPTCONCURRENT_H +#define QTSCRIPTCONCURRENT_H + +#ifndef QT_NO_CONCURRENT + +#include +#include +#include +#include + +class QtScriptVoidFutureWatcher : public QFutureWatcher { + Q_OBJECT +}; +typedef QFuture QtScriptVoidFuture; +typedef QFutureSynchronizer QtScriptVoidFutureSynchronizer; +typedef QFuture QtScriptFuture; +class QtScriptFutureWatcher : public QFutureWatcher { + Q_OBJECT +}; +typedef QFutureSynchronizer QtScriptFutureSynchronizer; +typedef QFutureIterator QtScriptFutureIterator; + +#endif // QT_NO_CONCURRENT + +#endif + diff --git a/src/scriptbindings/qtbindings/qtscript_custom/include/__package_shared.h b/src/scriptbindings/qtbindings/qtscript_custom/include/__package_shared.h new file mode 100644 index 00000000..25f818e9 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_custom/include/__package_shared.h @@ -0,0 +1,3 @@ + +#pragma once + diff --git a/src/scriptbindings/qtbindings/qtscript_custom/plugin.cpp b/src/scriptbindings/qtbindings/qtscript_custom/plugin.cpp new file mode 100644 index 00000000..9e472044 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_custom/plugin.cpp @@ -0,0 +1,25 @@ +#include +#include +#include +#include "plugin.h" + + +QStringList com_trolltech_qt_custom_ScriptPlugin::keys() const +{ + QStringList list; + list << QLatin1String("qt"); + list << QLatin1String("qt.custom"); + return list; +} + +void com_trolltech_qt_custom_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine) +{ + if (key == QLatin1String("qt")) { + } else if (key == QLatin1String("qt.custom")) { + QScriptValue extensionObject = engine->globalObject(); + qtscript_initialize_com_trolltech_qt_custom_bindings(extensionObject); + } else { + Q_ASSERT_X(false, "com_trolltech_qt_custom::initialize", qPrintable(key)); + } +} + diff --git a/src/scriptbindings/qtbindings/qtscript_custom/plugin.h b/src/scriptbindings/qtbindings/qtscript_custom/plugin.h new file mode 100644 index 00000000..a36178ce --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_custom/plugin.h @@ -0,0 +1,17 @@ +#include +#include +#include +#include + + +void qtscript_initialize_com_trolltech_qt_custom_bindings(QScriptValue &); + +class com_trolltech_qt_custom_ScriptPlugin : public QScriptExtensionPlugin +{ +Q_OBJECT +Q_PLUGIN_METADATA(IID "com.trolltech.qt.custom.scriptPlugin") +public: + QStringList keys() const; + void initialize(const QString &key, QScriptEngine *engine); +}; + diff --git a/src/scriptbindings/qtbindings/qtscript_custom/qtscript_custom.pro b/src/scriptbindings/qtbindings/qtscript_custom/qtscript_custom.pro new file mode 100644 index 00000000..a1ae429b --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_custom/qtscript_custom.pro @@ -0,0 +1,8 @@ +TARGET = qtscript_custom +include(../qtbindingsbase.pri) +QT += widgets gui +SOURCES += plugin.cpp +HEADERS += plugin.h +INCLUDEPATH += ./include/ $$PWD/../../../designerplugins/customwidgetsplugin +LIBS += -L$$PWD/../../../designerplugins/customwidgetsplugin/release -lcustomwidgets +include($$GENERATEDCPP/com_trolltech_qt_custom/com_trolltech_qt_custom.pri) diff --git a/src/scriptbindings/qtbindings/qtscript_gui/include/__package_shared.h b/src/scriptbindings/qtbindings/qtscript_gui/include/__package_shared.h new file mode 100644 index 00000000..42e7b203 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_gui/include/__package_shared.h @@ -0,0 +1,84 @@ + +#pragma once + +#include +#include +#include + +#include +#include +#include +#include +#include + +Q_DECLARE_METATYPE(QFontInfo) +Q_DECLARE_METATYPE(QFontMetrics) +Q_DECLARE_METATYPE(QFontMetricsF) + + +namespace QtMetaTypePrivate { + +template <> +inline void *QMetaTypeFunctionHelper::Construct(void *where, const void *t) +{ + if (t) + return new (where) QFontInfo(*static_cast(t)); + return new (where) QFontInfo(QFont()); +} + +template <> +inline void *QMetaTypeFunctionHelper::Construct(void *where, const void *t) +{ + if (t) + return new (where) QFontMetrics(*static_cast(t)); + return new (where) QFontMetrics(QFont()); +} + +template <> +inline void *QMetaTypeFunctionHelper::Construct(void *where, const void *t) +{ + if (t) + return new (where) QFontMetricsF(*static_cast(t)); + return new (where) QFontMetricsF(QFont()); +} + +} + +template <> +inline QFontInfo qscriptvalue_cast(const QScriptValue &value) +{ + QFont f; + QFontInfo t(f); + const int id = qMetaTypeId(); + + if (qscriptvalue_cast_helper(value, id, (void*)&t)) + return t; + + return QFontInfo(QFont()); +} + +template <> +inline QFontMetrics qscriptvalue_cast(const QScriptValue &value) +{ + QFont f; + QFontMetrics t(f); + const int id = qMetaTypeId(); + + if (qscriptvalue_cast_helper(value, id, (void*)&t)) + return t; + + return QFontMetrics(QFont()); +} + +template <> +inline QFontMetricsF qscriptvalue_cast(const QScriptValue &value) +{ + QFont f; + QFontMetricsF t(f); + const int id = qMetaTypeId(); + + if (qscriptvalue_cast_helper(value, id, (void*)&t)) + return t; + + return QFontMetricsF(QFont()); +} diff --git a/src/scriptbindings/qtbindings/qtscript_gui/plugin.cpp b/src/scriptbindings/qtbindings/qtscript_gui/plugin.cpp new file mode 100644 index 00000000..e47a8fef --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_gui/plugin.cpp @@ -0,0 +1,24 @@ +#include +#include +#include +#include "plugin.h" + +QStringList com_trolltech_qt_gui_ScriptPlugin::keys() const +{ + QStringList list; + list << QLatin1String("qt"); + list << QLatin1String("qt.gui"); + return list; +} + +void com_trolltech_qt_gui_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine) +{ + if (key == QLatin1String("qt")) { + } else if (key == QLatin1String("qt.gui")) { + QScriptValue extensionObject = engine->globalObject(); + qtscript_initialize_com_trolltech_qt_gui_bindings(extensionObject); + } else { + Q_ASSERT_X(false, "com_trolltech_qt_gui::initialize", qPrintable(key)); + } +} + diff --git a/src/scriptbindings/qtbindings/qtscript_gui/plugin.h b/src/scriptbindings/qtbindings/qtscript_gui/plugin.h new file mode 100644 index 00000000..eeb7781f --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_gui/plugin.h @@ -0,0 +1,16 @@ +#include +#include +#include + +void qtscript_initialize_com_trolltech_qt_gui_bindings(QScriptValue &); + +class com_trolltech_qt_gui_ScriptPlugin : public QScriptExtensionPlugin +{ +Q_OBJECT +Q_PLUGIN_METADATA(IID "com_trolltech_qt_gui_ScriptPlugin") +public: + QStringList keys() const; + void initialize(const QString &key, QScriptEngine *engine); +}; + + diff --git a/src/scriptbindings/qtbindings/qtscript_gui/qtscript_gui.pro b/src/scriptbindings/qtbindings/qtscript_gui/qtscript_gui.pro new file mode 100644 index 00000000..3132fd0e --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_gui/qtscript_gui.pro @@ -0,0 +1,7 @@ +TARGET = qtscript_gui +include(../qtbindingsbase.pri) +SOURCES += plugin.cpp +HEADERS += plugin.h +QT += widgets +INCLUDEPATH += ./include/ +include($$GENERATEDCPP/com_trolltech_qt_gui/com_trolltech_qt_gui.pri) diff --git a/src/scriptbindings/qtbindings/qtscript_multimedia/include/__package_shared.h b/src/scriptbindings/qtbindings/qtscript_multimedia/include/__package_shared.h new file mode 100644 index 00000000..6f70f09b --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_multimedia/include/__package_shared.h @@ -0,0 +1 @@ +#pragma once diff --git a/src/scriptbindings/qtbindings/qtscript_multimedia/plugin.cpp b/src/scriptbindings/qtbindings/qtscript_multimedia/plugin.cpp new file mode 100644 index 00000000..75c5d434 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_multimedia/plugin.cpp @@ -0,0 +1,24 @@ +#include +#include +#include +#include "plugin.h" + +QStringList com_trolltech_qt_multimedia_ScriptPlugin::keys() const +{ + QStringList list; + list << QLatin1String("qt"); + list << QLatin1String("qt.multimedia"); + return list; +} + +void com_trolltech_qt_multimedia_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine) +{ + if (key == QLatin1String("qt")) { + } else if (key == QLatin1String("qt.multimedia")) { + QScriptValue extensionObject = engine->globalObject(); + qtscript_initialize_com_trolltech_qt_multimedia_bindings(extensionObject); + } else { + Q_ASSERT_X(false, "com_trolltech_qt_multimedia::initialize", qPrintable(key)); + } +} + diff --git a/src/scriptbindings/qtbindings/qtscript_multimedia/plugin.h b/src/scriptbindings/qtbindings/qtscript_multimedia/plugin.h new file mode 100644 index 00000000..9a6823ea --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_multimedia/plugin.h @@ -0,0 +1,16 @@ +#include +#include +#include + +void qtscript_initialize_com_trolltech_qt_multimedia_bindings(QScriptValue &); + +class com_trolltech_qt_multimedia_ScriptPlugin : public QScriptExtensionPlugin +{ +Q_OBJECT +Q_PLUGIN_METADATA(IID "com_trolltech_qt_multimedia_ScriptPlugin") +public: + QStringList keys() const; + void initialize(const QString &key, QScriptEngine *engine); +}; + + diff --git a/src/scriptbindings/qtbindings/qtscript_multimedia/qtscript_multimedia.pro b/src/scriptbindings/qtbindings/qtscript_multimedia/qtscript_multimedia.pro new file mode 100644 index 00000000..f84e7a97 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_multimedia/qtscript_multimedia.pro @@ -0,0 +1,7 @@ +TARGET = qtscript_multimedia +include(../qtbindingsbase.pri) +SOURCES += plugin.cpp +HEADERS += plugin.h +QT += core gui widgets multimedia +INCLUDEPATH += ./include/ +include($$GENERATEDCPP/com_trolltech_qt_multimedia/com_trolltech_qt_multimedia.pri) diff --git a/src/scriptbindings/qtbindings/qtscript_network/include/__package_shared.h b/src/scriptbindings/qtbindings/qtscript_network/include/__package_shared.h new file mode 100644 index 00000000..98dc0318 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_network/include/__package_shared.h @@ -0,0 +1,20 @@ + +#pragma once + +#include + +#ifdef QT_NO_SSL +class QSslError : public QObject { + Q_OBJECT +public: + QSslError(): QObject() {} + QSslError(const QSslError &) : QObject() {} +}; +class QSslConfiguration : public QObject { + Q_OBJECT +public: + QSslConfiguration() : QObject() {} + QSslConfiguration(const QSslConfiguration &) : QObject() {} +}; +#endif + diff --git a/src/scriptbindings/qtbindings/qtscript_network/plugin.cpp b/src/scriptbindings/qtbindings/qtscript_network/plugin.cpp new file mode 100644 index 00000000..6f42149d --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_network/plugin.cpp @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#include "plugin.h" + + +QStringList com_trolltech_qt_network_ScriptPlugin::keys() const +{ + QStringList list; + list << QLatin1String("qt"); + list << QLatin1String("qt.network"); + return list; +} + +void com_trolltech_qt_network_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine) +{ + if (key == QLatin1String("qt")) { + } else if (key == QLatin1String("qt.network")) { + QScriptValue extensionObject = engine->globalObject(); + qtscript_initialize_com_trolltech_qt_network_bindings(extensionObject); + } else { + Q_ASSERT_X(false, "com_trolltech_qt_network::initialize", qPrintable(key)); + } +} + diff --git a/src/scriptbindings/qtbindings/qtscript_network/plugin.h b/src/scriptbindings/qtbindings/qtscript_network/plugin.h new file mode 100644 index 00000000..3ca1a290 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_network/plugin.h @@ -0,0 +1,17 @@ +#include +#include +#include +#include + + +void qtscript_initialize_com_trolltech_qt_network_bindings(QScriptValue &); + +class com_trolltech_qt_network_ScriptPlugin : public QScriptExtensionPlugin +{ +Q_OBJECT +Q_PLUGIN_METADATA(IID "com.trolltech.qt.network.scriptPlugin") +public: + QStringList keys() const; + void initialize(const QString &key, QScriptEngine *engine); +}; + diff --git a/src/scriptbindings/qtbindings/qtscript_network/qtscript_network.pro b/src/scriptbindings/qtbindings/qtscript_network/qtscript_network.pro new file mode 100644 index 00000000..dfe99df9 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_network/qtscript_network.pro @@ -0,0 +1,8 @@ +TARGET = qtscript_network +include(../qtbindingsbase.pri) +QT -= gui +QT += network +SOURCES += plugin.cpp +HEADERS += plugin.h include/__package_shared.h +INCLUDEPATH += ./include/ +include($$GENERATEDCPP/com_trolltech_qt_network/com_trolltech_qt_network.pri) diff --git a/src/scriptbindings/qtbindings/qtscript_opengl/include/__package_shared.h b/src/scriptbindings/qtbindings/qtscript_opengl/include/__package_shared.h new file mode 100644 index 00000000..e118c0ea --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_opengl/include/__package_shared.h @@ -0,0 +1,5 @@ + +#pragma once + +#include + diff --git a/src/scriptbindings/qtbindings/qtscript_opengl/plugin.cpp b/src/scriptbindings/qtbindings/qtscript_opengl/plugin.cpp new file mode 100644 index 00000000..b6646306 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_opengl/plugin.cpp @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#include "plugin.h" + + +QStringList com_trolltech_qt_opengl_ScriptPlugin::keys() const +{ + QStringList list; + list << QLatin1String("qt"); + list << QLatin1String("qt.opengl"); + return list; +} + +void com_trolltech_qt_opengl_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine) +{ + if (key == QLatin1String("qt")) { + } else if (key == QLatin1String("qt.opengl")) { + QScriptValue extensionObject = engine->globalObject(); + qtscript_initialize_com_trolltech_qt_opengl_bindings(extensionObject); + } else { + Q_ASSERT_X(false, "com_trolltech_qt_opengl::initialize", qPrintable(key)); + } +} + diff --git a/src/scriptbindings/qtbindings/qtscript_opengl/plugin.h b/src/scriptbindings/qtbindings/qtscript_opengl/plugin.h new file mode 100644 index 00000000..dba1b135 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_opengl/plugin.h @@ -0,0 +1,17 @@ +#include +#include +#include +#include + + +void qtscript_initialize_com_trolltech_qt_opengl_bindings(QScriptValue &); + +class com_trolltech_qt_opengl_ScriptPlugin : public QScriptExtensionPlugin +{ +Q_OBJECT +Q_PLUGIN_METADATA(IID "com.trolltech.qt.opengl.scriptPlugin") +public: + QStringList keys() const; + void initialize(const QString &key, QScriptEngine *engine); +}; + diff --git a/src/scriptbindings/qtbindings/qtscript_opengl/qtscript_opengl.pro b/src/scriptbindings/qtbindings/qtscript_opengl/qtscript_opengl.pro new file mode 100644 index 00000000..3c7d6270 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_opengl/qtscript_opengl.pro @@ -0,0 +1,7 @@ +TARGET = qtscript_opengl +include(../qtbindingsbase.pri) +QT += opengl +SOURCES += plugin.cpp +HEADERS += plugin.h +INCLUDEPATH += ./include/ +include($$GENERATEDCPP/com_trolltech_qt_opengl/com_trolltech_qt_opengl.pri) diff --git a/src/scriptbindings/qtbindings/qtscript_printsupport/include/__package_shared.h b/src/scriptbindings/qtbindings/qtscript_printsupport/include/__package_shared.h new file mode 100644 index 00000000..5f8e223a --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_printsupport/include/__package_shared.h @@ -0,0 +1,4 @@ +#pragma once + +#include +#include diff --git a/src/scriptbindings/qtbindings/qtscript_printsupport/plugin.cpp b/src/scriptbindings/qtbindings/qtscript_printsupport/plugin.cpp new file mode 100644 index 00000000..aa0e1c8d --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_printsupport/plugin.cpp @@ -0,0 +1,24 @@ +#include +#include +#include +#include "plugin.h" + +QStringList com_trolltech_qt_printsupport_ScriptPlugin::keys() const +{ + QStringList list; + list << QLatin1String("qt"); + list << QLatin1String("qt.printsupport"); + return list; +} + +void com_trolltech_qt_printsupport_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine) +{ + if (key == QLatin1String("qt")) { + } else if (key == QLatin1String("qt.printsupport")) { + QScriptValue extensionObject = engine->globalObject(); + qtscript_initialize_com_trolltech_qt_printsupport_bindings(extensionObject); + } else { + Q_ASSERT_X(false, "com_trolltech_qt_printsupport::initialize", qPrintable(key)); + } +} + diff --git a/src/scriptbindings/qtbindings/qtscript_printsupport/plugin.h b/src/scriptbindings/qtbindings/qtscript_printsupport/plugin.h new file mode 100644 index 00000000..00273738 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_printsupport/plugin.h @@ -0,0 +1,16 @@ +#include +#include +#include + +void qtscript_initialize_com_trolltech_qt_printsupport_bindings(QScriptValue &); + +class com_trolltech_qt_printsupport_ScriptPlugin : public QScriptExtensionPlugin +{ +Q_OBJECT +Q_PLUGIN_METADATA(IID "com_trolltech_qt_printsupport_ScriptPlugin") +public: + QStringList keys() const; + void initialize(const QString &key, QScriptEngine *engine); +}; + + diff --git a/src/scriptbindings/qtbindings/qtscript_printsupport/qtscript_printsupport.pro b/src/scriptbindings/qtbindings/qtscript_printsupport/qtscript_printsupport.pro new file mode 100644 index 00000000..e74d858d --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_printsupport/qtscript_printsupport.pro @@ -0,0 +1,7 @@ +TARGET = qtscript_printsupport +include(../qtbindingsbase.pri) +SOURCES += plugin.cpp +HEADERS += plugin.h +QT += core gui widgets printsupport +INCLUDEPATH += ./include/ +include($$GENERATEDCPP/com_trolltech_qt_printsupport/com_trolltech_qt_printsupport.pri) diff --git a/src/scriptbindings/qtbindings/qtscript_sql/include/__package_shared.h b/src/scriptbindings/qtbindings/qtscript_sql/include/__package_shared.h new file mode 100644 index 00000000..25f818e9 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_sql/include/__package_shared.h @@ -0,0 +1,3 @@ + +#pragma once + diff --git a/src/scriptbindings/qtbindings/qtscript_sql/plugin.cpp b/src/scriptbindings/qtbindings/qtscript_sql/plugin.cpp new file mode 100644 index 00000000..46296810 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_sql/plugin.cpp @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#include "plugin.h" + + +QStringList com_trolltech_qt_sql_ScriptPlugin::keys() const +{ + QStringList list; + list << QLatin1String("qt"); + list << QLatin1String("qt.sql"); + return list; +} + +void com_trolltech_qt_sql_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine) +{ + if (key == QLatin1String("qt")) { + } else if (key == QLatin1String("qt.sql")) { + QScriptValue extensionObject = engine->globalObject(); + qtscript_initialize_com_trolltech_qt_sql_bindings(extensionObject); + } else { + Q_ASSERT_X(false, "com_trolltech_qt_sql::initialize", qPrintable(key)); + } +} + diff --git a/src/scriptbindings/qtbindings/qtscript_sql/plugin.h b/src/scriptbindings/qtbindings/qtscript_sql/plugin.h new file mode 100644 index 00000000..40e65d4a --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_sql/plugin.h @@ -0,0 +1,17 @@ +#include +#include +#include +#include + + +void qtscript_initialize_com_trolltech_qt_sql_bindings(QScriptValue &); + +class com_trolltech_qt_sql_ScriptPlugin : public QScriptExtensionPlugin +{ +Q_OBJECT +Q_PLUGIN_METADATA(IID "com.trolltech.qt.sql.scriptPlugin") +public: + QStringList keys() const; + void initialize(const QString &key, QScriptEngine *engine); +}; + diff --git a/src/scriptbindings/qtbindings/qtscript_sql/qtscript_sql.pro b/src/scriptbindings/qtbindings/qtscript_sql/qtscript_sql.pro new file mode 100644 index 00000000..1345504f --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_sql/qtscript_sql.pro @@ -0,0 +1,8 @@ +TARGET = qtscript_sql +include(../qtbindingsbase.pri) +QT -= gui +QT += sql +SOURCES += plugin.cpp +HEADERS += plugin.h +INCLUDEPATH += ./include/ +include($$GENERATEDCPP/com_trolltech_qt_sql/com_trolltech_qt_sql.pri) diff --git a/src/scriptbindings/qtbindings/qtscript_uitools/include/__package_shared.h b/src/scriptbindings/qtbindings/qtscript_uitools/include/__package_shared.h new file mode 100644 index 00000000..25f818e9 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_uitools/include/__package_shared.h @@ -0,0 +1,3 @@ + +#pragma once + diff --git a/src/scriptbindings/qtbindings/qtscript_uitools/plugin.cpp b/src/scriptbindings/qtbindings/qtscript_uitools/plugin.cpp new file mode 100644 index 00000000..abafb82a --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_uitools/plugin.cpp @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#include "plugin.h" + + +QStringList com_trolltech_qt_uitools_ScriptPlugin::keys() const +{ + QStringList list; + list << QLatin1String("qt"); + list << QLatin1String("qt.uitools"); + return list; +} + +void com_trolltech_qt_uitools_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine) +{ + if (key == QLatin1String("qt")) { + } else if (key == QLatin1String("qt.uitools")) { + QScriptValue extensionObject = engine->globalObject(); + qtscript_initialize_com_trolltech_qt_uitools_bindings(extensionObject); + } else { + Q_ASSERT_X(false, "com_trolltech_qt_uitools::initialize", qPrintable(key)); + } +} + diff --git a/src/scriptbindings/qtbindings/qtscript_uitools/plugin.h b/src/scriptbindings/qtbindings/qtscript_uitools/plugin.h new file mode 100644 index 00000000..2fde0e0c --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_uitools/plugin.h @@ -0,0 +1,17 @@ +#include +#include +#include +#include + + +void qtscript_initialize_com_trolltech_qt_uitools_bindings(QScriptValue &); + +class com_trolltech_qt_uitools_ScriptPlugin : public QScriptExtensionPlugin +{ +Q_OBJECT +Q_PLUGIN_METADATA(IID "com.trolltech.qt.uitools.scriptPlugin") +public: + QStringList keys() const; + void initialize(const QString &key, QScriptEngine *engine); +}; + diff --git a/src/scriptbindings/qtbindings/qtscript_uitools/qtscript_uitools.pro b/src/scriptbindings/qtbindings/qtscript_uitools/qtscript_uitools.pro new file mode 100644 index 00000000..3594cc77 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_uitools/qtscript_uitools.pro @@ -0,0 +1,7 @@ +TARGET = qtscript_uitools +include(../qtbindingsbase.pri) +QT += uitools widgets +SOURCES += plugin.cpp +HEADERS += plugin.h +INCLUDEPATH += ./include/ +include($$GENERATEDCPP/com_trolltech_qt_uitools/com_trolltech_qt_uitools.pri) diff --git a/src/scriptbindings/qtbindings/qtscript_widgets/include/__package_shared.h b/src/scriptbindings/qtbindings/qtscript_widgets/include/__package_shared.h new file mode 100644 index 00000000..5f8e223a --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_widgets/include/__package_shared.h @@ -0,0 +1,4 @@ +#pragma once + +#include +#include diff --git a/src/scriptbindings/qtbindings/qtscript_widgets/plugin.cpp b/src/scriptbindings/qtbindings/qtscript_widgets/plugin.cpp new file mode 100644 index 00000000..7514702a --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_widgets/plugin.cpp @@ -0,0 +1,24 @@ +#include +#include +#include +#include "plugin.h" + +QStringList com_trolltech_qt_widgets_ScriptPlugin::keys() const +{ + QStringList list; + list << QLatin1String("qt"); + list << QLatin1String("qt.widgets"); + return list; +} + +void com_trolltech_qt_widgets_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine) +{ + if (key == QLatin1String("qt")) { + } else if (key == QLatin1String("qt.widgets")) { + QScriptValue extensionObject = engine->globalObject(); + qtscript_initialize_com_trolltech_qt_widgets_bindings(extensionObject); + } else { + Q_ASSERT_X(false, "com_trolltech_qt_widgets::initialize", qPrintable(key)); + } +} + diff --git a/src/scriptbindings/qtbindings/qtscript_widgets/plugin.h b/src/scriptbindings/qtbindings/qtscript_widgets/plugin.h new file mode 100644 index 00000000..a753ff59 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_widgets/plugin.h @@ -0,0 +1,16 @@ +#include +#include +#include + +void qtscript_initialize_com_trolltech_qt_widgets_bindings(QScriptValue &); + +class com_trolltech_qt_widgets_ScriptPlugin : public QScriptExtensionPlugin +{ +Q_OBJECT +Q_PLUGIN_METADATA(IID "com_trolltech_qt_widgets_ScriptPlugin") +public: + QStringList keys() const; + void initialize(const QString &key, QScriptEngine *engine); +}; + + diff --git a/src/scriptbindings/qtbindings/qtscript_widgets/qtscript_widgets.pro b/src/scriptbindings/qtbindings/qtscript_widgets/qtscript_widgets.pro new file mode 100644 index 00000000..195b0d06 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_widgets/qtscript_widgets.pro @@ -0,0 +1,7 @@ +TARGET = qtscript_widgets +include(../qtbindingsbase.pri) +SOURCES += plugin.cpp +HEADERS += plugin.h +QT += widgets gui +INCLUDEPATH += ./include/ +include($$GENERATEDCPP/com_trolltech_qt_widgets/com_trolltech_qt_widgets.pri) diff --git a/src/scriptbindings/qtbindings/qtscript_xml/include/__package_shared.h b/src/scriptbindings/qtbindings/qtscript_xml/include/__package_shared.h new file mode 100644 index 00000000..25f818e9 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_xml/include/__package_shared.h @@ -0,0 +1,3 @@ + +#pragma once + diff --git a/src/scriptbindings/qtbindings/qtscript_xml/plugin.cpp b/src/scriptbindings/qtbindings/qtscript_xml/plugin.cpp new file mode 100644 index 00000000..30c0db70 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_xml/plugin.cpp @@ -0,0 +1,26 @@ +#include +#include +#include +#include +#include "plugin.h" + + +QStringList com_trolltech_qt_xml_ScriptPlugin::keys() const +{ + QStringList list; + list << QLatin1String("qt"); + list << QLatin1String("qt.xml"); + return list; +} + +void com_trolltech_qt_xml_ScriptPlugin::initialize(const QString &key, QScriptEngine *engine) +{ + if (key == QLatin1String("qt")) { + } else if (key == QLatin1String("qt.xml")) { + QScriptValue extensionObject = engine->globalObject(); + qtscript_initialize_com_trolltech_qt_xml_bindings(extensionObject); + } else { + Q_ASSERT_X(false, "com_trolltech_qt_xml::initialize", qPrintable(key)); + } +} + diff --git a/src/scriptbindings/qtbindings/qtscript_xml/plugin.h b/src/scriptbindings/qtbindings/qtscript_xml/plugin.h new file mode 100644 index 00000000..5891c45d --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_xml/plugin.h @@ -0,0 +1,17 @@ +#include +#include +#include +#include + + +void qtscript_initialize_com_trolltech_qt_xml_bindings(QScriptValue &); + +class com_trolltech_qt_xml_ScriptPlugin : public QScriptExtensionPlugin +{ +Q_OBJECT +Q_PLUGIN_METADATA(IID "com.trolltech.qt.xml.scriptPlugin") +public: + QStringList keys() const; + void initialize(const QString &key, QScriptEngine *engine); +}; + diff --git a/src/scriptbindings/qtbindings/qtscript_xml/qtscript_xml.pro b/src/scriptbindings/qtbindings/qtscript_xml/qtscript_xml.pro new file mode 100644 index 00000000..82f25906 --- /dev/null +++ b/src/scriptbindings/qtbindings/qtscript_xml/qtscript_xml.pro @@ -0,0 +1,8 @@ +TARGET = qtscript_xml +include(../qtbindingsbase.pri) +QT -= gui +QT += xml +SOURCES += plugin.cpp +HEADERS += plugin.h +INCLUDEPATH += ./include/ +include($$GENERATEDCPP/com_trolltech_qt_xml/com_trolltech_qt_xml.pri) diff --git a/src/scriptbindings/scriptbindings.pro b/src/scriptbindings/scriptbindings.pro new file mode 100644 index 00000000..a56ea3c7 --- /dev/null +++ b/src/scriptbindings/scriptbindings.pro @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +SUBDIRS = qtbindings \ No newline at end of file From 83f9ed6065d3d2a5bab6989366fa3fcb703f99bb Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 9 Jan 2021 22:24:27 +0500 Subject: [PATCH 43/80] Removed unused widget classes --- src/candle/candle.pro | 6 -- src/candle/frmmain.cpp | 4 +- src/candle/frmmain.ui | 14 +-- src/candle/frmsettings.cpp | 2 +- src/candle/frmsettings.h | 5 +- src/candle/frmsettings.ui | 34 +++---- src/candle/widgets/groupbox.cpp | 45 ---------- src/candle/widgets/groupbox.h | 32 ------- src/candle/widgets/scrollarea.cpp | 135 ---------------------------- src/candle/widgets/scrollarea.h | 49 ---------- src/candle/widgets/widget.cpp | 17 ---- src/candle/widgets/widget.h | 24 ----- src/candleplugins/candleplugins.pro | 1 - 13 files changed, 20 insertions(+), 348 deletions(-) delete mode 100644 src/candle/widgets/groupbox.cpp delete mode 100644 src/candle/widgets/groupbox.h delete mode 100644 src/candle/widgets/scrollarea.cpp delete mode 100644 src/candle/widgets/scrollarea.h delete mode 100644 src/candle/widgets/widget.cpp delete mode 100644 src/candle/widgets/widget.h diff --git a/src/candle/candle.pro b/src/candle/candle.pro index 0386fc6f..8892dc8d 100644 --- a/src/candle/candle.pro +++ b/src/candle/candle.pro @@ -56,9 +56,6 @@ SOURCES += main.cpp\ tables/heightmaptablemodel.cpp \ widgets/combobox.cpp \ widgets/comboboxkey.cpp \ - widgets/groupbox.cpp \ - widgets/scrollarea.cpp \ - widgets/widget.cpp \ widgets/glwidget.cpp \ drawers/selectiondrawer.cpp \ scriptvars.cpp \ @@ -87,9 +84,6 @@ HEADERS += frmmain.h \ utils/util.h \ widgets/combobox.h \ widgets/comboboxkey.h \ - widgets/groupbox.h \ - widgets/scrollarea.h \ - widgets/widget.h \ widgets/glwidget.h \ drawers/selectiondrawer.h \ scriptvars.h \ diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index 521c3a85..3d8fb5a8 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -3035,7 +3035,7 @@ void frmMain::loadPlugins() QWidget *w = qobject_cast(sv.toQObject()); if (w) { // Create panel - GroupBox *box = new GroupBox(this); + QGroupBox *box = new QGroupBox(this); QVBoxLayout *layout1 = new QVBoxLayout(box); QWidget *bw = new QWidget(box); QVBoxLayout *layout2 = new QVBoxLayout(bw); @@ -3096,7 +3096,7 @@ void frmMain::loadPlugins() QWidget *w = qobject_cast(sv.toQObject()); if (w) { // Create groupbox - GroupBox *box = new GroupBox(m_settings); + QGroupBox *box = new QGroupBox(m_settings); QVBoxLayout *layout1 = new QVBoxLayout(box); box->setObjectName("grpSettings" + name); box->setTitle(tr(title.toLatin1())); diff --git a/src/candle/frmmain.ui b/src/candle/frmmain.ui index 7e8e961e..96a452ab 100644 --- a/src/candle/frmmain.ui +++ b/src/candle/frmmain.ui @@ -481,7 +481,7 @@ QLabel[overrided="false"] { 0 - + true @@ -545,7 +545,7 @@ QLabel[overrided="false"] { - + Heightmap @@ -1754,7 +1754,7 @@ QLabel[overrided="false"] { - + true @@ -1829,7 +1829,7 @@ QLabel[overrided="false"] { - + Jog @@ -2997,12 +2997,6 @@ padding-right: 8; - - GroupBox - QGroupBox -
widgets/groupbox.h
- 1 -
StyledToolButton QToolButton diff --git a/src/candle/frmsettings.cpp b/src/candle/frmsettings.cpp index 3ca71451..86c0d4be 100644 --- a/src/candle/frmsettings.cpp +++ b/src/candle/frmsettings.cpp @@ -145,7 +145,7 @@ void frmSettings::undo() o->setPlainText(m_storedPlainTexts.takeFirst()); } -void frmSettings::addCustomSettings(GroupBox *box) +void frmSettings::addCustomSettings(QGroupBox *box) { static_cast(ui->scrollAreaWidgetContents->layout())->addWidget(box); diff --git a/src/candle/frmsettings.h b/src/candle/frmsettings.h index 5254fb8f..764d9a73 100644 --- a/src/candle/frmsettings.h +++ b/src/candle/frmsettings.h @@ -8,14 +8,13 @@ #include #include #include +#include #include "colorpicker.h" namespace Ui { class frmSettings; } -class GroupBox; - class frmSettings : public QDialog { Q_OBJECT @@ -63,7 +62,7 @@ class frmSettings : public QDialog int exec(); void undo(); - void addCustomSettings(GroupBox *box); + void addCustomSettings(QGroupBox *box); QString port(); void setPort(QString port); diff --git a/src/candle/frmsettings.ui b/src/candle/frmsettings.ui index fa092539..aec0e9a7 100644 --- a/src/candle/frmsettings.ui +++ b/src/candle/frmsettings.ui @@ -80,7 +80,7 @@ QSplitter::handle:horizontal { true - + 0 @@ -91,7 +91,7 @@ QSplitter::handle:horizontal { - + Connection @@ -233,7 +233,7 @@ QSplitter::handle:horizontal { - + Machine information @@ -362,7 +362,7 @@ QSplitter::handle:horizontal { - + Parser @@ -470,7 +470,7 @@ QSplitter::handle:horizontal { - + Sender @@ -493,7 +493,7 @@ QSplitter::handle:horizontal { - + Visualizer @@ -715,7 +715,7 @@ QSplitter::handle:horizontal { - + Colors @@ -851,7 +851,7 @@ QSplitter::handle:horizontal { - + Tool model @@ -993,7 +993,7 @@ QSplitter::handle:horizontal { - + Shortcuts @@ -1021,7 +1021,7 @@ QSplitter::handle:horizontal { - + Console @@ -1051,7 +1051,7 @@ QSplitter::handle:horizontal { - + Font @@ -1211,18 +1211,6 @@ QSplitter::handle:horizontal { - - GroupBox - QGroupBox -
widgets/groupbox.h
- 1 -
- - Widget - QWidget -
widgets/widget.h
- 1 -
ColorPicker QWidget diff --git a/src/candle/widgets/groupbox.cpp b/src/candle/widgets/groupbox.cpp deleted file mode 100644 index 8524c438..00000000 --- a/src/candle/widgets/groupbox.cpp +++ /dev/null @@ -1,45 +0,0 @@ -// This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich - -#include -#include -#include -#include "groupbox.h" - -GroupBox::GroupBox(QWidget *parent) : QGroupBox(parent) -{ - -} - -void GroupBox::mouseMoveEvent(QMouseEvent *event) -{ - QGroupBox::mouseMoveEvent(event); - - if (!m_pressedPos.isNull()) { - QPoint delta = event->globalPos() - m_pressedPos; - emit mouseMoved(delta.x(), delta.y()); - } -} - -void GroupBox::mousePressEvent(QMouseEvent *event) -{ - QGroupBox::mousePressEvent(event); - - m_pressedPos = event->globalPos(); - emit mousePressed(); -} - -void GroupBox::mouseReleaseEvent(QMouseEvent *event) -{ - QGroupBox::mouseReleaseEvent(event); - - m_pressedPos = QPoint(); - emit mouseReleased(); -} - -void GroupBox::resizeEvent(QResizeEvent *event) -{ - QGroupBox::resizeEvent(event); - emit resized(event->size()); -} - diff --git a/src/candle/widgets/groupbox.h b/src/candle/widgets/groupbox.h deleted file mode 100644 index 49ccd5d4..00000000 --- a/src/candle/widgets/groupbox.h +++ /dev/null @@ -1,32 +0,0 @@ -// This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich - -#ifndef GROUPBOX_H -#define GROUPBOX_H - -#include -#include - -class GroupBox : public QGroupBox -{ - Q_OBJECT -public: - explicit GroupBox(QWidget *parent = 0); - -signals: - void mouseMoved(int dx, int dy); - void mousePressed(); - void mouseReleased(); - void resized(QSize size); - -protected: - void mouseMoveEvent(QMouseEvent *event); - void mousePressEvent(QMouseEvent *event); - void mouseReleaseEvent(QMouseEvent *event); - void resizeEvent(QResizeEvent *event); - -private: - QPoint m_pressedPos; -}; - -#endif // GROUPBOX_H diff --git a/src/candle/widgets/scrollarea.cpp b/src/candle/widgets/scrollarea.cpp deleted file mode 100644 index df7d95f2..00000000 --- a/src/candle/widgets/scrollarea.cpp +++ /dev/null @@ -1,135 +0,0 @@ -// This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich - -#include -#include -#include -#include -#include -#include -#include "scrollarea.h" - -ScrollArea::ScrollArea(QWidget *parent) : QScrollArea(parent) -{ - m_update = false; - m_width = 0; - - this->setStyleSheet("QScrollArea {border-top: 2px solid transparent; border-bottom: 2px solid transparent;}\ - QScrollArea[topBorder=\"true\"] {border-top: 2px solid qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:1 #D5DFE5, stop:0 white);}\ - QScrollArea[bottomBorder=\"true\"] {border-bottom: 2px solid qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:1 #D5DFE5, stop:0 white);}"); - - this->verticalScrollBar()->setStyleSheet("QScrollBar:vertical {border: none; width: 2px; padding-top: 8px;}\ - QScrollBar::handle:vertical {background: darkgray;}\ - QScrollBar::add-line:vertical {border: none; background: none; height: 0px;}\ - QScrollBar::sub-line:vertical {border: none; background: none; height: 0px;}"); - - connect(this->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(onVerticalScrollBarValueChanged(int))); -} - -QSize ScrollArea::sizeHint() const -{ - QSize hint = widget()->sizeHint(); - hint.setHeight(hint.height() + 4); // top + bottom border width - hint.setWidth(m_width); - - return hint; -} - -void ScrollArea::setWidget(QWidget *widget) -{ - connect(static_cast(widget), SIGNAL(sizeChanged(QSize)), this, SLOT(onContentSizeChanged(QSize))); - QScrollArea::setWidget(widget); -} - -void ScrollArea::updateMinimumWidth() -{ - m_width = 0; - QList list = this->widget()->findChildren(); - foreach (GroupBox *box, list) { - connect(box, SIGNAL(mouseMoved(int,int)), this, SLOT(onScroll(int,int))); - connect(box, SIGNAL(mousePressed()), this, SLOT(onPressed())); - m_width = qMax(m_width, box->sizeHint().width() - + static_cast(box->parent())->layout()->contentsMargins().left() - + static_cast(box->parent())->layout()->contentsMargins().right()); // 1 * margin - } - onContentSizeChanged(QSize()); -} - -void ScrollArea::resizeEvent(QResizeEvent *re) -{ - QScrollArea::resizeEvent(re); - - updateBorders(); -} - -void ScrollArea::mouseMoveEvent(QMouseEvent *me) -{ - QScrollArea::mouseMoveEvent(me); - - if (!m_pressedPos.isNull()) { - QPoint delta = me->globalPos() - m_pressedPos; - onScroll(delta.x(), delta.y()); - } -} - -void ScrollArea::mousePressEvent(QMouseEvent *me) -{ - QScrollArea::mousePressEvent(me); - - m_pressedPos = me->globalPos(); - m_pressedValue = this->verticalScrollBar()->value(); -} - -void ScrollArea::mouseReleaseEvent(QMouseEvent *me) -{ - QScrollArea::mouseReleaseEvent(me); - - m_pressedPos = QPoint(); -} - -void ScrollArea::onContentSizeChanged(QSize newSize) -{ - Q_UNUSED(newSize) - - this->widget()->setMinimumWidth(m_width); - this->updateGeometry(); -} - -void ScrollArea::onVerticalScrollBarValueChanged(int newValue) -{ - Q_UNUSED(newValue) - - updateBorders(); -} - -void ScrollArea::onScroll(int dx, int dy) -{ - Q_UNUSED(dx) - - QScrollBar *bar = this->verticalScrollBar(); - int delta = (double)dy / (this->sizeHint().height() - this->height()) * (bar->maximum() - bar->minimum()); - - bar->setValue(m_pressedValue - delta); -} - -void ScrollArea::onPressed() -{ - m_pressedValue = this->verticalScrollBar()->value(); -} - -void ScrollArea::updateBorders() -{ -// Performance issue on changing stylesheet -#ifdef GLES - return; -#else - QScrollBar* bar = this->verticalScrollBar(); - bool fitted = this->geometry().height() > this->widget()->sizeHint().height(); - - this->setProperty("topBorder", bar->value() > bar->minimum() && !fitted); - this->setProperty("bottomBorder", bar->value() < bar->maximum() && !fitted); - - style()->unpolish(this); - this->ensurePolished(); -#endif -} diff --git a/src/candle/widgets/scrollarea.h b/src/candle/widgets/scrollarea.h deleted file mode 100644 index 25f1bdc3..00000000 --- a/src/candle/widgets/scrollarea.h +++ /dev/null @@ -1,49 +0,0 @@ -// This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich - -#ifndef SCROLLAREA_H -#define SCROLLAREA_H - -#include -#include -#include "widget.h" -#include "groupbox.h" - -class ScrollArea : public QScrollArea -{ - Q_OBJECT - -public: - explicit ScrollArea(QWidget *parent = 0); - - QSize sizeHint() const; - void setWidget(QWidget *widget); - void updateMinimumWidth(); - -public slots: - -signals: - void sizeHintRequest(); - -protected: - void resizeEvent(QResizeEvent *re); - void mouseMoveEvent(QMouseEvent *me); - void mousePressEvent(QMouseEvent *me); - void mouseReleaseEvent(QMouseEvent *me); - -private slots: - void onContentSizeChanged(QSize newSize); - void onVerticalScrollBarValueChanged(int newValue); - void onScroll(int dx, int dy); - void onPressed(); - -private: - bool m_update; - QPoint m_pressedPos; - int m_pressedValue; - int m_width; - - void updateBorders(); -}; - -#endif // SCROLLAREA_H diff --git a/src/candle/widgets/widget.cpp b/src/candle/widgets/widget.cpp deleted file mode 100644 index 6524c43a..00000000 --- a/src/candle/widgets/widget.cpp +++ /dev/null @@ -1,17 +0,0 @@ -// This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich - -#include -#include -#include "widget.h" - -Widget::Widget(QWidget *parent) : QWidget(parent) -{ - -} - -void Widget::resizeEvent(QResizeEvent *re) -{ - emit sizeChanged(re->size()); -} - diff --git a/src/candle/widgets/widget.h b/src/candle/widgets/widget.h deleted file mode 100644 index 9af0c854..00000000 --- a/src/candle/widgets/widget.h +++ /dev/null @@ -1,24 +0,0 @@ -// This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich - -#ifndef WIDGET_H -#define WIDGET_H - -#include - -class Widget : public QWidget -{ - Q_OBJECT -public: - explicit Widget(QWidget *parent = 0); - -signals: - void sizeChanged(QSize newSize); - -protected: - void resizeEvent(QResizeEvent *); - -public slots: -}; - -#endif // WIDGET_H diff --git a/src/candleplugins/candleplugins.pro b/src/candleplugins/candleplugins.pro index 79f3383e..d893ff38 100644 --- a/src/candleplugins/candleplugins.pro +++ b/src/candleplugins/candleplugins.pro @@ -1,7 +1,6 @@ TEMPLATE = subdirs TRANSLATIONS = camera/translation_ru.ts \ - test1/translation_ru.ts \ usercommands/translation_ru.ts qtPrepareTool(LRELEASE, lrelease) From 14da46eef5de81fcd324c9565fb7a45208a3a0e8 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 9 Jan 2021 22:31:17 +0500 Subject: [PATCH 44/80] Source files headers updated --- src/candle/drawers/gcodedrawer.cpp | 2 +- src/candle/drawers/gcodedrawer.h | 2 +- src/candle/drawers/heightmapborderdrawer.cpp | 2 +- src/candle/drawers/heightmapborderdrawer.h | 2 +- src/candle/drawers/heightmapgriddrawer.cpp | 2 +- src/candle/drawers/heightmapgriddrawer.h | 2 +- src/candle/drawers/heightmapinterpolationdrawer.cpp | 2 +- src/candle/drawers/heightmapinterpolationdrawer.h | 2 +- src/candle/drawers/tooldrawer.cpp | 2 +- src/candle/drawers/tooldrawer.h | 2 +- src/candle/frmabout.cpp | 2 +- src/candle/frmabout.h | 2 +- src/candle/frmabout.ui | 2 +- src/candle/frmmain.cpp | 2 +- src/candle/frmmain.h | 2 +- src/candle/frmsettings.cpp | 2 +- src/candle/frmsettings.h | 2 +- src/candle/main.cpp | 2 +- src/candle/parser/arcproperties.cpp | 2 +- src/candle/parser/arcproperties.h | 2 +- src/candle/parser/gcodeparser.cpp | 2 +- src/candle/parser/gcodeparser.h | 2 +- src/candle/parser/gcodepreprocessorutils.cpp | 2 +- src/candle/parser/gcodepreprocessorutils.h | 2 +- src/candle/parser/gcodeviewparse.cpp | 2 +- src/candle/parser/gcodeviewparse.h | 2 +- src/candle/parser/linesegment.cpp | 2 +- src/candle/parser/linesegment.h | 2 +- src/candle/parser/pointsegment.cpp | 2 +- src/candle/parser/pointsegment.h | 2 +- src/candle/tables/gcodetablemodel.cpp | 2 +- src/candle/tables/gcodetablemodel.h | 2 +- src/candle/tables/heightmaptablemodel.cpp | 2 +- src/candle/tables/heightmaptablemodel.h | 2 +- src/candle/translations/candle_en.ts | 2 +- src/candle/translations/candle_es.ts | 4 ++-- src/candle/translations/candle_fr.ts | 4 ++-- src/candle/translations/candle_pt.ts | 4 ++-- src/candle/translations/candle_ru.ts | 4 ++-- src/candle/utils/interpolation.h | 2 +- src/candle/utils/util.h | 2 +- src/candle/widgets/combobox.cpp | 2 +- src/candle/widgets/combobox.h | 2 +- src/candle/widgets/dropwidget.cpp | 2 +- src/candle/widgets/dropwidget.h | 2 +- src/candle/widgets/glwidget.cpp | 2 +- src/candle/widgets/glwidget.h | 2 +- src/designerplugins/customwidgetsplugin/styledtoolbutton.cpp | 2 +- src/designerplugins/customwidgetsplugin/styledtoolbutton.h | 2 +- 49 files changed, 53 insertions(+), 53 deletions(-) diff --git a/src/candle/drawers/gcodedrawer.cpp b/src/candle/drawers/gcodedrawer.cpp index 676c0975..5dda1249 100644 --- a/src/candle/drawers/gcodedrawer.cpp +++ b/src/candle/drawers/gcodedrawer.cpp @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include "gcodedrawer.h" diff --git a/src/candle/drawers/gcodedrawer.h b/src/candle/drawers/gcodedrawer.h index e38acd4b..51f39dfa 100644 --- a/src/candle/drawers/gcodedrawer.h +++ b/src/candle/drawers/gcodedrawer.h @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef GCODEDRAWER_H #define GCODEDRAWER_H diff --git a/src/candle/drawers/heightmapborderdrawer.cpp b/src/candle/drawers/heightmapborderdrawer.cpp index a949bb61..f0aa3818 100644 --- a/src/candle/drawers/heightmapborderdrawer.cpp +++ b/src/candle/drawers/heightmapborderdrawer.cpp @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include "heightmapborderdrawer.h" diff --git a/src/candle/drawers/heightmapborderdrawer.h b/src/candle/drawers/heightmapborderdrawer.h index bac212e0..f018c1e0 100644 --- a/src/candle/drawers/heightmapborderdrawer.h +++ b/src/candle/drawers/heightmapborderdrawer.h @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef HEIGHTMAPBORDERDRAWER_H #define HEIGHTMAPBORDERDRAWER_H diff --git a/src/candle/drawers/heightmapgriddrawer.cpp b/src/candle/drawers/heightmapgriddrawer.cpp index f73c9146..87a95419 100644 --- a/src/candle/drawers/heightmapgriddrawer.cpp +++ b/src/candle/drawers/heightmapgriddrawer.cpp @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include "heightmapgriddrawer.h" diff --git a/src/candle/drawers/heightmapgriddrawer.h b/src/candle/drawers/heightmapgriddrawer.h index 0ca0f6ab..fef8b5fd 100644 --- a/src/candle/drawers/heightmapgriddrawer.h +++ b/src/candle/drawers/heightmapgriddrawer.h @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef HEIGHTMAPGRIDDRAWER_H #define HEIGHTMAPGRIDDRAWER_H diff --git a/src/candle/drawers/heightmapinterpolationdrawer.cpp b/src/candle/drawers/heightmapinterpolationdrawer.cpp index 4cfad75c..b6d4a5c4 100644 --- a/src/candle/drawers/heightmapinterpolationdrawer.cpp +++ b/src/candle/drawers/heightmapinterpolationdrawer.cpp @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include "heightmapinterpolationdrawer.h" diff --git a/src/candle/drawers/heightmapinterpolationdrawer.h b/src/candle/drawers/heightmapinterpolationdrawer.h index 2f4b5146..1da6ea7f 100644 --- a/src/candle/drawers/heightmapinterpolationdrawer.h +++ b/src/candle/drawers/heightmapinterpolationdrawer.h @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef HEIGHTMAPINTERPOLATIONDRAWER_H #define HEIGHTMAPINTERPOLATIONDRAWER_H diff --git a/src/candle/drawers/tooldrawer.cpp b/src/candle/drawers/tooldrawer.cpp index bd934cd3..a8e8722b 100644 --- a/src/candle/drawers/tooldrawer.cpp +++ b/src/candle/drawers/tooldrawer.cpp @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include "tooldrawer.h" diff --git a/src/candle/drawers/tooldrawer.h b/src/candle/drawers/tooldrawer.h index eec4ed05..825fb729 100644 --- a/src/candle/drawers/tooldrawer.h +++ b/src/candle/drawers/tooldrawer.h @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef TOOLDRAWER_H #define TOOLDRAWER_H diff --git a/src/candle/frmabout.cpp b/src/candle/frmabout.cpp index d77774b8..b404552c 100644 --- a/src/candle/frmabout.cpp +++ b/src/candle/frmabout.cpp @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include #include "frmabout.h" diff --git a/src/candle/frmabout.h b/src/candle/frmabout.h index edd05583..ee4505c3 100644 --- a/src/candle/frmabout.h +++ b/src/candle/frmabout.h @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef FRMABOUT_H #define FRMABOUT_H diff --git a/src/candle/frmabout.ui b/src/candle/frmabout.ui index d8139d7e..44d368ca 100644 --- a/src/candle/frmabout.ui +++ b/src/candle/frmabout.ui @@ -58,7 +58,7 @@ - <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visit: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2016 Hayrullin Denis Ravilevich</p></body></html> + <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visit: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2021 Hayrullin Denis Ravilevich</p></body></html> Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index 3d8fb5a8..a5b5a4a6 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #define UNKNOWN 0 #define IDLE 1 diff --git a/src/candle/frmmain.h b/src/candle/frmmain.h index 7342313c..b77e1f44 100644 --- a/src/candle/frmmain.h +++ b/src/candle/frmmain.h @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef FRMMAIN_H #define FRMMAIN_H diff --git a/src/candle/frmsettings.cpp b/src/candle/frmsettings.cpp index 86c0d4be..78567d9b 100644 --- a/src/candle/frmsettings.cpp +++ b/src/candle/frmsettings.cpp @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include "frmsettings.h" #include "ui_frmsettings.h" diff --git a/src/candle/frmsettings.h b/src/candle/frmsettings.h index 764d9a73..d6a47c74 100644 --- a/src/candle/frmsettings.h +++ b/src/candle/frmsettings.h @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef FRMSETTINGS_H #define FRMSETTINGS_H diff --git a/src/candle/main.cpp b/src/candle/main.cpp index aa5a5890..a78c9044 100644 --- a/src/candle/main.cpp +++ b/src/candle/main.cpp @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include #include diff --git a/src/candle/parser/arcproperties.cpp b/src/candle/parser/arcproperties.cpp index 002131a0..e9d40fdc 100644 --- a/src/candle/parser/arcproperties.cpp +++ b/src/candle/parser/arcproperties.cpp @@ -3,7 +3,7 @@ // of "Universal GcodeSender" application written by Will Winder // (https://github.com/winder/Universal-G-Code-Sender) -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include "arcproperties.h" diff --git a/src/candle/parser/arcproperties.h b/src/candle/parser/arcproperties.h index 3a3037a0..255ba1a8 100644 --- a/src/candle/parser/arcproperties.h +++ b/src/candle/parser/arcproperties.h @@ -3,7 +3,7 @@ // of "Universal GcodeSender" application written by Will Winder // (https://github.com/winder/Universal-G-Code-Sender) -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef ARCPROPERTIES_H #define ARCPROPERTIES_H diff --git a/src/candle/parser/gcodeparser.cpp b/src/candle/parser/gcodeparser.cpp index 9bfd5f09..6932aaef 100644 --- a/src/candle/parser/gcodeparser.cpp +++ b/src/candle/parser/gcodeparser.cpp @@ -3,7 +3,7 @@ // of "Universal GcodeSender" application written by Will Winder // (https://github.com/winder/Universal-G-Code-Sender) -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include #include diff --git a/src/candle/parser/gcodeparser.h b/src/candle/parser/gcodeparser.h index 047f6b92..87ea24df 100644 --- a/src/candle/parser/gcodeparser.h +++ b/src/candle/parser/gcodeparser.h @@ -3,7 +3,7 @@ // of "Universal GcodeSender" application written by Will Winder // (https://github.com/winder/Universal-G-Code-Sender) -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef GCODEPARSER_H #define GCODEPARSER_H diff --git a/src/candle/parser/gcodepreprocessorutils.cpp b/src/candle/parser/gcodepreprocessorutils.cpp index 50a56a28..8beaad17 100644 --- a/src/candle/parser/gcodepreprocessorutils.cpp +++ b/src/candle/parser/gcodepreprocessorutils.cpp @@ -3,7 +3,7 @@ // of "Universal GcodeSender" application written by Will Winder // (https://github.com/winder/Universal-G-Code-Sender) -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include #include diff --git a/src/candle/parser/gcodepreprocessorutils.h b/src/candle/parser/gcodepreprocessorutils.h index b82b6bdb..df74b009 100644 --- a/src/candle/parser/gcodepreprocessorutils.h +++ b/src/candle/parser/gcodepreprocessorutils.h @@ -3,7 +3,7 @@ // of "Universal GcodeSender" application written by Will Winder // (https://github.com/winder/Universal-G-Code-Sender) -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef GCODEPREPROCESSORUTILS_H #define GCODEPREPROCESSORUTILS_H diff --git a/src/candle/parser/gcodeviewparse.cpp b/src/candle/parser/gcodeviewparse.cpp index 48923240..24cba926 100644 --- a/src/candle/parser/gcodeviewparse.cpp +++ b/src/candle/parser/gcodeviewparse.cpp @@ -3,7 +3,7 @@ // of "Universal GcodeSender" application written by Will Winder // (https://github.com/winder/Universal-G-Code-Sender) -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include #include "gcodeviewparse.h" diff --git a/src/candle/parser/gcodeviewparse.h b/src/candle/parser/gcodeviewparse.h index f1034357..ad69dfa9 100644 --- a/src/candle/parser/gcodeviewparse.h +++ b/src/candle/parser/gcodeviewparse.h @@ -3,7 +3,7 @@ // of "Universal GcodeSender" application written by Will Winder // (https://github.com/winder/Universal-G-Code-Sender) -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef GCODEVIEWPARSE_H #define GCODEVIEWPARSE_H diff --git a/src/candle/parser/linesegment.cpp b/src/candle/parser/linesegment.cpp index 40137aaa..15bc5dca 100644 --- a/src/candle/parser/linesegment.cpp +++ b/src/candle/parser/linesegment.cpp @@ -3,7 +3,7 @@ // of "Universal GcodeSender" application written by Will Winder // (https://github.com/winder/Universal-G-Code-Sender) -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include "linesegment.h" #include diff --git a/src/candle/parser/linesegment.h b/src/candle/parser/linesegment.h index 58984a30..3733ba60 100644 --- a/src/candle/parser/linesegment.h +++ b/src/candle/parser/linesegment.h @@ -3,7 +3,7 @@ // of "Universal GcodeSender" application written by Will Winder // (https://github.com/winder/Universal-G-Code-Sender) -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef LINESEGMENT_H #define LINESEGMENT_H diff --git a/src/candle/parser/pointsegment.cpp b/src/candle/parser/pointsegment.cpp index fdd0397b..58ba0e3e 100644 --- a/src/candle/parser/pointsegment.cpp +++ b/src/candle/parser/pointsegment.cpp @@ -3,7 +3,7 @@ // of "Universal GcodeSender" application written by Will Winder // (https://github.com/winder/Universal-G-Code-Sender) -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include diff --git a/src/candle/parser/pointsegment.h b/src/candle/parser/pointsegment.h index 84fcd049..aaa4a80b 100644 --- a/src/candle/parser/pointsegment.h +++ b/src/candle/parser/pointsegment.h @@ -3,7 +3,7 @@ // of "Universal GcodeSender" application written by Will Winder // (https://github.com/winder/Universal-G-Code-Sender) -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef POINTSEGMENT_H #define POINTSEGMENT_H diff --git a/src/candle/tables/gcodetablemodel.cpp b/src/candle/tables/gcodetablemodel.cpp index 58739bdd..60d9af34 100644 --- a/src/candle/tables/gcodetablemodel.cpp +++ b/src/candle/tables/gcodetablemodel.cpp @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include "gcodetablemodel.h" diff --git a/src/candle/tables/gcodetablemodel.h b/src/candle/tables/gcodetablemodel.h index cf121309..ee2034f2 100644 --- a/src/candle/tables/gcodetablemodel.h +++ b/src/candle/tables/gcodetablemodel.h @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef GCODETABLEMODEL_H #define GCODETABLEMODEL_H diff --git a/src/candle/tables/heightmaptablemodel.cpp b/src/candle/tables/heightmaptablemodel.cpp index d12913a4..20d5b1f0 100644 --- a/src/candle/tables/heightmaptablemodel.cpp +++ b/src/candle/tables/heightmaptablemodel.cpp @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include "heightmaptablemodel.h" diff --git a/src/candle/tables/heightmaptablemodel.h b/src/candle/tables/heightmaptablemodel.h index 953e0138..0d3511ae 100644 --- a/src/candle/tables/heightmaptablemodel.h +++ b/src/candle/tables/heightmaptablemodel.h @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef HEIGHTMAPTABLEMODEL_H #define HEIGHTMAPTABLEMODEL_H diff --git a/src/candle/translations/candle_en.ts b/src/candle/translations/candle_en.ts index 5c5c9209..f9544237 100644 --- a/src/candle/translations/candle_en.ts +++ b/src/candle/translations/candle_en.ts @@ -90,7 +90,7 @@ - <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visit: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2016 Hayrullin Denis Ravilevich</p></body></html> + <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visit: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2021 Hayrullin Denis Ravilevich</p></body></html> diff --git a/src/candle/translations/candle_es.ts b/src/candle/translations/candle_es.ts index 5992b8bb..d9a97e47 100644 --- a/src/candle/translations/candle_es.ts +++ b/src/candle/translations/candle_es.ts @@ -94,8 +94,8 @@ - <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visit: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2016 Hayrullin Denis Ravilevich</p></body></html> - <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visite: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2016 Hayrullin Denis Ravilevich</p></body></html> + <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visit: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2021 Hayrullin Denis Ravilevich</p></body></html> + <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visite: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2021 Hayrullin Denis Ravilevich</p></body></html> diff --git a/src/candle/translations/candle_fr.ts b/src/candle/translations/candle_fr.ts index 65cd3322..6d7eea9a 100644 --- a/src/candle/translations/candle_fr.ts +++ b/src/candle/translations/candle_fr.ts @@ -94,8 +94,8 @@ - <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visit: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2016 Hayrullin Denis Ravilevich</p></body></html> - <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visite: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2016 Hayrullin Denis Ravilevich</p></body></html> + <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visit: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2021 Hayrullin Denis Ravilevich</p></body></html> + <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visite: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2021 Hayrullin Denis Ravilevich</p></body></html> diff --git a/src/candle/translations/candle_pt.ts b/src/candle/translations/candle_pt.ts index d11af8d8..7f22f143 100644 --- a/src/candle/translations/candle_pt.ts +++ b/src/candle/translations/candle_pt.ts @@ -94,8 +94,8 @@ - <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visit: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2016 Hayrullin Denis Ravilevich</p></body></html> - <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visite: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2016 Hayrullin Denis Ravilevich</p></body></html> + <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visit: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2021 Hayrullin Denis Ravilevich</p></body></html> + <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visite: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2021 Hayrullin Denis Ravilevich</p></body></html> diff --git a/src/candle/translations/candle_ru.ts b/src/candle/translations/candle_ru.ts index e06eb315..5f80d1fa 100644 --- a/src/candle/translations/candle_ru.ts +++ b/src/candle/translations/candle_ru.ts @@ -102,8 +102,8 @@ - <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visit: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2016 Hayrullin Denis Ravilevich</p></body></html> - <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visit: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2016 Хайруллин Денис Равильевич</p></body></html> + <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visit: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2021 Hayrullin Denis Ravilevich</p></body></html> + <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visit: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015-2021 Хайруллин Денис Равильевич</p></body></html> <html><head/><body><p>Candle<br/>Version: %1<br/>License: GNU GENERAL PUBLIC LICENSE<br/>Visit: <a href="https://github.com/Denvi/Candle/"><span style=" text-decoration: underline; color:#0000ff;">https://github.com/Denvi/Candle/<br/></span></a>© 2015 Hayrullin Denis Ravilevich</p></body></html> diff --git a/src/candle/utils/interpolation.h b/src/candle/utils/interpolation.h index b5a28b53..c7c632cb 100644 --- a/src/candle/utils/interpolation.h +++ b/src/candle/utils/interpolation.h @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef INTERPOLATION #define INTERPOLATION diff --git a/src/candle/utils/util.h b/src/candle/utils/util.h index d8b76812..5591de7e 100644 --- a/src/candle/utils/util.h +++ b/src/candle/utils/util.h @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef UTIL #define UTIL diff --git a/src/candle/widgets/combobox.cpp b/src/candle/widgets/combobox.cpp index 84c5ad4e..5498829a 100644 --- a/src/candle/widgets/combobox.cpp +++ b/src/candle/widgets/combobox.cpp @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include #include diff --git a/src/candle/widgets/combobox.h b/src/candle/widgets/combobox.h index 9c1affb8..d94c9b04 100644 --- a/src/candle/widgets/combobox.h +++ b/src/candle/widgets/combobox.h @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef COMBOBOX_H #define COMBOBOX_H diff --git a/src/candle/widgets/dropwidget.cpp b/src/candle/widgets/dropwidget.cpp index b6641477..b463bacc 100644 --- a/src/candle/widgets/dropwidget.cpp +++ b/src/candle/widgets/dropwidget.cpp @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include #include diff --git a/src/candle/widgets/dropwidget.h b/src/candle/widgets/dropwidget.h index 5b8ed142..23aca8eb 100644 --- a/src/candle/widgets/dropwidget.h +++ b/src/candle/widgets/dropwidget.h @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef DROPWIDGET_H #define DROPWIDGET_H diff --git a/src/candle/widgets/glwidget.cpp b/src/candle/widgets/glwidget.cpp index f14e790b..39699a4c 100644 --- a/src/candle/widgets/glwidget.cpp +++ b/src/candle/widgets/glwidget.cpp @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include "glwidget.h" #include "drawers/tooldrawer.h" diff --git a/src/candle/widgets/glwidget.h b/src/candle/widgets/glwidget.h index d4a9960e..e9f4e825 100644 --- a/src/candle/widgets/glwidget.h +++ b/src/candle/widgets/glwidget.h @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef GLWIDGET_H #define GLWIDGET_H diff --git a/src/designerplugins/customwidgetsplugin/styledtoolbutton.cpp b/src/designerplugins/customwidgetsplugin/styledtoolbutton.cpp index 6bce5243..757d8e7a 100644 --- a/src/designerplugins/customwidgetsplugin/styledtoolbutton.cpp +++ b/src/designerplugins/customwidgetsplugin/styledtoolbutton.cpp @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #include "styledtoolbutton.h" #include diff --git a/src/designerplugins/customwidgetsplugin/styledtoolbutton.h b/src/designerplugins/customwidgetsplugin/styledtoolbutton.h index 5b34e4af..d0d64100 100644 --- a/src/designerplugins/customwidgetsplugin/styledtoolbutton.h +++ b/src/designerplugins/customwidgetsplugin/styledtoolbutton.h @@ -1,5 +1,5 @@ // This file is a part of "Candle" application. -// Copyright 2015-2016 Hayrullin Denis Ravilevich +// Copyright 2015-2021 Hayrullin Denis Ravilevich #ifndef STYLEDTOOLBUTTON_H #define STYLEDTOOLBUTTON_H From aa5dd33d21828be8afd71c218a41e019bc80c35b Mon Sep 17 00:00:00 2001 From: Denvi Date: Sun, 10 Jan 2021 13:36:51 +0500 Subject: [PATCH 45/80] Camera plugin updated --- src/candleplugins/camera/config.ini | 3 +- src/candleplugins/camera/script.js | 218 ++++++++++++++++------- src/candleplugins/usercommands/script.js | 1 - 3 files changed, 150 insertions(+), 72 deletions(-) diff --git a/src/candleplugins/camera/config.ini b/src/candleplugins/camera/config.ini index aa97eb75..213fc861 100644 --- a/src/candleplugins/camera/config.ini +++ b/src/candleplugins/camera/config.ini @@ -1,4 +1,3 @@ [General] title="Camera" -name="CameraPlugin" -type="window" \ No newline at end of file +name="CameraPlugin" \ No newline at end of file diff --git a/src/candleplugins/camera/script.js b/src/candleplugins/camera/script.js index 1f3a2afe..d0a920ee 100644 --- a/src/candleplugins/camera/script.js +++ b/src/candleplugins/camera/script.js @@ -1,132 +1,212 @@ -// TODO: Adapt to new plugin api +// This file is a part of "Candle" application. +// Copyright 2015-2021 Hayrullin Denis Ravilevich + +script.importExtension("qt.core"); +script.importExtension("qt.gui"); script.importExtension("qt.widgets"); +script.importExtension("qt.custom"); +script.importExtension("qt.uitools"); + +// Vars +var appPath = QCoreApplication.applicationDirPath(); +var pluginPath = appPath + "/plugins/camera"; +var loader = new QUiLoader(); +var settings = new QSettings(pluginPath + "/settings.ini", QSettings.IniFormat); +var storedName; +var storedResolution; +var storedZoom; +var storedPosition; +var storedAimPosition; +var storedAimSize; +var storedAimLineWidth; +var storedAimColor; + +// Ui +var uiWindow; +var uiSettings; + +function init() +{ + loader.setWorkingDirectory(new QDir(pluginPath)); + loader.addPluginPath(appPath); + loader.addPluginPath(pluginPath + "/plugins") + + app.settingsLoaded.connect(onAppSettingsLoaded); + app.settingsSaved.connect(onAppSettingsSaved); + app.settingsAboutToShow.connect(onAppSettingsAboutToShow); + app.settingsAccepted.connect(onAppSettingsAccepted); + app.settingsRejected.connect(onAppSettingsRejected); +} + +function createWindowWidget() +{ + var f = new QFile(pluginPath + "/widget.ui"); + + if (f.open(QIODevice.ReadOnly)) { + uiWindow = loader.load(f); + } + return uiWindow; +} + +function createSettingsWidget() +{ + var f = new QFile(pluginPath + "/settings.ui"); + + if (f.open(QIODevice.ReadOnly)) { + uiSettings = loader.load(f); + + } + return uiSettings; +} -function on_settings_saved() +function onAppSettingsSaved() { - main.saveValue("camera/name", settings.cboCameraName.currentText); - main.saveValue("camera/resolution", settings.cboCameraResolution.currentText); - main.saveValue("camera/zoom", settings.txtCameraZoom.text); - main.saveValue("camera/position", settings.txtCameraPosition.text); - main.saveValue("camera/aimPosition", settings.txtCameraAimPosition.text); - main.saveValue("camera/aimSize", settings.txtCameraAimSize.value); - main.saveValue("camera/aimLineWidth", settings.txtCameraAimLineWidth.value); - main.saveValue("camera/aimColor", settings.colCameraAimColor.colorInt); + settings.setValue("name", uiSettings.cboCameraName.currentText); + settings.setValue("resolution", uiSettings.cboCameraResolution.currentText); + settings.setValue("zoom", uiSettings.txtCameraZoom.text); + settings.setValue("position", uiSettings.txtCameraPosition.text); + settings.setValue("aimPosition", uiSettings.txtCameraAimPosition.text); + settings.setValue("aimSize", uiSettings.txtCameraAimSize.value); + settings.setValue("aimLineWidth", uiSettings.txtCameraAimLineWidth.value); + settings.setValue("aimColor", uiSettings.colCameraAimColor.colorInt); } -function on_settings_loaded() +function onAppSettingsLoaded() { // Load settings - settings.cboCameraName.addItems(ui.camMain.availableCameras); - settings.cboCameraName.currentText = main.loadValue("camera/name"); - settings.cboCameraResolution.currentText = main.loadValue("camera/resolution"); - settings.txtCameraZoom.text = main.loadValue("camera/zoom"); - settings.txtCameraPosition.text = main.loadValue("camera/position"); - settings.txtCameraAimPosition.text = main.loadValue("camera/aimPosition"); - settings.txtCameraAimSize.value = main.loadValue("camera/aimSize"); - settings.txtCameraAimLineWidth.value = main.loadValue("camera/aimLineWidth"); - settings.colCameraAimColor.colorInt = main.loadValue("camera/aimColor"); + uiSettings.cboCameraName.addItems(uiWindow.camMain.availableCameras); + uiSettings.cboCameraName.currentText = settings.value("name"); + uiSettings.cboCameraResolution.currentText = settings.value("resolution", "1280x720"); + uiSettings.txtCameraZoom.text = settings.value("zoom", 1); + uiSettings.txtCameraPosition.text = settings.value("position", "0, 0"); + uiSettings.txtCameraAimPosition.text = settings.value("aimPosition", "0, 0"); + uiSettings.txtCameraAimSize.value = settings.value("aimSize", 20); + uiSettings.txtCameraAimLineWidth.value = settings.value("aimLineWidth", 1); + uiSettings.colCameraAimColor.colorInt = settings.value("aimColor", -65536); // Apply settings applySettings(); // Update resolutions list - var r = settings.cboCameraResolution.currentText; - settings.cboCameraResolution.addItems(ui.camMain.availableResolutions); - settings.cboCameraResolution.currentText = r; + var r = uiSettings.cboCameraResolution.currentText; + uiSettings.cboCameraResolution.addItems(uiWindow.camMain.availableResolutions); + uiSettings.cboCameraResolution.currentText = r; // Connect signals/slots - ui.camMain.posChanged.connect(on_pos_changed); - ui.camMain.aimPosChanged.connect(on_aimPos_changed); - ui.camMain.aimSizeChanged.connect(on_aimSize_changed); - ui.camMain.aimLineWidthChanged.connect(on_aimLineWidth_changed); - ui.camMain.aimColorChanged.connect(on_aimColor_changed); - ui.camMain.zoomChanged.connect(on_zoom_changed); - settings.cboCameraName.currentTextChanged.connect(on_cameraName_changed); + uiWindow.camMain.posChanged.connect(onPosChanged); + uiWindow.camMain.aimPosChanged.connect(onAimPosChanged); + uiWindow.camMain.aimSizeChanged.connect(onAimSizeChanged); + uiWindow.camMain.aimLineWidthChanged.connect(onAimLineWidthChanged); + uiWindow.camMain.aimColorChanged.connect(onAimColorChanged); + uiWindow.camMain.zoomChanged.connect(onZoomChanged); + uiSettings.cboCameraName.currentTextChanged.connect(onCameraNameChanged); +} + +function onAppSettingsAboutToShow() +{ + storedName = uiSettings.cboCameraName.currentText; + storedResolution = uiSettings.cboCameraResolution.currentText; + storedZoom = uiSettings.txtCameraZoom.text; + storedPosition = uiSettings.txtCameraPosition.text; + storedAimPosition = uiSettings.txtCameraAimPosition.text; + storedAimSize = uiSettings.txtCameraAimSize.text; + storedAimLineWidth = uiSettings.txtCameraAimLineWidth.text; + storedAimColor = uiSettings.colCameraAimColor.colorInt; +} + +function onAppSettingsAccepted() +{ + applySettings(); } -function on_settings_changed() +function onAppSettingsRejected() { + uiSettings.cboCameraName.currentText = storedName; + uiSettings.cboCameraResolution.currentText = storedResolution; + uiSettings.txtCameraZoom.text = storedZoom; + uiSettings.txtCameraPosition.text = storedPosition; + uiSettings.txtCameraAimPosition.text = storedAimPosition; + uiSettings.txtCameraAimSize.text = storedAimSize; + uiSettings.txtCameraAimLineWidth.text = storedAimLineWidth; + uiSettings.colCameraAimColor.colorInt = storedAimColor; + applySettings(); } function applySettings() { // Resolution - if (settings.cboCameraResolution.currentText != "") { - var l = settings.cboCameraResolution.currentText.split("x"); - ui.camMain.resolution = [parseInt(l[0]), parseInt(l[1])]; + if (uiSettings.cboCameraResolution.currentText != "") { + var l = uiSettings.cboCameraResolution.currentText.split("x"); + uiWindow.camMain.resolution = [parseInt(l[0]), parseInt(l[1])]; } // Zoom - if (settings.txtCameraZoom.text == "") settings.txtCameraZoom.text = "1.0"; - ui.camMain.zoom = parseFloat(settings.txtCameraZoom.text); + if (uiSettings.txtCameraZoom.text == "") uiSettings.txtCameraZoom.text = "1.0"; + uiWindow.camMain.zoom = parseFloat(uiSettings.txtCameraZoom.text); // Padding - if (settings.txtCameraPosition.text == "") settings.txtCameraPosition.text = "0, 0"; - l = settings.txtCameraPosition.text.split(","); - ui.camMain.pos = [parseInt(l[0]), parseInt(l[1])]; + if (uiSettings.txtCameraPosition.text == "") uiSettings.txtCameraPosition.text = "0, 0"; + l = uiSettings.txtCameraPosition.text.split(","); + uiWindow.camMain.pos = [parseInt(l[0]), parseInt(l[1])]; // Aim position - if (settings.txtCameraAimPosition.text == "") settings.txtCameraAimPosition.text = "0, 0"; - l = settings.txtCameraAimPosition.text.split(","); - ui.camMain.aimPos = [parseFloat(l[0]), parseFloat(l[1])]; + if (uiSettings.txtCameraAimPosition.text == "") uiSettings.txtCameraAimPosition.text = "0, 0"; + l = uiSettings.txtCameraAimPosition.text.split(","); + uiWindow.camMain.aimPos = [parseFloat(l[0]), parseFloat(l[1])]; // Aim size - ui.camMain.aimSize = parseInt(settings.txtCameraAimSize.value); + uiWindow.camMain.aimSize = parseInt(uiSettings.txtCameraAimSize.value); // Aim line width - ui.camMain.aimLineWidth = parseInt(settings.txtCameraAimLineWidth.value); + uiWindow.camMain.aimLineWidth = parseInt(uiSettings.txtCameraAimLineWidth.value); // Aim color - ui.camMain.aimColor = parseInt(settings.colCameraAimColor.colorInt); + uiWindow.camMain.aimColor = parseInt(uiSettings.colCameraAimColor.colorInt); // Update camera - ui.camMain.cameraName = settings.cboCameraName.currentText; + uiWindow.camMain.cameraName = uiSettings.cboCameraName.currentText; } -function on_cameraName_changed(name) +function onCameraNameChanged(name) { // Update camera - ui.camMain.cameraName = name; + uiWindow.camMain.cameraName = name; // Update resolutions list - var r = settings.cboCameraResolution.currentText; - settings.cboCameraResolution.clear(); - settings.cboCameraResolution.addItems(ui.camMain.availableResolutions); - settings.cboCameraResolution.currentText = r; + var r = uiSettings.cboCameraResolution.currentText; + uiSettings.cboCameraResolution.clear(); + uiSettings.cboCameraResolution.addItems(uiWindow.camMain.availableResolutions); + uiSettings.cboCameraResolution.currentText = r; } -function on_pos_changed(pos) +function onPosChanged(pos) { - settings.txtCameraPosition.text = pos.join(", "); + uiSettings.txtCameraPosition.text = pos.join(", "); } -function on_aimPos_changed(aimPos) +function onAimPosChanged(aimPos) { p = [parseFloat(aimPos[0].toFixed(3)), parseFloat(aimPos[1].toFixed(3))]; - settings.txtCameraAimPosition.text = p.join(", "); + uiSettings.txtCameraAimPosition.text = p.join(", "); } -function on_aimSize_changed(aimSize) +function onAimSizeChanged(aimSize) { - settings.txtCameraAimSize.text = aimSize; + uiSettings.txtCameraAimSize.text = aimSize; } -function on_aimLineWidth_changed(aimLineWidth) +function onAimLineWidthChanged(aimLineWidth) { - settings.txtCameraAimLineWidth.text = aimLineWidth; + uiSettings.txtCameraAimLineWidth.text = aimLineWidth; } -function on_aimColor_changed(aimColor) +function onAimColorChanged(aimColor) { - settings.colCameraAimColor.colorInt = aimColor; + uiSettings.colCameraAimColor.colorInt = aimColor; } -function on_zoom_changed(zoom) +function onZoomChanged(zoom) { - settings.txtCameraZoom.text = zoom.toFixed(3); -} - -main.settingsSaved.connect(on_settings_saved); -main.settingsLoaded.connect(on_settings_loaded); -main.settingsChanged.connect(on_settings_changed); \ No newline at end of file + uiSettings.txtCameraZoom.text = zoom.toFixed(3); +} \ No newline at end of file diff --git a/src/candleplugins/usercommands/script.js b/src/candleplugins/usercommands/script.js index 07984ed6..37d6cbcb 100644 --- a/src/candleplugins/usercommands/script.js +++ b/src/candleplugins/usercommands/script.js @@ -26,7 +26,6 @@ function init() loader.setWorkingDirectory(new QDir(pluginPath)); loader.addPluginPath(appPath); - // app.settingsLoaded.connect(onAppSettingsLoaded); app.settingsLoaded.connect(onAppSettingsLoaded); app.settingsSaved.connect(onAppSettingsSaved); app.settingsAboutToShow.connect(onAppSettingsAboutToShow); From 307bdf945f82c05059d027272bb4a8f5fed502a6 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Sun, 10 Jan 2021 17:12:44 +0100 Subject: [PATCH 46/80] Fixed import capitalization --- src/candle/scriptfunctions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/candle/scriptfunctions.cpp b/src/candle/scriptfunctions.cpp index 9aa715eb..162baddf 100644 --- a/src/candle/scriptfunctions.cpp +++ b/src/candle/scriptfunctions.cpp @@ -1,5 +1,5 @@ #include "scriptfunctions.h" -#include "frmMain.h" +#include "frmmain.h" ScriptFunctions::ScriptFunctions(QObject *parent): QObject(parent), m_frmMain(0) { From 3f0564fae83924b425013638b90f63acaea49869 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sun, 10 Jan 2021 22:08:09 +0500 Subject: [PATCH 47/80] Coordinate system plugin added --- candle.pro | 2 +- src/candle/frmmain.cpp | 17 +- src/candle/frmmain.h | 1 + src/candle/frmmain.ui | 19 +- src/candle/images/cs.svg | 91 ++++ src/candle/scriptfunctions.cpp | 8 +- src/candle/scriptfunctions.h | 4 +- src/candleplugins/candleplugins.pro | 3 +- src/candleplugins/coordinatesystem/config.ini | 3 + .../coordinatesystem/images/0.png | Bin 0 -> 782 bytes .../coordinatesystem/images/54.png | Bin 0 -> 900 bytes .../coordinatesystem/images/55.png | Bin 0 -> 903 bytes .../coordinatesystem/images/56.png | Bin 0 -> 1105 bytes .../coordinatesystem/images/57.png | Bin 0 -> 856 bytes .../coordinatesystem/images/58.png | Bin 0 -> 1175 bytes .../coordinatesystem/images/59.png | Bin 0 -> 1120 bytes .../coordinatesystem/images/x0.png | Bin 0 -> 1277 bytes .../coordinatesystem/images/xyz0.png | Bin 0 -> 2026 bytes .../coordinatesystem/images/y0.png | Bin 0 -> 1127 bytes .../coordinatesystem/images/z0.png | Bin 0 -> 1053 bytes src/candleplugins/coordinatesystem/script.js | 98 ++++ .../coordinatesystem/translation_ru.qm | Bin 0 -> 202 bytes .../coordinatesystem/translation_ru.ts | 18 + src/candleplugins/coordinatesystem/widget.ui | 425 ++++++++++++++++++ 24 files changed, 670 insertions(+), 19 deletions(-) create mode 100644 src/candle/images/cs.svg create mode 100644 src/candleplugins/coordinatesystem/config.ini create mode 100644 src/candleplugins/coordinatesystem/images/0.png create mode 100644 src/candleplugins/coordinatesystem/images/54.png create mode 100644 src/candleplugins/coordinatesystem/images/55.png create mode 100644 src/candleplugins/coordinatesystem/images/56.png create mode 100644 src/candleplugins/coordinatesystem/images/57.png create mode 100644 src/candleplugins/coordinatesystem/images/58.png create mode 100644 src/candleplugins/coordinatesystem/images/59.png create mode 100644 src/candleplugins/coordinatesystem/images/x0.png create mode 100644 src/candleplugins/coordinatesystem/images/xyz0.png create mode 100644 src/candleplugins/coordinatesystem/images/y0.png create mode 100644 src/candleplugins/coordinatesystem/images/z0.png create mode 100644 src/candleplugins/coordinatesystem/script.js create mode 100644 src/candleplugins/coordinatesystem/translation_ru.qm create mode 100644 src/candleplugins/coordinatesystem/translation_ru.ts create mode 100644 src/candleplugins/coordinatesystem/widget.ui diff --git a/candle.pro b/candle.pro index b71614ed..87349881 100644 --- a/candle.pro +++ b/candle.pro @@ -12,7 +12,7 @@ install_main.path = bin install_main.files += src/candle/release/candle.exe install_plugins.path = bin/plugins -install_plugins.files = src/candleplugins/camera src/candleplugins/test1 src/candleplugins/usercommands +install_plugins.files = src/candleplugins/camera src/candleplugins/test1 src/candleplugins/usercommands src/candleplugins/coordinatesystem install_translations.path = bin/translations install_translations.files = src/candle/translations/* diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index a5b5a4a6..41ff0f90 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -1886,7 +1886,8 @@ void frmMain::onSerialPortReadyRead() m_updateParserStatus = true; // Query grbl settings - sendCommand("$$", -2, false); + sendCommand("$$", -2, false); + sendCommand("$#", -2, false, true); } // Clear command buffer on "M2" & "M30" command (old firmwares) @@ -2075,9 +2076,7 @@ void frmMain::onSerialPortReadyRead() } // Emit response signal - if (ca.tableIndex <= -100) { - emit responseReceived(ca.command, -(100 + ca.tableIndex), response); - } + emit responseReceived(ca.command, ca.tableIndex, response); response.clear(); } else { @@ -3214,11 +3213,9 @@ int frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, bo m_fileEndSent = true; } - // Queue offsets request on G92 command - // TODO: Queue offsets for G54-59 commands - if (ca.tableIndex == -1 && uncomment.contains("G92")) { - sendCommand("$#", -3, showInConsole, true); - } + // Queue offsets request on G92, G10 commands + static QRegExp G92("(G92|G10)"); + if (uncomment.contains(G92)) sendCommand("$#", -3, showInConsole, true); m_serialPort.write((command + "\r").toLatin1()); @@ -3719,7 +3716,7 @@ void frmMain::updateControlsState() { ui->cmdFileOpen->setEnabled(!m_processingFile); ui->cmdFileReset->setEnabled(!m_processingFile && m_programModel.rowCount() > 1); ui->cmdFileSend->setEnabled(portOpened && !m_processingFile && m_programModel.rowCount() > 1); - ui->cmdFilePause->setEnabled(m_processingFile && !ui->cmdCheck->isChecked()); + ui->cmdFilePause->setEnabled(portOpened && !ui->cmdCheck->isChecked()); ui->cmdFileAbort->setEnabled(m_processingFile); ui->actFileOpen->setEnabled(!m_processingFile); ui->mnuRecent->setEnabled(!m_processingFile && ((m_recentFiles.count() > 0 && !m_heightMapMode) diff --git a/src/candle/frmmain.h b/src/candle/frmmain.h index b77e1f44..bdd485d6 100644 --- a/src/candle/frmmain.h +++ b/src/candle/frmmain.h @@ -240,6 +240,7 @@ private slots: GcodeViewParse m_probeParser; // Visualizer drawers + // TODO: Add machine table visualizer OriginDrawer *m_originDrawer; GcodeDrawer *m_codeDrawer; GcodeDrawer *m_probeDrawer; diff --git a/src/candle/frmmain.ui b/src/candle/frmmain.ui index 96a452ab..1204bba0 100644 --- a/src/candle/frmmain.ui +++ b/src/candle/frmmain.ui @@ -1338,6 +1338,9 @@ QLabel[overrided="false"] { 0 + + X + @@ -1372,6 +1375,9 @@ QLabel[overrided="false"] { 0 + + Y + @@ -1406,6 +1412,9 @@ QLabel[overrided="false"] { 0 + + Z + @@ -1459,6 +1468,9 @@ QLabel[overrided="false"] { 0 + + X + @@ -1493,6 +1505,9 @@ QLabel[overrided="false"] { 0 + + Y + @@ -1527,6 +1542,9 @@ QLabel[overrided="false"] { 0 + + Z + @@ -2995,7 +3013,6 @@ padding-right: 8;
- StyledToolButton diff --git a/src/candle/images/cs.svg b/src/candle/images/cs.svg new file mode 100644 index 00000000..9c0bfbe3 --- /dev/null +++ b/src/candle/images/cs.svg @@ -0,0 +1,91 @@ + + + + + + + + + + image/svg+xml + + + + + + + + 0 + + diff --git a/src/candle/scriptfunctions.cpp b/src/candle/scriptfunctions.cpp index 9aa715eb..d628fa25 100644 --- a/src/candle/scriptfunctions.cpp +++ b/src/candle/scriptfunctions.cpp @@ -15,14 +15,14 @@ frmMain* ScriptFunctions::getFrmMain() return m_frmMain; } -void ScriptFunctions::sendCommands(QString commands, int id) +void ScriptFunctions::sendCommands(QString commands, int index) { - m_frmMain->sendCommands(commands, -(100 + id)); + m_frmMain->sendCommands(commands, index); } -void ScriptFunctions::sendCommand(QString command, int id) +void ScriptFunctions::sendCommand(QString command, int index) { - m_frmMain->sendCommand(command, -(100 + id)); + m_frmMain->sendCommand(command, index); } int ScriptFunctions::buttonSize() diff --git a/src/candle/scriptfunctions.h b/src/candle/scriptfunctions.h index 96b24175..8b3795b1 100644 --- a/src/candle/scriptfunctions.h +++ b/src/candle/scriptfunctions.h @@ -18,8 +18,8 @@ class ScriptFunctions: public QObject frmMain *getFrmMain(); public slots: - void sendCommands(QString commands, int id = 0); - void sendCommand(QString command, int id = 0); + void sendCommands(QString commands, int index = -100); + void sendCommand(QString command, int index = -100); int buttonSize(); void addAction(QAction *action); void removeAction(QAction *action); diff --git a/src/candleplugins/candleplugins.pro b/src/candleplugins/candleplugins.pro index d893ff38..67805803 100644 --- a/src/candleplugins/candleplugins.pro +++ b/src/candleplugins/candleplugins.pro @@ -1,7 +1,8 @@ TEMPLATE = subdirs TRANSLATIONS = camera/translation_ru.ts \ - usercommands/translation_ru.ts + usercommands/translation_ru.ts \ + coordinatesystem/translation_ru.ts qtPrepareTool(LRELEASE, lrelease) for(tsfile, TRANSLATIONS) { diff --git a/src/candleplugins/coordinatesystem/config.ini b/src/candleplugins/coordinatesystem/config.ini new file mode 100644 index 00000000..93c301e5 --- /dev/null +++ b/src/candleplugins/coordinatesystem/config.ini @@ -0,0 +1,3 @@ +[General] +title="Coordinate system" +name="CoordinateSystemPlugin" \ No newline at end of file diff --git a/src/candleplugins/coordinatesystem/images/0.png b/src/candleplugins/coordinatesystem/images/0.png new file mode 100644 index 0000000000000000000000000000000000000000..0579c9bc402f5dd892b32ec99f099f6eabe307bc GIT binary patch literal 782 zcmV+p1M&QcP)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10-H%h zK~#90?U_AmR6!JmpN%FV(MF?!F+va{iY#I&DuO~9zY1HiR7h*#Ur@2KRcr11_yK~T zpdyH36J^!Nq9Cy_i6JpDYcW|6yl3vr?9ALm&jZuEbI5nVUI#{j zI&c`c1bh~*Zvm(C+V7kz6elu|ytr)x-V1S06Z?(MIK_!vEr~lW#4TYK)K$R5Pv?l(XQA7E^|!K-(YroHd?>~&vAoERe;@s{@OAAm7wnl@M0xZ0d@)cJIDBO zLElMaM9BIw^8e_OJBFgIBNub-eZhXQWRhg_$BnY z&fjk2w?Ef~)QMD!p!8RF{rmO?j2%R(0!$0KYXLR}j2%R(0!#?H>lD~5=q=!rza5!W z1$ZmyuDiHlL2t53)&ObGzt=Io?m2ESsS5B+&=2A^4UP)>^DsO4>BTHoMTZ(^OJcWU z9-~FEhZ6Zs!d;4!XkdRD+!o>{kvB&xl2POn-pBks&j*21Php8$)IBoz=0sDY0%WVqtU9bV%r~KQ2q9}@@D2k#eilTJDZ!yawALXC(O8@`> M07*qoM6N<$f^|Dv3IG5A literal 0 HcmV?d00001 diff --git a/src/candleplugins/coordinatesystem/images/54.png b/src/candleplugins/coordinatesystem/images/54.png new file mode 100644 index 0000000000000000000000000000000000000000..e77ffc765f759990da38fe2f0701e710d109570c GIT binary patch literal 900 zcmV-~1AF|5P)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10})9? zK~#90?b%PLRCN@<@sIEM0)1+!SpGqSXrTm}e-?>tL}(#WxDZ?jxseJ~1UIcraG|8= zqJ`+DO@$Obqy%?HQ6z|13&9A2L{NlhnDQi1pNn6k!@PTE?w$GF>l^xg;RnO-o_o%j zbLXD(J7-8F5{X12kw_#Gi9{mte`87knNRR`M4R{VZUjBcam2*$a2z8M^grb^#v`tO zBKWir*K+jlDWhm0f-`k9jBl|xhO&MOz#zWD>R1ZO&cMadiFfv&KFn}+x zD&yK+p%UDPVQ6X(_fEsh!jl>kj<|PXIE7<)FJu29w&1r&b_!AED10B6@i{hQdKdO~ zwbB1UliZg%GSN$AFTKDm?8Hz(TbqQZoTck#6ps~*5r4Dvh3h#H;{Uavkt0)1e zD+#X04?@1kViCT}xqcDb@VE-c>Z}6G@oC0>quedZxb~Nj@yDuis!SCa$Dg=@QT&bD zLJ();HN1sa+UWQYCp^pIgE)mZGi2`wIpJmrA1h%!)?#J>*#Y6){)ha0aIi^!YmUqV zywkx}lpIiGB-Rb{@T)MnY2|k;{qOU3p=7r5NaxAXFkZ;mAH%;bdviMIs)W7rpKc@Y z+jC@MuUx83g1_YK4`FVFc1uxZ0PeN9mRAmIr^*1ds|L3!v|EZ^nxRgt%h|u}SzW(` zkGs^rRd)G2i=VpGIe|mihxsM%8^(3n3F(_izSYtTG?d=Oe#HVY9cOZ!8^`;Re5*A8 z%_Zy%J`!ei&F${1!sPa9j$`A(uVPvx-=YMdYz`O_1{KZ2iZS6pQbgAQVP-ICh>-+~ z4n0P2GJ?IR)YT3CD7^b^Pi4=8P64>kqyEP@iVfNyjGh~v0$0tE7>QGz&0000pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10~AR_ zK~#90?b%O=R#h0s@lT>dsSRqRf>0QZAW12-NNbUc7Dfc+s!c&4B9tv!U@K}$UGk7}l?rm)DQR@_5>^jLL=6Y&0!n9$-JK$%yAt*;^aW%-!>*~ zrA>o=YihJ+u@Pq**4M~RY{#7ieV5=#$@ttJeXC~tE<7xS*d~_ZIh?D}dbwbpp>Q|O zWQ;o5v)296EmQ9B9T~4?jG9%p_1bVaqxEysz+oPOQ<>+>a97V-Uu2%I*Wm17I^b%} zyS~F=PHRj<5;jZ+)J1~}J!`GaJij7sxh%tUz@wSxm!#rpF|Y&Lpwp_8oDCIyXK+mVwKd_!0%roRNEKjC>uWu1 z@sjH65BycwcW*|g$^lhvT1t~k`aacl@udzZZIkjbxzqur?VUaruSbKLO5r{oFsb|k zrjf1}6xXFRwW&5=g>O4*%}OP3-)Xjor2qCmv@qsxe1I)2wRYe=^@rPk+cmr|mA#cjFa&@y*g^dr|HR+DvJU*8``K~v_6WA(6n~ejVl~Q!LC{>#$@R@WF2SE@7K@bE% d5ClOX{{S$W+>6hjV#fdg002ovPDHLkV1oS#p}PP8 literal 0 HcmV?d00001 diff --git a/src/candleplugins/coordinatesystem/images/56.png b/src/candleplugins/coordinatesystem/images/56.png new file mode 100644 index 0000000000000000000000000000000000000000..ba785610f06f8985678e73dffd3faf530cefcb9c GIT binary patch literal 1105 zcmV-X1g`suP)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H11KvqQ zK~#90?b=Id-9;3~@sH75nrf@H@r^AM@oh_d)%rk-f>5NOTZOJf1jUUDH#IH<3!)1b zZUo&4Qi6hrC`E`xt1hfr2=&qWYzc{NP}_vowAaO?F}eBA|8ejC#-Q_s|04g)nctZ+ zch1b2dr2e`i9{liNF)-8MB;zP8UMBeZPJG;a1mDG6prEt?61;MnE(vp&WaA^F@>#d z*j7V27LJD_2a2G7#`1iUDJ@F(yIJ{A(*F;iqb5a(c0IO6`^W?y$ld>O@uGdj29My$dL9LI0?2A|^lHnj_>aulAz zULjjQh~*_Uo{#i5f)9iwSfu^A_G*kmI;jQ5gtgsUpz&S@8m-T}LWNixbreG%;k+D; zUuw{p`|QOfoew=wS2Z{y{e5fud^I}HKYGVN!yb`(%Ua2+cGw>t#y_% z7a~J=Xr{vh_!@^Xfg?hcS79A)6K-i@G=-z;$eefm7>~3+iZ`)SI1kLdOIU`xgamqP z#Qs;TnbB>V&DbPtJw^0j3%(PdmDWSe+MKqxl+av;_jCH#RHBdCxc~4;9-NhxcV@J|F4DG%M@s0e z&#}L!qVMxK-N~PLPPsrV$2&O=ZHw6Ljh09?;eDF;*d_7j?ynPIRm2CT1j#dx8EU=&O&z1O3 z1#J&1e~#!V0A-&c#kI!`LO?s!npABEiBi|#hn1g=EjlZYr-b6I7WQ=DNK+_bUsC<< zaX|R4zpCDkxT%eC=CT2=;M)q0Oye!#JN$!JxR9wwg(Nks{Tt#|8bV2Xudvhf3x1CapORg|NpiX-y+k6BNF)-8L?V$${O9=_ X?rLHAor-5s00000NkvXXu0mjfJYN!V literal 0 HcmV?d00001 diff --git a/src/candleplugins/coordinatesystem/images/57.png b/src/candleplugins/coordinatesystem/images/57.png new file mode 100644 index 0000000000000000000000000000000000000000..22992228ae09ce0d7563aef3e5010f144e3673f4 GIT binary patch literal 856 zcmV-e1E>6nP)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10_90W zK~#90?U_x8jZqlKf3AL$rjaeXNGgcPT zWR?~_vJeZAg@~HO(4>Zj7#}mP#Y0`=oO924->2@}ndet$^M3rF|8w4R-}5~01;a25 z!!QiPFbu;m#v2nNt~mj0R*X3a>>P3IJg{6bMk!~38+in}fTH5~6L?lmpxP(kFwo#Q{tY-8BQPmP@ETwqFb(*Ml(+*q^irt@T0Q43 z0B^JcrIf;hz+>PtunVZwGU1@ZuE|umgD-zEyBKqmKeI zaW2hAjIx?$F7Ot&+2~6(q!}7@9Kmh&2XWsbOQ``~d-U!o`Bi5V{wFpkQR`?x zt5M0XI&1KoUYwv)kGybQI@k5=>az|11f-P6zLIwcSgGh&op#*D`x7)mC2yyqS1)If z{dGa&eRV)DZsXSybbKZ6AnrC;oxcG;BTqDDB5Hwd+{TN@7n~SEC2vP;0(o(5Vckg0 zy^4Q-%Zq@0$Ug5&z8BfjVz}ke7$AKY$&4?N((wf;L1V7n9~rkPpm98ZTJgjr6+60! zD}W~AFM0dW=_sSoO8#zw@#cU|Oa7G7xF0YRGlr4Br(?U$P|4c^Oi{=wnYF+<;DyJS zYYYKbfz^qzS_7K9bLQbBwJB*p{%TqQECXiz8Q+ltrw_P?Ecq;7h!-N?`dz$2wnf7* i48t%C!!QiP$jNUpyxsPfm?!lB0000pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H11SCmB zK~#90?b=(6UQ-mn@t=-rJG3>b)rOWzGcH9-NL(Z0#U&cNA`&4%2-1YagG(X^kq9B> zg+xR=RQf=8YSC05`rs}o4RtBgb{N`DOmymDf32_M>~r?_ozpQ%_dhwAnSIvUYwdN; z-fORYhD;`t$z(E_OeT}bWDYtG`M(`VWFeMf7Wy!R-|!Va$L?-BP6@z+xUgFT1q@?Z zg4{yfhU+n}L~aM(!i!j4+q(i*Vo!tD9~Jf{3qc?0qVG3xT!NqPe!W2lMlQcMt5AhPNL2n0kRweYm z23PwxC7vRr$s*aOyBKRBb@l-RxWj*QcoD~9Q)0i{@UpNOD!TtIj;t}}{b*t%v^vqD z1^A|>tu4adpfQ@-34SaTJ5`*3!7gq5(9&;|Cbz=RSJ+yN?`qn3AM;ZOmvSJo64$mm z-z1#CY!~+KgF=ex6SBd%IHshpJvdW%8^+R)4-~K5e+lz_PJ+MiD=uyMTANF79;PSA zPQn#JUXMMY#|reO;IoMQW}zPF!DV;_yGr`sd;N%`Ivi_b%*Ia<$G$9(zb_*DCzce* z_u($#@S`jUE1DWmH!P1hHDdp%*CQ-mMY4}n*q9;I{jmV-(qKC5l=Dj*JGxEotP;7@ z^SviZ`nal0@j%uBWtCieIy^lhGbGI86do0}(nXw9rg$I&P?ik_+J2AK5Q81q`d!!n z6;Zl)AIJd2DzrgiZnpnj#9Sdeq|y^|8nOfE4-(w17SWNhC>r%Z^a7*?fv+))lU(- z@ebAr+wflD>(4Ur6s&$CBl>Wx&uf4#_PKOO1nr{*<;yZ?6nmS z>*5f!)Bg}zfU||e$VEaiGDE1>w+q$TI^mTs`*@kkOk5;vs``bLI9*7~+k|?5t#FPo p+lzGMP*!lgS(u`~&dV#*g54KzRTF002ovPDHLkV1gM5Dc1l1 literal 0 HcmV?d00001 diff --git a/src/candleplugins/coordinatesystem/images/59.png b/src/candleplugins/coordinatesystem/images/59.png new file mode 100644 index 0000000000000000000000000000000000000000..a2192ba4db375c6e3eeeeff13941e900ecc59b4c GIT binary patch literal 1120 zcmV-m1fTnfP)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H11MNvf zK~#90?b&U}pHm#b@z3ryW3!ouZDg5d)I1Fl7Sm#H5T?BLO7hf-Qc7qqh8Jp)_CnGK zd06p=rW8pOC5vba#qDViY#zpLyZ86v_g`+e>sXJ^sjTB-{WD#_$KO$ryJmR$~>; zOpN&suVWoPX~nw=HlovF`=y7yDY&~kE?4J%JdZhphx=b9GXb;k$^g2zVo4i8k7cqF zFb!|Cp#K}3m>b+s?!ZZ49agrWX8|^7ae<$V8L$+iiShgJ46ej!I2Bjn*&3M+uAb-w z+|iZ+yqd5vqCSvoyJM`mBMlOca+LbihodkG&3Yry3=tfGGuk7md} zF6x0QuInXyC?w$YME|GQks-eqFD9N{+DrIQNWi>Af9kDP@qVKJtX_gs8yFeS5yJT+ zu}74+yZg{HGtocVK*wi^{@KF6-%^5u%z%f*q2vpEk6j`OAK@uc!_Uajvpvy2w}CIa zYMu>T9uHCnY{TuM%1g02A^WG;A#ymX#)s5F3KPEu%*A8aB>g5nO!QC3y_t48HO~&} z3>e!!7T@D|hQxxGl3Od1k>VUYQ6pbl3*^+x8*zQcxE$8w){6eMxTi*L8{WbX_(^;k z3vogBw~i(FJoT_i0y_9o?9V&#bJv+694&5aF2ej8T^*b&X2V!!U^7n1@TVy!h{W~H z3S2C2K^hW=maWoL^1+1cGO>-edGP9p?RwIgi*FMSC8wj99d+wL)Am)nVKw8fgi|Bx zKfU>4QL8)Zj&1wJ8d3G^<(6Y=#Il4_9UPY-zfdfUoA9-$Hap$lVZ4U>#2vwN2|INQ z>x6T5!l@2UZqd$ku^?C3S<#}M#;i;@)sa^s=W<)Z#&(09bq3}E)sF3K(Z)P+4ym%U zt_=eZiSO+AhH^8-cUtAxOKmuY!|`Uq#$Q<6hLHmbe-&>uClNE$-|gSnf?tco9YD&) z`W9?Zp?E|DcMHz&?{9e_ZW8-^%CTYfg~=LmI9iY8{z>>$QPHguNA1)_=m8tY^d0dy za`xfh#gxk#dvgzaPgls)1v|d&#btvAJ(gUnEv9XilP@reBWxM>3R;|0xksYWan_w!pCIJU3rSnYLG1sgK;@5Ylj zum7-urhg!wg!9EE!(wskI$JD0JH@&CT`}eRxgnm`)xTWS_;W<5yGLBWZWX)42V&tZ m6bgkxp-?Ck3WY+U5B>%=2ch$l0b}3*0000pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H11d2&S zK~#90?V4L?T}2dzzoc!_SW9i2L`6}Gcd^BIsTRb`L%|zGT3Q52r9MN%k268 zS+mYQGjrBHkjZ2+nM@{=$z(E_%>Ry-|2lvQv;$`XCjs5SD6kLM3yh?ig%Z#L^aD$T zrXP4Sb)Y(HfsNwc4&Zr5yAtRHRsjnF_iMmMz*b-YI9M@80ImWi>!!u)Pb~YXoB|vW zp1)(CW{55gWl?ib+u^gBX<|F9Gwvi>kU&7-@;CP{XP-s%GJ;3bf83%aW zG2d3AZ3R9M+6iEV(47G6cXa*0b-+^K3gB*R7f^BDnlj-cZNQLYzShy+<>(%DboUF* zBygk9bOPT9-4Fg0%UK2-7Uq9oD|L~xfia=^6qw_T_p#8uToUIBp{oHGlxRzNz%k!a z=sOGBlS6&SfODL2y3kv2Pehzw2<_$wt;;N6moTpZs~h@mcKY2>GR``o`z12YhlT#V zNWIG$*a=I06}o}*fpO92UCNK&Y63eVW4uY|V-r}4x3Fyic8hx>z{wH*uM7PPk@1}; z^i$|9H;Go@eKCl4tqz$5_(bTvU89jsCx#0{lSyR?xQ( z#fB;g06TQt6WRACpfACDo@kFvz!dPexOZH!p=tsEUZH$pngrHkN8wmHMEh8R#}U!q zvU6b|!i@eM)sw5-<_#J<|mAV&?kx-TyLvK0w2Ahnb);$nIQPVG!`nrBQ*x^&;A!l{ z7fT=Ug$cF2#y$b_(O;J)?);T_E)V3_bJ z>wE00q0aI(tdLQLsznY&#(0g;ALL(n4X{<19|bP2_n8BHDf&$T*OrX2NoYThjImGX zha&ZoTZC~9c&gC12m307`VIpNopCM_x(ULCmm-5gAM^A{PD9u9zb3ruJ|_CtupLCv zg4OjyI<@v3V-fnNxGKGu;{EzNg09lEp=)$CV2v~8t3tC6o224Jp&KWD5pCjLXA%#U zXfHvR)sGcWLM(U29IE>^(uLIvlt#UKC}k=3%PM608FBUYC!N6Fc68evT@Cx1?8fT; zYQ3pp#oW{5raPT>;45J|PW(Zr9r)G>aJ|qiLnlAwN;!p2<5|b_zC^Ffu&pxWbpSY3 z=r&+mXVuAXqvC1zYIJFOXGPOzoIt%|X)kt$Po4Z5z}yOPvH3M{Fkkp z9PL?H!BuT>#YJ*mY*3-B&jU^r{SRSVQB@YA4?%~4UrY4!u~%akV=;EuV;aUjv_b5J nYbKM)WHOmdCX>lzG7kR$pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H12X{$C zK~#90?V4+B9Mu(ozuDP`*Xvi-UWX)GL+pC}SjQp{mAHkf5K_@1(tsNWnjZm`HmFY0 zf=UEx4G}bvC{3V0N_j|W8>FIyAOQ+AqK~wVQny3}H+F2d39+5J#P;rzxbfS&GyO5^ zvbOJ?owZ~7qw`6YcFs9-?!9O3J@?EVgN==ijg5_sjg5_sjg8I!9m@Z@0~wMBEC-eX z1;8NiFQ7a5J7Z)4*aVcWsjRH_=jR7f6=fwQBP*(^vU7dDjx3*VAd|+%#>d@%ZELGj z6~*Jr%37AHb0~^df8 z%o#?<$2081{1_P>%?6HQtogZ+1H1`*DxINO0LFo>;}a7TCtHo#l-Y!zJMABQPzRLE z(~TeaaXKTj006WAdpdi1=#4}^u`OdD7F#Y+4FY?Cbr?(I7T^cKWr_VpV5M1GR>tH6 zP8Q_keCD3@>+xl0lbf46&A_3mz2%|M!>YrPNR{`;V!4No9^DsDBnnnnR1hdA03a9) zlAoV1Y;5q#mErH~-RrwDG&ECn8Mp~(6Wmq}oWOYMGkFzgFdJMt;=tC+LqqSioIUGZ zT~Wc<*w{>)U|)a#wLdv>o_J~Nx<35mbI&0dJU|oT z!2`4d-vfRs(0v)m0%mm@(l3E2I)SEB9Uc68cvxtl==x*ZH*HFtx_1K&Zl{x*YK=th z^ZBT%s+zW~rl2>swCwNh?ez(CBf!to^zk4dikuJlg6t-%0RVU=o=E)R_wT!xQ@t9FWb(Bh1Ma)f z-+$%&habvpHtwjezXNz4C@x;Kh}yC;6h)!Bx*D(7E51wD-#8PCJpoio{GPVh$G=JB zGQSxG0H6!l^~aVLCgaI!b4E2d5s&}O<#gVuC<>py{(2Nep{%S7zh9J}0O-^_o~^rg z@792j#OAEU{&h;^GQSxI0N{n8(b0EKb#w@oE~m3_bwvd$N=v!M@27b2VuHb-&{ly< zn!|BN!?taM$-b0H+O+zj6OqW511^zbE&y%cH!! zT-pIe*YB*~xwBWIH%oNF^((+_q7(X`PXNA!QD+0tdj34&ni^S|i>@f!>v!(_vxz^m zX>OJuQV|`OnfkZ#G9;oB_~F!r%jM$!&71MK#Sh?}6DN4_@ZoevOG6l2tSEw310b!o zkR;N%%m5egGAYyYn+*+=mWaPD}3h0e6}Bm(~1Xi~U=Xq2G)G-~)a^a;qu!`+4x*dr=*;UFf<_XJ;qF z;R78w-)&lcuRJZ)c|Y&?gyjHZQQbj5=pTWjYjDfl*cpJ2;3u(Uj$?) zE>9ufwbZ0uL@RJX))6b);It?9)!S~PZl(C3Rns)0(I|ny^klrIwszLH1=ZnrY2*6! z`PVL67E6`Cb^Q3Lzjt-5diV5c5{YSNtaZR^z=Oc~6nPo2ALGDOglx6})=q_w0QCS~ zkB5U#KP@eGt|nV|?P7RTR57Dre7cKZJe(l%nS24`Fhu%gC*2JA2Fbw#I2?{oWbjF3 zMUewzOHKFTLb;BY!4SpZawYA;u!UvOS*YTAeK z)hE+0ayqaFc+!foEC7!JpUtr0g`f!|x&0PMq_Ir^zf0PG-)aM*9N@tCuZvlS7K);% z6Y;p;<#NsX2Lw&iT(M|W7_>!&g@19X>e$7Bfk1CxpYXe%s;ZN#!r}jJfgV+z%77;^ z3ZZK-w$IAs??NC3^kJL^zn=VUV`F1uV`F1uV`F1uW0Qve0Jf_BGQBe6$p8QV07*qo IM6N<$g8hfsa{vGU literal 0 HcmV?d00001 diff --git a/src/candleplugins/coordinatesystem/images/y0.png b/src/candleplugins/coordinatesystem/images/y0.png new file mode 100644 index 0000000000000000000000000000000000000000..05478068c245291db5dc380215cb8ef4fdaa2565 GIT binary patch literal 1127 zcmV-t1ep7YP)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H11N2Em zK~#90?V4MNRaF?rf6kbrW(dldY1l&~l9_@%6h1_v2oj=b1?59dXy}Vb`l9xbM3E0Y zMo8YefI=aHDG1uld`U5+ARWlmM6(gi@qU@p!#4wY=KHU`);=3L;QGOOS?jy4@2tJn z+TT8q$z(E_OeT}bWHOn|eaC?RJAg!5fhT}bz*yiqa2_}X{8`4JO29ba6ES`ocmt@F z@HY_n6lizGE&>aITh7>2U=c7M7%go70&E910%uFa){iaNB)zt%q|Frpn@b$|A;1Qp zC!kl~x`8)K#&-|xzy;ytZ(wAiy+?t|!rlR(rA~ejuwTf>v=0*Fb6FB_up!abSHjLs zV4@?xIp90CEl!NFA1%N^Vf-%eY^0qR13|v)$j=SPr?hVT{U(XYz-{5+2)40>7z&&a z`kmNw{$E;vqe8xht)zLt6yQ0a1Nb>0U&*8JVZg!i0^Romx-%U4IRW`q!bcmhTj*Q? zh8IsU%tP4m=Q;QX7$fv1V#k`N_nFYyB;tds2s$aV<(PYL-R;+FACLjO$6LS15V!Vl~K>}4PZjR_G+QGH!`+X^ojLM zq>Vz_fZv3ZYryO1tLr-jwl@pCFB9TBCv3dx3D;jgW4H+{6JtZLNq9^A81PK6^HPQc|*I70J04sq@k+NHXZzAN}AW2&R z-s`lq-ADq?0c#@Uy3jYcdg`ymeW+j6DRYza6n`o~7U#&$InQ3N~jUqRQEur&%@+dBiy;@-E-VZdAHI>3PvF(gxE0sz(vdws17 zD~11xeIO0VPA?fl5>+Rl9bMQ+X*-G>HRB!t_U-W%?AI;JA&NK7rcD4?@pLv;TutR5 z_BpPwkkZTv0DGI91bjqX@#S~yOV#thUoj4<`iID9{1=vsy{!t`ux}63fJd;?;tuv9 tg7#`y#xRN002ovPDHLkV1mqr2Fm~d literal 0 HcmV?d00001 diff --git a/src/candleplugins/coordinatesystem/images/z0.png b/src/candleplugins/coordinatesystem/images/z0.png new file mode 100644 index 0000000000000000000000000000000000000000..494e8ca49974ded288a926e8209cf07a423238d9 GIT binary patch literal 1053 zcmV+&1mgRNP)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H11FA_x zK~#90?V4R^j!_)IfBVR62-}b?r4_9dYb7ggR*Ecziw$Wt$_-PZRz7Y-Q%aH$jk~2x zA;oGp%2z%krj;^gG?SU_Wwy50#d$B*od0>wdERHd%lXyQ>VMAvnP~0g-1*{8Z1lVZMZ4~qxEc|X2 zbUXNq%U}l3CIk`(>I3w<1if_@zD;$j*l`@8NC$2hg17}_81!=ux_KNY$uz5OyDwd zfocMdIoOku7;~^OD9Fbp0mp%Iq3sFkgC_1^FI$jHZ&k;TAlD{0nFLe=wL)7LYTNng zXj2M4)4_(c&1z>x*aVaT=Y+N))Q->*!miW$6_CCaw96<=0t!$?FH30OiMoskgS6IN z5+KE;O|EMKvQUFB5ZX^8&kP%+YVUHhquuU+KAq4t0jE&YU&kF_x1+tWvOHwjj6V(An4eiaqcSE}^CxClnWDkI4n!ZE89^gD` zT7!BC6$zQ{&ae+vT)(&mb|3joMEO){e6J4Bi2<*G=fKy1zK2~0o(c&7^VOQ|(+L41FT8>6-ng;^q~guIE3y;R9$Ed>X^z20QJug%YnVf$K=uUpng_c zj9S8hn0A3ew3LcNgS X&?#0HHz>*^00000NkvXXu0mjf?K;jW literal 0 HcmV?d00001 diff --git a/src/candleplugins/coordinatesystem/script.js b/src/candleplugins/coordinatesystem/script.js new file mode 100644 index 00000000..24d9202f --- /dev/null +++ b/src/candleplugins/coordinatesystem/script.js @@ -0,0 +1,98 @@ +// This file is a part of "Candle" application. +// Copyright 2015-2021 Hayrullin Denis Ravilevich + +script.importExtension("qt.core"); +script.importExtension("qt.gui"); +script.importExtension("qt.widgets"); +script.importExtension("qt.custom"); +script.importExtension("qt.uitools"); + +// Vars +var appPath = QCoreApplication.applicationDirPath(); +var pluginPath = appPath + "/plugins/coordinatesystem"; +var loader = new QUiLoader(); +var settings = new QSettings(pluginPath + "/settings.ini", QSettings.IniFormat); +var appStatus = -1; +var currentCS = "G54"; +var currentOffsets = ""; + +// Ui +var uiPanel; +var uiSettings; + +function init() +{ + loader.setWorkingDirectory(new QDir(pluginPath)); + loader.addPluginPath(appPath); + + app.statusChanged.connect(onAppStatusChanged); + app.responseReceived.connect(onAppResponseReceived); +} + +function createPanelWidget() +{ + var f = new QFile(pluginPath + "/widget.ui"); + + function onCsClicked(cs) + { + return function() {app.sendCommands(cs);}; + } + + function onZeroClicked(a) + { + return function() {app.sendCommand("".concat("G10 L20 P", currentCS.slice(-1) - 3, " ", a));} + } + + if (f.open(QIODevice.ReadOnly)) { + uiPanel = loader.load(f); + + for (var i = 54; i <= 57; i++) { + uiPanel["cmdG" + i].clicked.connect(onCsClicked("G" + i)); + } + + uiPanel.cmdX0.clicked.connect(onZeroClicked("X0")); + uiPanel.cmdY0.clicked.connect(onZeroClicked("Y0")); + uiPanel.cmdZ0.clicked.connect(onZeroClicked("Z0")); + uiPanel.cmdAll0.clicked.connect(onZeroClicked("X0 Y0 Z0")); + } + return uiPanel; +} + +function onAppStatusChanged(status) +{ + uiPanel.setEnabled(status == 1); + + appStatus = status; +} + +function onAppResponseReceived(command, index, response) +{ + function displayOffsets(r) { + var gx = new RegExp(currentCS + ":([\\d\\.\\-]+),([\\d\\.\\-]+),([\\d\\.\\-]+)"); + var s = r.match(gx); + if (s) { + for (var i = 0; i < s.length; i++) { + uiPanel.txtOffsetX.value = parseFloat(s[1]); + uiPanel.txtOffsetY.value = parseFloat(s[2]); + uiPanel.txtOffsetZ.value = parseFloat(s[3]); + } + } + } + + if (command == "$G") { + var rx = new RegExp("G5[4-9]"); + var s = response.match(rx); + if (s) { + uiPanel["cmd" + s[0]].checked = true; + if (s[0] != currentCS) { + currentCS = s[0]; + displayOffsets(currentOffsets); + } + } + } + + if (command == "$#") { + currentOffsets = response; + displayOffsets(currentOffsets); + } +} diff --git a/src/candleplugins/coordinatesystem/translation_ru.qm b/src/candleplugins/coordinatesystem/translation_ru.qm new file mode 100644 index 0000000000000000000000000000000000000000..c71fec932f60ae869e30ce53257dee6ab8e7442b GIT binary patch literal 202 zcmcE7ks@*G{hX<16=n7(EZlq7iGhJZfam5pDpAct3w Q@vkQLe-S2@zdBsP0RQ7Fa{vGU literal 0 HcmV?d00001 diff --git a/src/candleplugins/coordinatesystem/translation_ru.ts b/src/candleplugins/coordinatesystem/translation_ru.ts new file mode 100644 index 00000000..35edd129 --- /dev/null +++ b/src/candleplugins/coordinatesystem/translation_ru.ts @@ -0,0 +1,18 @@ + + + + + frmMain + + Coordinate system + Система координат + + + + CoordinateSystem + + Offsets: + Смещения: + + + \ No newline at end of file diff --git a/src/candleplugins/coordinatesystem/widget.ui b/src/candleplugins/coordinatesystem/widget.ui new file mode 100644 index 00000000..eb626d9d --- /dev/null +++ b/src/candleplugins/coordinatesystem/widget.ui @@ -0,0 +1,425 @@ + + + CoordinateSystem + + + + 0 + 0 + 351 + 226 + + + + Form + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 4 + + + + + + + Offsets: + + + + + + + + + 6 + + + + + + 0 + 0 + + + + X + + + + + + Qt::AlignCenter + + + true + + + QAbstractSpinBox::NoButtons + + + 3 + + + -9999.000000000000000 + + + 9999.000000000000000 + + + 0.000000000000000 + + + + + + + + 0 + 0 + + + + Y + + + + + + Qt::AlignCenter + + + true + + + QAbstractSpinBox::NoButtons + + + 3 + + + -9999.000000000000000 + + + 9999.000000000000000 + + + 0.000000000000000 + + + + + + + + 0 + 0 + + + + Z + + + + + + Qt::AlignCenter + + + true + + + QAbstractSpinBox::NoButtons + + + 3 + + + -9999.000000000000000 + + + 9999.000000000000000 + + + 0.000000000000000 + + + + + + + + + + + + 0 + 0 + + + + Qt::Horizontal + + + + + + + + + + 0 + 0 + + + + ... + + + + images/55.pngimages/55.png + + + + 48 + 48 + + + + true + + + true + + + true + + + + + + + + 0 + 0 + + + + ... + + + + images/54.pngimages/54.png + + + + 48 + 48 + + + + true + + + true + + + true + + + + + + + + 0 + 0 + + + + ... + + + + images/56.pngimages/56.png + + + + 48 + 48 + + + + true + + + true + + + true + + + + + + + + 0 + 0 + + + + ... + + + + images/57.pngimages/57.png + + + + 48 + 48 + + + + true + + + true + + + true + + + + + + + + 0 + 0 + + + + ... + + + + images/x0.pngimages/x0.png + + + + 48 + 48 + + + + true + + + + + + + + 0 + 0 + + + + ... + + + + images/y0.pngimages/y0.png + + + + 48 + 48 + + + + true + + + + + + + + 0 + 0 + + + + ... + + + + images/z0.pngimages/z0.png + + + + 48 + 48 + + + + true + + + + + + + + 0 + 0 + + + + ... + + + + images/0.pngimages/0.png + + + + 48 + 48 + + + + true + + + + + + + + + + StyledToolButton + QToolButton +
styledtoolbutton.h
+
+
+ + +
From f9a8d7c545ac8f896d9c696778d5358d6519f19b Mon Sep 17 00:00:00 2001 From: Denvi Date: Mon, 11 Jan 2021 21:11:09 +0500 Subject: [PATCH 48/80] 'Coordinate system' plugin icons changed, tooltips added. Added selection box to 'User commands' plugin table. Added 'settingsSetByDefault' signal. --- src/candle/frmmain.cpp | 9 +- src/candle/frmmain.h | 5 +- src/candle/frmsettings.cpp | 3 + src/candle/frmsettings.h | 4 +- src/candle/images/cs1.svg | 226 ++++++++++++++++++ src/candle/images/cs2.svg | 119 +++++++++ src/candle/scriptfunctions.h | 1 + .../coordinatesystem/images/all0_1.png | Bin 0 -> 1168 bytes .../coordinatesystem/images/x0_1.png | Bin 0 -> 1271 bytes .../coordinatesystem/images/y0_1.png | Bin 0 -> 1100 bytes .../coordinatesystem/images/z0_1.png | Bin 0 -> 1042 bytes .../coordinatesystem/translation_ru.qm | Bin 202 -> 492 bytes .../coordinatesystem/translation_ru.ts | 16 ++ src/candleplugins/coordinatesystem/widget.ui | 32 ++- src/candleplugins/usercommands/script.js | 13 +- src/candleplugins/usercommands/settings.ui | 8 +- 16 files changed, 420 insertions(+), 16 deletions(-) create mode 100644 src/candle/images/cs1.svg create mode 100644 src/candle/images/cs2.svg create mode 100644 src/candleplugins/coordinatesystem/images/all0_1.png create mode 100644 src/candleplugins/coordinatesystem/images/x0_1.png create mode 100644 src/candleplugins/coordinatesystem/images/y0_1.png create mode 100644 src/candleplugins/coordinatesystem/images/z0_1.png diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index 41ff0f90..5539496d 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -261,6 +261,7 @@ frmMain::frmMain(QWidget *parent) : connect(this, &frmMain::settingsAboutToShow, &m_scriptFunctions, &ScriptFunctions::settingsAboutToShow); connect(this, &frmMain::settingsAccepted, &m_scriptFunctions, &ScriptFunctions::settingsAccepted); connect(this, &frmMain::settingsRejected, &m_scriptFunctions, &ScriptFunctions::settingsRejected); + connect(this, &frmMain::settingsSetByDefault, &m_scriptFunctions, &ScriptFunctions::settingsSetByDefault); connect(this, &frmMain::pluginsLoaded, &m_scriptFunctions, &ScriptFunctions::pluginsLoaded); // Loading settings @@ -1976,7 +1977,7 @@ void frmMain::onSerialPortReadyRead() while ((bufferLength() + cq.command.length() + 1) <= BUFFERLENGTH) { int r = 0; if (!cq.command.isEmpty()) r = sendCommand(cq.command, cq.tableIndex, cq.showInConsole); - if ((!r && !cq.command.isEmpty() && (m_queue.isEmpty() || cq.queue)) || m_queue.isEmpty()) break; + if ((!r && !cq.command.isEmpty() && (m_queue.isEmpty() || cq.wait)) || m_queue.isEmpty()) break; else cq = m_queue.takeFirst(); } } @@ -3152,7 +3153,7 @@ void frmMain::grblReset() updateControlsState(); } -int frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, bool queue) +int frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, bool wait) { // tableIndex: // 0...n - commands from g-code program @@ -3163,13 +3164,13 @@ int frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, bo if (!m_serialPort.isOpen() || !m_resetCompleted) return 0; // Commands queue - if (queue || (bufferLength() + command.length() + 1) > BUFFERLENGTH) { + if (wait || (bufferLength() + command.length() + 1) > BUFFERLENGTH) { CommandQueue cq; cq.command = command; cq.tableIndex = tableIndex; cq.showInConsole = showInConsole; - cq.queue = queue; + cq.wait = wait; m_queue.append(cq); return 0; diff --git a/src/candle/frmmain.h b/src/candle/frmmain.h index bdd485d6..483fcd90 100644 --- a/src/candle/frmmain.h +++ b/src/candle/frmmain.h @@ -66,7 +66,7 @@ struct CommandQueue { QString command; int tableIndex; bool showInConsole; - bool queue; + bool wait; }; class CancelException : public std::exception { @@ -103,6 +103,7 @@ class frmMain : public QMainWindow void settingsAboutToShow(); void settingsAccepted(); void settingsRejected(); + void settingsSetByDefault(); void pluginsLoaded(); private slots: @@ -346,7 +347,7 @@ private slots: // Communication void openPort(); void grblReset(); - int sendCommand(QString command, int tableIndex = -1, bool showInConsole = true, bool queue = false); + int sendCommand(QString command, int tableIndex = -1, bool showInConsole = true, bool wait = false); void sendCommands(QString commands, int tableIndex = -1); void sendNextFileCommands(); QString evaluateCommand(QString command); diff --git a/src/candle/frmsettings.cpp b/src/candle/frmsettings.cpp index 78567d9b..ac0d2451 100644 --- a/src/candle/frmsettings.cpp +++ b/src/candle/frmsettings.cpp @@ -79,6 +79,7 @@ frmSettings::frmSettings(QWidget *parent) : ui->listCategories->item(0)->setSelected(true); connect(ui->scrollSettings->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(onScrollBarValueChanged(int))); + connect(this, SIGNAL(settingsSetByDefault()), parent, SIGNAL(settingsSetByDefault())); // Shortcuts table ui->tblShortcuts->setItemDelegateForColumn(2, new ShortcutDelegate); @@ -661,6 +662,8 @@ void frmSettings::on_cmdDefaults_clicked() QString s = table->item(i, 0)->data(Qt::DisplayRole).toString(); table->item(i, 2)->setData(Qt::DisplayRole, d.keys().contains(s) ? d[s] : ""); } + + emit settingsSetByDefault(); } void frmSettings::on_cboFontSize_currentTextChanged(const QString &arg1) diff --git a/src/candle/frmsettings.h b/src/candle/frmsettings.h index d6a47c74..317f9ff9 100644 --- a/src/candle/frmsettings.h +++ b/src/candle/frmsettings.h @@ -136,12 +136,14 @@ class frmSettings : public QDialog bool autoLine(); void setAutoLine(bool value); +signals: + void settingsSetByDefault(); + protected: void showEvent(QShowEvent *se); private slots: void onScrollBarValueChanged(int value); - void on_cmdRefresh_clicked(); void on_cmdOK_clicked(); void on_cmdCancel_clicked(); diff --git a/src/candle/images/cs1.svg b/src/candle/images/cs1.svg new file mode 100644 index 00000000..8014cc02 --- /dev/null +++ b/src/candle/images/cs1.svg @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/src/candle/images/cs2.svg b/src/candle/images/cs2.svg new file mode 100644 index 00000000..8b0a8793 --- /dev/null +++ b/src/candle/images/cs2.svg @@ -0,0 +1,119 @@ + + + + + + + + + + image/svg+xml + + + + + + + + X + + + + + + + + + diff --git a/src/candle/scriptfunctions.h b/src/candle/scriptfunctions.h index 8b3795b1..9bc4f22c 100644 --- a/src/candle/scriptfunctions.h +++ b/src/candle/scriptfunctions.h @@ -35,6 +35,7 @@ public slots: void settingsAboutToShow(); void settingsAccepted(); void settingsRejected(); + void settingsSetByDefault(); void pluginsLoaded(); private: diff --git a/src/candleplugins/coordinatesystem/images/all0_1.png b/src/candleplugins/coordinatesystem/images/all0_1.png new file mode 100644 index 0000000000000000000000000000000000000000..31b2792959a7af214d312892fb0f16d3ffffea86 GIT binary patch literal 1168 zcmV;B1aJF^P)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H11RY64 zK~#90?b=IdTxAr%@n14YY_<5Htx{-x6a-OJ6ct5Xx#&s|EGoKFT)2>Kgoq%b_yk2< zC>7i)h=}WAL0i$5A|lrMtkzcgh;6Nn+SVqSad8rRCz(6FGxtvJ#NIz#n8|$ieCIpg z<9z3wP*G7)QBhG*5NF|)vXv;4doh8F%T}Z;wqgn|l&we^EXO`Hu&ZQUGBa49tOv1l z`tuUpRG{ny!4G2gXP$S;RcC&=5`Swpz!BjU&Is0P9()5QaCezX%@>3C)m#HK@JWyQ zyb1$7lHDz%PD^t_v0I3=m|WRQ)Xc- zamx3nJ>TY#J&FVPGa+vu&d;TFfjo?Vgpz+~9{3>~#5k_#K<0A1IxTZ@mdrZdDoFQ2 z_z3S~HQvyy>?61lU*eezvR315jF~&|$XK9T4&iBBjrZEL`yM-r?z|riFvFz_ASN(^#Q(rl~Gc zXWQ|zNVar!mA*{&Q@vlGqavVMFD28|(N%ab<%Ox~rw^%#Rem8xS~X~AfQBe+B!$&F z7;IY80a5IjlrPE~(%OqP#1`0t*YJTz-RI_3G)5xLon`r@MT7SV!>q`m%b+-mlKqY0 zJ3Jv~JQJO4fh`yti0f@09>6v+OWm?o?CGN-YqU`mQwmR-&SrFg<0E{n#jFpVeg(|9 z(zQAD_zEA25W1FAR!1zxPs8k}MKIK4fZ_HAST2_BW_?uJ?(`~r9CuByYLMMS?9KSz zrDB=Z#5KCnVZS}2n{?B5teId{gT^8@4W?IqM(`*;7ymAEhkSd#uULt9QLiyJ!v2xw zEwD`_L{8#$eN@senrrdAxo5&o;gVLDr`r6|O5sD-V?b0000pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H11cXUM zK~#90?b%z1R#gZKm)A+oC=q}|L?x*;VZ5=ADJSa!2)vQl%>)5HFT`TRWld}p7T@ul;J%?xMnz1G_6 z?6daT>!YTorlzK*rlzK*rlzK*=Kn@VftODpQT26spL*5c8Maz~u=F@P+m z?ZQbFWKP1*5t+YZ>aeXIVIG!mY=(ElcTbFE1@f-1VBc8G!7&x)mSPOniyM7Qf~*?~ zA$zC!8o5?!uH|$STDt_*4Eu`sGLPDMED5oAWuwCEC!9 z+p$jAJ$W)0V?v_b(%hM&bg;eAGPVP6N5<~OIf=S2!WQ9Zeg$)dt)JojrnU<^R6AAL zQnaWHH#Uu3STOG1M7?tbr>(*Crssn(;NvFQ-w2L4fQJ(Gl;Q;OZQbAKpC?Fu1!6v z*m|_2GEaQ*a2YNU&gOP35wblv7xVkrd?4(iL+GSqHx~-UnJoo!7vVF!+4O9nggtGU zDR{MA4EPpDCd!_TtcOi8xjkX$Wr{CD-NFu87#mPE26W?j)`J*xDK1VAUP4T(~5SD6@p1lefr~;-AHKY2~XK80Zbp z)9Al0L1$aW#Ivo27|Ok` zY>ep?EM;&WRrpk)&X%`;FVI^;#{H4`neeSvjnbp;fH6V^HqY<@;rGL` zaz2g7$#6$S`$pXX4~QH6V4|#Jv{?_TqpF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H11KCML zK~#90?b%ys9Yq|+@y|(28e^eaD=1Q>psk=36$GglN>#)v`Xs@J2)?LQ5J9BigW!V_ zQJ<|B1VK>I2QQ%3N{fOP6s^T;QEH8NtMp>k#3pUlhdGBF;?BwLo=swLzOV##{_~sv z{4+cM|I8tgNF)-8L?V$$Boc|l|BXiE{bN`iX}cGnRvhnU3`g1?!nTUKwX+6Ck>xzw z(NjV5G#rd*eu&<#y{?(3#B%O zhDR&Hgs&qS-(zt_-{vI%4Pj%-bAAeI3urtL>7U{HE_|Dp z0KmDJkUxRX(bu8x*%*)XeW?qdmf^al&RsaY3#~#tEdF1-r$fJYB7J^W-swJU5VBBS zhWY~cV@XNfLJVSe&Y&6o!kIaJh9mYF?kG9_8hj&Uj2AH^Ed31cwmpaN8*VD8Ux*vT zC-m|R+a>rZVp}%n58-cY#j3XVtv%rVHtpR)Af|-9r*>Wy55l!=cAFwLWpn;zIE<%p z+>Exo0A#}F(fagmD=}6f&cGk?C-*G|aFKWwIZ|S*;1 zrAL@#Ea#tBQTI}0{p^frXZ;~XW;!2+`h*p7XQv5t!xSEgv>gz#MHN26p+-n$-LO_j zy<1}j-3EYAY}CzRyncigJ>jfTl@0h3U)AGQKI`Q#)4g5lo`cB&-pWp9sHPt->#O1zSvCm(45lwE|{R%dK!7b-*!A3cx}; z&;?_{W$dpD?Z`sy0kv=}uYg*pqf8vcsX6bD3O{}(5{X12kw_#Gi9{mtALAcx{JdG_ Soj|()0000pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H11D{Dm zK~#90?b%CcTvZsr@!w3ENm3NGs0b286jNOkjV?qhLalV;N+?0G3pa{bT-t&lbfFY< zBZ!K)P^m8z7Ye=~_@W@xBBEFXjSgn&Sbi?`)l^=R z5p2V0WrVEf0Gx?;Fj+>(dJaG(tc3u4wb}*@k}(`YD>5GLQ|{@wzAfWUoL$<|0Z_wp z;?94BMge)lxLwE^e`Uz~0{7sQYRoUs-Qv!FCtPB^awWdT0-nbdu5HVDzhnH0UvOh3 z9+Y4Q{*>)}6PFi|HHF{tE+#sjkGJK0+#&lLArOn$SIUDDOyHPo=NA=QovZN&9=Eb+ z%L+hCI391eKi}4`6a8|sa28`*|K0+!#_&B}$56(6EC5S^eoqMA1%3F@7j?XnVa(Eq zITB+J<^)Hx$O}LVvzWoN1^wuo`yz(4gj|1WL3u~;NX~q>0JQK1=KIiHm>Yy`mu19p zTwGAzMEkdSjaV-Mm=W%TshE%|D#0yyN_K0#h@0?bL75k}{~qe$yLmp0VJokoPOZrmI3N^BG4|kdyxQ?>p@3ac9uz-&p9(A3FI&-S z@L5bpBc#ZdP!Yx$7Iw%TC2YxLSIjW{B%Zo@Wdz4ZLM|^8fa}`dxu~Q)|6)=&Pg#b| z+O4G2rt)|8|AH9M~B(qTiF4) z3O@>4zp@H&x484uIHM{>84Tl5!Rf;d4i3?5gi^UP0F!vqayPiCDg(9(T~(IzOn;TeK3Pt6l=P2IR{5&JHIHW#vUMBuour*Zg}>KSnEfi64vt$sD!*MFsyu6*9$G7s!Jpii9{liNF)-8MB+cXuz?MTAWeHDn)XQ2v`3+7kHW282^fGDKp#5+1JH)W0O)@!7CRtx zU@-xT+p-w2IKd4QM1-M2F*p!G=CY?1<@zRO<}r2vIlO|5e>J)Pi!ibL)!`Bb0Pyc$ AiU0rr delta 36 ncmaFEe2Q^`h?oG+&2v@^K)_q)<_o0kGl4|kL@(#b{fw~yw3`WJ diff --git a/src/candleplugins/coordinatesystem/translation_ru.ts b/src/candleplugins/coordinatesystem/translation_ru.ts index 35edd129..65fb6d3d 100644 --- a/src/candleplugins/coordinatesystem/translation_ru.ts +++ b/src/candleplugins/coordinatesystem/translation_ru.ts @@ -14,5 +14,21 @@ Offsets: Смещения: + + Zero X + Обнулить X + + + Zero Y + Обнулить Y + + + Zero Z + Обнулить Z + + + Zero All + Обнулить все +
\ No newline at end of file diff --git a/src/candleplugins/coordinatesystem/widget.ui b/src/candleplugins/coordinatesystem/widget.ui index eb626d9d..8822d3a8 100644 --- a/src/candleplugins/coordinatesystem/widget.ui +++ b/src/candleplugins/coordinatesystem/widget.ui @@ -185,6 +185,9 @@ 0 + + G55 + ... @@ -217,6 +220,9 @@ 0 + + G54 + ... @@ -249,6 +255,9 @@ 0 + + G56 + ... @@ -281,6 +290,9 @@ 0 + + G57 + ... @@ -313,12 +325,15 @@ 0 + + Zero X + ... - images/x0.pngimages/x0.png + images/x0_1.pngimages/x0_1.png @@ -339,12 +354,15 @@ 0 + + Zero Y + ... - images/y0.pngimages/y0.png + images/y0_1.pngimages/y0_1.png @@ -365,12 +383,15 @@ 0 + + Zero Z + ... - images/z0.pngimages/z0.png + images/z0_1.pngimages/z0_1.png @@ -391,12 +412,15 @@ 0 + + Zero All + ... - images/0.pngimages/0.png + images/all0_1.pngimages/all0_1.png diff --git a/src/candleplugins/usercommands/script.js b/src/candleplugins/usercommands/script.js index 37d6cbcb..9cfed259 100644 --- a/src/candleplugins/usercommands/script.js +++ b/src/candleplugins/usercommands/script.js @@ -94,7 +94,6 @@ function onCmdRemoveClicked() t.removeRow(r); t.setCurrentCell(r <= (t.rowCount - 1) ? r : t.rowCount - 1, c); - t.setFocus(); } function onCmdRemoveAllClicked() @@ -116,7 +115,6 @@ function onCmdUpClicked() t.removeRow(r + 1); t.setCurrentCell(r - 1, c); } - t.setFocus(); } function onCmdDownClicked() @@ -133,7 +131,6 @@ function onCmdDownClicked() t.removeRow(r); t.setCurrentCell(r + 1, c); } - t.setFocus(); } function onAppSettingsLoaded() @@ -351,6 +348,10 @@ IconDelegate.prototype.paint = function(painter, option, index) { var q = index.data(Qt.DecorationRole); + if (option.state() & QStyle.State_Selected) { + painter.fillRect(option.rect(), new QColor(0xcdcdff)); + } + if (q) { q.paint(painter, option.rect()); } @@ -408,6 +409,10 @@ CodeDelegate.prototype.paint = function(painter, option, index) { var q = index.data(); + if (option.state() & QStyle.State_Selected) { + painter.fillRect(option.rect(), new QColor(0xcdcdff)); + } + if (q) { var m = new QFontMetrics(option.font()); var r = option.rect().adjusted(4, 4, -4, -4); @@ -423,7 +428,7 @@ CodeDelegate.prototype.paint = function(painter, option, index) painter.drawText(r, this.alignment | 0, s, r); } - + if (option.state() & QStyle.State_HasFocus) { var p = new QPen(); p.setStyle(Qt.DotLine); diff --git a/src/candleplugins/usercommands/settings.ui b/src/candleplugins/usercommands/settings.ui index cd7d9afd..76130fa8 100644 --- a/src/candleplugins/usercommands/settings.ui +++ b/src/candleplugins/usercommands/settings.ui @@ -41,7 +41,13 @@ QAbstractScrollArea::AdjustToContents - QAbstractItemView::NoSelection + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + Qt::DashLine 1 From 4d54131f04c56efb578114f6d80067d43bca4298 Mon Sep 17 00:00:00 2001 From: Denvi Date: Mon, 11 Jan 2021 21:31:48 +0500 Subject: [PATCH 49/80] Custom widgets added to project file --- src/designerplugins/designerplugins.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/designerplugins/designerplugins.pro b/src/designerplugins/designerplugins.pro index 97ae3672..dbbe8b8c 100644 --- a/src/designerplugins/designerplugins.pro +++ b/src/designerplugins/designerplugins.pro @@ -1,6 +1,6 @@ TEMPLATE = subdirs -SUBDIRS = cameraplugin +SUBDIRS = cameraplugin customwidgetsplugin install_cameraplugin.path = ../../bin/plugins/camera/plugins install_cameraplugin.files = cameraplugin/release/cameraplugin.dll From 0938ea1a4b870cd4e9152c4ad57151c43f282989 Mon Sep 17 00:00:00 2001 From: Denvi Date: Tue, 12 Jan 2021 19:34:49 +0500 Subject: [PATCH 50/80] Device/sender states refactor --- src/candle/frmmain.cpp | 284 +++++++++++++++++++-------------------- src/candle/frmmain.h | 42 +++++- src/candle/frmsettings.h | 1 + 3 files changed, 174 insertions(+), 153 deletions(-) diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index 5539496d..e55fdc83 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -1,21 +1,6 @@ // This file is a part of "Candle" application. // Copyright 2015-2021 Hayrullin Denis Ravilevich -#define UNKNOWN 0 -#define IDLE 1 -#define ALARM 2 -#define RUN 3 -#define HOME 4 -#define HOLD0 5 -#define HOLD1 6 -#define QUEUE 7 -#define CHECK 8 -#define DOOR 9 -#define JOG 10 - -#define PROGRESSMINLINES 10000 -#define PROGRESSSTEP 1000 - #include #include #include @@ -40,50 +25,58 @@ frmMain::frmMain(QWidget *parent) : ui(new Ui::frmMain) { // Initializing variables - m_status << "Unknown" - << "Idle" - << "Alarm" - << "Run" - << "Home" - << "Hold:0" - << "Hold:1" - << "Queue" - << "Check" - << "Door" // TODO: Update "Door" state - << "Jog"; // TODO: Add "Sleep" state - m_statusCaptions << tr("Unknown") - << tr("Idle") - << tr("Alarm") - << tr("Run") - << tr("Home") - << tr("Hold") - << tr("Hold") - << tr("Queue") - << tr("Check") - << tr("Door") - << tr("Jog"); - m_statusBackColors << "red" - << "palette(button)" - << "red" - << "lime" - << "lime" - << "yellow" - << "yellow" - << "yellow" - << "palette(button)" - << "red" - << "lime"; - m_statusForeColors << "white" - << "palette(text)" - << "white" - << "black" - << "black" - << "black" - << "black" - << "black" - << "palette(text)" - << "white" - << "black"; + m_deviceStatuses[DeviceUnknown] = "Unknown"; + m_deviceStatuses[DeviceIdle] = "Idle"; + m_deviceStatuses[DeviceAlarm] = "Alarm"; + m_deviceStatuses[DeviceRun] = "Run"; + m_deviceStatuses[DeviceHome] = "Home"; + m_deviceStatuses[DeviceHold0] = "Hold:0"; + m_deviceStatuses[DeviceHold1] = "Hold:1"; + m_deviceStatuses[DeviceQueue] = "Queue"; + m_deviceStatuses[DeviceCheck] = "Check"; + m_deviceStatuses[DeviceDoor] = "Door"; + m_deviceStatuses[DeviceJog] = "Jog"; + m_deviceStatuses[DeviceSleep] = "Sleep"; + + m_statusCaptions[DeviceUnknown] = tr("Unknown"); + m_statusCaptions[DeviceIdle] = tr("Idle"); + m_statusCaptions[DeviceAlarm] = tr("Alarm"); + m_statusCaptions[DeviceRun] = tr("Run"); + m_statusCaptions[DeviceHome] = tr("Home"); + m_statusCaptions[DeviceHold0] = tr("Hold"); + m_statusCaptions[DeviceHold1] = tr("Hold"); + m_statusCaptions[DeviceQueue] = tr("Queue"); + m_statusCaptions[DeviceCheck] = tr("Check"); + m_statusCaptions[DeviceDoor] = tr("Door"); + m_statusCaptions[DeviceJog] = tr("Jog"); + m_statusCaptions[DeviceSleep] = tr("Sleep"); + + m_statusBackColors[DeviceUnknown] = "red"; + m_statusBackColors[DeviceIdle] = "palette(button)"; + m_statusBackColors[DeviceAlarm] = "red"; + m_statusBackColors[DeviceRun] = "lime"; + m_statusBackColors[DeviceHome] = "lime"; + m_statusBackColors[DeviceHold0] = "yellow"; + m_statusBackColors[DeviceHold1] = "yellow"; + m_statusBackColors[DeviceQueue] = "yellow"; + m_statusBackColors[DeviceCheck] = "palette(button)"; + m_statusBackColors[DeviceDoor] = "red"; + m_statusBackColors[DeviceJog] = "lime"; + m_statusBackColors[DeviceSleep] = "blue"; + + m_statusForeColors[DeviceUnknown] = "white"; + m_statusForeColors[DeviceIdle] = "palette(text)"; + m_statusForeColors[DeviceAlarm] = "white"; + m_statusForeColors[DeviceRun] = "black"; + m_statusForeColors[DeviceHome] = "black"; + m_statusForeColors[DeviceHold0] = "black"; + m_statusForeColors[DeviceHold1] = "black"; + m_statusForeColors[DeviceQueue] = "black"; + m_statusForeColors[DeviceCheck] = "palette(text)"; + m_statusForeColors[DeviceDoor] = "white"; + m_statusForeColors[DeviceJog] = "black"; + m_statusForeColors[DeviceSleep] = "white"; + m_fileChanged = false; m_heightMapChanged = false; @@ -96,9 +89,7 @@ frmMain::frmMain(QWidget *parent) : m_aborting = false; m_statusReceived = false; - m_processingFile = false; - m_transferCompleted = false; - m_fileEndSent = false; + m_senderState = SenderStopped; m_spindleCW = true; @@ -131,7 +122,6 @@ frmMain::frmMain(QWidget *parent) : m_fileProcessedCommandIndex = 0; m_programLoading = false; m_currentModel = &m_programModel; - m_transferCompleted = true; // Dock widgets setCorner(Qt::TopLeftCorner, Qt::LeftDockWidgetArea); @@ -378,8 +368,10 @@ void frmMain::closeEvent(QCloseEvent *ce) return; } - if (m_processingFile && QMessageBox::warning(this, this->windowTitle(), tr("File sending in progress. Terminate and exit?"), - QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) { + if ((m_senderState != SenderStopped) && + QMessageBox::warning(this, this->windowTitle(), tr("File sending in progress. Terminate and exit?"), + QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) + { ce->ignore(); m_heightMapMode = mode; return; @@ -396,7 +388,7 @@ void frmMain::closeEvent(QCloseEvent *ce) void frmMain::dragEnterEvent(QDragEnterEvent *dee) { - if (m_processingFile) return; + if (m_senderState != SenderStopped) return; if (dee->mimeData()->hasFormat("application/widget")) return; @@ -748,8 +740,7 @@ void frmMain::on_cmdFileSend_clicked() m_startTime.start(); - m_transferCompleted = false; - m_processingFile = true; + m_senderState = SenderTransferring; m_fileEndSent = false; m_storedKeyboardControl = ui->chkKeyboardControl->isChecked(); ui->chkKeyboardControl->setChecked(false); @@ -976,7 +967,8 @@ void frmMain::on_chkKeyboardControl_toggled(bool checked) if (m_absoluteCoordinates) sendCommand("G90", -1, m_settings->showUICommands()); } - if (!m_processingFile) m_storedKeyboardControl = checked; + if ((m_senderState != SenderTransferring) && (m_senderState != SenderTransferCompleted)) + m_storedKeyboardControl = checked; updateJogTitle(); updateControlsState(); @@ -1483,7 +1475,7 @@ void frmMain::on_cmdStop_clicked() void frmMain::on_tblProgram_customContextMenuRequested(const QPoint &pos) { - if (m_processingFile) return; + if (m_senderState != SenderStopped) return; if (ui->tblProgram->selectionModel()->selectedRows().count() > 0) { m_tableMenu->actions().at(0)->setEnabled(true); @@ -1561,7 +1553,7 @@ void frmMain::onSerialPortReadyRead() // Status response if (data[0] == '<') { - int status = -1; + DeviceState state = DeviceUnknown; m_statusReceived = true; @@ -1582,40 +1574,38 @@ void frmMain::onSerialPortReadyRead() // Status static QRegExp stx("<([^,^>^|]*)"); if (stx.indexIn(data) != -1) { - status = m_status.indexOf(stx.cap(1)); - - // Undetermined status - if (status == -1) status = 0; + state = m_deviceStatuses.key(stx.cap(1), DeviceUnknown); // Update status - if (status != m_lastGrblStatus) { - ui->txtStatus->setText(m_statusCaptions[status]); + if (state != m_deviceState) { + ui->txtStatus->setText(m_statusCaptions[state]); ui->txtStatus->setStyleSheet(QString("background-color: %1; color: %2;") - .arg(m_statusBackColors[status]).arg(m_statusForeColors[status])); - emit statusChanged(status); + .arg(m_statusBackColors[state]).arg(m_statusForeColors[state])); + emit statusChanged(state); } // Update controls - ui->cmdCheck->setEnabled(status != RUN && !m_processingFile); - ui->cmdCheck->setChecked(status == CHECK); - ui->cmdFilePause->setChecked(status == HOLD0 || status == HOLD1 || status == QUEUE); - ui->cmdSpindle->setEnabled(!m_processingFile || status == HOLD0); + ui->cmdCheck->setEnabled(state != DeviceRun && (m_senderState == SenderStopped)); + ui->cmdCheck->setChecked(state == DeviceCheck); + ui->cmdFilePause->setChecked(state == DeviceHold0 || state == DeviceHold1 || state == DeviceQueue); + ui->cmdSpindle->setEnabled(state == DeviceHold0 || ((m_senderState != SenderTransferring) && + (m_senderState != SenderTransferCompleted))); #ifdef WINDOWS if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { - if (m_taskBarProgress) m_taskBarProgress->setPaused(status == HOLD0 || status == HOLD1 || status == QUEUE); + if (m_taskBarProgress) m_taskBarProgress->setPaused(state == DeviceHold0 || state == DeviceHold1 || state == DeviceQueue); } #endif // Update "elapsed time" timer - if (m_processingFile) { + if ((m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted)) { QTime time(0, 0, 0); int elapsed = m_startTime.elapsed(); ui->glwVisualizer->setSpendTime(time.addMSecs(elapsed)); } // Test for job complete - if (m_processingFile && m_transferCompleted && - ((status == IDLE && m_lastGrblStatus == RUN) || status == CHECK)) { + if ((m_senderState == SenderTransferCompleted) && + ((state == DeviceIdle && m_deviceState == DeviceRun) || state == DeviceCheck)) { // Shadow last segment GcodeViewParse *parser = m_currentDrawer->viewParser(); @@ -1626,7 +1616,7 @@ void frmMain::onSerialPortReadyRead() } // Update state - m_processingFile = false; + m_senderState = SenderStopped; m_fileProcessedCommandIndex = 0; m_lastDrawnLineIndex = 0; m_storedParserStatus.clear(); @@ -1646,27 +1636,24 @@ void frmMain::onSerialPortReadyRead() m_timerStateQuery.start(); } - // Store status - if (status != m_lastGrblStatus) m_lastGrblStatus = status; - // Abort static double x = sNan; static double y = sNan; static double z = sNan; if (m_aborting) { - switch (status) { - case IDLE: // Idle - if (!m_processingFile && m_resetCompleted) { + switch (state) { + case DeviceIdle: // Idle + if ((m_senderState == SenderStopped) && m_resetCompleted) { m_aborting = false; restoreParserState(); restoreOffsets(); return; } break; - case HOLD0: // Hold - case HOLD1: - case QUEUE: + case DeviceHold0: // Hold + case DeviceHold1: + case DeviceQueue: if (!m_reseting && compareCoordinates(x, y, z)) { x = sNan; y = sNan; @@ -1704,7 +1691,7 @@ void frmMain::onSerialPortReadyRead() // Update tool position QVector3D toolPosition; - if (!(status == CHECK && m_fileProcessedCommandIndex < m_currentModel->rowCount() - 1)) { + if (!(state == DeviceCheck && m_fileProcessedCommandIndex < m_currentModel->rowCount() - 1)) { toolPosition = QVector3D(toMetric(ui->txtWPosX->value()), toMetric(ui->txtWPosY->value()), toMetric(ui->txtWPosZ->value())); @@ -1713,7 +1700,7 @@ void frmMain::onSerialPortReadyRead() // Toolpath shadowing - if (m_processingFile && status != CHECK) { + if (((m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted)) && state != DeviceCheck) { GcodeViewParse *parser = m_currentDrawer->viewParser(); bool toolOntoolpath = false; @@ -1774,9 +1761,9 @@ void frmMain::onSerialPortReadyRead() // Process spindle state static QRegExp as("A:([^,^>^|]+)"); if (as.indexIn(data) != -1) { - QString state = as.cap(1); - m_spindleCW = state.contains("S"); - if (state.contains("S") || state.contains("C")) { + QString q = as.cap(1); + m_spindleCW = q.contains("S"); + if (q.contains("S") || q.contains("C")) { m_timerToolAnimation.start(25, this); ui->cmdSpindle->setChecked(true); } else { @@ -1799,6 +1786,9 @@ void frmMain::onSerialPortReadyRead() ui->glwVisualizer->setSpeedState((QString(tr("F/S: %1 / %2")).arg(fs.cap(1)).arg(fs.cap(2)))); } + // Store device state + m_deviceState = state; + // Emit status signal emit statusReceived(data); @@ -1847,7 +1837,7 @@ void frmMain::onSerialPortReadyRead() ui->glwVisualizer->setParserStatus(response.left(response.indexOf("; "))); // Store parser status - if (m_processingFile) storeParserState(); + if ((m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted)) storeParserState(); // Spindle speed QRegExp rx(".*S([\\d\\.]+)"); @@ -1983,7 +1973,7 @@ void frmMain::onSerialPortReadyRead() } // Add response to table, send next program commands - if (m_processingFile) { + if ((m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted)) { // Only if command from table if (ca.tableIndex > -1) { @@ -2031,9 +2021,8 @@ void frmMain::onSerialPortReadyRead() } // Check transfer complete (last row always blank, last command row = rowcount - 2) - if (m_fileProcessedCommandIndex == m_currentModel->rowCount() - 2 - || uncomment.contains(QRegExp("M0*2|M30"))) - m_transferCompleted = true; + if ((m_fileProcessedCommandIndex == m_currentModel->rowCount() - 2) || uncomment.contains(QRegExp("M0*2|M30"))) + m_senderState = SenderTransferCompleted; // Send next program commands else if (!m_fileEndSent && (m_fileCommandIndex < m_currentModel->rowCount()) && !holding) sendNextFileCommands(); } @@ -2042,11 +2031,11 @@ void frmMain::onSerialPortReadyRead() if (uncomment.contains("M30")) ui->tblProgram->setCurrentIndex(m_currentModel->index(0, 1)); // Toolpath shadowing on check mode - if (m_statusCaptions.indexOf(ui->txtStatus->text()) == CHECK) { + if (m_deviceState == DeviceCheck) { GcodeViewParse *parser = m_currentDrawer->viewParser(); QList list = parser->getLineSegmentList(); - if (!m_transferCompleted && m_fileProcessedCommandIndex < m_currentModel->rowCount() - 1) { + if ((m_senderState != SenderTransferCompleted) && m_fileProcessedCommandIndex < m_currentModel->rowCount() - 1) { int i; QList drawnLines; @@ -2088,14 +2077,14 @@ void frmMain::onSerialPortReadyRead() // Unprocessed responses // Handle hardware reset if (dataIsReset(data)) { - m_processingFile = false; - m_transferCompleted = true; + m_senderState = SenderStopped; + m_deviceState = DeviceUnknown; + m_fileCommandIndex = 0; m_reseting = false; m_homing = false; - m_lastGrblStatus = -1; - + m_updateParserStatus = true; m_statusReceived = true; @@ -2154,7 +2143,8 @@ void frmMain::onTimerStateQuery() void frmMain::onTableInsertLine() { - if (ui->tblProgram->selectionModel()->selectedRows().count() == 0 || m_processingFile) return; + if (ui->tblProgram->selectionModel()->selectedRows().count() == 0 || + (m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted)) return; int row = ui->tblProgram->selectionModel()->selectedRows()[0].row(); @@ -2168,8 +2158,9 @@ void frmMain::onTableInsertLine() void frmMain::onTableDeleteLines() { - if (ui->tblProgram->selectionModel()->selectedRows().count() == 0 || m_processingFile || - QMessageBox::warning(this, this->windowTitle(), tr("Delete lines?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) return; + if (ui->tblProgram->selectionModel()->selectedRows().count() == 0 || + (m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted) || + QMessageBox::warning(this, this->windowTitle(), tr("Delete lines?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) return; QModelIndex firstRow = ui->tblProgram->selectionModel()->selectedRows()[0]; int rowsCount = ui->tblProgram->selectionModel()->selectedRows().count(); @@ -2378,8 +2369,7 @@ void frmMain::onActSendFromLineTriggered() m_startTime.start(); - m_transferCompleted = false; - m_processingFile = true; + m_senderState = SenderTransferring; m_fileEndSent = false; m_storedKeyboardControl = ui->chkKeyboardControl->isChecked(); ui->chkKeyboardControl->setChecked(false); @@ -2434,7 +2424,8 @@ void frmMain::onScroolBarAction(int action) { Q_UNUSED(action) - if (m_processingFile) ui->chkAutoScroll->setChecked(false); + if ((m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted)) + ui->chkAutoScroll->setChecked(false); } void frmMain::onScriptException(const QScriptValue &exception) @@ -3126,15 +3117,14 @@ void frmMain::grblReset() { m_serialPort.write(QByteArray(1, (char)24)); - m_processingFile = false; - m_transferCompleted = true; + m_senderState = SenderStopped; + m_deviceState = DeviceUnknown; m_fileCommandIndex = 0; m_reseting = true; m_homing = false; m_resetCompleted = false; m_updateSpindleSpeed = true; - m_lastGrblStatus = -1; m_statusReceived = true; // Drop all remaining commands in buffer @@ -3698,34 +3688,35 @@ void frmMain::setupCoordsTextboxes() void frmMain::updateControlsState() { bool portOpened = m_serialPort.isOpen(); + bool process = (m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted); ui->grpState->setEnabled(portOpened); ui->grpControl->setEnabled(portOpened); ui->widgetSpindle->setEnabled(portOpened); - ui->widgetJog->setEnabled(portOpened && !m_processingFile); + ui->widgetJog->setEnabled(portOpened && !process); ui->cboCommand->setEnabled(portOpened && (!ui->chkKeyboardControl->isChecked())); ui->cmdCommandSend->setEnabled(portOpened); - ui->cmdCheck->setEnabled(portOpened && !m_processingFile); - ui->cmdHome->setEnabled(!m_processingFile); - ui->cmdCheck->setEnabled(!m_processingFile); - ui->cmdUnlock->setEnabled(!m_processingFile); - ui->cmdSpindle->setEnabled(!m_processingFile); - - ui->actFileNew->setEnabled(!m_processingFile); - ui->actFileOpen->setEnabled(!m_processingFile); - ui->cmdFileOpen->setEnabled(!m_processingFile); - ui->cmdFileReset->setEnabled(!m_processingFile && m_programModel.rowCount() > 1); - ui->cmdFileSend->setEnabled(portOpened && !m_processingFile && m_programModel.rowCount() > 1); + ui->cmdCheck->setEnabled(portOpened && !process); + ui->cmdHome->setEnabled(!process); + ui->cmdCheck->setEnabled(!process); + ui->cmdUnlock->setEnabled(!process); + ui->cmdSpindle->setEnabled(!process); + + ui->actFileNew->setEnabled(!process); + ui->actFileOpen->setEnabled(!process); + ui->cmdFileOpen->setEnabled(!process); + ui->cmdFileReset->setEnabled(!process && m_programModel.rowCount() > 1); + ui->cmdFileSend->setEnabled(portOpened && !process && m_programModel.rowCount() > 1); ui->cmdFilePause->setEnabled(portOpened && !ui->cmdCheck->isChecked()); - ui->cmdFileAbort->setEnabled(m_processingFile); - ui->actFileOpen->setEnabled(!m_processingFile); - ui->mnuRecent->setEnabled(!m_processingFile && ((m_recentFiles.count() > 0 && !m_heightMapMode) + ui->cmdFileAbort->setEnabled(process); + ui->actFileOpen->setEnabled(!process); + ui->mnuRecent->setEnabled(!process && ((m_recentFiles.count() > 0 && !m_heightMapMode) || (m_recentHeightmaps.count() > 0 && m_heightMapMode))); ui->actFileSave->setEnabled(m_programModel.rowCount() > 1); ui->actFileSaveAs->setEnabled(m_programModel.rowCount() > 1); - ui->tblProgram->setEditTriggers(m_processingFile ? QAbstractItemView::NoEditTriggers : + ui->tblProgram->setEditTriggers(process ? QAbstractItemView::NoEditTriggers : QAbstractItemView::DoubleClicked | QAbstractItemView::SelectedClicked | QAbstractItemView::EditKeyPressed | QAbstractItemView::AnyKeyPressed); @@ -3738,11 +3729,11 @@ void frmMain::updateControlsState() { this->setWindowTitle(m_programFileName.isEmpty() ? qApp->applicationDisplayName() : m_programFileName.mid(m_programFileName.lastIndexOf("/") + 1) + " - " + qApp->applicationDisplayName()); - if (!m_processingFile) ui->chkKeyboardControl->setChecked(m_storedKeyboardControl); + if (!process) ui->chkKeyboardControl->setChecked(m_storedKeyboardControl); #ifdef WINDOWS if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { - if (!m_processingFile && m_taskBarProgress) m_taskBarProgress->hide(); + if (!process && m_taskBarProgress) m_taskBarProgress->hide(); } #endif @@ -3775,7 +3766,7 @@ void frmMain::updateControlsState() { ui->tblHeightMap->setVisible(m_heightMapMode); ui->tblProgram->setVisible(!m_heightMapMode); - ui->widgetHeightMap->setEnabled(!m_processingFile && m_programModel.rowCount() > 1); + ui->widgetHeightMap->setEnabled(!process && m_programModel.rowCount() > 1); ui->cmdHeightMapMode->setEnabled(!ui->txtHeightMap->text().isEmpty()); ui->cmdFileSend->setText(m_heightMapMode ? tr("Probe") : tr("Send")); @@ -3984,10 +3975,11 @@ bool frmMain::eventFilter(QObject *obj, QEvent *event) } // Jog on keyboard control - if (!m_processingFile && ui->chkKeyboardControl->isChecked() && - (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) - && !static_cast(event)->isAutoRepeat()) { - + if ((m_senderState != SenderTransferring) && (m_senderState != SenderTransferCompleted) && + ui->chkKeyboardControl->isChecked() && + (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) && + !static_cast(event)->isAutoRepeat()) + { if (ui->actJogXMinus->shortcuts().contains(ks)) { if (event->type() == QEvent::KeyPress) emit ui->cmdXMinus->pressed(); else emit ui->cmdXMinus->released(); } else if (ui->actJogXPlus->shortcuts().contains(ks)) { @@ -4002,7 +3994,7 @@ bool frmMain::eventFilter(QObject *obj, QEvent *event) if (event->type() == QEvent::KeyPress) emit ui->cmdZMinus->pressed(); else emit ui->cmdZMinus->released(); } } - } else if (obj == ui->tblProgram && m_processingFile) { + } else if (obj == ui->tblProgram && ((m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted))) { QKeyEvent *keyEvent = static_cast(event); if (keyEvent->key() == Qt::Key_PageDown || keyEvent->key() == Qt::Key_PageUp || keyEvent->key() == Qt::Key_Down || keyEvent->key() == Qt::Key_Up) { diff --git a/src/candle/frmmain.h b/src/candle/frmmain.h index 483fcd90..e4d85d39 100644 --- a/src/candle/frmmain.h +++ b/src/candle/frmmain.h @@ -222,13 +222,40 @@ private slots: private: static const int BUFFERLENGTH = 127; + static const int PROGRESSMINLINES = 10000; + static const int PROGRESSSTEP = 1000; + + enum SenderState { + SenderStopped, + SenderTransferring, + SenderPaused, + SenderChangingTool, + SenderTransferCompleted + }; + + enum DeviceState { + DeviceUnknown, + DeviceIdle, + DeviceAlarm, + DeviceRun, + DeviceHome, + DeviceHold0, + DeviceHold1, + DeviceQueue, + DeviceCheck, + DeviceDoor, + DeviceJog, + DeviceSleep + }; // Ui Ui::frmMain *ui; - QStringList m_status; - QStringList m_statusCaptions; - QStringList m_statusBackColors; - QStringList m_statusForeColors; + + QMap m_deviceStatuses; + QMap m_statusCaptions; + QMap m_statusBackColors; + QMap m_statusForeColors; + QMenu *m_tableMenu; QMessageBox* m_senderErrorBox; #ifdef WINDOWS @@ -240,6 +267,10 @@ private slots: GcodeViewParse m_viewParser; GcodeViewParse m_probeParser; + // State + SenderState m_senderState; + DeviceState m_deviceState; + // Visualizer drawers // TODO: Add machine table visualizer OriginDrawer *m_originDrawer; @@ -302,8 +333,6 @@ private slots: bool m_aborting; bool m_statusReceived; - bool m_processingFile; - bool m_transferCompleted; bool m_fileEndSent; bool m_heightMapMode; @@ -315,7 +344,6 @@ private slots: // Current values int m_lastDrawnLineIndex; - int m_lastGrblStatus; // Keyboard bool m_absoluteCoordinates; diff --git a/src/candle/frmsettings.h b/src/candle/frmsettings.h index 317f9ff9..65c63416 100644 --- a/src/candle/frmsettings.h +++ b/src/candle/frmsettings.h @@ -15,6 +15,7 @@ namespace Ui { class frmSettings; } +// TODO: Add overriding bounds settings class frmSettings : public QDialog { Q_OBJECT From 91199677bbf8bcbe28118bd27629aef315149673 Mon Sep 17 00:00:00 2001 From: Denvi Date: Fri, 15 Jan 2021 22:40:03 +0500 Subject: [PATCH 51/80] 'Pause', 'Abort' commands affects only sender. Added 'Hold', 'Sleep', 'Door', 'Flood' control commands. Added tool change feature. --- src/candle/candle.pro | 14 +- src/candle/frmmain.cpp | 456 +++++++--- src/candle/frmmain.h | 52 +- src/candle/frmmain.ui | 246 +++++- src/candle/frmsettings.cpp | 45 + src/candle/frmsettings.h | 13 +- src/candle/frmsettings.ui | 41 +- src/candle/images.qrc | 4 + src/candle/images/door.png | Bin 0 -> 649 bytes src/candle/images/flood.png | Bin 0 -> 1226 bytes src/candle/images/pause.png | Bin 0 -> 1128 bytes src/candle/images/power4.png | Bin 0 -> 1912 bytes src/candle/scriptfunctions.h | 3 +- src/candle/scriptvars.cpp | 11 + src/candle/scriptvars.h | 6 + src/candle/translations/candle_en.qm | Bin 0 -> 23 bytes src/candle/translations/candle_en.ts | 873 ++++++++----------- src/candle/translations/candle_es.qm | Bin 16598 -> 13639 bytes src/candle/translations/candle_es.ts | 870 +++++++++--------- src/candle/translations/candle_fr.qm | Bin 16360 -> 12981 bytes src/candle/translations/candle_fr.ts | 870 +++++++++--------- src/candle/translations/candle_pt.qm | Bin 16352 -> 13091 bytes src/candle/translations/candle_pt.ts | 870 +++++++++--------- src/candle/translations/candle_ru.qm | Bin 22497 -> 21003 bytes src/candle/translations/candle_ru.ts | 845 +++++++++--------- src/candleplugins/coordinatesystem/script.js | 20 +- src/candleplugins/usercommands/script.js | 12 +- 27 files changed, 2793 insertions(+), 2458 deletions(-) create mode 100644 src/candle/images/door.png create mode 100644 src/candle/images/flood.png create mode 100644 src/candle/images/pause.png create mode 100644 src/candle/images/power4.png create mode 100644 src/candle/translations/candle_en.qm diff --git a/src/candle/candle.pro b/src/candle/candle.pro index 8892dc8d..6a28fdfe 100644 --- a/src/candle/candle.pro +++ b/src/candle/candle.pro @@ -102,4 +102,16 @@ RESOURCES += \ INCLUDEPATH += ../designerplugins/customwidgetsplugin -LIBS += -L../designerplugins/customwidgetsplugin/release -lcustomwidgets \ No newline at end of file +LIBS += -L../designerplugins/customwidgetsplugin/release -lcustomwidgets + +qtPrepareTool(LRELEASE, lrelease) +for(tsfile, TRANSLATIONS) { + qmfile = $$tsfile + qmfile ~= s,.ts$,.qm, + qmdir = $$dirname(qmfile) + !exists($$qmdir) { + mkpath($$qmdir)|error("Aborting.") + } + command = $$LRELEASE -removeidentical $$tsfile -qm $$qmfile + system($$command)|error("Failed to run: $$command") +} \ No newline at end of file diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index e55fdc83..99ed8bef 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -34,7 +34,10 @@ frmMain::frmMain(QWidget *parent) : m_deviceStatuses[DeviceHold1] = "Hold:1"; m_deviceStatuses[DeviceQueue] = "Queue"; m_deviceStatuses[DeviceCheck] = "Check"; - m_deviceStatuses[DeviceDoor] = "Door"; + m_deviceStatuses[DeviceDoor0] = "Door:0"; + m_deviceStatuses[DeviceDoor1] = "Door:1"; + m_deviceStatuses[DeviceDoor2] = "Door:2"; + m_deviceStatuses[DeviceDoor3] = "Door:3"; m_deviceStatuses[DeviceJog] = "Jog"; m_deviceStatuses[DeviceSleep] = "Sleep"; @@ -43,11 +46,14 @@ frmMain::frmMain(QWidget *parent) : m_statusCaptions[DeviceAlarm] = tr("Alarm"); m_statusCaptions[DeviceRun] = tr("Run"); m_statusCaptions[DeviceHome] = tr("Home"); - m_statusCaptions[DeviceHold0] = tr("Hold"); - m_statusCaptions[DeviceHold1] = tr("Hold"); + m_statusCaptions[DeviceHold0] = tr("Hold") + " (0)"; + m_statusCaptions[DeviceHold1] = tr("Hold") + " (1)"; m_statusCaptions[DeviceQueue] = tr("Queue"); m_statusCaptions[DeviceCheck] = tr("Check"); - m_statusCaptions[DeviceDoor] = tr("Door"); + m_statusCaptions[DeviceDoor0] = tr("Door") + " (0)"; + m_statusCaptions[DeviceDoor1] = tr("Door") + " (1)"; + m_statusCaptions[DeviceDoor2] = tr("Door") + " (2)"; + m_statusCaptions[DeviceDoor3] = tr("Door") + " (3)"; m_statusCaptions[DeviceJog] = tr("Jog"); m_statusCaptions[DeviceSleep] = tr("Sleep"); @@ -60,7 +66,10 @@ frmMain::frmMain(QWidget *parent) : m_statusBackColors[DeviceHold1] = "yellow"; m_statusBackColors[DeviceQueue] = "yellow"; m_statusBackColors[DeviceCheck] = "palette(button)"; - m_statusBackColors[DeviceDoor] = "red"; + m_statusBackColors[DeviceDoor0] = "red"; + m_statusBackColors[DeviceDoor1] = "red"; + m_statusBackColors[DeviceDoor2] = "red"; + m_statusBackColors[DeviceDoor3] = "red"; m_statusBackColors[DeviceJog] = "lime"; m_statusBackColors[DeviceSleep] = "blue"; @@ -73,7 +82,10 @@ frmMain::frmMain(QWidget *parent) : m_statusForeColors[DeviceHold1] = "black"; m_statusForeColors[DeviceQueue] = "black"; m_statusForeColors[DeviceCheck] = "palette(text)"; - m_statusForeColors[DeviceDoor] = "white"; + m_statusForeColors[DeviceDoor0] = "white"; + m_statusForeColors[DeviceDoor1] = "white"; + m_statusForeColors[DeviceDoor2] = "white"; + m_statusForeColors[DeviceDoor3] = "white"; m_statusForeColors[DeviceJog] = "black"; m_statusForeColors[DeviceSleep] = "white"; @@ -89,7 +101,8 @@ frmMain::frmMain(QWidget *parent) : m_aborting = false; m_statusReceived = false; - m_senderState = SenderStopped; + m_deviceState = DeviceUnknown; + m_senderState = SenderUnknown; m_spindleCW = true; @@ -243,7 +256,8 @@ frmMain::frmMain(QWidget *parent) : m_scriptFunctions.setFrmMain(this); connect(this, &frmMain::responseReceived, &m_scriptFunctions, &ScriptFunctions::responseReceived); connect(this, &frmMain::statusReceived, &m_scriptFunctions, &ScriptFunctions::statusReceived); - connect(this, &frmMain::statusChanged, &m_scriptFunctions, &ScriptFunctions::statusChanged); + connect(this, &frmMain::senderStateChanged, &m_scriptFunctions, &ScriptFunctions::senderStateChanged); + connect(this, &frmMain::deviceStateChanged, &m_scriptFunctions, &ScriptFunctions::deviceStateChanged); connect(this, &frmMain::settingsAboutToLoad, &m_scriptFunctions, &ScriptFunctions::settingsAboutToLoad); connect(this, &frmMain::settingsLoaded, &m_scriptFunctions, &ScriptFunctions::settingsLoaded); connect(this, &frmMain::settingsAboutToSave, &m_scriptFunctions, &ScriptFunctions::settingsAboutToSave); @@ -258,6 +272,8 @@ frmMain::frmMain(QWidget *parent) : loadSettings(); ui->tblProgram->hideColumn(4); ui->tblProgram->hideColumn(5); + + setSenderState(SenderStopped); updateControlsState(); // Prepare jog buttons @@ -740,8 +756,8 @@ void frmMain::on_cmdFileSend_clicked() m_startTime.start(); - m_senderState = SenderTransferring; - m_fileEndSent = false; + setSenderState(SenderTransferring); + m_storedKeyboardControl = ui->chkKeyboardControl->isChecked(); ui->chkKeyboardControl->setChecked(false); @@ -760,21 +776,54 @@ void frmMain::on_cmdFileSend_clicked() updateControlsState(); ui->cmdFilePause->setFocus(); + sendCommands(m_settings->startCommands()); sendNextFileCommands(); } void frmMain::on_cmdFilePause_clicked(bool checked) { - m_serialPort.write(checked ? "!" : "~"); + static SenderState s; + + if (checked) { + s = m_senderState; + // setSenderState(SenderPaused); + setSenderState(SenderPausing); + ui->cmdFilePause->setEnabled(false); + } else { + if (m_senderState == SenderChangingTool) { + QString commands = getLineInitCommands(m_fileCommandIndex); + + QMessageBox box(this); + box.setIcon(QMessageBox::Information); + box.setText(tr("Following commands will be sent before continue:\n") + commands); + box.setWindowTitle(qApp->applicationDisplayName()); + box.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); + box.addButton(tr("Skip"), QMessageBox::DestructiveRole); + + int res = box.exec(); + if (res == QMessageBox::Cancel) { + ui->cmdFilePause->setChecked(true); + return; + } else if (res == QMessageBox::Ok) { + sendCommands(commands, -1); + } + + setSenderState(SenderTransferring); + } else { + setSenderState(s); + } + updateControlsState(); + } } void frmMain::on_cmdFileAbort_clicked() { - m_aborting = true; - if (!ui->cmdCheck->isChecked()) { - m_serialPort.write("!"); + ui->cmdFileAbort->setEnabled(false); + + if ((m_senderState == SenderPaused) || (m_senderState == SenderChangingTool)) { + sendCommand("M2", -1, m_settings->showUICommands(), false); } else { - grblReset(); + sendCommand("M2", -1, m_settings->showUICommands(), true); } } @@ -866,6 +915,26 @@ void frmMain::on_cmdUnlock_clicked() sendCommand("$X", -1, m_settings->showUICommands()); } +void frmMain::on_cmdHold_clicked(bool checked) +{ + sendCommand(checked ? "!" : "~", -1, m_settings->showUICommands()); +} + +void frmMain::on_cmdSleep_clicked() +{ + sendCommand("$SLP", -1, m_settings->showUICommands()); +} + +void frmMain::on_cmdDoor_clicked() +{ + m_serialPort.write(QByteArray(1, (char)0x84)); +} + +void frmMain::on_cmdFlood_clicked() +{ + m_serialPort.write(QByteArray(1, (char)0xa0)); +} + void frmMain::on_cmdSpindle_toggled(bool checked) { ui->grpSpindle->setProperty("overrided", checked); @@ -881,7 +950,7 @@ void frmMain::on_cmdSpindle_toggled(bool checked) void frmMain::on_cmdSpindle_clicked(bool checked) { - if (ui->cmdFilePause->isChecked()) { + if (ui->cmdHold->isChecked()) { m_serialPort.write(QByteArray(1, char(0x9e))); } else { sendCommand(checked ? QString("M3 S%1").arg(ui->slbSpindle->value()) : "M5", -1, m_settings->showUICommands()); @@ -967,7 +1036,7 @@ void frmMain::on_chkKeyboardControl_toggled(bool checked) if (m_absoluteCoordinates) sendCommand("G90", -1, m_settings->showUICommands()); } - if ((m_senderState != SenderTransferring) && (m_senderState != SenderTransferCompleted)) + if ((m_senderState != SenderTransferring) && (m_senderState != SenderStopping)) m_storedKeyboardControl = checked; updateJogTitle(); @@ -1581,59 +1650,27 @@ void frmMain::onSerialPortReadyRead() ui->txtStatus->setText(m_statusCaptions[state]); ui->txtStatus->setStyleSheet(QString("background-color: %1; color: %2;") .arg(m_statusBackColors[state]).arg(m_statusForeColors[state])); - emit statusChanged(state); } // Update controls ui->cmdCheck->setEnabled(state != DeviceRun && (m_senderState == SenderStopped)); ui->cmdCheck->setChecked(state == DeviceCheck); - ui->cmdFilePause->setChecked(state == DeviceHold0 || state == DeviceHold1 || state == DeviceQueue); + ui->cmdHold->setChecked(state == DeviceHold0 || state == DeviceHold1 || state == DeviceQueue); ui->cmdSpindle->setEnabled(state == DeviceHold0 || ((m_senderState != SenderTransferring) && - (m_senderState != SenderTransferCompleted))); -#ifdef WINDOWS - if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { - if (m_taskBarProgress) m_taskBarProgress->setPaused(state == DeviceHold0 || state == DeviceHold1 || state == DeviceQueue); - } -#endif + (m_senderState != SenderStopping))); // Update "elapsed time" timer - if ((m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted)) { + if ((m_senderState == SenderTransferring) || (m_senderState == SenderStopping)) { QTime time(0, 0, 0); int elapsed = m_startTime.elapsed(); ui->glwVisualizer->setSpendTime(time.addMSecs(elapsed)); } // Test for job complete - if ((m_senderState == SenderTransferCompleted) && - ((state == DeviceIdle && m_deviceState == DeviceRun) || state == DeviceCheck)) { - - // Shadow last segment - GcodeViewParse *parser = m_currentDrawer->viewParser(); - QList list = parser->getLineSegmentList(); - if (m_lastDrawnLineIndex < list.count()) { - list[m_lastDrawnLineIndex]->setDrawn(true); - m_currentDrawer->update(QList() << m_lastDrawnLineIndex); - } - - // Update state - m_senderState = SenderStopped; - m_fileProcessedCommandIndex = 0; - m_lastDrawnLineIndex = 0; - m_storedParserStatus.clear(); - - updateControlsState(); - - qApp->beep(); - - m_timerStateQuery.stop(); - m_timerConnection.stop(); - - QMessageBox::information(this, qApp->applicationDisplayName(), tr("Job done.\nTime elapsed: %1") - .arg(ui->glwVisualizer->spendTime().toString("hh:mm:ss"))); - - m_timerStateQuery.setInterval(m_settings->queryStateTime()); - m_timerConnection.start(); - m_timerStateQuery.start(); + if ((m_senderState == SenderStopping) && + ((state == DeviceIdle && m_deviceState == DeviceRun) || state == DeviceCheck)) + { + completeTransfer(); } // Abort @@ -1700,7 +1737,8 @@ void frmMain::onSerialPortReadyRead() // Toolpath shadowing - if (((m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted)) && state != DeviceCheck) { + if (((m_senderState == SenderTransferring) || (m_senderState == SenderStopping) + || (m_senderState == SenderPausing)) && state != DeviceCheck) { GcodeViewParse *parser = m_currentDrawer->viewParser(); bool toolOntoolpath = false; @@ -1770,6 +1808,7 @@ void frmMain::onSerialPortReadyRead() m_timerToolAnimation.stop(); ui->cmdSpindle->setChecked(false); } + ui->cmdFlood->setChecked(q.contains("F")); if (!pinState.isEmpty()) pinState.append(" / "); pinState.append(QString(tr("AS: %1")).arg(as.cap(1))); @@ -1787,7 +1826,7 @@ void frmMain::onSerialPortReadyRead() } // Store device state - m_deviceState = state; + setDeviceState(state); // Emit status signal emit statusReceived(data); @@ -1818,8 +1857,16 @@ void frmMain::onSerialPortReadyRead() if (g.indexIn(response) != -1) { m_storedVars.setCS(g.cap(0)); } + static QRegExp t("T(\\d+)(?!\\d)"); + if (t.indexIn(response) != -1) { + m_storedVars.setTool(g.cap(1).toInt()); + } } + // TODO: Store firmware version, features, buffer size on $I command + // [VER:1.1d.20161014:Some string] + // [OPT:VL,15,128] + // Restore absolute/relative coordinate system after jog if (uncomment == "$G" && ca.tableIndex == -2) { if (ui->chkKeyboardControl->isChecked()) m_absoluteCoordinates = response.contains("G90"); @@ -1837,7 +1884,7 @@ void frmMain::onSerialPortReadyRead() ui->glwVisualizer->setParserStatus(response.left(response.indexOf("; "))); // Store parser status - if ((m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted)) storeParserState(); + if ((m_senderState == SenderTransferring) || (m_senderState == SenderStopping)) storeParserState(); // Spindle speed QRegExp rx(".*S([\\d\\.]+)"); @@ -1882,7 +1929,7 @@ void frmMain::onSerialPortReadyRead() } // Clear command buffer on "M2" & "M30" command (old firmwares) - static QRegExp M230("M0*2|M30"); + static QRegExp M230("(M0*2|M30)(?!\\d)"); if (uncomment.contains(M230) && response.contains("ok") && !response.contains("Pgm End")) { m_commands.clear(); m_queue.clear(); @@ -1973,8 +2020,7 @@ void frmMain::onSerialPortReadyRead() } // Add response to table, send next program commands - if ((m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted)) { - + if (m_senderState != SenderStopped) { // Only if command from table if (ca.tableIndex > -1) { m_currentModel->setData(m_currentModel->index(ca.tableIndex, 2), GCodeItem::Processed); @@ -1993,7 +2039,7 @@ void frmMain::onSerialPortReadyRead() if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { if (m_taskBarProgress) m_taskBarProgress->setValue(m_fileProcessedCommandIndex); } -#endif +#endif // Process error messages static bool holding = false; static QString errors; @@ -2016,15 +2062,59 @@ void frmMain::onSerialPortReadyRead() holding = false; errors.clear(); if (m_senderErrorBox->checkBox()->isChecked()) m_settings->setIgnoreErrors(true); - if (result == QMessageBox::Ignore) m_serialPort.write("~"); else on_cmdFileAbort_clicked(); + if (result == QMessageBox::Ignore) { + m_serialPort.write("~"); + } else { + m_serialPort.write("~"); + ui->cmdFileAbort->click(); + } } } // Check transfer complete (last row always blank, last command row = rowcount - 2) - if ((m_fileProcessedCommandIndex == m_currentModel->rowCount() - 2) || uncomment.contains(QRegExp("M0*2|M30"))) - m_senderState = SenderTransferCompleted; - // Send next program commands - else if (!m_fileEndSent && (m_fileCommandIndex < m_currentModel->rowCount()) && !holding) sendNextFileCommands(); + if ((m_fileProcessedCommandIndex == m_currentModel->rowCount() - 2) || + uncomment.contains(QRegExp("(M0*2|M30)(?!\\d)"))) + { + if (m_deviceState == DeviceRun) { + setSenderState(SenderStopping); + } else { + completeTransfer(); + } + } else if ((m_fileCommandIndex < m_currentModel->rowCount()) + && (m_senderState == SenderTransferring) + && !holding) + { + // Send next program commands + sendNextFileCommands(); + } + } + + // Tool change mode + static QRegExp M6("(M0*6|M25)(?!\\d)"); + if ((m_senderState == SenderPausing) && uncomment.contains(M6)) { + sendCommands(m_settings->toolChangeCommands()); + + response.clear(); + setSenderState(SenderChangingTool); + updateControlsState(); + + if (m_settings->pauseToolChange()) { + QMessageBox::information(this, qApp->applicationDisplayName(), + tr("Change tool and press 'Pause' button to continue job")); + } + } + if ((m_senderState == SenderChangingTool) && !m_settings->pauseToolChange() + && m_commands.isEmpty()) + { + QString commands = getLineInitCommands(m_fileCommandIndex); + sendCommands(commands, -1); + setSenderState(SenderTransferring); + } + + // Switch to pause mode + if ((m_senderState == SenderPausing) && m_commands.isEmpty()) { + setSenderState(SenderPaused); + updateControlsState(); } // Scroll to first line on "M30" command @@ -2035,7 +2125,7 @@ void frmMain::onSerialPortReadyRead() GcodeViewParse *parser = m_currentDrawer->viewParser(); QList list = parser->getLineSegmentList(); - if ((m_senderState != SenderTransferCompleted) && m_fileProcessedCommandIndex < m_currentModel->rowCount() - 1) { + if ((m_senderState != SenderStopping) && m_fileProcessedCommandIndex < m_currentModel->rowCount() - 1) { int i; QList drawnLines; @@ -2077,8 +2167,8 @@ void frmMain::onSerialPortReadyRead() // Unprocessed responses // Handle hardware reset if (dataIsReset(data)) { - m_senderState = SenderStopped; - m_deviceState = DeviceUnknown; + setSenderState(SenderStopped); + setDeviceState(DeviceUnknown); m_fileCommandIndex = 0; @@ -2119,7 +2209,7 @@ void frmMain::onTimerConnection() { if (!m_serialPort.isOpen()) { openPort(); - } else if (!m_homing/* && !m_reseting*/ && !ui->cmdFilePause->isChecked() && m_queue.length() == 0) { + } else if (!m_homing/* && !m_reseting*/ && !ui->cmdHold->isChecked() && m_queue.length() == 0) { if (m_updateSpindleSpeed) { m_updateSpindleSpeed = false; sendCommand(QString("S%1").arg(ui->slbSpindle->value()), -2, m_settings->showUICommands()); @@ -2144,7 +2234,7 @@ void frmMain::onTimerStateQuery() void frmMain::onTableInsertLine() { if (ui->tblProgram->selectionModel()->selectedRows().count() == 0 || - (m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted)) return; + (m_senderState == SenderTransferring) || (m_senderState == SenderStopping)) return; int row = ui->tblProgram->selectionModel()->selectedRows()[0].row(); @@ -2159,7 +2249,7 @@ void frmMain::onTableInsertLine() void frmMain::onTableDeleteLines() { if (ui->tblProgram->selectionModel()->selectedRows().count() == 0 || - (m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted) || + (m_senderState == SenderTransferring) || (m_senderState == SenderStopping) || QMessageBox::warning(this, this->windowTitle(), tr("Delete lines?"), QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) return; QModelIndex firstRow = ui->tblProgram->selectionModel()->selectedRows()[0]; @@ -2295,42 +2385,11 @@ void frmMain::onActSendFromLineTriggered() // Set parser state if (m_settings->autoLine()) { - GcodeViewParse *parser = m_currentDrawer->viewParser(); - QList list = parser->getLineSegmentList(); - QVector> lineIndexes = parser->getLinesIndexes(); - - int lineNumber = m_currentModel->data(m_currentModel->index(commandIndex, 4)).toInt(); - LineSegment* firstSegment = list.at(lineIndexes.at(lineNumber).first()); - LineSegment* lastSegment = list.at(lineIndexes.at(lineNumber).last()); - LineSegment* feedSegment = lastSegment; - int segmentIndex = list.indexOf(feedSegment); - while (feedSegment->isFastTraverse() && segmentIndex > 0) feedSegment = list.at(--segmentIndex); - - QStringList commands; - - commands.append(QString("M3 S%1").arg(qMax(lastSegment->getSpindleSpeed(), ui->slbSpindle->value()))); - - commands.append(QString("G21 G90 G0 X%1 Y%2") - .arg(firstSegment->getStart().x()) - .arg(firstSegment->getStart().y())); - commands.append(QString("G1 Z%1 F%2") - .arg(firstSegment->getStart().z()) - .arg(feedSegment->getSpeed())); - - commands.append(QString("%1 %2 %3 F%4") - .arg(lastSegment->isMetric() ? "G21" : "G20") - .arg(lastSegment->isAbsolute() ? "G90" : "G91") - .arg(lastSegment->isFastTraverse() ? "G0" : "G1") - .arg(lastSegment->isMetric() ? feedSegment->getSpeed() : feedSegment->getSpeed() / 25.4)); - - if (lastSegment->isArc()) { - commands.append(lastSegment->plane() == PointSegment::XY ? "G17" - : lastSegment->plane() == PointSegment::ZX ? "G18" : "G19"); - } + QString commands = getLineInitCommands(commandIndex); QMessageBox box(this); box.setIcon(QMessageBox::Information); - box.setText(tr("Following commands will be sent before selected line:\n") + commands.join('\n')); + box.setText(tr("Following commands will be sent before selected line:\n") + commands); box.setWindowTitle(qApp->applicationDisplayName()); box.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); box.addButton(tr("Skip"), QMessageBox::DestructiveRole); @@ -2338,9 +2397,10 @@ void frmMain::onActSendFromLineTriggered() int res = box.exec(); if (res == QMessageBox::Cancel) return; else if (res == QMessageBox::Ok) { - foreach (QString command, commands) { - sendCommand(command, -1, m_settings->showUICommands()); - } + // foreach (QString command, commands) { + // sendCommand(command, -1, m_settings->showUICommands()); + // } + sendCommands(commands, -1); } } @@ -2369,8 +2429,8 @@ void frmMain::onActSendFromLineTriggered() m_startTime.start(); - m_senderState = SenderTransferring; - m_fileEndSent = false; + setSenderState(SenderTransferring); + m_storedKeyboardControl = ui->chkKeyboardControl->isChecked(); ui->chkKeyboardControl->setChecked(false); @@ -2424,7 +2484,7 @@ void frmMain::onScroolBarAction(int action) { Q_UNUSED(action) - if ((m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted)) + if ((m_senderState == SenderTransferring) || (m_senderState == SenderStopping)) ui->chkAutoScroll->setChecked(false); } @@ -2538,6 +2598,10 @@ void frmMain::loadSettings() m_settings->setToolType(set.value("toolType", 0).toInt()); m_settings->setFps(set.value("fps", 60).toInt()); m_settings->setQueryStateTime(set.value("queryStateTime", 250).toInt()); + m_settings->setStartCommands(set.value("startCommands").toString()); + m_settings->setEndCommands(set.value("endCommands").toString()); + m_settings->setToolChangeCommands(set.value("toolChangeCommands").toString()); + m_settings->setPauseToolChange(set.value("pauseToolChange").toBool()); ui->chkAutoScroll->setChecked(set.value("autoScroll", false).toBool()); @@ -2763,6 +2827,11 @@ void frmMain::saveSettings() set.setValue("lastFolder", m_lastFolder); set.setValue("fontSize", m_settings->fontSize()); + set.setValue("startCommands", m_settings->startCommands()); + set.setValue("endCommands", m_settings->endCommands()); + set.setValue("toolChangeCommands", m_settings->toolChangeCommands()); + set.setValue("pauseToolChange", m_settings->pauseToolChange()); + set.setValue("feedOverride", ui->slbFeedOverride->isChecked()); set.setValue("feedOverrideValue", ui->slbFeedOverride->value()); set.setValue("rapidOverride", ui->slbRapidOverride->isChecked()); @@ -3117,8 +3186,8 @@ void frmMain::grblReset() { m_serialPort.write(QByteArray(1, (char)24)); - m_senderState = SenderStopped; - m_deviceState = DeviceUnknown; + setSenderState(SenderStopped); + setDeviceState(DeviceUnknown); m_fileCommandIndex = 0; m_reseting = true; @@ -3199,13 +3268,13 @@ int frmMain::sendCommand(QString command, int tableIndex, bool showInConsole, bo } // Set M2 & M30 commands sent flag - static QRegExp M230("M0*2|M30"); - if (uncomment.contains(M230)) { - m_fileEndSent = true; + static QRegExp M230("(M0*2|M30|M0*6|M25)(?!\\d)"); + if ((m_senderState == SenderTransferring) && uncomment.contains(M230)) { + setSenderState(SenderPausing); } // Queue offsets request on G92, G10 commands - static QRegExp G92("(G92|G10)"); + static QRegExp G92("(G92|G10)(?!\\d)"); if (uncomment.contains(G92)) sendCommand("$#", -3, showInConsole, true); m_serialPort.write((command + "\r").toLatin1()); @@ -3227,12 +3296,13 @@ void frmMain::sendNextFileCommands() { if (m_queue.length() > 0) return; QString command = m_currentModel->data(m_currentModel->index(m_fileCommandIndex, 1)).toString(); - static QRegExp M230("M0*2|M30"); + static QRegExp M230("(M0*2|M30)(?!\\d)"); while ((bufferLength() + command.length() + 1) <= BUFFERLENGTH - && m_fileCommandIndex < m_currentModel->rowCount() - 1 - && !(!m_commands.isEmpty() - && GcodePreprocessorUtils::removeComment(m_commands.last().command).contains(M230))) { + && m_fileCommandIndex < m_currentModel->rowCount() - 1 + && !(!m_commands.isEmpty() + && GcodePreprocessorUtils::removeComment(m_commands.last().command).contains(M230))) + { m_currentModel->setData(m_currentModel->index(m_fileCommandIndex, 2), GCodeItem::Sent); sendCommand(command, m_fileCommandIndex, m_settings->showProgramCommands()); m_fileCommandIndex++; @@ -3688,12 +3758,14 @@ void frmMain::setupCoordsTextboxes() void frmMain::updateControlsState() { bool portOpened = m_serialPort.isOpen(); - bool process = (m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted); + bool process = (m_senderState == SenderTransferring) || (m_senderState == SenderStopping); + bool paused = (m_senderState == SenderPausing) || (m_senderState == SenderPaused) || (m_senderState == SenderChangingTool); ui->grpState->setEnabled(portOpened); ui->grpControl->setEnabled(portOpened); ui->widgetSpindle->setEnabled(portOpened); - ui->widgetJog->setEnabled(portOpened && !process); + ui->widgetJog->setEnabled(portOpened && ((m_senderState == SenderStopped) + || (m_senderState == SenderChangingTool))); ui->cboCommand->setEnabled(portOpened && (!ui->chkKeyboardControl->isChecked())); ui->cmdCommandSend->setEnabled(portOpened); @@ -3702,28 +3774,29 @@ void frmMain::updateControlsState() { ui->cmdCheck->setEnabled(!process); ui->cmdUnlock->setEnabled(!process); ui->cmdSpindle->setEnabled(!process); - - ui->actFileNew->setEnabled(!process); - ui->actFileOpen->setEnabled(!process); - ui->cmdFileOpen->setEnabled(!process); - ui->cmdFileReset->setEnabled(!process && m_programModel.rowCount() > 1); - ui->cmdFileSend->setEnabled(portOpened && !process && m_programModel.rowCount() > 1); - ui->cmdFilePause->setEnabled(portOpened && !ui->cmdCheck->isChecked()); - ui->cmdFileAbort->setEnabled(process); - ui->actFileOpen->setEnabled(!process); - ui->mnuRecent->setEnabled(!process && ((m_recentFiles.count() > 0 && !m_heightMapMode) + ui->cmdSleep->setEnabled(!process); + + ui->actFileNew->setEnabled(m_senderState == SenderStopped); + ui->actFileOpen->setEnabled(m_senderState == SenderStopped); + ui->cmdFileOpen->setEnabled(m_senderState == SenderStopped); + ui->cmdFileReset->setEnabled((m_senderState == SenderStopped) && m_programModel.rowCount() > 1); + ui->cmdFileSend->setEnabled(portOpened && (m_senderState == SenderStopped) && m_programModel.rowCount() > 1); + ui->cmdFilePause->setEnabled(portOpened && (process || paused) && (m_senderState != SenderPausing)); + ui->cmdFilePause->setChecked(paused); + ui->cmdFileAbort->setEnabled(m_senderState != SenderStopped && m_senderState != SenderStopping); + ui->mnuRecent->setEnabled((m_senderState == SenderStopped) && ((m_recentFiles.count() > 0 && !m_heightMapMode) || (m_recentHeightmaps.count() > 0 && m_heightMapMode))); ui->actFileSave->setEnabled(m_programModel.rowCount() > 1); ui->actFileSaveAs->setEnabled(m_programModel.rowCount() > 1); - ui->tblProgram->setEditTriggers(process ? QAbstractItemView::NoEditTriggers : - QAbstractItemView::DoubleClicked | QAbstractItemView::SelectedClicked - | QAbstractItemView::EditKeyPressed | QAbstractItemView::AnyKeyPressed); + ui->tblProgram->setEditTriggers((m_senderState != SenderStopped) ? QAbstractItemView::NoEditTriggers : + QAbstractItemView::DoubleClicked | QAbstractItemView::SelectedClicked | + QAbstractItemView::EditKeyPressed | QAbstractItemView::AnyKeyPressed); if (!portOpened) { ui->txtStatus->setText(tr("Not connected")); ui->txtStatus->setStyleSheet(QString("background-color: palette(button); color: palette(text);")); - emit statusChanged(-1); + emit deviceStateChanged(-1); } this->setWindowTitle(m_programFileName.isEmpty() ? qApp->applicationDisplayName() @@ -3733,7 +3806,11 @@ void frmMain::updateControlsState() { #ifdef WINDOWS if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { - if (!process && m_taskBarProgress) m_taskBarProgress->hide(); + if (m_taskBarProgress) m_taskBarProgress->setPaused(paused); + } + + if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS7) { + if (m_taskBarProgress && m_senderState == SenderStopped) m_taskBarProgress->hide(); } #endif @@ -3975,7 +4052,7 @@ bool frmMain::eventFilter(QObject *obj, QEvent *event) } // Jog on keyboard control - if ((m_senderState != SenderTransferring) && (m_senderState != SenderTransferCompleted) && + if ((m_senderState != SenderTransferring) && (m_senderState != SenderStopping) && ui->chkKeyboardControl->isChecked() && (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) && !static_cast(event)->isAutoRepeat()) @@ -3994,7 +4071,7 @@ bool frmMain::eventFilter(QObject *obj, QEvent *event) if (event->type() == QEvent::KeyPress) emit ui->cmdZMinus->pressed(); else emit ui->cmdZMinus->released(); } } - } else if (obj == ui->tblProgram && ((m_senderState == SenderTransferring) || (m_senderState == SenderTransferCompleted))) { + } else if (obj == ui->tblProgram && ((m_senderState == SenderTransferring) || (m_senderState == SenderStopping))) { QKeyEvent *keyEvent = static_cast(event); if (keyEvent->key() == Qt::Key_PageDown || keyEvent->key() == Qt::Key_PageUp || keyEvent->key() == Qt::Key_Down || keyEvent->key() == Qt::Key_Up) { @@ -4224,6 +4301,101 @@ int frmMain::buttonSize() return ui->cmdHome->minimumWidth(); } +void frmMain::setSenderState(SenderState state) +{ + if (m_senderState != state) { + m_senderState = state; + emit senderStateChanged(state); + } +} + +void frmMain::setDeviceState(DeviceState state) +{ + if (m_deviceState != state) { + m_deviceState = state; + emit deviceStateChanged(state); + } +} + +void frmMain::completeTransfer() +{ + // Shadow last segment + GcodeViewParse *parser = m_currentDrawer->viewParser(); + QList list = parser->getLineSegmentList(); + if (m_lastDrawnLineIndex < list.count()) { + list[m_lastDrawnLineIndex]->setDrawn(true); + m_currentDrawer->update(QList() << m_lastDrawnLineIndex); + } + + // Update state + setSenderState(SenderStopped); + m_fileProcessedCommandIndex = 0; + m_lastDrawnLineIndex = 0; + m_storedParserStatus.clear(); + + updateControlsState(); + + // Send end commands + sendCommands(m_settings->endCommands()); + + // Show message box + qApp->beep(); + m_timerStateQuery.stop(); + m_timerConnection.stop(); + + QMessageBox::information(this, qApp->applicationDisplayName(), tr("Job done.\nTime elapsed: %1") + .arg(ui->glwVisualizer->spendTime().toString("hh:mm:ss"))); + + m_timerStateQuery.setInterval(m_settings->queryStateTime()); + m_timerConnection.start(); + m_timerStateQuery.start(); + +} + +QString frmMain::getLineInitCommands(int row) +{ + int commandIndex = row; + + GcodeViewParse *parser = m_currentDrawer->viewParser(); + QList list = parser->getLineSegmentList(); + QVector> lineIndexes = parser->getLinesIndexes(); + + int lineNumber = m_currentModel->data(m_currentModel->index(commandIndex, 4)).toInt(); + LineSegment* firstSegment = list.at(lineIndexes.at(lineNumber).first()); + LineSegment* lastSegment = list.at(lineIndexes.at(lineNumber).last()); + LineSegment* feedSegment = lastSegment; + LineSegment* plungeSegment = lastSegment; + int segmentIndex = list.indexOf(feedSegment); + while (feedSegment->isFastTraverse() && (segmentIndex > 0)) + feedSegment = list.at(--segmentIndex); + while (!(plungeSegment->isZMovement() && !plungeSegment->isFastTraverse()) && (segmentIndex > 0)) + plungeSegment = list.at(--segmentIndex); + + QString commands; + + commands.append(QString("M3 S%1\n").arg(qMax(lastSegment->getSpindleSpeed(), ui->slbSpindle->value()))); + + commands.append(QString("G21 G90 G0 X%1 Y%2\n") + .arg(firstSegment->getStart().x()) + .arg(firstSegment->getStart().y())); + commands.append(QString("G1 Z%1 F%2\n") + .arg(firstSegment->getStart().z()) + .arg(plungeSegment->getSpeed())); + + commands.append(QString("%1 %2 %3 F%4\n") + .arg(lastSegment->isMetric() ? "G21" : "G20") + .arg(lastSegment->isAbsolute() ? "G90" : "G91") + .arg(lastSegment->isFastTraverse() ? "G0" : "G1") + .arg(lastSegment->isMetric() ? feedSegment->getSpeed() : feedSegment->getSpeed() / 25.4)); + + if (lastSegment->isArc()) { + commands.append(lastSegment->plane() == PointSegment::XY ? "G17" + : lastSegment->plane() == PointSegment::ZX ? "G18" : "G19"); + } + + return commands; +} + bool frmMain::actionLessThan(const QAction *a1, const QAction *a2) { return a1->objectName() < a2->objectName(); diff --git a/src/candle/frmmain.h b/src/candle/frmmain.h index e4d85d39..5231662e 100644 --- a/src/candle/frmmain.h +++ b/src/candle/frmmain.h @@ -95,7 +95,8 @@ class frmMain : public QMainWindow signals: void responseReceived(QString command, int tableIndex, QString response); void statusReceived(QString status); - void statusChanged(int status); + void senderStateChanged(int state); + void deviceStateChanged(int state); void settingsAboutToLoad(); void settingsLoaded(); void settingsAboutToSave(); @@ -140,6 +141,10 @@ private slots: void on_cmdCheck_clicked(bool checked); void on_cmdReset_clicked(); void on_cmdUnlock_clicked(); + void on_cmdHold_clicked(bool checked); + void on_cmdSleep_clicked(); + void on_cmdDoor_clicked(); + void on_cmdFlood_clicked(); void on_cmdSpindle_toggled(bool checked); void on_cmdSpindle_clicked(bool checked); void on_cmdTop_clicked(); @@ -226,26 +231,31 @@ private slots: static const int PROGRESSSTEP = 1000; enum SenderState { - SenderStopped, - SenderTransferring, - SenderPaused, - SenderChangingTool, - SenderTransferCompleted + SenderUnknown = -1, + SenderTransferring = 0, + SenderPausing = 1, + SenderPaused = 2, + SenderStopping = 3, + SenderStopped = 4, + SenderChangingTool = 5 }; enum DeviceState { - DeviceUnknown, - DeviceIdle, - DeviceAlarm, - DeviceRun, - DeviceHome, - DeviceHold0, - DeviceHold1, - DeviceQueue, - DeviceCheck, - DeviceDoor, - DeviceJog, - DeviceSleep + DeviceUnknown = -1, + DeviceIdle = 1, + DeviceAlarm = 2, + DeviceRun = 3, + DeviceHome = 4, + DeviceHold0 = 5, + DeviceHold1 = 6, + DeviceQueue = 7, + DeviceCheck = 8, + DeviceDoor0 = 9, + DeviceDoor1 = 10, + DeviceDoor2 = 11, + DeviceDoor3 = 12, + DeviceJog = 13, + DeviceSleep =14 }; // Ui @@ -333,8 +343,6 @@ private slots: bool m_aborting; bool m_statusReceived; - bool m_fileEndSent; - bool m_heightMapMode; // Indices @@ -427,6 +435,10 @@ private slots: bool isGCodeFile(QString fileName); bool isHeightmapFile(QString fileName); int buttonSize(); + void setSenderState(SenderState state); + void setDeviceState(DeviceState state); + void completeTransfer(); + QString getLineInitCommands(int row); static bool actionLessThan(const QAction *a1, const QAction *a2); static bool actionTextLessThan(const QAction *a1, const QAction *a2); diff --git a/src/candle/frmmain.ui b/src/candle/frmmain.ui index 1204bba0..ca6acaad 100644 --- a/src/candle/frmmain.ui +++ b/src/candle/frmmain.ui @@ -1287,7 +1287,7 @@ QLabel[overrided="false"] { 0 0 347 - 754 + 801 @@ -1644,8 +1644,11 @@ QLabel[overrided="false"] { - - + + + + true + 0 @@ -1653,14 +1656,14 @@ QLabel[overrided="false"] { - Check + Unlock ... - :/images/check1.png:/images/check1.png + :/images/unlock1.png:/images/unlock1.png @@ -1668,9 +1671,35 @@ QLabel[overrided="false"] { 32 - + true + + + + + + + 0 + 0 + + + + Reset + + + ... + + + + :/images/restart.png:/images/restart.png + + + + 32 + 32 + + true @@ -1705,8 +1734,8 @@ QLabel[overrided="false"] { - - + + 0 @@ -1714,14 +1743,14 @@ QLabel[overrided="false"] { - Reset + Hold ... - :/images/restart.png:/images/restart.png + :/images/pause.png:/images/pause.png @@ -1729,16 +1758,48 @@ QLabel[overrided="false"] { 32 + + true + true - - - + + + + + 0 + 0 + + + + Check + + + ... + + + + :/images/check1.png:/images/check1.png + + + + 32 + 32 + + + + true + + true + + + + 0 @@ -1746,14 +1807,72 @@ QLabel[overrided="false"] { - Unlock + Sleep ... - :/images/unlock1.png:/images/unlock1.png + :/images/power4.png:/images/power4.png + + + + 32 + 32 + + + + true + + + + + + + + 0 + 0 + + + + Door + + + ... + + + + :/images/door.png:/images/door.png + + + + 32 + 32 + + + + true + + + + + + + + 0 + 0 + + + + Flood + + + ... + + + + :/images/flood.png:/images/flood.png @@ -1761,6 +1880,9 @@ QLabel[overrided="false"] { 32 + + true + true @@ -3012,6 +3134,35 @@ padding-right: 8; L&ock panels + + + Hold + + + Hold + + + + + Sleep + + + Sleep + + + + + Door + + + Door + + + + + Flood + + @@ -3069,7 +3220,6 @@ padding-right: 8; chkHeightMapInterpolationShow txtStatus cmdHome - cmdCheck chkHeightMapUse cmdHeightMapCreate cmdHeightMapLoad @@ -3610,5 +3760,69 @@ padding-right: 8; + + actControlHold + triggered() + cmdHold + click() + + + -1 + -1 + + + 146 + 523 + + + + + actControlSleep + triggered() + cmdSleep + click() + + + -1 + -1 + + + 146 + 570 + + + + + actControlDoor + triggered() + cmdDoor + click() + + + -1 + -1 + + + 228 + 570 + + + + + actControlFlood + triggered() + cmdFlood + click() + + + -1 + -1 + + + 309 + 570 + + + diff --git a/src/candle/frmsettings.cpp b/src/candle/frmsettings.cpp index ac0d2451..a11afbab 100644 --- a/src/candle/frmsettings.cpp +++ b/src/candle/frmsettings.cpp @@ -540,6 +540,46 @@ void frmSettings::setAutoLine(bool value) ui->chkAutoLine->setChecked(value); } +QString frmSettings::startCommands() +{ + return ui->txtStartCommands->toPlainText(); +} + +void frmSettings::setStartCommands(QString commands) +{ + ui->txtStartCommands->setPlainText(commands); +} + +QString frmSettings::endCommands() +{ + return ui->txtEndCommands->toPlainText(); +} + +void frmSettings::setEndCommands(QString commands) +{ + ui->txtEndCommands->setPlainText(commands); +} + +QString frmSettings::toolChangeCommands() +{ + return ui->txtToolChangeCommands->toPlainText(); +} + +void frmSettings::setToolChangeCommands(QString commands) +{ + ui->txtToolChangeCommands->setPlainText(commands); +} + +bool frmSettings::pauseToolChange() +{ + return ui->chkPauseToolChange->isChecked(); +} + +void frmSettings::setPauseToolChange(bool pause) +{ + ui->chkPauseToolChange->setChecked(pause); +} + void frmSettings::showEvent(QShowEvent *se) { Q_UNUSED(se) @@ -663,6 +703,11 @@ void frmSettings::on_cmdDefaults_clicked() table->item(i, 2)->setData(Qt::DisplayRole, d.keys().contains(s) ? d[s] : ""); } + ui->txtStartCommands->clear(); + ui->txtEndCommands->clear(); + ui->txtToolChangeCommands->clear(); + ui->chkPauseToolChange->setChecked(true); + emit settingsSetByDefault(); } diff --git a/src/candle/frmsettings.h b/src/candle/frmsettings.h index 65c63416..f6a4e534 100644 --- a/src/candle/frmsettings.h +++ b/src/candle/frmsettings.h @@ -53,6 +53,10 @@ class frmSettings : public QDialog Q_PROPERTY(bool drawModeVectors READ drawModeVectors WRITE setDrawModeVectors) Q_PROPERTY(bool ignoreErrors READ ignoreErrors WRITE setIgnoreErrors) Q_PROPERTY(bool autoLine READ autoLine WRITE setAutoLine) + Q_PROPERTY(QString startCommands READ startCommands WRITE setStartCommands) + Q_PROPERTY(QString endCommands READ endCommands WRITE setEndCommands) + Q_PROPERTY(QString toolChangeCommands READ toolChangeCommands WRITE setToolChangeCommands) + Q_PROPERTY(bool pauseToolChange READ pauseToolChange WRITE setPauseToolChange) public: explicit frmSettings(QWidget *parent = 0); @@ -136,6 +140,14 @@ class frmSettings : public QDialog void setIgnoreErrors(bool value); bool autoLine(); void setAutoLine(bool value); + QString startCommands(); + void setStartCommands(QString commands); + QString endCommands(); + void setEndCommands(QString commands); + QString toolChangeCommands(); + void setToolChangeCommands(QString commands); + bool pauseToolChange(); + void setPauseToolChange(bool pause); signals: void settingsSetByDefault(); @@ -158,7 +170,6 @@ private slots: void on_radGrayscaleZ_toggled(bool checked); private: - // Ui::frmSettings *ui; void searchPorts(); QList m_storedValues; diff --git a/src/candle/frmsettings.ui b/src/candle/frmsettings.ui index aec0e9a7..0f67d5e2 100644 --- a/src/candle/frmsettings.ui +++ b/src/candle/frmsettings.ui @@ -84,9 +84,9 @@ QSplitter::handle:horizontal { 0 - 0 + -28 620 - 1517 + 2236 @@ -475,6 +475,36 @@ QSplitter::handle:horizontal { Sender + + + + Program start commands: + + + + + + + + + + Program end commands: + + + + + + + + + + Tool change commands: + + + + + + @@ -489,6 +519,13 @@ QSplitter::handle:horizontal { + + + + Pause on tool change + + + diff --git a/src/candle/images.qrc b/src/candle/images.qrc index 5e98242f..0cf1fa55 100644 --- a/src/candle/images.qrc +++ b/src/candle/images.qrc @@ -1,8 +1,12 @@ + images/flood.png + images/door.png + images/pause.png images/search_for_home2.png images/check1.png images/restart.png + images/power4.png images/handle_horizontal.png images/handle_vertical.png images/1401562699_icon-arrow-up-b.png diff --git a/src/candle/images/door.png b/src/candle/images/door.png new file mode 100644 index 0000000000000000000000000000000000000000..93972e30ba42717ddae005c7b3ebe8530eb9abbb GIT binary patch literal 649 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9GG!XV7ZFl&wk0|S$_ zr;B4q#hkad_h*YZO0<9U_pvd_Q1oDN)MepbE27HbnV7D%_GsK6c9%E0x{JlMZg7@$ zMQAzQ(zv0i#qp0p)Tcwxbe2f6;FFlL_hs+zUam~o@#tCFzR!2gofCUM>Exg5Jzp-= z3kBb}cliD6C&qG#>sE5Q6$-D`&A+~JAt$4H)P^0K-bUPX4K>`l-syfu*|fJ2t`4)m zRp**)3UBMwQLu98*Gbse*VyKJpm@&Vx;<->4{WqzlVsp8U@iZ^J9igb-sXn&J9;C} zBromsyruC#Ht&JfJr91f-ivCCpD(4>aeFtA0Y0-0K-3Itfm6x_Y#Pg8Kn4`|06=xf-swK(Eu>-mRUN)G)o z&Iznp{98}d!@pDiZf=j{%NtSqKlJZVu}y4~O>V9c&6DO!;-B|$<*a+ZPkuQl)p6V@ VKJ4(HH^8*T;OXk;vd$@?2>=_^9gP40 literal 0 HcmV?d00001 diff --git a/src/candle/images/flood.png b/src/candle/images/flood.png new file mode 100644 index 0000000000000000000000000000000000000000..cfbc86b89d3cd014a4ca78ad48a2d722209fba5c GIT binary patch literal 1226 zcmV;*1U37KP)RCt{2n@wz0MHq%3eoL`HF##L2AwmoYNFt>oEGsG@(E^&t zh8kHINeVkyK@eQSLKe8tl`dcfLBs{RAi+cvS#V8IenJGbKun`n5=!|giq zGiPS*74DNv!t|W^-goBC-0j^c4hYhA36ShT9NEn~s3p#<)D_fxAnCxKBSwJb zNt{Mt8gPkhh5iMWKBUZ2eUDk@qK@^y;|uIAy(vezK1aFFBYBL*ySOL4ytpRCzQ7)% zF&DcV{|3w~5M!n;BZtr2piU!koUHNtz$+ecdURPc*6~0dqwzL&*WF(t-abdXw@P}9 z#&qBhvSuqlONp2*z*!OVcN%n6I6&6uFz`ZvxJz^_Gxo;;;s&J)xJTCHj)3vEi`e(H zX2b9`_U0wz!^|Y$g3ve-Fn%ezu_vk+M_lV2I^7X;3L}@jQxUaJ39T<9YUN@X_L?7a zY<6Mq4PK0>SCgZ{Op1-lS3>hh0!=4NuzwAo9bZvaWB0nn33M&?3nOO}YFC8zzJ%HU zOhmoVFipIdP=B+~zOFqbW34bSNVzRWu# z8owqX8bE&2BM&RL67NY( zYA0!cA4R@bEpNXWCVLsWJcLe)c;2`$%!fSzjv}1pKF)y&jnEWJ! z`^EJR)LvaS)HYy3AP@Z_ekD-cTR^#KENp20G;|?v+Mvc)wdF5>BW9GP{Dp;tTG4Kf_j1S3##kp9Ri)$ z$Km&}m%`-8p-}xrUBkhbRoK6L-MYRD*H>M`sL4vM4n=6wG31yZ)tU`MEAB=ZMJ-qT z6nj>0*Jb2VXI8#7koTbM!k!b%jnGL{#d?5+sBe9y>3{d=YbUXHc;=XIm~KB7z1XWm zh%`V0On7;jiu$GGX2~ZF=~#7J>dG(+wMCW7SDsYSWuxx!#>EUSn1}kWa$TtXKsABt o-qmyl_2I?kgx;DoY4Vuz04QS=#tqg+*Z=?k07*qoM6N<$f{SoPn*aa+ literal 0 HcmV?d00001 diff --git a/src/candle/images/pause.png b/src/candle/images/pause.png new file mode 100644 index 0000000000000000000000000000000000000000..9fd4ecc7150a87dfb2ad288078ae78cc74d3594a GIT binary patch literal 1128 zcmV-u1eg1XP)F`iP?tAV z^_Jv@I7(Krb)|i~@6x z?WG;tYv-yP%D_qBE$&WhZOYDBriN((4q-0ctQ-%wX{)2jlTV511IEeE@o*crI#ZK& z5nKXX0`@zM`3}6nTq(0w){0pqdw>>)xrTuQz)y!Unb83}B>vy30FQvWUvnE!#b#VcEY$r!^v0!M+)6nZ-C9G_xzO#+)!=y75T=F-)S`39T;mS(7P8F1Fl zt?8Y`Ll8QM{^#!jt8>)92Dl%gf07(;hi0Ph`61gUZ zz>$!=9pl641atgD3Hg=wBW_7f(gjLeXp^!GIb)n6BK?la%Xb1R1^F4^i-Tdl_>8eF z%qn1qHYh3pdj#1WFydyHS4NPpn!Vb9r~vE|WKV$ijz;<99q?3;@6-lp0cZ!-3G!Q2 z808zu#`PGV{y_`CCPjX`8jC!m*|<>>Y5`a)$i4%wsb2Lh|Ln3E)^l!)^$&w~9>ao0JonAcVP!@ue#2Wm|j= z`nGuL47Q;UMxZzv0~-8rG(d~=FKdWz2Jm=14(48apePKK`YMpn{){GeJzaK=nkthE=pcGc2wDYrjLFnC5ML;{ z!S;Pj@qKgXx7j?6N=JP1CRm?AsJ>*9lnFeOZl!64@I7gwiW*s;6F@c_s7M^hX5 u`=hDgxN3&KKbm?@eVs)X6ciNHC%*x&;A^wycS~^q0000i*lqj~?Z+0Z!-KdJPY8R@zPlGUPwE$xzz?up z{zvy!<9vY{8yoyeiY5e%^+Vf^OU3mW_?cb{qs)jo?nq#)jDbvA1 zjW*wn1ufG5Dnq+YM1)mgt>y}NeNpDK@Q)0$%{Ze)`U|ilLAw{17Zqk4ybaH5oT2qr zDyFz2!)!a=)du~28Txz62-5`blU`v)MX;5(6t{%s(y@G>_D1i$(vELC&M6?r94uAK$F?ipaGA<9XuO;YzVrClv8Z;mlgaQp`@=@5Li+(AP0qfF_GK;Ouq? zR*5LBuEFODboxE%QMkSU4`MK$5cXX(w=f`*F%1|mA8@7EkHfIo@wJPkiR<0?bpam4 z%(jY)rfRaYX?h z7fA0IAIo`Xm16dsY%2=LmO^$Fm?NFb+kpoP@SQD|!8*Eg-kF~BtX#MQecOfRlp+Yk=s~MkO47!j<4O%%6VrL*CpyhuSl_%LUNtmhxZrcGe=~Gllg-;PVoMh<$L+3 zHUIEZ$lA=NsKM-NG}3K&jYPf>+JO0-QW#6_C{SH02ag{b(l+?T61--L z@HLs8Nrt`O(SGFju@ds+B0B?iX6{c?9Q`6EU&lOgFj7a6GT3R^AO@p?RNER{A7UlkjyZ`b;nXn9QHe&qtC zmXSOIcpe`p$?tq&|H=GZ+cEoOBALk@!M7^ld9$=LdrGnN_@v-cyktz+`zqjhjF?SH zB|I*@WjTP#`0S@6jU`Ttbf*^Y|+ z{N4DBD5L$qV~wu_#`{8x&=D;x9g!jrfLZ!N&L%x%c76RWVPXOHBJ0G!|gC+qUBERSNeD z5gOM!=o3fgox-J}`fH>7dg6)NAb!+JC++@U-~s6>&_UrCR|z}q1m=ls^+FL%o+c{3 zPOklas`QF6ERwsQ?~ptmmDcv*+OyAgs>5-xQaa-_Dn5Qvs?6`w7|8VC=h7A7oxn12 zR*+pj2c!>LI*x0M9f2ih!*jSr*l<;tiO-2bhiw{deh0o(VSg=SsdN!!vOObW{Hqi% zjyPQ?`bnYKY#()npEn+ZW~k~ m_coords; QString m_cs; + int m_tool; }; #endif \ No newline at end of file diff --git a/src/candle/translations/candle_en.qm b/src/candle/translations/candle_en.qm new file mode 100644 index 0000000000000000000000000000000000000000..9dad8dffceb9623e88f8b96d9cd0caf25574c6fa GIT binary patch literal 23 fcmcE7ks@*G{hX<16=n7(EZlpygMop8iIEWihQJ9+ literal 0 HcmV?d00001 diff --git a/src/candle/translations/candle_en.ts b/src/candle/translations/candle_en.ts index f9544237..a09b2512 100644 --- a/src/candle/translations/candle_en.ts +++ b/src/candle/translations/candle_en.ts @@ -62,25 +62,11 @@ GLWidget - + Vertices: %1 - - SliderBox - - - Form - - - - - - Title: - - - frmAbout @@ -117,770 +103,733 @@ - - - + + + + + Check - - + + Scroll - - - - - - + + + + + + Open - - - - + + + + Reset - - - + + + Send - - + + Pause - - - - - + + + + + Abort - + &File - + &Recent files - + &Service - + &Help - + &View - + &Windows - + &Panels - + Modification - - - + + + Overriding - - + + Heightmap - - + + Use heightmap - + Absent - + Map: - - + + Create - - + + Edit - + Border: - - - + + + X: - + H: - - - + + + Y: - + W: - - + + Show border - + Auto - + Probe grid: - + Zb: - + Zt: - - + + Show probe grid - + Interpolation grid: - + Type: - + Bicubic - - + + Show interpolation grid - + Device - + State - + Work coordinates: - + Machine coordinates: - + Status: - + Control - - - Zero XY - - - - + User - - User command 1 - - - - - User command 2 - - - - - User command 3 - - - - - User command 4 - - - - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override - - &User - - - - + &Lock windows - + L&ock panels - - - - - - - - - + + + + + + + + + ... - - - Z-probe + + + + Home - - - - Home + + + Unlock - - - Restore origin + + + Spindle on/off - - - Zero Z + + + + + + + Spindle - - - Safe position + + + + + Jog - - - Unlock + + + X- - - User commands + + + Y- - - - - - - - Spindle on/off + + + X+ - - - - - - - Spindle + + + Y+ - - - - - Jog + + + Z+ - - - X- + + + Z- - - - Y- + + + Stop - - - X+ + + F: - - - Y+ + + + X - - - Z+ + + + Y - - - Z- + + + Z - - - Stop + + + Flood - + Continuously - + 0.01 - + 0.1 - - + 1 - + 5 - - + + 10 - - + + 100 - + Step: - + Feed: - + 50 - + 500 - + 1000 - + 2000 - - + + Keyboard control - + Visualizer - - + + Fit - - + + Top view - - + + Isometric view - - + + Front view - - + + Left view - + Console - + Send command - - + + Clear console - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open - + E&xit - + &Settings - + &New - + &Save - + Save &as... - + &About - + &Clear - + Save &transformed as... - - &Device - - - - - &Modification - - - - - &Visualizer - - - - - &Console - - - - + Unknown - + Idle - + Alarm - + Run - - + + + + + Hold - + Queue - + + + + + + + Door - + + + + + Sleep + + + + Send from current line - + Feed rate: - + Rapid speed: - + Spindle speed: - + &Insert line - + &Delete lines - + Don't show again @@ -890,206 +839,211 @@ - - - Restore origin: -%1, %2, %3 + + Change tool and press 'Pause' button to continue job - + G-code program file was changed. Save? - + Heightmap file was changed. Save? - + Not connected - + G-code program - + Probe - + Port opened - + Job done. Time elapsed: %1 - + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + Serial port error - + Buffer: %1 / %2 / %3 - + File sending in progress. Terminate and exit? - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) - - - + + + Heightmap files (*.map) - + Opening file... - - + + Can't open file: - + Following commands will be sent before selected line: - + + Skip - - - + + + (%1) - + Delete lines? - + Command - + Text - + Shortcuts - + Updating... - + Untitled - - - + + + Save file as - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) - + + Following commands will be sent before continue: + + + + + (%1/%2/%3) - + (%1/%2) - + C - + Changing grid settings will reset probe data. Continue? - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1102,472 +1056,417 @@ Time elapsed: %1 - + Connection - + Port: - + ... - + Baud: - - + + 9600 - + 14400 - + 19200 - + 38400 - + 57600 - + 115200 - + Sender - + Ignore error responses - + Automatically set parser state before sending from selected line - + Machine information - + Status query period: - - + + max.: - + Spindle speed min.: - + Laser power min.: - - Control - - - - - Probe commands: - - - - - - - - - - Command 1; command 2; ... - - - - - Safe position commands: - - - - - "Restore origin" moves tool in: - - - - - Plane - - - - - Space - - - - - User commands - - - - - Button 1: - - - - - Button 2: - - - - - Button 3: + + Parser - - Button 4: + + Arc approximation segment size: - - Heightmap + + by length - - Heightmap probing feed: + + by angle (deg.) - - Parser + + Program start commands: - - Arc approximation segment size: + + Program end commands: - - by length + + Tool change commands: - - by angle (deg.) + + Pause on tool change - - + + Visualizer - + Z-buffer - + MSAA - + Line width: - + FPS lock: - + 30 - + 60 - + 120 - + Program draw mode: - + Vectors - + Raster - + By 'Z'-code - + By 'S'-code - + Grayscale segments - + Simplify geometry - + Precision: - + V-sync - + Smoothing - + Tool model - + Type: - + Diameter: - + Flat - + Conic - + Angle: - + Length: - + Console - + Show G-code program commands - + Show UI commands - + Command auto-completion - + Colors - + Z-movement: - + Toolpath - + Background: - + Highlight: - + Start point: - + End point: - + Text: - + Tool: - + Drawn: - + Normal: - - + + Shortcuts - + Command - + Text - + Font - + Size: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt - + (restart needed) - + Set to defaults - + OK - + Cancel - + Reset settings to default values? diff --git a/src/candle/translations/candle_es.qm b/src/candle/translations/candle_es.qm index 03807ed918cfabd6efde77ae59c9a91b9531e4d5..73782d5cc2cf4a9ae7a0115a66a413be29c7b548 100644 GIT binary patch delta 1627 zcmXApdr(wm7{;GHd(Ph2UF0H{6;LhP0m5n>$F z^q?b3jAjCorglgX1+;W!^L^j@e$V^7@3+_2s?IKP zq_!3K^*pTKdLcOAWZv$Mo09-(E`VepWDS`@?grEo0mD-lNBm8u0l~vao)69^^T@~K zCp@1Ei0yzE_oZ=w&f;Rk3$g_mt|q@AR{;*`0RP#+h2vx!*+E_>&y!Ec3&03ZKwApL z?gHY?{N{dQ9N^|f&g8|Fzzh)>;t$Nq27JZ?^Ev_luYkN9p6A)OE6CXpTF(OdgHU&K zE#x#DV)d_Z{)sgQneY_EBkut2!yx{!4hUZj@%kI&eu#gC0p8W*XtEXJKUQ)8Qrr|q z?}3y&7Vv!!(n4PB+Y70FGB7NVWV|X1Az|sSenk0s5a{-`+)w zvyoWFjo@Y^b~$+gNk^SZy^*}n$rPk-tEJEc@(f)WM0&qS!ReS9xq<64GJf9)n66@4 z!Jk0bAm-F;1^h&07tw*p1<2l7$?p}Id*W--@dR_bnaJOPoFVH0dkJ!y_fm1Sivib= zv!9g(jzZ2QCW!hM^9!E=(I4VX4bKPeaxumeD~~ZDity;nG{87n2n95AcJ?HMP4&_Qu~CVOK%AT}n+v@SqwZle?C7O`z3 zg;>84I}IE@tFQQ?vzNlEq=ZeJ=*Y`bqADF2S|sKBG;s*Cq{Vfoxo(w8Jli=tW2D+c zuTp55v}0QoVCk3YpNG+@Yf|I!3J0x-lnxy&Wo4;S*J$=GNYtn`4=7-*Cg4sE6B{%U zJ!P~yPm}+yAFXfKEIFcOs~R;AS7mX?Zfm0=xE{Me8-M>Qdm67zu{CVfK**KI!f z?hACrP_4gWZ{Tb^*WWvJjME=sFg7qzJb_u(6O1mb+-3WmuN^ z0SnGG)H?4O9&BiKoEXc>1UIpq&%^HLR(`9OyyaFsz-JiL<7W-T@If|VXZ#T6XuQ2dqQ{Nr-PWP>8;C=RNScd8LYVI3! zrUzAY&V1eM(RG7AEEVP{v&z}~E#|U&_t>Inb6?*QT71ym9!H15e|CSpYdv3qhkO5j z9A>YSBKGT|8c?2So~x8m`bnZX0rAR8Q@%<_h*xf!Gu3jj%`6XkCde1PzErMyTLpQX zZ-#8w2FaiK4wb8XN6G`fJ<4rAZ%N4vvPp7mShTVyOee@U!qb%b5jzBV?1V(Qz~(2b zZA~we_1a=yGT9z4H`=YTEy}9giCQY`sf$&~=i(O14GEf;7ZgtPQ0n3(m2xFvj!J%% z_=;RSdW~#JDwJE3!e#TAv2xj%<#Ju}QKcg#M^GH8Zwc}r(IzE$!fchicVhhitHqu0 delta 3863 zcmZ`*3wTrI8UB)-lUtLNwm{kt+S5x)Y1)wV1{6d~xfCf{=xiY(BQ%FJkV{F@B0OsF zf{#P&UQ*HuIJ6BM219Yg|91nAfR_B<{7?r)}M3W*2&w1W+`Tp;F zzwdqjKYeS_`;W?^UqLjyg4&ax-N+R7R z;25GJ4mcKAL!`J1@AYvkd=`jzg$IGiH$nlN5BwEy1>*Jt*Wmd(q9}8KXvk3_b{vr! zg+v^68Mq4^ih(Zye*^q2@O2>K^Unj3yg&wg4VVKw2D}4!9QbqKJHUsDR1t9e0Q?PT z;DI<6b`X`P;klQhRDlk4R-%dqFtVUA@%ba784OYSVWOGML|J8Vw7H1p;N5WGd?yP0 zjmWi}$TFAYd*33`8cE?0C$)_fwPK#TNzo``h!nlRq6Ne}^>;!cVpi`a(sxFQd1V1n z+T+Ch^$DVqeq!GL8BwW~nEwag6BFWywNFN(W5kZBCNjB+ zT?k^PcZuCRi6|!nh&-}o#QxfY=d+Zz15&A9pyKzCM-!&vD%g3VZzAD6H1#}#26j_j(KC4OqPnLsk&(w~ z+UH$Fsn_Uk_cugVJ2kCd4}$-t<{}WcFQ;ZN;-dDQ)VzKr(Xhod`_LbN|D@TyNNkRf zbI>Zt@)0>bSXeoYoI74XN4w*gTTRZF(RuDha=wd1Rd3V%{57J{Gia_7>+;w*j{bx^ zokKwIV+ucQf){qsgZoj3)==+|{m{RlpT2(cZX&}XS!Vv*(AqD%q}~Jxw#rM7J`cv7 za@#2^G-t-qu~^RkYbX)-Z}~5dIHCQc^0i+)0#BTlZ#SR#A6$J_w#s%=zhdEoL@OI|K=?F&n2_ z(AY`l#VUcQ*v{EgOZ(xfYXDeh=i8AN0 zEkn11z_)B`eK|DKv8~Vk5qKBt9lZ-C>}JF12axC$cHN#@5TC|w+E7B2eVX0;T>(aX zoqh4(a!l$OcF(I3bi9r2Nm+!rG`6P_-pKPR6;UM)mEz+{-C8F`X;Yd%1sZQCM;u!U zZF`h0{!D1PO1bD26+B>2Zs>;DxO(Ll(`I!3J7wQPv+$gvDj9*eu^yGYlf_+I{qruQ9;So@Xcq;(6Ce4*y#L6~jO zNX?a_IOT@Et<`Noe*4E-_ZSeTW-b3BkMDcpXzhw>`Tb_RxEM$4d)l_??da%@I95KS zT_+aKuhZ^0RE>#vQkZ4f#}zA5vd&&3Dtjzt*~JerneLRQF5ny)6HIwy4J0*hPx)Z! zO6>2y=(Mw!fS5%$tEm&a=TaQ=>^fgJ@?=CW=pt9wLhBv6?eoE0Hcoe-4--f!)E$%o z%ctmW$UtDs8GT+`0}hhM^`kOu(7s+j{sKDAHtVOZKaG>HOYeCOl4ZT2j|MQA3exY@ zodm%?{kc!!4UJ8IAp}q4+^PS^Blxau(|`FSChkp}U`XpZgKc3lOrE(6j7A%lUbzA@ z_8ZQfTLc%cOUh&|(*oK{6qH0!w zVaq9B4Im{hS-!ADnHB3``(<}fCN&XHA&QWfT5uPpYU0R3jzqYwi4R4*Equ6|vpC>9 zQctaK_PRZMBoc>^+$qZ&W3HeAWljNN9JO5PNwl;V<63cKyrAo+kaviN7=a)D9k7*rNj;}_g6 z{!g%B9CrKd2$lUfuIzSka;i*Zl2zW)7lS_(lBML81-DjGiXj7n6qUmIL9b6Oqe+q^ zZR8^tEyv}DOgsf3R}eC}s9n1A)5Y%v3?_(ZYuY2ha7!rY^Tj5oRmn%qz!JB#%#9Qr zwL$fE+$|tia#3w7-?EtV2i?5TnlV?nnqd|CGSul2#0JTih*Q-HrDmhR4L+8VNr}Wl z-*BT=GuiEpNEu>h23uHt9@Wqy6bgeOFZAclU`O`=7ws4_fxG>gYi+`Il@Y@{eTRU1bp)wD% zh)04K4T^2WP2)_YQaMZ8Lcs;Ru-;O|8K@QuM2~Q&H)lW)9}04_=ZN|aONJz~D4k+} zQ#fF$iaP0~+vs(R`g9OQ{E~G$P?W>%cwY8_;A<-pz{U!Kod5n2Q91 zjF0mMgk0;;*jE;xd{icUD;|hGT%tnaBt(Ie!_?QbwD3MYC7dDk)SV3@fAzOSyI%pg^`0?8^>Fv!2X;y8}?{@{CX2@czk*ta8DnIwj&*{z#47>M9JkRq=aH_2pXVNa%6IFV@-Ds5@{dUV_&u|nU% zq4X@x532ixty#l!lbsurJ6QApb}+Y)=i?pDDw!a}hS`KEjx=FS$qJ(yUTQ??HwsqP7e{4Sp~wf53N#5G9V;);Y5*^~{g0PhP+`MOH0 zO$ diff --git a/src/candle/translations/candle_es.ts b/src/candle/translations/candle_es.ts index d9a97e47..71e12886 100644 --- a/src/candle/translations/candle_es.ts +++ b/src/candle/translations/candle_es.ts @@ -62,25 +62,11 @@ GLWidget - + Vertices: %1 Vertices: %1 - - SliderBox - - - Form - - - - - - Title: - - - frmAbout @@ -115,37 +101,37 @@ GRBL Control - + G-code program Programa de G-Code - - + + Isometric view Vista isometrica - - + + Top view Vista superior - - + + Front view Vista Frontal - - + + Left view Vista izquierda - - + + Fit Ajustar vista @@ -154,57 +140,57 @@ Ajuste de alturas - + Border: Bordes: - - - + + + X: X: - + H: - - - + + + Y: Y: - + W: - - + + Show border Mostrar borde - + Auto - + Probe grid: Grilla de medición: - + Zb: Zн: - + Zt: Zв: @@ -213,17 +199,17 @@ Mostrar grilla - + Interpolation grid: Grilla de interpolación: - + Type: Tipo: - + Bicubic Bicubico @@ -240,52 +226,52 @@ Desplazamiento automático - - - - - - + + + + + + Open Abrir - - - - + + + + Reset Reiniciar - - - + + + Send Enviar - - + + Pause Pausar - - - - - + + + + + Abort Abandono - + State Estado - + Work coordinates: Coordenadas de trabajo: @@ -294,62 +280,56 @@ 0 - + Machine coordinates: Coordenadas de máquina: - + Status: Estado: - + Control Control - - - + + + Home Origen - - - - - - - - - + + + + + + + + + ... ... - - Z-probe - Medicion de Z + Medicion de Z - - Zero XY - Cero XY + Cero XY - - Zero Z - Cero Z + Cero Z - - - + + + Overriding @@ -367,48 +347,44 @@ - - Restore origin - Restaure el origen + Restaure el origen - - Safe position - Posición segura + Posición segura - - + + Unlock Desbloquear - - + + Heightmap Mapa de alturas - - + + Use heightmap Usar mapa de alturas - + Map: Mapa: - + Absent Ausente - - + + Create Crear @@ -417,12 +393,12 @@ Modo edición - - - - - - + + + + + + Spindle Husillo @@ -432,12 +408,8 @@ Velocidad: - - - - - - + + Spindle on/off Husillo on/off @@ -454,51 +426,51 @@ % - - - - + + + + Jog Control manual - - + + X- - - + + Y- - - + + X+ - - + + Y+ - + Step: Pasos: - - + + Z+ - - + + Z- @@ -506,11 +478,6 @@ Presets: Presets: - - - User commands - - 2 2 @@ -524,29 +491,29 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 @@ -556,494 +523,508 @@ - + &View - + &Windows - + &Panels - + Modification - - + + Edit - - + + F: + + + + + Show probe grid - - + + Show interpolation grid - + Device - - + + + X + + + + + + Y + + + + + + Z + + + + + + Flood + + + + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - - + + Keyboard control Control desde teclado - + Visualizer Visualizador - + Console Consola - + Send command Enviar comando - - + + Clear console Limpiar cosola - + User - - &Device - - - - - &Modification - - - - - &Visualizer - - - - - &Console - - - - - User command 1 - - - - - User command 2 - - - - - User command 3 - - - - - User command 4 - - - - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override - - &User - - - - + &Lock windows - + L&ock panels - + &File &Archivo - + &Recent files &Archivos recientes - + &Service &Servicio - + &Help &Ayuda - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Abrir - + E&xit S&alir - + &Settings &Opciones - + &New &Nuevo - + &Save &Guardar - + Save &as... Guardar &como... - + &About &Acerca de - + &Clear &Limpiar - + Save &transformed as... Salve &transformado como... - + Idle Listo - + Alarm Alarma - + Run Iniciar - - + + + + + Hold Parada - + Queue En cola - - - + + + + + Check Chequeo - + + + + + + + Door Puerta - + Unknown Desconocido - + + + + + Sleep + + + + Send from current line - + Feed rate: - + Rapid speed: Velocidad de aproximación: - + Spindle speed: - + &Insert line &Insertar linea - + &Delete lines &Borrar lineas - + Don't show again - + + Following commands will be sent before continue: + + + + + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + + Change tool and press 'Pause' button to continue job + + + + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + + Skip - + Command Comando - + Text - + Shortcuts - + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1054,38 +1035,38 @@ %1, %2, %3 - + G-code program file was changed. Save? El programa de G-code ha cambiado. Desea guardar? - + Heightmap file was changed. Save? El programa mapa de alturas ha cambiado. Desea guardar? - + Not connected Sin Conexión - + Probe Medición - + Opening file... - + Updating... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Archivos de G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1094,7 +1075,7 @@ Conectado - + Job done. Time elapsed: %1 Trabajo terminado. @@ -1105,18 +1086,18 @@ Tiempo transcurrido: %1 Procesado - + Serial port error Error en puerto serie - - + + Scroll Desplazamiento - + File sending in progress. Terminate and exit? Envio de archivo en progreso. Detener y salir? @@ -1133,33 +1114,31 @@ Tiempo transcurrido: %1 Archivos de G-Code (*.nc *.ncc *.tap *.txt) - - - + + + Heightmap files (*.map) Mapa de alturas (*.map) - + Port opened Puerto se abrió - - Restore origin: %1, %2, %3 - Restaure origen: + Restaure origen: %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Archivos de G-Code (*.nc *.ncc *.ngc *.tap *.txt);;Todos los archivos (*.*) - - + + Can't open file: No se puede abrir el archivo: @@ -1174,26 +1153,26 @@ Tiempo transcurrido: %1 Enviado - + Delete lines? Borrar lineas? - - - + + + (%1) - + Untitled Sin-título - - - + + + Save file as Guardar archivo como @@ -1202,7 +1181,7 @@ Tiempo transcurrido: %1 Archivos de G-Code (*.nc;*.ncc;*.tap) - + Changing grid settings will reset probe data. Continue? El cambio de configuraciones de grilla reiniciará los datos de medición. Desea continuar? @@ -1215,53 +1194,53 @@ Tiempo transcurrido: %1 Opciones - + Connection Conexión - + Port: Puerto: - + ... - + Baud: Baud: - - + + 9600 - + 14400 - + 19200 - + 38400 - + 57600 - + 115200 @@ -1286,13 +1265,13 @@ Tiempo transcurrido: %1 Aceleración: - + Spindle speed min.: Velocidad mínima de husillo: - - + + max.: max.: @@ -1301,19 +1280,12 @@ Tiempo transcurrido: %1 Comandos de medición de Z: - - - - - - Command 1; command 2; ... - Comando 1; Comando 2; ... + Comando 1; Comando 2; ... - Heightmap probing feed: - Avance de medición de mapa de alturas: + Avance de medición de mapa de alturas: Report units: @@ -1328,7 +1300,7 @@ Tiempo transcurrido: %1 Imperial - + Parser Analizador @@ -1337,28 +1309,28 @@ Tiempo transcurrido: %1 Largo de segmento de aporximación de arco: - - + + Visualizer Visualizador - + Line width: Espesor de linea: - + Smoothing Suavizado - + MSAA MSAA - + Simplify geometry Simplificar geometria @@ -1367,27 +1339,27 @@ Tiempo transcurrido: %1 Largo de segmento: - + FPS lock: Bloqueo de FPS: - + 30 - + 60 - + 120 - + Z-buffer @@ -1396,52 +1368,52 @@ Tiempo transcurrido: %1 Represeantación gráfica de herramienta - + Type: Tipo: - + Diameter: Diametro: - + Flat Plana - + Conic Cónica - + Angle: Ángulo: - + Length: Largo: - + Console Consola - + Show G-code program commands Mostrar comandos de programa G-Code - + Show UI commands Mostrar comandos de interfaz del usuario - + Command auto-completion Auto-completar comandos @@ -1450,9 +1422,8 @@ Tiempo transcurrido: %1 Paneles - Heightmap - Mapa de altura + Mapa de altura Units: @@ -1471,52 +1442,52 @@ Tiempo transcurrido: %1 Control manual - + Sender - + Ignore error responses - + Automatically set parser state before sending from selected line - + Colors Color - + Z-movement: Movimiento en Z: - + Normal: Normal: - + Toolpath Recorrido de herramienta - + by length Por longitud - + Drawn: Dibujo: - + Background: Fondo: @@ -1529,234 +1500,223 @@ Tiempo transcurrido: %1 Unidades de medida de la aplicación: - + Machine information Información de la máquina - + Status query period: Período de la pregunta de estado: - + Laser power min.: - Control - Control + Control - Probe commands: - Órdenes de sonda: + Órdenes de sonda: - Safe position commands: - Órdenes de posición segura: + Órdenes de posición segura: - "Restore origin" moves tool in: - «Restaure el origen» mueve el instrumento al: + «Restaure el origen» mueve el instrumento al: - Plane - Avión + Avión - Space - Espacio + Espacio - - User commands - - - - - Button 1: - - - - - Button 2: - - - - - Button 3: - - - - - Button 4: - - - - + Arc approximation segment size: Talla de segmento de aproximación del arco: - + by angle (deg.) Por ángulo - + Program draw mode: - + Vectors - + Raster - + By 'Z'-code - + By 'S'-code - + Grayscale segments - + Precision: Precisión: - + V-sync - + Tool model Herramientas modelo - + Highlight: Resaltado: - + + Program start commands: + + + + + Program end commands: + + + + + Tool change commands: + + + + + Pause on tool change + + + + Start point: Origen: - + End point: Punto final: - + Text: Texto: - + Tool: Herramienta: - - + + Shortcuts - + Command Comando - + Text - + Font Fuente - + Size: Tamaño: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt Puntos - + (restart needed) (Se requiere reinicio) - + Set to defaults Opciones por defecto - + OK ОК - + Cancel Cancelar - + Reset settings to default values? Restablecer la configuración a sus valores predeterminados? diff --git a/src/candle/translations/candle_fr.qm b/src/candle/translations/candle_fr.qm index 70205eb5bf603a81b37aa5b7d84900a28afb7b69..c7df0f3bcdce5680a058435a63d73665abfe2418 100644 GIT binary patch delta 1555 zcmXAodr(wm7{;GHd(JLlI;I1q3%lW}A$Bzr2u8X+aj2Ha~Qtz&`d?vSce0BZ`# zIL#9HH&8JrJ;J{YB5xvmh=mPC*e3298eyyIX5#^fE#~>m`3}T(PduzgeA5I^Afa)B zy;yjlk{ue!E>3?23-5?*^mi-@-OKYtq&+wU$VFJZ_D>*S8M5}5v7vof*-l$L3|QI2 zIFE8B8_FMk53l5p0k+l1(J{bw3-7it5jJ9^ zYcUHBYCHn2Qra^@XxJ%KIAYsDt`WKh z2Z5la!ku#74^PmhlyN}c8`?#Ex%A)r1?{TK^vzYPJ=Eh0M6A|UC%sC8OkzZmGd;D6 z_H^!uON+Ru_~<{@Xr*h(t`kVmRJ|hMfKk$ zHZ*f`%M!7yX_)=VZa>mx$=B2v~zKfF#a=j#)# zV`PW^t$9{95T!5gxI!s+J0<;kgcEc+mE0r!>YVmuyvB)3oW`0}TD8lt;TZ3m+6<+q zx$QGf7-|Z69tuOxH7aAwG4$GMxC=vup^J_dN?B_(*Dz6Vjd5*)$cgNelm{p2-)_ur z@uGyD#)5QyTAuG2D<=y0Xp9Z*vpLZWlUTy74|6k>{Ctb-GwmMWSLJ)(TTU9_Br{Uw^@k~~yG3?vo|tr}eAe8{xQ%lEeOl&JDGzL+Rn{%? zZ`=6Z@T2@_7ZtOVT9RD4Z*m)_SW=gluo1hZcxZ^;OtbX&Z=!eJ&Ne%h3373Mv3m~- zWH{e>!tHf!+DMrNcEwshj$YqIXME zE8V;WW!ybOvFUvjYp|>oPajviJw`>v*Jp)#*k?dc8~n;N%1FR0H80RzQ0jx{sv#k3 zG|Jh~f0dl%D5W;6^J&(~@TjL84UbkUBT5Bj&aBHyjD3?5qz_bHw!0{%=&#k(m`sh5 z7MrYGjxATV$K@;5_+X_XK0yh6Hd&Dq_Nw~CB0;@7$5&83jg-{|$*CHpX>RoY0)&vt delta 4061 zcma)84Rn*`6~6iMefevW{)Cb?wk7m8G^Hf{ryx)Y1Jt@gk+#`X(&VEJrb$UsN^vua z;!#0_^8rJxIM3MxL?;-3peS-SaF&VU{Mq2hkII}V$Z?y~gHHCmUo=VWc8<+SpCs>n z?|trl?!C!#;>XeG^nKo(qnC!Z9GjT;^3um%IyIX}wTFm`@MM1uqBIxK348@uOQa70 z8;Ht|1E&H%CsNMB`QPGLx&YWjRC)^#{z_xOrLextA6a6J$H zMi2yfhNY!M)tPwz7)7ZD8S0fpHLW;!2gd9@7`O05Swln%+lg{Mh~wn_M4bnT@==|o zs7moYMDEo@C3@nX{Ued~eNsAEr3Oja%={FRvW?+2q#Oa-vWUOuLqh7ruYa1z&=n>A z`7WZ&7UKVW7g2?e_;(irw-EpDVj}ZGAXu9RiT}C;xPyeUg+!Hili-*ON5@HMXe6>^ zk+2NJEO(MHG>53*Lm>Pp`bl`Sn`pvrD%?306%JDQarn_TQTYWB(ndpMXBTyuWZ!lK zxQ=QDa8UXc)f@qq=K1`JUEM4RMCsFwjEm^+>1fQmM8;DQ&irRg!i#qJozGW@ZRg9ExDdV<`Wl_>kT-n%cGx(mw^w`&sDfL@jx8w zv#5JRHVE#d@Hz|R9i~iV?2>{n7j977qoYBn=amlp4h_ekSns0d&0g3l{v~C{^S$* zxy+qekNdTK$~kLUW$#zcKeZIiy;j-z>dR50ac7mj8FvzmKd*dvB#Ws2nDUVeHxcn+ zzG8Yhn19JTu0{8c+sX&RBgmkEUs>=|OwB2NkZEjC^LKrKjBOr%L!m&F;pDe1co7nK z`EA#hAhBQZkJm|fzm4Cy4;9RKkKeZegzV4o2X#@5L-`y0m4he2@JXTSfh!o1nL>?X z9=g6z@QmMqDR@)pxvmmMh~o1ZQYAzv*xI_TQHi2HL6R$ScL9Ap{^){UBjT-dGT#X zc2Ygnav72>QLkvSAk&Z3>kl5q)KshYMuxG|wrQq+gaqsZn&{v;ys+J?xv%ABlxn}` z)6c_bzNa;p_r(z46>a6iucLIYYkQuABg5C))q63&1ufd`VVqYT*Nz-RiFJpyZ`rpK zaf`KY9YC|Cf2h512)knZ8l8SS{5xDaZv%)^yH0#ugaoVNXitmk#Qk~rU{@UNvvhse z_9Me}ajf}3x0wYl;&eM-Y(z!M()dBlarL>h+*6k!)oW>k@1KNp*=hHj#U82Ol=g>> zkTmb+w7(3j#e6@a*LAD_F_V7Lk`0jLWE>}cr1$TIA5(OXKJvvTXuVv&V=0&`rs;<- zp#r*Z^#>Hds?GW<3J|FO!cf@Pic)tPrkE;G%4ZDI&m!aebB1|a-hp&C7`h*UWVyE* zq5)KbI{ad&{)o}V_^oHge!`TpeVnU|j@3-MxH_PzZ-Ke-PQ)A3Lasp%YigE73 zK`=5H2QFNI<}Jq4rwbE$+xDr9k~yIhSSgd2ji5zIgS-0>EE0v z0HH-bd?}fgC^kn$8UU&AR1`^0Rc@?K_*8K<<%2}Xf1J~^GGxAx^|zpTa3i=)y2HhNp-O~X&wdVtc&f^w=2iVVJZoagb$^3ykMM> zBS+#Bg+p@YnmQdYbEE|09hD9_hVPcY${W%l#a@=MqG-4!YSQRlqVT8 zs>~XET|3w#5t?^89CGw%)eldqaKcg?6`iBn#9c-0m}4Hl1Cq|U+OZB)%p%1`SsRZc zRcFk~=|agx3Q!~wL)Fw376a0a88=rK&>T8X%b<-PM!j)E=;Nk-C>Bgy(KYo)f?-c6 z==aBVXH;@m+o%nfdST{=F%vh47*_J)>$V>eeR$`lZW5C&ntMdgE!N(kSCn4Oy2%oN zRgi^ESg4zWfpE|-#%7r^6pC``*A-^zOr}cG1Bkf$TFCu%1%^ar`6pb*uO6tkc zOIOT!rmXp*ue&GG>+Z9L#Yn^#=nkU|x*^g6P)iNQFYx+B>CA-e*ii0!oJB{ia?+?( zB9zeT?hlKx?!2vvXelj{o0nx8L53o&Mz(%r8$@&akSWVJdDpl|3`c??(Hac-x_yB$ zqR#kn{xB>$HY_z%Ax}-!cUYYuX&D`;QCH%uu$ENeSuI`2pXIb5v7jtSQlv0_4bn-n zhBo&y(b^Xb`y#$z%u-yU0Q%9lBac=q2g|Nxqjb~ zYQoNco7@9mD(JzMF=nD3+ zNph4Jq(h~z=ICg)JT2Z7x58|9zqF$4j`ligMg@EEV4=OJs1+-68vc*{yh{Fj^e)eB z4)*rC1753hn$`2&%c^NsX>W11lrcq+CfQ!I8f9Pqe}zaZY}wL6Q>k>fBQy4eZIME{ zXr3 GLWidget - + Vertices: %1 Vertices: %1 - - SliderBox - - - Form - - - - - - Title: - - - frmAbout @@ -115,37 +101,37 @@ grblControl - + G-code program Programme G-Code - - + + Isometric view Vue isometrique - - + + Top view Vue de dessus - - + + Front view Vue de Face - - + + Left view Vue de gauche - - + + Fit Ajuster vue @@ -154,57 +140,57 @@ Paramètres palpage surfacique - + Border: Bords: - - - + + + X: X: - + H: - - - + + + Y: Y: - + W: - - + + Show border Montrer bord - + Auto - + Probe grid: Grille de palpage: - + Zb: Zb: - + Zt: Zt: @@ -213,17 +199,17 @@ Montrer grille - + Interpolation grid: Espacement grille: - + Type: Type: - + Bicubic Bicubique @@ -240,52 +226,52 @@ Défilement auto - - - - - - + + + + + + Open Ouvrir - - - - + + + + Reset Reinitialiser - - - + + + Send Envoyer - - + + Pause Pause - - - - - + + + + + Abort Abandon - + State Etât - + Work coordinates: Coordonnées de travail: @@ -294,62 +280,56 @@ 0 - + Machine coordinates: Coordonnées machine: - + Status: Etât: - + Control Contrôle - - - + + + Home Origine - - - - - - - - - + + + + + + + + + ... ... - - Z-probe - Palper Z + Palper Z - - Zero XY - Zero XY + Zero XY - - Zero Z - Zero Z + Zero Z - - - + + + Overriding @@ -367,48 +347,44 @@ - - Restore origin - Restituez l'origine + Restituez l'origine - - Safe position - Position sûre + Position sûre - - + + Unlock Desbloquer - - + + Heightmap Palpage surfacique - - + + Use heightmap Utiliser palpage surfacique - + Map: Fichier: - + Absent Absent - - + + Create Créer @@ -417,12 +393,12 @@ Paramètres de palpage - - - - - - + + + + + + Spindle Broche @@ -432,12 +408,8 @@ Vitesse: - - - - - - + + Spindle on/off Broche on/off @@ -454,51 +426,51 @@ % - - - - + + + + Jog Contrôle manuel - - + + X- - - + + Y- - - + + X+ - - + + Y+ - + Step: Pas: - - + + Z+ - - + + Z- @@ -506,11 +478,6 @@ Presets: Pre-selection: - - - User commands - - 2 2 @@ -524,29 +491,29 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 @@ -556,479 +523,493 @@ - + &View - + &Windows - + &Panels - + Modification - - + + Edit - - + + F: + + + + + Show probe grid - - + + Show interpolation grid - + Device - - + + + X + + + + + + Y + + + + + + Z + + + + + + Flood + + + + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - - + + Keyboard control Contrôle avec le clavier - + Visualizer Apparence - + Console Console - + Send command Envoyer commande - - + + Clear console Effacer consôle - + User - - &Device - - - - - &Modification - - - - - &Visualizer - - - - - &Console - - - - - User command 1 - - - - - User command 2 - - - - - User command 3 - - - - - User command 4 - - - - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override - - &User - - - - + &Lock windows - + L&ock panels - + &File &Fichier - + &Recent files &Fichiers recents - + &Service &Paramètres - + &Help &Aide - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Ouvrir - + E&xit Q&uitter - + &Settings &Reglages - + &New &Nouveau - + &Save &Enregistrer - + Save &as... Enregistrer &sous... - + &About &A propos de - + &Clear &Effacer - + Save &transformed as... Sauvez &transformé comme... - + Idle Idle - + Alarm Alarme - + Run Demarrer - - + + + + + Hold Stop - + Queue En attente - - - + + + + + Check Vérifié - + + + + + + + Door Porte - + Unknown Inconnu - + + + + + Sleep + + + + Send from current line - + Feed rate: - + Rapid speed: Vitesse d'approche: - + Spindle speed: - + &Insert line &Inserer ligne - + &Delete lines &Effacer ligne - + Don't show again - + + Following commands will be sent before continue: + + + + + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + + Change tool and press 'Pause' button to continue job + + + + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + + Skip - + Command Comande - + Text - + Shortcuts - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1039,22 +1020,22 @@ %1, %2, %3 - + G-code program file was changed. Save? Le programme G-code à changé. Sauvegarder? - + Heightmap file was changed. Save? Le fichier surface de palpage a changé. Sauvegarder? - + Not connected Non connecté - + Probe Palper @@ -1063,7 +1044,7 @@ Connecté - + Job done. Time elapsed: %1 Travail terminé. @@ -1074,18 +1055,18 @@ Temps écoulé: %1 Traité - + Serial port error Erreur port serie - - + + Scroll Déplacement - + File sending in progress. Terminate and exit? Envoi de fichier en cours. Terminer et Sortir? @@ -1094,38 +1075,36 @@ Temps écoulé: %1 Envoyé - - - + + + Heightmap files (*.map) Fichier de palpage (*.map) - - Restore origin: %1, %2, %3 - Restituez l'origine: + Restituez l'origine: %1, %2, %3 - + Port opened Le port s'est ouvert - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) G-Code fichiers (*.nc *.ncc *.ngc *.tap *.txt);;Tous les fichiers (*.*) - + Opening file... - - + + Can't open file: Impossible d'ouvrir du fichier: @@ -1140,57 +1119,57 @@ Temps écoulé: %1 Envoyé - + Delete lines? Effacer ligne? - - - + + + (%1) - + Updating... - + Untitled Sans titre - - - + + + Save file as Enregistrer le fichier sous - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) G-Code fichiers (*.nc *.ncc *.ngc *.tap *.txt) - + (%1/%2/%3) - + (%1/%2) - + C - + Changing grid settings will reset probe data. Continue? Changer les paramètres de la grille, réinitialise les données de palpage. Continuer? @@ -1203,53 +1182,53 @@ Temps écoulé: %1 Paramètres - + Connection Connexion - + Port: Port: - + ... - + Baud: Baud: - - + + 9600 - + 14400 - + 19200 - + 38400 - + 57600 - + 115200 @@ -1270,13 +1249,13 @@ Temps écoulé: %1 Vitesse d'approche: - + Spindle speed min.: Vitesse broche min.: - - + + max.: max.: @@ -1285,19 +1264,12 @@ Temps écoulé: %1 Commande de palpage Z: - - - - - - Command 1; command 2; ... - Commande 1; Commande 2; ... + Commande 1; Commande 2; ... - Heightmap probing feed: - Avance lors du palpage: + Avance lors du palpage: Report units: @@ -1312,7 +1284,7 @@ Temps écoulé: %1 Imperial - + Parser Analyseur @@ -1321,28 +1293,28 @@ Temps écoulé: %1 Largeur de segment des arcs: - - + + Visualizer Apparence - + Line width: Espaisseur de ligne: - + Smoothing Lissage - + MSAA MSAA - + Simplify geometry Simplifier la geometrie @@ -1351,27 +1323,27 @@ Temps écoulé: %1 Largeur de segment: - + FPS lock: Bloquer FPS: - + 30 - + 60 - + 120 - + Z-buffer @@ -1380,52 +1352,52 @@ Temps écoulé: %1 Représentation de l'outil - + Type: - + Diameter: Diamètre: - + Flat Plat - + Conic Conique - + Angle: - + Length: Longueur: - + Console Console - + Show G-code program commands Montrer commande du programme G-Code - + Show UI commands Montrer les commandes de l'interface utilisateur - + Command auto-completion Commande Saisie auto @@ -1434,9 +1406,8 @@ Temps écoulé: %1 Panneaux de contrôle - Heightmap - Palpage surfacique + Palpage surfacique Units: @@ -1455,52 +1426,52 @@ Temps écoulé: %1 Contrôle manuel - + Sender - + Ignore error responses - + Automatically set parser state before sending from selected line - + Colors Couleurs - + Z-movement: Mouvement Z: - + Normal: Normal: - + Toolpath Parcours d'outil - + by length Par longueur - + Drawn: Dessin: - + Background: Fond: @@ -1513,234 +1484,223 @@ Temps écoulé: %1 Unités de mesure de l'application: - + Machine information Renseignements de machine - + Status query period: Période de question de statut: - + Laser power min.: - Control - Contrôle + Contrôle - Probe commands: - Commandes de sonde: + Commandes de sonde: - Safe position commands: - Commandes de position sûre: + Commandes de position sûre: - "Restore origin" moves tool in: - "Restituez l'origine" déplace l'outil dans: + "Restituez l'origine" déplace l'outil dans: - Plane - l'avion + l'avion - Space - l'espace + l'espace - - User commands - - - - - Button 1: - - - - - Button 2: - - - - - Button 3: - - - - - Button 4: - - - - + Arc approximation segment size: Largeur de segment des arcs: - + by angle (deg.) Par Angle - + Program draw mode: - + Vectors - + Raster - + By 'Z'-code - + By 'S'-code - + Grayscale segments - + Precision: Precisión: - + V-sync - + Tool model Modèle de l'outil - + Highlight: Souligner: - + + Program start commands: + + + + + Program end commands: + + + + + Tool change commands: + + + + + Pause on tool change + + + + Start point: Origine: - + End point: Point final: - + Text: Texte: - + Tool: Outil: - - + + Shortcuts - + Command Comande - + Text - + Font Ecriture - + Size: Taille: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt Points - + (restart needed) (Redémarrage nécessaire) - + Set to defaults Paramètres par default - + OK ОК - + Cancel Annuler - + Reset settings to default values? Réinitialiser les réglages par défaut? diff --git a/src/candle/translations/candle_pt.qm b/src/candle/translations/candle_pt.qm index bf5e210dcef3f1e1bb00a8fde7ac38434d980a40..7d19af7f88d885106ce609a220a3247efc6d45c4 100644 GIT binary patch delta 1606 zcmXApdr(wm7{;I7J!fz1E&_^(2y$DHT@Vm9L?*Ok5EMl%RFXtN5(hMeprvxBk}N`u zju<5B5Fv;(>8uw-1jdmPlF7s}Nrf(BMkwP@PNSprEd2HR_MGp%J@0dN$X1_Yi)+pH z=pC)C>htyL%&fa``vpJ@1`q?xeoD>mlZ_;B+0t+Qoq9 zJd*J;Kln9KF;yQzt};$tiI5Q%R$qk4abJ@GQ*}3a15w3%K0DBcsBXt08J4pSRwCw@ zgJ+Obcd zQvUt|Yuis#8BeV3VIGeLq)#aW=2RiQseujK)=nN~79zcclg+$_^zWI#l*~rjWFG!kxPlY%(5^43OrJdLx+e=I$t&;g0%nNv#)$zQ z$eT^?Q3)^krQu;9aFcwnocC-YI~9vdIk8WhV##fqXx4Pay33t_OTXe^k1JsAR@BD5 zN@Lv+%yG_CU|0xWN)x%13fl^L=n;!ht`unpzuRgCRg@tzahsqR^qG+5A5h#ybXpkQOm=-#8HDAx6m( z>476+mU|;jcUjz0bCD8n7Ykh5827HY|HO-IG(-ISfSF!Uh_%lGs8EA=^n3{wjT29t zEu?~jVs|uG=GCZFC?BwaXG*Vo={6=_tPJWc<_noJE8l~X-%@TpqvDQwm7{O3V!|gX za}b}0T2&GEuXCqas`;Le$sbfZ7J0IPcvX2vFD0!}$K7q_0KIDKAEfVR>avs#oH#}O zxYf>8rD?Xb@V?VWnv#>hb2X7z7SrKaC>n5MX@8RuETuLvD>Q>p(Dp+u@Zk2;xdAhul44iUYSNLxwmHA88m^qDg@9Nq{3s^o@ zcV0#YD|O>C7Bt`2`@Nn@h3fTl-NLBAU47gT2bhtpf9((zbrzh8nvK^M1*~zK1(K#jIcKtObTh- zO)u?rohKE!wb=8f2FayC_aw=r@>Z*IcIKyS%-tr9Mwle)^nUvuk39-|xL1nI-Z#rr zl#cj^+Fb%3$)qBqtCVP*E1fpR*t3KFk!d`ThFtz7y&>(e%#f_lJ4^X<>L&`ths>Se zp^!*PYYLPqOo8_0=1ubYu`rqB7oH<^MkpP{rGy9>6>`Z{{c!eofrTB delta 4064 zcma)83vg8B6+XLr@4m8+yvU0{ZXTQ0CY#;OgCxWbF){=&5C{^oDrMQ+Y%WdqhTR2( zI<8t{5h!9WP^yq>RR~B&=u#!1k*Q|dptcpPRy!&x6{{$N)XtPr>38qSW`lI5$=vxa2=4QBpb31>6a& zB{IQ=>WND31~vfq5NT#%{WmeReGP0TD$WGLw)p$N6~Hfn_hP>nxDER}L=ol~(Ue(4 z>`Wp(jAg941$cm{U=#2ea4`UX1uOx=zHm11IM5G#5jY4u349XxDsT+=I`Cs6T^L-y z0DlVzvN5!sBC1Zo_tg}k8acz$L^bVTcpr@M-Si`(Hijs5Inkm{qO2n^tVGbRQKH;8 zh*p4oQ4^7O1Mmc?kNl3v@G5Csa;4^yrbYJq6=^zTe>tQX2bPQyvk|1IgqSVQ5}9iv z#5}i>D5Z>;Qx6bT+)2z^OMsh+`DYPP##JCno@poM-!@<;u_cR$9QP9IoDD}OiLGxW z%05eM4~XTo5xX1Jo4y(dKdSY_{sL9XYoLN*NTuhg{7>*>D5LW8AY_Pm$S!X*d`)C?&psYS$EOA?n^}F8)@m59U!=lI!i&k>MztOz%Js{QRj|9EPPDMUO)p)y`7eg z!|~Kl$de5HYm&(0$Htl;l4tm7Wb|wdxt-)Wh|IZvkmrwZRC}Io=Pwi0iFAh+`|^D; zth++~ty4ho9tv&FfxM%1*9hX!HX5HY0{x4;bn%sWL>9FwtMD~weNlB*|0pE*MqPR0 zDG;-$9dBae)J-vTj;Z;tG7z|3{m@GuX#Y3$BVXJ@G_6IwPpQa*>I3%sQJEv^S3diU zsPc;XgDu!!J4#0Kn6=XvVrrgd*2@~3-ew;72pN~!n5_jYQF02iYwin> zUQ7Ud(%)zNpsa0Bap_$o%k#@49j zpxMr_zKngCf}gRyw^l>5Rc!Cie+wL9g&7BcRyLG+43$b}w;yT&aUc8W&I&YNGrRkn zB9!98Bj@65dtC55kf84a0`RnBQra3_~HTyAK)0Uq^|JLx$7#AtH6J z;q-Adn{~`^{=^6*U0^f~!N0TK*j*3e)M@1R@{nLj49hP@jQmJ09t_6NUThqgzXr{f z7sHx^#_e+8f`i847aH;WHHej%7BAh3={Xz2{H>rbD)$5%}r;J@wAQRIXnIg=~QO_9!Qow+Z+j? zGSzPL5z}exuQtE`DSAVH)_f+2o|wMJeC{5s8w<=|K8T77$!9GoWA6~z?zPNbv>wg& zwq@P<^U!>n<^A_pL7FeEX|0dq;Q7dEccPS)5o^cTCIouW`oVuNPE%IKuwuk|<(=us z{2Ku;C94L-R#TxKKw4a?Lg{ffJ5x{16eK@|;tNc3&>xc5ByCzzbQSxI>L$vfrNqN7 zOal3E7otYu$VRUCF4Iyz7#4hdsFAa|(3zy4b8Dy2?dQYM6rG9DxTr45CHYipS6y__ zWY=faX1|EPF+v1zs)NIR58lVxPb~s<8{k=ypA2XCWtUjhtnmc6s5W3 zm5JvXr$ga&o%aa?l}kEQm@AE1-4Q)r?oRnX9-47Eoi~c^zTVD#BRe(K#yzQOzmo)m z-w+d_)U_(7%s&+m6CP`7ola?yIZgV?dZ3|*7L!PQa>1FJ;-;NCB!L_heY9LQqM_ zi=;$!tPrbE+`nZp9}0^>o)d$DUkH3hi@F>5O7MfeH_Cla74UB(w~VE@sg4K8nH-?e zXmeF?HaD(nMLur2y*iiLK`wNyG;kFHX+N?J(u8d04sQ?74TvEjEQryD>3a1vi&9%T zQy5Y(9+c_m71v2lZm}b0vISiG6HSuoIfaZORKrLoP|1Q09*nPYm%lN145v? zkC*N`Gkhk{8>`vyfauOMynLdp&UqI#1<5P+ZAlfTl>QqWlFG@?c94OgY5s zN-*SuBDbvTI}Kn;*f8N&>ygbpa9bC-gZ__(gAIpa6qU)6Tai;L9FuMhR(RA~9#{^w zhm^QvtBFC#E129!1sIvNe25EcMX`?)0@C5KjOd)AmFmh2Op1IcLp#NfGP?<$%*{R@ z-^T~NXd`9YllzNR*+#lq8JF$^OZH~(nr_*#w7;Zhshe8Bs2^5xXUI%lG!viKKXofl zC!ginEn*%axP($^$wsW#_E2Z4~azX;!gW(pOLYFWib`WB>pF diff --git a/src/candle/translations/candle_pt.ts b/src/candle/translations/candle_pt.ts index 7f22f143..1d27fdf8 100644 --- a/src/candle/translations/candle_pt.ts +++ b/src/candle/translations/candle_pt.ts @@ -62,25 +62,11 @@ GLWidget - + Vertices: %1 Vertices: %1 - - SliderBox - - - Form - - - - - - Title: - - - frmAbout @@ -115,37 +101,37 @@ Controle GRBL - + G-code program Programa de G-Code - - + + Isometric view Vista isométrica - - + + Top view Vista Superior - - + + Front view Vista Frontal - - + + Left view Vista Esquerda - - + + Fit Ajustar vista @@ -154,57 +140,57 @@ Ajuste de alturas - + Border: Bordas: - - - + + + X: X: - + H: H: - - - + + + Y: Y: - + W: W: - - + + Show border Mostrar borda - + Auto - + Probe grid: Grade de medição: - + Zb: Zн: - + Zt: Zв: @@ -213,17 +199,17 @@ Mostrar grade - + Interpolation grid: Grade de interpolação: - + Type: Tipo: - + Bicubic Bicúbico @@ -240,52 +226,52 @@ Rolagem automática - - - - - - + + + + + + Open Abrir - - - - + + + + Reset Reiniciar - - - + + + Send Enviar - - + + Pause Pausar - - - - - + + + + + Abort Abortar - + State Estado - + Work coordinates: Coordenadas de trabalho: @@ -294,62 +280,56 @@ 0 - + Machine coordinates: Coordenadas da máquina: - + Status: Estado: - + Control Controle - - - + + + Home Origem - - - - - - - - - + + + + + + + + + ... ... - - Z-probe - Medição de Z + Medição de Z - - Zero XY - Zero XY + Zero XY - - Zero Z - Zero Z + Zero Z - - - + + + Overriding @@ -367,48 +347,44 @@ - - Restore origin - Restaure a origem + Restaure a origem - - Safe position - Posição segura + Posição segura - - + + Unlock Desbloquear - - + + Heightmap Mapa de alturas - - + + Use heightmap Usar mapa de alturas - + Map: Mapa: - + Absent Ausente - - + + Create Criar @@ -417,12 +393,12 @@ Modo edição - - - - - - + + + + + + Spindle Spindle @@ -432,12 +408,8 @@ Velocidade: - - - - - - + + Spindle on/off Spindle on/off @@ -454,51 +426,51 @@ % - - - - + + + + Jog Controle manual - - + + X- - - + + Y- - - + + X+ - - + + Y+ - + Step: Passos: - - + + Z+ - - + + Z- @@ -506,11 +478,6 @@ Presets: Presets: - - - User commands - - 2 2 @@ -524,29 +491,29 @@ 3 - - + + 10 - - + + 100 - + Feed: - + 500 500 - + 50 50 @@ -556,494 +523,508 @@ - + &View - + &Windows - + &Panels - + Modification - - + + Edit - - + + F: + + + + + Show probe grid - - + + Show interpolation grid - + Device - - + + + X + + + + + + Y + + + + + + Z + + + + + + Flood + + + + + Stop - + Continuously - + 0.01 0.01 - + 0.1 0.1 - - + 1 1 - + 5 5 - + 1000 1000 - + 2000 2000 - - + + Keyboard control Controle por teclado - + Visualizer Visualizador - + Console Console - + Send command Enviar comando - - + + Clear console Limpar cosole - + User - - &Device - - - - - &Modification - - - - - &Visualizer - - - - - &Console - - - - - User command 1 - - - - - User command 2 - - - - - User command 3 - - - - - User command 4 - - - - + Spindle speed + - + Spindle speed - - + Jog step next - + Jog step previous - + Jog feed next - + Jog feed previous - + Feed override + - + Feed override - - + Rapid override + - + Rapid override - - + Spindle override + - + Spindle override - - + Feed override - + Rapid speed override - + Spindle speed override - - &User - - - - + &Lock windows - + L&ock panels - + &File &Arquivo - + &Recent files &Arquivos recentes - + &Service &Serviço - + &Help &Ajuda - + _spacerTop - + _spacerLeft - + _spacerRight - + &Open &Abrir - + E&xit S&air - + &Settings &Opções - + &New &Novo - + &Save &Salvar - + Save &as... Salvar &como... - + &About &Sobre - + &Clear &Limpar - + Save &transformed as... Salvar &transformado como... - + Idle Inativo - + Alarm Alarme - + Run Iniciar - - + + + + + Hold Manter - + Queue Em fila - - - + + + + + Check Checar - + + + + + + + Door Porta - + Unknown Desconhecido - + + + + + Sleep + + + + Send from current line - + Feed rate: - + Rapid speed: Velocidade de aproximação: - + Spindle speed: - + &Insert line &Inserir linha - + &Delete lines &Apagar linhas - + Don't show again - + + Following commands will be sent before continue: + + + + + PS: %1 - + AS: %1 - + F/S: %1 / %2 - + Error message(s) received: - + + Change tool and press 'Pause' button to continue job + + + + Buffer: %1 / %2 / %3 - + Following commands will be sent before selected line: - + + Skip - + Command Comando - + Text - + Shortcuts - + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1054,38 +1035,38 @@ %1, %2, %3 - + G-code program file was changed. Save? O programa G-code foi alterado. Deseja salvar? - + Heightmap file was changed. Save? O arquivo mapa de alturas foi alterado. Deseja salvar? - + Not connected Sem Conexão - + Probe Medição - + Opening file... - + Updating... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Arquivos G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1094,7 +1075,7 @@ Conectado - + Job done. Time elapsed: %1 Trabalho terminado. @@ -1105,18 +1086,18 @@ Tempo transcorrido: %1 Processado - + Serial port error Erro na porta serial - - + + Scroll Rolagem - + File sending in progress. Terminate and exit? Envio de arquivo en progreso. Terminar e sair? @@ -1133,33 +1114,31 @@ Tempo transcorrido: %1 Arquivos G-Code (*.nc *.ncc *.tap *.txt) - - - + + + Heightmap files (*.map) Mapa de alturas (*.map) - + Port opened Porta aberta - - Restore origin: %1, %2, %3 - Restaure origem: + Restaure origem: %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Arquivos G-Code (*.nc *.ncc *.tap *.txt);;Todos os arquivos (*.*) - - + + Can't open file: Não foi possível abrir o arquivo: @@ -1174,26 +1153,26 @@ Tempo transcorrido: %1 Enviado - + Delete lines? Apagar linhas? - - - + + + (%1) - + Untitled Sem-título - - - + + + Save file as Salvar arquivo como @@ -1202,7 +1181,7 @@ Tempo transcorrido: %1 Arquivos G-Code (*.nc;*.ncc;*.tap) - + Changing grid settings will reset probe data. Continue? A alteração nas configurações de grade reiniciará os dados de medição. Deseja continuar? @@ -1215,53 +1194,53 @@ Tempo transcorrido: %1 Opções - + Connection Conexão - + Port: Porta: - + ... - + Baud: Baud: - - + + 9600 - + 14400 - + 19200 - + 38400 - + 57600 - + 115200 @@ -1286,13 +1265,13 @@ Tempo transcorrido: %1 Aceleração: - + Spindle speed min.: Velocidade mínima do Spindle: - - + + max.: max.: @@ -1301,19 +1280,12 @@ Tempo transcorrido: %1 Comandos de medição de Z: - - - - - - Command 1; command 2; ... - Comando 1; Comando 2; ... + Comando 1; Comando 2; ... - Heightmap probing feed: - Avanço de medição de mapa de alturas: + Avanço de medição de mapa de alturas: Report units: @@ -1328,7 +1300,7 @@ Tempo transcorrido: %1 Imperial - + Parser Analizador @@ -1337,28 +1309,28 @@ Tempo transcorrido: %1 Tamanho do segmento de aproximação de arco: - - + + Visualizer Visualizador - + Line width: Largura da linha: - + Smoothing Suavizado - + MSAA MSAA - + Simplify geometry Simplificar geometria @@ -1367,27 +1339,27 @@ Tempo transcorrido: %1 Tamanho de segmento: - + FPS lock: Bloqueio de FPS: - + 30 - + 60 - + 120 - + Z-buffer @@ -1396,52 +1368,52 @@ Tempo transcorrido: %1 Representação gráfica de ferramenta - + Type: Tipo: - + Diameter: Diâmetro: - + Flat Plana - + Conic Cônica - + Angle: Ângulo: - + Length: Largura: - + Console Console - + Show G-code program commands Mostrar comandos de programa G-Code - + Show UI commands Mostrar comandos de interfce do usuário - + Command auto-completion Autocompletar comandos @@ -1450,9 +1422,8 @@ Tempo transcorrido: %1 Painéis - Heightmap - Mapa de altura + Mapa de altura Feed @@ -1463,52 +1434,52 @@ Tempo transcorrido: %1 Controle manual - + Sender - + Ignore error responses - + Automatically set parser state before sending from selected line - + Colors Cores - + Z-movement: Movimento em Z: - + Normal: Normal: - + Toolpath Caminho da ferramenta - + by length por tamanho - + Drawn: Desenhado: - + Background: Fundo: @@ -1521,12 +1492,12 @@ Tempo transcorrido: %1 Unidades de medição da aplicação: - + Machine information Informação sobre máquina - + Status query period: Período de pergunta de posição: @@ -1535,224 +1506,213 @@ Tempo transcorrido: %1 Unidades: - + Laser power min.: - Control - Controle + Controle - Probe commands: - Ordens de tenta: + Ordens de tenta: - Safe position commands: - Ordens de posição segura: + Ordens de posição segura: - "Restore origin" moves tool in: - "Restaure a origem" move o instrumento para o: + "Restaure a origem" move o instrumento para o: - Plane - Avião + Avião - Space - Espaço + Espaço - - User commands - - - - - Button 1: - - - - - Button 2: - - - - - Button 3: - - - - - Button 4: - - - - + Arc approximation segment size: Tamanho de segmento de aproximação de arco: - + by angle (deg.) por ângulo - + Program draw mode: - + Vectors - + Raster - + By 'Z'-code - + By 'S'-code - + Grayscale segments - + Precision: Precisión: - + V-sync - + Tool model Modelo da ferramenta - + Highlight: Realçado: - + + Program start commands: + + + + + Program end commands: + + + + + Tool change commands: + + + + + Pause on tool change + + + + Start point: Origem: - + End point: Ponto final: - + Text: Texto: - + Tool: Ferramenta: - - + + Shortcuts - + Command Comando - + Text - + Font Fonte - + Size: Tamanho: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt - + (restart needed) (Requer reinicio) - + Set to defaults Opções padrão - + OK ОК - + Cancel Cancelar - + Reset settings to default values? Redefinir as configurações para os valores padrão? diff --git a/src/candle/translations/candle_ru.qm b/src/candle/translations/candle_ru.qm index b38d92840847379c0a26e06da2f3e66f1714451b..3de1916cf349f5d91d730e994ab1e8b1e10a9e5e 100644 GIT binary patch delta 3131 zcmah}3sjTm8Ge&|e?oqepmMW_5D<)VGrklD_PkJpL@`?00Q20wED7=3|l*Nb!W)O{;K;(OzXi_JU=3Sx!>>X(*DqIA-MB;;g zCgPuvM2AW#ZjdBNIKPl2xdLt>NjET}gV?IS5eSH_IY8tRORTks$n85TvBL=DK9<;D zKyH>3`(hk0n%L6-A|F2>O7Am)*mr@zTH-Wgh+?M^r%eIjCE|=GBL7z6rbFP6GsJC8 zCK`4h2p-XL;&x(N@Ol)ofM|p_aV6{Kn4RBP+p)HQOs(} zTZ4WE9H0qhSdaIj2^&`s1$xrNBOd{e)5LBB(oCZKesx62Cn!Jo7%~U$-Hl3o@4&G2 zl;2_^3VTfXXBVOWso6BS^cj&Qh^9z!P%CkuziPQ>@#3!itSv;?jS55QU5pZ@9k%3kSqaLdoP=;^yFGz?I^YckZA9x5d}j;9$xo zaqr5>5LO4A3cM_leU0^0t0Z}a&4F7B5ZhX zWP96oqcYD}i}fse>Nc0PtwUzf*{qXCNliQ1i_R;^^fNAeJ!U=Ob51X^U<`@N6NCiR za>X7^L|!S}%q=i)oQW%oY{pdlm8%}m0iNUBs%Cso*v;AOxI1EGT*IaiOhr4lH3Q!h zr*K<;2!JOPoORc4#}f@NrIqO1*pYF^>DBnjTy>BTh-9+t51gMQQQuf$-8~>8w^6O!!p#PJ#)Q941{|WXD*S zNgJLdfhXF5NxoL;xlAnZd!%=h>fz#l12G;$bEOa88H zy1a2MTs-o*y!$kI>ij}}J{SVUAIa|>YlkN~dBt`Fh)?GSG?XB40I!~Z8>K$Vt4{?J zg{A``EVO}-SG!^UegDOm7#SoMI?y%Hfl=r9(mg1>Yn}s5H~7+aZ@i!2D;5ReUTERx zWX{9X`0(!u!o%nAJ4W{qy|tL%d&GqCJkGZ}ufr6?@>fL==zq(ZEyOq`mpjiKJ*1Xz{IZwA+(@ZxikV5Qy*0} z$ge=)Mdd-oc@S?`Uh9Rq~~(SeDEvu+AT=M4(39LP1V2aGFnrm z3L0O862_IQQpPOAIMu4sE;QhdUZ=~ZtV!k1VU$4tUW(tux!Q<2!O z!EQZ^W}|^|eNpuV*cy%FLLlQC3nQ_t1*w^3I>EUl6(%fcW?{vQQguybWx2YrqC`EX zsyhEg&S|C&^1+w8C5Ur90X zcIJPGd3vxReFEYk#E61x`|>u}|1`8t_OpwV!}f`69ok@fgwBn*OPL?U#Jmo~<(8M0 z+KmRI)b1OzOJsW(8)#b|*I?fnznIxFQhB>;s*A|J)`EW*(+-O4F`2u>)9avHo}z>@_N~U^zX=THzVpH^p(?LzlZog5X&XWK zTYU|6>+77luW4v$vCv+dD7)5nDtm0ImU+FwEwBl(Vp!_S=z?i~RQuNjanGr$oKaOc zTU}aFVr$9v%?SSqm5{ClzgMaJJelV!vg(?`sv3dLHhA6iM3dZwK!D@BQX{=R4aM>W{%>!;B zGG_vDh`9^66?hs5d-GSoy@*K*d
JPs@dz6yk6{siy=B6$nZEl9uwTP>0iaoh!> zBriNSl8ej8Gitwvxwqn65shP(DmWqP03i|dk+yM>L{WEwN*6H z*uUW*`o5h+hD4g)i-RIxqRJ6% zL`AEpvKIS_B~;n55sX|NKo`ZGqRLJys7R*DlWz6$G`C_7|K*{C-Dh0_F8Absl6Oteswv|IiPWy zP@+5&-|W2y-8F|_wgv0?{k%(XgW{YS{OWDFM5WL2?T=xYL`U%JieXR?&9D3SXoyA4 zKmW|FSU=5g62%x3!*APxj3jUI+jh4=BOmfdlOfuKjr?ch>_oPU{12&UFJqicD*FN= zcFNR`R-$zAvfw^o=t$X^;|pQ0ammuUQA<;hthzoBqPr@aw@VJS9+uscZAHyGWXor} zp%IO&{W}CWcEcbRT#}tC!MdtKb}@Ga)II}CWsE##4E)|= zkefb#6WviPPt{!kZjeGCdSdpue{0$TMRZ4>^0(q(vDyxfezmf&%v8v%_tqlkMFn#o{_xt;Lq<)v7( z9omXIqi8$wAWGAtc)A&Og-MF_4?*m%lr}~031~q5jp7X>B9{E5xb!mGC&a2$KaGR( zqm7?$1(AKK zw-zD;m6z&Uln)ynC2g4qS?$>j)KGHwtP8q{^$ zU5HfIu5S4bjzT-tn`ilf;tA@_i=V@!TdLl(>oB_Fw0h5%&4}Ef-pc_CcBltbo*tvV z6af*9C{p)xIwbIjCZcg7#AngO`@}&@Z)zabESE<(P z=vjP^->1!=)QUd8rY(FEjQMM|GfraS#heFX;>9Lw7hbxAu3D}=YJmpgVzuwRHxCT2 z(Y}9tD%$gL&lqC@D9#D9FM~%HH$9Weg9cCe$>S(F6TZh}YWvWF?YN8bPy`I&a#FXOh z8xhS(M^L1&b!33tBQn?7(Cievf_wxo?*gem){g~;c*rC3>{uoiC(m++CoB&(nBvTyXjQZ1HLk-~E8NcX3{Y0T}b>yf!ng>Pa4 zAM5LWJaVZVH-7Haxb++tD#R3zj16bHp(M4F?aeLDCcEC*fKq$C4=Gsch}nD{d$4SCWH_heNXOfh;xBCaH%H{NE8VqPqnjbj-slO?ch zmX5n*(&H(ErQu4!r|HbXl7~EMrc}+b>l>ZT4x!5E=jIc9nLEoIDdWuGA#gl=SmCJ* zKCIYp!+kn4vjoIv8uFpNwb|aJuXfhgS2fh=O*iECKV2pMj;qA~-_@^N4Ua16=B~{D zB|-D=L}eD%hxrJ99H|a08M4q^PeHT$R%;g*sH94YWkoEPWe(ZND`OjlrLlg3!e)r_ zXQ9jlK66nU3(H}pV0AiGTxV==a_Xm72zOe1M%`#yIbM2KQb62%sQwM4QGc?pXcuC54uy>o%RS>NJx*6AG$!of-Y?qjyQnZcXs z29%X4YC}}QbxssH^IKY+4SJJkeuL%p$NgfNcvH)yoA^w+sipZQmga$AbF+iEDTxU7 zH^QYfWd7ULL~)hk#J?d%f^vV+blQ--6VvoUe7c{zBFCE(f`Z2iA7^{H@5t@qgi=GC zV950vWkUrr#3o?{B0XrnEM@_U?O28~TbM;yWe5uYmHB`|yQ6k)OMO+NzOl(U+tE;~ zpJTVz3?vbj|GXr^8!pBE6}wSe*iW5lw1G+ diff --git a/src/candle/translations/candle_ru.ts b/src/candle/translations/candle_ru.ts index 5f80d1fa..6b8f1f91 100644 --- a/src/candle/translations/candle_ru.ts +++ b/src/candle/translations/candle_ru.ts @@ -74,25 +74,11 @@ Сегменты: %1 - + Vertices: %1 Вершины: %1
- - SliderBox - - - Form - - - - - - Title: - - - frmAbout @@ -139,37 +125,37 @@ frmMain - + G-code program G-code программа - - + + Isometric view Изометрия - - + + Top view Вид сверху - - + + Front view Вид спереди - - + + Left view Вид слева - - + + Fit Вписать @@ -178,57 +164,57 @@ Настройки карты высот - + Border: Границы: - - - + + + X: - + H: В: - + W: Ш: - - - + + + Y: - + Auto Авто - - + + Show border Показать границы - + Probe grid: Сетка зондирования: - + Zb: Zн: - + Zt: Zв: @@ -237,17 +223,17 @@ Показать сетку - + Interpolation grid: Сетка интерполяции: - + Type: Тип: - + Bicubic Бикубический @@ -264,12 +250,12 @@ Автопрокрутка - + State Состояние - + Control Управление @@ -282,19 +268,19 @@ Восстановить XYZ - + &Recent files &Недавние файлы - + &Open &Открыть - - - + + + Send Отправить @@ -307,49 +293,49 @@ Автопрокрутка - - - - + + + + Reset Сброс - - + + Pause Пауза - + Work coordinates: Рабочие координаты: - + Machine coordinates: Машинные координаты: - + Status: Статус: - + Not connected Нет соединения - - - - - - - - - + + + + + + + + + ... @@ -358,62 +344,56 @@ Поиск стола - - Zero XY - Обнулить XY + Обнулить XY - - Zero Z - Обнулить Z + Обнулить Z Return XY(Z) Вернуться в XY(Z) - - Z-probe - Z-щуп + Z-щуп Safe Z Безопасная Z - - + + Unlock Разблокировать - - + + Heightmap Карта высот - - + + Use heightmap Использовать карту высот - + Map: Карта: - + Absent Отсутствует - - + + Create Создать @@ -422,12 +402,12 @@ Редактирование - - - - - - + + + + + + Spindle Шпиндель @@ -437,12 +417,8 @@ Скорость: - - - - - - + + Spindle on/off Вкл/выкл шпиндель @@ -455,21 +431,21 @@ Переопределить: - - - - + + + + Jog Перемещение - + Step: Шаг: - - + + X- @@ -479,60 +455,56 @@ - - - - - + + + + + Abort Прервать - - Restore origin - Восстановить СК + Восстановить СК - - Safe position - Безопасное положение + Безопасное положение - - - + + + Overriding Коррекция - - + + Y- - - + + X+ - - + + Y+ - - + + Z+ - - + + Z- @@ -541,103 +513,101 @@ Уставки: - User commands - Команды + Команды - - + + Stop Стоп - + Continuously Непрерывно - + 0.01 - + 0.1 - - + 1 - + 5 - - + + 10 - - + + 100 - + Feed: Подача: - + 500 - + 50 - + 1000 - + 2000 - - + + Keyboard control Управление с клавиатуры - + Console Консоль - + Send command Отправить команду - - + + Clear console Очистить консоль - + &File &Файл @@ -647,424 +617,476 @@ Программа - + &Service &Сервис - + &Help С&правка - + &View &Вид - + &Windows &Окна - + &Panels &Панели - + Modification Модификация - - + + Edit Редактирование - - + + F: + + + + + Show probe grid Показать сетку зондирования - - + + Show interpolation grid Показать сетку интерполяции - + Device Устройство - + + + X + + + + + + Y + + + + + + Z + + + + + + Flood + Охлаждение + + + Visualizer Визуализатор - + _spacerTop - + _spacerLeft - + _spacerRight - + User Пользователь - + E&xit Вы&ход - + &Settings &Настройки - User command 1 - Пользовательская команда 1 + Пользовательская команда 1 - User command 2 - Пользовательская команда 2 + Пользовательская команда 2 - User command 3 - Пользовательская команда 3 + Пользовательская команда 3 - User command 4 - Пользовательская команда 4 + Пользовательская команда 4 - + Spindle speed + Скорость шпинделя + - + Spindle speed - Скорость шпинделя - - + Jog step next Шаг перемещения следующий - + Jog step previous Шаг перемещения предыдущий - + Jog feed next Подача перемещения следующая - + Jog feed previous Подача перемещения предыдущая - + Feed override + Коррекция подачи + - + Feed override - Коррекция подачи - - + Rapid override + Коррекция перемещений + - + Rapid override - Коррекция перемещений - - + Spindle override + Коррекция шпинделя + - + Spindle override - Коррекция шпинделя - - + Feed override Коррекция подачи - + Rapid speed override Коррекция быстрых перемещений - + Spindle speed override Коррекция скорости шпинделя - &User - &Пользователь + &Пользователь - + &Lock windows &Зафиксировать окна - + L&ock panels З&афиксировать панели - + &New &Новый - + &Save &Сохранить - + Save &as... Сохранить &как... - + &About &О программе - + &Clear &Очистить - + Save &transformed as... Сохранить &преобразованный как... - &Device - &Устройство + &Устройство - &Modification - &Модификация + &Модификация - &Visualizer - &Визуализатор + &Визуализатор - &Console - &Консоль + &Консоль - + Idle Готов - + Alarm Тревога - + Run Работа - - - + + + Home Домой - - + + + + + Hold - Пауза + Удерживание - + Queue - Пауза + Удерживание - - - + + + + + Check Проверка - + + + + + + + Door Дверь - + Unknown Неизвестно - + + + + + Sleep + Сон + + + Send from current line Отправить с текущей строки - + Feed rate: Подача: - + Rapid speed: Холостой ход: - + Spindle speed: Шпиндель: - + &Insert line &Вставить строку - + &Delete lines &Удалить строки - + Don't show again Больше не показывать - + + Following commands will be sent before continue: + + Следующие команды будут отправлены перед продолжением программы: + + + + PS: %1 СВ: %1 - + AS: %1 СУ: %1 - + F/S: %1 / %2 П/Ш: %1 / %2 - + Error message(s) received: Ошибка(и) при передаче файла: - + + Change tool and press 'Pause' button to continue job + Произведите смену инструмента и нажмите кнопку 'Пауза' для продолжения программы + + + Buffer: %1 / %2 / %3 Буфер: %1 / %2 / %3 - + Following commands will be sent before selected line: Следующие команды будут отправлены перед выбранной строкой: - + + Skip Пропустить - + Command Команда - + Text Текст - + Shortcuts Быстрые клавиши - + (%1/%2/%3) - + (%1/%2) - + C Н - + Applying heightmap... Применяется карты высот... - + Subdividing segments... Разбиение отрезков... - + Updating Z-coordinates... Обновление Z-координат... - + Modifying G-code program... Правка G-код программы... @@ -1075,23 +1097,23 @@ %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Файлы G-Code (*.nc *.ncc *.ngc *.tap *.txt);;Все файлы (*.*) - + Opening file... Загрузка файла... - + Updating... Обновление... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Файлы G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1100,7 +1122,7 @@ Файл был изменен. Сохранить? - + Job done. Time elapsed: %1 Задание выполнено. @@ -1115,26 +1137,24 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap *.txt);;Все файлы (*.*) - + Delete lines? Удалить строки? - - + + Scroll Прокрутка - - Restore origin: %1, %2, %3 - Восстановить СК: + Восстановить СК: %1, %2, %3 - + File sending in progress. Terminate and exit? Идет процесс отправки файла. Прервать и выйти из программы? @@ -1143,15 +1163,15 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap);;Все файлы (*.*) - - - + + + Heightmap files (*.map) Файлы карт высот (*.map) - - + + Can't open file: Ошибка при открытии файла: @@ -1162,14 +1182,14 @@ Time elapsed: %1 Отправлена - - - + + + (%1) - + Untitled Без имени @@ -1178,7 +1198,7 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap *.txt) - + Changing grid settings will reset probe data. Continue? Изменение сетки зондирования приведет к очистке табличных данных. Продолжить? @@ -1187,22 +1207,22 @@ Time elapsed: %1 Подключен - + G-code program file was changed. Save? Файл G-code программы был изменен. Сохранить? - + Heightmap file was changed. Save? Файл карты высот был изменен. Сохранить? - + Probe Зонд - + Port opened Порт открыт @@ -1211,7 +1231,7 @@ Time elapsed: %1 Обработана - + Serial port error Ошибка последовательного порта @@ -1220,19 +1240,19 @@ Time elapsed: %1 Буфер/очередь: %1 / %2 - - - + + + Save file as Сохранить файл как - - - - - - + + + + + + Open Открыть @@ -1257,53 +1277,53 @@ Time elapsed: %1 Настройки - + Connection Соединение - + Port: Порт: - + ... - + Baud: Скорость: - - + + 9600 - + 14400 - + 19200 - + 38400 - + 57600 - + 115200 @@ -1316,12 +1336,12 @@ Time elapsed: %1 Единицы измерения приложения: - + Machine information Информация о станке - + Status query period: Период опроса: @@ -1330,37 +1350,31 @@ Time elapsed: %1 Единицы: - Control - Управление + Управление - Probe commands: - Команды щупа: + Команды щупа: - Safe position commands: - Команды безопасного положения: + Команды безопасного положения: - "Restore origin" moves tool in: - Перемещение по "Восстановить СК" в: + Перемещение по "Восстановить СК" в: - Plane - Плоскости + Плоскости - Space - Пространстве + Пространстве - + Parser Парсер @@ -1369,38 +1383,53 @@ Time elapsed: %1 Точность аппроксимации дуг: - - + + Visualizer Визуализатор - + Line width: Толщина линий: - + Smoothing Сглаживание - + Precision: Точность: - + Sender Отправка файла + + + + Program start commands: + Команды начала программы: + + + + Program end commands: + Команды конца программы: + + + + Tool change commands: + Команды смены инструмента: - + Ignore error responses Игнорировать ошибки при отправке файла - + Automatically set parser state before sending from selected line Автоматически настраивать парсер перед отправкой с выбранной строки @@ -1414,77 +1443,72 @@ Time elapsed: %1 дюйм - + Laser power min.: Мощность лазера мин.: - User commands - Команды + Команды - Button 1: - Кнопка 1: + Кнопка 1: - Button 2: - Кнопка 2: + Кнопка 2: - Button 3: - Кнопка 3: + Кнопка 3: - Button 4: - Кнопка 4: + Кнопка 4: - + Program draw mode: Режим отрисовки: - + Vectors Векторный - + Raster Растр - + By 'Z'-code По 'Z'-коду - + By 'S'-code По 'S'-коду - + Grayscale segments Полутоновое окрашивание - + V-sync V-sync - + Tool model Модель фрезы - + Show UI commands Отображать команды интерфейса пользователя @@ -1493,37 +1517,42 @@ Time elapsed: %1 Коррекция - + Colors Цвета - + Normal: Основной: - + Toolpath Траектория + + + + Pause on tool change + Приостанавливать передачу файла по командам смены инструмента - + Drawn: Выполненная: - + Tool: Фреза: - + Highlight: Подсветка: - + Z-movement: Z-перемещения: @@ -1532,22 +1561,22 @@ Time elapsed: %1 (Используется визуализатором и процедурой преобразования файлов в соответствии с картой высот) - + Start point: Начало: - + End point: Конец: - + Background: Фон: - + Arc approximation segment size: Размер сегментов, аппроксимирующих дуги: @@ -1556,7 +1585,7 @@ Time elapsed: %1 по длине (мм) - + by angle (deg.) по углу (градус) @@ -1569,74 +1598,74 @@ Time elapsed: %1 Длина сегмента (мм): - + Text: Текст: - - + + Shortcuts Быстрые клавиши - + Command Команда - + Text Текст - + Font Шрифт - + Size: Размер: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt пт - + (restart needed) (необходим перезапуск) - + Set to defaults По умолчанию @@ -1645,12 +1674,12 @@ Time elapsed: %1 Линии - + MSAA - + Simplify geometry Упростить геометрию @@ -1663,19 +1692,12 @@ Time elapsed: %1 Команды Z-щупа: - - - - - - Command 1; command 2; ... - Команда 1; Команда 2; ... + Команда 1; Команда 2; ... - Heightmap probing feed: - Подача при снятии карты высот: + Подача при снятии карты высот: Probing Z commands: @@ -1718,12 +1740,12 @@ Time elapsed: %1 (используется визуализатором и процедурой преобразования файлов в соответствии с картой высот) - + Command auto-completion Автозавершение команды - + Z-buffer Буфер глубины @@ -1736,13 +1758,13 @@ Time elapsed: %1 Период опроса: - + Spindle speed min.: Скорость шпинделя мин.: - - + + max.: макс.: @@ -1767,22 +1789,22 @@ Time elapsed: %1 Сглаживание линий - + FPS lock: Частота кадров: - + 30 - + 60 - + 120 @@ -1791,32 +1813,32 @@ Time elapsed: %1 Модель фрезы - + Type: Тип: - + Diameter: Диаметр: - + Flat Плоская - + Conic Коническая - + Angle: Угол: - + Length: Длина: @@ -1825,7 +1847,7 @@ Time elapsed: %1 Период опроса состояния: - + Show G-code program commands Отображать команды G-code программы @@ -1842,7 +1864,7 @@ Time elapsed: %1 Ускоренная подача: - + by length по длине @@ -1855,9 +1877,8 @@ Time elapsed: %1 Панели - Heightmap - Карта высот + Карта высот Feed @@ -1876,7 +1897,7 @@ Time elapsed: %1 Управление с клавиатуры - + Console Консоль @@ -1885,17 +1906,17 @@ Time elapsed: %1 Отображать команды G-code программы в консоли - + OK ОК - + Cancel Отмена - + Reset settings to default values? Восстановить значения по-умолчанию? diff --git a/src/candleplugins/coordinatesystem/script.js b/src/candleplugins/coordinatesystem/script.js index 24d9202f..c1c77cbb 100644 --- a/src/candleplugins/coordinatesystem/script.js +++ b/src/candleplugins/coordinatesystem/script.js @@ -12,7 +12,8 @@ var appPath = QCoreApplication.applicationDirPath(); var pluginPath = appPath + "/plugins/coordinatesystem"; var loader = new QUiLoader(); var settings = new QSettings(pluginPath + "/settings.ini", QSettings.IniFormat); -var appStatus = -1; +var deviceState = -1; +var senderState = -1; var currentCS = "G54"; var currentOffsets = ""; @@ -25,7 +26,9 @@ function init() loader.setWorkingDirectory(new QDir(pluginPath)); loader.addPluginPath(appPath); - app.statusChanged.connect(onAppStatusChanged); + // TODO: Enable only on senderState == SenderStopped; + app.deviceStateChanged.connect(onAppDeviceStateChanged); + app.senderStateChanged.connect(onAppSenderStateChanged); app.responseReceived.connect(onAppResponseReceived); } @@ -58,11 +61,18 @@ function createPanelWidget() return uiPanel; } -function onAppStatusChanged(status) +function onAppDeviceStateChanged(status) { - uiPanel.setEnabled(status == 1); + uiPanel.setEnabled((status == 1) && (senderState == 4)); - appStatus = status; + deviceState = status; +} + +function onAppSenderStateChanged(status) +{ + uiPanel.setEnabled((status == 4) && (deviceState == 1)); + + senderState = status; } function onAppResponseReceived(command, index, response) diff --git a/src/candleplugins/usercommands/script.js b/src/candleplugins/usercommands/script.js index 9cfed259..cd5f6b71 100644 --- a/src/candleplugins/usercommands/script.js +++ b/src/candleplugins/usercommands/script.js @@ -13,7 +13,7 @@ var pluginPath = appPath + "/plugins/usercommands"; var loader = new QUiLoader(); var settings = new QSettings(pluginPath + "/settings.ini", QSettings.IniFormat); var buttonSize = 48; -var appStatus = -1; +var deviceState = -1; var storedButtons = new Array(); var storedActions = new Array(); @@ -31,7 +31,7 @@ function init() app.settingsAboutToShow.connect(onAppSettingsAboutToShow); app.settingsAccepted.connect(onAppSettingsAccepted); app.settingsRejected.connect(onAppSettingsRejected); - app.statusChanged.connect(onAppStatusChanged); + app.deviceStateChanged.connect(onAppDeviceStateChanged); } function createPanelWidget() @@ -165,7 +165,7 @@ function onAppSettingsRejected() restoreButtonsTable(storedButtons); } -function onAppStatusChanged(status) +function onAppDeviceStateChanged(status) { var t = uiSettings.tblButtons; var lay = uiPanel.verticalLayout.layButtons; @@ -178,7 +178,7 @@ function onAppStatusChanged(status) storedActions[i].setEnabled(status != -1); } - appStatus = status; + deviceState = status; } function onButtonClicked(button) @@ -256,7 +256,7 @@ function updateButtons() w.toolTip = t.item(i, 0).data(Qt.DisplayRole); w.clicked.connect(onClicked(i)); - w.enabled = (appStatus != -1); + w.enabled = (deviceState != -1); lay.addWidget(w, i / 4, i % 4); } @@ -302,7 +302,7 @@ function updateActions() } for (var i = 0; i < storedActions.length; i++) { - storedActions[i].setEnabled(appStatus != -1); + storedActions[i].setEnabled(deviceState != -1); } } From 7318d1b5a46e5b33167548ef2070fd4cf1c16fd6 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 16 Jan 2021 10:22:43 +0500 Subject: [PATCH 52/80] 'importExtension' function added to main script engine --- src/candle/frmmain.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index 99ed8bef..9ab1a00e 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -312,6 +312,11 @@ frmMain::frmMain(QWidget *parent) : QScriptValue vars = m_scriptEngine.newQObject(&m_storedVars); m_scriptEngine.globalObject().setProperty("vars", vars); + // Delegate import extension function + QScriptValue sv = m_scriptEngine.newObject(); + sv.setProperty("importExtension", m_scriptEngine.newFunction(frmMain::importExtension)); + m_scriptEngine.globalObject().setProperty("script", sv); + // Signals/slots connect(&m_serialPort, SIGNAL(readyRead()), this, SLOT(onSerialPortReadyRead()), Qt::QueuedConnection); connect(&m_serialPort, SIGNAL(error(QSerialPort::SerialPortError)), this, SLOT(onSerialPortError(QSerialPort::SerialPortError))); From c2ca571a10fc853e06db11ccf04f3e296d1dddc6 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 16 Jan 2021 10:47:10 +0500 Subject: [PATCH 53/80] Program table shortcuts fix --- src/candle/frmmain.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index 9ab1a00e..8a8335fb 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -216,15 +216,9 @@ frmMain::frmMain(QWidget *parent) : m_currentDrawer = m_codeDrawer; m_toolDrawer.setToolPosition(QVector3D(0, 0, 0)); - QShortcut *insertShortcut = new QShortcut(QKeySequence(Qt::Key_Insert), ui->tblProgram); - QShortcut *deleteShortcut = new QShortcut(QKeySequence(Qt::Key_Delete), ui->tblProgram); - - connect(insertShortcut, SIGNAL(activated()), this, SLOT(onTableInsertLine())); - connect(deleteShortcut, SIGNAL(activated()), this, SLOT(onTableDeleteLines())); - m_tableMenu = new QMenu(this); - m_tableMenu->addAction(tr("&Insert line"), this, SLOT(onTableInsertLine()), insertShortcut->key()); - m_tableMenu->addAction(tr("&Delete lines"), this, SLOT(onTableDeleteLines()), deleteShortcut->key()); + m_tableMenu->addAction(tr("&Insert line"), this, SLOT(onTableInsertLine()), QKeySequence(Qt::Key_Insert)); + m_tableMenu->addAction(tr("&Delete lines"), this, SLOT(onTableDeleteLines()), QKeySequence(Qt::Key_Delete)); ui->glwVisualizer->addDrawable(m_originDrawer); ui->glwVisualizer->addDrawable(m_codeDrawer); From b5e6f252433e01fc27230200d31d41101de1037e Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 16 Jan 2021 14:25:25 +0500 Subject: [PATCH 54/80] Language setting added --- src/candle/frmmain.cpp | 5 +- src/candle/frmsettings.cpp | 26 ++++ src/candle/frmsettings.h | 3 + src/candle/frmsettings.ui | 209 +++++++++++++++------------ src/candle/main.cpp | 9 +- src/candle/translations/candle_en.ts | 173 +++++++++++----------- src/candle/translations/candle_es.qm | Bin 13639 -> 13524 bytes src/candle/translations/candle_es.ts | 169 ++++++++++++---------- src/candle/translations/candle_fr.qm | Bin 12981 -> 12862 bytes src/candle/translations/candle_fr.ts | 169 ++++++++++++---------- src/candle/translations/candle_pt.qm | Bin 13091 -> 12976 bytes src/candle/translations/candle_pt.ts | 169 ++++++++++++---------- src/candle/translations/candle_ru.qm | Bin 21003 -> 21155 bytes src/candle/translations/candle_ru.ts | 185 +++++++++++++----------- 14 files changed, 611 insertions(+), 506 deletions(-) diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index 8a8335fb..de3d8b28 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -2601,6 +2601,7 @@ void frmMain::loadSettings() m_settings->setEndCommands(set.value("endCommands").toString()); m_settings->setToolChangeCommands(set.value("toolChangeCommands").toString()); m_settings->setPauseToolChange(set.value("pauseToolChange").toBool()); + m_settings->setLanguage(set.value("language", "en").toString()); ui->chkAutoScroll->setChecked(set.value("autoScroll", false).toBool()); @@ -2830,6 +2831,7 @@ void frmMain::saveSettings() set.setValue("endCommands", m_settings->endCommands()); set.setValue("toolChangeCommands", m_settings->toolChangeCommands()); set.setValue("pauseToolChange", m_settings->pauseToolChange()); + set.setValue("language", m_settings->language()); set.setValue("feedOverride", ui->slbFeedOverride->isChecked()); set.setValue("feedOverrideValue", ui->slbFeedOverride->value()); @@ -3032,8 +3034,7 @@ void frmMain::loadPlugins() qDebug() << "Loading plugin:" << p << title << name; // Translation - // TODO: Use locale from settings - QString loc = QLocale().name().left(2); + QString loc = m_settings->language(); QString translationFileName = pluginsDir + p + "/translation_" + loc + ".qm"; if(QFile::exists(translationFileName)) { QTranslator *translator = new QTranslator(); diff --git a/src/candle/frmsettings.cpp b/src/candle/frmsettings.cpp index a11afbab..487dd34c 100644 --- a/src/candle/frmsettings.cpp +++ b/src/candle/frmsettings.cpp @@ -13,6 +13,8 @@ #include #include #include +#include +#include class CustomKeySequenceEdit : public QKeySequenceEdit { @@ -87,6 +89,18 @@ frmSettings::frmSettings(QWidget *parent) : ui->tblShortcuts->setEditTriggers(QAbstractItemView::AllEditTriggers); searchPorts(); + + // Languages + QDir d(qApp->applicationDirPath() + "/translations"); + QStringList fl = QStringList() << "candle_*.qm"; + QStringList tl = d.entryList(fl, QDir::Files); + QRegExp fx("_([^\\.]+)"); + foreach (const QString &t, tl) { + if (fx.indexIn(t) != -1) { + QLocale l(fx.cap(1)); + ui->cboLanguage->addItem(l.nativeLanguageName(), l.name().left(2)); + } + } } frmSettings::~frmSettings() @@ -580,6 +594,17 @@ void frmSettings::setPauseToolChange(bool pause) ui->chkPauseToolChange->setChecked(pause); } +QString frmSettings::language() +{ + return ui->cboLanguage->currentData().toString(); +} + +void frmSettings::setLanguage(QString language) +{ + int i = ui->cboLanguage->findData(language); + if (i != -1) ui->cboLanguage->setCurrentIndex(i); +} + void frmSettings::showEvent(QShowEvent *se) { Q_UNUSED(se) @@ -707,6 +732,7 @@ void frmSettings::on_cmdDefaults_clicked() ui->txtEndCommands->clear(); ui->txtToolChangeCommands->clear(); ui->chkPauseToolChange->setChecked(true); + setLanguage("en"); emit settingsSetByDefault(); } diff --git a/src/candle/frmsettings.h b/src/candle/frmsettings.h index f6a4e534..7c4f11cd 100644 --- a/src/candle/frmsettings.h +++ b/src/candle/frmsettings.h @@ -57,6 +57,7 @@ class frmSettings : public QDialog Q_PROPERTY(QString endCommands READ endCommands WRITE setEndCommands) Q_PROPERTY(QString toolChangeCommands READ toolChangeCommands WRITE setToolChangeCommands) Q_PROPERTY(bool pauseToolChange READ pauseToolChange WRITE setPauseToolChange) + Q_PROPERTY(QString language READ language WRITE setLanguage) public: explicit frmSettings(QWidget *parent = 0); @@ -148,6 +149,8 @@ class frmSettings : public QDialog void setToolChangeCommands(QString commands); bool pauseToolChange(); void setPauseToolChange(bool pause); + QString language(); + void setLanguage(QString language); signals: void settingsSetByDefault(); diff --git a/src/candle/frmsettings.ui b/src/candle/frmsettings.ui index 0f67d5e2..02dd5399 100644 --- a/src/candle/frmsettings.ui +++ b/src/candle/frmsettings.ui @@ -84,9 +84,9 @@ QSplitter::handle:horizontal { 0 - -28 + -1745 620 - 2236 + 2272 @@ -1090,105 +1090,125 @@ QSplitter::handle:horizontal { - Font + User interface - + - - - Size: - - - - - - - - 0 - 0 - - - - true - - - 8 - - - 10 - - - 1 - - - - 8 - + + + + + Qt::Horizontal + + + + 40 + 20 + + + - - - 9 - + + + + pt + + - - - 10 - + + + + + 0 + 0 + + + + true + + + 8 + + + 10 + + + 1 + + + + 8 + + + + + 9 + + + + + 10 + + + + + 11 + + + + + 12 + + + - - - 11 - + + + + Font size: + + - - - 12 - + + + + Language: + + - - - - - - pt - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - color: blue; - - - (restart needed) - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - + + + + + 0 + 0 + + + + false + + + + + + 10 + + + + + + + color: blue; + + + (restart needed) + + + Qt::AlignCenter + + + + @@ -1267,7 +1287,6 @@ QSplitter::handle:horizontal { chkShowProgramCommands chkShowUICommands chkAutocompletion - cboFontSize cmdDefaults cmdOK cmdCancel diff --git a/src/candle/main.cpp b/src/candle/main.cpp index a78c9044..5b116cad 100644 --- a/src/candle/main.cpp +++ b/src/candle/main.cpp @@ -40,12 +40,11 @@ int main(int argc, char *argv[]) glf.setSamples(8); QGLFormat::setDefaultFormat(glf); - // TODO: Use locale from settings - QString loc = QLocale().name().left(2); - QString translationsFolder = qApp->applicationDirPath() + "/translations/"; - QString translationFileName = translationsFolder + qApp->applicationDisplayName() + "_" + loc + ".qm"; + QSettings set(a.applicationDirPath() + "/settings.ini", QSettings::IniFormat); + QString loc = set.value("language", "en").toString(); - qDebug() << "locale:" << loc; + QString translationsFolder = qApp->applicationDirPath() + "/translations/"; + QString translationFileName = translationsFolder + "candle_" + loc + ".qm"; if(QFile::exists(translationFileName)) { QTranslator* translator = new QTranslator(); diff --git a/src/candle/translations/candle_en.ts b/src/candle/translations/candle_en.ts index a09b2512..46adf87e 100644 --- a/src/candle/translations/candle_en.ts +++ b/src/candle/translations/candle_en.ts @@ -121,9 +121,9 @@ - - - + + + Open @@ -138,7 +138,7 @@ - + Send @@ -151,9 +151,9 @@ - - - + + + Abort @@ -199,14 +199,14 @@ - + Overriding - + Heightmap @@ -474,10 +474,10 @@ - - - + + + Spindle @@ -485,8 +485,8 @@ - - + + Jog @@ -799,42 +799,42 @@ - + Send from current line - + Feed rate: - + Rapid speed: - + Spindle speed: - + &Insert line - + &Delete lines - + Don't show again - + Speed: @@ -844,53 +844,53 @@ - + G-code program file was changed. Save? - + Heightmap file was changed. Save? - + Not connected - + G-code program - + Probe - + Port opened - + Job done. Time elapsed: %1 - + PS: %1 - + AS: %1 - + F/S: %1 / %2 @@ -911,30 +911,30 @@ Time elapsed: %1 - + File sending in progress. Terminate and exit? - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) - - - + + + Heightmap files (*.map) - + Opening file... - - + + Can't open file: @@ -946,14 +946,14 @@ Time elapsed: %1 - + Skip - - + + (%1) @@ -964,86 +964,86 @@ Time elapsed: %1 - + Command - + Text - + Shortcuts - + Updating... - + Untitled - - - + + + Save file as - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) - + Following commands will be sent before continue: - + (%1/%2/%3) - + (%1/%2) - + C - + Changing grid settings will reset probe data. Continue? - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1405,68 +1405,73 @@ Time elapsed: %1 - - Font - - - - - Size: - - - - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt - + + User interface + + + + + Font size: + + + + + Language: + + + + (restart needed) - + Set to defaults - + OK - + Cancel - + Reset settings to default values? diff --git a/src/candle/translations/candle_es.qm b/src/candle/translations/candle_es.qm index 73782d5cc2cf4a9ae7a0115a66a413be29c7b548..d61de4a34fb41b34ab4b57d702f0eea26f7ffc41 100644 GIT binary patch delta 344 zcmX?}btQ9x2&2bD(QwA|6LakuZ6~fRnyk)vlu>{3TSlqL{7kZvGZ~^&e=#uVN-@N+ zbulo=E`ZRw>nFQ1`EjYeV!GcW#lWEba`Idzc}BO%dzs{z^mb0Z%M@;?%xcvCpMgPR z0jmk4I|GAgCTp_Tas~#0Al8hThZq>tzp@q!?P6e1GiRN$!5L`7y~(M}?vmkbS=-ow z20F97uL)vckbcgtqb|X~p!a9;QD%8Y*~w3t&6qTwO_pVmXH1%G%i<=b^@6+d;Vqz! zI_{1KNem2fM7O%~Nc?=9vYP{)l z%NZEN&hgggZDwH5%HZ9?bD4obGkmfrtC_maDZYF6vKSbY*Yj%|tO7cA4S(=aU@(Xa h^56e!z`!7EnaRMQpS`(=b%WaGAf4$fn`I2OSpXU;VTJ$z delta 445 zcmcbTc|2=^2xG)V(QwB96Laku7ff7R#C9!&fkAD}WLd`Jit!BLQ(GArB+3{f_G|^x zUl<}z9${dRtY?T4=we{dE}s0CQC{*7Lv-pd1_s?)h8Q-WsO$m=ttT|ul*x}vU5e>` zj}!xgj?d&?CV9q{lh-oIG3m=pKFbtt*v4wq|DS87EEFWpR_zmf)^@cnhfGA$P}vBnAe#qYzpzeR400z2!Zg z|BOHf>RsejDhL3Y*UPIftjEBhK8x4p!8`^ADK*~ox#bKDV&{14^ENXuXwBf=!gHB{ zL9=}_E328ht}frbdsz$&%Io>H4ORgidxt;xC@>hr1^Ms)HDF*6w#)>&?cC-h)(vXX zJPd9Or3|SIc?=~CsT>SIzy`!DZuxm7lRxT;ZWhv+&LYdl5Wc8CA~ diff --git a/src/candle/translations/candle_es.ts b/src/candle/translations/candle_es.ts index 71e12886..042939e1 100644 --- a/src/candle/translations/candle_es.ts +++ b/src/candle/translations/candle_es.ts @@ -101,7 +101,7 @@ GRBL Control - + G-code program Programa de G-Code @@ -229,9 +229,9 @@ - - - + + + Open Abrir @@ -246,7 +246,7 @@ - + Send Enviar @@ -259,9 +259,9 @@ - - - + + + Abort Abandono @@ -328,8 +328,8 @@ - + Overriding @@ -362,7 +362,7 @@ - + Heightmap Mapa de alturas @@ -394,16 +394,16 @@ - - - + + + Spindle Husillo - + Speed: Velocidad: @@ -428,8 +428,8 @@ - - + + Jog Control manual @@ -895,58 +895,58 @@ - + Send from current line - + Feed rate: - + Rapid speed: Velocidad de aproximación: - + Spindle speed: - + &Insert line &Insertar linea - + &Delete lines &Borrar lineas - + Don't show again - + Following commands will be sent before continue: - + PS: %1 - + AS: %1 - + F/S: %1 / %2 @@ -973,58 +973,58 @@ - + Skip - + Command Comando - + Text - + Shortcuts - + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1035,38 +1035,38 @@ %1, %2, %3 - + G-code program file was changed. Save? El programa de G-code ha cambiado. Desea guardar? - + Heightmap file was changed. Save? El programa mapa de alturas ha cambiado. Desea guardar? - + Not connected Sin Conexión - + Probe Medición - + Opening file... - + Updating... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Archivos de G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1075,7 +1075,7 @@ Conectado - + Job done. Time elapsed: %1 Trabajo terminado. @@ -1097,7 +1097,7 @@ Tiempo transcurrido: %1 Desplazamiento - + File sending in progress. Terminate and exit? Envio de archivo en progreso. Detener y salir? @@ -1114,14 +1114,14 @@ Tiempo transcurrido: %1 Archivos de G-Code (*.nc *.ncc *.tap *.txt) - - - + + + Heightmap files (*.map) Mapa de alturas (*.map) - + Port opened Puerto se abrió @@ -1132,13 +1132,13 @@ Tiempo transcurrido: %1 %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Archivos de G-Code (*.nc *.ncc *.ngc *.tap *.txt);;Todos los archivos (*.*) - - + + Can't open file: No se puede abrir el archivo: @@ -1158,21 +1158,21 @@ Tiempo transcurrido: %1 Borrar lineas? - - + + (%1) - + Untitled Sin-título - - - + + + Save file as Guardar archivo como @@ -1181,7 +1181,7 @@ Tiempo transcurrido: %1 Archivos de G-Code (*.nc;*.ncc;*.tap) - + Changing grid settings will reset probe data. Continue? El cambio de configuraciones de grilla reiniciará los datos de medición. Desea continuar? @@ -1655,68 +1655,81 @@ Tiempo transcurrido: %1 - Font - Fuente + Fuente - Size: - Tamaño: + Tamaño: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt Puntos - + + User interface + + + + + Font size: + + + + + Language: + + + + (restart needed) (Se requiere reinicio) - + Set to defaults Opciones por defecto - + OK ОК - + Cancel Cancelar - + Reset settings to default values? Restablecer la configuración a sus valores predeterminados? diff --git a/src/candle/translations/candle_fr.qm b/src/candle/translations/candle_fr.qm index c7df0f3bcdce5680a058435a63d73665abfe2418..4912291fd3f3b4b47cc4d78ab67a99bc054babcd 100644 GIT binary patch delta 330 zcmdm*x-Vsd2qVWt(QrndiMe)6I?pGrO`0sucw+K%Mp?mHhUnB^3=CSo7-HDE7#OsR zCyO%qb4oMa?~!6)(7ZS~mr0IE``6@NCV9rx$!nSX4S89O`u{U9sI6c%VRUC;5ZTI_ zEVi71f&U9@#>_)NaU<4Zp!1T)Gl6qVLb*0)#bc459Tp2NV@W-&n;(Q5aZ*m&)dwv zpb@~kh37H@gSzSDt1M>fTI=}k-OFNNP?F`>HdqC8>|Orgqd?z_`SRcYYrw!Dv^|r7 XL05FM5$i*h&F)$$ESvA?U1tUWq~2XC delta 412 zcmdm&vNd&r2&2SA(QrnGiMe)6x_%SaCb3-$VPH_XJDHd96q`U71A}JqXV9@2AT+1xa*fDu7vl){H!{n<#&b-NAneC)BMYt;;-U8~l z%iZxHiGe|OHH6kto$SkEZ+V30KO@kAI-R^q1py2UQoDHdh4mO1RB!XzJebG8AnD4R zKDV5KL5z>LK5sJvgGLMQ7M{xt4Cq8ZJ0R~rwWQHP!OokGMQXrkm!2kqoK+NKnpI0(@p^o@w kR;?r!=@5oQprRZgOl7cwD`E}KtV*4HP*ZGks@_dz0Mub@8~^|S diff --git a/src/candle/translations/candle_fr.ts b/src/candle/translations/candle_fr.ts index 60ef151f..06174dd5 100644 --- a/src/candle/translations/candle_fr.ts +++ b/src/candle/translations/candle_fr.ts @@ -101,7 +101,7 @@ grblControl - + G-code program Programme G-Code @@ -229,9 +229,9 @@ - - - + + + Open Ouvrir @@ -246,7 +246,7 @@ - + Send Envoyer @@ -259,9 +259,9 @@ - - - + + + Abort Abandon @@ -328,8 +328,8 @@ - + Overriding @@ -362,7 +362,7 @@ - + Heightmap Palpage surfacique @@ -394,16 +394,16 @@ - - - + + + Spindle Broche - + Speed: Vitesse: @@ -428,8 +428,8 @@ - - + + Jog Contrôle manuel @@ -895,58 +895,58 @@ - + Send from current line - + Feed rate: - + Rapid speed: Vitesse d'approche: - + Spindle speed: - + &Insert line &Inserer ligne - + &Delete lines &Effacer ligne - + Don't show again - + Following commands will be sent before continue: - + PS: %1 - + AS: %1 - + F/S: %1 / %2 @@ -973,43 +973,43 @@ - + Skip - + Command Comande - + Text - + Shortcuts - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1020,22 +1020,22 @@ %1, %2, %3 - + G-code program file was changed. Save? Le programme G-code à changé. Sauvegarder? - + Heightmap file was changed. Save? Le fichier surface de palpage a changé. Sauvegarder? - + Not connected Non connecté - + Probe Palper @@ -1044,7 +1044,7 @@ Connecté - + Job done. Time elapsed: %1 Travail terminé. @@ -1066,7 +1066,7 @@ Temps écoulé: %1 Déplacement - + File sending in progress. Terminate and exit? Envoi de fichier en cours. Terminer et Sortir? @@ -1075,9 +1075,9 @@ Temps écoulé: %1 Envoyé - - - + + + Heightmap files (*.map) Fichier de palpage (*.map) @@ -1088,23 +1088,23 @@ Temps écoulé: %1 %1, %2, %3 - + Port opened Le port s'est ouvert - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) G-Code fichiers (*.nc *.ncc *.ngc *.tap *.txt);;Tous les fichiers (*.*) - + Opening file... - - + + Can't open file: Impossible d'ouvrir du fichier: @@ -1124,52 +1124,52 @@ Temps écoulé: %1 Effacer ligne? - - + + (%1) - + Updating... - + Untitled Sans titre - - - + + + Save file as Enregistrer le fichier sous - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) G-Code fichiers (*.nc *.ncc *.ngc *.tap *.txt) - + (%1/%2/%3) - + (%1/%2) - + C - + Changing grid settings will reset probe data. Continue? Changer les paramètres de la grille, réinitialise les données de palpage. Continuer? @@ -1639,68 +1639,81 @@ Temps écoulé: %1 - Font - Ecriture + Ecriture - Size: - Taille: + Taille: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt Points - + + User interface + + + + + Font size: + + + + + Language: + + + + (restart needed) (Redémarrage nécessaire) - + Set to defaults Paramètres par default - + OK ОК - + Cancel Annuler - + Reset settings to default values? Réinitialiser les réglages par défaut? diff --git a/src/candle/translations/candle_pt.qm b/src/candle/translations/candle_pt.qm index 7d19af7f88d885106ce609a220a3247efc6d45c4..0fac707a8770327e0cef1847c202310c245855d1 100644 GIT binary patch delta 374 zcmZ3Swjp(b2&2SAQGZ71iK*s{p%dq3P3C7j8d%K`KDCvBL3|NI#Gb7T3=&cd5hsrT z>7@)&E0!`aFh)RV=@N#hHC7A^(w7*b&Q~!oXzgZ*PW{Eepl!zx!`8*XAma$3wNFph zWpd{!nc8ukBYU{HHCS(aH`(2=!RXcq&6 zN+au(4bDL0eob~|c9*PV%i6}yz@VAV_P!>FfkEmwyN^~o%QCrhCNbUb zkz!!bDw>?jB+qzsaxaq{ldjq1wM^lhYgmo?|1&VCOHAfv78lHCEf(4Zw7-#c$_8f! z2A$Z+rp)e=ci6JFu>&1(itT+(5CenMZ+0DZ2?hq;%E?oiN8%O2lE&hB)xdk=aw@th_Ue2=WS+S(AdMfh37KRiF+qsWieCN_UF5IFN=XeNrzwC zU=>iC8h`LnpqIs5`S1TVU|$=Pxm diff --git a/src/candle/translations/candle_pt.ts b/src/candle/translations/candle_pt.ts index 1d27fdf8..76044ef7 100644 --- a/src/candle/translations/candle_pt.ts +++ b/src/candle/translations/candle_pt.ts @@ -101,7 +101,7 @@ Controle GRBL - + G-code program Programa de G-Code @@ -229,9 +229,9 @@ - - - + + + Open Abrir @@ -246,7 +246,7 @@ - + Send Enviar @@ -259,9 +259,9 @@ - - - + + + Abort Abortar @@ -328,8 +328,8 @@ - + Overriding @@ -362,7 +362,7 @@ - + Heightmap Mapa de alturas @@ -394,16 +394,16 @@ - - - + + + Spindle Spindle - + Speed: Velocidade: @@ -428,8 +428,8 @@ - - + + Jog Controle manual @@ -895,58 +895,58 @@ - + Send from current line - + Feed rate: - + Rapid speed: Velocidade de aproximação: - + Spindle speed: - + &Insert line &Inserir linha - + &Delete lines &Apagar linhas - + Don't show again - + Following commands will be sent before continue: - + PS: %1 - + AS: %1 - + F/S: %1 / %2 @@ -973,58 +973,58 @@ - + Skip - + Command Comando - + Text - + Shortcuts - + (%1/%2/%3) - + (%1/%2) - + C - + Applying heightmap... - + Subdividing segments... - + Updating Z-coordinates... - + Modifying G-code program... @@ -1035,38 +1035,38 @@ %1, %2, %3 - + G-code program file was changed. Save? O programa G-code foi alterado. Deseja salvar? - + Heightmap file was changed. Save? O arquivo mapa de alturas foi alterado. Deseja salvar? - + Not connected Sem Conexão - + Probe Medição - + Opening file... - + Updating... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Arquivos G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1075,7 +1075,7 @@ Conectado - + Job done. Time elapsed: %1 Trabalho terminado. @@ -1097,7 +1097,7 @@ Tempo transcorrido: %1 Rolagem - + File sending in progress. Terminate and exit? Envio de arquivo en progreso. Terminar e sair? @@ -1114,14 +1114,14 @@ Tempo transcorrido: %1 Arquivos G-Code (*.nc *.ncc *.tap *.txt) - - - + + + Heightmap files (*.map) Mapa de alturas (*.map) - + Port opened Porta aberta @@ -1132,13 +1132,13 @@ Tempo transcorrido: %1 %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Arquivos G-Code (*.nc *.ncc *.tap *.txt);;Todos os arquivos (*.*) - - + + Can't open file: Não foi possível abrir o arquivo: @@ -1158,21 +1158,21 @@ Tempo transcorrido: %1 Apagar linhas? - - + + (%1) - + Untitled Sem-título - - - + + + Save file as Salvar arquivo como @@ -1181,7 +1181,7 @@ Tempo transcorrido: %1 Arquivos G-Code (*.nc;*.ncc;*.tap) - + Changing grid settings will reset probe data. Continue? A alteração nas configurações de grade reiniciará os dados de medição. Deseja continuar? @@ -1651,68 +1651,81 @@ Tempo transcorrido: %1 - Font - Fonte + Fonte - Size: - Tamanho: + Tamanho: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt - + + User interface + + + + + Font size: + + + + + Language: + + + + (restart needed) (Requer reinicio) - + Set to defaults Opções padrão - + OK ОК - + Cancel Cancelar - + Reset settings to default values? Redefinir as configurações para os valores padrão? diff --git a/src/candle/translations/candle_ru.qm b/src/candle/translations/candle_ru.qm index 3de1916cf349f5d91d730e994ab1e8b1e10a9e5e..c6efc72582932d31d13542bc7e8779da8d9ec466 100644 GIT binary patch delta 738 zcmZvYUr5tY9L3Mw?(a9<_S4MVLbR=+O{3g2bvozVoH{iXvp*Vzp|Wf~tZ<5DqV^DI z8YLGKEQ2T!M$*GF$TZ26=)ru5hBo$u~O>Pel{tA>^pSh>3a_S7E-Ql0J-UG zi0YDW3SLV9$gv6j?c+e!w9plp=C`82g3mdn69#YW0}>t!w~9Bovc|fkr6g57|D4yCsdLbEM7E{04o&- zlIK)sN+JPOh3dl6X2LpE*J3S@vTaKXud3d*@D`NSs`Uxpj$@fcDeMh}N7UnA{eU`I z{e*CJ6{uG%9w0MG{l%~g2z#gAAknv4kQ|#ihU%%ATBwbtQ3v$2kUD4v&7-;03~LDZ68TmZob@&7{oYm&dv-_@ zoXXRa1A1!W+(ByPR0hrF1b5(M8qK86f9TMX8ee^LP5l^H>Z1vl982=Vjx&8#6kl}%B3J^ z8YLGMM*5{h5Jc#SAnk=Tp}tfQCK;qbqY*{)L5X0j8$uV({d3Me9De_E?@p89d*pT& zDId*_kgU?Sdh7B)xx#LTwH%&sAv8W{uf=Fu4L0o+D5Cm5xS z8$j(cTM?|bdNj5D0sMt%mUz{!*-`%lI^zRCjt5=CMj#ks*_z(8$}hsk2v6(A*`&rm zBJ7FAN~&2*QzZmmvV3YHE>=f9`sCAf-t<;1xs?Pwt89{*98NJ@HVagJ6uWjW02NE( z;Or8Aofet83{+~x==cGk;E{Oe2(Q;Pvmf+~tx3A@P|InzrK=t%U?`A=T2*c}EJe4x zKw-s>dQI$_SWFCTPPFoSRcs_@*+I!lg6yO;;b_;LKbi^Xj_a;`{zq1-8{BLKN-}oT zpU|y!bGKY}C84d?$}u_4^U R96p2Ef9$oO-VgmEe*xyzuiXFu diff --git a/src/candle/translations/candle_ru.ts b/src/candle/translations/candle_ru.ts index 6b8f1f91..295d98ee 100644 --- a/src/candle/translations/candle_ru.ts +++ b/src/candle/translations/candle_ru.ts @@ -125,7 +125,7 @@ frmMain - + G-code program G-code программа @@ -280,7 +280,7 @@ - + Send Отправить @@ -322,7 +322,7 @@ Статус: - + Not connected Нет соединения @@ -371,7 +371,7 @@ - + Heightmap Карта высот @@ -403,16 +403,16 @@ - - - + + + Spindle Шпиндель - + Speed: Скорость: @@ -433,8 +433,8 @@ - - + + Jog Перемещение @@ -457,9 +457,9 @@ - - - + + + Abort Прервать @@ -473,8 +473,8 @@ - + Overriding Коррекция @@ -954,59 +954,59 @@ Сон - + Send from current line Отправить с текущей строки - + Feed rate: Подача: - + Rapid speed: Холостой ход: - + Spindle speed: Шпиндель: - + &Insert line &Вставить строку - + &Delete lines &Удалить строки - + Don't show again Больше не показывать - + Following commands will be sent before continue: Следующие команды будут отправлены перед продолжением программы: - + PS: %1 СВ: %1 - + AS: %1 СУ: %1 - + F/S: %1 / %2 П/Ш: %1 / %2 @@ -1035,58 +1035,58 @@ - + Skip Пропустить - + Command Команда - + Text Текст - + Shortcuts Быстрые клавиши - + (%1/%2/%3) - + (%1/%2) - + C Н - + Applying heightmap... Применяется карты высот... - + Subdividing segments... Разбиение отрезков... - + Updating Z-coordinates... Обновление Z-координат... - + Modifying G-code program... Правка G-код программы... @@ -1097,23 +1097,23 @@ %1, %2, %3 - + G-Code files (*.nc *.ncc *.ngc *.tap *.txt);;All files (*.*) Файлы G-Code (*.nc *.ncc *.ngc *.tap *.txt);;Все файлы (*.*) - + Opening file... Загрузка файла... - + Updating... Обновление... - - + + G-Code files (*.nc *.ncc *.ngc *.tap *.txt) Файлы G-Code (*.nc *.ncc *.ngc *.tap *.txt) @@ -1122,7 +1122,7 @@ Файл был изменен. Сохранить? - + Job done. Time elapsed: %1 Задание выполнено. @@ -1154,7 +1154,7 @@ Time elapsed: %1 %1, %2, %3 - + File sending in progress. Terminate and exit? Идет процесс отправки файла. Прервать и выйти из программы? @@ -1163,15 +1163,15 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap);;Все файлы (*.*) - - - + + + Heightmap files (*.map) Файлы карт высот (*.map) - - + + Can't open file: Ошибка при открытии файла: @@ -1182,14 +1182,14 @@ Time elapsed: %1 Отправлена - - + + (%1) - + Untitled Без имени @@ -1198,7 +1198,7 @@ Time elapsed: %1 Файлы G-Code (*.nc *.ncc *.tap *.txt) - + Changing grid settings will reset probe data. Continue? Изменение сетки зондирования приведет к очистке табличных данных. Продолжить? @@ -1207,22 +1207,22 @@ Time elapsed: %1 Подключен - + G-code program file was changed. Save? Файл G-code программы был изменен. Сохранить? - + Heightmap file was changed. Save? Файл карты высот был изменен. Сохранить? - + Probe Зонд - + Port opened Порт открыт @@ -1240,9 +1240,9 @@ Time elapsed: %1 Буфер/очередь: %1 / %2 - - - + + + Save file as Сохранить файл как @@ -1250,9 +1250,9 @@ Time elapsed: %1 - - - + + + Open Открыть @@ -1407,18 +1407,18 @@ Time elapsed: %1 Sender Отправка файла - - + + Program start commands: Команды начала программы: - - + + Program end commands: Команды конца программы: - - + + Tool change commands: Команды смены инструмента: @@ -1530,8 +1530,8 @@ Time elapsed: %1 Toolpath Траектория - - + + Pause on tool change Приостанавливать передачу файла по командам смены инструмента @@ -1619,53 +1619,66 @@ Time elapsed: %1 Текст - Font - Шрифт + Шрифт - Size: - Размер: + Размер: - - + + 8 - + 9 - + 10 - + 11 - + 12 - + pt пт + + + + User interface + Пользовательский интерфейс + + + + Font size: + Размер шрифта: + + + + Language: + Язык интерфейса: - + (restart needed) (необходим перезапуск) - + Set to defaults По умолчанию @@ -1906,17 +1919,17 @@ Time elapsed: %1 Отображать команды G-code программы в консоли - + OK ОК - + Cancel Отмена - + Reset settings to default values? Восстановить значения по-умолчанию? From 71f8a8a3e23a241a2055100c1a3982e4c913ad18 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 16 Jan 2021 14:52:41 +0500 Subject: [PATCH 55/80] Adaptive spindle speed step added --- src/candle/frmmain.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index de3d8b28..cdca11f6 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -2956,6 +2956,7 @@ void frmMain::applySettings() { ui->glwVisualizer->setColorBackground(m_settings->colors("VisualizerBackground")); ui->glwVisualizer->setColorText(m_settings->colors("VisualizerText")); + ui->slbSpindle->setRatio((m_settings->spindleSpeedMax() - m_settings->spindleSpeedMin()) / 100); ui->slbSpindle->setMinimum(m_settings->spindleSpeedMin()); ui->slbSpindle->setMaximum(m_settings->spindleSpeedMax()); From 64ef002869c3141d48d4cfc525f67c770c715a32 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 16 Jan 2021 15:12:10 +0500 Subject: [PATCH 56/80] Settings codec fix --- src/candle/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/candle/main.cpp b/src/candle/main.cpp index 5b116cad..6c1e9f39 100644 --- a/src/candle/main.cpp +++ b/src/candle/main.cpp @@ -41,6 +41,7 @@ int main(int argc, char *argv[]) QGLFormat::setDefaultFormat(glf); QSettings set(a.applicationDirPath() + "/settings.ini", QSettings::IniFormat); + set.setIniCodec("UTF-8"); QString loc = set.value("language", "en").toString(); QString translationsFolder = qApp->applicationDirPath() + "/translations/"; From 8a938cbdc4ce722e41d91a2e03af956b84ec853d Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 16 Jan 2021 15:28:34 +0500 Subject: [PATCH 57/80] Jog units fix --- src/candle/frmmain.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index cdca11f6..9c8aee56 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -4254,22 +4254,26 @@ void frmMain::jogStep() double dt = qMax(0.01, sqrt(v) / (2 * acc * (N - 1))) + tt; // Single jog command time double s = v * dt; // Jog distance - QVector3D vec = m_jogVector.normalized() * s; + QVector3D vec = m_jogVector.normalized() * s / toMetric(1); - sendCommand(QString("$J=G21G91X%1Y%2Z%3F%4") + sendCommand(QString("$J=%5G91X%1Y%2Z%3F%4") .arg(vec.x(), 0, 'g', 4) .arg(vec.y(), 0, 'g', 4) .arg(vec.z(), 0, 'g', 4) - .arg(speed), -2, m_settings->showUICommands()); + .arg(speed) + .arg(m_settings->units() ? "G20" : "G21") + , -2, m_settings->showUICommands()); } else { int speed = ui->cboJogFeed->currentText().toInt(); // Speed mm/min QVector3D vec = m_jogVector * ui->cboJogStep->currentText().toDouble(); - sendCommand(QString("$J=G21G91X%1Y%2Z%3F%4") + sendCommand(QString("$J=%5G91X%1Y%2Z%3F%4") .arg(vec.x(), 0, 'g', 4) .arg(vec.y(), 0, 'g', 4) .arg(vec.z(), 0, 'g', 4) - .arg(speed), -3, m_settings->showUICommands()); + .arg(speed) + .arg(m_settings->units() ? "G20" : "G21") + , -3, m_settings->showUICommands()); } } From 4a068afce0538d1be137f99b29f4611f0538cf35 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 16 Jan 2021 15:41:35 +0500 Subject: [PATCH 58/80] Added access to app settings for plugins. Added textboxes setup for 'Coordinate system' plugin according to units (inches/mm). --- src/candle/frmmain.cpp | 6 ++---- src/candleplugins/coordinatesystem/script.js | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index 9c8aee56..3c43baef 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -3060,8 +3060,8 @@ void frmMain::loadPlugins() se->globalObject().setProperty("app", app); // // Settings - // QScriptValue settings = se->newQObject(m_settings); - // se->globalObject().setProperty("mainSettings", settings); + QScriptValue settings = se->newQObject(m_settings); + app.setProperty("settings", settings); // Stored vars QScriptValue vars = se->newQObject(&m_storedVars); @@ -4241,8 +4241,6 @@ QList frmMain::subdivideSegment(LineSegment* segment) void frmMain::jogStep() { - // TODO: Replace G21 with G21/G20 according the mm/inch setting - if (m_jogVector.length() == 0) return; if (ui->cboJogStep->currentText().toDouble() == 0) { diff --git a/src/candleplugins/coordinatesystem/script.js b/src/candleplugins/coordinatesystem/script.js index c1c77cbb..f4b8df32 100644 --- a/src/candleplugins/coordinatesystem/script.js +++ b/src/candleplugins/coordinatesystem/script.js @@ -26,10 +26,10 @@ function init() loader.setWorkingDirectory(new QDir(pluginPath)); loader.addPluginPath(appPath); - // TODO: Enable only on senderState == SenderStopped; app.deviceStateChanged.connect(onAppDeviceStateChanged); app.senderStateChanged.connect(onAppSenderStateChanged); app.responseReceived.connect(onAppResponseReceived); + app.settingsLoaded.connect(onAppSettingsLoaded); } function createPanelWidget() @@ -61,6 +61,23 @@ function createPanelWidget() return uiPanel; } +function onAppSettingsLoaded() +{ + var u = app.settings.units; + var b = u ? 999 : 9999; + + uiPanel.txtOffsetX.decimals = u ? 4 : 3; + uiPanel.txtOffsetY.decimals = u ? 4 : 3; + uiPanel.txtOffsetZ.decimals = u ? 4 : 3; + + uiPanel.txtOffsetX.mimimum = -b; + uiPanel.txtOffsetX.maximum = b; + uiPanel.txtOffsetY.mimimum = -b; + uiPanel.txtOffsetY.maximum = b; + uiPanel.txtOffsetZ.mimimum = -b; + uiPanel.txtOffsetZ.maximum = b; +} + function onAppDeviceStateChanged(status) { uiPanel.setEnabled((status == 1) && (senderState == 4)); From f5a1d34d337de39de89308c063028f666077144d Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 16 Jan 2021 17:57:28 +0500 Subject: [PATCH 59/80] Keyboard control shortcuts fix --- src/candle/frmmain.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index 3c43baef..10d0f1b8 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -4047,7 +4047,7 @@ bool frmMain::eventFilter(QObject *obj, QEvent *event) QKeySequence ks; - if ((event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease)) { + if ((event->type() == QEvent::ShortcutOverride || event->type() == QEvent::KeyRelease)) { QKeyEvent *ev = static_cast(event); ks = QKeySequence(ev->key() | ev->modifiers()); } @@ -4055,21 +4055,21 @@ bool frmMain::eventFilter(QObject *obj, QEvent *event) // Jog on keyboard control if ((m_senderState != SenderTransferring) && (m_senderState != SenderStopping) && ui->chkKeyboardControl->isChecked() && - (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) && + (event->type() == QEvent::ShortcutOverride || event->type() == QEvent::KeyRelease) && !static_cast(event)->isAutoRepeat()) { if (ui->actJogXMinus->shortcuts().contains(ks)) { - if (event->type() == QEvent::KeyPress) emit ui->cmdXMinus->pressed(); else emit ui->cmdXMinus->released(); + if (event->type() == QEvent::ShortcutOverride) emit ui->cmdXMinus->pressed(); else emit ui->cmdXMinus->released(); } else if (ui->actJogXPlus->shortcuts().contains(ks)) { - if (event->type() == QEvent::KeyPress) emit ui->cmdXPlus->pressed(); else emit ui->cmdXPlus->released(); + if (event->type() == QEvent::ShortcutOverride) emit ui->cmdXPlus->pressed(); else emit ui->cmdXPlus->released(); } else if (ui->actJogYPlus->shortcuts().contains(ks)) { - if (event->type() == QEvent::KeyPress) emit ui->cmdYPlus->pressed(); else emit ui->cmdYPlus->released(); + if (event->type() == QEvent::ShortcutOverride) emit ui->cmdYPlus->pressed(); else emit ui->cmdYPlus->released(); } else if (ui->actJogYMinus->shortcuts().contains(ks)) { - if (event->type() == QEvent::KeyPress) emit ui->cmdYMinus->pressed(); else emit ui->cmdYMinus->released(); + if (event->type() == QEvent::ShortcutOverride) emit ui->cmdYMinus->pressed(); else emit ui->cmdYMinus->released(); } else if (ui->actJogZPlus->shortcuts().contains(ks)) { - if (event->type() == QEvent::KeyPress) emit ui->cmdZPlus->pressed(); else emit ui->cmdZPlus->released(); + if (event->type() == QEvent::ShortcutOverride) emit ui->cmdZPlus->pressed(); else emit ui->cmdZPlus->released(); } else if (ui->actJogZMinus->shortcuts().contains(ks)) { - if (event->type() == QEvent::KeyPress) emit ui->cmdZMinus->pressed(); else emit ui->cmdZMinus->released(); + if (event->type() == QEvent::ShortcutOverride) emit ui->cmdZMinus->pressed(); else emit ui->cmdZMinus->released(); } } } else if (obj == ui->tblProgram && ((m_senderState == SenderTransferring) || (m_senderState == SenderStopping))) { @@ -4080,10 +4080,12 @@ bool frmMain::eventFilter(QObject *obj, QEvent *event) } } + // Visualizer updates if (obj == this && event->type() == QEvent::WindowStateChange) { ui->glwVisualizer->setUpdatesEnabled(!isMinimized() && ui->dockVisualizer->isVisible()); } + // Drag & drop panels if (!ui->actViewLockPanels->isChecked() && obj->inherits("QGroupBox") && (obj->parent()->objectName() == "scrollContentsDevice" || obj->parent()->objectName() == "scrollContentsModification" @@ -4116,7 +4118,7 @@ bool frmMain::eventFilter(QObject *obj, QEvent *event) } } - return false; + return QMainWindow::eventFilter(obj, event); } int frmMain::bufferLength() From f740fba3d519c890c8028ae197274f5a46881f63 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 16 Jan 2021 20:29:01 +0500 Subject: [PATCH 60/80] Keyboard control fix --- src/candle/frmmain.cpp | 74 +++++++++++++++++++++++++++++------------- src/candle/frmmain.h | 1 + 2 files changed, 52 insertions(+), 23 deletions(-) diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index 10d0f1b8..db9666fa 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -13,7 +13,9 @@ #include #include #include +#include #include +#include #include #include "frmmain.h" #include "ui_frmmain.h" @@ -1537,6 +1539,7 @@ void frmMain::on_cmdZMinus_released() void frmMain::on_cmdStop_clicked() { + m_jogVector = QVector3D(0, 0, 0); m_queue.clear(); m_serialPort.write(QByteArray(1, char(0x85))); } @@ -4045,31 +4048,51 @@ bool frmMain::eventFilter(QObject *obj, QEvent *event) { if (obj->inherits("QWidgetWindow")) { + // Jog on keyboard control QKeySequence ks; + QKeyEvent *ev = static_cast(event); if ((event->type() == QEvent::ShortcutOverride || event->type() == QEvent::KeyRelease)) { - QKeyEvent *ev = static_cast(event); - ks = QKeySequence(ev->key() | ev->modifiers()); + if (ev->key() == Qt::Key_Shift) { + ks = QKeySequence(Qt::ShiftModifier); + } else if (ev->key() == Qt::Key_Control) { + ks = QKeySequence(Qt::ControlModifier); + } else if (ev->key() == Qt::Key_Alt) { + ks = QKeySequence(Qt::AltModifier); + } else { + ks = QKeySequence(ev->key() | ev->modifiers()); + } } - // Jog on keyboard control - if ((m_senderState != SenderTransferring) && (m_senderState != SenderStopping) && - ui->chkKeyboardControl->isChecked() && - (event->type() == QEvent::ShortcutOverride || event->type() == QEvent::KeyRelease) && - !static_cast(event)->isAutoRepeat()) + if ((m_senderState != SenderTransferring) && (m_senderState != SenderStopping) + && ui->chkKeyboardControl->isChecked() && !ev->isAutoRepeat()) { - if (ui->actJogXMinus->shortcuts().contains(ks)) { - if (event->type() == QEvent::ShortcutOverride) emit ui->cmdXMinus->pressed(); else emit ui->cmdXMinus->released(); - } else if (ui->actJogXPlus->shortcuts().contains(ks)) { - if (event->type() == QEvent::ShortcutOverride) emit ui->cmdXPlus->pressed(); else emit ui->cmdXPlus->released(); - } else if (ui->actJogYPlus->shortcuts().contains(ks)) { - if (event->type() == QEvent::ShortcutOverride) emit ui->cmdYPlus->pressed(); else emit ui->cmdYPlus->released(); - } else if (ui->actJogYMinus->shortcuts().contains(ks)) { - if (event->type() == QEvent::ShortcutOverride) emit ui->cmdYMinus->pressed(); else emit ui->cmdYMinus->released(); - } else if (ui->actJogZPlus->shortcuts().contains(ks)) { - if (event->type() == QEvent::ShortcutOverride) emit ui->cmdZPlus->pressed(); else emit ui->cmdZPlus->released(); - } else if (ui->actJogZMinus->shortcuts().contains(ks)) { - if (event->type() == QEvent::ShortcutOverride) emit ui->cmdZMinus->pressed(); else emit ui->cmdZMinus->released(); + static QList acts; + if (acts.isEmpty()) acts << ui->actJogXMinus << ui->actJogXPlus + << ui->actJogYMinus << ui->actJogYPlus + << ui->actJogZMinus << ui->actJogZPlus; + + static QList buttons; + if (buttons.isEmpty()) buttons << ui->cmdXMinus << ui->cmdXPlus + << ui->cmdYMinus << ui->cmdYPlus + << ui->cmdZMinus << ui->cmdZPlus; + + for (int i = 0; i < acts.count(); i++) { + if ((!buttons.at(i)->isDown()) && (event->type() == QEvent::ShortcutOverride)) { + if (acts.at(i)->shortcut().matches(ks) == QKeySequence::ExactMatch) { + buttons.at(i)->pressed(); + buttons.at(i)->setDown(true); + } + } else if (buttons.at(i)->isDown() && (event->type() == QEvent::KeyRelease)) { + if ((acts.at(i)->shortcut().matches(ks) == QKeySequence::ExactMatch) + || (acts.at(i)->shortcut().toString().contains(ks.toString())) + || (ks.toString().contains(acts.at(i)->shortcut().toString())) + ) + { + buttons.at(i)->released(); + buttons.at(i)->setDown(false); + } + } } } } else if (obj == ui->tblProgram && ((m_senderState == SenderTransferring) || (m_senderState == SenderStopping))) { @@ -4247,14 +4270,14 @@ void frmMain::jogStep() if (ui->cboJogStep->currentText().toDouble() == 0) { const double acc = m_settings->acceleration(); // Acceleration mm/sec^2 - int speed = ui->cboJogFeed->currentText().toInt(); // Speed mm/min - double v = (double)speed / 60; // Rapid speed mm/sec + double speed = ui->cboJogFeed->currentText().toDouble(); // Speed + double v = toMetric(speed) / 60; // Rapid speed mm/sec int N = 15; // Planner blocks double tt = 0.002; // Transfer time double dt = qMax(0.01, sqrt(v) / (2 * acc * (N - 1))) + tt; // Single jog command time double s = v * dt; // Jog distance - QVector3D vec = m_jogVector.normalized() * s / toMetric(1); + QVector3D vec = m_jogVector.normalized() * toInches(s); sendCommand(QString("$J=%5G91X%1Y%2Z%3F%4") .arg(vec.x(), 0, 'g', 4) @@ -4264,7 +4287,7 @@ void frmMain::jogStep() .arg(m_settings->units() ? "G20" : "G21") , -2, m_settings->showUICommands()); } else { - int speed = ui->cboJogFeed->currentText().toInt(); // Speed mm/min + double speed = ui->cboJogFeed->currentText().toDouble(); // Speed QVector3D vec = m_jogVector * ui->cboJogStep->currentText().toDouble(); sendCommand(QString("$J=%5G91X%1Y%2Z%3F%4") @@ -4282,6 +4305,11 @@ double frmMain::toMetric(double value) return m_settings->units() == 0 ? value : value * 25.4; } +double frmMain::toInches(double value) +{ + return m_settings->units() == 0 ? value : value / 25.4; +} + bool frmMain::compareCoordinates(double x, double y, double z) { return ui->txtMPosX->value() == x && ui->txtMPosY->value() == y && ui->txtMPosZ->value() == z; diff --git a/src/candle/frmmain.h b/src/candle/frmmain.h index 5231662e..0d5fa21c 100644 --- a/src/candle/frmmain.h +++ b/src/candle/frmmain.h @@ -431,6 +431,7 @@ private slots: QList subdivideSegment(LineSegment *segment); void jogStep(); double toMetric(double value); + double toInches(double value); bool compareCoordinates(double x, double y, double z); bool isGCodeFile(QString fileName); bool isHeightmapFile(QString fileName); From 9121f519793293fecd0719823775d472a4641b1f Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 16 Jan 2021 20:35:18 +0500 Subject: [PATCH 61/80] Spindle speed display fix --- src/candle/frmmain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index db9666fa..d076541e 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -1891,7 +1891,7 @@ void frmMain::onSerialPortReadyRead() // Spindle speed QRegExp rx(".*S([\\d\\.]+)"); if (rx.indexIn(response) != -1) { - double speed = toMetric(rx.cap(1).toDouble()); //RPM in imperial? + double speed = rx.cap(1).toDouble(); ui->slbSpindle->setCurrentValue(speed); } From 3168ad505ea9978c977efa321c0af97fecce3acf Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 16 Jan 2021 21:17:45 +0500 Subject: [PATCH 62/80] Cleanup, version update --- src/candle/frmmain.cpp | 2 +- src/candle/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index d076541e..c50a2c73 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -1910,6 +1910,7 @@ void frmMain::onSerialPortReadyRead() set[gs.cap(1).toInt()] = gs.cap(2).toDouble(); p += gs.matchedLength(); } + // TODO: Store travels 130, 131, 132 to draw machine table if (set.keys().contains(13)) m_settings->setUnits(set[13]); if (set.keys().contains(110)) m_settings->setRapidSpeed(set[110]); if (set.keys().contains(120)) m_settings->setAcceleration(set[120]); @@ -4196,7 +4197,6 @@ QTime frmMain::updateProgramEstimatedTime(QList lines) LineSegment *ls = lines[i]; double length = (ls->getEnd() - ls->getStart()).length(); - // TODO: Update for rapid override if (!qIsNaN(length) && !qIsNaN(ls->getSpeed()) && ls->getSpeed() != 0) time += length / ((ui->slbFeedOverride->isChecked() && !ls->isFastTraverse()) ? (ls->getSpeed() * ui->slbFeedOverride->value() / 100) : diff --git a/src/candle/main.cpp b/src/candle/main.cpp index 6c1e9f39..0793bcce 100644 --- a/src/candle/main.cpp +++ b/src/candle/main.cpp @@ -29,7 +29,7 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); a.setApplicationDisplayName("Candle"); - a.setApplicationVersion("1.2.10b"); + a.setApplicationVersion("1.2.11b"); #ifdef GLES QFontDatabase::addApplicationFont(":/fonts/Ubuntu-R.ttf"); From 2cf97366d99b6cac6377c2101f6816db3a5d7fb8 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sat, 16 Jan 2021 22:56:58 +0500 Subject: [PATCH 63/80] Command queue fix --- src/candle/frmmain.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index c50a2c73..00d52041 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -1740,7 +1740,7 @@ void frmMain::onSerialPortReadyRead() // Toolpath shadowing if (((m_senderState == SenderTransferring) || (m_senderState == SenderStopping) - || (m_senderState == SenderPausing)) && state != DeviceCheck) { + || (m_senderState == SenderPausing) || (m_senderState == SenderPaused)) && state != DeviceCheck) { GcodeViewParse *parser = m_currentDrawer->viewParser(); bool toolOntoolpath = false; @@ -2013,12 +2013,16 @@ void frmMain::onSerialPortReadyRead() // Check queue if (m_queue.length() > 0) { CommandQueue cq = m_queue.takeFirst(); - - while ((bufferLength() + cq.command.length() + 1) <= BUFFERLENGTH) { - int r = 0; - if (!cq.command.isEmpty()) r = sendCommand(cq.command, cq.tableIndex, cq.showInConsole); - if ((!r && !cq.command.isEmpty() && (m_queue.isEmpty() || cq.wait)) || m_queue.isEmpty()) break; - else cq = m_queue.takeFirst(); + while (true) { + if ((bufferLength() + cq.command.length() + 1) <= BUFFERLENGTH) { + int r = 0; + if (!cq.command.isEmpty()) r = sendCommand(cq.command, cq.tableIndex, cq.showInConsole); + if ((!r && !cq.command.isEmpty() && (m_queue.isEmpty() || cq.wait)) || m_queue.isEmpty()) break; + else cq = m_queue.takeFirst(); + } else { + m_queue.insert(0, cq); + break; + } } } From c7164fe89ce71c3e1c210fe408ab7154ad023359 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sun, 17 Jan 2021 11:49:09 +0500 Subject: [PATCH 64/80] Jog actions removed from form list. Solves problem with table navigation. --- src/candle/frmmain.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/candle/frmmain.cpp b/src/candle/frmmain.cpp index 00d52041..fe76b9ee 100644 --- a/src/candle/frmmain.cpp +++ b/src/candle/frmmain.cpp @@ -297,7 +297,11 @@ frmMain::frmMain(QWidget *parent) : } // Enable form actions - foreach (QAction* a, findChildren()) addAction(a); + QList noActions; + noActions << ui->actJogXMinus << ui->actJogXPlus + << ui->actJogYMinus << ui->actJogYPlus + << ui->actJogZMinus << ui->actJogZPlus; + foreach (QAction* a, findChildren()) if (!noActions.contains(a)) addAction(a); // Handle file drop if (qApp->arguments().count() > 1 && isGCodeFile(qApp->arguments().last())) { From a39ad7a39c06286efb9a11c9d11ffbe30cb66ac8 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sun, 24 Jan 2021 18:41:19 +0500 Subject: [PATCH 65/80] Working on html help --- doc/help_ru.html | 3840 +++++++++++++++++ doc/help_ru.md | 780 ++++ doc/images/camera.png | Bin 0 -> 4603 bytes doc/images/check.png | Bin 0 -> 975 bytes doc/images/console.png | Bin 0 -> 21532 bytes doc/images/control.png | Bin 0 -> 14546 bytes doc/images/coordinatesystem.png | Bin 0 -> 14194 bytes doc/images/door.png | Bin 0 -> 649 bytes doc/images/flood.png | Bin 0 -> 1226 bytes doc/images/g-codeprogram.png | Bin 0 -> 38762 bytes doc/images/heightmap.png | Bin 0 -> 26989 bytes doc/images/home.png | Bin 0 -> 1233 bytes doc/images/jogging.png | Bin 0 -> 15951 bytes doc/images/mainwindow.png | Bin 0 -> 154478 bytes doc/images/overriding.png | Bin 0 -> 6015 bytes doc/images/pause.png | Bin 0 -> 1128 bytes doc/images/power.png | Bin 0 -> 1912 bytes doc/images/restart.png | Bin 0 -> 1074 bytes doc/images/settings.png | Bin 0 -> 71380 bytes doc/images/spindle.png | Bin 0 -> 7260 bytes doc/images/status.png | Bin 0 -> 8076 bytes doc/images/unlock.png | Bin 0 -> 755 bytes doc/images/usercommands.png | Bin 0 -> 10386 bytes doc/images/visualizer.png | Bin 0 -> 41583 bytes src/candle/frmsettings.cpp | 2 +- src/candle/frmsettings.ui | 8 +- src/candleplugins/camera/script.js | 1 + .../customwidgetsplugin/slider.h | 1 + 28 files changed, 4630 insertions(+), 2 deletions(-) create mode 100644 doc/help_ru.html create mode 100644 doc/help_ru.md create mode 100644 doc/images/camera.png create mode 100644 doc/images/check.png create mode 100644 doc/images/console.png create mode 100644 doc/images/control.png create mode 100644 doc/images/coordinatesystem.png create mode 100644 doc/images/door.png create mode 100644 doc/images/flood.png create mode 100644 doc/images/g-codeprogram.png create mode 100644 doc/images/heightmap.png create mode 100644 doc/images/home.png create mode 100644 doc/images/jogging.png create mode 100644 doc/images/mainwindow.png create mode 100644 doc/images/overriding.png create mode 100644 doc/images/pause.png create mode 100644 doc/images/power.png create mode 100644 doc/images/restart.png create mode 100644 doc/images/settings.png create mode 100644 doc/images/spindle.png create mode 100644 doc/images/status.png create mode 100644 doc/images/unlock.png create mode 100644 doc/images/usercommands.png create mode 100644 doc/images/visualizer.png diff --git a/doc/help_ru.html b/doc/help_ru.html new file mode 100644 index 00000000..b48a720c --- /dev/null +++ b/doc/help_ru.html @@ -0,0 +1,3840 @@ + + + + + + + + + + + +

Программа "Candle"

+

Содержание

+
+
+

1 Назначение программы

+

Программа "Candle" (далее - программа) предназначена для управления станками с числовым программным управлением (далее - ЧПУ), имеющими контроллер "GRBL" (далее - контроллер), с помощью ПЭВМ.

+

Программа позволяет работать с фрезерными 3-ех осевыми станками, лазерными плоттерами.

+

Основные функции программы:

+
    +
  • Загрузка, редактирование, сохранение управляющих программ (далее - УП).
  • +
  • Визуализация УП.
  • +
  • Снятие карты неровности поверхности, коррекция УП в соответствии с заданной картой.
  • +
  • Передача УП на ЧПУ.
  • +
  • Отображение состояния ЧПУ.
  • +
  • Ручное управление ЧПУ.
  • +
+

2 Условия выполнения программы

+

2.1 Требования к аппаратному обеспечению

+

Для корректной работы программы необходима ПЭВМ со следующими характеристиками:

+
    +
  • процессор, поддерживающий набор инструкций SSE2,
  • +
  • графический адаптер, поддерживающий спецификацию OpenGL версии 2.0 и выше,
  • +
  • дисплей с разрешением 1280х720,
  • +
  • свободный порт USB или RS-232 для подключения ПЭВМ к контроллеру ЧПУ,
  • +
  • свободное место на запоминающем устройстве не менее 20 Мб.
  • +
+

2.2 Требования к программному обеспечению

+

Программа требует наличия на ПЭВМ операционной системы Windows 7 и выше, с установленным драйвером OpenGL, драйвером преобразователя USB-UART при подключении ЧПУ через порт USB.

+

3 Выполнение программы

+

3.1 Установка программы

+

Программа поставляется в виде архива "candle_v.v.v_x86.zip" для 32-разрядных процессоров и "candle_v.v.v_x64.zip" для 64-разрядных, где v.v.v - номер версии программы.

+

Для установки необходимо распаковать архив в рабочую папку, например: "D:". В папке будет создан каталог программы "Candle" со всеми необходимыми для работы файлами.

+

После распаковки, для обеспечения дальнейшего быстрого запуска, нужно создать ярлык к исполняемому файлу "D:\Candle\candle.exe".

+

3.2 Запуск

+

Запуск программы осуществляется по вызову файла "candle.exe" из папки установки или с помощью созданного ранее ярлыка.

+

3.3 Главное окно

+

При запуске программы на дисплее должно отобразиться главное окно программы, представленное на рисунке 1.

+

Главное окно программы

+

Рисунок 1 - Главное окно программы

+

Главное окно состоит из главного меню, расположенного сверху, набора окон и инструментальных панелей:

+
    +
  • "G-код программа" - основное окно, отображает список команд текущей УП.
  • +
  • "Визуализатор" - графическое представление УП.
  • +
  • "Камера" - изображение с камеры.
  • +
  • "Консоль" - окно передачи команд в контроллер "GRBL" ЧПУ и отображения ответов.
  • +
  • "Устройство" - окно с набором панелей для управления ЧПУ.
  • +
  • "Модификация" - окно с набором панелей для коррекции УП.
  • +
  • "Пользователь" - окно с набором пользовательских панелей.
  • +
+

Каждое окно имеет область заголовка и область содержимого. В заголовке расположено название окна, кнопки "Отделить", "Закрыть", в области содержимого - элементы ввода и отображения информации, а также инструментальные панели.

+

Все окна, за исключением окна "G-код программа", могут быть перемещены перетаскиванием с нажатой левой кнопки мыши (далее - ЛКМ) на заголовке окна. В процессе перемещения конфигурация главного окна программы будет динамически изменяться, указывая будущее расположение перемещаемого окна.

+

Окна могут быть отделены от главного окна нажатием на кнопку "Отделить" заголовка, закрыты - "Закрыть". Отделенные окна могут быть возвращены в главное окно перетаскиванием за заголовок, закрытые - выбором соответствующего пункта в главном меню "Вид - Окна".

+

Размеры окон изменяются нажатием ЛКМ на границу окна и ее перетаскиванием в нужную сторону.

+

3.3.1 Главное меню

+

Главное меню программы предоставляет доступ к основным функциям программы. Меню разделено на группы и пункты, описание которых приведено в таблице 1.

+

Таблица 1 - Главное меню программы

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ГруппаПунктОписание
ФайлНовыйСоздание новой УП
ОткрытьЗагрузка файла УП
Недавние файлыЗагрузка одного из последних файлов УП
СохранитьЗапись изменений УП в файл
Сохранить какЗапись УП в указанный файл
ВидОкнаВыбор отображаемых окон
ПанелиВыбор отображаемых панелей
Зафиксировать окнаЗапрет/разрешение перемещения окон
Зафиксировать панелиЗапрет/разрешение перемещения панелей
СервисНастройкиВызов окна настроек программы
СправкаСодержаниеЗапуск справочной системы программы
О программеВызов окна с информацией о программе
+

3.3.2 Окна

+

3.3.2.1 Окно "G-код программа"

+

Текущая УП отображается в окне "G-код программа", представленном на рисунке 2.

+

Окно "G-код программа"

+

Рисунок 2 - Окно "G-код программа"

+

Каждая строка УП соответствует строке в таблице, содержащей столбцы:

+
    +
  • "№" - номер строки УП.
  • +
  • "Команда" - команда УП.
  • +
  • "Состояние" - текущее состояние команды ("В очереди", "Отправлена", "Обработана", "Пропущена").
  • +
  • "Ответ" - ответ контроллера на отправленную команду.
  • +
+

УП может быть отредактирована, поддерживаются следующие функции:

+
    +
  • Изменение команды в выбранной строке.
  • +
  • Добавления новых строк УП.
  • +
  • Удаление строк УП.
  • +
+

Вход в режим редактирования команды УП выполняется двойным нажатием ЛКМ в столбце "Команда" выбранной строки или нажатием клавиши <F2> в предварительно выбранной ячейке. Подтверждение ввода измененной команды осуществляется нажатием клавиши <Enter> или <Tab>, отмена - нажатием клавиши <Esc>.

+

Для добавления строки - необходимо выбрать в таблице строку, перед которой вставляется новая строка, и активировать пункт "Вставить строку" контекстного меню, вызываемого нажатием правой кнопки мыши (далее - ПКМ) в области таблицы, или нажать на клавишу <Ins> клавиатуры.

+

Удаление выделенных строк таблицы производится вызовом пункта "Удалить строки" контекстного меню таблицы или нажатием на клавишу <Del> клавиатуры.

+

Под таблицей расположены кнопки управления загрузкой и отправкой УП в контроллер ЧПУ:

+
    +
  • "Открыть" - вызывает диалог выбора файла УП, в случае подтверждения выбора - загружает УП.
  • +
  • "Сброс" - снимает выделение в таблице, устанавливает первую строку УП текущей, сбрасывает состояние команд.
  • +
  • "Отправить" - запускает процесс передачи УП в контроллер ЧПУ.
  • +
  • "Пауза" - приостанавливает процесс передачи УП.
  • +
  • "Прервать" - останавливает передачу УП.
  • +
+

Следует учитывать, что при активации команд "Пауза" и "Остановить" фактическая остановка ЧПУ выполняется только по опустошению входного буфера команд контроллера. Для немедленной остановки ЧПУ необходимо использовать команды панели "Управление": "Удержание", "Сброс".

+

Слева от кнопок расположен флаг, отвечающий за автоматическую прокрутку таблицы в процессе отправки УП. При активной передаче УП в контроллер и ручной прокрутке таблицы флаг сбрасывается.

+

3.3.2.2 Окно "Визуализатор"

+

Графическое представление УП отображается в окне "Визуализатор" (рисунок 3).

+

Окно "Визуализатор"

+

Рисунок 3 - Окно "Визуализатор"

+

В окне можно выделить пять функциональных областей:

+
    +
  • Центральная или основная область, в которой выводится траектория инструмента УП в виде трехмерной (3D) проекции.
  • +
  • Состояние контроллера ЧПУ в левом верхнем углу.
  • +
  • Кнопки управления видом в правом верхнем углу.
  • +
  • Информация о границах обработки УП в левом нижнем углу.
  • +
  • Вспомогательная информация, выводимая в правом нижнем углу.
  • +
+

Траектория инструмента УП представлена набором отрезков линий:

+
    +
  • Сплошными черными отрезками выделены части траектории линейной и круговой интерполяции УП.
  • +
  • Пунктирными черными - ускоренные движения.
  • +
  • Красным цветом - вертикальные перемещения.
  • +
+

При передаче УП в контроллер ЧПУ часть отрезков меняет цвет в зависимости от следующих условий: часть траектории, обработанная ЧПУ, выделяется серым цветом; часть траектории, отправленная в ЧПУ - фиолетовым.

+

На траекторию УП нанесены три маркера-круга:

+
    +
  • Красный маркер - начало траектории.
  • +
  • Зеленый маркер - конец траектории.
  • +
  • Фиолетовый - отрезок траектории, соответствующий выделенной команде в таблице окна "G-код программа".
  • +
+

В основной области, также, отображается начало координат в виде прямоугольника красного цвета в плоскости X-Y, и осей: X - красного цвета, Y - зеленого, Z - синего. Здесь же выводится условное отображение инструмента в виде каркасной модели из линий оранжевого цвета.

+

Навигация в основной области выполняется следующим образом:

+
    +
  • Поворот 3D проекции осуществляется нажатием ЛКМ в основной области и перемещением курсора мыши в заданном направлении или нажатием на одну из кнопок управления видом в правом верхнем углу окна ("Вид сверху", "Вид спереди", "Вид слева", "Изометрия").
  • +
  • Перемещении проекции в области осуществляется нажатием ЛКМ с удерживанием клавиши <Shift> клавиатуры и перемещением курсора мыши в заданном направлении.
  • +
  • Масштаб проекции изменяется с помощью колеса прокрутки мыши или нажатием на кнопку "Вписать" в правом верхнем углу.
  • +
+

В левом верхнем углу окна расположена информация о текущем состоянии контроллера ЧПУ, а именно: строка состояния интерпретатора; текущие значения подачи и скорости вращения шпинделя; состояние компонентов ЧПУ (шпинделя, системы охлаждения).

+

Строка состояния имеет следующий вид:

+

[GC:G1 G54 G17 G21 G90 G94 M3 M9 T0 F75 S8000]

+

В строке выводится текущий режим работы интерпретатора контроллера ЧПУ для 12 модальных групп, номер инструмента, скорость подачи и скорость вращения шпинделя. Группы и возможные режимы приведены в таблице 2.

+

Таблица 2 - Режимы работы интерпретатора контроллера ЧПУ

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Модальная группаРежимы
Режим движенияG0, G1, G2, G3, G38.2, G38.3, G38.4, G38.5, G80
Система координатG54, G55, G56, G57, G58, G59
Рабочая плоскостьG17, G18, G19
Режим задания дистанции перемещенияG90, G91
Режим IJK задания круговой интерполяцииG91.1
Режим подачиG93, G94
Единицы измеренияG20, G21
Режим компенсации радиуса инструментаG40
Режим компенсации длины инструментаG43.1, G49
Режим управления ходом программыM0, M1, M2, M30
Состояние шпинделяM3, M4, M5
Состояние системы охлажденияM7, M8, M9
+

Строка состояния компонентов ЧПУ имеет вид:

+

СУ: SFM

+

Символ "S" отвечает за состояние шпинделя, выводится при вращении шпинделя в направлении часовой стрелки, заменяется на символ "C" при вращении шпинделя против часовой стрелки и не выводится при остановке шпинделя. Символ "F" отображается при включенной системе водяного охлаждения, "M" - системе воздушного охлаждения.

+

Границы обработки УП приведены в левом нижнем углу, здесь указаны минимальные и максимальные координаты для каждой из осей и габариты зоны обработки (без учета диаметра инструмента).

+

В правом нижнем углу выводится информация о текущем времени работы ЧПУ под управлением загруженной УП и ориентировочное полное время работы по УП.

+

Информация об очереди команд, отправляемых в контроллер ЧПУ представлена в строке ниже и включает в себя: общий размер команд, отправленных и обрабатываемых в данный момент контроллером ЧПУ; количество обрабатываемых команд; количество инжектированных команд (команд отправляемых помимо команд УП) в очереди.

+

В этой же области имеется вспомогательная информация об общем количестве вершин, составляющих 3D проекцию, и значение количества кадров в секунду построения проекции.

+

3.3.2.3 Окно "Камера"

+

Изображение с подключенной к ПЭВМ камеры выводится в окне "Камера" (рисунок 4).

+

Окно "Камера"

+

Рисунок 4 - Окно "Камера"

+

Перемещение вида в окне производится с нажатой ЛКМ смещением курсора мыши в заданном направлении, изменение масштаба - колесом прокрутки мыши.

+

В окне имеются прицельные элементы: вертикальная, горизонтальная линии и окружность с центром в точке пересечения линий. Перемещение точки пересечения линий производится нажатием ЛКМ с удерживанием клавиши <Shift> клавиатуры и перемещением курсора мыши в заданном направлении.

+

Параметры, такие как: разрешение изображения камеры, цвет и толщина линий прицельных элементов, доступны в окне настроек программы.

+

3.3.2.4 Окно "Консоль"

+

Для ручного управления ЧПУ, а также настройки и вывода информации о состоянии контроллера в программе предусмотрено окно "Консоль" (рисунок 5).

+

Окно "Консоль"

+

Рисунок 5 - Окно "Консоль"

+

В нижней части окна имеется поле ввода команды и две кнопки: "Отправить команду" и "Очистить консоль". В верхней части расположено многострочное поле вывода ответов от контроллера.

+

Для отправки команды в контроллер ЧПУ необходимо ввести ее в соответствующее поле и нажать клавишу <Enter> клавиатуры или кнопку "Отправить команду". После обработки команды контроллером, команда и ответ будут выведены в поле выше в следующем формате:

+

Команда < Ответ

+

Если в настройках программы включен флаг "Отображать команды интерфейса пользователя" в поле выводов ответов будут отображены все команды, отправляемые в контроллер по нажатию элементов управления инструментальных панелей. При включенном флаге "Отображать команды G-code программы" - все команды УП при передаче УП в контроллер.

+

Очистка поля вывода ответов производится нажатием на кнопку "Очистить консоль".

+

3.3.2.5 Окна "Устройство", "Модификация", "Пользователь"

+

Инструментальные панели с элементами управления и отображения информации о состоянии ЧПУ располагаются в окнах "Устройство", "Модификация", "Пользователь".

+

Наименование окон характеризует функциональное назначение панелей, расположенных в них, но не ограничивает их состав - все панели могут свободно перемещаться как внутри соответствующего окна так и между окнами.

+

Перемещение осуществляется перетаскиванием панели за заголовок с нажатой ЛКМ. В процессе перетаскивания в окнах будет отображаться место будущего расположения панели в виде линии синего цвета.

+

Большинство инструментальных панелей имеют способность сворачиваться для экономии места на экране ПЭВМ, данные панели имеют знак "-" слева от наименования в заголовке в развернутом состоянии и "≡" - в свернутом. Сворачивание и разворачивание панели осуществляется щелчком ЛКМ на заголовке.

+

Текст заголовков панелей в нормальном состоянии имеет черный цвет, при активации важных функций панелей - красный.

+

При запуске программы часть панелей отображается в неактивном состоянии и активируется только при подключении к ПЭВМ ЧПУ.

+

3.3.3 Инструментальные панели

+

3.3.3.1 Панель "Состояние"

+

На панели "Состояние" (рисунок 6) выводятся текущие значения рабочих и машинных координат, а также режим работы контроллера ЧПУ. Координаты отображаются в полях вывода, расположенных по горизонтали в порядке: X, Y, Z.

+

Возможные режимы работы контроллера ЧПУ (поле "Статус") следующие:

+
    +
  • "Готов" - режим готовности к приему команд.
  • +
  • "Тревога" - режим аварии.
  • +
  • "Работа" - режим выполнения УП.
  • +
  • "Дом" - поиск домашней позиции.
  • +
  • "Удержание" - приостановка движения, ожидание дальнейших команд продолжения/сброса.
  • +
  • "Проверка" - интерпретация входящих команд без фактического перемещения инструмента.
  • +
  • "Дверь" - режим срабатывания датчика двери.
  • +
  • "Перемещение" - режим выполнения специальных команд перемещения.
  • +
  • "Сон" - режим пониженного энергопотребления.
  • +
+

В этом же поле выводятся состояния, не относящиеся к режиму работы контроллера:

+
    +
  • "Нет соединения" - при невозможности открыть последовательный порт подключения к ЧПУ.
  • +
  • "Порт открыт" - при открытии последовательного порта, но отсутствии соединения с контроллером ЧПУ.
  • +
+

Фон поля "Статус" может изменять цвет в зависимости от состояния.

+

Панель "Состояние"

+

Рисунок 6 - Панель "Состояние"

+

3.3.3.2 Панель "Управление"

+

Панель "Управление" содержит набор кнопок, отвечающих за базовые функции контроллера "GRBL" (рисунок 7). Состав, посылаемые команды (коды команд), и описание приведены в таблице 3 в порядке их расположения на панели: слева направо, сверху вниз.

+

Панель "Управление"

+

Рисунок 7 - Панель "Управление"

+

Таблица 3 - Кнопки панели "Управления"

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
КнопкаКомандаОписание
Домой$HПоиск домашнего положения
Удерживание! или ~Остановка текущего перемещения (команда !) или возобновление движения (~)
Сброс0x18Программный сброс контроллера
Разблокировка$XПринудительная разблокировка режима аварии
Проверка$C или 0x18Включение (команда $C)/выключение (команда 0x18) режима проверки УП
Сон$SLPПеревод контроллера в режим пониженного энергопотребления
Дверь0x84Принудительный перевод контроллера в режим срабатывания датчика двери
Охлаждение0xA0Включение/выключение системы водяного охлаждения
+

Следует отметить, что при выключении режима проверки УП, посылается команда программного сброса с последующим восстановлением состояния контроллера и смещений рабочих координат.

+

3.3.3.3 Панель "Система координат"

+

На рисунке 8 изображена панель управления системой координат ЧПУ (далее - СК).

+

Панель "Система координат"

+

Рисунок 8 - Панель "Система координат"

+

В верхней части панели выводятся смещения для активной СК для осей X, Y и Z, в нижней расположены кнопки выбора СК и обнуления текущих координат по оси X, Y, Z, всех осей одновременно для активной СК.

+

3.3.3.4 Панель "Шпиндель"

+

На панели управления шпинделем (рисунок 9) расположены:

+
    +
  • Поле ввода для установки/вывода заданной скорости вращения шпинделя.
  • +
  • Горизонтальный ползунок установки/вывода скорости.
  • +
  • Кнопка включения/выключения шпинделя.
  • +
+

Панель "Шпиндель"

+

Рисунок 9 - Панель "Шпиндель"

+

Скорость вращения может задаваться как вводом числа в соответствующее поле, так и с помощью ползунка.

+

Текст в поле ввода может иметь два цвета: черный в случае, если текущая скорость вращения шпинделя соответствует заданной; красный - в противном случае.

+

Ползунок имеет ручку в виде круга серого цвета с контуром темного цвета, с помощью которой задается скорость вращения шпинделя и маркер в виде круга с более светлыми цветами, отображающий текущую скорость вращения.

+

Во время передачи УП в контроллер скорость вращения может быть изменена с помощью вышеуказанных элементов управления, при этом используются инжектированные G-код команды "S", или с помощью функции переопределения скорости панели "Коррекция". Включение/выключение шпинделя во время передачи возможно только при переводе контроллера в режим удерживания.

+

3.3.3.5 Панель "Перемещение"

+

На панели "Перемещение" находятся элементы управления движением инструмента ЧПУ, а именно:

+
    +
  • Кнопки движения по осям X (стрелки влево, вправо), Y (стрелки вверх, вниз), Z (стрелки вверх, вниз, расположенные справа).
  • +
  • Кнопка "Стоп", расположенная по центру кнопок движения по осям X и Y, отвечающая за принудительную остановку движения.
  • +
  • Выпадающий список "Шаг", в котором можно задать шаг перемещения.
  • +
  • Выпадающий список "Подача", отвечающий за выбор скорости перемещения.
  • +
  • Флаг "Управление с клавиатуры", включающий управление перемещением с клавиатуры ПЭВМ.
  • +
+

Панель "Перемещение"

+

Рисунок 10 - Панель "Перемещение"

+

Списки "Шаг" и "Подача" имеют предварительные наборы шагов перемещения и скоростей соответственно, но позволяют ввести произвольные значения в поля списков. Введенные значения запоминаются при включении флага "Управление с клавиатуры" и могут выбираться из списков при последующем запуске программы.

+

Каждой кнопке панели, а также перелистыванию значений "Шаг" и "Подача" могут быть назначены быстрые клавиши, задаваемые в окне "Настройки" программы. Управление данными клавишами включается флагом "Управление с клавиатуры".

+

3.3.3.6 Панель "Коррекция"

+

На рисунке 11 представлен вид панели "Коррекция". На панели расположены элементы переопределения скорости подачи, скорости холостого хода и скорости вращения шпинделя во время отправки УП в контроллер ЧПУ.

+

Элементы аналогичны таковым, расположенным на панели "Шпиндель", за исключением замененной кнопки включения соответствующим флагом.

+

Панель "Коррекция"

+

Рисунок 11 - Панель "Коррекция"

+

3.3.3.7 Панель "Карта высот"

+

Панель "Карта высот" (рисунок 12) отвечает за создание, загрузку, снятие карты неровности поверхности и дальнейшую коррекцию УП для нивелирования кривизны детали, обрабатываемой с помощью ЧПУ. Данная функция полезна при фрезеровке печатных плат и гравировке.

+

Панель "Карта высот"

+

Рисунок 12 - Панель "Карта высот"

+

На панели имеются элементы создания, загрузки и включения режима работы с картой высот; задания границ прямоугольной зоны карты; установки количества точек зондирования по осям X и Y; установки рабочей высоты над поверхностью и глубины зондирования; установки скорости подачи; установки количества линий сетки разбиения УП по осям X и Y.

+

Коррекция УП по активной карте высот производится включением флага "Использовать карту высот".

+

Более подробная информация об использовании карты высот приведена в п. 3.7 "Создание карты высот" данного руководства.

+

3.3.3.8 Панель "Пользовательские команды"

+

Для расширения функционала программы в части управления ЧПУ предусмотрена панель "Пользовательские команды" (рисунок 13). На панели расположены кнопки, по нажатию на которые в контроллер ЧПУ отправляются заранее определенные команды.

+

Панель "Пользовательские команды"

+

Рисунок 13 - Панель "Пользовательские команды"

+

Задание команд осуществляется в окне "Настройки" программы. В группе "Пользовательские команды" окна имеется таблица команд. В таблице имеется возможность добавить, удалить или переместить команду, а также задать атрибуты:

+
    +
  • Текстовую подсказку, отображаемую над кнопкой панели при наведении на нее курсора мыши.
  • +
  • Значок кнопки.
  • +
  • Список G-код команд, отправляемых в контроллер ЧПУ при нажатии на соответствующую кнопку панели.
  • +
+

Программа содержит ограниченный набор значков для кнопок, набор может расширяться пользовательскими значками, для чего необходимо поместить файлы необходимых значков в каталог "plugins/usercommands/images" папки установки программы.

+

Список команд, отправляемых в ЧПУ, может иметь одну G-код команду или набор команд, по одной в каждой строке поля в ячейке "G-код" таблицы.

+

В G-код командах можно использовать вставки программного кода на языке программирования JavaScript, оформляемые внутри фигурных скобок, например:

+
    +
  • Команда обнуления рабочей координаты X и запоминания смещения в переменной "storedG92x"
  • +
+
G92X0 +{var storedG92x = vars.G92x} +
+
    +
  • Восстановление смещения координаты X после сброса контроллера ЧПУ
  • +
+
G92X{vars.Mx - storedG92x - vars.x} +
+
    +
  • Запуск программы "Блокнот"
  • +
+
{script.importExtension("qt.core")} +{var p = new QProcess()} +{p.start("notepad", [])} +
+

Подробнее об использовании языка программирования JavaScript в программе читайте в п. 5 "Разработка расширений" данного руководства

+

3.4 Окно настроек

+

Настройки программы доступны в окне настроек (рисунок 14), вызываемое по активации пункта "Настройки" меню "Сервис" программы.

+

Окно настроек

+

Рисунок 14 - Окно настроек

+

Окно содержит три области: область слева - список групп настроек; область справа - элементы управления настройками выбранной группы; область снизу - кнопка установки настроек в значения по-умолчанию, кнопки подтверждения и отмены изменений настроек.

+

Ниже приведена информация о доступных настройках программы: группа, параметр, описание, допустимые значения, значение по-умолчанию.

+

Таблица 4 - Настройки программы

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ГруппаПараметрОписаниеДопустимые значенияЗначение по-умолчанию
СоединениеПортПоследовательный порт соединения с контроллером ЧПУПуть к устройствуПусто
СкоростьСкорость обмена по последовательному порту9600, 14400, 19200, 38400, 57600, 115200, произвольное число115200
Период опросаВремя между запросами состояния контроллераот 10 до 9999 мс100
Информация о станкеСкорость шпинделя мин.Минимальная скорость вращения шпинделя (используется панелью "Шпиндель")от 0 до 99999 об/мин0
Скорость шпинделя макс.Максимальная скорость вращения шпинделяот 0 до 99999 об/мин10000
Мощность лазера мин.Минимальная мощность лазера (используется при полутоновом окрашивании растровой визуализации УП)от 0 до 999990
Мощность лазера макс.Максимальная мощность лазераот 0 до 99999100
ПарсерРазмер сегментов, аппроксимирующих дуги - по длинеДлина отрезков, разбивающих дуги УП, при отображении в окне "Визуализатор" и работе карты высотот 0.1 до 99 мм0.1 (выключено)
Размер сегментов, аппроксимирующих дуги - по углуУгол разбития дуг УП, при отображении в окне "Визуализатор" и работе карты высотот 0 до 180 градусов5 градусов (включено)
Отправка файлаКоманды начала программыG-код команды, отправляемые в контроллер ЧПУ перед передачей УПНабор G-код команд (допустимо использование JavaScript)Пусто
Команды конца программыG-код команды, отправляемые в контроллер ЧПУ после передачи УПНабор G-код команд (допустимо использование JavaScript)Пусто
Команды смены инструментаG-код команды, отправляемые в контроллер ЧПУ при обработке команд смены инструментаНабор G-код команд (допустимо использование JavaScript)Пусто
Игнорировать ошибки при отправке файлаФлаг, управляющий остановкой передачи УП при возникновении ошибок обработки команд контроллеромВключено, выключеноВыключено
Автоматически настраивать парсер перед отправкой с выбранной строкиВключение отправки команд настройки интерпретатора перед отправкой УП с выбранной строкиВключено, выключеноВключено
Приостанавливать передачу файла по командам смены инструментаУправление приостановкой передачи УП при обработке команд смены инструментаВключено, выключеноВключено
ВизуализаторТолщина линийТолщина линий 3D проекции УПот 1 до 91.5
СглаживаниеУправление сглаживанием линий 3D проекции УПВключено, выключеноВключено
MSAAСглаживание линий 3D проекции УП методом MSAAВключено, выключеноВключено
Частота кадровЧастота кадров построения 3D проекции УП30, 60, 120, произвольное число60
V-syncУправление вертикальной синхронизациейВключено, выключеноВыключено
Буфер глубиныУправление перекрытием линий в зависимости от удаленности при построении 3D проекции УПВключено, выключеноВыключено
Режим отрисовкиМетод построения проекции УП, "Векторный" - в виде отрезков линий, "Растр" - в виде набора точекВекторный, растрВекторный
Упростить геометриюОграничение минимального размера сегмента УП при отрисовке проекции УПВключено, выключеноВключено
Упростить геометрию - ТочностьМинимальный размер сегмента УП (при нуле преобразуются только сегменты, лежащие на одной линии)от 0 до 99 мм0
Полутоновое окрашиваниеУправляет функцией окрашивания точек при растровом построении проекцииВключено, выключеноВыключено
Полутоновое окрашивание - По 'S'-кодуУправляет функцией окрашивания точек по "S"-коду УПВключено, выключеноВключено
Полутоновое окрашивание - По 'Z'-кодуУправляет функцией окрашивания точек по "Z"-коду УПВключено, выключеноВыключено
ЦветаВизуализатор - ФонЗадает цвет фона в окне "Визуализатор"Произвольный цветБелый
Визуализатор - ТекстЗадает цвет текста в окне "Визуализатор"Произвольный цветЧерный
Визуализатор - ФрезаЗадает цвет модели инструмента в окне "Визуализатор"Произвольный цветОранжевый
Траектория - ОсновнойЗадает цвет рабочих ходов траектории в проекции УППроизвольный цветЧерный
Траектория - ВыполненнаяЗадает цвет частей траектории, обработанных ЧПУ при передаче УП в контроллерПроизвольный цветСерый
Траектория - ПодсветкаЗадает цвет частей траектории, отправленных в ЧПУ, цвет маркера выбранной строки УППроизвольный цветФиолетовый
Траектория - Z-перемещенияЗадает цвет вертикальных перемещений траекторииПроизвольный цветКрасный
Траектория - НачалоЗадает цвет маркера начала УППроизвольный цветКрасный
Траектория - КонецЗадает цвет маркера конца УППроизвольный цветЗеленый
Модель фрезыТипВид модели инструмента в окне "Визуализатор"Плоская, коническаяКоническая
УголУгол конуса конической модели инструментаот 0 до 180 градусов15
ДиаметрДиаметр модели инструментаот 0 до 99 мм3
ДлинаДлина модели инструментаот 0 до 999 мм30
Быстрые клавиши-Комбинации клавиш для быстрого вызова функций программыПроизвольные комбинации клавишПусто
КонсольОтображать команды G-code программыУправляет отображением G-код команд УП в окне "Консоль" во время передачи УП в контроллерВключено, выключеноВыключено
Отображать команды интерфейса пользователяУправляет отображением G-код команд, отправляемых с помощью элементов инструментальных панелейВключено, выключеноВключено
Автозавершение командыАвтоматическое завершение команды при вводе в поле окна "Консоль" на основе введенных преждеВключено, выключеноВключено
Пользовательский интерфейсРазмер шрифтаРазмер шрифта пользовательского интерфейса программы8, 9, 10, 11, 12 пт или произвольное число9
Язык интерфейсаЯзык надписей пользовательского интерфейса программыAmerican English, русский (список может пополняться)American English
КамераНаименованиеНаименование камеры, изображение которой выводится в окне "Камера"Список доступных камер, произвольное наименованиеПусто
РазрешениеРазрешение изображения, выводимого с камерыСписок поддерживаемых разрешений, произвольное разрешение1280x720
ПозицияСмещение изображения камеры в окне "Камера" по горизонтали и вертикалиПроизвольное смещение в точках0, 0
МасштабКоэффициент масштабирования изображения камерыПроизвольное число1
Позиция перекрестьяОтносительное смещение прицельных элементов по горизонтали и вертикалиПроизвольное смещение в относительных единицах от 0 до 10, 0
Размер перекрестьяДиаметр прицельной окружностиот 1 до 10020
Цвет перекрестьяЦвет прицельных элементовПроизвольный цветКрасный
Толщина линииТолщина линий прицельных элементовот 0 до 1001
Пользовательские команды-Таблица команд панели "Пользовательские команды"Произвольный набор командТестовые команды
+

3.5 Подготовка программы к работе

+

3.6 Загрузка управляющей программы

+

3.7 Создание карты высот

+

3.8 Выполнение управляющей программы

+

4 Сообщения оператору

+

5 Разработка расширений

+

Для добавления новых функций в программу, в т.ч. новых элементов пользовательского интерфейса, предусмотрен механизм расширений.

+

Каждое расширение должно быть оформлено в виде папки, содержащей набор файлов:

+
    +
  • Файл конфигурации "config.ini" - текстовый файл с описанием расширения.
  • +
  • Файл скрипта "script.js" - код расширения.
  • +
  • Вспомогательные файлы (файлы форм "*.ui", настройки расширения, файлы переводов, изображения и т.д.)
  • +
+

Папка расширения должна храниться в каталоге "plugins" папки установки программы.

+

В программе предустановлены три расширения: "camera", "coordinatessytem" и "usercommands" отвечающие за функционал панелей "Камера", "Система координат", "Пользовательские команды" соответственно.

+

Набор расширений программы может со временем пополняться.

+

5.1 Файл конфигурации расширения

+

Файл конфигурации должен содержать два текстовых ключа в группе "General":

+
    +
  • "title" - заголовок окна и/или панели расширения.
  • +
  • "name" - уникальное наименование расширения, записанное без пробелов.
  • +
+

Пример файла конфигурации расширения "Система координат":

+
[General] +title="Coordinate system" +name="CoordinateSystemPlugin" +
+

5.2 Файл скрипта

+

Код расширения должен быть выполнен на языке программирования "JavaScript" и реализовывать функционал расширения.

+

Расширение может предоставлять пользовательский интерфейс панели для окон "Устройство", "Модификация", "Пользователь", отдельного окна в главном окне программы, интерфейс для окна настроек, так и не иметь его.

+

При необходимости настройки расширения при запуске программы и/или создания элементов пользовательского интерфейса код расширения может содержать следующие функции:

+

Таблица 5 - Функции скрипта

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ФункцияАргументыВозвращаемое значениеОписание
init--Функция инициализации расширения
createPanelWidget-Объект типа "QWidget"Функция создания пользовательского интерфейса панели
createWindowWidget-Объект типа "QWidget"Функция создания пользовательского интерфейса для главного окна программы
createSettingsWidget-Объект типа "QWidget"Функция создания пользовательского интерфейса для окна настроек программы
+

Вызов данных функций производится главной программой при загрузке расширения в порядке их перечисления в таблице.

+

В коде скрипта доступны глобальные объекты связи с главной программой, их описание приведено в таблице 6.

+

Таблица 6 - Объекты скрипта

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ОбъектСвойствоТип свойстваАргументыВозвращаемое значениеОписание
appsendCommandФункцияКоманда, индекс команды-Отправка команды в контроллер ЧПУ, может иметь индекс - отрицательное число меньшее -99
sendCommandsФункцияКоманды, индекс команд-Отправка списка команд в виде строки с разделителем '\n' в контроллер ЧПУ
addActionФункцияДействие-Добавление в программу действия - объекта типа "QAction", для которого могут быть назначены быстрые клавиши
removeActionФункцияДействие-Удаление из программы действия
buttonSizeФункция-РазмерВозвращает стандартный размер кнопок для панелей программы
responseReceivedСигналКоманда, индекс, ответ-Сигнал приема ответа от контроллера ЧПУ на ранее отправленную команду
statusReceivedСигналСтатус-Сигнал приема статуса контроллера, содержит строку ответа контроллера на команду "?"
senderStateChangedСигналСостояние-Сигнал смены состояния передачи УП в контроллер ЧПУ, описание состояний приведено в таблице 7
deviceStateChangedСигналСостояние-Сигнал смены состояния контроллера ЧПУ, описание состояний приведено в таблице 8
settingsAboutToLoadСигнал--Сигнал, генерируемый перед загрузкой настроек программы
settingsLoadedСигнал--Сигнал, генерируемый после загрузки настроек программы
settingsAboutToSaveСигнал--Сигнал, генерируемый перед записью настроек программы
settingsSavedСигнал--Сигнал, генерируемый после записи настроек программы
settingsAboutToShowСигнал--Сигнал, генерируемый перед вызовом окна настроек программы
settingsAcceptedСигнал--Сигнал, генерируемый при подтверждении изменений настроек программы
settingsRejectedСигнал--Сигнал, генерируемый при отмене изменений настроек программы
settingsSetByDefaultСигнал--Сигнал, генерируемый при установке настроек программы в значения по-умолчанию
pluginsLoadedСигнал--Сигнал, генерируемый после загрузки всех расширений программы
settingsОбъект--Объект настроек программы
app.settingsportЗначение--Параметр "Соединение - Порт" настроек программы
baudЗначение--Параметр "Соединение - Скорость"
queryStateTimeЗначение--Параметр "Соединение - Период опроса"
spindleSpeedMinЗначение--Параметр "Информация о станке - Скорость шпинделя мин."
spindleSpeedMaxЗначение--Параметр "Информация о станке - Скорость шпинделя макс."
laserPowerMinЗначение--Параметр "Информация о станке - Мощность лазера мин."
laserPowerMaxЗначение--Параметр "Информация о станке - Мощность лазера макс."
arcLengthЗначение--Параметр "Размер сегментов, аппроксимирующих дуги - по длине"
arcDegreeЗначение--Параметр "Размер сегментов, аппроксимирующих дуги - по углу"
arcDegreeModeЗначение--Включение/выключение режима "Размер сегментов, аппроксимирующих дуги - по углу"
startCommandsЗначение--Параметр "Отправка файла - Команды начала программы"
endCommandsЗначение--Параметр "Отправка файла - Команды конца программы"
toolChangeCommandsЗначение--Параметр "Отправка файла - Команды смены инструмента"
ignoreErrorsЗначение--Параметр "Отправка файла - Игнорировать ошибки при отправке файла"
autoLineЗначение--Параметр "Отправка файла - Автоматически настраивать парсер перед отправкой с выбранной строки"
pauseToolChangeЗначение--Параметр "Отправка файла - Приостанавливать передачу файла по командам смены инструмента"
lineWidthЗначение--Параметр "Визуализатор - Толщина линий"
antialiasingЗначение--Параметр "Визуализатор - Сглаживание"
msaaЗначение--Параметр "Визуализатор - MSAA"
fpsЗначение--Параметр "Визуализатор - Частота кадров"
vsyncЗначение--Параметр "Визуализатор - V-sync"
zBufferЗначение--Параметр "Визуализатор - Буфер глубины"
drawModeVectorsЗначение--Параметр "Визуализатор - Режим отрисовки" (0 - растр, 1 - векторный)
simplifyЗначение--Параметр "Визуализатор - Упростить геометрию"
simplifyPrecisionЗначение--Параметр "Визуализатор - Упростить геометрию - Точность"
grayscaleSegmentsЗначение--Параметр "Визуализатор - Полутоновое окрашивание"
grayscaleSCodeЗначение--Параметр "Визуализатор - Полутоновое окрашивание - По 'S'-коду"
toolTypeЗначение--Параметр "Модель фрезы - Тип" (0 - плоская, 1 - коническая)
toolAngleЗначение--Параметр "Модель фрезы - Угол"
toolDiameterЗначение--Параметр "Модель фрезы - Диаметр"
toolLengthЗначение--Параметр "Модель фрезы - Длина"
showProgramCommandsЗначение--Параметр "Консоль - Отображать команды G-code программы"
showUICommandsЗначение--Параметр "Консоль - Отображать команды интерфейса пользователя"
autoCompletionЗначение--Параметр "Консоль - Автозавершение команды"
fontSizeЗначение--Параметр "Пользовательский интерфейс - Размер шрифта"
languageЗначение--Параметр "Пользовательский интерфейс - Язык интерфейса" (ISO 639-1)
varsMxЗначение--Текущая машинная координата X
MyЗначение--Текущая машинная координата Y
MzЗначение--Текущая машинная координата Z
WxЗначение--Текущая рабочая координата X
WyЗначение--Текущая рабочая координата Y
WzЗначение--Текущая рабочая координата Z
G54xЗначение--Смещение координаты X системы координат G54
G54yЗначение--Смещение координаты Y системы координат G54
G54zЗначение--Смещение координаты Z системы координат G54
...............
G59xЗначение--Смещение координаты X системы координат G59
G59yЗначение--Смещение координаты Y системы координат G59
G59zЗначение--Смещение координаты Z системы координат G59
CSЗначение--Текущая система координат - строка "G54" ... "G59"
xЗначение--Смещение координаты X текущей системы координат
yЗначение--Смещение координаты Y текущей системы координат
zЗначение--Смещение координаты Z текущей системы координат
G92xЗначение--Смещение рабочей координаты X
G92yЗначение--Смещение рабочей координаты Y
G92zЗначение--Смещение рабочей координаты Z
G28xЗначение--Сохраненная координата X команды G28
G28yЗначение--Сохраненная координата Y команды G28
G28zЗначение--Сохраненная координата Z команды G28
G30xЗначение--Сохраненная координата X команды G30
G30yЗначение--Сохраненная координата Y команды G30
G30zЗначение--Сохраненная координата Z команды G30
TLOxЗначение--Смещение инструмента по координате X
TLOyЗначение--Смещение инструмента по координате Y
TLOzЗначение--Смещение инструмента по координате Z
PRBxЗначение--Координата X касания при зондировании
PRByЗначение--Координата Y касания при зондировании
PRBzЗначение--Координата Z касания при зондировании
toolЗначение--Номер текущего инструмента
scriptimportExtensionФункцияНаименование расширения-Подключение расширения JavaScript скрипта, список доступных расширений приведен в таблице 9
+

Таблица 7 - Состояния передачи УП

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
СостояниеОписание
-1Неизвестное состояние
0Передача УП
1Переход в состояние приостановки передачи
2Приостановка передачи
3Окончание передачи, все команды УП отправлены
4Передача завершена, все команды УП обработаны контроллером ЧПУ
5Ручная смена инструмента
+

Таблица 8 - Состояния контроллера ЧПУ

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
СостояниеОписание
-1Неизвестное состояние
1Готовность к приему команд
2Тревога
3Работа
4Поиск домашнего положения
5Переход в режим "Удерживание" завершен
6Переход в режим "Удерживание"
8Режим проверки УП
9Дверь закрыта, готовность к возобновлению работы
10Дверь открыта, ЧПУ остановлен
11Дверь открыта, производится приостановка или парковка
12Дверь закрыта, производится возобновление работы или возврат из парковки
13Состояние перемещения
14Режим сна
+

Таблица 9 - Расширения скрипта

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Наименование расширенияОписание
qt.coreНабор базовых объектов Qt
qt.customНабор дополнительных элементов управления пользовательского интерфейса, описание в таблице 10
qt.guiНабор объектов пользовательского интерфейса Qt
qt.multimediaНабор мультимедийных объектов Qt
qt.networkНабор объектов Qt поддержки сети
qt.openglНабор объектов Qt поддержки спецификации OpenGL
qt.printsupportНабор объектов Qt поддержки печати
qt.sqlНабор объектов Qt поддержки баз данных
qt.uitoolsНабор объектов Qt для динамического создания пользовательского интерфейса
qt.xmlНабор объектов Qt поддержки языка разметки "XML"
qt.widgetsНабор элементов управления пользовательского интерфейса Qt
+

Таблица 10 - Дополнительные элементы управления пользовательского интерфейса

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Тип объектаБазовый типНазначениеСвойствоТип свойстваАргументыВозвращаемое значениеОписание
ColorPickerQWidgetВыбор цветаcolorIntЗначение--32-разрядный код цвета в формате AARRGGBB
colorSelectedСигналЦвет-Сигнал, генерируемый при выборе цвета пользователем
SliderQSliderПолзунок с представлением текущего значения параметраcurrentValueЗначение--Текущее значение параметра
SliderBoxQWidgetПолзунок с полем ввода значения и флагом включенияvalueЗначение--Уставка параметра
currentValueЗначение--Текущее значение параметра
minimumЗначение--Минимальное значение параметра
maximumЗначение--Максимальное значение параметра
sliderPositionЗначение--Позиция ползунка
ratioЗначение--Отношение значения в поле ввода к положению ползунка
titleЗначение--Наименование параметра
suffixЗначение--Единицы измерения параметра
isCheckableЗначение--Отображение флага включения
isCheckedЗначение--Включение/выключение флага
valueUserChangedСигнал--Сигнал, генерируемый при изменении значения параметра пользователем
valueChangedСигнал--Сигнал, генерируемый при изменении значения параметра
toggledСигналСостояние-Сигнал, генерируемый при смене состояния флага включения параметра
clickФункция--Программное переключение флага
StyledToolButtonQToolButtonКнопка инструментальной панелиbackgroundColorЗначение--Цвет фона кнопки, тип QColor
foregroundColorЗначение--Цвет надписи на кнопке
highlightColorЗначение--Цвет подсветки границ кнопки
+

5.3 Файл перевода

+

Каждое расширение может иметь файл перевода надписей. Формат имени файла следующий:

+

translation_xx.qm,

+где xx - двухбуквенный код языка перевода. +

Скомпилированные файлы перевода "*.qm" создаются из текстовых "*.ts" с помощью программы "Qt Linguist" или консольной команды "lrelease", входящих в пакет установки фреймворка "Qt".

+

Подробнее о создании файлов переводов читайте в документации по фреймворку "Qt": Qt Linguist Manual.

+

Приложение А. Настройки контроллера

+

Приложение Б. Таблица G-код команд

+ + + + + \ No newline at end of file diff --git a/doc/help_ru.md b/doc/help_ru.md new file mode 100644 index 00000000..43ab9592 --- /dev/null +++ b/doc/help_ru.md @@ -0,0 +1,780 @@ + + +# Программа "Candle" + + +# Содержание + +[1 Назначение программы](#1-naznachenie-programmy) +[2 Условия выполнения программы](#2-usloviya-vypolneniya-programmy) +    [2.1 Требования к аппаратному обеспечению](#2-1-trebovaniya-k-apparatnomu-obespecheniyu) +    [2.2 Требования к программному обеспечению](#2-2-trebovaniya-k-programmnomu-obespecheniyu) +[3 Выполнение программы](#3-vypolnenie-programmy) +    [3.1 Установка программы](#3-1-ustanovka-programmy) +    [3.2 Запуск](#3-2-zapusk) +    [3.3 Главное окно](#3-3-glavnoe-okno) +        [3.3.1 Главное меню](#3-3-1-glavnoe-menyu) +        [3.3.2 Окна](#3-3-2-okna) +            [3.3.2.1 Окно "G-код программа"](#3-3-2-1-okno-g-kod-programma) +            [3.3.2.1 Окно "Визуализатор"](#3-3-2-2-okno-vizualizator) +            [3.3.2.3 Окно "Камера"](#3-3-2-3-okno-kamera) +            [3.3.2.4 Окно "Консоль"](#3-3-2-4-okno-konsol) +            [3.3.2.5 Окна "Устройство", "Модификация", "Пользователь"](#3-3-2-5-okna-ustroystvo-modifikaciya-polzovatel) +        [3.3.3 Инструментальные панели](#3-3-3-instrumentalnye-paneli) +            [3.3.3.1 Панель "Состояние"](#3-3-3-1-panel-sostoyanie) +            [3.3.3.2 Панель "Управление"](#3-3-3-2-panel-upravlenie) +            [3.3.3.3 Панель "Система координат"](#3-3-3-3-panel-sistema-koordinat) +            [3.3.3.4 Панель "Шпиндель"](#3-3-3-4-panel-shpindel) +            [3.3.3.5 Панель "Перемещение"](#3-3-3-5-panel-peremeshchenie) +            [3.3.3.6 Панель "Коррекция"](#3-3-3-6-panel-korrekciya) +            [3.3.3.7 Панель "Карта высот"](#3-3-3-7-panel-karta-vysot) +            [3.3.3.8 Панель "Пользовательские команды"](#3-3-3-8-panel-polzovatelskie-komandy) +    [3.4 Окно настроек](#3-4-okno-nastroek) +    [3.5 Подготовка программы к работе](#3-5-podgotovka-programmy-k-rabote) +    [3.6 Загрузка управляющей программы](#3-6-zagruzka-upravlyayushchey-programmy) +    [3.7 Создание карты высот](#3-7-sozdanie-karty-vysot) +    [3.8 Выполнение управляющей программы](#3-8-vypolnenie-upravlyayushchey-programmy) +[4 Сообщения оператору](#4-soobshcheniya-operatoru) +[5 Разработка расширений](#5-razrabotka-rasshireniy) +    [5.1 Файл конфигурации расширения](#5-1-fayl-konfiguracii-rasshireniya) +    [5.2 Файл скрипта](#5-2-fayl-skripta) +    [5.3 Файл перевода](#5-3-fayl-perevoda) +[Приложение А. Настройки контроллера](#prilozhenie-a-nastroyki-kontrollera) +[Приложение Б. Таблица G-код команд](#prilozhenie-b-tablica-g-kod-komand) + +---- + +# 1 Назначение программы + +Программа "Candle" (далее - программа) предназначена для управления станками с числовым программным управлением (далее - ЧПУ), имеющими контроллер "GRBL" (далее - контроллер), с помощью ПЭВМ. + +Программа позволяет работать с фрезерными 3-ех осевыми станками, лазерными плоттерами. + +Основные функции программы: + +- Загрузка, редактирование, сохранение управляющих программ (далее - УП). +- Визуализация УП. +- Снятие карты неровности поверхности, коррекция УП в соответствии с заданной картой. +- Передача УП на ЧПУ. +- Отображение состояния ЧПУ. +- Ручное управление ЧПУ. + +# 2 Условия выполнения программы + +## 2.1 Требования к аппаратному обеспечению + +Для корректной работы программы необходима ПЭВМ со следующими характеристиками: + +- процессор, поддерживающий набор инструкций SSE2, +- графический адаптер, поддерживающий спецификацию OpenGL версии 2.0 и выше, +- дисплей с разрешением 1280х720, +- свободный порт USB или RS-232 для подключения ПЭВМ к контроллеру ЧПУ, +- свободное место на запоминающем устройстве не менее 20 Мб. + +## 2.2 Требования к программному обеспечению + +Программа требует наличия на ПЭВМ операционной системы Windows 7 и выше, с установленным драйвером OpenGL, драйвером преобразователя USB-UART при подключении ЧПУ через порт USB. + +# 3 Выполнение программы + +## 3.1 Установка программы + +Программа поставляется в виде архива "candle_v.v.v_x86.zip" для 32-разрядных процессоров и "candle_v.v.v_x64.zip" для 64-разрядных, где v.v.v - номер версии программы. + +Для установки необходимо распаковать архив в рабочую папку, например: "D:\". В папке будет создан каталог программы "Candle" со всеми необходимыми для работы файлами. + +После распаковки, для обеспечения дальнейшего быстрого запуска, нужно создать ярлык к исполняемому файлу "D:\Candle\candle.exe". + +## 3.2 Запуск + +Запуск программы осуществляется по вызову файла "candle.exe" из папки установки или с помощью созданного ранее ярлыка. + +## 3.3 Главное окно + +При запуске программы на дисплее должно отобразиться главное окно программы, представленное на рисунке 1. + +![Главное окно программы](images/mainwindow.png#center) +

Рисунок 1 - Главное окно программы

+ +Главное окно состоит из главного меню, расположенного сверху, набора окон и инструментальных панелей: + +- "G-код программа" - основное окно, отображает список команд текущей УП. +- "Визуализатор" - графическое представление УП. +- "Камера" - изображение с камеры. +- "Консоль" - окно передачи команд в контроллер "GRBL" ЧПУ и отображения ответов. +- "Устройство" - окно с набором панелей для управления ЧПУ. +- "Модификация" - окно с набором панелей для коррекции УП. +- "Пользователь" - окно с набором пользовательских панелей. + +Каждое окно имеет область заголовка и область содержимого. В заголовке расположено название окна, кнопки "Отделить", "Закрыть", в области содержимого - элементы ввода и отображения информации, а также инструментальные панели. + +Все окна, за исключением окна "G-код программа", могут быть перемещены перетаскиванием с нажатой левой кнопки мыши (далее - ЛКМ) на заголовке окна. В процессе перемещения конфигурация главного окна программы будет динамически изменяться, указывая будущее расположение перемещаемого окна. + +Окна могут быть отделены от главного окна нажатием на кнопку "Отделить" заголовка, закрыты - "Закрыть". Отделенные окна могут быть возвращены в главное окно перетаскиванием за заголовок, закрытые - выбором соответствующего пункта в главном меню "Вид - Окна". + +Размеры окон изменяются нажатием ЛКМ на границу окна и ее перетаскиванием в нужную сторону. + +### 3.3.1 Главное меню + +Главное меню программы предоставляет доступ к основным функциям программы. Меню разделено на группы и пункты, описание которых приведено в таблице 1. + +Таблица 1 - Главное меню программы + +| Группа | Пункт | Описание | +|------------|----------------------|------------------------------------------| +| Файл | Новый | Создание новой УП | +| | Открыть | Загрузка файла УП | +| | Недавние файлы | Загрузка одного из последних файлов УП | +| | Сохранить | Запись изменений УП в файл | +| | Сохранить как | Запись УП в указанный файл | +| Вид | Окна | Выбор отображаемых окон | +| | Панели | Выбор отображаемых панелей | +| | Зафиксировать окна | Запрет/разрешение перемещения окон | +| | Зафиксировать панели | Запрет/разрешение перемещения панелей | +| Сервис | Настройки | Вызов окна настроек программы | +| Справка | Содержание | Запуск справочной системы программы | +| | О программе | Вызов окна с информацией о программе | + +### 3.3.2 Окна + +#### 3.3.2.1 Окно "G-код программа" + +Текущая УП отображается в окне "G-код программа", представленном на рисунке 2. + +![Окно "G-код программа"](images/g-codeprogram.png#center) +

Рисунок 2 - Окно "G-код программа"

+ +Каждая строка УП соответствует строке в таблице, содержащей столбцы: + +- "№" - номер строки УП. +- "Команда" - команда УП. +- "Состояние" - текущее состояние команды ("В очереди", "Отправлена", "Обработана", "Пропущена"). +- "Ответ" - ответ контроллера на отправленную команду. + +УП может быть отредактирована, поддерживаются следующие функции: + +- Изменение команды в выбранной строке. +- Добавления новых строк УП. +- Удаление строк УП. + +Вход в режим редактирования команды УП выполняется двойным нажатием ЛКМ в столбце "Команда" выбранной строки или нажатием клавиши \ в предварительно выбранной ячейке. Подтверждение ввода измененной команды осуществляется нажатием клавиши \ или \, отмена - нажатием клавиши \. + +Для добавления строки - необходимо выбрать в таблице строку, перед которой вставляется новая строка, и активировать пункт "Вставить строку" контекстного меню, вызываемого нажатием правой кнопки мыши (далее - ПКМ) в области таблицы, или нажать на клавишу \ клавиатуры. + +Удаление выделенных строк таблицы производится вызовом пункта "Удалить строки" контекстного меню таблицы или нажатием на клавишу \ клавиатуры. + +Под таблицей расположены кнопки управления загрузкой и отправкой УП в контроллер ЧПУ: + +- "Открыть" - вызывает диалог выбора файла УП, в случае подтверждения выбора - загружает УП. +- "Сброс" - снимает выделение в таблице, устанавливает первую строку УП текущей, сбрасывает состояние команд. +- "Отправить" - запускает процесс передачи УП в контроллер ЧПУ. +- "Пауза" - приостанавливает процесс передачи УП. +- "Прервать" - останавливает передачу УП. + +Следует учитывать, что при активации команд "Пауза" и "Остановить" фактическая остановка ЧПУ выполняется только по опустошению входного буфера команд контроллера. Для немедленной остановки ЧПУ необходимо использовать команды панели "Управление": "Удержание", "Сброс". + +Слева от кнопок расположен флаг, отвечающий за автоматическую прокрутку таблицы в процессе отправки УП. При активной передаче УП в контроллер и ручной прокрутке таблицы флаг сбрасывается. + +#### 3.3.2.2 Окно "Визуализатор" + +Графическое представление УП отображается в окне "Визуализатор" (рисунок 3). + +![Окно "Визуализатор"](images/visualizer.png#center) +

Рисунок 3 - Окно "Визуализатор"

+ +В окне можно выделить пять функциональных областей: + +- Центральная или основная область, в которой выводится траектория инструмента УП в виде трехмерной (3D) проекции. +- Состояние контроллера ЧПУ в левом верхнем углу. +- Кнопки управления видом в правом верхнем углу. +- Информация о границах обработки УП в левом нижнем углу. +- Вспомогательная информация, выводимая в правом нижнем углу. + +Траектория инструмента УП представлена набором отрезков линий: + +- Сплошными черными отрезками выделены части траектории линейной и круговой интерполяции УП. +- Пунктирными черными - ускоренные движения. +- Красным цветом - вертикальные перемещения. + +При передаче УП в контроллер ЧПУ часть отрезков меняет цвет в зависимости от следующих условий: часть траектории, обработанная ЧПУ, выделяется серым цветом; часть траектории, отправленная в ЧПУ - фиолетовым. + +На траекторию УП нанесены три маркера-круга: + +- Красный маркер - начало траектории. +- Зеленый маркер - конец траектории. +- Фиолетовый - отрезок траектории, соответствующий выделенной команде в таблице окна "G-код программа". + +В основной области, также, отображается начало координат в виде прямоугольника красного цвета в плоскости X-Y, и осей: X - красного цвета, Y - зеленого, Z - синего. Здесь же выводится условное отображение инструмента в виде каркасной модели из линий оранжевого цвета. + +Навигация в основной области выполняется следующим образом: + +- Поворот 3D проекции осуществляется нажатием ЛКМ в основной области и перемещением курсора мыши в заданном направлении или нажатием на одну из кнопок управления видом в правом верхнем углу окна ("Вид сверху", "Вид спереди", "Вид слева", "Изометрия"). +- Перемещении проекции в области осуществляется нажатием ЛКМ с удерживанием клавиши \ клавиатуры и перемещением курсора мыши в заданном направлении. +- Масштаб проекции изменяется с помощью колеса прокрутки мыши или нажатием на кнопку "Вписать" в правом верхнем углу. + +В левом верхнем углу окна расположена информация о текущем состоянии контроллера ЧПУ, а именно: строка состояния интерпретатора; текущие значения подачи и скорости вращения шпинделя; состояние компонентов ЧПУ (шпинделя, системы охлаждения). + +Строка состояния имеет следующий вид: + +

[GC:G1 G54 G17 G21 G90 G94 M3 M9 T0 F75 S8000]

+ +В строке выводится текущий режим работы интерпретатора контроллера ЧПУ для 12 модальных групп, номер инструмента, скорость подачи и скорость вращения шпинделя. Группы и возможные режимы приведены в таблице 2. + +Таблица 2 - Режимы работы интерпретатора контроллера ЧПУ + +| Модальная группа | Режимы | +|-----------------------------------------|:------------------------------------------------| +| Режим движения | G0, G1, G2, G3, G38.2, G38.3, G38.4, G38.5, G80 | +| Система координат | G54, G55, G56, G57, G58, G59 | +| Рабочая плоскость | G17, G18, G19 | +| Режим задания дистанции перемещения | G90, G91 | +| Режим IJK задания круговой интерполяции | G91.1 | +| Режим подачи | G93, G94 | +| Единицы измерения | G20, G21 | +| Режим компенсации радиуса инструмента | G40 | +| Режим компенсации длины инструмента | G43.1, G49 | +| Режим управления ходом программы | M0, M1, M2, M30 | +| Состояние шпинделя | M3, M4, M5 | +| Состояние системы охлаждения | M7, M8, M9 | + +Строка состояния компонентов ЧПУ имеет вид: + +

СУ: SFM

+ +Символ "S" отвечает за состояние шпинделя, выводится при вращении шпинделя в направлении часовой стрелки, заменяется на символ "C" при вращении шпинделя против часовой стрелки и не выводится при остановке шпинделя. Символ "F" отображается при включенной системе водяного охлаждения, "M" - системе воздушного охлаждения. + +Границы обработки УП приведены в левом нижнем углу, здесь указаны минимальные и максимальные координаты для каждой из осей и габариты зоны обработки (без учета диаметра инструмента). + +В правом нижнем углу выводится информация о текущем времени работы ЧПУ под управлением загруженной УП и ориентировочное полное время работы по УП. + +Информация об очереди команд, отправляемых в контроллер ЧПУ представлена в строке ниже и включает в себя: общий размер команд, отправленных и обрабатываемых в данный момент контроллером ЧПУ; количество обрабатываемых команд; количество инжектированных команд (команд отправляемых помимо команд УП) в очереди. + +В этой же области имеется вспомогательная информация об общем количестве вершин, составляющих 3D проекцию, и значение количества кадров в секунду построения проекции. + +#### 3.3.2.3 Окно "Камера" + +Изображение с подключенной к ПЭВМ камеры выводится в окне "Камера" (рисунок 4). + +![Окно "Камера"](images/camera.png#center) +

Рисунок 4 - Окно "Камера"

+ +Перемещение вида в окне производится с нажатой ЛКМ смещением курсора мыши в заданном направлении, изменение масштаба - колесом прокрутки мыши. + +В окне имеются прицельные элементы: вертикальная, горизонтальная линии и окружность с центром в точке пересечения линий. Перемещение точки пересечения линий производится нажатием ЛКМ с удерживанием клавиши \ клавиатуры и перемещением курсора мыши в заданном направлении. + +Параметры, такие как: разрешение изображения камеры, цвет и толщина линий прицельных элементов, доступны в окне настроек программы. + +#### 3.3.2.4 Окно "Консоль" + +Для ручного управления ЧПУ, а также настройки и вывода информации о состоянии контроллера в программе предусмотрено окно "Консоль" (рисунок 5). + +![Окно "Консоль"](images/console.png#center) +

Рисунок 5 - Окно "Консоль"

+ +В нижней части окна имеется поле ввода команды и две кнопки: "Отправить команду" и "Очистить консоль". В верхней части расположено многострочное поле вывода ответов от контроллера. + +Для отправки команды в контроллер ЧПУ необходимо ввести ее в соответствующее поле и нажать клавишу \ клавиатуры или кнопку "Отправить команду". После обработки команды контроллером, команда и ответ будут выведены в поле выше в следующем формате: + +

Команда < Ответ

+ +Если в настройках программы включен флаг "Отображать команды интерфейса пользователя" в поле выводов ответов будут отображены все команды, отправляемые в контроллер по нажатию элементов управления инструментальных панелей. При включенном флаге "Отображать команды G-code программы" - все команды УП при передаче УП в контроллер. + +Очистка поля вывода ответов производится нажатием на кнопку "Очистить консоль". + +#### 3.3.2.5 Окна "Устройство", "Модификация", "Пользователь" + +Инструментальные панели с элементами управления и отображения информации о состоянии ЧПУ располагаются в окнах "Устройство", "Модификация", "Пользователь". + +Наименование окон характеризует функциональное назначение панелей, расположенных в них, но не ограничивает их состав - все панели могут свободно перемещаться как внутри соответствующего окна так и между окнами. + +Перемещение осуществляется перетаскиванием панели за заголовок с нажатой ЛКМ. В процессе перетаскивания в окнах будет отображаться место будущего расположения панели в виде линии синего цвета. + +Большинство инструментальных панелей имеют способность сворачиваться для экономии места на экране ПЭВМ, данные панели имеют знак "-" слева от наименования в заголовке в развернутом состоянии и "≡" - в свернутом. Сворачивание и разворачивание панели осуществляется щелчком ЛКМ на заголовке. + +Текст заголовков панелей в нормальном состоянии имеет черный цвет, при активации важных функций панелей - красный. + +При запуске программы часть панелей отображается в неактивном состоянии и активируется только при подключении к ПЭВМ ЧПУ. + +### 3.3.3 Инструментальные панели + +#### 3.3.3.1 Панель "Состояние" + +На панели "Состояние" (рисунок 6) выводятся текущие значения рабочих и машинных координат, а также режим работы контроллера ЧПУ. Координаты отображаются в полях вывода, расположенных по горизонтали в порядке: X, Y, Z. + +Возможные режимы работы контроллера ЧПУ (поле "Статус") следующие: + +- "Готов" - режим готовности к приему команд. +- "Тревога" - режим аварии. +- "Работа" - режим выполнения УП. +- "Дом" - поиск домашней позиции. +- "Удержание" - приостановка движения, ожидание дальнейших команд продолжения/сброса. +- "Проверка" - интерпретация входящих команд без фактического перемещения инструмента. +- "Дверь" - режим срабатывания датчика двери. +- "Перемещение" - режим выполнения специальных команд перемещения. +- "Сон" - режим пониженного энергопотребления. + +В этом же поле выводятся состояния, не относящиеся к режиму работы контроллера: + +- "Нет соединения" - при невозможности открыть последовательный порт подключения к ЧПУ. +- "Порт открыт" - при открытии последовательного порта, но отсутствии соединения с контроллером ЧПУ. + +Фон поля "Статус" может изменять цвет в зависимости от состояния. + +![Панель "Состояние"](images/status.png#center) +

Рисунок 6 - Панель "Состояние"

+ +#### 3.3.3.2 Панель "Управление" + +Панель "Управление" содержит набор кнопок, отвечающих за базовые функции контроллера "GRBL" (рисунок 7). Состав, посылаемые команды (коды команд), и описание приведены в таблице 3 в порядке их расположения на панели: слева направо, сверху вниз. + +![Панель "Управление"](images/control.png#center) +

Рисунок 7 - Панель "Управление"

+ +Таблица 3 - Кнопки панели "Управления" + +| Кнопка | Команда | Описание | +|---------------|-------------|---------------------------------------------------------------------------| +| Домой | $H | Поиск домашнего положения | +| Удерживание | ! или ~ | Остановка текущего перемещения (команда !) или возобновление движения (~) | +| Сброс | 0x18 | Программный сброс контроллера | +| Разблокировка | $X | Принудительная разблокировка режима аварии | +| Проверка | $C или 0x18 | Включение (команда $C)/выключение (команда 0x18) режима проверки УП | +| Сон | $SLP | Перевод контроллера в режим пониженного энергопотребления | +| Дверь | 0x84 | Принудительный перевод контроллера в режим срабатывания датчика двери | +| Охлаждение | 0xA0 | Включение/выключение системы водяного охлаждения | + +Следует отметить, что при выключении режима проверки УП, посылается команда программного сброса с последующим восстановлением состояния контроллера и смещений рабочих координат. + +#### 3.3.3.3 Панель "Система координат" + +На рисунке 8 изображена панель управления системой координат ЧПУ (далее - СК). + +![Панель "Система координат"](images/coordinatesystem.png#center) +

Рисунок 8 - Панель "Система координат"

+ +В верхней части панели выводятся смещения для активной СК для осей X, Y и Z, в нижней расположены кнопки выбора СК и обнуления текущих координат по оси X, Y, Z, всех осей одновременно для активной СК. + +#### 3.3.3.4 Панель "Шпиндель" + +На панели управления шпинделем (рисунок 9) расположены: + +- Поле ввода для установки/вывода заданной скорости вращения шпинделя. +- Горизонтальный ползунок установки/вывода скорости. +- Кнопка включения/выключения шпинделя. + +![Панель "Шпиндель"](images/spindle.png#center) +

Рисунок 9 - Панель "Шпиндель"

+ +Скорость вращения может задаваться как вводом числа в соответствующее поле, так и с помощью ползунка. + +Текст в поле ввода может иметь два цвета: черный в случае, если текущая скорость вращения шпинделя соответствует заданной; красный - в противном случае. + +Ползунок имеет ручку в виде круга серого цвета с контуром темного цвета, с помощью которой задается скорость вращения шпинделя и маркер в виде круга с более светлыми цветами, отображающий текущую скорость вращения. + +Во время передачи УП в контроллер скорость вращения может быть изменена с помощью вышеуказанных элементов управления, при этом используются инжектированные G-код команды "S", или с помощью функции переопределения скорости панели "Коррекция". Включение/выключение шпинделя во время передачи возможно только при переводе контроллера в режим удерживания. + +#### 3.3.3.5 Панель "Перемещение" + +На панели "Перемещение" находятся элементы управления движением инструмента ЧПУ, а именно: + +- Кнопки движения по осям X (стрелки влево, вправо), Y (стрелки вверх, вниз), Z (стрелки вверх, вниз, расположенные справа). +- Кнопка "Стоп", расположенная по центру кнопок движения по осям X и Y, отвечающая за принудительную остановку движения. +- Выпадающий список "Шаг", в котором можно задать шаг перемещения. +- Выпадающий список "Подача", отвечающий за выбор скорости перемещения. +- Флаг "Управление с клавиатуры", включающий управление перемещением с клавиатуры ПЭВМ. + +![Панель "Перемещение"](images/jogging.png#center) +

Рисунок 10 - Панель "Перемещение"

+ +Списки "Шаг" и "Подача" имеют предварительные наборы шагов перемещения и скоростей соответственно, но позволяют ввести произвольные значения в поля списков. Введенные значения запоминаются при включении флага "Управление с клавиатуры" и могут выбираться из списков при последующем запуске программы. + +Каждой кнопке панели, а также перелистыванию значений "Шаг" и "Подача" могут быть назначены быстрые клавиши, задаваемые в окне "Настройки" программы. Управление данными клавишами включается флагом "Управление с клавиатуры". + +#### 3.3.3.6 Панель "Коррекция" + +На рисунке 11 представлен вид панели "Коррекция". На панели расположены элементы переопределения скорости подачи, скорости холостого хода и скорости вращения шпинделя во время отправки УП в контроллер ЧПУ. + +Элементы аналогичны таковым, расположенным на панели "Шпиндель", за исключением замененной кнопки включения соответствующим флагом. + +![Панель "Коррекция"](images/overriding.png#center) +

Рисунок 11 - Панель "Коррекция"

+ +#### 3.3.3.7 Панель "Карта высот" + +Панель "Карта высот" (рисунок 12) отвечает за создание, загрузку, снятие карты неровности поверхности и дальнейшую коррекцию УП для нивелирования кривизны детали, обрабатываемой с помощью ЧПУ. Данная функция полезна при фрезеровке печатных плат и гравировке. + +![Панель "Карта высот"](images/heightmap.png#center) +

Рисунок 12 - Панель "Карта высот"

+ +На панели имеются элементы создания, загрузки и включения режима работы с картой высот; задания границ прямоугольной зоны карты; установки количества точек зондирования по осям X и Y; установки рабочей высоты над поверхностью и глубины зондирования; установки скорости подачи; установки количества линий сетки разбиения УП по осям X и Y. + +Коррекция УП по активной карте высот производится включением флага "Использовать карту высот". + +Более подробная информация об использовании карты высот приведена в п. [3.7 "Создание карты высот"](#3-7-sozdanie-karty-vysot) данного руководства. + +#### 3.3.3.8 Панель "Пользовательские команды" + +Для расширения функционала программы в части управления ЧПУ предусмотрена панель "Пользовательские команды" (рисунок 13). На панели расположены кнопки, по нажатию на которые в контроллер ЧПУ отправляются заранее определенные команды. + +![Панель "Пользовательские команды"](images/usercommands.png#center) +

Рисунок 13 - Панель "Пользовательские команды"

+ +Задание команд осуществляется в окне "Настройки" программы. В группе "Пользовательские команды" окна имеется таблица команд. В таблице имеется возможность добавить, удалить или переместить команду, а также задать атрибуты: + +- Текстовую подсказку, отображаемую над кнопкой панели при наведении на нее курсора мыши. +- Значок кнопки. +- Список G-код команд, отправляемых в контроллер ЧПУ при нажатии на соответствующую кнопку панели. + +Программа содержит ограниченный набор значков для кнопок, набор может расширяться пользовательскими значками, для чего необходимо поместить файлы необходимых значков в каталог "plugins/usercommands/images" папки установки программы. + +Список команд, отправляемых в ЧПУ, может иметь одну G-код команду или набор команд, по одной в каждой строке поля в ячейке "G-код" таблицы. + +В G-код командах можно использовать вставки программного кода на языке программирования JavaScript, оформляемые внутри фигурных скобок, например: + +- Команда обнуления рабочей координаты X и запоминания смещения в переменной "storedG92x" + +``` javascript +G92X0 +{var storedG92x = vars.G92x} +``` + +- Восстановление смещения координаты X после сброса контроллера ЧПУ + +``` javascript +G92X{vars.Mx - storedG92x - vars.x} +``` + +- Запуск программы "Блокнот" + +``` javascript +{script.importExtension("qt.core")} +{var p = new QProcess()} +{p.start("notepad", [])} +``` + +Подробнее об использовании языка программирования JavaScript в программе читайте в п. [5 "Разработка расширений"](#5-razrabotka-rasshireniy) данного руководства + +## 3.4 Окно настроек + +Настройки программы доступны в окне настроек (рисунок 14), вызываемое по активации пункта "Настройки" меню "Сервис" программы. + +![Окно настроек](images/settings.png#center) +

Рисунок 14 - Окно настроек

+ +Окно содержит три области: область слева - список групп настроек; область справа - элементы управления настройками выбранной группы; область снизу - кнопка установки настроек в значения по-умолчанию, кнопки подтверждения и отмены изменений настроек. + +Ниже приведена информация о доступных настройках программы: группа, параметр, описание, допустимые значения, значение по-умолчанию. + +Таблица 4 - Настройки программы + +| Группа | Параметр | Описание | Допустимые значения | Значение по-умолчанию | +|------------------------------|---------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|--------------------------------------------------------------|-----------------------| +| Соединение | Порт | Последовательный порт соединения с контроллером ЧПУ | Путь к устройству | Пусто | +| | Скорость | Скорость обмена по последовательному порту | 9600, 14400, 19200, 38400, 57600, 115200, произвольное число | 115200 | +| | Период опроса | Время между запросами состояния контроллера | от 10 до 9999 мс | 100 | +| Информация о станке | Скорость шпинделя мин. | Минимальная скорость вращения шпинделя (используется панелью "Шпиндель") | от 0 до 99999 об/мин | 0 | +| | Скорость шпинделя макс. | Максимальная скорость вращения шпинделя | от 0 до 99999 об/мин | 10000 | +| | Мощность лазера мин. | Минимальная мощность лазера (используется при полутоновом окрашивании растровой визуализации УП) | от 0 до 99999 | 0 | +| | Мощность лазера макс. | Максимальная мощность лазера | от 0 до 99999 | 100 | +| Парсер | Размер сегментов, аппроксимирующих дуги - по длине | Длина отрезков, разбивающих дуги УП, при отображении в окне "Визуализатор" и работе карты высот | от 0.1 до 99 мм | 0.1 (выключено) | +| | Размер сегментов, аппроксимирующих дуги - по углу | Угол разбития дуг УП, при отображении в окне "Визуализатор" и работе карты высот | от 0 до 180 градусов | 5 градусов (включено) | +| Отправка файла | Команды начала программы | G-код команды, отправляемые в контроллер ЧПУ перед передачей УП | Набор G-код команд (допустимо использование JavaScript) | Пусто | +| | Команды конца программы | G-код команды, отправляемые в контроллер ЧПУ после передачи УП | Набор G-код команд (допустимо использование JavaScript) | Пусто | +| | Команды смены инструмента | G-код команды, отправляемые в контроллер ЧПУ при обработке команд смены инструмента | Набор G-код команд (допустимо использование JavaScript) | Пусто | +| | Игнорировать ошибки при отправке файла | Флаг, управляющий остановкой передачи УП при возникновении ошибок обработки команд контроллером | Включено, выключено | Выключено | +| | Автоматически настраивать парсер перед отправкой с выбранной строки | Включение отправки команд настройки интерпретатора перед отправкой УП с выбранной строки | Включено, выключено | Включено | +| | Приостанавливать передачу файла по командам смены инструмента | Управление приостановкой передачи УП при обработке команд смены инструмента | Включено, выключено | Включено | +| Визуализатор | Толщина линий | Толщина линий 3D проекции УП | от 1 до 9 | 1.5 | +| | Сглаживание | Управление сглаживанием линий 3D проекции УП | Включено, выключено | Включено | +| | MSAA | Сглаживание линий 3D проекции УП методом MSAA | Включено, выключено | Включено | +| | Частота кадров | Частота кадров построения 3D проекции УП | 30, 60, 120, произвольное число | 60 | +| | V-sync | Управление вертикальной синхронизацией | Включено, выключено | Выключено | +| | Буфер глубины | Управление перекрытием линий в зависимости от удаленности при построении 3D проекции УП | Включено, выключено | Выключено | +| | Режим отрисовки | Метод построения проекции УП, "Векторный" - в виде отрезков линий, "Растр" - в виде набора точек | Векторный, растр | Векторный | +| | Упростить геометрию | Ограничение минимального размера сегмента УП при отрисовке проекции УП | Включено, выключено | Включено | +| | Упростить геометрию - Точность | Минимальный размер сегмента УП (при нуле преобразуются только сегменты, лежащие на одной линии) | от 0 до 99 мм | 0 | +| | Полутоновое окрашивание | Управляет функцией окрашивания точек при растровом построении проекции | Включено, выключено | Выключено | +| | Полутоновое окрашивание - По 'S'-коду | Управляет функцией окрашивания точек по "S"-коду УП | Включено, выключено | Включено | +| | Полутоновое окрашивание - По 'Z'-коду | Управляет функцией окрашивания точек по "Z"-коду УП | Включено, выключено | Выключено | +| Цвета | Визуализатор - Фон | Задает цвет фона в окне "Визуализатор" | Произвольный цвет | Белый | +| | Визуализатор - Текст | Задает цвет текста в окне "Визуализатор" | Произвольный цвет | Черный | +| | Визуализатор - Фреза | Задает цвет модели инструмента в окне "Визуализатор" | Произвольный цвет | Оранжевый | +| | Траектория - Основной | Задает цвет рабочих ходов траектории в проекции УП | Произвольный цвет | Черный | +| | Траектория - Выполненная | Задает цвет частей траектории, обработанных ЧПУ при передаче УП в контроллер | Произвольный цвет | Серый | +| | Траектория - Подсветка | Задает цвет частей траектории, отправленных в ЧПУ, цвет маркера выбранной строки УП | Произвольный цвет | Фиолетовый | +| | Траектория - Z-перемещения | Задает цвет вертикальных перемещений траектории | Произвольный цвет | Красный | +| | Траектория - Начало | Задает цвет маркера начала УП | Произвольный цвет | Красный | +| | Траектория - Конец | Задает цвет маркера конца УП | Произвольный цвет | Зеленый | +| Модель фрезы | Тип | Вид модели инструмента в окне "Визуализатор" | Плоская, коническая | Коническая | +| | Угол | Угол конуса конической модели инструмента | от 0 до 180 градусов | 15 | +| | Диаметр | Диаметр модели инструмента | от 0 до 99 мм | 3 | +| | Длина | Длина модели инструмента | от 0 до 999 мм | 30 | +| Быстрые клавиши | - | Комбинации клавиш для быстрого вызова функций программы | Произвольные комбинации клавиш | Пусто | +| Консоль | Отображать команды G-code программы | Управляет отображением G-код команд УП в окне "Консоль" во время передачи УП в контроллер | Включено, выключено | Выключено | +| | Отображать команды интерфейса пользователя | Управляет отображением G-код команд, отправляемых с помощью элементов инструментальных панелей | Включено, выключено | Включено | +| | Автозавершение команды | Автоматическое завершение команды при вводе в поле окна "Консоль" на основе введенных прежде | Включено, выключено | Включено | +| Пользовательский интерфейс | Размер шрифта | Размер шрифта пользовательского интерфейса программы | 8, 9, 10, 11, 12 пт или произвольное число | 9 | +| | Язык интерфейса | Язык надписей пользовательского интерфейса программы | American English, русский (список может пополняться) | American English | +| Камера | Наименование | Наименование камеры, изображение которой выводится в окне "Камера" | Список доступных камер, произвольное наименование | Пусто | +| | Разрешение | Разрешение изображения, выводимого с камеры | Список поддерживаемых разрешений, произвольное разрешение | 1280x720 | +| | Позиция | Смещение изображения камеры в окне "Камера" по горизонтали и вертикали | Произвольное смещение в точках | 0, 0 | +| | Масштаб | Коэффициент масштабирования изображения камеры | Произвольное число | 1 | +| | Позиция перекрестья | Относительное смещение прицельных элементов по горизонтали и вертикали | Произвольное смещение в относительных единицах от 0 до 1 | 0, 0 | +| | Размер перекрестья | Диаметр прицельной окружности | от 1 до 100 | 20 | +| | Цвет перекрестья | Цвет прицельных элементов | Произвольный цвет | Красный | +| | Толщина линии | Толщина линий прицельных элементов | от 0 до 100 | 1 | +| Пользовательские команды | - | Таблица команд панели "Пользовательские команды" | Произвольный набор команд | Тестовые команды | + +## 3.5 Подготовка программы к работе + +## 3.6 Загрузка управляющей программы + +## 3.7 Создание карты высот + +## 3.8 Выполнение управляющей программы + +# 4 Сообщения оператору + +# 5 Разработка расширений + +Для добавления новых функций в программу, в т.ч. новых элементов пользовательского интерфейса, предусмотрен механизм расширений. + +Каждое расширение должно быть оформлено в виде папки, содержащей набор файлов: + +- Файл конфигурации "config.ini" - текстовый файл с описанием расширения. +- Файл скрипта "script.js" - код расширения. +- Вспомогательные файлы (файлы форм "\*.ui", настройки расширения, файлы переводов, изображения и т.д.) + +Папка расширения должна храниться в каталоге "plugins" папки установки программы. + +В программе предустановлены три расширения: "camera", "coordinatessytem" и "usercommands" отвечающие за функционал панелей "Камера", "Система координат", "Пользовательские команды" соответственно. + +Набор расширений программы может со временем пополняться. + +# 5.1 Файл конфигурации расширения + +Файл конфигурации должен содержать два текстовых ключа в группе "General": + +- "title" - заголовок окна и/или панели расширения. +- "name" - уникальное наименование расширения, записанное без пробелов. + +Пример файла конфигурации расширения "Система координат": + +``` +[General] +title="Coordinate system" +name="CoordinateSystemPlugin" +``` + +# 5.2 Файл скрипта + +Код расширения должен быть выполнен на языке программирования "JavaScript" и реализовывать функционал расширения. + +Расширение может предоставлять пользовательский интерфейс панели для окон "Устройство", "Модификация", "Пользователь", отдельного окна в главном окне программы, интерфейс для окна настроек, так и не иметь его. + +При необходимости настройки расширения при запуске программы и/или создания элементов пользовательского интерфейса код расширения может содержать следующие функции: + +Таблица 5 - Функции скрипта + +| Функция | Аргументы | Возвращаемое значение | Описание | +|----------------------|-------------|-----------------------|---------------------------------------------------------------------------| +| init | - | - | Функция инициализации расширения | +| createPanelWidget | - | Объект типа "QWidget" | Функция создания пользовательского интерфейса панели | +| createWindowWidget | - | Объект типа "QWidget" | Функция создания пользовательского интерфейса для главного окна программы | +| createSettingsWidget | - | Объект типа "QWidget" | Функция создания пользовательского интерфейса для окна настроек программы | + +Вызов данных функций производится главной программой при загрузке расширения в порядке их перечисления в таблице. + +В коде скрипта доступны глобальные объекты связи с главной программой, их описание приведено в таблице 6. + +Таблица 6 - Объекты скрипта + +| Объект | Свойство | Тип свойства | Аргументы | Возвращаемое значение | Описание | +|--------------|----------------------|--------------|-------------------------|-----------------------|-------------------------------------------------------------------------------------------------------------| +| app | sendCommand | Функция | Команда, индекс команды | - | Отправка команды в контроллер ЧПУ, может иметь индекс - отрицательное число меньшее -99 | +| | sendCommands | Функция | Команды, индекс команд | - | Отправка списка команд в виде строки с разделителем '\n' в контроллер ЧПУ | +| | addAction | Функция | Действие | - | Добавление в программу действия - объекта типа "QAction", для которого могут быть назначены быстрые клавиши | +| | removeAction | Функция | Действие | - | Удаление из программы действия | +| | buttonSize | Функция | - | Размер | Возвращает стандартный размер кнопок для панелей программы | +| | responseReceived | Сигнал | Команда, индекс, ответ | - | Сигнал приема ответа от контроллера ЧПУ на ранее отправленную команду | +| | statusReceived | Сигнал | Статус | - | Сигнал приема статуса контроллера, содержит строку ответа контроллера на команду "?" | +| | senderStateChanged | Сигнал | Состояние | - | Сигнал смены состояния передачи УП в контроллер ЧПУ, описание состояний приведено в таблице 7 | +| | deviceStateChanged | Сигнал | Состояние | - | Сигнал смены состояния контроллера ЧПУ, описание состояний приведено в таблице 8 | +| | settingsAboutToLoad | Сигнал | - | - | Сигнал, генерируемый перед загрузкой настроек программы | +| | settingsLoaded | Сигнал | - | - | Сигнал, генерируемый после загрузки настроек программы | +| | settingsAboutToSave | Сигнал | - | - | Сигнал, генерируемый перед записью настроек программы | +| | settingsSaved | Сигнал | - | - | Сигнал, генерируемый после записи настроек программы | +| | settingsAboutToShow | Сигнал | - | - | Сигнал, генерируемый перед вызовом окна настроек программы | +| | settingsAccepted | Сигнал | - | - | Сигнал, генерируемый при подтверждении изменений настроек программы | +| | settingsRejected | Сигнал | - | - | Сигнал, генерируемый при отмене изменений настроек программы | +| | settingsSetByDefault | Сигнал | - | - | Сигнал, генерируемый при установке настроек программы в значения по-умолчанию | +| | pluginsLoaded | Сигнал | - | - | Сигнал, генерируемый после загрузки всех расширений программы | +| | settings | Объект | - | - | Объект настроек программы | +| app.settings | port | Значение | - | - | Параметр "Соединение - Порт" настроек программы | +| | baud | Значение | - | - | Параметр "Соединение - Скорость" | +| | queryStateTime | Значение | - | - | Параметр "Соединение - Период опроса" | +| | spindleSpeedMin | Значение | - | - | Параметр "Информация о станке - Скорость шпинделя мин." | +| | spindleSpeedMax | Значение | - | - | Параметр "Информация о станке - Скорость шпинделя макс." | +| | laserPowerMin | Значение | - | - | Параметр "Информация о станке - Мощность лазера мин." | +| | laserPowerMax | Значение | - | - | Параметр "Информация о станке - Мощность лазера макс." | +| | arcLength | Значение | - | - | Параметр "Размер сегментов, аппроксимирующих дуги - по длине" | +| | arcDegree | Значение | - | - | Параметр "Размер сегментов, аппроксимирующих дуги - по углу" | +| | arcDegreeMode | Значение | - | - | Включение/выключение режима "Размер сегментов, аппроксимирующих дуги - по углу" | +| | startCommands | Значение | - | - | Параметр "Отправка файла - Команды начала программы" | +| | endCommands | Значение | - | - | Параметр "Отправка файла - Команды конца программы" | +| | toolChangeCommands | Значение | - | - | Параметр "Отправка файла - Команды смены инструмента" | +| | ignoreErrors | Значение | - | - | Параметр "Отправка файла - Игнорировать ошибки при отправке файла" | +| | autoLine | Значение | - | - | Параметр "Отправка файла - Автоматически настраивать парсер перед отправкой с выбранной строки" | +| | pauseToolChange | Значение | - | - | Параметр "Отправка файла - Приостанавливать передачу файла по командам смены инструмента" | +| | lineWidth | Значение | - | - | Параметр "Визуализатор - Толщина линий" | +| | antialiasing | Значение | - | - | Параметр "Визуализатор - Сглаживание" | +| | msaa | Значение | - | - | Параметр "Визуализатор - MSAA" | +| | fps | Значение | - | - | Параметр "Визуализатор - Частота кадров" | +| | vsync | Значение | - | - | Параметр "Визуализатор - V-sync" | +| | zBuffer | Значение | - | - | Параметр "Визуализатор - Буфер глубины" | +| | drawModeVectors | Значение | - | - | Параметр "Визуализатор - Режим отрисовки" (0 - растр, 1 - векторный) | +| | simplify | Значение | - | - | Параметр "Визуализатор - Упростить геометрию" | +| | simplifyPrecision | Значение | - | - | Параметр "Визуализатор - Упростить геометрию - Точность" | +| | grayscaleSegments | Значение | - | - | Параметр "Визуализатор - Полутоновое окрашивание" | +| | grayscaleSCode | Значение | - | - | Параметр "Визуализатор - Полутоновое окрашивание - По 'S'-коду" | +| | toolType | Значение | - | - | Параметр "Модель фрезы - Тип" (0 - плоская, 1 - коническая) | +| | toolAngle | Значение | - | - | Параметр "Модель фрезы - Угол" | +| | toolDiameter | Значение | - | - | Параметр "Модель фрезы - Диаметр" | +| | toolLength | Значение | - | - | Параметр "Модель фрезы - Длина" | +| | showProgramCommands | Значение | - | - | Параметр "Консоль - Отображать команды G-code программы" | +| | showUICommands | Значение | - | - | Параметр "Консоль - Отображать команды интерфейса пользователя" | +| | autoCompletion | Значение | - | - | Параметр "Консоль - Автозавершение команды" | +| | fontSize | Значение | - | - | Параметр "Пользовательский интерфейс - Размер шрифта" | +| | language | Значение | - | - | Параметр "Пользовательский интерфейс - Язык интерфейса" (ISO 639-1) | +| vars | Mx | Значение | - | - | Текущая машинная координата X | +| | My | Значение | - | - | Текущая машинная координата Y | +| | Mz | Значение | - | - | Текущая машинная координата Z | +| | Wx | Значение | - | - | Текущая рабочая координата X | +| | Wy | Значение | - | - | Текущая рабочая координата Y | +| | Wz | Значение | - | - | Текущая рабочая координата Z | +| | G54x | Значение | - | - | Смещение координаты X системы координат G54 | +| | G54y | Значение | - | - | Смещение координаты Y системы координат G54 | +| | G54z | Значение | - | - | Смещение координаты Z системы координат G54 | +| | ... | ... | ... | ... | ... | +| | G59x | Значение | - | - | Смещение координаты X системы координат G59 | +| | G59y | Значение | - | - | Смещение координаты Y системы координат G59 | +| | G59z | Значение | - | - | Смещение координаты Z системы координат G59 | +| | CS | Значение | - | - | Текущая система координат - строка "G54" ... "G59" | +| | x | Значение | - | - | Смещение координаты X текущей системы координат | +| | y | Значение | - | - | Смещение координаты Y текущей системы координат | +| | z | Значение | - | - | Смещение координаты Z текущей системы координат | +| | G92x | Значение | - | - | Смещение рабочей координаты X | +| | G92y | Значение | - | - | Смещение рабочей координаты Y | +| | G92z | Значение | - | - | Смещение рабочей координаты Z | +| | G28x | Значение | - | - | Сохраненная координата X команды G28 | +| | G28y | Значение | - | - | Сохраненная координата Y команды G28 | +| | G28z | Значение | - | - | Сохраненная координата Z команды G28 | +| | G30x | Значение | - | - | Сохраненная координата X команды G30 | +| | G30y | Значение | - | - | Сохраненная координата Y команды G30 | +| | G30z | Значение | - | - | Сохраненная координата Z команды G30 | +| | TLOx | Значение | - | - | Смещение инструмента по координате X | +| | TLOy | Значение | - | - | Смещение инструмента по координате Y | +| | TLOz | Значение | - | - | Смещение инструмента по координате Z | +| | PRBx | Значение | - | - | Координата X касания при зондировании | +| | PRBy | Значение | - | - | Координата Y касания при зондировании | +| | PRBz | Значение | - | - | Координата Z касания при зондировании | +| | tool | Значение | - | - | Номер текущего инструмента | +| script | importExtension | Функция | Наименование расширения | - | Подключение расширения JavaScript скрипта, список доступных расширений приведен в таблице 9 | + +Таблица 7 - Состояния передачи УП + +| Состояние | Описание | +|-----------|---------------------------------------------------------------------------| +| -1 | Неизвестное состояние | +| 0 | Передача УП | +| 1 | Переход в состояние приостановки передачи | +| 2 | Приостановка передачи | +| 3 | Окончание передачи, все команды УП отправлены | +| 4 | Передача завершена, все команды УП обработаны контроллером ЧПУ | +| 5 | Ручная смена инструмента | + +Таблица 8 - Состояния контроллера ЧПУ + +| Состояние | Описание | +|-----------|---------------------------------------------------------------------------| +| -1 | Неизвестное состояние | +| 1 | Готовность к приему команд | +| 2 | Тревога | +| 3 | Работа | +| 4 | Поиск домашнего положения | +| 5 | Переход в режим "Удерживание" завершен | +| 6 | Переход в режим "Удерживание" | +| 8 | Режим проверки УП | +| 9 | Дверь закрыта, готовность к возобновлению работы | +| 10 | Дверь открыта, ЧПУ остановлен | +| 11 | Дверь открыта, производится приостановка или парковка | +| 12 | Дверь закрыта, производится возобновление работы или возврат из парковки | +| 13 | Состояние перемещения | +| 14 | Режим сна | + +Таблица 9 - Расширения скрипта + +| Наименование расширения | Описание | +|-------------------------|--------------------------------------------------------------------------------------------------| +| qt.core | Набор базовых объектов Qt | +| qt.custom | Набор дополнительных элементов управления пользовательского интерфейса, описание в таблице 10 | +| qt.gui | Набор объектов пользовательского интерфейса Qt | +| qt.multimedia | Набор мультимедийных объектов Qt | +| qt.network | Набор объектов Qt поддержки сети | +| qt.opengl | Набор объектов Qt поддержки спецификации OpenGL | +| qt.printsupport | Набор объектов Qt поддержки печати | +| qt.sql | Набор объектов Qt поддержки баз данных | +| qt.uitools | Набор объектов Qt для динамического создания пользовательского интерфейса | +| qt.xml | Набор объектов Qt поддержки языка разметки "XML" | +| qt.widgets | Набор элементов управления пользовательского интерфейса Qt | + +Таблица 10 - Дополнительные элементы управления пользовательского интерфейса + +| Тип объекта | Базовый тип | Назначение | Свойство | Тип свойства | Аргументы | Возвращаемое значение | Описание | +|------------------|-------------|-------------------------------------------------------|------------------|--------------|-------------|-----------------------|---------------------------------------------------------------------| +| ColorPicker | QWidget | Выбор цвета | colorInt | Значение | - | - | 32-разрядный код цвета в формате AARRGGBB | +| | | | colorSelected | Сигнал | Цвет | - | Сигнал, генерируемый при выборе цвета пользователем | +| Slider | QSlider | Ползунок с представлением текущего значения параметра | currentValue | Значение | - | - | Текущее значение параметра | +| SliderBox | QWidget | Ползунок с полем ввода значения и флагом включения | value | Значение | - | - | Уставка параметра | +| | | | currentValue | Значение | - | - | Текущее значение параметра | +| | | | minimum | Значение | - | - | Минимальное значение параметра | +| | | | maximum | Значение | - | - | Максимальное значение параметра | +| | | | sliderPosition | Значение | - | - | Позиция ползунка | +| | | | ratio | Значение | - | - | Отношение значения в поле ввода к положению ползунка | +| | | | title | Значение | - | - | Наименование параметра | +| | | | suffix | Значение | - | - | Единицы измерения параметра | +| | | | isCheckable | Значение | - | - | Отображение флага включения | +| | | | isChecked | Значение | - | - | Включение/выключение флага | +| | | | valueUserChanged | Сигнал | - | - | Сигнал, генерируемый при изменении значения параметра пользователем | +| | | | valueChanged | Сигнал | - | - | Сигнал, генерируемый при изменении значения параметра | +| | | | toggled | Сигнал | Состояние | - | Сигнал, генерируемый при смене состояния флага включения параметра | +| | | | click | Функция | - | - | Программное переключение флага | +| StyledToolButton | QToolButton | Кнопка инструментальной панели | backgroundColor | Значение | - | - | Цвет фона кнопки, тип QColor | +| | | | foregroundColor | Значение | - | - | Цвет надписи на кнопке | +| | | | highlightColor | Значение | - | - | Цвет подсветки границ кнопки | + +# 5.3 Файл перевода + +Каждое расширение может иметь файл перевода надписей. Формат имени файла следующий: + +

translation_xx.qm,

+где xx - двухбуквенный код языка перевода. + +Скомпилированные файлы перевода "\*.qm" создаются из текстовых "\*.ts" с помощью программы "Qt Linguist" или консольной команды "lrelease", входящих в пакет установки фреймворка "Qt". + +Подробнее о создании файлов переводов читайте в документации по фреймворку "Qt": [Qt Linguist Manual](https://doc.qt.io/qt-5/qtlinguist-index.html). + +# Приложение А. Настройки контроллера + +# Приложение Б. Таблица G-код команд \ No newline at end of file diff --git a/doc/images/camera.png b/doc/images/camera.png new file mode 100644 index 0000000000000000000000000000000000000000..d91a8189a999aad2a0339fd9fe3ed62e0cc87682 GIT binary patch literal 4603 zcmeI0X;70%8pj));SgOwTu>0O26a$CBraquIYvYfVMSpPkr;3ph=Y&_;V?mtSrAV^ zLL(z7vM;Gb2HI|(x)?{)j9G533HT|ad zjN9@mzH5@jimcP~e-dHRNzP0+wE2p_wy*mq#OFnh*rxAjHW6Yml|cLtxEYx;*!!S= z3sBj=2!Oq+4TwKyuMYMOQM{O}Mtmtl5lmbO6E93*yENrv7dOT-{(Jf#Oj_F^{)`v7 z+)F1nnJM_?7iKa?Vjm+2s=Llk2jD@w*l@rkje4Y+9xMo#0^s_(@iuEo5>z+nitO^C z=K4^vmPl@C69xbSbi|W|8iGka{!0k58k@Dwsj`$xvD7gdt=}}ftC63vmds!1w&AbI}4TJ-AVFw3!jz_5L;_IALoDTAwOahW4LNHRPgB z;-Wr1DPa>*d!DOrBYcAM12OC{?3nN6pn_xjc##)IT@Zg_U`M=!zG_wT$mZvb!k8$l z?A);(q0-q3tGYTDX;!*AP4JgOb?_pG7c@1O*D=9OD#q5t(3h>L{pC(01!Wdi)RBtu zQG!R$YR_6+jt{jVcWU~Phj~lG`qQz+@S~T*LVq@HqsN=3W{J6EW43Y&l2Vd&Def&ns_!2QXJeXMJjb;QjG&D%!9?NFbhxJ3txdU)2$1Ka~z?Y$o z&wNQL7Cu+Hf?PGg+=cMaF8{zMHr16%^y@SAPHcL>h?rCs7{vSRQ{@V$^8P&7)st+5 z8we9x9bWFSaCzq`CFODkOgu1>n*d-e_7Jut@CVof|<81`h2L3aJG82Neh zp_}+(1KaVj;H;#+L2`abR;M0YfF6mOu;kw|f)yt-Wsl|@$33sO#!@6ehI8fL1-*n)WH zrlA>F5Xp!Zj5iL3JSq1Y?6oTI39E~Ez2gXIZU4M5)x{j~iEvN{@prZ49Hb-~fFGZ# z#iqy`ZSEHZfC69RLZ4_M2c^25(^shZ13SK6@;i`zn-x(uI>Y2QEWe!ll}P<|!-x0Z zYd2T=+vBFDOPg#Q;b4+W0BwxD1>`)K>9c7uUo>SZg2WyFan6{c3^dNjJ=-+>&ymnt zs-=jp#sDyprvj<2*ps|E$IV0u2t#9$3}H8GAoV2mWh#K2eH3J%UVwI|wI|1&l$tH} zCKYCvIl(-CxUo7*e15k)uQZAN3%v+jmNDjq*15+mSuEW6H^#oIvZ3suNM z98GGnmZr;C3F1(adZySXP96BYOl0jEnxa={PQ%M*xzzzQbRg8C435~^;~e0&`%S^o zxkd!#VLZ(8;MA?j&#QS2qLIXrglixhc^~vJ{{X-)9SXAOZReh-$&Q3)!uhgDE#POG z$Wr0)-D3x_DYGpBvA!ImjkN=pc`y++ph-8fO;lKFwy)rE5*pea2D!09m7I97%(b`- zVhXFU>w$@ZLj3)yG;RT|;O5_J8OJ$y&`@plF~YNU1H%Gd&0BS{yh^rsv&;W%ZbFK6 z5%t$Qth>CZ(UEG)a;K#fQ7}pJ)^55enVnU}&Y5qP8GzPlR9wFiF|Q)YI~fYS@woeT z*Bxu%he~AKK_A4|Gxs>hq)N~LeEM$Dagm8&2O*upin~Sp1EBSy3Z%LA+;xptXAUp- za!dkb?i`(e2g84E3c)rP(PXUYn>DUBkG#y=$xVLmh yo6Y1e3kTe6Yd?nQYs%STz54rqLRu~-&M~Mu{M^0$LivLYa6Wa`p~~LxAO8Y~q^}wP literal 0 HcmV?d00001 diff --git a/doc/images/check.png b/doc/images/check.png new file mode 100644 index 0000000000000000000000000000000000000000..d5f8b32b78d51d426772d583ce2fead501322b83 GIT binary patch literal 975 zcmV;=12FuFP)dw%Eq&ToF_oZs)>_vq>A>6u_w7qAJJER8y~a~=orI{q3(a1D-N zZkd!LgE=Lb$}qr7c&L!6y1_d9izt3$Wro0}Cbema)H$unXdGYj8!=O>I?XeULqpf8 z`&gC%;>_rt0Sb||1SW>w0BtMKHeENs(>R6$xVp}cBMSqG={h^FiRUcT@vYeX>Dc`! zt&^^Lz%$t1V)KhW`_JH0$#=AlCFLnci}`uT^10@_kcTbMzKU>v9eb(E8UvXZVxWT>VClu8FMJ)0a--y z4Y0R{i4T`+V*Ou%uNRT|6*uP0q0vq7`;u~L{DD)ky3@E9KW50B#N9Yrb?~x#z&7Dw z!z~rZKZ_msJLTRC?hz82wL|r1gvozfaqL_o;}ZvLHox{S;=Y1%jh_Nb#mCryhlRc8 zyE;4Xf&mEb{z?-acQq0mW*sgqE8JxROyM2;Cd31`mFc9b2AINbJTbVwQb>+QW}FRh znGog0qr{a$IQ&?w{^vRekFqflsyHe@FZ@kIR2~fj?aKg}71vU|XOTt6sPn8lZZi?%|QQ24lH z8rwN0{ut~H(6$0?Gw}u}x(SZs*W?zXkj_~KI3K${l-jCWoJ*_BS^@_fRHQ8qjM8|y x{bc4d8TrO?|IySr;XnVTj3v<1)6+B2{10SgwQ{NMpd|nR002ovPDHLkV1jz`$}Ru^ literal 0 HcmV?d00001 diff --git a/doc/images/console.png b/doc/images/console.png new file mode 100644 index 0000000000000000000000000000000000000000..e56e50287bdaa0b7bb76c46cfc57ab423542d649 GIT binary patch literal 21532 zcmeIaXIxX;)-@jWU<2VQ0xIn&Qlu(KZz>1~(t8&b5GkRTK)?ow2uSa}_udJJi1Z$a z)X+;Hgpv>v+Pj0EbI-Zwp69vm?_WOM5B!vbWbeJ!nq!VJ=3Fa4O-25~`D^DvAkc+J z3bGm?&`BupGk5kh@QNjK`62Mn2`3Ht2cV)}h85tKUo7t{-v@z8L&*2d$bjF^*(>Nf zfk3pZq@NRyG;VHyK$@kGWbbRao1iC6-?JE-9BqOFiKmWU`KWF56{S6Tt6a=m!=Yt_ zTjG=sSNFQ-`pak=!9%l|Y-QIHV&-XtHM=&+^!01t@GpF>_B4r>d~)WT`~5g%TuR9_ zN(g#~CK9^SSzoK>@UR1upy{I#sl^(ZA!gj+(Ug+3uGpJ9pCJHW64hQxNY^bkQ6>XX zzQgQk6eC(-567jbKzkqh&wxNrUh|#xISB$yzq&{S9)kPc@+lCg1e8hz0)0ODP6~L5 z{2zaPqc&W?XWc28+z0sM&r%-a<5RSULNcn%AkZtav%s){Xn)0?0D<&g9be+aga7#r zJ4q~bE6A-~d}_1KYprnOb-N*RxUdPL4<=(`>V66MI`g{tBq^F*lP0{G$M(<+>9*{K z6W=wedShF*tUR*4rduuN1(FFL_t*EPn50OL(1fMwE+{;|{wo%$aX71tn}ZcSH-}YA ziPo=KS0Rv}LZJK}1UwHR#`_Q#l8X#0WA<4M2e+>V%)zAG8itGM&hlzn+H9^a!1#ct z!pVw0GntxuxF&&x;Ywe}bmNRm+y5LUJf^g!cw!Qv|O)0Dtj%eP*1Onab2)hoB|D28Hz>>WcGI?i) zI=G65!OZIhr*0iBdD4Ngo_qL1=ApesA0hSCA?7I0fSU)wZWGi)rE~_a61Hdr*UK3w zj2HZTg5@j-M5$!YYF}lgPBobohO3qwQQ^Zh9zdJ8m_3S#56`3v@8r^>%eVSE_6|pY zS=~OsYi*FbodCTO3_D?OtlrMWCA;qRYg@haxk8GLtu>O3sSz34AO2f#W$!gJa9G8Q8+~vb;-T>B}6())b)}Q_y2MQ7XqF#n7 zogOQW+#zt_8-GyzRI?|2QYZ*^JaW$~bb357P^^Ib>ZkQW5v0v0pHJPa)EjY>( zd>sV(?xTJs9+@{E{2=*~f7#d1!EQbrF&eB6u{u)(6M@W5wtUxR&$B%X!(TV2azpSw zEm)mh9QIxWRUw@i3(B3@W3xV%S{;aqwa$Tj-Quhn%&p|TiKQ<{U{RK+PVH1x`!@AV z7?YwGU=Z;dTD83!>iqSf;b6*}tO>>!8eTC}rD{DGRu>oXC`XyOZamwN8MS=Wi z`VWY-@h$g%tQT0t*O}X^WH24Rd?)FI3nm(gyHFSO98FLx9ja~P$|#Zp?P7;;Ex+E4 z9MI=+rv$y?iDV}F**cxn%I0;bPukr)>d5cGx31QqVvD28)n^?l3C3+&ZZPcJkk%)~ zozFQvRGw$PF?u+zp3AyL)#J&~KKFd6wLTx-NB`zr9f$oW=C@-jxAx4@J6X9k6$S?>t;3& zo;$%_Eo#8LCBB#O=IW}TBv<#)io~WjLvtJ3AEhki>xkg=#w#66b=ac<4hNVGap(1~ zIU$*vR7kh9GoJj9k*jX-7fO7?@p{vknC#D%g6b!#)px~Hr09)xnvS6R>!8oCIfb#x zChY>yDM!iL92_>Di=5e3&}w z1yuwl6*W1g=lt+|{z*;l;p4A&(JJrz8^sI3q zc~~uJ+2>g>mx-1IDsbhADSF6dY+GGFfN#C$oC=Y6X_rmDca>noa3CQ}9EL_P-cH7?Z#+@A2Z#l2?eONvn{%3O?fxA!L|2g-&#E%abh?LnIT z+83V7hrz^H4qKX=nBpzi!8|#>N2kASt+j@YLKF_a*N62o&)L!_y0#0s=O zTB_whko#Rq9pxv~<*_(Vi8&4Ue5-)w$h-bBUTwj>Ec`c@H=cDuFnlg;@U@zrreg&ks2l`~i$u)hq$G-UR%?S>T zA41(g)AkYcL=^kt&5HGal$z0HV<(SCiO-q&R;_9-gl~kEt;XJGG&ji`gb5#n7C(6R zGNBRw$p4H$@ysmCLWd4S($|B$1>0~ z*yxGV4n;c#`n;W_Od1sythGG6Xry#CQU89Q-i|pur;V_4L>aJ0u~aQsKS}^XXz~_e z%TBqso8wHPD6MBMTe$tTFpa_YkV5slW?QyJy`OGNvzy+{nbTQ3N0D894jjk4+~pTk z)!j#^=cog7?tx3t8Vr!O*0Z|X~cfyPyoMBJKBCt#JlwN8B^$|uxUOirIJ$LU1 zNFNrRzC#xM33v3p8;Zv^EmRTRs6+2yo`<<(`6f!$2(Qx?{|G-6i^7SC!jHbkoM6c-ES!fz7d`Lll-dQPT^f{?|fSLkKXO&0{9OK#=3d!5F*?O z{7m!I>((=?Yfoc^4x}%V7Z*2b6Fn=OH5`F)Q@bT!Yyyk(YvQY^s|)Mu>aquadpt5G zN>e;7@nmNZrpZ&gzP>pB5p7GH9KkWQYaaG~lZ6D;IcIP+##)!0JuC#>yUNSUI}cEa z38nhTW7eY8MVrd!(Klf`*;nQNMbPVQA8Sn$`JNwUM`Z&{26BCw-k*)xe55-0*?dY* z#0xih_#IncxVq_PLVctIdXin!K%Vj(BF0KHdmh<$2K1fm-{~FQa}bkq7SX!a zj!b~jP6|;%A?Us;O3uv)a{0lth#SfV9EcYR;?^fdJM4=R#B_8{a@I4D^pwzfsKxLb z9r@Fc>pkyE^#ifZ+(sA10~fwMyIO%-!D-;Uj3GUPTB0rm5Ee#wCvWvF8V*m}2R8xY z$V~sPF;(IY`IPu9#QSM5kF-(p_FaxFK7FZ?p~9>#LX!2!8%DRJui;aa$+CfMtAb`N zj*w6{So?nXD7?lz+7Kzb@ZC>etI3I!i~(t^=CbPF*rBBEA^#P6w>rm5`DKs5N(gc0 z!C~V>%)E;!6I$0b}|q9jfD(CNMwdp*}$mmDCcD$V8a z^0?SAK7|hVrdgx-OlD0QC>j;cbfGN+6FX67hf857s&k5Pz5<1!FA zO7eBHcwIg_ZRr7Hr~F7`6>`WDinAoP2=?n5D}*xes-hu+PQETzX=2h>Y2p#_lH=uF zy(nOeBFxg08ZAtbEZLYI`mQJap;6~ua19sBvN@+jifT}8DMJ^b;wesby_5FOYByU< zqd7~BCd9M9#7Renp3k9wSUlrY{=Q)d%4rFFx8>H|ni1~4C5>d{&};DHX@JFNj_q#Q zp$nLKqnIeBmr+{L*RG47gW!rV@q0)j3+xk&FX_Da+q^&W;vnXp!DBcD2&Aa>U|A_AIcAEhrAd8L)x2ICp<&(j^qVgC$Gi(? zymBlc+%6M=h5^wJ>Otgp;TgU~!yYAi#B)M%u0vqz9lj-`yXm6Zk zIGQH+3J8>vf|E&R>ba&O8uo!7LiX`Y^S(P<`(0CN0fDZR$T&w?s!#6!=-s9>vbZ2m z=)A|o4jE*Fomo6=8s(TM>nfDNtNG3JIqwf=7D>H@r_6KDSl(WjP*5J=-=i?{;F;@z z_sT80yy@e02Oi=H7YTwEZJGC{&t#KJxaH+7fQy82Eot6}4&HR3Z2Cxz{dIT;NBWzY zyZQxK$M`Ln6~ZNu(Yj+vaF1f&3ZWh%I=NdO$jr4Wc?$IEZFae#PS(&kQ4+fO>lsVe zTe_NiMM-VEcLufbda*PjVPr0%V7uop(U0XCE#-E+zC-LZ^PmK#^S}%DSpOsE=krJ^c+grQz51nO*~4HxUmtPA|<3(l?OxqY%7jcaa>%BgqenQcJy z+nQ=y^a`z>)3vgFHm3gC^%rCloQMGCp~MC~+4BHdmO|}c=W$q(|6rDTJNKE0F>bla z%O&S_hA8Jf8jc$f(WW@+9Nf7B>rG}(V;1yGxv6;PjVc6 z2jdEHCTJmDz~zI1E&tl1di7|C^^;)pFH`#EYLgH4>1mW6CWJ#un*1EHnfweHpVAL9 zWl1wI?i!q$w4m8l^lU*Dn;l+>zhzLp=BWQdzH;mYNJIj-VqAhGIqad_!k!~IaYMi+zXTE5EOIt5-8;aH@2-ax@$o!X1Ujz| zHm?wjIy1GYce)TF!RnWEgYB#ri>M(XD}GS8**$UUbLqtHOtCfBA1{3~UU~GA%F(o^ zv4e}{7d^6jG>#}v3Uk%wG`@4& zF@zN^uH*~$&CfvP6ND~Qz)t(+~b91Wau`cLlisea_;P? z5kkQ^zyM6ljLy$}ysrkOomuB0Ke=G>VT7mNh;~f9&=v6F`gBtH3fb^lpvO}pNj}o1 zPoK`e!Eg8Es12`mDfm7v_B;k)9$15s8d~qMY4Z69bCqj}6hR$4XFttYmfFlK>^CO$ zDbGuUPJh7Wb{mH#{c(~?ltw;Hz356R13()dyJ7%0kuVQz@VS_ypcXs4>?hCi?A;=Y%tqERRdWoWJ84Q%Y~PnA7m3G5>JbmUN! zGM$0Tb+OTGm1Vceld@X8SGTO%(6A=$g{OcMC8EXZFXa-viOsw0)XcGVVE73&8o!FG zXUTt%yttaAH2e+Tp~WW{sJoOB7|@A9SA z<=cl@wM|yAWOe58lfGJ_>j5(KFhuOp^SYm;l`lRic>c9SisE0!FY1A2~j6M6l^ugweboQX#y`pTjlc4VwtH(}R&S_o@ zU=`~H|JCRF&VgO=SbwAb>Z3QAP}ntPdYhoBk$m}6pikC;Nm7#fXss-Zu9yl}{s@!$ zP^nTuxVI-q_#!ea#UrQ@Y+ZexX!s!Vrf zOW#F?WFHEi0NHnibvbo|Yr9Gc^}cZ%KsbGr;1{B6I;Vse@dwb~#Bo(lT5u z;E8c~Z(RDq{uqHRbUpF)jKE~v6Lq~p+%M6+^~`}Nk?G&avDV$xbmKZlu^qf9A;p@s z$Z92oD&3Id7va}|`bAYGH#Sln;3;>%_nSFOnsQM;U3#qgqSs<9uxReAVsL-hjuh{}#ipYrCrN+mb45nUofDC( zv46g|@d&{T;W44uY`&xrZg7&6fWQ7-=zD2&U0%Wxd*@2+{^HVIE(4XWc>ZT>?jhqn zhIEoq2^Q&V9ups;G(-G`UO%tCmE-gsJ=y0f8&gIGQVVA69irRNx+lP1Gr@C_*xey+ zt>hPxwouW~Pbb+}lc`cgrmNY0p6cQ1l!0hAy+6h3SbYfkJ&Ecpe4mtnrds&iY{Uet ziYziU#f-Tfr^19-B_qLFe2#S|tEio>gfwS54Ug_g7+anPW~OnmW{_t~?BQyZF>eBA z8`L>VDp!zE(Gy<^Ox#+3sEYRthPdrbqA@WG91DD800jw2YJ38}p6>Q~ zFjH>lv|+mNx#V9!PXr9H*p&{4Y<@w*Z#QehQ?X+~*pB?vopG7in|-D&uBiE_DgH0d zzc~zFuMT(UmXm?Gj(F%q+6r4N1Z&lPS(-bZ z`;N+01lyrXw{)EHcD1Z=Uyr-g*rJI{qziwid6Ajv_iL-fB3RbTFNwvNxMuv9swKE+ z#Ll{lxL!0JNNu95(yfaM>hRtv%MKCG^S+pH2w!#0E-Jr5)JcNRhG$9@B}=XAXe~Pp z-+_I-Gj}_}+cb$@Qpj4D!Cv=f-*G7NoV}D)Fj{u1Ew#d}Y5YD=+Pqxd(l5L!Xz0M3 zc-FPZYZCKfzq_|2K9 zoaFgmvQLt-_=FHJ-u{D>AkYU6L9Fs)w}eiMww08-HuBePX-A@h6Bt6w`}6ozH18}c zSf&h_J}>z4R0)+kQ?Jga^HkR1+vO|rK_+&32^8al8nJyiImaroZQpN>bN)?5g(Pxk zJEu10$pO%hC$$k^p`s=xwq1OCos9U3>m7q8k0Fz{fG1^nCOzdpOG={ zqBu82jeUBQ;K4Ti%~v@|?CE#Z&?}ngs>e~gjA@wJ7S*SXCX)&BwL2-nGhBDn_`!nW zwd|G8`wRRp6<0jcR`|Er+7fSxwHaXb z9OHsW3oV<;c&ss{*L55FFhsi&wl^AlRm>m2)|zP zt!?FjJ}?r-E-(v!zl2GjetBMhCiTUnA=i@g+$Z(jatR;`o{5u~$vubq_-sD-TF6(# zTW*H7i8(sWJv#)o&$XZrg&i;yL(>Fk`690r)TCHl`3`68x_ZT?G$H;+u{RvpX<4)-p)z2LRmbhX4 zdN2T!n&AP}@TR)}RjD3WFeb@Rs%W6H3*wglYrlcbWg=Dr+T8v?4)f(w?#0UHk>$x= z#eNWI!VjpmVSlLsYHd8vZcKEjLC|tU*-^DUbn4@UxnWt4BDqdZ2%q`kb9xB?k$!bO&_4SE*P<#3j)Md>Fg z>Fb48vbALsmns{&>!S<)AkILZ858|W$oIWoy^kcno3_+ws!qrvKkeAJ#=7pxim^SB z3M&WXA{&ZbWp|wTM|q$onCS;NeM6QvvfEZJ3)!&CJ&dz$eKAf_OT@5SchXFxbQ^qm zTeGm+a+jB`{gaQ7?mQpJiCXfxsl~KLRN<>GMgD?&Gk32HECwQ7dNk*H!@CJbfCG~i z-M1oT#PXeIuKjdkcoVCo84J%Nm!H{Y{qdQ#HSL!383R{V=_@jzN=nX;At9|4NWJW6K5x^$B?u+^C8JQO z$Xc#JfuE})M+cy5-`VwLAnCT@9>iHf&(`9KfK%GTZ4_asD8JLgJ1rrpiw_)J(Xb*I zR@QYnF^~tsEy^fAx(%b@$!5BceId3-MnQbNjPYWY%?Xg!5arSexjScjEVadY)LAGS z#dF(0YFB-k;?eHh7PR2)6lA@>B)5?HIoVwI1<;Zm`A z2ZSkU-ch9b#}?`p}EI%Dy7JsBM)e8VAjCERKVj&dUr0``F=HM%C= z^{bY?HmQc66K9@^Q8}f>OAF%DSVsH`97%r1+;(tk*i71ZZaV6))~B9y3Po@f%p6Vy0R(kwi~; zUl_a4e4hJ`uFILB;H0~=7|*Vczn%d-Nw#tJpabH3xaBz9yZ(*GMDHslscL%rL+C(# ziR??PU5OwheB%+oWWXf3F}i*%H=Nym$PIO&pK`+ykQ)j^hGLIZ{3NY}FZJcmRr*^e zxDR_OBEU*B+pa%N7guEPSnS7HOnr9a0YK1V=eHQP$FsUh9x7QbfCK7gE*Xy+mOA=I zwHSCphu?{tt_r?()kVlgo5o;FTOgxrLGNkS9K6E*1IfpoH+qoMEk`VpnpnDS)2l@F4CoEB(0j-PnYn# zb>$oTf`a`QmB#3jwa&JR6DocJ3t65tPWlS3DRrxF1><{54Xmtl&^GXxy) zM04|rQ1)EUUAC<)g9E+FqI~`HkM%ip!{;;)whc@cCzXD;g(?9lAgMtr!^&DpEoCsR z6`M`uvfHJZGNcTw?G3ufp5`%DkwmUODprpUc5X%9FdI>Y-xt>U%~m3PKJONZR8+^e zuQ>GVf20@>P!F}R=4Q?mWs0}2zRmhASL~el4=+13STUw|#bNh(#;t>fi>(o41&P7GUGC(uf;l=AVN1& zSaEWyk>CAT=$%#k{)9@53no*A$vK)C=dGQLS$Yn+;U4#s4Aa;u%l#KM?6@0r`)hqv zCFye?ZQEp=Oyhj9jw5F_3HM3oQvm-hMi?(%Vw{1!*)}UH*@a3b8;ag!IGdJ~SbsxO z^N(W!4f|cfAde+XtK!|2LO{YaPk5F)LU@}9qJwExf>^EF0bwS0bL|{2O|IP%`Ow=+ z3rLyZbP_`4%C}g_SfJAx-F`9zAQ^09$s}mzyUz)@DZP`TK3!Jz{F73`JAo=}hp^>T z<(qt7+2U}qMdL!y#Ym-IRRwW7%t0Y19f{@VSpgkO+fbLM&I#BKEp#9LaAiu&nAfAs zWn%sAKq{R8m;FtdG^wcv%?bV4vG|Ar3~vHlK*moerAXbP)_xY{+siiQAdG&WTb4&b zTCjpYy^0R=-@FR21z`EYoH(Zpj)hEK{K)6Yy*`54*d2k09d)Im`o@pFH8a3R8UGbB zwqFxVOEkVVibeolQwg%_EcBFBYdBB!lAP32YYUItfR@2aa56p?hYY@N!tmhG0A@7( z|AQG8eZtpJ1ee}=lqBmab1u=hZ~UM1;H4%1hbBxCapx4M#PZmqi05sgVxu(B;`0sE6tROD>Al>_h z*jSJ_)u1p!m5s<630R?vp_OE*4u8s-IdK{?$ob3_fzYA3IKtJdRn+M>dPel56rCiZ z?&nLzUji(j5Tk=GJu%!@2b7D|g~#0y`n@)a(qLJKq8^!Nn?DWmVL->^rNjGme{)KK za@DnuFSc7TaqrjxzTn;&Wr3tql}uXmbeJe|p5%u-3rlq{{tY`x={qObkq;vmZMIY= z2Y47c+ixVQk3Edc`cDf$t!kBhQ8B(V$48a*@#K&jr&D5}FG0BO@K27Yn&5(8<5=kj z)6NuDv@!R<9j_aVP!p4yb3Q60r?ZfOpX79g_3Qm{1pgKlj*ShPcpp{Ok+pZl;Yp$_ zp67$poJt>tux8J3kft0pU_bUrpWdp?xQgXV1P|!d%dy||!k2E6UU>Jqz?Qe$yeKZ^ z)U#bL?jLaQ-1lRe3%D?0D5ynYpsqsZR=v?jQoheh^q1~$HgAMD{44rr8QbQ=ne;mq$OwfkxV zH3i0%qnvP~to(egT2jlM1slu{E}lJGD9CeuBs06t>cRxMKvi2Eyg`q2OGwG|=v6p8mtFWcr`oO5z*!j~}OeSvAt#-WCqTzf(O4QiC3w z8m`BtMn?S)QzM}4r>PNnb>Z3tni~SW+2LlYfZMS-rcbt=gZRJT4(gMFBU2Zmw>rnp z^Y~Zp5c2?&a>V*1I_I9ap5Fx^>(?853R7AJuCA#-eNZkqgZhB}r98)^WWD#uz_-(D z8P|MUQf$8J7SsG>5b4i)NjN}9>#O`*so|eUfGk+DYxVG~%~@iVQm_xB$)-<^U}-)l zPB8gW#>ET>hI;P1v_Go_*U)ECzfImBZOcQUd^>`08r56^{4La~(;CIiH5V-LXtG5( zG#Y_w%X2aA(RkANp!Rpe!ldkvTzoCmQ3m-yZ@jy|pdZtI;8{6+0;rW|uD+)*a1j*) z3h0P%lXPCjl@Co1zZ4|rytT{uGZ}xm93NvR3?PKQ-jE;qYmP#>prgE%il41jZub&| zMO2Adj!`f19iy%h?pgnef;{WvC9H@S|6qjo)caYZ;}SXIPviy#I3B}qR?Qq?Gq~Ho z`3>t^8#kAS>l^tFbNCJh6nw=@8;V#+Rq&uB&e99=LYM^ZKh$yVxkPw+RC}kXgx;8| zEef@ejzijTCN&E4y-nH>J@1uH;BDM6xxaKM87rw7zBsDj1?@phtkOv}upP;newupx zlVs){16LNwexMyf2)}q#Z+|wvy`=D@sl4f6&si@6_u^@<7;bKo?$Dt;cjirwUmnL@_9p}FJm3`(T4|J=C5{d%( z>KMN_VRz}SH#l*FGddyplk3FPo}o6c+;P@fUtA#<++*2{9lPx}W z8>ePrklRMk_g4XLLFvmjb}V;M(swUzP7%SkVRFpQ-1Wzy&O-Ikp{^6gBq{amFU~?8 z;4D;+RB-4;C!w+g?eT|BQW37*6q!(X*lNLjc|hBz1_qLgN=sAW2kkPmsm!l@h)su> zWxj_x9lKCXwik(~2S2bI+Vur_eI4oEdJ^o+yzZeT7UPP|xafm4M2%B{K6{V;r(Wn~ zmUK6>0QmCc6KhiQFCbTuw31Lr*<|kHo~S!3>(4o0t}IZXPJOVW#@69vZc$r>^}EWh zrCl`{!&Tku;TBK)CuhLsG5*z3h%OALw^5&bas6BhTVrT+ATd z$v9xmM%OBGPnt(<3p+M*4?TGJq9@6#ln?$D43d3V#I{A*aZh|0TU_0#p~g%~ zx?VmvEh{%_S&xkbi>g1fjAJ!n5+_A1DyfoPX(oP$bI>LzGyQJc+h8~|HpBf)m!94J zhOX5QUhw?D<&X8x6fwmM(8_5@j1kyTvS5@dyJe$wRSad6|Hia_dCe!-X0TSI{LeS3 zCI6dyuyyPnF!z9kX!;p)uhcY7#m`}@rQoo(P7K1G~KfTA{Ib3Tp<#VPTS5 z@hK3XjSj#=(Z4p&Jpp>~07FIY4nKr0N+D?KLX{l&lGHiSJ)G^pP&WH`Vkg|@YWTW} z-=MYdAbY3Z7?{eO->oQt!gJ8>rb-r&@0a?rueNn@SAP_f+j0rkI{31L{<*5x8W}4E zuC^lGRH1t(K;H#A7DN}Tm7~o9qk21$7A^<&0Y$AqU!hgS6Q7Z&YAIAgB|=xZX1mga z`h`5%STjG+lk##5Jy!4V-q6U>4Yj9PoR1g_LY-z;b#e@%8y`0R(tm|-B=13TesFf@ z*S2k#$XQxZ0>n(4OZJ|EUmrypW9uxGsUqY_1q&iOmzplKn`5Jye3G;d(STi@2zbn(EE{#_YVd6|z$GJCLD!_?OM6=+A!nb1%W4 z%))>CFbfMWzH1nZm2h+kD0M~!EUl8*zgI-VzR1-o?W-3N^d0)Bg}A{!di4Zrj~b(* zKXQhD8U{gtVbI8Df)JGSzSxFVMD$?H2VNH!T}mFpRX2WQXs3$K|1(wq#Y}qRqQuo} zRy*m0o~+r}Bv=Ni>pwuWKZ_rQ)a+2lV-q`#vQuNPhyi)tnGPwpPk$ixr~ZUiEW6yS3{VVmbc+_9_8qQIWb;ke z&K$b})!oDYz{+;d07mQlR@L(>-LYAmS4^S4<% z>wn1NVW+82fYhS?lEpp$KhEM{?U!F){AL}#nyp%1845?Mn7gjHR-mtkYG~C){d6Dazl4e(h?UXrczV9@(fO&|JIZgzd&Cm$NhlRVm8b4 z99_=u`*tNUxvQDX$wlQQ>m@uq;U5`X7)ig4TP%X9^!gOZuydSzOR-D>$NO zV0RCBwj!a=#1IJ7_JFS6dsjK9hJ-_>p22orKcj8J2wRtv?G1w~EllOSh0l5?vIlg1 zh1hCAJMMa{h!{~mHX`-ehG>d=a z9V|}ePYsoswF>JF?WptN(joGukiyI7`d z5*L`s)iUE4T(GQWL>lPhcQw)dy3*%PTNNztY=OHUP6xf!Q1dx<7XUNh3F9y&w9?bj zG`q2RZohVwP4e97-Kl8LE-@f5pYopM`}i?Yp&Z~T#5^9;D0fk$s}Fu4ZiT^^Ad!=GjYf~i*P$`sF;R1 z+fE~jWzxUvna*#^pv8n@{>6^`EYKpx$QW+H&=y&=)RnV*o*BYph}3L5hZlrW_(Vuk zJ<0ev6cN+Q!}+>H8+bBZU0p{HkE`oF%U#L1-duNU<$yQnWu*}y0p)#C;skap{u}BA034I5=!2P1F(ISk7*w_SLl2{nz z1^D^dAGNoCv)31>y``CVTF?WX0+|{trEhJkx`Azh)g(t=x4~U&#Rj`xk|PK+YcCs4*QV+2wofIj!%fQ*swxVmCJNm6+b}AL1$DEJ>pSSWe)qg8 zWen>Zg|$<`sLNtNpti28MMbV)U6oS7>!PNK^9j?kR}z;UyL{QZp9hn7@+RGb@`;UF zG(~4{h=>{UQAXSshtF|6c=lV;9j3HBAOgnwXLQY8fA&Mz^_fSvs}q*|*!xG%-QkEI zww_h37kiuqIh{ToBjGyo%s@{%o9FdU@-Sg5Ue;+h7?navvQMkbQ;Qwb-Prkxd-{gv zhPhN9`>AFK=wuJeTb5N|=QCr{>xz2{88m+P?3=WIcamhrtAN=QFAMJ%9uTgTUVh(c ziJFL!5@b{Mlk`Z@OsFZ-v*89hh~zvfhYb<4kVfn_RjtOs*K%hA|TFMpXVxp>wX| zrK=cPph0G|XTezhjHqc=e%(BSu7pp-kkgU^A|$KftT2)qp`JZ_UrD1DY#W>aZ!!IY zHvjPu3pJVj(FrZ8wk(YEW$ShEk=sU<;!N#xbk-9fZEMA&&>{{%xd&+;2CcuD_=A%E zar3$Sr$pnRrge3QB28o&f>#Eu*DZ;A`yt3wFP*YaXi^d@xHD>00@~qmP?p_)Hnm4@s6bue7)iQBt!<&~&jB8;69gVcw)Aip)H@^RR^M?zHT(Zm&30Xw z5t3W6T?ohJA;5^i zoL4%o78WsjR22fMm6G94P1>;7N5$8FM8ENCmkZ%ff=5lX4lGIP-B0$7E%_(=Hg$ZuurtyA(58nQv!H;VNs`Z$v1+RVHoks6 zGBH4z0^9uSEC1Ju{KV7cc!gqzoAO+2dcY2f&*=2*znl+H;;RkXJ*W1TZ!K9)Y0wAxnEr#eR=+L;^0l!0l+eE02yy+R& zg^RC&r@EUaecRa;7_N83XwwyFJ-{Qn(+7(m-bL~X6x66k9!6J?%cVqLYGu^87kgQ zkZ#+M-e}5J5t&h48k@!%m#wNglg5%f1kF)=ZoLB?VDx^gBNNrV28`INFk4qu({iA2 z<$%ixdOsI;%P1MJZD_gv` z%r!bNpuS5FP!*TI959t~;}DHJRQ8^s^SUTFd zxEpl3{KwvvM|x~`ukK__#zb1*9pg{n3U_HBIJUTM)Ib6rhMTAf6Eegswp>Esn~=>- zxYMEo?%E8C74=GNUBFT_6EGH9!%Naf9)v_BfzbnBkK}1OTy5et#k-i&Njc%uKI8Gg zJo{KNG zM7U}%BrC`dyVOx>KQdp~1cr5ZAGm(?elzp_YcF7|nkY`6BJ>^Yt8Uj&`e=Wm+r7cO z_q}ai`fyJA3#`YMmgxL`$V!2MbbQND?&EaQ@hz^cE^pH6gwcG( zJL?iLoS8C4?#LUgS=frC>%1aj(3?lwPD zM6azFsl}63_^Z!qhDZv7ha%+z@K=VFVMQK6&i3?GhA3!$3K7d)V2E`GxPH+AA^E7b z!hnY`ntY&7i1s1S5n_`GS4jt-HLjD4?1}bYvg)^0Am`$U5nrwW-p)~l) znk7Cpl5ZfeSyw6GaoI?Ka-Ajt`*q#`ANnrQYn2gLjS~S)2jfkVr16XS6H_uIYzgkkAqK*|W}y}(c6Fg7pwu>SS5*i+z)uf~nGIWmXnzs1(m*xxVB114o+}CYfT}Ai%v+`S8 z=}e%s;xSZLyZ-AU!tEMtzG8cNS^%FAvrzhd#%BU*EFRz|ce+}*0L{bb15Az;Z^+@W z>4Em{`*y0M4XUo>{f^|Aq$Uzl4!l}F*z3jY_u7N;hd9$C?L%VmkwKD#$J3L^Nns1+ z$p<#OHe+-?n{-{^{cqrQIslUVLTu~+?~=U8yc2f~!54uu=KNnQL~>Z5;3w*Y85&@+m?SxMRc*Jzr3v9%#z>s; zRu`~DvMe!uhiiTFGR(wJwH5K$N#w!g)i;TNiBPb+ok-xylL%7aJ98oyD=Feg`Y$4XIf&CoR`0>jUPUyJwAz!5#yL$KT zP_yi7a0KG5@Jh$qCpC5=pJp9qtTgxIf8~tIT$=+9r@(o&xq12Tqlypn8VHN=i{4UD z?agTKm1ur;p`uPL9`)%Vn0M3BUK4m~Zyb5(x@~lM*L&lPPybr9*#Y1>>fBKdI4x7z$SA?QD_efEtgWZD;4dDku zytRxFk;R9oV#?%mTCCWES-!)k47-i!@kZrF0AfwN*V??-bWSE$c`s{Tm-iXk;dYGT(99fFkkG z805z<^VQ>cqB5J+Jt+PIIjPjvy{2deEqsQ@;?2jkJ_`2{vS;!%9G8*=pG zB$AXm%O6ivb$uy>6w~8LyVjmKA%VQlOUmFqUT^C4&cytAlPc?+H<0?(9{wBlxD9;% zRidF=Qe%C^x&+kCYSh#CD(T!xJDGuge@E^MP~iU}6ca7J4R$!er;*>4ZSR?=&W`mVyqS5{f>FIwzQ%=?MX8Pdf6)k570%ER)m*17BXb zlaUIr_GW5*_y1k;TjZg^RLw;|YFvt@xaIOLup>Mz`=ESA9_>46jsPSd6!0 zXc-e+`%Gqaw76pn*-`pLtT`TJy4)Ohsh2VId`fBoU07nOQ-55ts%86kF?{TX(D^I7 zvF+tSv4nC{8OP1$r5oTt86U#2tENg@9@7%a zSmqu^7U-s86~)^dgIfo;P{*a#u*SX5 z-N$HlRiAS#%pCx$?kec1!HUjuE}MlH2k$jv!SKTEsTljwP-)F`0ti_D4%C5*IaLNy zZDH2`vm5wuvp8IFa(j0e=xx^2HLpWC`bqqkid5fVY5ib=3RpI}trP{EG+aCYA?Xgi zFFKfCkvjCw5-@t|nGkDLoQ6%KAn?s6ltS9Wsm#xI$wgv97hQb6J1N}_W>hpWI!D!= zUAtJ|le_(scLpa-u!}E93?hDVkd>jn9Wu7);NRYI>2l&@ULF`@&x@PfGa+^t;?R)+ zC|$(Kod>4z=d zmvgVDv?M1cFzvr*@>|211?J_Yjlc}D(E03#mPb$CIqou zGA>Ot^<;UBGrz=weV26SP+ddI;#@{4QqsD!#;XZ+K$OqKFQ)S*gtP=T?ooNe^wc7@zblTCRe(y}jgYt%*|c~*e}y0XyOfUkI25*gvT zMJ^Jb!iokH67OLGdBC{s7YnWVcXW5E*uE(uDCDaZ*gJX57*dU3^7b(BK|rsh**pB@{Ou~;L&9C+yTwLy z*&k(>(CLI6AlttxJ{ekuk!IF@q;qLIPi+F8T93%FNj1!@y)X6e$ve@&OL49VP5Jss z9TZyer5Wbbu;2y0UjHQWa6J-ONXSd6JykBe{Sk}g6=*e5cYoL^gOTJeHmB2PFL*R*F?)jpr#s&Qa-&7zLp zt9n*uN?$D@Uw2S)EWR!EPnNUE;Idq&O4Toj(Z4}2Fc2&A5BX<|%-n3a5-vGSDPfTzE?XU96=Y*xQ4VG_}e{uWNt8?md)cRC-A<>=l*(gD9ih| z{nN%JB=@yMrS!YY#l^k$n*+C_ba($BLOiWU!Se+$nE|AZhx?W^ew&X?+r=614~WR{ zNn;mh;3ZXi(7X%VmBW{sn19=YyRqQC$bE~{tnWr4BqWqJ__PJ?|8RFXoVJ!%+w^dM zGi2($V8f~owP?S)Fy15%+{g(G7;p3Q9&hn>sr_YOta6{=%Xip%njV5LJ&i-b-z&DN zCAD?~Oe@{{w@;ts?NQIh09y{^mLtdiMCBLDdF_yJhM`mScepC&XKUf#@2qOCH!{?A zf;(p`$q#zb;IJjQ0e!7pfq07U2uUB$zir_ zV#Rhd{=`9$Gp)}WVJ$Gv^aZcEp?SAK?jQ)_Tbe0%x=Xz{ekMuzPbO|rVq3W(@HE?O z_8D>&83N`Gm`leU>y+EbQdfvZN5EYn7fioAWQ?VHCgr7>y{7m!v-?sII!yf%qNkZi zF%9Ljf|Hy3FPnVU557<>@%^)1l2MWq(ENe|F1}j{UJfHq4Vmh+9g#eZF&UJSnf0Y* zhsbu~RF7*)M4<(q|9Y8K%bmMCWghsx_HSMn+5M)}=Jh=8r5@h8&X=)# zj5jU&!nNPYjQc}^VyeD2TN)^Qxe(ic_Q0hs=O0)2HwF1+`w5Iwm&``Do+F$>1~XT% z#cSWez|`{vMG@`$v(b%}Xr9zWZa+*Dk5Pq7eFL1KP#5Oan&~Pc4 zFAVm+Ork$m(kkhIaa2SS*-QlPRrjSQYe^g8nYqV}G=@8VcFV?zuFACY>wqgxze zxZX>wh4Tw-(f?G#eY@z>N5eNGQkQ}*t;gY~QNc~bdi(*1x8bKlB02U>PJ)0$+d#$= z0!y##^1{^R71cfFaz!(;#_i)rPx;x$@d z6570qacoTW)5duNy4k7tn%Z2dXOF00#0i@BJ80^2svA`t+ve+bKJ>pm?&GH_YUA4} z>9OVQjS^3tL$e!Bdp5?lBK?vyLUqHD}B9CURlQrOlD#@9(`^0dF{C5UoxZ_oK zFv?&qNn`3AM&l=bvw&-x&GFX>j$ucmN_1&$7qb<=C_*>sK5O*RphM(*g!4c6md5+e zAw%Erz92}7Htg#@Fz5-#O|}=H!3hZF)sY3%M)V-9J_oRU-Quw3(&Xm3PC4ZyU zAF=Mkb)D+vO7XPAEq4BZ1re!6E#^see+aQ-%ufer`+#d#<0R5;KABEl*NG2u)y72Bv8*n1Z9H00YFKEILC6VcN|8#N?woAMYb)$W zoE9qG#}{ZZD^n)!8m^_5X3^pfs4$DqNPx{`v1_w=##4*cn2M&S#S*FZ!y%2{`PK7{ zLyBroo2)C+R=crzNEY$%tkq@x4RB#UV)}4Cw*@g>wO#&Bp2ATVp0+^tp+TdDdm+dh zD!4t}G+^LOXT<944(Y;wfx9;qbK>*FYr*rSk2x-&Q`qOafr*y;XmNsZip59u{wK#h>r0Y3ekI#xrG4UQWjTjBg4!{KCvOjDJ{sCCbp}a0U8?2keJZ|B?;SEqP|&jaS7RqwC&|ucJx}peA`*S@XrnB7YjfMaVr;dE-uMaQHF@aBF}6( z?NagPXyq}Rl+Ic=GH)n5e$`FLm`>O)w;W|%y;1mJI0D>mK1xEi`MTe^enxTUBpSgF z@M&w8I*@tx&=Khy_3j^By|p(oB|SaQzhuz^`_PT2!P1xb!>&tqEcN%*I##k(;}(j# z(*>Mj327P$;$5`x%=zPkzq-4`>BaV3e)Ww>v>h88U494Peq zNom2jaYwS0F^n_aDYN}qvh?V2sGE3+?CZJ63_7OMMK>lR@8`|&cHEWR8auRp=he!x z&w7x=Ok#$dC0BYK%tt%CYlO)tKFjBKFy-ldKYu9l$9u}SP(ix) zHu>8`@M#PNCm7RSE-MtJndY6p$ja6!RvDY}9(iaXI9oLBlaT}arm6AluByL{c#|H+ zL84w?98K0sX9gPmaAkkCR!<>PyAfG10$ulq3lsM20 zb)%8mIVPYj5L!^)QiP&Hi8PEmp^ zU&mpFhUd){-a-EpbswLX7y+20!gEfw2JXy`BpeD}3g2lacf*C~6qffJ7Qd(k%cF7s z-4dChHQ{CopLyWjw^I(&`Sa!ut!zukYCW9*$4GEZPu+4h!x7E(7oQ(4XZ^p&QP_Dy zEQ|-3kJYven8Tho)(-Wguug2_wG0!NafX)S$uv-~^-oA(&Y%BDOL1T+_dnTrs}arB zKjm^?@*^-&iy0wNRWTm^aLf#%+Jg{irYrO-7j_PBO~;e11pLTnD~) zvR98SIJD74Y?`AeGf0Qu#uKZJB48B~tOZ-iRu!^M+SDM}qp--TM{#zZ$K@F~&5C6n-tG)V3_q zC?d!vmNpkklIlA!6>DymC%C@6Y~Z7)5a%ioZj_EwjM&(`|&{D(-O!c5TOEEH8~Wmr5#w6HsT!(gfF% zC6Wne6jit_EuV$dQ7cWX{(cs8Xjz-{L!qsBp%%^`UD#MpCC2a(1`Oq=_}Qf^mB~K;r?zSatL0jHPI=rN_+DY+!EaT zCDPA?uiOfRI{F!Qs>R|;a}Ehb&M9qJZ?-KMq>>|rJEpZn@*So zw%Co~l5O%r5vJ!#tGA0*zqcH_d|vj+x1Y3wX>AxUaMII6u=dI~8W4tDJOc=TX@Y(p zuj=(;br!2rw{Dn_L1ZaU2G(&9m8Tpv&_jc2PW75_-~74Q=QO15i>KomoNAL`UPf;O zV%+u9mV@SsyuW5@{%9-Hf2-68I0sv(+874rGsBF;-xR|jWVu+w7YIzoP0#(p%5A(g->(q(j z$N^mnV7(4i#$%9Rd|epVT?tV{G^}bXka}gYZqWMIKvYi(p6=9He)T68uNV?plsr-X zoPFZCn!Vg?8P5A=UUbv+HrMVBiO=_9Z@aZTwz9w8;7BKBa3SnFee5@eU&?aQO<4>G zGuShr#qP)?(~&*1PMy5W-)(+_@Ge|@XI&rgjufoBItFKf>D|2af0wZMOe#Db%9bi@TW6(-N~a0@M4mwHxd2aGPWAe@xRA!-&v)J<3wiO0l0B zBDjiEnx8;AGl`Xo&@cj%eOl-+w_7X&EY~;L4}kmYuLRa(xFvNTfnr@)L`1^YAq0qs z7x)bOF`D{l{h0GfcJ8z-f9Lgh#V=h;sL-kVt}!dI`+M)?K5cMv?LNuM=TfenFm6x9 zqY+o0U2`Kim@CoBc}0$P(o&60Q;@FsrN7Dd zYP1ztmHG4-F7@^4>4KME&4$xb-yMX9qp6%4J6Fi^{I$)pKfTS1pglP^mS-sUUrFGJ zPJU7}W{+r-M455c4kt^pgF;khY_ole<;iC{db~1qR#q3RW!lLUcLT)2ls_m@#aLBS z#`z$z-CmIPNoz_!lv=CQe|t`4jS#sWRQQhCi7rDw178i0$sM4=-Cq0Ord0cu>-lQe z86|Q&cP3Q!?t9IM=ica{A3Zx18~H1ru`RQ%1q((Kiw~#C>R@m@negS_F5(gAs{F)!(q}qF(a zZ@-(hN;{eOfvMNbcOMZZ57oViF!i^Jt0D!-O5yd%7ChM9AzwT0eIFD2!Sq-lqi%gY zL9<>Rq;6uZQ~#~A9tu*yGqVj7T+@S61e42d@uD6t5qJ;f3oshD9v`-DO6Ir&m_?2R zN<2;iD3V^aD=YFdS&cC4bzex0={8aEe>BS7$qk!IpEqx!xm=5ijkI5sF zfgsUXkktIqwrmEl5G!U(OhZkZ*_?iZ|KMOIj!F^` z8AHJMCJ2S36j*9F%;_u1`ovjPTZ|+%BUxoQO(QW(=EkPLq*bBXc?4XtypIzV=N!ESLPbjp zNnR}xhgHVbz+_5>$_*6npuzPsV5$L1Dr=u-f93K#HrfXB8`#fI=*=xIV0PL4oZ`nu zBrHwulqrH2g9>A@x$6>6Rrswn>fsKqlO<_h!Of)tQHF0QowaN+go1VH&xkhJ47H|= z9J!-*EFe^mo!wd(sWW3|{i?F;fs?*8VaSqLE{IW#de63&7&4W)Dq!9FZN8@slDJVP z&2#eY)%VVg%gO|$aO({g1qlHz$NHW#l_x^O8zFe&%0%Kxqa*?*MRqNs1L;nQxX6O= zw~{$~7|K6oiO_BI&^>iZ?o3yhW9vo6>+HvorevK2(kOdmGliH)^3`A6?KW6J#%f@c z*9n{9`U@#!PYr7r%_+HB1_*I`ER_U3t~_2*%YS1&u0mlMIpId<|G}kHLSoyi&29an zzD@<6dYhwPqMD(2uX2y~t$#}Go3x3BA_Y^q{|>u3EtWrsS+yr9DlO!3QnkJu$o;kc zgF!V#A*BucA1YyFGxSX2vIf>{uG(H>9ddxc{(e@!Jw@l5H3BAVIF=AUOu(;b0AMsS z>lxG>bJi+y(&BRcPsCxWWGOCgrB2B#xYt`a3|3npPQ!mtaKW_#fzX(|f=cWEXeB(Z zCQ0F6jg%AchfC`ZhYE?Y}4N@D~=3qDvP~DWuA8QiC6) zOL2i?aib~BkI5fva2+o9_oy&A&3V$aF+OZ`EQeEBM-KpyRi{|RJDGN;=zg;v%Ye84 z0nf7v{6(Oa@%;L8G|{68&>9e@{QpNz^>3;oRR1N1x!?Y`q!R0$iLznC@7Mzs;vQQT z7r*@ue^yAnX#e$(tbqw+s8{N5ptG5)d^Kx>V{uk4Wxlw5xBIyP4!}2@&m=KFm*<_} zM!-bG^y>$R3;^^vkKjx54o5A38>g**GB*>TH0aD4O`y9ELZ{_@e{NoFF>&>q6wTYywZzg!GlYy}9F zlRp3i$k%au5`7JT$(fv_3Imj7T$Wd+be* zHnm7wE3`l6u>JdUE*+l3g~)*q0RH)g%*c*mQ{8{9Y=0w>_vAb&Dh1|xzZLU5@b3I2 zW(Q2Ql(GUt44m`cOJKLMR@}BAaXkX7>6A)6jsN>Rfcb6!;Zu?!g6a}5sZS#hx2IZS zT>YCof!EP#0KD>u=!yX#m!pH4tB%VxV*y+CyY9?@Kifpn@$+NW8)>$}gWL_7V(Sn+ zcsSJ?P=}VunjynaFvWc4`-_R*4vZ8jjPpokw*+C z)7X2#a|j?I>?eUt6%GnxCY62Tj{(QgMgs_w_S;u3?bqO9ymsQn*hA<<&53Wwv!x`p zr+g8#zNHib;F#;%(~)(CZj!p4@(NggPF!|)Gl0XVey!T0?d3!_|mM{TZs!XH``w$hJhWKEcBI(~} zwA2NNfE=EvM9W^#q$PbVFD^KC%O*PMaR2q;B8lcbV#_&3Z*h z!lIV@gfBeRB{t-Gr*+(oB+|_zMhuUi)rCfECv)oB*oHa54Y|a2{6X) zkZwD=Ktz1Gk!-1qr`E#nQ&+nufVTvz`&gWGEyMQ;?Kz-k8%7X zljjdmN5d~Zl7k)Ghs8>u8_+JorB0A{+xeuPo+$-%G~0KlZ0twSH@;BBTEqA-3ck&~ zW{NNCv}8tPgfB11k}CS&nt@Uh7ExHW3$RE(8D4eL1 z?)f}8#>UTNP4NNsY)QjxXEeU6-pEw<1|GAo^|KB{_Ps(TH;;K;o5C4esVoMDmn$V= z+zZ8WQH^Mf@z;uAqr~pgvY#Bd_Xxw)R*py5!e(E>$CjCdgW9dQ`d@~^$#pnb zJ;0jLPst?F-&LtX;nkC#pNrLnIvcps8$~3p@~#N?nH7mE5YR{JB8V%I<&h?060=6i zksDgbu>?mBPvcwnI@lC1elU6Wt~^LA@*D$Tnrvr~!;a3zwFWOO3~Gji=b!*lWp1@$ zT6N`eb+r6C8^H92m>Ctz@R@+%B&j1&^~oMnksql0C$|6;~WbK!6`|Q;ytO86iX&*2DGUBw)X4d=nXk@f8 zKq#Uw?vR-ZV4ha=dV~VpYw?G9^D^>@FZyo-kH3>=I5#Xz#!!iTIl9ltolYC4c84!# z>Xdh3xe8wd0=ewkUCrQAPKM%JbKJvkkmIj`cWN*$tT1hiX?0iMm0le8pFY(~yFw~O;lD!PPBS^&a( zuniJ)2yeqD6<5rxgPTC5cfMJklZgoic$q&XEy&2)`6OllvCLB6 z-CUBp>yJXJlkjj%pbK-JDA1WB>`=q1zHd;$CUOw=L+spGf-P1a0pMKmqsnuc@ZEoI zFH^nE5QQ= zr${t50K6N~ijpSt7llcf`!2tAR-B0HfDTVHUY$r5QXP4e?BwHQY@*1Cw}z&sD!^i@__=qzS^og z#(j-d{F(oQiB+snrdE%fs#7K$q5$9kDH_?MC4=bVy*dSoDzd@>SGmOrlHHLDe^jIgi3Jg*G=nJFTP;l&!1#I}rSjPFX5ooFS zoPrv}PRp+lh1Aa8oj)^ysobdCDN7y1010AG;|~%q9Sm371pFxN))l7f*?sBlbfuDo zDUyzcI({_L2Gul2PKXM;ZfnW|ce0AF#Qk@cEJ*p| z-YYt;2iO&+1pie8s zLML#94>5TeL1U^ma0QQzn2YPV;4kmi#WN-;4VNtx^O_lA&L7F}?Yj3M9Z_b}mX(j3 z{`mYwJHebR98enPaKzgWp)o&jZH(xcsN~jXCJZsco+}NX_D7#r#>xm1PtcCcq2rnF|Gp=y<>V26Fm{0{ba2k+>H1lC4sW;n&e5-GHU|r6C z%1}-iJs=N01g}sX=%h(-q9-HIStUtJLlO*5h^h~QD99_~#|vpsoOytBTyjb@IjCOg z%tYv!0k<|QkPB;4CtmXT(Dy6Cg=P>*D{=Y6NK2`+GfQdIGN^cPq8 z0{Pr0r_jijC9aCE@I;@XQ<2JfV#l4HoCwc>9w$DH^ka9ow;!+>+iXAEuGZ;ai+gQ6 zTvr<5KL;Q_+|CK_g+9#K0sJg6MZXTKW9puJr$rx)CJi~z^#myrQ(t4(_y`i4I-zA8 z;LjJRJtuUWoqnlte}iz9<{!U`)dI0@Lb;iR1ghjyw74&c4SN^Aw@u&n$g5O=eu@X` zd|C5CB-^ga2_}bBYPb(!*{Hv_XGO30r+cg}Jmps}x8-CNPUO-)&>)SWJhdkjFMXT8mSgYU;{r%< zzQ)99=TpP$IB4cS^$Pxu_w8?JOAwkFW4A&=Rqv|w(!zojpfI`0# zrpXNtD(f9aYR%n`5@kdNvAc}Jgv{f0$gqCBu?uO-;ho5h#lN-`eyteBj@x&lA+o?+ z#*PNW#_8$l{`l&uYuq(d%Y`yhYjbA(=}v~mRzqENF4;cx2*E-MIA$xeNhvim&rkrE z<+ItionM#^hDs+!D)TFQ-S`Ns?{=3l->uJp5`s{Uh;9BTB#M3F099*3K&4&t)$if} z&;&FIJ))nGYu^v693WeS2nD_-t50-dV{YN-g-3V-AE45cH-;~RlX~P01Sg50llRzIl}^z>0=z90(xlil-kC5l8Ya`V~r`0IU2h=6W%FC41uWJ@%A&d zb!L|vU00dsf)?hOxBvhW$SdMnOEmNMR#;=}Ut%N^;xP&e9-ms`fzc~DdYd4m`7k!v zojhhD<+RtDwTI^>0~Qt&vm2=^PZ>8<)~bYsI;9`);&VHY^T8{=wsYVUaSmNeMJ|GO zV)<7@-UCU9LfUkqDfNV2y8@eIjZLa*xvzznFYvn>mDN#?s!z?%NxHC7q@aKyJo60O zGP4^pfEVM1HeaMhK5#$|8B6J|-KIzB(9<%(&WFe#BB%DplMc@hbMBsl4@z;SbVW_bTp<-jK z@{9a3Za-&?9cGTMS#a&6F{T-0Znm<0p8LL*Ec_x)_c>z1M3S(|N6J~YfI9kOW>}$9 z?o-_wW|_aO`SsSob5)2MbQP#E={KR=<%+3M{yha09%2?)Z77tyNe&JBUX0YVmZa7T zu`W4+i$i}9Ux;|^y&B*j+2vF;F5myJ}qeB-D+$USE^gG z!ps*SU8->r=Phkq3dS~a&lwetz@d2Ud$z?;`wD^trUMf_=A1!Tez7luYleX=Y7!Bf zN`@r`Qw&(iND8Ff<9+a+4E~&$O%yOT-fLb}S;Lw?(3HVS4sgBpU@+AhTy7vF1RqfW zz9A}l5&5I@@VQlA_F%U#?Nc)WH!D=o)Czq}2v!kA0}0z_Q=ayDw}jLCKnb$;ptDYsZ4 zWC)r73g8rXYB=*(SuwBQvG?NSDFd$D% zLk1WmGYuJ^v}H6A30Xly>HE2d0Z`Nu0q0%W5v^r37ssvHsj>Aop+X$BtlIjRvI4*` z`B2@og=4?brlt-FRfJ?(nDCcBwT#9hbxclw0OX8xz4Jqe&NEg9H=1KH=eQBqrvhq4 z+y@Pd0X6BgIYwfQpJq^l$N}?!B!&viB!&97l7PdtNooXPujL3coekKR_KKML<}ZL^ zK>3>8)dmJ<)N#*lQ&$B3;O~&$2^yQ{W0DtoOF^;GmHnS6WT(EE+DwM}Aaz77cC}NB zZr~|%nMydvA1={Go&Hq=3=F$+tpw+>#w@Po zv#*M-bZVL^{<|d~45nTqgQevm+a1{0n{G_!UX>?}f7~>A{S}48E|`GdiuZ*y*DCfMg-4piH+PiT=@9 z-Ic7sdaLecN>~HYm9sW9^tf3@8eVrq4hb2~UX1Wyl$21}e*zu| zaY`gDJG38!=Q^>e8Gp~IngM4FcvodfAWOHCM+>TKzqTdr&!#|S)tGhE4L}z88|0T1 z5kSfOAu2YmDrbuAVF!Kom)|91qZm@2Q?f=OQhM@4FCp*FP zhKj&Dr;z`HWPfU01|GE@h*e@&yQJVTt1bHcy4d=G_^%4qO8zCPHRWcG1`ZXt9X2fd7vuu(;ExcnhyMv<>x9# z-qnd1d`ob_NQ5qXY8wO6@Yen*++yKw#k3bbbCRkb2sz?j!^u7LZ=H4KEVg)8@ z1}&0>Z)Y99s!(l6S%@=clGIYwBK;;#AuTy%0X?qc21z%BU9VR%7t#mBBoXCiCoGkO zfe81gWXYB}3VgXB9kdvIA1JR)E{@YX``I;}b`T=jA>oDE8}{Gh42jQUK@7rdjMfbX z9WPAQzU^;>8LjO;o&@+qyiKzVat5j;fC8N_d=^El$J1BXkLBD^FpEU0`yil%Tv;D? zxX~Ac++X0YQwseBWm)R8WPKh=Uhj;jo^o!0mM~SHK@L!$Z!%%~0L=;TF|1!tzH{}e zBd|mZ5Tiz)N@>u^2-WSg0<`=nh3t=?ItDdshVAfjZ5-%aQrwerROgm~q;UVoh|2?# z!u8MbgMZ)r4@+a;uVjlsA*W>cZz_oH1@Hr1`M=pCt#YiOqb6Ujt$yNubg^H-um z|Mv;H|Leh&e;u*_&SL!6vAcgLqMuDMz>knyB4am+#{+kbr31?UPsjHDeqQy-=>rnp WJMQJljK_0{2r3Gi@?T^vg8vtG{t}P? literal 0 HcmV?d00001 diff --git a/doc/images/coordinatesystem.png b/doc/images/coordinatesystem.png new file mode 100644 index 0000000000000000000000000000000000000000..67697de62e250b5dcd5c28ab26e153d11c28d4f9 GIT binary patch literal 14194 zcmcJW1yo$kvZzUdC1^r|2DctJGI0T2_?hq_E1ozaz$Z+Z zqF~_diG!k;AVTTT+a2Hn(NsW200E&q0`1lS3Alc4E3V;yfPhQ=_f z@*7OH^cK%ln~t<5EsNF5SHYBi*oGsOc{eTCfp@g;G%>Y;xA5@rKXJ@&J0H#{ zb-s(qAj*5*c;8Yu%)H{(eMDK`@#5~###Ha{<1HLM4W6&MZt;aL=qw-6xuzU_ zETMx=mJ1NmhpXNhU)891X-)h@`^Z?=;+F=iq@1qA_D!@R@M}ggA@TK%V^k^>D}bI~ z(U>Z#8tBLmrsnl*`S0%RuvuT+F2dAOe72l9lDnUlh|A5>=WCpdTbsPG^?E-cb6FR{@vbOQ;PFb!;TU+*>p zo-3uu*%OL^OYt!%yJsHMh^I~MyTUoz^oT{(7tf5miuAlZYi|;%k-`4h1R><;q}D{4 z`jlEpDe29HFt?~QC(TgM_*f>>y=D>EOP!U#Fjz$ej1#FlW}zJd?8YIP0D>G0GB>(`mS z`#>YoBqH9QsGBjpJ1uWrYhPk&F27qD-Qh-FG73*A-*jnjC@%u&9ylst!@EF)jsZ5GzhEgE8WhKqnp)AI*d z(~)ylH%Yfll&c4RMb!E!d_U}?paJ{icR~ipxMq-tI9Bp1OSp%f7iMP6lID3*<&MoQ z(s7m$*rh=ZR?cJQ6UjtsvHmSrg$v{&e}<0i+*a?T*9ClkuQ-o>1o4YO_TV zDjPtMV#qKVSLmL)nVWlqv=mP5)rTZrQoFR|fDG$DxVZ*NN@?T2uR`Jy7{!QzX9&06w5#WknT4C8z)Y*X|Jd zHQS8ycs3GnSgAj7EV;sY8s<;y1A)B*A79bk&jh~zC$GGu2d4HVu9O1H3{MbM0b|zH z&&0XN5)?iLQYANDhe7s#2z1AHyx%@#YFW;}UeAdK@= zDIs41&XNv#M=_Mel2SVJ^IcggQG%&SHqXy#A%(*%Tx&fy3-TqNc;8O$JmQ>XGhvH) zu_vhxci;3l5HA9Ww>(Ytz2H_`9~Y1M=a26>E*1<*hUm!s3ewgw1mRCX5p4oe@$Y*m zC&oGGMn;^HHITGrr`}91n7et9o;d=0#-|S5=Mr%ku*zXhZl(IKDVBp*vKLL*f;l3` z$Of}YHFlPSVBQP97cw$=z2+a1VHnWTKaS^HS8>{uqZ5Wd-N2m6Wjhvje7n5x*Z7cc z0@21FPX{@a)Ihc{6M-SO>*kn}{#hUj=#AEl8%=oW8lLq^ngukM8rRaYGRQt8a{x+_ z^KgV)gbClIV1i0pE|EbtZVi>SJp)?uB1Nf?*}BNQnnV)Q2?&PtlenJ`fuJErb)%JA z*dYn=_;TgSKv6;5=*9+K)VDETFuN2-e5F?A|Hd9Q|^RD78CIE=|)U zqR6kJ@6a3+c5f8Gp7eC7#Pixj&WX=i^hwdx2;qR=dvtG}XYl#`{g;A45Q!x+bkc*< z0y^`Qp2VHc-$txJ-;(C?rzPZOhz?%ggE7W&la@+9k4JA2;s^$<1KruAnd@btmG3!m z=k>*&W6B(u3{^45E5(=(pVZ#eeBWXhrk}sMIaV}RJ0-NzAjhrZX}Zg5>A6~56J_T5 z6I+DugH7S8XiLDJU=Fe$)G$5St&G08zLw@Rk3%Z)-=o#zV&GSq%r$6#y*CU^p0oIQ zg2ujBvKDrt@+L-n7HpkY5>qF<0*~>1t)eZQ8?FS{6@~6tFnQ=6v(6OCm=Vu>(#h>X zSXfwI{TN$+fVl~#&Yv{d@%@W>B@@#K*FNw-^wyR$?AG;0o4*MZU4C`H@l6L==D?LC%uwh4xCIf}WoA(YAvCGIX&zz2A2j9t=v;&Fy)2 zU-3K?&wOK%U{U6v$#`%UuyHPNYliGO1m`f28-BJ^tRME7$mc26SAwWfu55yjA>tR& zN86^L{F~+fW&i(r8+|$UW-HY>?M8CqRetK{q?-?k}uB|>LPGf3i$TWCQUi?Nd&)H?~LUlUBu4~ajk`3Ag53hABC|8T;Y0K@4FLA zEf}>2x!ElAV318{Wd4LG!M^huiJfWScI{Tq;O1hGzNYk>AA+)9a6d#GBtTPm*u(Qo zBm$KVhL)yIpp`v-|1?~{I|%g)>*|k!2@gvWQ|;;NjmMSi;QTbS{R^B&v53?w7PFOM zaUr`7zb8z~WhfEVf6nlBKhP3e(998&P!1I6Tt2W=at-j~|Hr4u!=KO)rR-sTT^w4l z)eTEQ1q9S9;2Re+&)?*$Gz-3|u*ym!y0D{oJ825byq3lxKm<*N66`e7C;wA_h&+)W zb;vK;f`7hE{yj!}kV1F2FJpb%I&ByOdx$lnIUdNuZ?T+5VL0rD>t*z#W&9HN!R??S=7 zj`a1@DT)@T|1=dQBcRwWi*16&Gk-uP;KCnUkm|onW~4r7h-RI?i;JbOzyf9_N;ytp z6)c=T(@q?Rxx89rAzKDkc^-+HXiYY_AM%9+f@J)4Q)faV|rx zn63GkwDQr)bkpf>thjc`?Qm)A_M+v1T}{_D*Y&9BLRwERy+I9e)^S{B@P|RiKzR>| z<&>_wwKLQ_2l%nBQ2t()E={lF&4SPG`jxIPKNb~%% z;@%Oiyt9!p8T%bJh{CA@M<=d`yD9wba#!L!u*Ouzb`sxY636eD?s_$3IdGdSS@zm} zCpSK+H-){4|PLo|reXL;=#=bA(7q!u?`9t5E`~GrmQ4Sa{_i?Zs+@BKMLjGArxKMoHsSibD#Xi>pgD^T@#%Gpv7Pj7K@*f(`9{@xP6(#i+{aNL;~6(`4QG2_H8w^A)OtM^k+zuoz&>mlnG<=rQyk( z@4RhzbVFd{PIHQ z%&PHE_vU(x9LK@I!C{)Mg#cWz@$P)yWVXV1GfIr4{GsJ{JKAO#=hBaEgGHxlb}gIw z+*zk-oxwW0wSk+Z3%-lu-9kL;t7OlcdAR1_cZ2LOj*96+6u#e2oaLOpWkVySd6l@I z`$kU5Yy=*;?H1+_bYSuCAF`Ol$Z)X8$jH=0uR_Q$+L7?I_4~6|-r-e&_kVN@xNfCx z9rg+&^55;q(YdkW8k4wfXKteKUwSv>yCGMMN(#cshQSvpSAQbBtPYzlbWdtq?gnqy zNFUS(@yn{GG^fb4ohDUG8V+h4E>z{3%o<$&7&@#5(`w#*&&pa z(Ggu-T-;2C-{x_j41nn7Jn#1O8mL9Ky72Va^3&Wbbh))XhWQ^F-GyPT4qAG!GnJD* zy0ULgcDk7)lYOyt*4fJ2DT+kK&G*-PHWJlxuddyG&klRtJ2?DqLrG4*+c*8}_=!^9 z4ARZFARbD!>(5o)RWL$M=V--E)Lk0KRx05exh|uEdRtmjQnHEVbt$B)@o>AvPq!O} z`jT@2$6<4T<>A8X!Bj{1Y+@wjR9?Ow5#RR+u%FGth9lKACf5EzPPmolaZLJ5_*YVG zp*jXk-rt{25{Esyf5Oif9ONpO-1h3lP|Lq2g_1AxcjRkJMA{FsPgijwbIQG6@;H&% zyGdiWjB|2Dyc!AQgE0QwrU01?;5*ClqC?Qh3m7nZ1`5mLIc0s{mNlYwT0%JLoH5$4X$eA&T5aV;|fvDPWC@k%M?hv`Vrvs zA9hLBwTn}SMYvtq6rZ}hj@;p(mWR6|DH{l8id{FsVd4t5aPv-HvX!siFMM>|x`JA` zr+Z~TV}tOVPnZfm;yGHXo>|B^J|xWIEO#Z#!B^q8Z+YrR=hCZoyk>pTFhXOFMMtIi zmR~ zksX9#d0HGV)ISd@SC;%CecaT<3SLBcHn}YoH=houTI0+>0FjN^`822u8uec_3;S^Oka{(0n5H`IH@6}3?T*XwFM6!vr2oLX;=9>5x*HxG z9Ng4`U&m?G*{)b5GAQWF2DV6Z^g$ps`fWa6`-(-rkH)(qc4FQle=E+a9Oj$%xE@ch z*?6T_cicxeNFA?j*nD>YogaN>6G~TFmvy)~f+(>&cP8ZVvSaUp2D^^h&iG`I)A?co z^HI727gjfX0{xx4?&V*U5yickdWs{Lk#E{V52ToyCOoeC^=dG%K_BV5^fry-bxits zw^AI64M?rNWiy41=-nUVUFcwz8abZaRQN_>oGc!BP7|W?DEj(Sl`dYLY|V!kpdcrn z2ktYl5?Y4+bR>w?`jfLVYINPjFs*Ht~qJ#oxy8)D&_hu<&DCPc~+P+#&SvT!SHGj-D;y;y?V4^mTPTTDa#yKcR z^l)kJ(c{>#KL9-6qlz=gxvNyXZ7|C}yH>;ud5@pFA9g0^YZbm3h2B; z?n)aDD>_(d7^0kIG~e}KkNqC6Tcf4EZh`bhHM6!zdggB`+=66yxfLDT6MyP%b>Y_IM}6) z?_YkEDa~jW_mol9L{2V3rz$deu;EFaUGKN6x#?yTxSDT17N^a`Y?{VYya-8f%vBaw-`X<1StAx=Dkl6sNs9@qU!M7TW?$!uI#I z%El*|}Z@o=o6?leuhy+{WWAJ?_q?Ys{=~ z@WnU0bJu$1BDuNi<7D3qZmrzcW6aw}CEwh}@r*w04`8LnDfTy@u#3Vi7TJ9_=I#Jb zXQtys@^*Mz|9HI@Y0=RxDvqy^(9eQsKvFzwRPw9EnS>U6nfHlXdgt@+1RODh`z@D+ z`GXwu^l{hUIbj6U5%?_a&F9N+MU}fy8Jz@N>rTHLFl#r2HvbYmRRtlT@8n3t>=T+x zM91+tfd#)9z8U`D*GZIRb&1lee=PJRX}Qu_nq7b!e_I!q0E{?)*z$0H|H&2~JyBz7 z8VgJ%3ejB)W1%7G$Ppmf`lX20)d#uys&}`m#=+9+du)`GMqa zq>T=tcIo+z9c@vdnr<;nd*icUF*QXyzI(k_R-1@_8rq2VYH&2|3m?wI?T@PC9=>yy z3!Os>n%D?*+%joJGV{oH<2UYhE9Hi?!3bDDoU(L8mVf`{8Kx~sAPI|=g`7gw^n!^6 zRPv#(TPCeugidJZBtBax{7mr{XTd^xWa>lLob*AW=dZzJ_vw7FpQ%!<`__(F=YkR| z7+MICujht_WGz3v53x@WIE=lTEc2Y?+vBM_pI8YbC7E|SJ}Y3NM5M{M5__J~BNVJY zG1Omk)6Lmz&~Kb*(n1ugfb8(e@gP920Wms}O5(N^&YTTC%wh|YN>`jH?td5jmDH@l zUg-%QAED6~S9$CvS?!k)m6d=K(~9LO^3*7vWheY^5?CSCdNx2be$Of~&7e%9VfeT+ zFM=nPBCc5<0`^i{^I8;o5Y|d5)zTJRMA03?d7a<(uxgsPVsDZwOM&$ozKPIIkQQ&X z2|7v^5o?H0%fh}!eHZwxHO&R+C!zTF$^5yK;37ZcWciv}*O7wd8vUPqP4YBnNSOo7 z4;GoM-mLsry>fF%hdwqxEl@q>>XqF+UtK>fl~W{tZgpLq_p%LPnIbEGukB1uLt6i4 z-;`hLY#U)$MQg|)74$&GaoW+}inG<;46*^7$cMt3P&@VdoDY0x=#EU5?S9Xv^bdg; zujWD>-O)J5U+ZZL+X;$~yqq*HMnCsUSJ*M`1!v@`2}iAC%+NIwq=x|VDKBe8lNNuFc$_C>sE^}g%r86tC zqe@)1MK>1uATov5F@*xoP!R4Wcuf;nB@ZX~$OwPr ztM<_a zzHQ~_#f=|eAxeXl2su!@M*x!z<)*s-lA_RXXdYg-ZQ}6jmw`!s=Fv>x++{i+mHiJ@ zupEZ_@mcjin3QV5o@|;~9HZOB9a{<-V_oY&3imi)Y-s)m33$89_3^~}I7$A!;>v-- z{Ip$9!thguFkp5i&oH8cY4c=KJc4Ge7FbLI!RIV70Z=Qxx}9s2?a1l{Ie!#N-yS_( z^GzoALHeVn=|=nM>diQ!t@`u;hpUbFn(q4%F^c}`2~%3V~uA92CY zhK2)>Kfp!)4Wsx%+R5Zc*J$NfK9V^4%(`8`7MdtRO-Y-F>08cTIP{coCXovT0Jvy{ z#XB`M)nqJ3;#?s!iz@_|f%P%y;6AKdqo{wM19b%E=35a!2k;SF-@X03uCRHfrVEne zzmI(6S&$;@!68bqguMn&f?j-=k;)_>Q*+%bsok&46EUdsbj9R|P-WN(i2gey@?)22+a;4^>&<42{G?#>0ntVvy*S{Z2FjR+x-b2@ ziUKf*Ov1tEGZm)plJK#=)Cpiyo~$fNi7!l>qW=qWX5Cepp#nUq>%aB>i<~hwohpJ{ zk0BuYb@382b;O6S0m`>NNN59pdPt8R*EB5PFYS-rC8ClfN^?Q?e$jocv_h|+`+^Dm zX9gBe`7z}q*UBdU%LsC>RRvd(+fL97??eEul~sEC4%RR9mwwxymH16mghKAJ0gg4s zN%(JC{?8C=$^)Qs3-Lfb02yQ{n)r>z4?F8Vs$U!^!-+f+)&JD8n7N$KnjX-+cq|{_ zzb@9UAG-wr04EwABOA2kuBJila+DX5yfb4NAShMH21|{un*h-IeDQ)mDe&@LuG0g=kN0gNHz?%vQqn^JdrHwg7KO0jHPjPcC}9aQu)nv_&e*{EPnJ*Xx+ku51U4L1w0#01 zX7ndsI1y@d6U~x#KZ1b6Px$Ba*U=te?9zOHAJYBy(B2T(6d z#+KXTdtDX$OGy2DU{(3ocN#h{KPEif!5_jP=(`$vSoZL{X=t?;H{b8J3@G_X(9Dxr zk$YXIKnCrI^JF-_88KJ6OtAOtMv=(uI70Y9N_(}6 z*J7rFt&1cd1!!gZ&i+0+jFB#E7JRWVo^G&Q4&b)LGT4D-lqjADRv2*@C3wXR0+h;F z({C2GjziY~9%SSN+Hvc00SMtB6EK~Vr{J>*C2Lr$A@lafNOTj}a~g*`Pk@v#XNyIA zz90k+4w>;CM@1xbh2RAaNo2^l0xWZ2Qcceq@Ji|+*tO$H>oY9%Y+0hyLOEF9XSdzp zq!%AZZCjtz^z780p1PF&-2I@X;O}yOwKWK^jW|x}d{zRxw=T=xha>_i%Nf3ytfY6_ zVkf6v4}Cwmhbd;XZ0SDSr9;^0J5D zrum}jXm+nk9^C+7#^)(zo@YfssEgBY9(Bm9CwdZI+*c`|eap(Iw^Tqly4>g$_Q%j_Q2qh1<7l3|G(4W}q zjN4IoE>{bk3Ca*4W*j#Iq*3dk1%;0pLyo0QgX67IRRPxG0NQ2}MS00pRJ)_(m~+9sXem1Il#x@fE3;5*CFERoOY zD4w%WubX*S0RbOfrF>Zif&!w@>u7WT`KQ)dR@!@1GT7*+87x`kJP)@ggCm(ji%mr! z^)h%JKFB1r9zgR4+lId)$q$#_PV@sro`PCyf{@)5`%4-wfzUnC)9KL^ZinJwtlz|} zRHrx9&uu(6LFwhCp@wm(4#RvmR>=}SfVTvVN|V{B=NdBFhznL~+IIfjcckJFp=FT<95(N5xa@m1u>6Uz9t^>4@4k{H z!BxEb!&-SAFqZFcjyPMcC(HINvD{?0Rf@N$U{XTQ{Lt9y8lMuT0x+{k=fX1w%8M;d zGkNEar~4z|3py`PRu!>Qo-_;TWh=@8`fD#uB>qkbF}xw*hQ}(zdx)C!`~|^;J5*PSK4H|i{uG<;_P;P&xO{cN|;P7 z6_+5zSl@Z?iKR{On8;agisFyevR&TVd9lvH0C=(3R6ojKSGKviIl`v9qXl+(Ew0%1 z=Ifu%->ZCv!t6kZPzlsw=AT=iNe&Vs7IT29ed6y$L(ozY-en^(VGHLyv3o|7_1gC} z+n74bJO8ILo{e9K1$b;)feH;Z({JTHY&5Q&oETLHnOk6UtO`iDwPupXs!PC!y+Nar zf{$TKcdH0{bl)`LBe>tAfj+DX1*}X+QPJ`hDJmE0l<~~l`Dt%m%4n)AW;X59+fU5t zQ4R?Wr6dJcdZK*HLOX&29E26b&I_ZmX7e5=gNsf6TtEJE#uO-1@lUoQaTffs+I zrdMlG72r2yZ$qdgMQ41%5o%vfByx=#*ee@~j=JRT(!2+h*7iOdny}ZT4x}{LBtpXAWCk9H!W-7$oK%tG5>Ad`P z0i=p%%s0fF&Ua^JUe>;13-XBTzdJBt@S6oWH3Ns*)E3f?S5}wXIvH4Cyd5l>Xj2Vb+g2=QH*;G%fUcfkQFx^^DZR=Td?cGp?QsKS+ z<>BKuXEkR5=qyGlnUv+ICa0?b#~g0PK{EGz-0<~xF;VhXL3*fiq%_N;?gnGh@1v*i zw(VF$O^n5CD6ozz>kC6c5 zQ9#(I|Fq(kfW`9{&zv(HHV9ZcwAP8ZP0tox3Jw}Rh4!a9z->Eo)C6!bDqlB+Iqbkj zk~5+kVOAQRhp&#{J2^V8*IP1Ib#{mI-@7==acPWl zO3f+aQa)qF{PUK1Y(?`-X#Pub_%gU>d?s4vv;+$4C-g6l>a11^QpR{1i%kouADKBR zMwDZo2Wgt7-Y+5d*cyzWWpiR9Z?Qzr3=k+{{Ylk((bs7hv!^rQOymzxC@npHHkvjP zN**y{c1if8fg+s1G{pdRNph;F5$7{1z+Hd%tOOcYWh@FVY@ja{kHen(=3~Shs=ei} z=+vQKZEVQzC{D0KJ!wnp3cV?uefjihIWOqmGQgeW)C$$_n$*QtFLs4;mZfVsU~YKF z*t&Wn&Lm-+juB~N49CEwZ-jGK24A%LI%hJZ;PpBeABl1|8W?rQh@c<%{L zy1B6@>wKp6)L7VGU!)Rgt0AWKn|s(zj@JBmiyFh7SS(@q1%8KzV!k-fZiyYoq-R6A zv>HKVE1>j#{e_aiJ-fJgJXKvN+I#d{2mBc8lw>=c{MxE6ljJivRhusIJr^rp0;;l^ zk2W=ABTw?hPO|R+uAwgC-W>~p&(BVX*$kZl*%`68^=PCk3;k#tp$vVExU^p{WdEdQ zSyS8d-Lu*Xyqt@4H7g@_M08XZj@=l1jOX}u-xHQ`r~O*04iA(u1hqRz7)_?&rtIPm z>+cjhe>X%+2z)pH5%0gTS*U-C*xnj1dH4sjBXB<1Y)c_~KvXDjQ>HFU&3QA?bgtSX z=yI(g%okWKDL7SBbNy>ElQ9Qk_vO+ImaCZ_zRknJQ13Bkvg%wG+OTgLr~J1oSk~GB z{bDLTHyi9LMEl;8iVto}Z2K=7fJyX1%REP2y!nEbbBdnh1|XB&Q4(DUnTO>9ATq zt>S;&r_|qQnf-1+=B{DRs(!ZN;Z^}M9oirE+M1)r6zY)v z>R8?zqd7q=qjz}`g`bPw^!pnS@6|KYjdy4z`D7+}t?)3uV)VRq^At!KjRUk!#w<{F-i0Ba>-FjHD%<8APqszVa z+WDs=O`?AAUrxWWoODfTK1lab;cJIhodPOQKMZZYGHF<*C>y;p-*SVEvph8*2K@WI z6~&MdL;xlF+kAm&v}pRv^l9$gyUf&_uuLV%uS|3khK}De|AE=8ZZjkef(DsGmm<_g zQDv6cglYvNEFs}fuO=h-@9P?9IUC|`Z9)ZK*SQutx;ZNgSI;sUxLhl{DXA1eS)y4{ znek7llLL+4CqO@~tqEjHpQ}>0BqE2oXTCNE;`F&|gV$fQE_a7ylkNA|Cj?x!`QS%w z9@I2zFRA!86O1T0mpieyGqPBUC?Xj{$@PP+SmRb%f5rm&n;Q<;R&f5&%J$J zU83Ww^L^c^H3P#JJ+84GA{`j*6fU}QC9k!~Hgd961gksRs{&#r*)=#ygK&V3Wr zTWT61pHC^2KmM|niEd8RErZ}4nMjrO*pA;e-Jt{`({pXKA(MGyw;i9{tcoqv=}%gH zzZ!2+7{7Lp6RcML9wAn}h4p%jQ)6rd@R_T}2JP$DL{|EslG_008R2p6&X7;cNhm_G z$tzv1ogfM13?)L3pPJe^P6v~nsNQLBgsfZKpVAFgx%)tJ^~HxQQre0s(-I}~kifo* z%!un(2=`=83y|D+c5HDtL_!lzZ!R_eMapH>8)fdx-ISJ<0f*z<7yXFT&;Aoyio)hn z>NS)_z|C_Bg)*EY^h&e~xTdK7cApg!z2>=wD{Na(MPWaSF@3(_H;~*SbuO1gB zwBL+5a?-%Li3}E#ja$`q)C}o;)lip! zc(yoz6#k9r<`TmC$^W3NYXjiKWOE?VWTP+kypW&wE$?N9U6lLz$>(|N>6TY(z@Y_W zS@4yEjEdT?X|0fvu&o}U8dBDoM1M>QP@@?S%- literal 0 HcmV?d00001 diff --git a/doc/images/door.png b/doc/images/door.png new file mode 100644 index 0000000000000000000000000000000000000000..93972e30ba42717ddae005c7b3ebe8530eb9abbb GIT binary patch literal 649 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=oCO|{#S9GG!XV7ZFl&wk0|S$_ zr;B4q#hkad_h*YZO0<9U_pvd_Q1oDN)MepbE27HbnV7D%_GsK6c9%E0x{JlMZg7@$ zMQAzQ(zv0i#qp0p)Tcwxbe2f6;FFlL_hs+zUam~o@#tCFzR!2gofCUM>Exg5Jzp-= z3kBb}cliD6C&qG#>sE5Q6$-D`&A+~JAt$4H)P^0K-bUPX4K>`l-syfu*|fJ2t`4)m zRp**)3UBMwQLu98*Gbse*VyKJpm@&Vx;<->4{WqzlVsp8U@iZ^J9igb-sXn&J9;C} zBromsyruC#Ht&JfJr91f-ivCCpD(4>aeFtA0Y0-0K-3Itfm6x_Y#Pg8Kn4`|06=xf-swK(Eu>-mRUN)G)o z&Iznp{98}d!@pDiZf=j{%NtSqKlJZVu}y4~O>V9c&6DO!;-B|$<*a+ZPkuQl)p6V@ VKJ4(HH^8*T;OXk;vd$@?2>=_^9gP40 literal 0 HcmV?d00001 diff --git a/doc/images/flood.png b/doc/images/flood.png new file mode 100644 index 0000000000000000000000000000000000000000..cfbc86b89d3cd014a4ca78ad48a2d722209fba5c GIT binary patch literal 1226 zcmV;*1U37KP)RCt{2n@wz0MHq%3eoL`HF##L2AwmoYNFt>oEGsG@(E^&t zh8kHINeVkyK@eQSLKe8tl`dcfLBs{RAi+cvS#V8IenJGbKun`n5=!|giq zGiPS*74DNv!t|W^-goBC-0j^c4hYhA36ShT9NEn~s3p#<)D_fxAnCxKBSwJb zNt{Mt8gPkhh5iMWKBUZ2eUDk@qK@^y;|uIAy(vezK1aFFBYBL*ySOL4ytpRCzQ7)% zF&DcV{|3w~5M!n;BZtr2piU!koUHNtz$+ecdURPc*6~0dqwzL&*WF(t-abdXw@P}9 z#&qBhvSuqlONp2*z*!OVcN%n6I6&6uFz`ZvxJz^_Gxo;;;s&J)xJTCHj)3vEi`e(H zX2b9`_U0wz!^|Y$g3ve-Fn%ezu_vk+M_lV2I^7X;3L}@jQxUaJ39T<9YUN@X_L?7a zY<6Mq4PK0>SCgZ{Op1-lS3>hh0!=4NuzwAo9bZvaWB0nn33M&?3nOO}YFC8zzJ%HU zOhmoVFipIdP=B+~zOFqbW34bSNVzRWu# z8owqX8bE&2BM&RL67NY( zYA0!cA4R@bEpNXWCVLsWJcLe)c;2`$%!fSzjv}1pKF)y&jnEWJ! z`^EJR)LvaS)HYy3AP@Z_ekD-cTR^#KENp20G;|?v+Mvc)wdF5>BW9GP{Dp;tTG4Kf_j1S3##kp9Ri)$ z$Km&}m%`-8p-}xrUBkhbRoK6L-MYRD*H>M`sL4vM4n=6wG31yZ)tU`MEAB=ZMJ-qT z6nj>0*Jb2VXI8#7koTbM!k!b%jnGL{#d?5+sBe9y>3{d=YbUXHc;=XIm~KB7z1XWm zh%`V0On7;jiu$GGX2~ZF=~#7J>dG(+wMCW7SDsYSWuxx!#>EUSn1}kWa$TtXKsABt o-qmyl_2I?kgx;DoY4Vuz04QS=#tqg+*Z=?k07*qoM6N<$f{SoPn*aa+ literal 0 HcmV?d00001 diff --git a/doc/images/g-codeprogram.png b/doc/images/g-codeprogram.png new file mode 100644 index 0000000000000000000000000000000000000000..09b22bcf4e6f5dff2eaa21d0f259a0c46c5d0930 GIT binary patch literal 38762 zcmeFZby!sG{x3Wdq99@+N-8Ohq%=ySlz>R1lyo;kiU}54^Z-LQ3|+&( zS%W@%yZ3qa@BN)~u5-QbAMbVP1#9ZQ*F9_9pYJEW_$$as;^PwIf>W06eBDY)%@zc@PlNt{ zMfx@MHV71TAuaY?*-3j7rSpYq6+Gs8ajIG0mjA!{X3Ocy|S*8V8;6{i+$~H)8sTOZoeiWyW9b-84J|bn<65=GyOdE znzYi`a|g_81yP*oql0SQs@MDL-F-kf&t{MU2Lj?FI;8_HVPVr7U4QqXd=$Gil5tQRXOBn~RZ5DxWgyR-GT7xxC{0i_orlff9 zppb>xEvn@r4MZK?CTw&OdpYvpJDv^d(A>CjG-};pgoz?&W|45J>N|I<%VK1dfE&B9 z-@!n*-{5ZD#cC6>aK@&noV=rN!&N(FbJbAiu->Wi!VmT81Mv~w&i>t#6=_|M@33!R zGZV5c*9PfPQktm|Nd_UeR>z-7=jAS_{zhSW^}{j(AJ?3bWYg09WdW4VAajx#1u#E_ znE z{i9LD3dXt8$zJ2n;tu4lsZBfV$A<5^P5bzA)-H#ZarpjNSWE?TH|O}E>^Hl+SeNE1$t$E|mPaGtDhM&@Dz{QFu!tf9i+9ZG6x8g`1e<538Kld;&_Q;3$FjB1XwG7s-XB?NkZ2w+Om zo%aoR*7sATc{dfD+XFp1UU~_gzF1+sn9K?4@2Qzw3{!bk$8^+=;=)k6FF2jWR`Kv0 zoM;bB*`m8Ze4wY@F1&z9JEne`D1HKWaS^#Y1tZdNPrO_d>&3ff)$%2gl9qLp1vC8_ z#_oKR1vJjxudNy@;))WqK zV)sj>YW@93`yliv87E=a)>1%i^b8{oAR?YMVu;o(>XmhnxC zqADwgH^Wa$Ek-@s?^hI6^(a(N2aP#gAe_0a>I*z-Cd*iR*%2QFw>6I7F0$2%o=A^f-4$ z;*LYpSn8=QJHaPxN5R|CHO#=|G`XPf{WMK4Q9@G-3jjwD$mV%5dM9{9v_FnMWaBwC zL;tL{`?sfmAKr#NCq+LW_Idpg`NPYXHi-{>L1XTJ6L9{Q(CPi+#)g^x1-a|?b|?xD zJ#c2NEiww#&B{G?EPN4Sj>IL}sq#Qp?dCO}<{c7(bZ>VAhSC($MR>U;Bqk-ncuxjO zL^X?_|DQn^df?yiH}j!F{jkXF*5#=`z#&$AhXtui84vmV%jEJ!f@++F3j;d)Jr6Usd412g$;JT%{wNRgRrFD5a z#0`2sqli5KkE!(9vjCm40n5&%pOdOM#Q3Y6wd}+}L!4h73aEmrMX;YR5_)p-QTA*} z1y?aT(0cB&5wztNaINwk<#i63Pl$V_l5BNCAi*RFhBJI`7K_5Kdf9ejVFozVnqRQ9 z5L-p0K2&L};IEHLb)+U!Bsz1S>do#r6pS=IB3OJ%#2@9`JE@YcXiA{(mV^1^Ho~U_ zeBC{09ohb!1M6NABsh_sl*YbGe~Bx15dMr&@%n+cRyZSwePVs`AuBlGr$J zF*k3`wyCuEn`;3xPK1Q#YvQdNN4iKZ&SNz)@_<@}N8xCTK!|E)9r zBs?yS@}xi~gGiN?xJ!=MF%$@eRv~cJ>Z#kulZB(SHv1=0X%G~<1B*(xt6MFs$!0n$F606f}fo$ zv1*?_JSZQ!)mpjeU?OO;=0Y&!GIV7BTm*ZynN?QSsF{ox_oqW{Tbyj<6wc5QX2L+d zeE!nY2qU_~zGvSo?>_ld@o{+5xM8$j3;JWwqfhCm73-*J0agNs#gotBA8}_4tDc0g zVwPT!DqHU)FiZMbUO@IWXqICj`uX7c@%!BObCF))o`bJ`>0Up?F@nReNY-p7gsc*i z?TD>a-to;?QN87oHMYQrkW_-4UYFfa0xOXy!m4ju*Q+kHeL5c`#ctprv5^OV zeWAoPUFQsKxVft;zka)9DJ$vAu>O2ozU7A~7*-c`&(Q=Etd6HokhRBw!Nyz`b+=2N zoozC_C#uT>f}HF2GBa1$GkjEMeX4(Gpn0`5gWuWVIt_B>WZC6O!5|h1Uz%;|X!cFX z=0n$ce{Pqz7?I|@3eC?ORU*roaTw%QALYB~iJD9gOt{p_na@mpmW;{_au^=Xr?>gs z>;5vg0imN}m+|T|hs)&txw3!N^$79BSjbu#efmkm=%KVNx%Y`A*n`^V(4W%~+#bG! z9oz|Bs}6{fYpG@7T5V?EaIMxqX(bBM-QpHt4FA-~wkrAq;)HH^$Z=0){uPg{T52owEf{!giaoM1f_&MtYd^|V6N>YRQosr3X;-oxZuf6fZ~Wbq{MId%iR6Oa5Ry z(@l=f78SOhk}pGKRxK-&4$qpnq54YeFyS`0GA+V+aQ?n-u2+_DJ@b@Z3Vn%Q$|xdW z?F7iXzX>8Q9r3klCwu z7%~2IJt4p7v45&}I&9UP7Y3T(E?s- zdnTh+hAvW)j{!=n=^e1wT?m!H8)z|kop%M)Wb^ockC$G8`dc)Q9&c>lmk+kAJIp-` zx!6fP>-MOj^w_1NI#1YxUmSR#zJ&*aJX;^LN<>vBDqKC~1MjpFEw&H{m)q{{tOFC3 z+ptx3YnCn#qkLHdD||r1L%=h|PGtOZkU?Azxi zBqhZO+obFH@mE=ntGZ_tjvpUy+MjGz`5mg1P#28%w{I`97JbYVepZS1Hf7P>RbHqP z(MoS~3TpaJW_hxwVx%5jWn@qY^86vgM?9=BeZEOpbK(a^LYyW=nBA#86VJRLB~xcD zT+Z9gQbOBu1hKnY9vkC}uli?nEFLw|G1ojKvAQP=2F7+jAGq$xm8QV-yWuJyrax(k2xcc6|Jof2upU98II7a4Gpm@K4D zX&K%J_2k1H82@ged+ZYalT0V~dKN%^X-{m-d~q|9lJ9w2SGW+cxNqHQ^2W0};yn1m zguzNgWr55>3hSMX(4IK$#)pLiQuFgh4CM;+yS$d_5p-Zs@>j~e5vNS(5C#O}OUV&XR5}N)ATAs}+7=fK)}Fum-2& zZeKuXgk9w5#C{Cf`UqrOLR%(t@~CZNKs$}yv`v3n=I`n8gc zs^N|ZER5hE>m08Ns@1oiLwmoqWk!PShpB55JzE*N?A0McBnF{;3V6W*?B?b475Q6d zs0?_mYstiIQ1z}|^Hh(ky+>8-*|cyHif!eXfOvN+S~+R@B(oiK@WUcjpr>5xK4+QJRA9Wp9ZoOuA*<&_m~wO z!Bf&>3`j@QU02EdZjh&@KqE8!M39W>qv_o+mvdXwLsmT$Pb|Z=XAu_*TJRl-qZIp>jVN7Oo_(R-r%qUvWxa$ zb+++jn#>dB(o928vSL|ixUtv7sW4At=uXkyb4V4G`>pB$&cs#VGmX4`jpa|X1UZSj zJY4ROTU()ye6Y_kYb@Zl0v@7;c{43YpTZrv1)>yuoXR*mFnUG6s$iypWE#od4*@!- z^_b)?SEQK!+Sn>OLP3e}C}D7a1O@6HSE`m(aay7|$txo(P>jZ$qS~FCO|wFrkcSU` z&L0!l(d{iXrg6?XOj}@mD&Fj*_;~fkKn3;rV}}-)Y-Pi|$7mP@IEVQ{pc8*-Dp;xI zoGf;SotRL@3)l`Pe~R?1-V*u>C*eNZG@cqzXqYc*wZgayx7oT!4kZJ9jd0{-;F?-} zCL3aS7ziZ@noQ9bOyUup-Re8Cl7bVFb7G>Hh$$~9-{uu~2c)T-R84O-<&Ci3JquP&uwa*0tK$(VW7mXTri& zw!3M6?ZQK53m<7eT<+x$f*8=-y60RjdeZ?%FizzpsN;i(#Cs&MDkCQt)A!gQCUWPer9TcnvI9s)Bl%zA zS_W}YfCu#A<*yf609pc*GJ`uHC71zF4>qXYZ17gRvlmo-66=mAt?G93Ik~!rzeJ*H z?QWIm@DMf})8`fhJQUO&Q?$J5(bw0vIeE4+Hru+0$?P@v>*zzeWRklVa0U_g5T_}q5Gcr3woSpS6IOOyu|;D3_V1IKiILhqM8 z=fh~43;nfX05YMq{^FtcKKK&q9se@UgCMjF)AX9^U+baI_}mYSACsh0{ke3PivCMx z;I>KkHTxR;FHn!33RA@(Hc3mpy_%ZZw^!?~?B$3^#TBQG^5HVP>QAnvTN;Khy#pTr z{QHQdipAAH?h&ZtrDb=xYM2p*2)PWQ*^0MwMFs8DfRscp=hw>eboDOJG&+s7wk2V5 ze*3sV-rbLPPCvah_b*VS_ul*$EmwyGMZ>%;QA z0hA@aq{g!of)BqOW?1M1DC;AWnJe61I;2tTv1;1!ttBTvPRP88Ti32Pd}L6L=q2l# zmXn+!sI{rnD%sno)UprU=m=g8eg<5ewnIU-XKIlzU^s(?IdMjccdvn1o)5alc4{DP zj$=Mx?f~m((DXssHhXBDq3&9?W;oYDUuW6wQlbA&qru)uv05m3F3(xnl?=89Z#EnYeQ}%Q7 z7(TBgbu~G2eO0QMm@pZ3UR0@B`l$Ch)#(O^J@Pm)YBzBZhI@E&?I_DO>N?j^1!~=! zY~LHThmpjAI@{+4exp1+HRc#u#-;FUr2n?(KG`5);Z*aKn6L||*4WwI+@64qWmcL! z6vs)_sxv7+71Zn;%obnegIEy?tYCP~DPbS?MD53Eebd@8JDuW^n_%BQIO#{NE^X|k z;2|2$ohxMS;Y?iQmnOo4% z^$4L|9i=<#otF9~NoaVn5aOR*`x!x-nqp znHWLy<~n=Rrwt7KeZ%q=cUE4VF01Gx6B&*j9bPoQEOTW_v~YVpF7(DLSbM16F06|0O$?lG%eI~8LMVgDV6coya<`bnV_Tp{H_p4&zrb3eI? zYKF@4S|#dV0kM1+CLaD!{Mb(=vQN&OcqlwASjv1}qMBm14z(}`46T|$3+Cn8G$>e^ zaMOWKD6d0%tV~O-sb=f#s_EhiE|EAh0UKlu7-Vz7<+^!={9MKa621hSFIJyf`Z>t6 zrP6^XwQ+1LGpj_}i-&B)!zjLS~-4-eVu0o~JX7BuS;n z6vuulT9!-={(ucqRbzWA)!k`ZzlJP`X|hBHSCUH<3+GOxV5_XAfXw!ek*0vx(1y z7b8COhfx`EwyGnO(+QBJEx(FtnV!l}txvr(fC{q3odM64D95|$I7G5#ev-FmZ?yXf zw-$0vfo13ZMF#unbg0CnoLhJ@7U&k^Y!lU%Xqt)clkw@OE&ar8#|XE{Uf6lF$bP*g zBd2CTAA``6#$ZtejiR`C)_ghBvl(}cN4|shw;XX-rVq2`=>;mCQ+UB_ zR|kcRv4UHIKiSL_)bn0fZVZH`JauEu>pqvlCS6;aW6=R(I0UTl=OJ+~bEB*&`7cUQws6Q)~lEooW;jJfv zQ;3C}R+mAjse}x_xbmY3G8%{C|A9j~*MZ`cXz(`Zen{N|wK9gqZYxE? zaiK(^uE?z+xq_>nfegbRlnuoG0Fz(v3)ql%A~*FOK3&1_yz_5d`hO2Qxc=24{u>xW zkIZOfWJHBL8uRfB(VwqS-DGT;n$}7iX_JaU+^rieO{-3MPMofqvGUGmp8Qb6s?mveCumpGt6h-`d z8oy^HZdTkZg*W~PnElT0*`?thXWFDnN#`%cZms16sc2H|9uU zj_M?OXW}a&EG`;}0>cR-29_V-I3UfpX2ps>LhpZa<)@qq{UYH&T%Ivvd=J7#mK02D zm0LM7^w>FAT7D|iE?A&F-SYErl$0x*b|!2?N>8F`0A?-?KgS2Q5jXA0{l(@fLmhRM zKbWwn0rKtP`l0We@hBe$S>;Z*L#6W<0{|W7>nViPYz7{EB?SbfAOgE5uKZ;7!W&&X z4z0b=K)Ye)QYwCH#~-taDSTv&JWJAwq^$3HpazF-3qaW?W+us9=*hCp2H1IEtAO)1C(Um5` z$c;op6JKOcVPmHSH55^3Js9Ox)aSP)&tsHCpyhOQ&_^Prq5c}5aOr@XTl^+1jI7*r z(D)Z0HrcY7%1q!0l4V4$<-X%&h(KQ)ok#lyMk)ro?Q^SL3fj$zif!^qYc`{+(SzGl zV*AhniEMd^SP~jg)4j>5x+;bOci9O?BctT{f=_lP4E@gzg*S2$c^KdV)`F=O3~-(F zx!`J&YUrkG?hJhVIyP%h;l*?ol5_1rO4UZ}LxKQ8RZBz-1dTIZs1D)FtD^%_X? zv9x3wF+TS~aqjMTj;xQ1&Cmd|lcm^DE}+P_kzz*wIOxkOl#xBPSuZ%ggSaCcZ&yg!CUfnQ59=VL z_||$O^5by1RzQRFU>xhJZEbR>M5s)QvTGcjDZ`#)Tg~u%i>oCQBvZ6!q)|LoTOO={ z1G2*M@hy+{dRg}id{1oW#Z1n-j3uE+jn}^^@qrze?Dyv{U+v}S%l3do7(I$ZZ5F;# zX2W}ux!ar>G9}{&+qFVB=d(!yEco-ME!NGiYpGAZT2Ivtmx52N>F)!c!2`^ z2A90*_0fsfLw-!5tJ!fLKn-rGLN$Ty$G?VuRCzXh0^x8@n=g;1aR+&h14T=`;!S(6 z)2*SiVekiK{K@Dg1pl(b^dZ63J75I#pA>o8BEa+)Uf_!vIAm9>7zuUVAt>Be*yGRh z8TT3`{83M4Fr%Hdyu9on=WchY>ms{~&cK(R`Mo>n9b7f|;ah!mTg|^X@o)c}hBzoU z9=+|?0SufG*3J&G^1#=;cjOT9T(MBeaYZ^Fz(*ZBB&$GPC)%q-Qo z)20ft%L)d@PNQBTvEJiCO&eH7|Dw4+c?##wW&}3bEAyTvoe-m$Z}d~0KIjG7H?IMF z^Ogiy)dpi@PV*;MP)w3*>J?C+=wFofj@jRVsnD-TLGuS?UaCJ}?T-ccH}@Y{kN-$O z{|oZ_Z^^d*f(rv%)_)?u1(VHfR`MgNZ}biFjEo}0EMLCacb9zCn^N6Q$Wwsm?9Z2e z*fs6)gPn1`lt=A}#CDl=k~D-A6d|Rr{p$QGNR7e1_!o3)386^t3gVJi%G~aC zVz?%wR1a*y%!Ec{6C!ddl$^EA1|bHnr3xPt%?gw=Dn`gW4EygJtN8Ftq<3EtdB~Mv zy2mYO9|zv$0d*(kb_0lJkjY}r-6sZ6us z+rdCKMf@r5;gCtSY>~Qy)}ZP|MQ&o8*v}q)rqv$KMOh+HSIu1QAtiCvPV!EkMKkoop!#)wZQW+46DX! zihPr+n^u)!iFMxFwMYm^Y%`gQYrF|u-YD9+Ap`isid-uG8(A12j^kf=svvwVc7n5G zKPAt6@^eSo@&=UKjVUuw^HEk&VQ#IsjvUTm1rT?A`jQx@RM7+lvm{67oecRx6%E#0h6?)e^>TA#T!Rr7fW-f1uCBV2 z8OLQI^z+2W^jArh{--^eU0(@Wd74x#Rh69u#dv&ohn-YeN0jLYPU9!`xTHtkJA6}r z@H6C>Y8@HSH5qSh;UgPjC+inGW&Ertx-=vfN=KC!Jo{$x(+Z9y-R=5XKL|^G<>Ow= zLg1!ox^w+1o-yx9n(C$8ynH_VEHt)D$LD+FH~ma!yhG`c=*+`O&Lo+Up&Oub;7WZ< z#S92T&lp;U%=Lz0vU@(Z;%;3w19q=QKX#Q4FDs@=JtQ1B8U)HpSmmg}CrAP(z7+bt z(TJ@Z!@`3m?vJ)Azros*V0P))K6T$dw|_)(DCh^ShVshn4l$WfH=&W1Rb}%elq`Qi zw=JZNMfg`qLU^Zm(>v?zbDNbVqrxyeoLNg&+qAp+*n*8yl-h+anO|5lgFnnQ*N0XV zSAL69IvUe6qaPM#GP&YGeo$+kvs(9*t+@RRj5pN_3ld?j?}Cc@_^qhlxp?$wc9T{^ z$8vO%^^S_N9iLp*ac4a?$dGF6NvW7MGg(ePzMPugy=! z=xA4MKnfDm1KC4ED}V@1OZBWZ+pN2UKO%p5&+y44@1CR}M7QeUiqXKW>*q0fTSG!` zBgqgB{E#$P-CCtlBk~tHEh;5}7Z3iyU&~Aeg<|Y2uYelS5_Blab>p`NZRgqLS@@k2 zO~U{wctm(j^$ls>C^ZCYo8E4Z%?IFfECK_Ytt{zkhoM4<_f)*YFd}~Px50iH@kh7NRVNe~k#7uRA68mma zaHgk@d4cq(Ba_J*cZTgk5chtmigAH`d-shA$^w(^%ow|xWXJ|=5d{^Q;5u*sf@djM z+}Ot^FB86sl?r{TgJLzY`}YOLH3(G0Ho}Ea}(9s>-A;g$kV>y)%Ym|ac!C)c=CJ^!V8^PNw`^~|V!dBU0Swudq!?Zw%g zSBfXskXn&?zfc&YpQ72^w*4($O7>0Op}n*?q31mQ;!X<74*Uid&2Py#r(gUfMDs<9 z;J6)SP~owo?UOz^JA-x+Y?;a>z0CZOch8LhN!e35d%W6CaNHhury0YF6l#}$|MokT z!h)QOqz;bdE1H9gVXK>!=@bud0TQYcb$iZ4fdTkNp!8jks^^}3ODpFVY%GT=NdZ2C#`2 z!R2hvRIq1&z+d8xr?m4-0hcUz&#+X1YA1+w5#J_vI*OAo_v>^+9NVMV$Lo4;#bQBE zD)f&yRXpKl(!$DVB;q`NTA^*y8dn>HD9DU|!a6mHrt<)6c5=`w}=A>-u7mdPLm!{3xwVKh-5tu#}iUK!3yhzapp3fHv1hs0oG zB&_9jg(7YEii^l({c}kH#NIrVZ&l+QKD7&n#+pq^#jF#^CN&s3>R3#usp6+8rrZF0 zIS!SlCwZ*POod%s)-HJWO3FOzy`=WE-}&9S>Zz$xxhN9ic3Uy-YsBhZZpFrNWu6?- zOSL(ObU+>r&^EsT+C_3u(J@n>Sq{p{g$d&O%qpVw6TDnfu$Gu&Bf2kInmwbxas#j8 zac@g@dbjLtIQ^M7aPPc)1zbz=mtwQdZ@zmeHY=asyLV1T&(RadOsA$JuL`9mE&uTs zFz@1!ROUW2`H_;E3palWNOKk_R@>#=eH3f&3(&g8CmP^v z#-6$<)z3!)n};)WV8gV><8?&$v&-FL&~|rLL|b=n$*SQ#+lLTkHK7Pghd2}M)U(#5 z@Wi^#sY=JFa6jkDce_Q~+>}*uy5QbrZ|BCnnplLp=?I1P$TtKWKhH|W*^02eE9q;-N!u6X$UA-r+>x`wP?B7O?J{{KISuy{H(uONZvTIp( zlfvKh^*+GMY=(RcPo~qDKia&f9ZD#tBObnA>Nyps<)K5!Dtx5Ef)Mf~?QN=Z}?M~6zb>^9&+e4n#rObhsh&Yx?fs~o_o z{m=roG>~(DQ6Wb~YW0j~(keC>B3tXpST|)+Mir#c6l!)+s&f-GXp(C-xWMSL#*JKH z27S!{DpEzO(_U0%mu=t&Hj`0(YFT^JCuJ74)UQc~4N1F`wMe98nd#VfS(biAFLhjW z>KorZH{0b5nznFEe-WlwAXr=!j?ftaxHyBHwgA68rYHO5J@o62?NTWlfJMG(q@O}T z5)>^+NYro0Inqm>g4hC%ybcp?gNPCUew* zvabzB+L5EK^}a$SXF@nAH$S)MP#)*deh}5|!V7#g_hfS<($>iADRFCCxw*(JCnGX} z`oUVPe1JbJ*yU*Ykc+>?z}siSR-`0~1Cr_>p^SH4+|z=c&@ zX9y>g(vi^zHlSOqJA&rNuNE07O-IAHdhC(IvYA%G+(zFNCI$D_oh~0Pgy7Q1iWg)>3Avj-sll1bii$=r`Z$wabr*G&$V4b#!6-teb|m!EavR|K zjwN>#K3zRWUn`n1U9LPDgO&~k4%m>bmz9)3;gvVsz(RJymApu|mG8CT(zU4NtAkNd z%A&r`^+B?sKAjFYYubNE!zhBN?b6gw!J6e6JgI?tiW1)n>gt8`MQ*3O1G{Ls4~6_kX+Ll)5|VI?!Vt zr{$ro{oAhYsfFhE3H^NeuDWWK)6|02|0PJ%ID;f8mz9KlTgWCC!SB0ZwTWgftqZ8| z?_f(+_@gaxEbP_cBXfn!EX>fJF_G_+`TI8E$yD2Ry}|1CE`4Rah0l1_7~clo)TRGR z0~plt#HD_@(cp2g$*!ix;&CHQ9N>+q;Qr!WB0(pjw$pGM!@TAsTqLU$kT$IKxPxoDo+_^#-rnauF4<&_}toVJK{)H#hBm@ISvL6z5EXIqwsV+l!b-~O4J%+ zk^O42JUJGn&&)+QM!G(0sq(0VH-okVi>%UkIFlr1Uq3I!k*U9~>8fjj#3aHT$obGT zWaYT+iU?at_lGbC*U-rh*|$IA3324bOdM+zv{TBqHZM>7ZGg*BGy|G}I+v_c*`i7v z`<+{FBG${rxJU@EFTlIgY(%-uDv;YdDf_18{spa$Q7S1aV)}$zXJjch%xn-9QfQL? zZp6?1gqU$f{$H1uKJ^2p^u+~P?E^3pNtXD+15oA}Eb&ZSJV-h@dNhjVONETKBeR9P zZv)D_S?mc$HSup>T!1VfJC?;Jg+q-`ZeqZKd~MbuEq6(ac4du1=q9HxyXX(Oi~O+E zmID#TFzfM02JAmJKVG!O+Fg`t-vrHN)MR}VFrNr_=LpbwrZbr8w|>ZFZ2wEQ-|&eH zF2dA_&yGF&B_^1khCU3d2Y;33fV1lX3i|VRh0tsYc)#$^9ca?I@}i%(o<~Q)$Quu} z-VpW^kNrX^O6b6OcG3k;+D`)M946sioXoR!qv(U5q#xan<(TJX>HJXfmJNwSlbP?K zTxWV4CW zEj@ldu+Nhg-Uqx%c+-sWeJ2P-L)5H6!pS+l=Ji%4sw?hW_QWb9eJ-(wY3?+5+?;XG z`M(t;dix%}mnJtGi<5c+<;LE$(zd{x*}7M!_GCWJ#|RfLg1P=s{^_cTrS>%asStToW0eL{8I^aC1OTmp?z>S)us9pvq`^E|b6S|NvRoi`!N^=Kn^sA!51O}E(vDn;w+EYzmkgheiJg z5TJu>wP`USLMQ06zyCX2XH^6h$07OE6Zk)Md`qNtJ^Y*VM|TkdX<4gl%s>79lm!0Y z$hYN|1I(bIl#@P*9@p~rVRk&eB?^4@qKNzx0c;yTb<=X zdQ>hKM$DKX-+SK>G#wgOK>p~|8K8^;f__@)mluHSyS52X{+t*ZJQ^V~*U}6Nv*D3g zJD>I;bD8B1l1D2Bd4uZf!O;)P#np#bd0M9}UY;Hz^i2lIoeo>fsA=CmZI-Wyw7>%u zU)yoEhDPH!#-YABGXn7dbl|*8$};b9g1W}m$mW;V{mniTh|HVhhcxBufVaLWzjX7+ zAwA9VbE0$PCZ_S|kgPRN=E(bMI({yUXbhxV(V0IKPRAA$(A|jiStTMr{v+bdt{aV`tgU~Mgcap!$>>> z4|jT|MO_vqzi0t+++V6dP{C_(=KDI(V%xL}SRb?ZCoE~{%ZMc89qc1To;ZEx0HSP8 z<`pJ7^2)z7iLxfl>e=bc@>AKGDzfueCO%LRrThRhijW1T+E=q=AZkvxOdFNZ3e(Qr zXG+lZgvu8Lp791RP`Kv8b-EnGx)(p1mR|`A*8{~#Lw1AvzZNIbfGb~Jigq|d%5`x! zD-NeV`X07k%Sfva)qqY857|F-_!Rb^CWJyx&2!K*xjW?12!wxyoZf^O;5^IF;jiAOV1bwVve zZ}S!*5V{2>?t+cHzXI9ziuF`kZ|0{<1>O+=G4;_Ebz_T&>)GHzvZgXzO;EDaub8?{ zd2IPzI}AG{-pycCkJCC5;=CGhZdXEka+JPQO$j?vZWivhlrwb*X>~>BnNj44NV2Y> zZTLRU5ZRW3=a#=p2;deQkW^m*Y=JOtarO8gKy1txMyKpg&LF;GzDi;+*zibk{|Qr~ zXO{Kc7r99384M6!gdJz@fUf9Gd!c6)#$Q)i-@-0y1!L4|<^!SoP(jwOvu{)}QA_13 z6H9Bk6BZZB@#0Da@;svjoozwe17f@X;=m7!XMd3kDUYb8e;uk^=nsWbjt$JEx@Zip ztfZK-zQ()#;M8Hk!{#dJC9C1R2F_O=5VToY_L6GWW}uMpD-;J*7%D?J*Wo6!_X7PIK7Zh5(Lw2~P&S4IXsz^(jD z301rxcB!IAb?7Vuc{f{keHm=J>DywoEwHe8%qAv(gt3F}7d0v}2tiP;SF^w`v)uyA zB*nFqkeE$uH0;=K4BwJx{M4nEd6f?JZc?s&^`1u)*blH)Z~?`&s9d!9ekAm<+oR39 z&>zO^;{yse>!{*~3_Q{?Zo)`qBR(jbnApWcP1RPGbG?4!8SZYaqv0kTge-^+_HTAG<wr384)AUY40N9gjw(*N+MlZT^?~?X8Hh2!& z?g_zv91s9Ly;^Y!o<72;YJI}H#*FFcY zFGs$^og9u*cNPIRGRm%Y0|7D|K+YIcL^vF+JM`AIH&U(5v?o2xAs8My*~Z2JLa+|- zBUzUV<=9DBR5iyC%shwcGy5_ZCKLVv>cA}t(jzn~4ANf({sh9k_y*g?g5AkEMeMmy z$kQ)FLCtCWudxd*WsB~njWU*}bhp8iKA`~wZtGGIP0m`)f`ao{1?v!XBl8GO=jAEC z=T+;lLcM)%?N@g?~Pk%gi=4o;a=R*4ZFE7B6D_IeyXPyjQZiLaL)n zQ97xUYzOK2yx#cb=pN`Z5xU|ZED;@Y6O1f+sA8^?dnljAke5q6EKD{w+Dhb3EYzbw zPO&C=!qeJlCvIW3GVz(}X8jv-n9+a|SUMV&)^;xgm!2{4Ly=AzFBbAQVk^+SD*?LS&pf8i~ z?xM5!Yngm07~1j2^Ls=R;VeAjU>%5DT?xIbsFKv?=!DHzra=YvF&tL9;#+F9QFh2e zPGpLA{=A|$?R)#0JehUWNFlRl-o9e!+XC>YEqR&XdCFaEAeTsAyL7dXM~@{FsDAK2 ze@8}~oM7NG?Fcd(H0Yh$IcHgwX#+A$xB}G9))1Z#6ghD2dVHjFU+I8WX=YI$q0mha zCH7@hH8^N;+XhVv(b2y&ch!lCU`~OD8kTvp_bO@Sqw#vDJ7TRfT9VUw8fx&C+$}CX zzNyH?&EYbp_;G}Jt@8tgW=p%Di980-nV%Dzb<}68bYoh8W11jZqjuIV>-wJ@JEwN!sQ#B}1EH9W2Q-@5 zsgt?&*f;e;Fh}OUw`}T6cu_;fv~h2MzsvE1UX6nRbx++OiZ00ddD*}~0`fhslEEEP zLYk#jrSqS6-6Z$4zb`5ATH(TOW3Qf`A1|5E5|SPa_w2pCdY#P}IzAp&pit1(dXmVr zm7k08su=1jg7_eloRHa%rD*{47Pud6h(^_xHFEa)6vpCm2BQeD){qchAj?{7Y@6Qc z=)t@k4_kPiEnmH#4e4_^ewWoh)$e=qJatJH+56#@*ZDnOYZIPR zvQ;coE_Ma@k>)54WgMS*7FL2_R+)sIZQXPf3n$Gc5isZTfousMeBL3hEG0{Z%pzr= z5kahHJ|3L-DWugd1=r0eFYk4D!*MN*1W!VK?9DH8OtB_lh_rz$cV@--{_arhba@#N zR52^wnG0l{Xbec@A@?3ubuVqHbRcdeJ?D-HR!m65Ybm&|ioH6Ixo2m=@pg<0Oxng{ zXw;Q!*vb8JWhh-xYB1!x{Wl-17;_qgEeD<8&jRxE5!gHU%c%|fWmLzK6T=f8<7zA} zcM%C76*%OG5EtR6-qkQij|{21Mc5W0~eOdOl8;pPwN=(z97f$L6k zM6Xp8tl2V(NfuuqlQHpOOz+<8rKqt>1=i@-YmvlA*qj!M2~H_vUm^3&b_Ao;PvUh^y4C&F&B{$Skahc*&XEyE#C5xb3wOZ*8MCWFFYvj`0-9#_g z+T}e?l_Dwb2cBFhZ6bj13U?__Qs@TAO4h-&$-|s<-Q(RY^UvGVJt-YRS#?8 zwU)~%g7&0K37Yj@ol~j%IB;xZ`dA}*GAZ*}kRd;wjE_X~}d z#rJyuA5)s`JXJrg3z||;;=-mE|3`ag9uDQ>_j@HRgbK-)N+pD3-z%~+gk)=!t+DU> zm{wAjq_Xcjp~%iivhT*e4Oz!vFvc*<%(+S5Z@=%;^Lx&9&U4QB=lt1qbxrr&-E-gX z`~7*pUmpd;^kJ#;Zmo>XTQ`TlT-$d4Y^I>@yA$C$5&sa+wHDcD9bJM%6|f}P{dh*( zS?riOjpX01Uh|h*#dFU}OHQ2?_dhdnSbB=*^4B0!@OQYfhJ&2NTGmQ+kQwEb{FFm% zd;}P;!m9VrCg49C7<-D9<@i><@@bJ&=?2`9ZZ68@kC$1PRu*=vlYldV#kxv!%S(Bb z0VpEqj6q6wR!h)743AcvG$3EkQCeLKf~1uNhL|FM5@4cX)a_wWZEGA&`D9Lu9{ zOYoK^tyq=xtF8G65Kt<4_^Y9amojzxbaQ|9^$%v?zZr!Av%o`vUElnEZ%*t{4So*M z{_#Qor-~_n5fd}8p9+<+SM7xBD*^M7&d(Ydd0jVwzQ9;zTg4*nlCjWw#eg;c^nCLN z>k%E@Lfj)1UicBgpW74$OpxwLRr7axCdvRMz!PkCj4o+ZQ1dK6kWjLOD0TD#EFhhU z$6Rt8ng?ozjUw`8KdkN`~mVITZ0C z9Z?T~@x{kXZ%5;|&siZG!dII2zhs$In{2vZU|5hC#W|XpV`2eeGuq64j#|_KN~R8C zw+Vq^`Vx2ObY6@CR+Al_%!zk;(+x_RX|8Fvm1`w7Uu9O|8b&fZe+ZUDxwx3|UTrvTf{zwngQ-23$G z{wMIm3D=Co#BrrhHHLa%dCTAX9|KLal#hX{lhGmVMT=P<&S)E&G-zl1e=NmE4|n)J@+oS7?c*EMEs(&{aaFL8q%5fMN}_s zuOjO)=@*nYqESyPWAO|A=AsZ}JTWT0wC_!53-^&mlAJvbI>zXh;1Ax#A+#F*R{dE1 z>{T=mP=Bc1)>D?Nx!MUDy8R*=iSP`Oi0_vu@^|xV+j?2DvxRuxIkr5(DrRN@ z*_S;e!X-c+F(48Z$L#1+q+SH(F15<7UwfQ;9v~y6)&{WO)gKothG>IA*M*})*iLRu z#}VN_2$${}=!cF*>Vl;wGZghhw__MHjS?O18byS#O{NBkhybCRF=#o&`me92b;ezKz*ca1YavWTwRgA&=f!Z!>AgLV*%Apxl6qfo!A1E_V%bM(lVeq0l z;;B(D9Ute8J50~}jt4?I^s4XarYoY+9IDD=(Qk`+H4#9H^h3(CGLGgeYsYj?rnAfD z{))mpqBD6b7aVg5n&}i)g%{qtLchLe0C)&4YbOc_a3YZolw9L{LG=9*D$&Z?BT`m> zY+bf++DU){V_XCYI)3N-FeT~zj?GpnjaEP?wc5$)VSq#X)uzJuZ|=pLex+~z`gior zf7wshy;VM~+(*)%-rP5!ZloN(dF(YSzu>2_G&I|C5SHO?&|!W_7bV?~#qWOjb~oe3qKN9UU~vec8}$9KbmSa02g4W!~p66Y1W&cy;WR7Xzk<3-i~n` zx>=baht$J-7eZ%mow^!oTH_dtRVhr=X`B~IqjGS+xH#Wc<`jVn!iFnsLXGPx%2A!mRcb8IKnwMt=$Y!uqpc2xp5 zhqPk*fNrymnAX9*t{-lTe3q3unV9Aq!`vaws}d0$wDkiwD+RVw^F^d1EOP_dt~X`X zJV!C+uN&XNEwx%0f%Ir1F#eapd$->EKNGL>h1f+TU(UY-UQa;5+UcG!c^dcBN@n&? zsXSw~Ig4JUBi$Thlq2yKa>5gV!ZGI8Fyg}T+j;VsFgBS(6hHFjU)KHIrT9mFh93Wq zCduOZf01;(G=FaQ-j?)ox57~7(xyF&0Ag}K<-wKx+9dF7d-OVLuU+V9xb_41O|F>d zylw=VDZf1rfxqNN?_t9JpUh$YTjozCE*>6Yg|IMLuT2%P`@Vhf>!Tjv+ABd@N~3<7 zHJ(EwmiryekX#9Q2~cJ5l1-a6yaAXzHCVO{VApGQYcvjj)o1`b(&Sl+*|~&AzY`!1 z0l=a6!v9PF?H4%zR5FSAzby#Z<|m<1<47D}V=;-mtHv=I8aijX2bq2`TX)vn z@V#!2TRdov3Ul^}@m?=!ld5AAUEB`ppNYcwJ@0u41?BNvDRc0AHLN5C=^u&N7y?+4 z?u}_sPX_P%jSQ4h!-Z*g)3Du+XENRx?Z#!7@m_mzS^mXz*#<+%X>FtdIycCT_2kXa zVUJXuTt5Pn+Mv$wbLofEl- z-TbY{YpVeR+uWMVZ3LUtwA^UC-|-4lqzA{d4V4!+xX6tf!|iGn9}#xLgr}{Y_rWGU zQRcD!9afp?A7o@@7q>h7kDTV6!yk`I9tkeXkMN^EkR+4RLNEkLdAy7%$UHb;cYJ0j zh<8>Bc1ywWcYeCuDHW#lI7n#Qk9M65-X~l-&@gJtnMaV{`ISXNzd&y-VRU zIqHl*EiTdIr^az2jZqidGqN!113}_qKxddbk!WO0cd9^e3Ojk|G!PN$ISV=qxf@xT z!#M7^H2kz!jgu*;Z`f0TYUOp@vxOYqDmX7f+yyYFhT;f%u z`;yf#s`6UJ4Ufb+P_enmnotFi!Kg2X*RMYf`YG>K=P}Ewf;}@U=7)ODZ*G>WnsBK{ z9ZHMAFgN^7-h&l6bs5x;W5MSKbF@)=B!T}USyo4kF$eP~XBc^nEYw*%+?dHmOuGqbLn8T}XhqT%{6VB(j` z<>>#ng{6&3mNp2qpQ#ic#rJ+p4yhdQ8a;*-H^a-da(8EEki$XS$2Z?^&v)IDB?Ihit=0C$iZ zitKk7W{0eq#`Ojd&*sI)Yp?Vy5{>{J4^C-OL_EhH%xdGN619WCgo zD$J6e9U@-r(QMR|yq5a3y(^NI#fytlI%Y5}C=&T)ebFBEO}~ev@b&syn35=~T~l(t zvaR5_e5)4H!NSFTlGzua7!O_!6Pj%S=H(Xjtln@)}ICMWt}swXCNR+zX4(IRYWb z>eY{$Px(k$G~4lcC&uy|EEXYn#arophF)JRao>$HU9G@;4+ai%2wx}#yWtGvl7OuA z*KF@#pTW1mTXI^x?M?JQ*knf_uOQ@&6}iVw|ELA0Uo1{$wY<37g=@&8WeXPb*n+gyCHt-YGqw{lzuU zlir4Q-+i4cjhMcyH*{Kfv}UyJX8<=XF{{T<^uE`AD|- zsDQ+%jv(1QP9%}KWQ;RRi^)cdiGK(_?9Vx+wNgTK&BD420{yBJo9hwbl*cGnRhls}r z!Kgr`W$nU*&e&w9xt;s-+qcXnj>b1;zm$7Zlb!VN6R-66l1FdVghyt6r%aoZ(pSV* zTGRLh!$%&%3i+l>R_ip`d62a33exZ_!}) z#@741kN+pdXx{Y6@rsWa+NE4C)kr?->KZ;izGO(QHS-y^mhlSDX!mIMs31g2sbxRQ zc-8}CnDM}urRSlJP!Nae!8%z(yuX8``USiIdPXKCG`BQeo-J}icBls(s@j-6XC6w7 zJ$j#Q(p7Z8+X>IJ=G6lZyD?ejo#^<(=zV2DjSsc7)tZ7G~*MALTWeF${EN5-3{?2cj)n7Hz`1!os zVrYyHICkN5iu!&k~;E{?FcRl?mR4=;sN z+bXRFo`sq?#Aud8;9Qharea*=dI|)`NL%&Le#d;Q8Pan@`jd7H`s9^YO;u%pYW)!5 zhj;2@N)A5M_T#7DzW*luBvyxZU%dJP;`O@FTLA<1RnXVe<1?!dz+?1|uVAR%fclXU z$u$`wT*U||%_daTZx|P%OHfMcza9W;ayZ4A7+sTh zs@|(lf&co*dNX|D>V{|Cr3}Y>-8@iIG)xd_4cqtB-vuHsi!1(c|3Gg)VNcCKFvR zp8MxY$xZ;r3ZXXoTG#~?;4#JYhRYqKgX<-%J=xherUuD3fbe0g#zuNEn`u&*_!ddi zMu9KG+xBO_t`WXdUI<<6)$sHf^;M3+4Fxjul!+#_Uvxh9m@n@TkghfU;r0;|MiUHV z+GgtIhVuK|4oLVti;dK!Dp2brG!K2Wx=qN)rfDbe#IyO?w>)7HYUM)D^tkLzUfYaw zADCK@35Dk=9WBh1PsfU^uElzs^)aqUdjCc6q_)6cFd8_w5QrR-Adz=Q+(EH-r(+1l zlTW_uuHP$eqy=5#Nwp1xY6=1|IQgn9AO`n*D=PEwdPcl^pSIE-Wh>oks!($&>Zd@J z`6*DD^B#QGq?H1A5O>zWD~G^7J&CR{OjO%ffOE>L-;LjxCOT%QRKq+*Dp=k}3!NVG zeAwVU56IGoF`xqmw=Iq7+>&5V0{Lg9B>=}#_NC)@yUeY0;z-?gSM5JYasA=Fj}NK@ znoadwI%C=NmsdG|-2KaWRZgY$hdK57Lqm`PaQM=*lHRIR-SiBavXboDCh$yR0>==~ znrezce=C2>Md};ogYt6_h@x(YSu$+H z`&z2i3z~}_W%u1RHK@5G-DD5aSp2d>U!6T$0q5ND=V%Imc0Qoo%BsEaEky~s*9+7e zFGv)<$o6HriA7ULhFyx{`#uQ-px;ohHku;Be+te{mh-=|coA0NQ=k|S)d)IFIa6&c zuB8M*=YEUs&PacqxR2C#dH|DC8?r2e)UKcTdQ{a=u=GmvhG3i)ug$*ZTqvs8SDmu- z%`-6BgG1_mpdw_lA(923tg{liIfvPv-eu^VPOhmlPClUE#vcTGIkw^vkylWfyGAlH z{#o&-g?LG<=LTLswOet`m&yzw0ZwQ}P>V%jYVu}4Tpj?aV_LCuJuRzGFK%(ICF7Hw z!yRX;JJLpXlANO7F=%gvcE*1*?*_#kieY<+cp~hF>F_DP9qmbW3wh4b;<7WukO=}{ zCfN8uiLLu#UuV`rmC`SBcZJOlFs5;`mMb*-$TtW_ZDqz`PuKKWjq5=IpeQkpOTdeMhxR+pHArik-HQ2o7FebB1Ea6VVnO; zYW_mN{1ROJ>i1268S2SrLRZ;=T;XrZ>i;u${x1;`fcHDV+Wvay-!XSY0OpRP>2AO9 zeWJgkrKRQdJdEo4+j@p!Pw73IbPp*D#MzpK#Q59&e2lH)Cqq~_h!9lbRyhj*!Na@q z8J{ZmG!&dW>23m4?}y61V46SNFBRlKB$lrFROzmaJ`d%-rm1d?FAAUYO(0UKwX|>h zF$~C1SY#in4dB_)Glp&tgP4!z0?Tqjm9D#F?4`ZG9bwP7fkJxzq|=^0g!>&TFscc7 zw=a6}eFU2e@k)wsQcK3>UyA&M%bG~Wvzb!tj(4A}u6o3BKn_tp{}{>kT0WoPZxGWH zS=Ttpb!HbMP(3nMFd_*7-s%QYPucH8hZD3lrZy?s4e8}Xp=CnOzT{m|%;`l>a+kfgEzBTEdf#nR)}7>@K>Vxp z>?%H~oREoa?zw8TTf8^6tGN`r%vC*^u;{iUh=op^!gK@+K7UEVcH&sq|kffyiG129Ul zItUY2E7)!fP+sDf-2C(px%pQNaOM#pDhayOrZkq07L(jdLIRRbF54Hs2ae16SY|1 zHb7Tu+m7^&KTvP6ANLztueAMTiay&nMTxC;@}++^MHhZIMXk4<(q@{8rFZG;RWKCc zvwOZtmBnUmgw9sqz-H5^xj8IuP{#M+5He#R=mkKuT}Ll1+BM(Jx;yp555(emSO3AR z7omKfL$a6^{@D7e<^k$58=yZygbxK?^|XfR_!!fodi9c=7hy-Wkpr67wtI#{1iBhy z{XpEsxh20eCP^mwcZnH&ISo=Kn*LK_+Ghht_&7uD4FT0Qsu^@T9WL*G>-~K4o%@Rn zD@K~kU3KDR-szI!fW%Dvh{|+xc;c%|*Y?uztf64!2i?kUj0*R?-0&v^(sapW7cPS z2LwbaJO&3uc9{>tEirZ)wwb7zY@TX}^?@64gJx6p%-}Du_fPUVmVu~V*^R^(?9Y2X zcf}8k**NQa$;n*<&4~#b)m@(}U)@)lvVC{!2XfD$XYORbf|qh*V1GsWyn#sHrn@q! zDZ{&(KXyZ?J@YZ&g;iNiD3UI2xND2EB+6fl!Cjd3#iml5M+|tlMz)Inc3ig4=M1%= z{<+@ZeAU9c?|R?a%pEwUCB<$0c^^Clx}^aSzERbC0z9*6|3 zE`L6Co>nCZsQYN}Ok93DQ~sIj_H8-U^%kFUNlWOs-5XYj)54*bllOpY(2X%=90;5g zPaO>0)top-&#ZwC%2D;Ij>jo9y9g*G%bo{{|Mb%XMG-?dI)A14f`3o*Spx0?L_9aQ zmU7AJ^#xuIv?qe`2j4zxLO;gv!O(v&Le_bnk zJgrLx%kD=uGzLA2SUfx0;~h>T>~n7U?d~NgOHB~I^^RJritD9DfKdB|#>8FY6Ac)j z?<*wrdt6gX@&X;#*OkuzbmV7jW8U!OZy&y@r~%htvBey}*N*HEHLhJ7>xKw4GX6%- zU@xV7+%WboX@EuhV9?=0Z6xz{R~G9gyaTD+vQ)Li*>*t+)b%^K(PaEoGQ!y=r>-uU z@^CREiQ{R|hcSg3m!(->IYuEW7Q^&zc8U3R>*Aag4yW2t zx6WQ>Vm>q29e40WSK6$!IQNs;!#~_6jw36J?hDvr<4P+=O>`kk%elh4fGSlMeT8?Z zH^p1`t#1fQ@3hCGa?7d{ z{bh6(T|mRRMQeQ-DB4O=U`nHZPw1s?Sl%#rulOs{>#X|D|FAGocSLrn`;e#u7c)e;`}R>6>6{@s^M6XK zsihP`uW}u>r_jFe-!g{(|25G6x@>A?dLg2YORoLkuG(})Ss_7R1e6KTzFUyb@XUTjMw3$M+xA?sB4~Tf?T^(Y zKZtneDtB3E;J@pf0DB%@3HLnZIjX;_HXX}Kxq3L7A6aDHG`5LXdT=mw(@o?>tBtMZ z65N`M+p|3@$-m-%y${rKSv_^*60FYSpvCZ*mujU>h1vGvz_Q1Dc1MH7DoD?AZt}nO zP=F~tN_MWp?J8-kRiGWZi}dP@#qQ0Bwhz5}h)XWvXR0Z4c1#CrVpQukf}86)t4 z*EOtHAT-m+*9;l0#T3`K)*fE*uYybZ$9F{W(;{jfn1U8 zH$ZKwRm6yFFNn^2Ku6q<4|6dc4B6onhKTc_3bl$LXsm!dW>q=pzClzG`3ZK`9MLTa z{|bygYi@+!o~<9V`i^s4i<F%iS?f}dWk$Br&gxNx96gd6|=kuJl z?FsI7I6;2_x1zfRP?kE<@QQSa*}}#VK;)2vXImr};5k}<1pLm%_@92KW1Iw*6ZXzx zz!?S=}qFj-hD!aBD;8G9hyScIjau=zNe=9 zEvhPsj3I6Q6gLim;EqJAPy*a7-pgEfBOv3=a6$3Rxm7~XqU}K~v-5=>{7b9T;a2}i z_vGThXSTBO;PR+lck|qpggPmXGnBK6)4WA0q|ej6I)IIN$Azi02buxnD(-VmDOO zDx8j!Ge`CqW7?5Sn}l)sPE8>%Y#UGe=rC=jv}V>_g=Uw^pnP+NG6LmUdi@iFdKmG_ zZ6OSJxtQweo!`vOF(l-l#7h0)^nrAHGqVB;FSKIqEcqJBcW39g_&Wd)IlPT%a2}%b?KgC{WccomfS~OrEC?&8`1Wt zTe>~|H@~i_1DnuxcUx4w4cr*=)xo^{#mSLKa_vg+^lL9!N9^=mz_gAQ%y(rR3OKTW4qW_CcaXJpdFW<*kt}1?npJ zQ}WP3s8C=1sOQ;6xz8Kf`--!$ZocoRL#Kgex}{9@E|&NWeGk2X4UT#R~rwRm^D4!=NvGt+6ceM;}{+jRZZ z_hX?$r2LqENqulYu5xA}HX{ZY3U72)NGk02MJ)8v)zymL1eZ$BNQDZrEB48tn(5HF z9hkJF&p?6Y)n78x0xn;R$t;NeB{ZMG$n+HrL99FiyLr#pyXvei7Dv)mqyT&KijF)y z85Wg#@0)yrm78*VS6K8AXItzBm-X$5ohZFt`ph9tJ?s)}Q<=h=JYj4SbNlm1unBm0 zU8As|)?6e}wXon&kEdpMXnZ_5IOF!c)y%0#7Lbu^ukV)RSE|5-LuDGge;1iqo3Vo`8)5K=qxu!7BVOztrT|bXu}UCsq96pE)jKV zE-tvZYKAFJXUE)!GzFc7J0@^XM>g*+)B-5s{nw*Y0^*9}lk6GJ?75t8bil_D(f7uT zE+`umrs|?jCT4gOD`@$PEso^ePlLV=P?=Yjj_u+2mjxce&!B(F&0Y=e0#m%c?a#XNt5Avk z-If6I(~=$aZ`;nW6SCJQI&9wR94I*ZN4eQLWWCEe`}%EnpzSmhReLcb#3g-yoWAdI z0tRLh|HHkN68miNw`26#5AW|T+WMQV0c_b&z?(JJ|E^unHM4C2T$HSZ>0yJr2UPg zT6W~|Ryj8-#V3jVt(#`!X69!RPig-^E9u!g={E%a1a14D-uM9o3_^(Udtp?S3w>dP z-OK{83w{5ifBDn@>b?F0fBv8Rag)l~EC5EvkgJI_mTMp~O1>D@-XJNEDKfWNLmD94 zkZ*PG)WJ6Cm%v5NXIq0@t9CNt&7abm9X35dR3^`J4jEi|MqUGx)ECU2xta(-IzJ11 z-2pK6ub?kdHY;nkD|@MQI?T(RLL-qMT{ZsgZuHkpbUz?cW0z`G1g{87(MQsAe2)YO zfRU8(fsveZUR&*BH%+Xk4K;u-PmzB)MrZdd?8P$PwRgeEwSA$Z6+cslcW9;Axa7pLX4gr^Vql;R z@}}VQ6206fS4H^FjQC8czqLAi71uc;siHmyPDdB5Vll18HQS9(Y$sdSemD|C?VwZW zANOgIFtmF)Zo?w_vmi{}e`Q&`p_RY#%bbL!^a{v-i(#u7g=}gB63U@XuE2ulL{s8Z zze(Z5Lf1Dh3XA8+GuyDs@;ig@m)KF}nfGY$iF`(Low+DickkKdBB25p){zvllMBNY zOv6Z>WXK%F%M_Xra3#(jJb7n(;#uj;NGbesK@AQneWZ1H4(V$uhc7lhIq>bs+D55k z^T1+pQl#raTBbMt=x(m9T6+Ja3~-a6e{u#Nit4SsK;uSl?=&w|nBaOqO<3P010-~uYqY_lKTrER#RTeMsB zuw+VF(`U|L;4Bxk&dHO#MI{|C(A4;W{Wm|;T~COZt0BCqTI(c5?+9Dpfx&Rzq6SnP zoMi2UooNPZXA}L-R)fZY08c`W&yo6X<-AYZVsy%%G$6^_FfeHvL{dzEjmI^(wP(3~ z>i&TC82`=yff8uFMI4lH;WBrgp!T6{rG!F zMW)j*lB_q;7WsjGTGM;|S>1*BT zE@&oU7PwIzPuFI|Ih#4hJYyFIiN34hJGa_juMtb-GM}cuUNnZcAc9+}PrFGGZ#{fF z@@e4v>je||^-a?)bN4lk3iM-KSg-ZiyJB>lcLFWq9cbXw5KBe>#S|7~r@r=jC2Xgp z?7iS?hvi79a1Lmi8#ErlnJCW<_M55jJD+1(&n+L$jUnFaa6d5n9@Lz@cg%hZdIgA% zqpaeSpGHpO2z-fe6RXGy&JWL4H(|l=3;bq;OQIXOdC&TQwd5ruRqI<_ZA5d|-V17c z5Ne#Pit^Ip7|4;z@0@2&SlWttvvX&hEL?0~4F;d|mPf6==#MawjMYIMTr~Kus>TT- z3}K~+e&ut#Hqdd`Ri5Gm-7U7_Q=Xy~hR6kjUh6nTkc;Wn4q#W}C3%Bp__GFX;NlvW zCwj$=*J2<&7}vL$g2_LG~d(yfJWTEQ;RlPnB!8{tSiwI$vCBw%C9u?bU^P2P;&!Nui?!O8vn z++9bvCPvmoGn+%9dGkh$rP*`>-J3>UBC=gwB%g^x%#N^aTdlmo>2>HiN3@k^tWT_kxNwG;*e&=sB%WTHY5}Qr?$pDm1gi-Q(gD zUvm|Y+;SSdimvlq&XtsM@Jjmda-~~gNS_lSdemnN@8F9*W@U#Z(9YpfZ+uyu{>)(0 z6aw=%9(R@Z-AEoCkWR6+YruA-aeN#O8s%gftPz$d z+$_#PM5!GncZyG&f`oG&Q9~6xA(`cxSxE#erkS%Qk9qqEmQ)GPy4+k4knK3h zTy@Mwo$7Wro|fTQ0oBqRj3|sFn-x`po9NF%TOn4s+ESRf6Ui!m4tQShKJIFTs^smm+{P0Tnu;=5ji z-W1>RRPWcF)wT1T%~xI)w3I=*KDc{otAG&c{4A|( ztr_@L;;X~%>6^XZ+&sZmyG3ZTj(6R0J~zBMgOo@P@VlG&8DkQKVw!tic2n&Y`k-(d zfsS;?Kc$Ad6E)nfY6R<(3|hXPZ-_3;@HeoI8+q#o$^_Ol6KlwxkYb|_Mkc4LVqMzz z{WX`pVvkolnJ!DD<1^QaYVME+ho47cU;_vXH9-$!IQlBH4khrG1;z3g2N=5yFk9R! zD&ZNJ31F}wuBx%H%-b}9Ev_-@w z`jH0iyOD@P;LH#Te*xsSDdG^?GbKk0zGDpU4w=S+Bl)@2w4bz}lFbr`FdTSlpwEvs zC1AnifE}IQtyuSj8gha}aziPpX@JqD5MDYX%VF>JAy%aCdh3`08Z4Gb=v`Mjyu6+G z{ll=}M0sZmb5;9&IULK@Q(YhJ+ID2LVa!>6G?5!L9TY=a?6eaO#)7^VsYH#B4I0G) zcSQ{OUWa~iBag^=T}0=A^>k74(*?o$@2rU-k4RIvI4|?5@_d@jb^@K0s8(k)bED?q z7f`b`eC4(%-h>L4;CFr!FM07trO}3~wCLcbFARfGtsL_p(H&-|p%-~rrETa=lI8Hf z$Vm(80}Hm=*02bq)vUx8NEWmClnae1w(xwaxmr3Nv><(|y;5_jg27(qy*ydH(xLQN zU&y=UhF)SfQ9;f=_9bdo@1!PN`%%%;qu7hmrZ;;bQdr5cBRAw$67aEjqTx-|yFh%!VTx!y)m_*@wCCHABPH{`+lh{Mo1FIEvT5V$0Qs+xdhymh z?YA37dJqiWNaOj6!ng4Sof6#vnMn&`$u2pfm))=&;vq=g^!7RUCX?|wO=r_{q8QIE zKl;v@MvQlXr|6JB!<=sF%L)8Y48gR0WmI6rSE`7mPoC6BmSA*Z6zwXzmMIzGa2ls~ zwz~V3!^8K_?bT+)tX*QXv)z%Z#(6^aumqWF#b+vtwt)wBAZN_wyBG=k3hhTVcipL7 zINP$6HqlQY6>pPXv_D5YR~3)!UfR@mGPAb+0cfs%jMY}1b4Ee!`(@s@D@I)!Nhfr- zEn>|l5BksO{*ZBv)42!yyw}^u$%2q&auI_I~506Kgy)LZ|OEVzW{{m67P2z1!8~g$eR={*R`hR$q+d@Dd%onF z9Q!Q|mbBwuPF5-HFsQxx?X8~$e@kpw!xGjVcHH_s=gy0rK=0I$8(=!mm&n(0eS*cS z#ZI;!U6zy)rST=2{;IZ|RdYkM_emFiJSXkQ@4R5BYBO@k_FE8MGvu(}j43+gx5gmZ z7Z#Ve{W0^{ZFrR^&#WWjxdORtqIZ}HEWHA=3S1`M)1o|rSC_pL$~)+Psl>qV;1jVQ z%hzh*nWYBWYgo(JfjDx=&K)KJoan}=wQRfNM-X(fLNLVL+I&n^qR;(FZx!;ULOQOj zM#(HjNBYeD$m=teF{pCW3A~8Tr(|!+&>x3by4%zLtd!hF?jfSdx}0yjxZl2Bj!v` zy@Xw(wa&_>pB@1VYX)7em%!oi$ilkug?m$po5OS58@TPu5-+cQr~7UU_Y4qmm!hcQ zDbRp;if#}2`pATM7EnQRdW%=8F#rq1pM*_p#n)u!AAz2debS6hm}!_3WQ^*N=mf*+ zQP-B;uHr?k5ek!p53aW03m*{Ml`^B@Puv)eA*#$=Xzs$uYsA$P5js@0c77?_* zKF{@TCB%gTni{$lgz?e4g^t2j-1xeVnb?%6Cd0kn8grLXk0xeeEx^)m{SvvdIyY|!#6*CV;pbAXiL!z?o7n`RMsh@maP@ivS7yn>o|@V`rmh#HNSRg?#f{QC z73PsNmE&Su(l25J+eb5S-yB5qCPAxgga)^|f*ab5@$+4dInCE) zt>7r$jMz+{t3JJ6@WK}{Zwrnv=AFcCtscJ2>GeSvcxc&Z&#Tf7OPg0X^wuO8rbG2&da^r zx8-8n|HVw11Zpc7*zOs0mD9C9f@t5QTL`a(|LDE76}er6A9wXX(aTKPW)x}L;wg%7 zt^A6ClGIRxzZ;eYwPgOtM7TgR7tseIXsK5!#3e0i#h|N=#6HR3m^Qi^y zdrPpWi8YIH2sSwmKjLz4Tv2&K^qwrK$~>68nlMOoddTm#OVMLDAn(Qwei7l4o*s&m_`q@;5{qXNydF7l>B`adz zR=h%qpU(O^%`D$F5bT|evb=y0YWBX179L1~<_*nMJz1WsNiOIU?<-k6UO!Zt_xgTn zJvO?)B+>v*xb01nES1YWD=6w#pP5&ez4vgT6c|w&Hj*d0Bn{9{9Z5zAaLH68c6k( z6Lc~C3Q8aA#U!P~7DdZ^>u`#C-~c7so%+c4_Wttqjy$6QgDL;7BIeP=r(SVsHRlqv zdIkOG_=#efWL~M3ht4$u@uHoA>fjzhZ$UM0|C=)O22(QDWSSqZ)0E@91qZ;J)fx!E zX>He>L((q_Dt=gE{*DzPG8eSwvd>AhVkTUmi4kS*z$cUsZ7cX;i6sD|W#&ssi4}Q` z<}mAu(-F?7tr6B6TR`uGzym&w(6>~o^f6q{Jc~I^@z{mtF#91^1az&n=H!^r&THYu zN-BV=GuWj`T^N_2z`b@OOdGdm>k@u5i-O_`pZLVNuBiH*{$@+M?BgaGO~B@#%Whx& z-rJ&D=56ppWvm}^I~!cK*CK1!*&cOSn{PRXMsn`fPriQBPCZ~^|Bo3n!0fdui+RTW z4m>Q!b|vu(R7_g~GJ;L@lW1&p9G1Miza0KIr{)iva`#u%K4~Iz;*qyj>f)NJcMTrZ M+gghGx6GdY58eBuSO5S3 literal 0 HcmV?d00001 diff --git a/doc/images/heightmap.png b/doc/images/heightmap.png new file mode 100644 index 0000000000000000000000000000000000000000..777d95bea2bb30abae9aed9f387eeb42b5c459b4 GIT binary patch literal 26989 zcmce;bzBwyzVAPTg0v!tw9+Xc-67pAjUpi34T};H5D;VmiKeFsvfePDW1y~xCXg5v zUpi>2w9#cd*d~m?NlhtB|4FJbhErFsT#ZS(q9g~w> ze8c57dD|32Wkk+h8h=?ab9HrJx~EuHs0k%!s>xZDB_DHa?VUj~?+~O9z~L!>%V;QW%O9!$yxdhDnKr*L z_J-zcPnGOaD#>3ZFCXZ-L_Upq`8b4{bTiZOnOGF7CEt9#-fusEQ_h`yZ6z^ocB zXCyEvmFcKiqa0As9eLQL63ghtfT35?ttw|WZoxvZY+CyC41=0J_wjH_QSc(fR{&DQ zHQhT|;vbjg0jufLn6M(D^D&Cn5bRU^EFsOG*)O6qldi8oVW4}Xo&PdMUe(7Zc09)# zuFc05(>WEHbyP7^kKym&@K zp1*bU%|SeqYT0)Q(}|ncMedsWyQYTIynF#b)uDv<*YwHIvvZlmlLmbrAjx~^ixmNC ztrD7S+wR#Qi4eMer__aq|D)*PaVG1`B@9?haHb_`O+rM=OQ)@Mu~B8q%qA0tpbsqb zeFU~JCTF*xy@`($2b_~?*De+LAHLDE80{AqPZ!}DyywyC0$9or*f-*IftJat)rs$F2pbuAxzxqOzvi%LmUFy1@%~m!j zXKNMbXZu78(vnpyoV^y-G>zOjpq(S<%TeQB?Xf(HQGvM;*X8cUjbHA9)5@OxfQIxi zL!YLbzzD|iFj@SE%Bp*)2w#oKnB+3LyJCCf0H8qI+bk{K zXfH1&^v&T(iif9RoWfXDq22V`=SpR^5vy_At?WV-I-EMze0tLD@)~lT5S`L~E+^F= zq$T~)h|;2?cAjFS=3+QQIvrZJFf#DTU+LjJz;Dz4AMs$#N+Hca_yGXWlC+}&Kr?;- z0EqfM149TZ(f{@4gvxD-XoW6U|9ulPvvxrg0BD*TU6jB@_T5MGH8wn1rxUq&a5oC> zzO?Co46bN^$LoEOc-(8(s1UqXF`JBd;!alLJ88uNi0-52(%H*giFkJiq5;6ecuITo zTUxUCbpS|HoZY6BMYEyk89W?MNp~`PDh+rpUQj&pS$pYx87z_+SYvuQrG8T3yuNSh zd9jAnV8V}qE5s??)WoKIRNr}n*{|M>^GhQ2+Y29ultKZgb^Fv)yThBJ9S@OI)hmZN z0iTGqAOjy?w_}IS8sA`nnKF+HT11R;EreHiu0`E@wvxwLn9hm$j7#_!&+bgp1@~QI zYn)MbqTBiFlO6Jw+(WxRq*{4wK+@gjoS^KhUkq<(_l7lDldfm&Dtax<`6`YW z*NeJ;)Lgon{v6-iw;EY;Hg35GaUED}d~91xxlX|;Py8-v!J{~egaFOAd7dwgg1phn z@ZuLm^LmvH1>3W$Nl1#}M3V_2)=*spK)F(1m0A@ZeC(uDzei!qb9z#o;Ye_O89aS_ zs8U>1CQ;l>158{9cep`h`bFl^fu-a?8_&7**Mpl!PS<-#WVJl&_a05JSHC^EsjgV8 zouA!$9U*NfyqHw<_qMddFFQ7QG`-v&Q-y1% zhO6W1M^(My8t$Bc$V^VFM?srwFcZ_w;zoG&*?Q}y$K}#^^@UXiV*rKR>aPy|@m@am zvy1wkbtmIKs2<*t(KT^RM0Wp0PSr+VJwm_G>Y&=3r*|0QPyi*V&qf>I6~A&4v=Ml6 z0q!2&erX6TLjIqk@Rz(wsFVnq*SQATo2J^P_g?X2bYdoOh`@NMEa1`1Ri0~1f$kBT) zoL&iMU4B7C%2x~xebp&TK+~drAGx79(hl;K=|P^`++wJF3Hif3wxSdRr;`;pDa9p1 z3c$)!=Ab+XgSRz7psd#@)JF zIXiP!lJs}m$f@c%%}!4~8pSrY*{fOv)4_{+1;eWR**#rn142rbY+m$uR>zW}f^Qyi zyT|&$jjbmwNBR~Cafa0l0`ZYYNH%)&RSRPkecU~R=CMt$j4p@bHmr=Uh*{)?CU_{u z-$j+rjK|jCQtmmd_6K`LkXM&#zY$eayjIT&&^_Vx`7yhv^{!`q6@i3+AeHA~Bk$!i zd?PPnBALA`t61|Ku@!N%MZ}DA>LzH>Aii`>I;SxPUBNJW7)h@dBk2doek{q zkbp>*9;u(k*uh! zfA6>t*C^XZPegAOdWPUs#4ga>sGt}Xw80`gz54d`EVR|fhqeNZA?cTZRc;;>vKtbnl=Zui{AtF<%c2SAro;-; z;th?6D;7+)(d=U{j18kMC{F4Hq6f1qndN(Z_N|wD=Qi3Q% zIn85XATd*2Lt8&V?W1?++RIs5w;GqrtkwR3BpVSe$kYYWSKQhrC##k#J#Oe~&4uYD z7DbN(FJDRn$BB;;`Sw-xW-g<_n|PnxG503x@sZ?V&f5|5^CX=2S3y3t!@YcmwR~5K z?9-R|tz=5Wlk?+O2SSuHp-B?KSCmHYtuz_jm^%UGk;DL6 zIhXZEEXxt3!Ga#Q-R)9&fSW1L!jPqT>VgG zLREv5d>JWv58PIRCpE)rt!5hH*;>(0HYGD1S?D6Xep45I%v35(cCQs_OW8tc~ zX)L*ZLrARFiud`7^9$pkl!ookoU=(~`s;;0iRxwEIA+OcBH$3{;1J|5!<aL7W4p;rgl~ z%P*095krp*68i_kgllnL=JPa9+3q=AGVLw@{&DkZ#QtNjZQsK*BXA(X(PTy4*F#5! z#GYFXin9XizW)p2+!635-I4@x@9>Ujzn-~mB`}Ua$FP`)>J(w zI91%+K_oei*9uGf-B6-8qjRqJn#VcMc|%t3=iNW*G4)hUXt(Ujv6-IK(XFjiMk`GW zw2CoIa9J5MAATgWwu$)!p$VIfpeSEmPx4|La6;Vx#DMm<5J-?CPsBzxQ?HXVRSw!` z_?iWcTi}>SS=$Lo%rf+J)KWy6$44uHqgr5Ms$!VW&2AsO6*xETY(Vn^|0Z@U06+=) zM~VB-uiNn?_zto02Bwg4j(|r1%fSrk0I=`?+)LSv2NuA{SpR36)*Ju3wz--9bIyNi zn_qvXL60eZm#d)Kr4_Mxejb0S_NEMc{iQ6h#L`}kV_s9$DD~AgNo6@FEzwG5Qe5*J zEpf#XubTP@Dp%;{r6{Q}WR*`Uc|JWk^AZ`N5$Sm3ja9+g+YbQQ{l5c6S(?Nc@9Tfw zyvIEn$N?o|cn(RH9mx0UNlW@BL%k?N2gQ64YEQY}ef9(VfeD#F(W02_QLOR$&gZKM zZ$;zPy!eGi+%@P)R<}I7#z(~?)j0GrLn{ojWMp;pC(;D7-uItCLd{5~52>EO*Iom_ zu+=NEGzFNf0Ny?b9cbCV8I!v&&uT}x1a)zO(sZy zLReIG;9X-WHz(zIxqI!i8EP9M{WXR~D_1Qqmot0{G9cx_4ER0ZKJ;IF-M6xd`JlAJ zU-!iCc9pzUD?;rDTTtt)BFX3;T|(mKbt5G59>B&TMUHw5d?)|SLOnB2%{qK)YvQkf z(ohU{jgzRg@iOvhhMjG(Z|2?;>1cVZ3dGx*pd&w*s*#JGUg9t=WSZCyGKH|f($TeR zJ$DC9L5W>V$YMu1n-rbI?TG5@k(uhwZDCt28Ms-Bn*Hj4iZ%QUYv&Qjs7i;D$Y zsbx6WxiwGxQ@fV@ogE1PHVFU!G;`R9?zc_Xt1mX&o)~3%o$aa?t*tAIAY;vSh}<}w z7=64Qq(D5Jb({AwvoNP`VzX_CHK=oSIadkv^Y+6CLKZq1QFlJw)+u{zEC{(AP8|v- z;TZ|uq@uX^q%%d_^+F-kw!3(GBB1%GUqm_eYG(btt81+A`2xzxw`f9wX8L4)7dan$ z;mg6ueB9yPT~@>a#qAHBY49gM>y?;}7a5QVkFX*Z<*797tB!0Qa4M~xlLJ~X8h<_7e^KH zX6B>LeRj#m|Kg?hRAo}-C)YMwtt5AVB=^Ok-~Ip;(sdd3RLzECUVQs?pDaK$&eG$C zQu2`oeO&LOqMi~=7^>tDO&O{&N6ZkYFL98YR*J%2eORI|^Z!UW5U!T+{OJXyBm;~^ zZS_1pqDVSRyv;g#98kbxEei=?C~FHX>Nz}0XDwM34_NXzMi0OcYpx<*<-yp}DXo^S z(fHi51$~I4&J4|H(C=aXUb_&!>-KvVQ4FQ;H#n{?2%8&`SjTnrp*XdHQ_Lh-?zHW6 zU>sO632Al6@9n(Sxn7v$K{!3vp0kO!~W?EOfP` z-JS-tHq*Hy7R!hs`1|^P>+x(lHM#Dqm6!e;g3Rd1kWp6)Jz|Z{=f3gB>6Mw|X|)S$ z72j*;PrB;5u9&}?;Lp)MToku64AVVn7PKnzY`*%j_vuWxkNQ0UOZ`HA+@y;fpDr`^ z;^QK^)lMYMc@6nmEjc>+WjQW}RV+!3t&w`OA-HIlb15bIxyzM`=GdT9^E{dd}ma%K9iarUU8NY z%NwhYd-;cS8j(qon1#Eysn#{}GFx%I=;>y};~wy{CI3rQMj^`{_b{WPB&-wg0`FJiyN=GD#ik=J8mONLZ@jcS60b^F@FY z~^xYq9cEO?(H9|NlQ2QgKcw630CQr80KK(mN?FdPNEv(6=gZvbA%d}DvXKv+~#$`DBQw3f| zlBI=x)=t^SlWiC3u#-dD3rI!xA-9LO_cg4PLy${sLA&V^>fx#u#E_MvYESz9#`XI( zQnZ?IQIk7-35R?)LY{4$& zx@zeh9qYF&Yild3*Tw^92?F=gpJVelm8)b_QRp-r_tYl}2_N~MSCi<@)4mb5pX5rG z5E@aJBD-4j*(aPiY*O4*5yxihM(fcnAzusB>)Y7O9^(zHFW&3m;_Bzo7Up_u##aFk zNkaACet_-;bBW=C^fl>elGo7eCXEg!zgFrWvyj8g+wAKrrS7mImavc6L*I-PeIbN@ z_l=Jnqh>!x|Nh!Gl96MSg^{B0V=gqZYAx>|SULMcet&A4wTaKdTPw+~!}}46?-ILG zB4eAv6;fXs7`Bm0w|#>gG=|Qm^rK=};~D4o-# z^%U2S&oHM|RwaKs%M%WB=UX&&pD^7UIXH0WXwnWM0fTXrHft!IlwEnYr|R4 zWeW0C=m&;|9wm$T&N1I3iVO@yxlC-jAn{y-nQLGc;KvxnKc0;>sQPga=~+=u(|K4^ z8m`Fo7szQ@Dl7}gpjkcpiAIqra@{Jjy(RJC5OaCVYO;dF3J(DM4lK2UBdtT}0YHHq z6$$VIB*4AsZ2w}DpMP%OdvPpIz+4siJ_I5V17sP4%%imt!CXiofH%U*o`Ig+^ zelz^ML(=*PSW4B)mQHDWmFm9T#3_#iq>(~V^{E6l?=)S7 zTrvoOM{I;^2Hzm8dZRjlX6t9k7$>Mao4*s~YO}4Oo)D0gQ>Cp^I8A60KI2 zW-c`^+BAF~m9q%#AhF1BpQ1ATHO;FgKUR5SthTJU6oL34emxZh$yYTT6YzXaV@NoD z<+;ljIzA6a$i&s3K9h@ywb|;nnI3gF2!(sZUSpg2j$K~5I?VN1w@e?q z;(qX|nTL;fBXFMK;i0B6Rd^>o4+(e|y44kgDp~#LM}a18PuW;LnrR2bU3q3xrhLaG zX6Qi|@BGMDT}U9tS`EsX=kq93f++(E?X;*@?LV;XUcp}dB3#j3aO$TX(&w^jmxnJD}MPazt{3rGzp1+_2Za;#EvN(Xy|+Gfitrx-6qsVYzBhsH~ypMB17s zlbnuKUFfbV=Ld!g^PN^t4f<{pXq8)oURH&mjeR&_uhz(^SHG~lSMk}QT>eNLnYxnF zbof~ra;2~5rIItICXqBp z8$GMhX7}s+Y<+{-Y+H*3qzO?W2)I$AIa>`zOl}U1csL=u_Pcxz7K3$`>ci@s1Y zXC~sUn7`x{#yYIa*sg8*!K6GpT^^<(r7(*U!lf5uIfFXKEU9N%2UaWNX|XtJj>+3` z3%BIX8Er1E2Lc~D*|ux(!RIKB( zxItQ}R3Ibw>U1C=^S#C@{dy}jPG=@e7Xm$NEi&$B4XE1hNxJlC?sfCQO)vNU#)lX5 zg87KJ!NB0zn>uYr>{AmrFI?-h84N;}@>-?aCW-jRpcEjkZ!w{c@8vav^1gVRKYwS4 zdz^l76*HW$LT@v)_*c3tR4Y%z*|M$9g_VI^wmYUq$!2A^E=T>@;I^)jf2PRLG{^Wr zuh2#pwLTqI*9fY=5n@Yw?P-#ArC`(5n-e0}s+!tUTNb@S!ir29>Y_(DZW!F`U7NqS zXgo=qXB6pjn~_Wlx}BrBehcxmuIG8)o3p_8nf0vW?}+#NOh$c?k69jNcg*NLi!%ON z+6U{G#5#QY8oX`n;B6B^+E>gG=!(%h8SS(7?x}{`6C0FZ--bnu z){VZQ-gI@2nPFE* z6Ux5G8}}NJorZ6p3w)3bqy+G3lBU#$pN;Z_z>mwjDr`9(=s(@b8~OC+a48>R!=%7) za*wU5#ItG5Q)imlBcb;>M=m(qZs=6t ztvUiz@PW`#eU^aR?!e}7PA}7KX3)WEoMFc8LDMC5!^xQ5ai=n5sL+4&ohNcM+F1_^ z`~*#h0=oLUQz04MlwKa%pu|AsH~3?#?{@LlGpzCG*u-)>TW@E}{utCxXo-fz>;rz$ zkGp;hF%-HtVJT7fBtY!j*eMtN^IeA;c(9GZB%dwbC|bbF&c zZC2!Kf{A>Wl-oqA6mBo)AyMQvJjw}KU?K>wx=Ho9oIKeZymdg7Y*azuRXu9A?S!Zw zPy=o+F>hHA9d3I=^G!EZW()vuey~8-H*hie^m0D*wlN2wY$pb9gmFFCpHn4*=>+%+ zriXvgY5qH+)8FN#k*%og=t&$&bYp zvu;ny4ab$J92U_2-f>6_?8u%!V2tUt(qg5ie_Qan0L_$fdhCesx)QZ$Em_mK#PR~0 z@eaR=v5A==gBFM|jUQ@~(C0L!4sQaT$tbc%QiPz?kr<{Kq!^WM1}rD!BZuV)4zGv+ zzdRm3G0Iv6t2`p@6DeLPE45Z9tK0obLu$(`!K~$I!ccYk$ImqF;&3}FWpOQIjCxi0 zbTZRJ1v9|1s`GdL9sL~Ar+Bzvz9fFm{L7Hxwe+aIOF)zz3G$f69G2c&E2;A zV)y1COrvJL5Sp+ElYBsPF5BQ05)iL~{}>f#v$CkP5ISU*#x45Q}ZZp<1LSD_5YEHRs8{|4-WK|B|6x#I+C`ITAhWPu zPEeZ)d+!>??~0tzPIO*fs^1Q5&tuzve(;L7dB1dn!+=QY0}?>w2cBh+n&xX|Qg|m~ zyu-4UVTy@XlTxMU@}?a%x?K1ZrwZoayC_Dl)=iMUW3}WhFE4wodC0r%&U_orQBKqj zq%DI~k19;!YrT=<5B5Ukz!}&pd=B_M18c|Bq(4%sJvy?`OQTcq7XYC2SMiwWcc(xR z(S8P{DL=Y@QBVF;!6|THM0hn;)o7Z6RDSvgf+XtGcP~i4Fs%XAAFwl)cZBR;gWAV)Uy4^V4A0-?S@OP zzw#z+^uotZqyzYFFY)%M#%fKnj1leAWL9}b(vB0Ko+I>S)3nFaHumhORm=)r&R?{B#DcV~$l~{{44k4yI zLRRI?$@b4l>Sbl+nNsHK7PggPJN2KJh>+MyDOILtvr9d-(onO5PIFURw$2)U-iS6Y zFdIUDjuWt|VjnT_brns-ozM4m(?_uHfTLP^=#CEik5IA`aQ9HMpSw5@I1)=qL*}RZ z*@1-41-NFdMLX__!_k&x`gmrNkd%25yYBp7&%rc$fZve-(uvs8s9*_FFsw|URA<;a zh;ddeqs9iK;Lo)EAUoC@7Fmk;`1;qj>!y!8;-9zTBJb{@z7G7gie=#NE{Ls2$;?2o z$T4nwqo$XvIJRPI?WJN+1&Hnr6EIJrSey1ve6cnNx=Np1w2TFC8TmH2Fj!R>IKk}3 z_Sgg7{}yY$5yCJ`g zVajLo6MI_)>vlfcxX;&Ku%=D#wvzGv^3NNy5ry?@Zh^zKLPDVRujkhy5X3v`xV|Pt z+4t^v4}kUf4}twB1^mzEghmez^2SQ$-RHZ3vOp#8yPo%y4U~KV!T);j|HkOl$d2Xj zXNT2V-pupSU_Y2Q4gXs8X*}V11_y|cRQ`3;`GONf|5#4Fv)(mdRd~+UM|4|1T|I~J zeVL_UorW9t=1>d6oRkP5A?sj-&-4~8OT5cmZ%{roCtymbayCATnsB~O)caM>Ha>lO2!aR_b9XR34yPo#c67M&`*K0d4 zevnfn4-s_5grrY$g~BBLTcKNPPUAgcW}2*pW%3ram3D;R5eTbtPJu$?9_aPH(vd4NE)-fW& zFippH|3_K)_d8?KQ6Bk7>OCCuA@4BoMj!EBgiE=0_+U~`Vr3P!Yo zLX`jw<=WUB>|In9$7JNm2P%Y{`JcC! zghj<$EW*Tk9#a*NkA1?lBGbv;&bhE-Q^(mk`v>`N;*6RIH!bqE&xXqvN$E56)Qrhi zE1H~A%)s!#9Lp3Pf#M)nVpeVRCG#!ocPgZto<11s&da`QiwZeuw8M9)I1wY!W(LQ| z)Bv-=vhg#dG?U10up3cjlHD4q?ZB32q0~6^I)!+lMan`k^N8cZ+n)v|2l+}~T||CZ zr-oBABMrJ;gM*_=*pzrw50FXk_fR^(FoqHs*97kedXPYUPjuZ{+mpO~>G zvhE0HncG~!pmKUA{uZ`cV|6+WfbFE)Ii3d369u4plge~NDbbIUt9qOE`C~UMEM-*~ zS$Rr#$)K(M_zrsn@)1+{^PiN-TG(k99SL6(7HnRL`N72AKE*O@rE7m;u{!g6Q;fCy zIuvVWDvlRq@q-irGqp@E!`m`68U_?dxv%I6~eg%;N$zwjE)!0ZMNt2n3YjlMxyrSR&U}~1IKy2uT6+qosIjwk&OV+ zFW}^AJZgl~woT@n zdp>{eYXE+@R~#&si;Qez%hGjP$ujgNtwu6iB@Di~zc2+!L$aQVnJ*?IvloelUvBnG z;*6r+LsF=MziRX@GwyA$O*k2@c|vIdMDHFz&0W~a*m!>lR@JEQz17Rh@%K)n(=Uq2 zsrIf4>g|1f6sTfWw`c$&W*#X1aj2MuF*X8vhtMzYnGwf&ZnD`Vq*@4FSr}u3q!IqIc`xElNUGBEVwE@QY*LPy@6C-a`M8mdjky&htKE>^M$EZ=&RffnV zRqbBmRnO4w0%%IYLw^MPGiNpt7z=xzJ{b2q6i=*|? zBQX+7<%P0TM4<;ak;wT^+@6|r1co{ ziJkQ(_ttt2UX8E-)HyZ?4S1%k=~4W1V$MT$KfnpQ`cm zKtEK!J)b=<=c`j2uC&1hYJ$kf&FW3n6)phK1zA(q<1A|}%a0s3Xlxh?`gq@w{XW0* zJ*%6~dTHJl&(*5Vw8~)P@<6kSP4ObSfi0djBcty1lBq+5kKhY=D-F302HSb%Pe$wV z;b$YqUP~t@*M`Dc%PM52s@(!}aFD6?CG?M$JjxO}eTs3wcR06owF>_}U*bOH8lGG% zX5kXCyINHFa(&ZHKv<;LTHAM4AqRie^UdYxd+l1JLDSkVwYkKfR(A}vpK_RH8^-nq zigf5_dQ_zLXHKejc$x{)GNON`0`_xKo`+x&6taG!e?tHDQ+(H~9z$}P!sHEY`j!|h zDeT;ZR;=Izp-}_x?CxPwT{EG19xj)2B-~#3$MR8a1Onyfm7y*Z<0{>DDnA9$Hej;% zB;#JF#J_b`l}7Sqc*eQ_d-Wtdh#U@6CDOq=AB==#k{5lZ0c7OapN&3nLkoj?PUWig z96q`sGc9(%jpn2T*QJ`)15Nlm-0F< zZ58wIf+lp6ej)jhqc?4}V1c-Ab1%P0YA1M!51-27xu4CtF(fM$1Zz_gDFen?@O;Uq zy|${1*_Z+79ctyPxk)?KUeyVU>Cu@knim3_tf`q2)S8bM=a648Qw-TO)CSQfd;JnL zZP+n+RSmBPohh1jcY^J%CJe`hjyK7Q?JPy)i{!~O)b~3)O&8%FYi+R@r5H|ynsUEe zkwl{5E2{T6;dv<*?|sP-B;fVz|3qVm>&{!>6=kagnk_Xi6uEVgT|sioC`X}T(=vjbG}Xg;7D!xjT|84D0nofVYzjj2(nKJ?FGsznZ?)r>1q8=Mt3V$re{FL*xC zFU%k96fuI9_tEVAxJo(`qj7Ofz#i}$tggINo+{P4LUWYv$qG=vEtrwWEak4xK4N~x z`jRR^l#NSFv>N4SHHx3@PtV(yB5@9$<%l`Z*FzkR>0cyOk?!NllvC@yXzw&q^+DaM zvYs;dv90OvGz*@qjo;9?m}O^6hhw?aDsZX>fpAhdpC)eICMtpZ6^jvK4@dvP-~^7f zL3&^@R(r^qm&To-CSL5of$(4)_!ucRJGTYZ& z$Cj?`jkuJW#46ac)GAn1Jh;qZ&%k~kFxA}`Q-X7%m6>2po zoLM?!(xkF9CAj7VzgDW!Eh_&4oi1~GF{{q7siOR#Z2c$IQz0wS!=T2~#W<#Ua`rO( z`om}gRdwCuE6uiv&rw*%#MZ>iv^JdK?E4O;H7ia#gHy@#npN%GqUh@1G*@+M=Wfat z_~d`9nkA)9_j#6>|I)aRba1{LsoYKkRBf5&YYnA*WV^5yIw^y)WmUcleWD$DNJ9f_ z%&YzMaWeRFmgGmpbJGja2#HQtsF1`qxlG_fz&7pb>=h{;q0?DECNsxRaDUBbejrK$!q;)a{= zncL_STanWrk%Or>o2f&o*PW^H6*r&-_aQ1^Y+1kGf>~Z&EwkR2oPjHR?gs&>amt1W z?+YQnNbeP@V=%PE%(*XPGeYHJ6kJ8RkwIw|SxgrZB<>#@8@q9Rab&jH>1J;)>U+fF zE731_^m&WS8T0NS3Ef-YgD1XXcMc@bS|svPUYRw|i-znNoNlntJ;0yx&H)T&)jN0A zzXYlOBz*mg&F_Qv{B=Wy4tRsazg<%Gl?-2~!J9U40YHK)`c|$sHd38hox4PkI_#X} zJGhf$4%`{TjYJ8eu_(qv>8Ahi7Xi(@SbXRs^i8TN{n2egU0HAYL{!NC7>R`RUZk~) zQIS_=eIBAU(CAj5iIqF_%#=Uu7`X5dw3BCty2F$t+Kx)g+Z`Bod8I(@7?GJ}>1lL& z^r>U`SFlSi^f0D!FSV*ufcubNdGIaY{MXAyYg`|p^wFC;KnVu{W!`a;jnSA-<$({` zKft7O<2+<97zC4+9<1^wCR60zMc8W%&u)YgXaF&e8BlS_ve`tX4qKs{&KQykL5AAE zGQf3w4?BV@1+tt2I8Mn*x5OqLu!J$7;9|cb?ffE*3r}~wBe|IFdvdR=2|gWrgJLi* zH=_#e!ylScvw3%zb9dyBBvazMJfB3AOp8N=;#o~9e8DS5mUCBj?`)c)1U|wb!z#bV z1-O&g;#K?P3V-;^dj#DG%?$s8FJnM_c^G_xNfMLucxO~ymY_=xhatfwGcExc`;0u3 z>JbPnFB@WxC0b&ptm>sjj&Hz4U&Vyk@)Ho8OI1}mwKRBs`?3}d8oR8IY1n1FW#U_{ ztokk(lTSIfN9veQ-UgzgZM<>Hk+dC}Q1DpRwyd^)>%OxG8ArCsj{I)cUqJJ+dLH6# zXddqB0&mrdU3pWC4{S+s2)ws#k3v1vs_oNc(B{|U3mxUbRkv1TOyRKEbJa5dAAp2K zH(Cn=%^M~D(PtJIvILUVRn3^)clOL(wHS>g_3`GCQV>+?qXwBUOgW;4?am0td`+Yh zsZxD8-UltiNVgp{)h)|eyYq0aYiCQ;AR!Eco%N&P@0xZ38|Gti#yj)Z%&qQBoj+Im zn32$TqsX`bm*)c-@7ksQ;tNK)oV; zSpnI6D$-N!iYeK9Cdt}Ck&wD9C14x{GXc)Fnb}0#*`%(|Vqc&r)P6E+2#F>mj)ZQf)*!(4+`Bb zNk&cMKhIuOT5jw>s#f6qG}ttosY=stLg`Vb_d8HEBnzX(HGWf*^3BUoi$Aa;Hk!cV z&u54Ww-GN@{MIw7W%rhEHlch-TuZ4gDP*FrmCv9wOF~F;$N}5?W@u=X#iiivnL4%2 zmGXu|_^ukK8Xt_bl4`vV*DC2l$xk7JVdB*H-7b-%<@$y*L?WAq{QB$WO>{o9d))j6 zIpiJaK&ElFjCL4~Tb+JHp-(OO=#P1K zoWT?o7=BxS>jpNL3e2efA*PMLMmSQxjpK^6f&cTD{hW;!lo(g90Pur zP^IMBR{~}a&yArS+>!2$X51fBw)K}BYeW+@kEU=L`Z3i~dQBFi&#n-*Xo??+QQy`) zr@1hH7Da2WX_Rqo`LV0Ma^lc#L;UPKkge|3cn_0b$WQ3;nv+3n4=9Stc+C9`qSPXX z%iQ+AFcwN6a>Y<;71h<(_r4~f!1Kz3-p?jF~Xm2(96FM>r{>EkR8)8d%i znE3@ABr zO2DLoJS>j3v?2Pj^^`%#Dv`J&k_JizE(AKfe8iDH8S}|4ht;Tbk7*%ZD)+}+^L zZ}y*gi9dwda1_OMw*#9?(mBZXH@tv|@wAs1ZK1u(Fb92s2%k4wj=ghrii?2QlgBA` zq}q0PI|W25R6ipJb!7c7XK{3iA$az_bj`%ntmYdS*&{zQzt~|V=5<32hxj#Fht~2w z9?oDtosZU76Gu!NgdLY#_ULD}wmHA)Wq7{KPS3D9o2sw0pzY-Y> zZkcG!@P>>yA&P^2n7hFVFOh%1qL#L}5ZC6*1is&pd{yTxuv~2?(#mK#tE^6;g3XuR zsbd|&YYbI$xl`a9GzY#x$4_kP8}acnNZnF3$q52~v0`F67OFjo{SzreY z=K$dT->YE%pTgA}9Elu6Cc~)nM6N$67W`bnHQmMu3z6XO*Ju{~7szEoB~Xh< zBF)iM9;p1(oeX^a&*4R-TU{SIKK56HY249Y;;8*wgqg-vtNf1$(*>TXIDW+!vwZPn zk-^}b0*pSvAR}G}6|vMJ^0)Bv>#y)KbQfMG|5JELv#s7tn;gCu_hH^it-tYfMd?BM4b{Ni(8H#y!<3?s$p`0Dp1$CY>l)d_17DemP?Y(=S zY_?AN?A#$Hah>KWX72s52lxeI|3xI2)3dEKt6x@yLi8$Vdm3{&+pd`!!ozdtX{xI za=D7F}(fZ>U+TUsbw?KVE7S;S*~Gs$?b0(*mRhS(0UsFSWZnWZhmf#Ypry z0w8wCaM@M=8=iHA?mgwdiof;_x0TKB0G}eZYszLYVP~;YFU5eKz9vdpN$>po;>gWI z6&_u(!1n~&vk}<*P5`>t0;*p9)@3v7 zzlIMPLW>f0)CF>zHg;%vx>qfm`%81#a5#7GZr%_J*Q0BqWT?!tn}B_M8l~T+Gn>?5 z_?x3yXjd~WOPa!&cst1EYgBGs$Da!o5p&-G+2l(i374a%2%o@9Yf3Qlka;2lg_U)R zj9K$B@G7AZQuB@E6QhKrbRA75p7t_gg2t-06VlG>6vXkPUj9>d<(d z+DW&J4K7G*6CQSgWO}`_TGDsv}VodLMdtnL6pWUv4a@*8NIISbKlQ(KmX7D z+@I$~&bR0B;y91-{f*FO)|#$fQ|5At8QQ4lg29NFCT808-7^w@8zLTQxKV?61@Z*- za;l+c^LIHn9YU=P(qFJ4w%4z87unyINwmJoMqknV#T*23)TB=rdIKBkt0d|DV*`e} zH2(8Txy(-kY6Auk%(|lf5cOq4uIkd=hrShera(_yQ=&4|-g-Hw@wWHceAr%?>bODs zw3TbAb=6A5b@=oA_kr;;I3p-HR4N#xsN^V<&j6x2sctj&J&j-P5GQ-82wFGzYV8qh zI7ONU6ny=%I>_)gy+d?{RdnVbZGVrV?e8_x-m3}$@pk+;r=SlA@qqZ^ycr1XUBsTM zMN>&s%xMP7i8bG@iddc#u8RN;pJy1T1{`OlCvG&Ti*9pfZ-~YzH$W1j8L2>Az+M5Q zqXFfC@&o+(_(KScuSbFg+kKgv&Yrw?3<%a7YJ1L ztY>lbA0GU-a)DFobqLcUo1USJ}5521N`|}#AIZgMONbRz>)Tk~R3ghSF`6k3~ zN#cX|)Phs;Z1bO7x?}9%p_hSBP(>p-8;kmVX-&@yStjC*W3JUUwndOWwBzd~nsk?1 zj5ZI)rd_O!Nw`x-OqE~TnoE<63dS9blNy>L?B2J8?@bh?bL$zifA6uculq|XH+Pd zDMVGYp*Ro1ZW*YMm;aqD`$5@)MbS!z7S;@`KAFemN&xfiLkxNBd>9W&ebGv$$PBrP z^|j^dMxL8!2}1!}yoBl%gJ`Y5zB@jB+g4BqHRsdjHd66cm2TIwvWHYwmi^o@R)&g7 zgPO$ci=(!1^O}7TVyO8?OW4G*{y~8s`kEgqKB9hK>r6+J`+n>xeTF@JKriY5hZf;w z-u86#t7jf=7N$~tRG?PVHFCbyP-=guT~BvS%XBmJa*EN!2K0_!pLq@H;)iu39xQ6R zFFMWp1$8i7(S3O(UsCw8D0jAj`hJGokxxOaPh@CztyawFt83Pd)#JE+ry57!@^-6k z-t$5a&$KX?kJn&&Je_q5|Kh*UI`S4~Gs4Z##tnjXbt;GJ<0fY1#y@&2;@g2c6Zih* z%Aq2YE^Pz;eii0Wb5nYQo$`y0FG>8=C}|M38?59-m?kLPE5DWKOUnJ2K=M^>xD>V8 zl9&RBG<8mOc5P<@Oe@QYPp}woY+zZW&&WKfW<|YzxuCwLi#)NeDOj7^6$-{wpn>8E zoA^*FH<oR&bhUcq;fI^Jb= z{Q<+%T!u`IKh~|hXdiM*TwV|eig#^CjxQ0L_+{>|bfW8wdh`l-+1wjBb*7`-ao27Z z5R`h*c!04^i!oDQ^J}Rv?AMDqT=Q17xevsxU(iq$@3&`CRhs1(^xa;BL%xM~(&t(F zsU!@D^NPklBs}cm#Gxz<_viI=@l|t1_F-w&pYon<)G%W#>dljfowy70-^mq?1gJ8G z)^0g>+CRc)YrbF&h^d4~jFT#_1q2(7-QOv&m-+?3o9|a~mUO80MQ_o!%X}^7%4@xlN~6(RVKj6U1x80;<4)xyh6@BrpX$~6^rio(9HeNdXb9NI zIhu~c+#ofgcFCOrCb|;o+bmB%9$)a@`T8hOlH~u}R)l}s;*VjLD-3W`=fH00Wa||j zzS>xVwb+qAPXojY%D0;9t~H9m@>#}U zdOLe(;O1e)U%Fs_iDV?^%SC8CX_vZr8MQ1bPN)gG9K?)mX&UmaCA3tuHl=>I0i z#hHgLe{U!VU9xb=Z+c{%?Vqw95HtaG!pU!kB7@*9bm-->H`Ugm4|0-`OMZ=eUKrfT zDzUg(2hhj=yOI%&p#9Noprp=8W_qxd^&2qQz3fb;DKFveYX)*xup+J-cv2okzgK^$ zKCZmb%r6}gxYk3F|JBC0)0uv`NTNeO5{WiR7}2M(jsV-<&fc5S=vB$Ft~1UNjgb!% zD8B#R;4Yhp0NnWD^Yyr#W`s!b%?IBu->Hh&G%(EiIa~|74fFw;VG?6dnn3MCIB7m~ z(wfrw;Jg_e`F_m3DL4LI=F)WS181+@M^8A(`t>oALEKrEcR`}O?oiFvc zR4|fa1hyZWT&_h_04D0sMD0IYWW%lgn=v9`o*u!#7P(MswH&KRXZozf_ENR`3Ivus z{ClC+^X;&an?=EA_iIpYL))(x^8cbIOyoOiEu+=2$lpoE-Mt^z$;ys(mT$d8B-aAv zwLs5ouc}XFjnz}3iv{d~Ebq7OF`#v;BOkSrBM>|Is$`_z#{w4g&Zpvjq4HJnL1foE zAUyEM^HiO2g;sj#0YdxTS}`8UN{MqHj0e2|KaNX~kfrYdBnqp6iNmXomiLE0eui_O zWOLmcTJy8nnPB2|4B?^y7E_V%3XxTHJz-|Z^|<0F&okTc74u;VDMkws&^v`U8a%!& z8Qqg@yf8I9ch}VHaA94s`Fx2}MATv&P76xnH2?p&!hlXnQ{4zcdS0rrW z+03;ToeaZIzMiG|qQVy-elI?Ei(9Gs4vfbTY^n&+&LvApL8M#~G6y~6pw#oDnVz_5 z?&fE{rM5^eHHJ*w<9P)BIr8@Ru&?eO&$-ntWgAo-HABwj!snmj%&7~k zPZovU=YLrg1yS(&6%8!r!-F5+ar%pScTHp{C%7@%S4<<$buA3n#b2mgA0udg@x5fB zUL3osdnS!ZhU%63%4-)cx$-#n>yfWvwp&>WJ6ByvLfP$?VbHH{OLtC7EAdFoRbqED z>o1SU2mjP$i6Erd9iC*|4xC}-TXbbS7vZ{?C@$2_fm1B%fyhK z{5aQW%&4pdq?7%HowIuLAi0bZm7eUtG4B@pedR#$P-TtY@TJOQht8CJ<7d zIlw#zvOKnz8Cp-;w0wVQ1(dD+L1>iKxZon?`9G~{Oy7}s6S!oKm+l4alNU`f&KcqC zof5Fp#7bNRQ)U?NYPd(h=O(K8<7~xk+7ofstEJe=Hy)>{|K88W zw=+C!qakVz>gY1Z3KV*je4SxkPU?;WIG)+Na_i%i1=AQ*Yxi{ix5gKpJUbqBm&|VN zrV9a;9q%ooWA>|}JcIOhsH;=5rP1Qk#5N{fpV$kJ6X(ZT;Nsh8eT44`o~t}wcZ?BE zeAWY}enU-#3!Fyf>N_Shy& z0RX+d6fT#%1++(5Rq8IB(LkPR`ZBB;=Al>x?NQLnf#vX?eOe2Y@tkgWxvtC^0v2G= zajOSwhBN<2;iFnzubuFi?_p|&-9uIUs7hpax+~6?QonztxVNt+F>S(qm8D?NBq3+q zq1(bKuG2v2V|R*>eVswmOIm{8J7AFZG}NDam<@z6Ki5t?3of0^!Ty@-9N0>Tm;Xl= zLL64Ce5%mVa!z(@#6(<|Ydj?Tms0jQ$=gC0J{bV*yYl4SF8H4QR6O7*osFuB3zwvM zmX`7%n61jYKaL9X*CX>M&_`k}HhL(*&;Nw@K-Yu})fXYZ0PXg64#D|vhhR(dlzdt| z-{WJ#c9Y&heu!ex6>qQ9Ly@1YE6e{O_=gOysrV(ut5x5aT0VEufW?{Xmu?SmfxYvO zq1sJ{$59{PVy7BH)|K`D6?fRAFMjtk#qGpFa&~gp5~B5cXf8E5P5J4QTf5waXK7B% z`B5!C|56IKqP`^qu=kw@17cwm_U;a_cb87u);#rHZi>N#rpUDUVhu@9&wFiA$g}2$cT{pftqDACy)*RIqF#sfRjH-%Xdj#Y8oUKk0aI&vum{ zr}9ePrMpZ)PD^Vsmcq>1G#))sY1g{i+hBzE9e$+zH2NQNaMHTu?6B*p)2x0TA=kjE zx$$rZDjyWT#`OsIetRT4{Fsw`#HCW0u~j_> zHON6IPpSD)_5TejvA(deS{FpFo8<(x+QIkNfHU9GYWUA<5SE>E{4VzfBgjU2f0`Y` z;m@L`#PBy^!-8)}Vjs?<35rgD8pX7eFuHh&W_4onkoxK*7yq0b=0GIyh|G`R)4YBn z>(s6ED=CqoLWc4ZV~`6A3hXixZM`mG^Efmr(+WP&wCXhr+1o$IoXVa{+Aie>V;X1U zyQw1$Zun-bT$d=!Fxo>mX+*X?f*qom!q6*yqD0!?ms$sb{-o8b<<@MVOA5Cl!Mj(# z&OAW{WPp$0D4Ozhjzr@u5_mprZa3NTb^m3uS5>;$20~%dW0DKH zQKcUZ9TjCil5bw@=tH`ZZWPNLEa5eNdzu6y49YIIcAD+yuv zUy)ad{u^5=@vP2o8OQUlTaU`HIk}*EO4%T{mYdfFhIErB0yo&ks%Tky-Bwy4Xw25B zjm~dyX0r|C$~RdF&A;3TNl0;H zPJTJlx92l8yj6kU^!JPn7HQ^ulYti2K5c)DH6ym;Ij`PY?#_tHFu|qit!K2je~d zgz~19V0O&h1a|AhY5b!|mB$&1DjVNrHtB%|;MpP1d!8&sl;|A6E;ujT#?g1kQw3bs&hjji{UrafR+v#6${nXgUwa=Nw8l%>64%fB;UstsXo&nGs(FW-|O#MXkQia)EoTk=;ugTbB9rV?d& zs|0#=@(dM!LyWMYY@>YBh5fAYBT1EPFOtbu$HIZj%r_7%K3@ekc2s+VUzGM-w_f9* zkr&Qx^jL_Ch0?Ae%R)8}ES$9Le~*q`pP}s@OHW(~^elQ}w2DMWVX-W9IRh$18&6c( zD6eAzUMCHD1prct`7-ALMfQq`h0rPDe=)ASj_`&mM$OwPHTTPk&OKC;a7u6V02Yzd zG({5CB61%vF}mPY+w1ke?yHqP4O1<2)pnl6~3j9;+~>vLr5vN znnwB*JbB@$g<3m7pB^LySEuChFGEMm&u{Tig{a=yRH;bPnl1g(&@Z#nqJ!=tG47-E z7k&zU&sr4yRYC1zHg~Q0Ff7l^B3_Af8(f^zDr$ttl~NNQkRHmKr_QV<{7y!1G-URu zo~<%olnPth&XjezbC705NN8-1m}}+3TbUF~oy!`Ws&?b6cR(WuJ!9k4cv2OP%*5h( zZuH!%$90a<$|t%NS5=Iqye)yb=T(?#uU4JfR^%M)T|OGe`d$R_39h=+Y>Vi3E>wRO#Uq3?Yjd54dEVe3aXf>+?y8SK%m8JR0T6!cM`Y$-R~hzq+EwMzdmF{NfsDW#v*>r2fBoz1`zJbZ zp3%qu%Z8B*jv7QW`h_moBZ!RKj7JB&oD4b&tO7 zo-`?!kV2DALnU`z_IzRMO2N0zaX>$mtikKVuS45wO=9K8N%}z5%cyh-xk?hE+!PV8bSs5jN4> z)$e1~dC;_V{^b@c9?1G{O+H)=)a~R9yUiL=IlR%l^nScHr{eNwtc?}(b3Fc|WRU3( zS3C774b{D9M74ARh*zBHaFz9ruzA_wz}vu%Gi>^ zV_n~`9fm=48|u8db5Xw=+&kUExi0MUJ#ekU{I%@fb@1N$`3<@x@YWx4p+d3u|JS%d zf&FpVVA#<-1Tab(WU@vM3kBJ%mvXvG@gMsu8{S+K=7xCO{_wI3@K@&H`pR!FjPuP3 zFS+qh+cfehVh=jOb;HvUM@ojdMcQ;Vw8H6aIVgj;~>-KXkY>K8*Mn zpH-4XU!IC&r4aqd@NV1cg3brYOpUvQZ6o)C;*`wi1d^ZRFFc$7U;jq)ol9Py&nKMP zX4E`I`B#S9^v1Z*`wbf<1_=q$LG#_V;io)r*fq?@^gB(YL|4?sdxU$QL4&_9p5G_t z^7&NkaqOKn-QDpWn_$kyCJLW>PfX+ifC;~jkA7@Tb7DVdlv%6E>y$8wQTyvz|70cX z#S7r%tR+JX>FN!cLX=YH1A5CuT*M~|w`ZR7xjLvqG;PNR{{&`mS#X2xi`R~yNonHQ1CsBaQ0rwHAH?+<3fv>tc8A2q^l}NPXndag5cyUN9K`%=NTe-f1R?b!Rktssbg$1=Q2lRji3*k=5MTHU9n0S>^T zG!&DX`lPPbHqNjH=y|C9YsfhrVy4zG|MQ)ni&+PKPiLcvzqPc25H)7vcP^i))q{wE z;+G>UDB0Cr#r3vY4Xn5V5m}sU1c9geYCRse*}cgZKm8f-ZdL~H)ZXa#^{F5arb!&b zm!LT-LRn2kr&~F+#AtLQT>Ql&nM!k<%0iHKE0*|lcY=w|BTrpzg!@BMjLFp|CIg1%@Yt1_rbG+j2kly#&iOtmora3HlAqBGt~jvzi$|n zS^Tw5x23kXsd-oU4`f=Av%qA^0VWd{oP~vzA#a^0h_S=@HT2H8;<=mrf)YGwzLo<( z$bqBWC?x)kxPvSC$vyhKTPiPmGoB|n!TV$47<;hbeJ?_TJ!7sQo*c7<%O_bQRJm(CmrtYFMQ;D0YsvxIQCrDA#5dQk06E9=m%_l2i?dQlk`EFVmQ>)+A4ir{jsxXoW4DqeAZ>nR-#Gv(cP7dk95r99}5=p^4B;0^P5z$MO z!gubrc(_@pJFw=|(^b8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H11WrjrK~!jg)tOCbRYw%Zf0Lv}>mo)CYMMoKp&%7EDs8~TuONaS z!G)VHl(-N?=t5j%*`44*p^Lg`A?>1y3T+qKDyiBMsT+fZ;-208|WEbqS@e=O^aG-JlKrb*Uh+YE6Dj9%q%;MFt zCxPC|1OVN@6G1RR1q09F=(o6ajwe8O!vZjioSbR?0X9b_wI3J;_C)$`w)k>}YHC!# zpwmYWMJ6-k#0^Ep9dhCZOA7!NV5Y-5*rkXBnt)F|GmN&^3!f-(NyIz^7L*lm+!?g1 z3y52R3xVY8?E=tRfV0{e)W^#TxFbN$7Lc|9Hwu!kw;MoP0p3~Rel#13o~pfX9KjZ-C$O zfFtZ@%$KOoByX~S<>L4+Uy#;%LTkMa*qR5PV_UV>eOl{Bf%}qodB6wo3wSP$-%ZV| zB9pw&gI@Rr)Wq?!O43O;$y*D0Q7j<$^}R)tytx8=yAtE#xEDB?Nd7DEtvDY5)+b{0 z2J)F{o<(Fk*#cux&VsXrnTyo0<1_5>*^+~~h-?A1J#``b2~%KzDZ=-~Ke$S4AJfJE zgv}>tGX!X@r+_Qs(vVWBk`1sTvphrM(iNLe&_Y{_r!lV&%s0mO9;0&7bS z`F7j2+-deQFuy7Rt(b3rN$@+ctHI=VS)5SO^Fxe?Sh9s=cMR(7I?$7tc#n;XsocIV z8h0tg3it$g?IF4koC3CCb{5)fOq)I5X7Atk#QN}}-$a>L-{Z^}q4p}mXVl_dE-Rvu zK0HAAKRL#L0f9B&CYdavikW03@G)j~ssU3D@szzjV*OSIaAHNwt5kp|k!DOC`@a2c zPKb>Wk=Zk?TtEd6ph!e!w{F(`Ppq~68#BH_I~J4jWY!6QLJ^zEd vYNP{52800000NkvXXu0mjfT?#l2 literal 0 HcmV?d00001 diff --git a/doc/images/jogging.png b/doc/images/jogging.png new file mode 100644 index 0000000000000000000000000000000000000000..df21d576f16921c2e8467f6f2608af1838717d08 GIT binary patch literal 15951 zcmbWeWmsHYw?Q~R1gS+E-NFU1_HrF0Dpyc6>EwE zA8;;e(qf>h5t3ct3!;Unq9_RTEf($m9TM;z#ZgAr1q8yUdHREsRii!ufdn^XB}6qm zjSd%4d~r7)gijper~>6SYBVa}%LG$APRV?r`JRRH#&fk=HB#$+C9eR5v#bOi*(=0& zk+F|~TsjSvw+*xO(x3aQHC3pJzV|+-wx!aHbZ!d#MR&gq9jY5RF!ykG_qh6+Itsni zoAoo_N~K~y&)oi+O5M2N7X^$8euol<3<8~?1;K+ruCG-Mc_c77A!Cb zBtifWjDJTg2YB4@IW7p4!;p(0DXxoJSb%uDp%pJ5g9!p{iHAQmpi7~GtCqQ-c%+og zXZ9Qfl1M+4!>#(n1{ppqNrN!i{MJxxE{OD5a(%X_T{Pt+wGtZ=xknlxQI^G0rG}LlZ1Y@>027G=~fIZWpQM&k+NAuuebp zv9qylG_G(tEHQQx{?tA|YB0FekmY5oL@-{Zr-fFaTI;FHl^%8`pOz<|s(X>7BuEz} zNaJgAROXIrbm)x~ob@r%S9}#)mv>3p_2e+q!ywrp9F;M0zD=tG%k!#p;ZMi6su{{T z!86f9AZp`uQJXf|Ql!N$X+!0HS*u&Xq#mNS%km7&LL~&ATlu)8S@*|~o)LqngC8HD zgAQGDv??4)s&b+(#W+dZ)Wt6-%<4h3@?_D@bN?I z<%3fOs?s065V#I89Bi^1G$^LE3y9N--9aE~)DA~98WjnH%O2W* z{A^3-1}+8|mztNkv|sZLn3kyn+x}0zWE6pn_59n@0GD!xjkaegO1WZW0q;Vbvo`3{ z#M0FGbTBj}TYSC6AnE0c_3H&-Q4w6cdl$`Q@XuruCV6?XF#~dt4C4-&O#}&%alB;D za$;|_AiN_;{sDOxtq!Ka(EFH zsAU*Bo7j(MNEUA$s>;rZmLy2l?@L+K%dghzgg|j%TO6>ObhN6Hezb;>niRUx19x)} zXG&Qc-GcNA*Set^ zC8V;qhN?3X^Yhq0y+SF7yu80=b94Vfj=(Ontil9Q$9!(>*Ng0|D$<%7v%@=t17Ssc z^@s(|osW1@g4Mk~XWuZ-V z`xiDgHq$b8yFX3wT2%&g7+>rcTLv_0*biW&l#8&JU|ZYW@j};O&KVVNZ$45UM-dVp zU$aeWSy|b&A2Lcx_{j2peu9hs&_ieNEa6qa`BeZSDzSd8DT-p2K5+E= zJN*tC;r`$5?!RBc|KJ<{%ZDjUrDI5nsKPQIKCyymMRNkSxkFghP6Ll)J zpoN7FKmN_lO;u6RpqnT%!8G@yKXhU9#PCQvYvb_RtUxDnoh+`~9ICZC_lR=%Ci=_% zP^Lwn>l(I7#AR+;eU2IL=A%HTUCQg!Dy0`t)^a$#7t`V zLySs;Rui6L_ zkc_?D{CeLxcSe%De5cOvv@RvO>K0rBiGF**wzwtoVrj zAo%d!1HV9@1HrRjRBIj2U1BOfT+G{4kLAY-S$j9mc^<%?<4!KkaurPJT|XeLMRhc8sCAjZ&R53>)c{ zdEbchiO9*_1djTh>Hxxd8?f)=Va6i8o97Z!8gG#?rHm{hv5~&IX+DhbAO9|pP3%#B zmmhlGaohpjS@fXllz9(U4SZ*w!8l6dj6p*~Ghm$Q*Dwdc4dv#dDoUtIie5(8=N?F*PO z)DljTS$z=~yN=Jtok!Gc!hMWs{N3K}?{*6kaVxM7n~^LXScVQ%nHB=f zNlzOam02k5tUPx0_TWCU#HR6xvU1R=Kio)hoxBtq78ViG`%${wO66{jl4ZKm2a^W; z@Kvrzm}ZNRE(uIAUcR@tXYF+DR`IZJ48uN;L6pNa`KpWF^3dUdx+wVJwW7~iqw9<~ znk59M!F9PJ?Q_{@9vOuSPpyG{Zpu;Uwvck+1jBB@Bf{pZc+n4B65ih&A#}wmDa?kh z-3(C)+iP~?wrx#t&5 zvc|Z4v>@LYOQhs?ckyy`y0oMuPW;D6Jyba0=9rwhgMRzd!Kg6Ips1(MsyI_>Zf=g! z9e&FIE)Ex6+t;_`rOd{0^3jjQ)>$q%}&)i(R z#o`A-u*#*Ws*?S0$q!sS&6)IM`!Rsc@u>V5SR2bp2mk(x{)x9)lpuO85Up@lET;xc z0$wo%tM=f-hf2Oy2~2zki)BJYjTD>0;USd6{q|(A{V{wu5st&Z${6pm_GkIG*KWBPck&O z-fs%D9krqVNWF1bZm`k59rW^C{Ll`gZC*Tz8$8YJ_)0v)8t~|w#_RItaJe%(t?@og zt9nrcdPSZjo|)@0O6ID0o;O8rt%IGTKD$f46jH((Lk)ac^eZ(N)p}@c{o|-vN#wBMQ7#O%1 zpv_hh7e~Ou$A{#aSj@tP7oKp%!LN8K4Sjw2+uK_X*BzDAJ%!=n;d<{&>nE3+U;a7+ z5gHICa}B_W^!4%*0wd2L3{pM`J3BkJDP7Oy{h4a=MeqH}=hzq_56c+<5_rm9LcKAh zt7-q6G9Bl5krNzb}Y&AdxR%F0iP@+X~l& zef0l`OkQxWQvH8GPFns%1utj)NoyV`aYn8XpfWom-&}XqTDH<`z=DFLu_#Yy$>x8d zr4k`qVcSj_$=Zh>LfCvNjJmZS-zaA>8VQVlA66uqr#OeBBIny7*b&!C`3< z;d%NigV&{`sYwT8s(8`={z8Fv{|PHCU_y;|pyadCCEF)oxy*g`KHkcWgd@|fyKT8` z+x-yp(x`QZ@){QWeQp6WgMqm{tEuU@CuA~YMlgXMvsg3b250x`=VO@P^CJc9j%Pn!(4MXyXY~F2ZAS2;1BlX*JAB?Npu<1SiADhrZfR_0 zsD{o1G_G@IDP!o|e<+UD+5x}Y6V~ZMgt_kIX^{1)cvIjv63!1YEO5>uFrVFF?&ShP zcJtrK+D5X%54*~}i$j2ETr9&LQ#$VU80H&n2o9Ip^?h&ni%;K@h4pV*dFqXXoUaMM z{g}rB2X;V@_^qw2^TNpezxKtFvnbub9SVkzy#I2K|~E(Pw2{% zjNAdh2EMY^!~OZFVkz6201wMZ;`x@>NgL>gH{f6nCX|Kov>#%H?n*opcH*g|H?XFh z`blY*^yAXfnBYD=*qx(b_B)^G?=&@T?Pj2i{v=wU<%)>aBy`#TrIFk_8!x(G-f}n5p?E2AaZ3T zB{}-`&5~`MqCRWay+1uk$Wn?|t#~m!jW`7(WPMW{KNCexYa#eL{>ob+K1hx^U>)V;n#`z9WBjPRpp%TdezPGO2s z9{IzL^jf2XECsFr)3(!+*Y?;~)(?D}z2{qID`wwp5Uxj9I&+F4$2o;AN5wP7w@j5c ze(1xQd@)8wY$*V^rRayRc_xh%fdIW8bI3|lI&Qx$)6NtKSiXss@@_Vdv8%pmQVjH= zsMPr;R#bBH(SN_PaeO^im~2`f4PmwMms4wRFcO*s$_Tj;zR{c325raPi%`i}75%|} zBPgLmSfkNH`z!a2=SQZ<`;H1ZSfcNjLM}%8I=xBT^vDC6zPQ^$4IXP#0`AwzFQCh? zrTv1TDaGdI=DZ-Ul^;QDoX+=YTJ}v@{2o=Fo9`*w7~2%uY~9b6E1Bopx&nw_7=La9 zk_YeIR9)Ab-=e9gakC^Z!5F@+v03TdnUANB`fwqL>n88}_h>u#)5??e^z`Ouvdcr5 zn^xe*hNp%ox~AmrNlK8(Jb&zGy~rZxws*;IET)eLJ7qhqo!iAYGUWe`WOuGNb7E0w zdI}Ck(g{99K;i~ZYY9ofd|@!x5XAjy!Bp={A=SrPWFw2Cm=^0P`f7KSDs%6Rcxi=7 z`?YQU_N#dt4!e1dQ%_90xSK9ae~P2RufhQxGXh?zo^zgrArF2PYafODN+U-fs5=B` zB9}F_d5WlzbW$pTz6^w+ro4U^N9muG#H=i`m6!SL;_l5bkuk{%?(V$r)*@Lt}dd@ZnceOk3lC=>ykx`hxoeX;kDBG`W!5S9rynqh9bPreR+1V{s zyie=~yWSiAWB}`mbl2JCtYpy)O2|?=rhi1v9=gN05n6QJ)>wohRah=}_)Y%)z0!a_ zB5FjxGa*?SDKDDEm_$rJmH|Nvth6bm9r7yiv*kXHk};WB+;6)n0mIZ#ODPDDbz( zD<|@{sJ04sC#m_jEk1o>a=ZK@MTmXSoq5hd$pLsni`Osbm{m@K`V38)6)9f{SzT%e zOYB}0?<7qi4{G?V(vw!=DDebIMZJ1CJ?z?XbucGB_=O3lOGMwUXW?>EUAeGSy?9)a zdy!h5{{(Ovp1SqEDN}oDqkJh5MS`-lMHh*5cTJ{U?YSzoff66eMP7Sz3+h%aAZe8! z2L`Q`9oMsm{lfKGZ5*jIY}I;HyF6S-sjaQus6KJx9CPqLCk8-dG2bFbfArL!96|Sk z*+97Pl%N#J$doC22MDpifdIWKvxJfWoo6u|v+m!Nxwm-C4Ieww4j#$F&QFO>*7qXI zpFk%TZW#u*c=;QiZ!?M`^}XNofP>qZI-9lAKKNqC4+>W znd)rM=?NgzR4hE}9?Y>THfgJ98**p&EWu`kY!jA!dQZaGqv!<~OK^>34v*)Gep#kN z1sWrNDePJzuEs{TJ4AV{!$Z&|S%n(?DuWgo9s~D}P%b*Q?^!mt1KH;GwtA!eqJ%d^ z+lw|vy|xN(?j2pi6vhZhb^*>^2DLi;xof6h>7G*(BgJbSAr(iri8^H=lO{CA6zZeY z=3n3Ku=RZ1s@gq*{f>Q>6PLyMs|7dvBZSX~*o_v_LL{W5K6$#U8yRKY*nK>%J*l1l zCb8N@6FI({oHTxH3S>|Y#($EK!@I|Wf-!UEZ!te@qFr4~07pk&-v8kWZ+MO~1R2S#Am8>}68<>ePKS-Hsfce)2ri zW6bOmMq9Oquk2K;asjM~Yar?7?T5wa494bnx<1wL00+`~Z?2%PPb_$U^7A64^Io#3 zgvZ!_22q$H;`lp8*m136R@+e5*O%Zmx31r3PB=_ig5g((=#QS4)HEUnuDuPe>ZcEr z4e4H@Jgm%Le#os6fE8NAP91?QtgvP z=|YXcJTe-iEwS#$s7ofJ(6ior`#-^FFeKbzJ0xf)41%?BI~Uxq5gN<_)flcvxO!n zsztXM!;3y*2hU{cCiGzP_Ac&uC+%68mbo)FOLC@ePu)YEJeBhFHxpUa(QXgzJRVVC z*{`~b1$cvQ$UZfSIVJ;wJ`*f&h7)KaSIW1RZVRy)-~2AF9A=~8dXERbG5U0HV0$ay z8w=Z#_J;l(Y8tV^co!o-b|lI=zaf)~T<6nWR(b%aT75^4slvH{>Qk%vaA9~m$< zbhsSTza2?oUa96w4LHyr&A0eJc%SMx8v7=XDtm8U>q5WFMv?HU)oY*R4@4);UOYKP z-`2T1W*Z9gjGep&n3YqU&RNexy+`Bq;%Sh9>!#a9UBX#OGPS__Z$~C9-|1C79TBcs z-Uupf6Eo@_%y&fN3;JR{TnjU&VjG%Qw2qbUosSAH@2e8}R>P;@3*D@QTy3tj2|eC? zI6boUUrOMTIjKvNiX~GV6@oGr78Oa6P5?#lGRo(|e;!}!k zvCgvZZA)*_XC5Vd7Q6h{UV-y`G=C!h;VCqAItopBCfIx$w7ztU_mFEILr0ry@_y>; z@Qs%|FE6jrLg2!)o6PBZ6X6cxyY}lPoNHOzrM5W+WB-7j%Nb)9`y%#zMNc3QHGcOC zPKiz#+kvtU@r+5jz}6e-ACFRXFAlkV{suq-LnlQAIcze^p-(DvwGyjib=RjCgQa!5 z_wm|@==ejI1HzUI7E9ZQ*eAwGH;nS zG_iErYmvKM1e?4&^t){Fc6_esAG|7za7Y zuC4tc-uco>9wjT=O@-f2HY@)JzIW`^VTJX;+DpD;=`IHdzwZv{aGBsC<^IV6l)to% z{E1G^?kYHhKrolrQ_vS(Mg=KlEVEI1(INLzd>zW&0HQkI*cP=SzwaOH8SERhr2fjz z4ll`ZEo`62vv?l5aA)?^#f55C5Weo~0<=zy06LCMEfE2Ke04?@V zxRQ&-XP*|F6u2oc(9r>VzeVa6eSd#*>UuWNMIK^@tIh7j-;c)9wsI*V+BeueSU}Kr zAKrh3*6U>08sQ!$x@+Ncs7yl5+^+Yyt4;i}8nfa5qpI$9EOcW`m_n-(S zB%%N*m7@cFmDXCHja}Rdkh+}Ip0I^NGO#6GuR9a(Fbl%*M%BjZn_V@#Saw?UkBdrO zvWtWHY5OawSA&d{vFN3f!2&lB=Jkx1u9vgeEsx)QBnjqqxWH-Oj#jsv`UovPr|$v4 zYK%_D7hv5l&a+_|<|7%h$8F~^%jsvqtN$}=^?6f2rT7=kA+X5vtTjJ~b&XOC4vplp zuD?-v9F}z5igSV2^666(h!w1P)1M5+7HyNmB_l9!3~EY)0g#kYUBefCRXX5&FuW-< zSb2-3G8~dX817$WdquIcEaUOXD#BMDtVtnB^i=-!Je^iY z5Qb{pL#zORhwbI3zge8ScW=Et-;Vr`OE~EDRW)?;pP>U&1x}}B5*U6p3=yEyRNCry z66Be4iS3(2|3!LGITW!+^8THvR4(v1cEjEPy~-snp@yJn2{07|_G!`u7PeV`P#?fM z1`+PZU`v|Tz~EjH^!M2!6FfNOMScc;e8Bv{lLTJ-5#=TwPRTY414W4gt+R|H7M3km3Od6TNuK&>=XT)B7R$G_5i(3 z>5N)WufGvQf?gjNZ!y7gr);=?cRV0JF^7wF$cD*+8K2M};Vuv663vIciYC5MOc1}c zY9tr#_Sv7VbiFxw2Z)3>{?Wh=XFhxJ3Tq6Yr3mgGk*{9v@d^|L1uv_{rKCuUe|qtf zrD-)WV`5MKRxU=_-FN$pHrrPW9UXnG%S*}x`VJ~dpKyqL75_VE?cec?tJc)EofxzJ z@hBG1AU|r?91~x>ewKM**Bz{eh6X^4T(#>T6>qtm))yC&`St)%dw2s^2tG15PsJ6d zc)*zK7eBxORLcLk&fO7aZxJ;<+Lait^mPU}*7&CZ29IyY7&CIPcBeu)+smCEew zc%l4mnoU*i#f7WD8-8A062{BROIPS& z|4-}r_hIdXg+q+nOz*#3H$X-!jS8H<0C>Xm$CHs_wy9M6mYWxQ6UCTMkX1uf^|g8z zpgsf?JP}}kOUCefyxj&+rxO1m2V`WVh}n>`Q!3UJhIvT>s0XjdP;r+@dBu!<=jB@6 zZS#Q)PNEnCl0!BixcU2pgwHcj2zqTk-|9nfc_bTUq0>@6i~mUFdxlQ^jPvLRzNpqL_jLbA~~|5;n5hT&!;W=BQ+|(7qqn$z%Quj zkKEAU%h>;X5dg#-0p9Tm+PS}6t~RnKCSs$CGmZUU_k%uHKY9Bi(csfI&#Z6Ey{I4^gW22GL=MEE3N7kz}aXp6MkAU%DE=C8xR>ddp zuRTi5uS{8$13ei4nXztENdGY+(`AHLdT7D=i2_~6Tz;tyd-R14lj#BA_BB!@(=hqi zT0iX=x6dE8UgFVxWAb~&NBGa#K?um>fGzgIz5(d1_;&)0{Chs-Itmq@SJ_RM5lcQD zOQM{3iKUzCZ&I;mzbFgk?e)_p_{_McjuVdVFQ-4!1itkINUV&bOW*(V&(vyS_xH4j)+`Px3>7z}S~{ zIGsB-Au-V`;+E$aaJUna1cub=70AH)e98)l&$ajVS!^xY3NQ7S$2Uk=`Hsx&hxqfH zNNBD9j6mf5D|Yi2f+s%^T>m)r58$3VW?>55P#6M26I*W@upqW7eRHmJQ^M@Hj67IC zMmNf!<0zZA_l<3F?@eq$0kiAw6!%1`_@_bKz@8sanBesvs+I~OUi_%Fwus0`Ndm1S zA{(>kxEOu3$E=|^JJKn}RO%N_RF?^~MV~=k?P=CY#|E5c64QlV9Oi!zfqjwqNqhN3 zi37U5B5$b+nYOVXr{KkJ@uFwho?WUox?2~pr@VR5c~tyjT^06Whq}XO2E+Sq?DS$k z^*YXHTbqsZ?Fc)+$BRX-)pvVKKP$XfW-tB1dT^tm9SZLLE%|`!p-f~hq1|&Jo zteACQn~zKs$M|%wju!P@-zmz=C(`AvXDN=MV!sH2f5Gl!v6|33+gdcy3z_QFl{}8; zof)f?vkE=uQWwC$m0|P^bE$tp#PJ#Mj8X{CUc}M$W%`~Cyq{+u;Sn$T%96HE_8d^c zNcqhlN4jY*(&dZjXd-RUlNsSxt(q4<*zO_}A*0|&1DSOARWJNEFHNE6ZA|nP2XI!QpNNk?tVwERu&VKt~b+$3k za;@WfIG+q4O)2gr&wPb&pdjzN~~oyKXr$W zA>&EtcuzRau7xl(6)2bZqHmvzg7c=Qg4p(7dN4gce`K-g%ZhzQOk%Ii%e>Y3Hs+e3 zry;kMU1=~F0>llZV`*$Gr1RX5;NBmFS+fTf5Pfwjh+LapbKEmGpB;^~=kgqO51u6_ z^dP9R{LK*F`+fUyt#c13IYs9q{K^OC2Hs68!DyDN-Jz=c&xoHtwZI4rT=$RjwQI|4 zvFU3$Y~GoP(c=eAjRk67p!?INvaO@qa;?g|mKMHKU7$7uC{s|zh$c+}|ES4l71E7J zkQ|%5s;axU>P%&p0w$~jOgPIkgON}e<%|ZP6StED;XB| zrsTdk9~B_iDlu#3?V-GgoB?!{AP30$lH%!e>=&BKSk>5)lp^8qFCw=G63WwteBISc zfF=f@A_CK-fO?wo=N!2`3-s@`S=!D-xZ`}#|8HFv0Gj%M0vd{d^pD)DAsF-XbUHt2>Gy^y|Ak%a9tX3ce{mOu*4AjYGP}h{0q|A*{0r>&UIVe^@?(f| z3H!y-Tu2p!OzGz{SfKaSfh@cEP>yWkn*jhD%s&J`uMX?o_O-^E$#)eK)U`Ry9z-&=>9E%K0(T1a^$I`xqN027WDT!Er4 zTSM{7Ang9hQuR&l^^@nAf#6jURzP~YMWc8Gk{q%`k)X2wPCI7U3d+l63{_Kul!!js z&!`j?6szcN!)XAYu4JG%EG;}*RW&u%%7o7L%DgpdGtVn{>ts5RRtWb0Q-O>B0+-nu zJXrY0psM@KH)&ZD9fF0aYdE#LUV3)+;#wW)85Tlic?2DQdU?g9vim8$;*Aa9S&91Kr+E$HCc`eKHPPC>u+X*Y z3=DeMRc?;UvlId$L-TRZ_IRnC!~H;~th6+q?wi>Fwxo><6(<*jJov1&El{qEPYg*U z&)P6farc(9-ab=7rJ{VG*fle;y2{NgDJx5vlkb)=t2n4lA(v4`*FVRdlvJ)pew5{0 zPsj`|xow=zC&(=X2|3W~eCrk+pM)BSc63x!ArTP~rq;H)Z&eD^c8R!~7w466G)?JN z-+Q$eY2<<{&Izj%oHr;yE>kKUR}sw*`5CU8ugWwz8Wng4qZ#v(nfiBTSs&|v%LzT& zkWp2;EdG+Se)*HXubhM~%!^P~GMRzD&rVl%&2>D>`1$#ZH0`euT9Dha^D5j_`<&s| zo25yvNhbY+I?c6(f}LNIljTtRo0@Zxvk<#Pe;C*NeijaBnvluaI$Pq<^4tiBb2BP^ zikcc*X@>l(=yc0SKAz7cWfCiao;sHi*gQ!%i?zK;DQ_mg(Pu>`1NNltZIn@Ur@x4; zARh&220t$jw&FQ_K0D&%6HKCbi7xMucHxPY3)Ug&zEM#ir-jkF zORHFXtpw-A*YB%TGU-uzwWr2{Gc9Xos(fd9QfP!6mT~t*YbLB#>Qpm#^RSt5{!|47p(Ses5CR( z#631coY1M3h}V;|*+Z4A!7|lHng{=&AAeJUXUG@HF-7k?zF}Xg-pxA!90*D~bBM!{ zP+6ran}9Nc*DZUkB~3#`=I=3m`d1^3W_FhCSvpH=Bm1vYoa}z32B~^J`M>b%5!((I z-R87n$Zw@_|I}219@M2&bl_eC+<(40FesOgViP;Ysy>f9G=z5W?C*bbXK(^V|Lmhs zjP>Nr-~a`-fj@J67(t+~Kr!e4{k;P;4|9Z9AEiA-D7&cyK-e;C?W-6W7!FMcpums+ zE=l~y?FRcgm;a*aN0#xdEVmSO;xeP9QBAlvwIG-%)8aLdCv4|)=r$u5;lae8R^#dBYai?_Wku#^Ww(Q zMXCBHkj~IayheR(s9p?d{)c-jUD;$RuOEEgUXuNUK2v|#UMfgwRoRj^N=7xsK(?x| z*WcCwZ6wh=U6r7xADq%sOjgwl$%d4EVmqd1yd9`Ki`rL{8YncdGophWmwk#UW7fvo zboSN_Q8;l_#Z#U!Vlt;-$qj<^)Ua(5&ngos>a=~q-!7zEE~pnstEounp=)iHRLs}B zkVA(VOJFMfvLWZT>t^FDnQY68>KY=$tXTO!`S_Os7hmP?MRGIl+0h`S-&G&YqZ>4g z;!06K^x8Ic_xL(b&fof+a?`^LF8OA|>|?4|&~QCRxi<9Y_|$S`x)lP<*i~>d95I#y z@@fR;kTYy>^VUb81`z{vzBPPK%*Z2yOF*D5CG`xbR~eX`l{*p1HHapdq=#9kN*b#B z;AyHGh9=}?d>JITYnIdQvrEv_RowF=RV#IkE>0Ufx5`5`E9l$26ru?-d9pS0Ru2exXY77kc$KX&dnV}3`^`btb_s9{S@Tj{bBsr6}3d*b^CNtE^ zw%BXgTtnZe+0ON(T>k`De$eQgEMu(Vf)pktDbQ~Z5OI&;yE)1PZzqcsY3h{fZi>IVs{+~z5l z!y`(!i`N`FiYMZB7AobnP4mCXmt>ODiarua9-^L=i8|ZmDxQ@?M2uE=NT|n?!K}5l zq4+*CC`hac0u35>z*b?0bLlvyOHcw1KfKRY+~Bg_fLGfhnott%uM1{)tPoR8o|-Js zvY7I6Yk=gAt$8pdTUZm7v7@yu$iCP_QW|feXcd&H;516g`C@JdoBr|CsBVrl`+Kc{iOgD5$ps}G5-y!^I_0<<5T&7P0F)g3K(yfVH!IZ0BXFJq9@)Uqyv zIl0iMm*lA|w8R(ogor`LsR@VCGIEl&@EAn%qRP|Z5yR_WVA~C4dQ&xwn~%{8X0Um( z0R}Js>OZ^YX3OZX9%j{zDEwK3IM^pyq^WL=9#ob^S{0@3l}{I3Sk7C#(TCgYnHM{8pNG z-gWkD;VF+TfY6Z^yFHz3jkQMA4ULGSnk7zA>((D>E4|1LrG@oUC<2GN1HRqX+Hcue z96!~g)PFal!L#zIj$y>6d09PA|MYGg`cf*BJZ`AlM%Bd(oF?g#!AmIt2to zWX^#A)M$$Z-axnWm&Z{cjTuJ-i2!W$KUcN>1!?DUW^hDo9jj>rC2%5*l%H;qV1yif z1A$EF|J%!6{{<-i7ip$Ij_TQqr~S)e%X2-NdxIMUdP|?1O*RT51hMksGsfE>z{xyf0do zRH5Y&Th1Ba46#B=CC{>4c);%`v2v`RI%p##TNMp3*~G2CCE!fjRIAd?f*jKyJKc}4 zbEhPYwQ(ff5-LaS>oO;o=MLFqbqr2+9I#1lrjuC;nE8ok6?Z62Y<;2Iui|d#G_z3| zcb?kibc^b0Ow|pb%3omkb)V$N)+o3LqrDb;TsGD$bvH`eM5&F9I8CY-nY8;{rt1h$ z{3Djwx$o`!gAU4!m7*cA(EOhjuGWmjLqqUon+gSe^YD;K64%P%=*beo5lxfmO(c!A z&aQ$GHdQat9pvJ2`V=-a>-MePR)u&+&0)>%%0`*3U61)bJ$mDBl8{!b(_+~$J3g0i(1g24UWf-HvQSGmY|zI942gS6g{}lsqGfg&3Ei1 zAvHWXFO(q9+XaT*#%wnjWVz87v=qfS?M*%>%wZKqgiP6^Y#-AkctNbZ_@_AstQIFV zv_(V3Cs|*_)BLPJ<&5RDK8-_uHEVAE80~wrXe7Fo0^k_malh++Nad6;~6o#>Sk}%s<61Nm_Hk$Ys!sf zmlHQxQ>$}isjt5oZ#T!Mct zQGhbFc-uimRWX?qhavr25`FTab(8_~CJR4JLGHOEe9bqBXY~n6rsX1tt<>?@iCblSakU*b%g4E&ES1D&QS8lWz=*;=ElZNx6xgn={PBZ}{nBA0x2~NsE&G$L%eh8uxHWCSRLQEf#&l&*<2$m95!Rr* z_F1xlc)yY^txR)Lyz*~op{UT1Swhe~Sgmo4u-e1pooA}X6-CYK%} zko)-sR9~U_a{Zr&ZzV3xfIFN~#-ueDW{z1xlMD+o73(EkD4e*J8&1_0 za(4VEH>x5SCf7BL8IO*L}T@l;112y8DQQ6z=?R>ul0!L2c z95iw&sHFv@49@laxk&CbT4am1t_PWWiVhQVmd)OlB)2lnoVsxp*)QLtUk9)Hi_72h zXY;KMImej$o+RoO+pVk=O{$gQYo{&^CMTrIB0&_m2gbyDqle)_tf|j06d07;)9iXK zuU|9UDi!Kcs+H%M@&^LzGP3;3XMN|%4hR(Xz(hY&zljhCiC&GlcO0_3pX$Rp5=UY} z))Xu?WOcKah#I6X=oTA|FN?bzIrMVTmR1#fJ+QjA$Nh?|(JFdtWqU7k1^qj4k8$#- zFs*mZsyWis^Kzz(_?{}Yn6I)nx;{OAMsOokv2fh_$f_{om5Xs+Cgt#7Bk2jYt(MuE zk)@ALh^Jf$jZNr05+V}OdPmAxImUn>O|0`+Ai@YqKnp-tn!d!KvW{QbVZ5_7(c) zS?Sk2ZL#n_j^-B@e2+3gpRwCeIjNiULT+$kh3RO8r;J}f!H5KZRlM#yM=Y_nQv}eI zebeK$=s`Xf$=@q`sDRkQ_21oH{&(T*KVEcxC;Sw#Dj4=+36VjdZILOQ|9l7f|FRuY b2^e|dT7CG|W3?s_ltHqRN)lCKCc*y$$pCyJ literal 0 HcmV?d00001 diff --git a/doc/images/mainwindow.png b/doc/images/mainwindow.png new file mode 100644 index 0000000000000000000000000000000000000000..ab6af306af994c14089501b7c410c0a8e43b51ab GIT binary patch literal 154478 zcmd43cT|(z(l;Cg;YI}%L?R zinJ`2l=MDa!<`V=$f(Nz0A&$3v9GS<&WT?u8M*@i z_gJp}@RW6!cL9LQY-Kr_XKze5&u{ua9D)5hms+r9ApYy|qet_s%!|*jg+7guGeVO- zif;Gfef(A3n&{q^csaZ^X}nRq^wmMMOq^K*^)BRM$O|4-9AM4Fx+K-y!yWWfpPL1$ z_BmEYHb|M-g4-}qoi~v99bno1yie3q#ROc6$QxO|0H2F)m#h!zEYdr325%&~y7(RYI=S&`ApdTis)A?})#HZV?QHkT( z|Fpmba!P56vtQm;Ge793^0DJ?w)q4R*fd7ARP&Ypc?@^d%2W`f%L=oZ6&2=@dg#}p z!Qy=(uK5LfWZ-o*hyQNuyxLT@7ssb_ksBHT-5M;%qvAv8ODZD<5`*E++`0I=OMGZ< zSK5{dua0|I%Adp2GRmpHKjnAv%wx0qSY@cGRMY@*GF*_cyp5;Ha7D_eY?Hz{-DXuI7{%T zY$({Mc8@|%_f|77u@sP)=|T(bX}QVrZP~>NIUpmthr)MT-F3-YSOPkdMZIO4jftQ8 zMnN^u3|#3%m(8ijx4UGG^?Dx8VqypaT-g2~4+!}zqO4S)U!rq;;I8U!Xq<4MwXd%c z;-~`&$4bqxe$fD%YMk~&$Qd|`d2O2bwUHy__pD+NpS%wb#nSe z&mRe#;*0KW#cwh(<|5qXG@i^8h+ardKjJg1)kYl9yTlwDpD6pNYE()3pM1B2qaCAy zSLP~!gU{=<^us|YW!HljYo(GRpeM_l<(7Q`cWWoMyyxh%&(^==Ex+V>wh`?A(N`@_MkI%TOJL4>s|(j1dK6C3 z(`tF*eo^sQ0eUh&&Bb<=o+T$k&eq(fb)_oYX>Aba6%9v|4sN}oD;>E~=XRotp}?i# z;|7D-H)dg5^K&(GfW*e8s6;%MIfJEU{;2i3A#-?B1ILSt0KSgMl;}o9%dVS@U3yXm zQ#QTP>-SA#a`FbXOFKe%_&S49R2<(1U1a)hkGn`(_~^d7L@P#3mSb(c{UMz%>4KSa zI~wp3d8d{L`&M66C+qSnQAxZ1iakbB8W=xvx!e;KU8|J!Dp`z%rp4y6vh|#=t=SEQ zi)-*~SKRDwn4mE6vhyoW**g4D2wyxtLhR*i`kBr&1iU4w5LGYH>q~k7W+As+JUdSk zaNc3HEMGn-Tv0eZeTg5u`e!aj4QYL&AK>)%bGcbb|N^MW8|j7#B7%{ z@&q&r+c)1|ufl#*x*cJ+(Hm`#dGN;z0S{+?QB^xa5j;5zi7|MBxyk+^$*+G9>+JPz zcxlMV%YWd8?37665^M!XL%iOjx!XOt5`$6pOOyjYcoJ;89-=C+#MOSHXdsZ2=h!Z;g)&&NzWZFmMU#4+;# zV_=!U@WeR>#8I%zWWZg>77d`weaXjrVU}DI#qoG&_*_ew!I=Ilg zY;ULu@*#wI*wWkz9*Q58B=7#<>+zq1T)rEgK32>}oH4>KTx{B}S5(Zri3$RxZ;!ia z&VHvnAFnIll2e$C`PGEgUbA`N{S%ob@c{7N>B>}{xWktGC+zcsadDt@#36>X2+!GcD|(^hm0WE&h1gA$Qz6P*EfU$66XTw<^;9iF*T*0~Q|XvH;1)4;_InEAqNx1AL9Maarh zYOWMx7h-n>{kDB4(&l0}e0slL;j~GAw1Z0X68ey>eG^Dark2VZP~}~#)FbqtdR9w9 z$2xsLLu@<27`t#8M|Qq`870-Q5As=biXuxs2zhvk4pP(9?9%0T&@kS; z^~V4JTALZyY)KnaBuIMwaxU4wXeLKOHSZdFZM!UO=3Z)Za&j(d+G|92Qp{B}F3|ew zN&cY%004F!ZI)!t2tO0yhMgB~I9s4FA2wk))C{D#IL8<8+zz;Xx~sVLA3~P?M(%q5 z0~dPA)2&juS>KV~jscEXM*0S|r8fctfA%c>gv%2CsY(DbLjR{U!~R1T{eM89a`T!kYn76&{D-3L z>LJ6VNFH@cop}?j*|?Oi7b7}fM`>mfExUri{&WfBgMvF|vR}Uy|9gly)5akj*#E4n zQ!k9M(Yu#`_rQg;GqM6%*_E>P!yalfG$i0ORZ{hcc(nUddI-eOMEj9Yb6wt^cxkiO z+t#XUe^46W%<)_b)I2ZbvXn1P*|oogJW2J`abg2zm%kk*__P^AYCgexJtA#@%2r>g zyUz1l>kTTBu&z|k2}Iq*a%fq#Q@ol>8Zp4Glv};PSg#>e$ zz4H`rQf($LyU_ZcV;8Sp>C_^UK!B(jxIg|gPCVOyi1yCy=zCLtTA9oXOo7%G?uTdmMh_pqN*IuiD+vrJYNjmtBm<8g(NTI=}!B}7VRb6b8Z!s)9S$; zex5v06*A|Nx=f|XI@Q(ZuwSpP-jo1d39q$VCJ`o*0{+3dZrL?_TUM`-aB*AXN&&0j z9Mo7<{-qyE=J?G2(t4uIei~|M9ba)+vTHo8Y5BBj`r+N`1l7T_@*IbE}wd@z(ar#=xxArg|*I=BD z+GN89>lwARKJ(U6uEh^Qgk^+;$cv^Z8znHWH3Vk#6G^GR_&VA9tqrTX`aAQ@Nm0OD zbZI5ZGpe<>CfAf|%Zea`e=HAnDUj+Dd7D?tdDg)k8-f<6M;#yhEoxUEBz>h7XPH1@ zf_X$#U+1Y$Mk}ZZs<7^n!G_-6cCHGi7K&3KF4jybWj;(`TME>81?(E!rePw#eRqOy z1ioEp|Etlv&8pRIs#39`UNe3|!0_XCXs<7MsX|wfzQ=Y%#iV^h73KdDGG3~rCw zByh6)Y5mf!UYPYkD*=c^*~3vG>8IC_eKI@gVS$cP6`jGL(YF+r5xfUJcXxY=ve5#e+is-Pa?f;C9kD8$_yd1J_7z>6ic6?^?ul$ z9+?aZ-;GJk`HAv7_~5JibeS$m($f6Pbbfj8W@0$UBWQx|Ae(1x7O~0A{4FEpSqrac ze1osPUjpc7UKpr-Zz2KF`b8o8d`X8H3qJg#O!O+WObrN5XV zG1XYm>Vt$gWSz^uA_YHgEAL^6Cu(I6gG0t{D(X(00Y~~{Ofx@^V3Bu2uVVFEF*d(7U3wjhUVMn zg${BCNx?%?T#aFmYT5J-)Gw_Mr-e`L*Z)evZkX{1v94NxJ#Gg@@E>34;C0{zQompf zNk=0c#lE3>xz73mQeZR+9zp8E#W)qR&Gg$PU6kGl6^=07>Ai4(n%L=%jDL@6VdUw; zFIvmY_m4cWw z;8BdHRH+~{uQHSmqn1}{vv^;i;|%O-2sasA_L)oALjk`;%sIv0k(%OyrV%$y31;}t zq{0}e*`BaN5C70QTC=!)=LXeM6lr>X6xb{!&Jt;KW+2{tYwxY7yNkIhbeLcxnxKo} z-qat~K;WrMoWOtD3;XzZf<6X38%NB2piG{*)I9FHe{ct|eC>ZBCqp5Pe@s3A5JUT) zB-4xT{1+Odzt_oCs`Z2TPr_D(=Jxg>|78{Ms66>&h=Bi1>HihiA^4Bc{og=9PfcB2 zeF{S*>VNVL2WTZk^os9D__=twBCgo+>wZ%%?u&sE#CHvV?Ktw6`Mr$TxnTO0qP|2gx3HD(n*(#CNJ2zrtN+m))lS z#dh-v$AwhC)a5(ssK$DfjWzbu(tKKwd>k)SGsT6DFfjU=9F^^l!K7ce+*W5z4{=%> zxf#1_Qr)5Qj{8bR^!ztE#MZDW<=X29*Qz^rbeW4-}ohxYed2-1ICZU?kTP z7M^Zs#L_$QW2I~>(%t`%Zp>L{<<5$rd3@AkaE`YqBpex@#gb>;28(cYuxrb@q#oU$ zmg|u$%9ZN#Z7XU+ZP9?~2mk=-+SgKKS7Z+)xR;HT($zB-t+D6ZzbkND;{H;SV#<@)q z=PRYBCm@mX9XsIJ>{zesPk#d^l*IOUyK|j#SUc}D8m#_68u>b4)`BG|jjvVr#~PMK zK27#VEDV(`(O#VXO6*4d}Q8j~c%gw=o{BMTF&(gYKHfcvuiB)8lct2uZ2Y zim7`*XwbH&Xeib9 z>D^Q=xMWp*AJ@TY#+z%lF@+`ixwl1bhSf6EJ#%(YzYE&`=J<@rLbr2~M%+fY;YAyh zHfKd1oL=0iHsTrS3|DnKnE%y#-;B}vp)51qT+!2ywC$zdkQNS6%I(;!_N}0`s0~3$F(&1 zo_cO?Q#&2{Wc9`or58S3H3Y-_r{T{&m{ZVB^)~TG`wmv6EC)Kjx1Kh0G-tF;9!|t_ zg;ekPsezbTImEBx9Nr2{(0jft^GqHG?j3k zb^b9XF$GPs|3z)nX3ryS!sZmi3IIHI@sS#;{XKv_>fhuB-D4{f$@H8lNsockPUN)& z>x8O>eUAKd?S#DblkLZ~){j)``ur!1%__-p(=$|K(Ig`Bo-W?TjTRXA4ox>SgW2|| zI_RrkHi;8=sk*BN2zzn!@pQemaN;JgY|WVmGj^%!GQ}+78?uF4;bCy(!?&40LJ43# z*{qP8Ou;aLHYu{PdXB|!1aHcJ?U&dAaKM$hY$MDaAxYI~3iEG+QSu8H1cM(N%lx{(s#M8z9NA0ZH=1|L!Gr7?ek?^yJy2`$J@@WIBTl`X zd&7Dei(;8gZ@h-e6m1lf3N73Oy{E&I+hXQ@^l{pMl%_NqmTK4c9>;EWPt>7b2*s+) z1zP_aI_&Pi`2{GK4=TKJ6Arscd-mh!;MC+W6Wy{qMyJ+kh?e|x9D*>;?#e2R+Pr|V zZMLr198H|g;4lvcQ&F&~#ATZ>MMuWv^ZiK7%m!Rj9+c#Rh-hS5#*B*(+dP>Y1TS|T z_{~u%BMN)RYAj$<3YBA@%jtlDI@+uI@~+qW^JMEdU}YlQ^H~!%!>=Z>RF^u2NBJFZ z2R$!xr|VNI&<#}zi%?2Fag}2>L8#_F z2b$@ue(n)BS9zWf9acY6rAjGK%N-qI>Wo-g6f*-=c8e0r+dyhslPdrxxn!HOIVfuI z8W>X2#R*xTz8y=fDnu(^N~$eJX_fIH(WBis#e7h*q*%~QrI2jl=&_4HrccwGD*92T ze4&+vgiR&T_H=v9gpY99K3^Vx_1YP3mwLG^4@T&#cO81)+}U?G(cg22Xu1MrXWev} zB?IKF(}wsS-#0w!Gy#(p_Faf!LND+OS6!--`?mHB#XQ$s8xI=oGA1&m%KK(_gmKg^ z7Wd6d92rz=44g$`c{48GfJTnXYSED8t|PxW%Q?Ljr|J0@jA>RqhXWmT=sgpmz#kkR z_T{6l_p=M%R3F>~!raQ+-Y|*kx?L9J3bDRs5#MVT2F1DPB&=1~ixs}hZA-IOd67Sr zjR!4oT+v`Nfi-Os1or*xFlxuU2Ndg9Vx$+`$Qx>};PejI+J(i^e@_+PtDB^Hfxymrv~6M$SbL zDo)j+B;r~^_43qd#>q8Xk9*W6?xIMuX$Or8OEpfTjs8Bbq$ap4zCp6x(Y9AvL;R0*b7ha6(4WMrAhjiu1b;a z5?Y>tSm}M+EK`ivi_2o3@-Fta`!GWH9R+%yV6B{R-nsM|`|+G^Nu5RR{-;;`R08Fv z$=f++V{0>8zGqyo|m1^I=ZrC?-^G(y!#i_4!&H{YHU! za??TZ=^)FIoa<_T3z}jD8&7MtIGFE0qCDsiTX4q$7FO}=s!>1AA5(EnV0E%1YDH!i z?#6sMOHW=NKiX}i=_!*~xA1;)qY=0Ji;?(d1a=>^FNK0SR;;E)Q`!8}Y)qgF zVLXxtyKT(pxB+X0o=CE!9ngOi4S0PQfntRP_lO9bCqrVVzgACGQ(QVf-mmZ6qG{bP zGvRwqH=8#~duS4!*0$bf!v^Tr2bK0=d_z0n zArqOWxQYrwdQ~#QSO{3=gjN!~(^o$LvNwsj!8Ox4`#wXm`H` zHCFCFb9a!LtJHB0xnPx*^wte|Ns|=JVBcs@yUboP6f7UXv>PTq49v(jg-9Ip#ZT*K zI7>=NdL17Y8Lx#u`Y2XbTmiOjD_Ggsx&u{tGEL6$;5pK0<8IzxfXVAEP1!?XysDpXOnwl*4z~N>qbL>fK zZQZMVi}5AK9MyT(70;Uu5^;8n00{RZa&oZ#FbU+z9GQ69z-DEOoEdq2+Qz|3d%})I zOIbi`n#v^36vWOND4&{mBHC!(X+_Tb&br%gy>w<4GguX#>mCA7qY7}rauH`}Ac(i# zF=g4shIal=WR+mw2n*0_Hb?i9p?!*K&rcoCjb4)i4F&N<-la1`NW(s=4X35=dk)sG znTlp$FL1}u;29FNm`2daP_>kAHP+>*qCwV0_ z#zdF)0A~XS;^`w2yF&<_<}nN$*LD>NGJrdLB3*G$Ig?mE@5qsY%7gP%nPzN2JeeDX zpwgsevF+z)r?We2HmJnM0A_uDAt52B9h;@y`IaNoGB}m3$4ox_N5+E*8#sgS8eL8O1XP@P|W{&77&=BaOEFI`#wM0p5%gi!2ClR;{SbD z8d;E#n3z~~4AcQtX5gg@YIEJg-IOkyKfVGrvVN?{0|MzMQu+Rm(?$LpR`|!M|M#1( z-ZJqBA7@nmPy63VC;v_5zj2cP|Iv+qWC9-$>HSr!WA+M}4IF;goZcu>Uv+da;fFg< z&>XF*p2Qt3(c_?@K*MZ&TQPC*t>35-^XSNkUOymFTLs>`gl(lAhEfaR-i}&IK$K%Y?I#D z3Hl={^g)0_G6~b&IJz4cG?~P*-f5*5D_H%>l401rNqN`)q;k|5jWF=C-@>7|yD z#JQ12Q$T~R(ew(7oim(fZevY*V^1O=r^m8KyHuMmH=8ZzuHGir@|=(*FaADIYWpz% zur-1daKnaV%42AI^|gfDo(dNA!T2_k3RPmc#h&eAul)0htNKm$l~tsZxK1~Hbr z!DOw$)b!}&H-o9TBrsh2?l{>L5YYTWEI1W7bv1Z)WoSJLFU3Dch&%NGY{{c4QCclK zY#y}s*YK3XM^Y2=0#HBOY=~A%-CPr0nXa8BJe9PPPF#|P)lc{fh56m6-NQre^&8)( z6TR^SxACext=<76`zYS>Pd_@$A^n=7PfiyDKImEoNIkfvq^L&n)0kOuuNzJLH=>wT z{bq0Bolq0Gq<7U-z)=fM3bHF{6*6`!1Evh76X2hPn7;S;q-fnK5f)Uh9-KQLUR>~L z$ffWFIcJX9Ml6@rcMVPTFr{jUxvclIi9D_HxkI&1XSOrNA64j2LqF^_Qq_(+sP~N; zHa8r0OT6WN_-2EXSdQSlfV(Om#29cmo#BfL+o;C)*|+#ao00*9?_jo;JLQ~B|O3f*!C2hFtU0qq1&ypAvo%JTy*kuIh*Z03>SRBH9N z@R&gp;FmK9_%VCzTaX>e#&=3_KB}qeN9)vITTWX}UfGC7H<(p0kKI2n$rW{zEc0Vt z%DaZ{uac-@D}Wapqc~u(T?z{sJY z_O1rsKkmGnn0p4#RHDm>wf+!HJ5GKm7G2CYL(GW`Zcj-&3L;8>xJH)rw~G7_rTnck z$pyhNcfRdyHC5%b>?1P!CbP(}T*2PK!71VZO)IUN$B)yW40o;~(Irob`cE!MC0m6$ zpZ5wWfKMMU*JUi%R@JDFGVk1H**lbP+89{$EcIi(>jxH47CBtVEY+Oc%OkGbWLZwk zTXjGjiRA#LCVt#4vAEVD!#gIkuk%BhsP)8YVgP2GWBGH5VFN0y8X<;NNJ<{hy>N-# zh-*!gFNibArMojB5+ycgpm#{_o}?^g)7UboZN?EBo0_8`arR9LyCgF-){jc(JVeUp zzEHhQ5c2_&CC+5Uv2?ZU`tU>C{Nbcst*xzXiOcLX#QzsQedOq<{%Lgp zMg-c13zJ;d4Udc<*`!XDYgbbJ)E=vTy}Ouz`%Pem`yR`(nB}lgvrkq5_&Wzlwwau% zs8u3$-PkfJksWaNsp&P_8}jtu)wjfHKa+cK?)PxzT%?y!J>dqwO&4=o;yettInsFZ zy9W#gV!Lug>8sLrX(Kc6bv*)A7{%Vm6P2yLyhl5n@&1LiEPwbFiqCGZ*Y)!>=_oL( z-hT}nb@5H&oA^b3i>A=!vhU?H zmM|nznQD_*DsC)LL%3<8ss=2B8*L%Xpd6eXB31LCH)}dYy|ad$8*4%$L~X0M_JfK)XdhNv5ip z4jN?Ze?^y;FQz@hJEf-Z_5=dfTqj*SF^&+JC|5Yh?!)amStm*7p+X)mxb7bxk{m0i zgW$!ShgIt|_ssb20IZuOZlw4d{#7Drp!V4{9V!YZDEen+_vkxUOc>UDtqj_AV@Vbh%8)OvtAm%LmmE9^`6joo|KK9U#S3|6n&)R>G zp?K!i9)=u`VQ$$D5GFw3Gr{&Yj*g8ov5zAB>vFZP_$0)YjfnmnF886!+futXK0 zFqr(tdh4IbaMOPAg3AmuIkt4%blFHOJRrjcSp(dsUCqEZh3tJX>*x`gG@}Q?*}Rx z%~(AQGkw=0ovD=F1YA$H4E}mgJ`A%pYDuM_1X%8LL@~i%&p#Cxs(<=5(!Ri(b&cx<}g>dH;q54Y~2J{^ol+&!MgMR$~Qa&uALz&^pD*+Z7at^Jf8 zf5nofi?fFCH6&Y_V3W6?kPysH%3^(eJ^JNi+g$6h(Ns`vX6ECKYmqd^T^l!W$w=&G zH1)FZDiedu1n>teDJ>wR&V?)4?J zJ)uOC5#~q~Pi0|(74E;^+1M5AK%5ES63V zN4b8UeL@!>PnWs2vvW>qisF?r4Dj|T$mj3vI68N+YBXgj+{y@lVloSkFYp@wlYLa=3p z22}FV^3${D&xMCi$-Z|S2w7{Geed%M-@jA8q< zX9I8SJ}4m3-bo5tZlV&Xa91;q=IrDj~XZJWgfJDuhuf_AK9CePUC6YoD13w`d_GepBe5wMDNLkrg#B z)?%Wu7GXQQOpW+T0>8x)@tJNAmR#4=L+8Ao?*%-kR54os8nodTXuQ#>ajwxqn3sH*&3)$ z_5hRfZHMo2F{A^1ZbiVHo(jB&m}_YJONdlx*+^1YoGtG1IDipWB9gSVP!QWYu<9y? z(F`+JJixBe_8Pg*u6z_JjL$_`(e`=`ma1Pm%Ey&Ldc9VUhsbl2qSMB%0kY-kZ+b32 zNQqtco5Q3MXALw91+RXOO*`MTLGPzs8k0VJ5?TEn_I#&dKivPgeokn@8gx_^0Yhsb z+p_TAAkeX;3F$N@zINv3KmPGk9$#A0N@s2;^l0i0f*!Nz;%}{+azZe8fEyN$tQ4OS zO7)pQ)|2ci{c9;HaEswa+wI&-QmV@Pk%#iXPNIRZ5+L`hAxVamR77RUv8W97dUFSy z0_g#U4K|Z_!e4Qx#|>~qbxp2yAJv!#)hDONO6Phg6tnB+EEdFS%p5Dt~-CxJ?JFc~GaDY64*a+gm6oXd+X*u0_ zV!2_46jiav;#Ty{O78M+j>on1q9wBD(+O!05BCcKsu+j+V5zyYn!SClk4$d@x?Soj zOft|KvjXb6y1MA?`klnn54)?G5v<%hOFTmdhou1~rr<+8;NPhsFF{N=U;ZWJLH!&D z=Fa%Mah3+#&_%FigU0bwH|dP}u}*S#5>v^N_;@u?Tk>#1kU?!T2^C?TrBI1d+f9*{ zk5bN&ip7qrYUOZ$C%#JE19N*xm;juvA;H`YMEVCtTVvTNL%Vo|K!c9%j|hJ!JiRjL`cORob|f?muj6Ls01au3DuR5uJ& zIZbs7S|$Eo71A7xxIE6sQk$xGmm;6$oKqm%1-Ms!_)?1&xj4$EoEBOQt*=|g2FHBv zZzd`HQ3;nJ60v+h7TvcM8Mm_uR7q{46t?5HXL$|Ip9Pd5c1mxx#SUS(6c}#zb9us>6OLuiUKV)l1W5UpijZNr=>50$shmF+uj=1F zytZ&^^oayCI8{>e)Cr?!vToDqQ+gUZ;qWi?=cU(eT&hUI{k9`fgRFS&U_?K)DW#uw z4exq}m*eHqbSP8QCe=g5FPv0p}yCNurjUV-317b0SR}JyRE*pPmwIWSJ?x{M0*~)g_ScL_f<=cyJ^#WvNHl9`v-~ z3QzjoqOY=MAM*{134turpbO2_Y8XGO`raiSv*&&G;J36n-C9{;i8m)E$3OB8%(G+K z4$$VjM};}~ia&eQ=GB;EF1I4bpO2BSV$`-i_9l??1*61xX(e=XO})214m8AdcUl{Z z1=@Tfmj0Ya;uuLnmFLx)quNuovI;$JBcSnD)gLC~Xx6cWqm%->|AIvV-(2}x%b!>(m(35KtA$)k zIsM-F;2|YJR91k3fQiiwjYt`4AHy^wg- zPQWyGO6no>)LbojUDS@Z$fgdI)__MoyG)=u-hCIzs9s@69Y6Lw9?J96<%o)@&~*Y0 zqB-z_eZbX-m`!m_TM3|*7=AfI&3yt|L%CLt4W3pGiYE5#yT!KnS{xgImg@S>6M8)J z*m@-@uh!e&E%4!QDP_AhXg8#?3izyN@+!E~@OFIj_c#k}@BeaDtDjnx)!r4M&DUbKN>Qa>w(hQ#=Nh-L`92RIIGBQ=qj(^!{3)eOMpv4v%q- z*2S{Rg~Di&p~XLmJ$I#kvs=L_m*(Ix>pV$eRxd%rxHUdg27wpzmRT;wBlH!V^Tp3Cdsnr?1THMM~Y<_g4qkE*nZH#_2C6`qR&XA|k4~y3mH>#+}&3@UHDbm_>Uy zGCSUs)4&W|Y3zfFy{h^dR}?t@z=zAJA|k?hDZ>Pf$^K~MQB*g#N!>HVX^%_il_5Mc zGb0-IcWzpG|5a{$H&@PP?H{TYE8_eG#hBPVn%}ncv7Lq2+r>w_<)==&0e8 z9cI!_z0_g&@`LB)Mq%uRxX90@s_%poQO#%APLC-J)aeNJd4kGd+l?x|o@{Y8^*V0p zs*06}YL6cWaF*AZpuhDEbz0Hl9i~pqZ+^-v*~Tb4#lTKKyx{>nj!5<#HAJsz1{jsp zt#i&9+Ij4L?cH{3r8MZM95dy*Z{iWf{ruZ^P-4B2Cw6;nEo$!a;utM;(S8|uldqv4 z6g^GMmdr3_7SM>ru1LkV)A^}gp!qHZN`HHqI2S%9BtJjj&QFR-G5jIF*(6RCq&=l; zk^N7Hf_#F%@x2=zuENrTHBS%j(vlZS{tEwP>Qqxe6Srx@xCYA+ZZGY`fn{n(ahZw{ zoh>JYf2U1SA*feNC%k8-a25Bg>!m-6%dv4QMs~jc~IIK|1fFbP*~~P!uf5 z0Lw4r8UVn3+z|k>R1{?*(EB$SJ^?~g`J%IdojjT>HzHLeEa$*B64F9jj zZU}`6j8nwCRQ*!1s&B{<%OfdZM^6Y?YEQOI_c<6)+#du0J`0Spcv4crIURFX>UI3C zQrfPX)&dR;)yc;`}K1L1%+ox(fJ%Bgp=8w zNBDrH-%bHJKkMjQ?I7iKizOVTI+cFS-gh6Th4Ewh>Fw zd*f+g^0-k#A-@{g(Ss9`udtXIvejQOXDX_{l>OYxpXur4TVHX=#E_t$SuOV7R361& zF&~2=6Yx6a#A)t_1wul_aTmmxn)vnlIwZ7A_HZiNvx#`kV8at5SUj7t{4;4h1CzHm zZpTa!NsFs1p&j#LCS#?lpCgDQ@XvODNzRv$u!?JJeWVqzZDrbIvK~1`6mzs%#YCJr%8?pA2FP81xs#i~7qZ@HZnVGR6z9$a? z^xWOPDZZOU;bIK!Q!em!LxtDup zNHaI)u(TwKve6UnU`)gp+Ep-+K3o(|0$q#0synz<9FOuMMcd9LobY0tmMxe2=&Gd6wbA%z(8tphk9m1790V5$5A&o`y>Zl$%19 zR_qW1%1c78*_!KQ_f&lIC6GquImA?%EDAW6zgCObiPp-5yj1eq43%rZRT?ESB(?RI zzz~Z$i;)B(ir37rha2%kek1BrmGA~5O#@t6Qi0~qdu^CCYt=NzRoc8w%36@b%?Ab$G%#ZKOQSJ>P9c5vJ?^tms(=1Q`=Q(M2>zh873yINa5f;$g%vld7# zT6-+>xR@(xWT0kwn}WzI*Xu(_#(aS zm}dbNQKDwnG?_Cq-yuALsyx^Xve57HFq`^Z-Vj6X%+@s6z*aD6#bAx#*g>t)54!LG zL?7X+lS78yu687Y+jbKGMcoa%9?yyTM*|tb=+};8d*=(Ycw96p&+L~ z!(FCfD})V7N&cQQXc%H-W83welQoW!NA7~W`DMq?(&RnYFSSK~wQb@AFX_GP;L(U@ zRN145WNz-tw;MJB-|i-{RKh~JrApb#J^vNBLuYDU1CF6NnW!|4TC`YsTbl8_ z1@|fZ__0~5jG85?yd~tc8Vd#X&hbvHzUI%>gz}nGSQnLLkA>}A!Vf|ZHlQh@CXbV2 z=xDK-ZO-p3jIA3<1{-;pqek?V_l;<61-QvJHC~$tJ*xM&i#=q0-G;{034qT@#&G-E za))rSeO%@2mL09X&Q2(c&K8x9y>gZAM{ENdy3p_`D?o8eQJjd~2B(UmWfJ+M*6PtP z=P$!1()ZeqMGY;daYa1%0tGIfZ4ZDgdOWP#tt9??Q+-5GWDY;`M*fVTxEd_Oh}c+) z29F7E;uV~1>oamUI*dQ%F>7N3f-db!>q=|C+3yiS;c^1d{jy}r0Rc@|9R32mZ{|M$ z5)%n=Rl~{D_lCh=meH`p;8fR(&$G33`K9ObCRo)%`w350nodM85~e0J#`7iOVD|`G zV9&PbGuOMS#swupDf@{;;ldw-{L`HC2?wmbzMrx)LFDX~MvYKAn{k@3=uqBV%Xe}I zN5Q1Ob}@DSO&50y3Q~-Bqae@)?j!Qraafc-d`qyUL4T(T-pmhl^V5`DyZL4`(@0f| z92E?>9RWyuGLa>!8jIip-w?h;*K()(A0!D1;OdpE&ZhZ1X#MCRK?6OSGmd7N<)fxI;Gm#;-Td+$dS6|zs|4R}r+oN1HUD@Nw z38aR(%I!6Bm6pN#>=~WZSHamzb?TBA_hQf4Y9$=m=y!sPaPa=iuors-(wqeSKRX}y z#Lpd=oT^pFLJYGeuNhOE7g~KFHJzwb96c>b5oAt%o^W>>(uJB7_RLfjgV`qFN`@?K zS>3~sprI<&D!w#aC8ZGgLlYKUIwtajH-E$Akx*gdhxEu=Y>arK6Q-?gv(W>6?29e^ z&5P!w33(hl_!K<@RRn&Iz1x~F!TjOXO)dNBB91z26oSrBFZS2d#n$))smUExtpH?_ zXDdmC@-qQDw_|+Pe(T`I$ccy4QQP`1oPmUPwoW6&Zse1+x0K9es~z{_^g|Yu1#VA8 zTbTzBaX+G98Dx9=a;fqRYyxYzuuR^fT3eCebJb6h8+2i7CAjHR9R+1>Mr}yW8#p|% zm$cp|m0~~?+T&S;0umpek|; z7^AE?^wuK0(CL}}@M^b!5ImEYdC@nUH85BEX`R>5PmKXrA)L<}5{$|}BA8vZv$Szc zTb135W|6-Q(yjj~nwmteW@-WN^S{uK$fdE)DP^Poy|iRlIyV=_9IXO5{*H-c^N6il zxVdS0CGOymZ!5Qy;B;ao)xKY9N0G>@aC3mk-0PHtE?5s&>rX|Gq9{7e6uNVw)0{M4 z50o0WYHYfjHrmnzY zy_2b1RmM==dJayEdP@Gr((Vg^8_2L3`Z#`KC5D$aOD50tVbL!N&96NpcWu8DSHdgF z+l~W6;4+$dL_;LN{V^y;47Z7EJ-PB~z*b&+szmh?*xeTN$zsHm=)Yo0+1=-v=kwub zu#IQ(ZJFjbSxgE|;(rL(Wa^msVz?xgCir>o{q(3DxiN;b2P>M&J5ER2l z#65h{^EQ$W$+h^H#gwIeS;fPRjI&~(b7Qgd8xd5c<&yG7Ep_luq^vk+`*`DK_W^(L ztYPY`4Uaa}ok2&oG;AZAe+ac-qelXoOZe9fX%*b!>tODQPdhMy3^|=D!{WwpiW!+0 zc`>4{LosZX6iv|gj4xUYOcQ@<^^`PpeM*d@5Yd;_GcUQ_$ zsB85jE|WPViMS<4H*ImDw$v9RpxaHRhXqFUEpXw*ycABmxzXa( zncso7#c&+EkQ@IGYi}J8RoC_l4;YAw+=2xPh_rMnje>N^5Yiys(m8;lC`fmM#LysJ z0wy)|(5ZBH2t#~pgLwPY`+V;?Xa6BGGwj)`uXX)msjRD~aAly|9KU7WpDhbzb{{2F zH8#dWH3$i?O~BH?r2M1??Pd^CgOaOctffQmF}zh&r&R&sx=c~!4d0h_(DL4xtZqI_ zIUCMfwvlbb4FVsA2k}pki)!7%>x0afX)w}yGYJ_B>;p5;#S8griL8RY_U(^-jlJ?X zNF0DK0ZT!iW#$SNLR@|Ul17yZlKnLa8b@{Wf_FZrXab(N8|Jo)PUQMT9o>$_#MAx= z=Y!k9dSc{yE3e!&h9^2?En2^(?7$e|U7o~N!w^wh@v}qoFHW_Rwb8g)DpkEaYcAM* zR#Cf~Q&!2=PS7!WR!O4DeMH*xRlMv9ar4io*sNncyhm7GhQR96UX$6|1ngT4ZngQS z!}(f~9+&(^>bYLx06x<0&r>{wUqC>;rbgJZjY$wMYtCTJ-j=2<6da4}Wgtg0AK1et z-+;x;z0+++ZZy2jPTg5%_)J);we{FzZ^|d*EqBLCsr#SmsYK-C`!FSNT+txs+*&0j zyh<3)T4z=JL^en!)~)*{KfGE&IrA0XV&ClPap?_|SM?m1!EMC7+GRD-#CBLsjo9`E7Nu3P;^>jFrcM7PecSI0qC6!W>#>oz!kh=fWb^h_{`od7Nzn@=&oX0MFXOh_?`Zx9#34&)-p!)^| z?{#oP*wm?5e<~Axn(5UA)Ke^4hpPZQKySH=2HfJlbKyEuG5kQ&wuN&I;0ObmLr~HQ z$hAHf0V3sY-b)<$=~cvVMc38S&$fphQAnBCg)0OV`&)yPJ?d5^@B;(ai*2H`S3+7_ zWqHHpbXAoKB)2SXgm;99mnfL#LllR+eav>OCxMJniCsMKO|jYE?3H4<5e87iaR*CN z=Gwi&y(P!mPzY~Z8!*f7uecMbVdG;GE^@Gv?o zA>s&__Mu0dP6~sP84yyEU?WK%F8f~MxFJ%(pjvKlti@>Ve5DZ}C&TpBCpYna>okaQ z-zrLMZ1Xs<<$m^ENO474VAdvyC)U4Ja=m&P!JPF0&Jd3^4KZMFi#wh(1OFJP6=<1` z5vtQ|FmYX3K%Sq9ax1P7-erQ`garxms9XIrw3AfSL3tNKc2bL4KkUwB8v>p%xIVfm zufT}+)8qth9{nzq`E!5SgBgM!0SMkAJr9fNZ{iw{Y!yn85}k#SE*2&3=j^S#7UcNl zhaq_e%HjNd$@l!TnMU?62CB_O!)4X-XYb;%J@=|GOI3^fsW$VufH-+@b?pY}`B$k$ zMQB-QpE_v-xDtgIRm=N9IQG4Y&m^xUKT!BsHYXtlNDIy^v2pj@cc?;VZJaG^|l=)(U{(e00~S_Sugn|p{EFR z>t`*m31l5d5oOh{cfLcTYCA+Pv6XoN-8pWQSl2YkLkrSq^4`Zybe=|Or2)lU%K(iR z8I~5boS?-t^`)ea=k!ML_7QQQ6CkNVEnxmqfwN_``?-9Wg(91cna2RXhqWB#Qng%j zaotQzO$%+uA?BI-QT}b6%F_^ylyNx!Z2{!*wn@xC3B;52rKi;|3;2hl?B!1s&CS8! z3pEdR^AFXisi{LE9Boh>-Mzh1pkA83N4vG_?KX%B+<}+_p%IRq+9I=TGCVUhw=Sh$ z{Kb`y!awP1QF`@c9v|F(T+j~s^yvW+2}wL|YQ>l@{lr{$egu8~2L*wRclgoHuafIi zPnpET#>#j$ALm31;XJ%Dj*gC>j>u9#X{LU1OWHdnB_-@cns%kpXD(ce!q`eg2Jir1 zsFr=e!mFUIJ5I+1$w5W_`}$j6&4Sum9@Tz7rII||stmD)L05A)`EYYGl#=+67COUS zG<^KmzC@s9eqZwEsdo+R;ja`G`+ADiN~QbiJ6AD7Zrj49peeryFshy03HpnVZubfv z#h5CKF9*ftK?{<#lKg!+ zNF=`an}qy*4rGNkEubWaO(xg6NLKGK#gvQFvR9TEn|osHvb(rHLd~Tw{aXNxIE;hj zMv?6_6Svbdg#g~Xhj;1aBJtfZ7|6xaW^M9B4f8bVDCmnqZQDXeA-g zN66jv6#q?nXn^0tZ(Q1_5s(P~&am0FOEAluzcySNvJhmp{ zTmFMpMC*Ta-*~gr?Maj*{4QN#hMfknOf}^Lr<+ofPhGcjrqNuJi0s5VZ(urS0FRM~ zwAlSwFK9VU?YJ{3H5mq%8L-u&qF^ej?s6pi$K*o=!>WdKz9*hnB~FhF?HHBj6qy z5zC+BX`lC@*+RV*+#`o)H3lLu2|@dq#4y`7ewDeohz7iSLpo%u%!7JPT)!A+bWmx( z2^qcYc+LnW>;h?7YNpGsbwoxPqbdn3(dvZG2RqX(Y#U@LlnP2pR5}rp)f)yK?&N{ z4PufuVu|u_xmmKT=Jg*JUik6n5PcNLag+9O>nQRkUINxsQ-R)c)S&PAO8_td^5J?T zL5%7Sh~?;M5}cCb3720I%CaErw4pa`Eh;nykyfsgt&IC@x>G*V<`rPOI43(;lJ!~- z*nCuY_Y{9yoZPP1S$f?C)}7Y~wFTNAFGDt#s_La(4>4^KZ<#9Pk?H8#mQi;MiSt51 z^_&nTG{XBTJ}$V-Wu_arxjlsXb!L9;=T@1;+4RKV;Nbc$)}PXwaW2QpS3{J#0$m4L z0)$CYyEdDo#~V(kZUIw|jL~Z55Qv-QAo~)7x&J5B<@QYKLto>Y83l&j&u%i$#EFH+ z3u)NUy|(KkRsqd#Z3KxiUH7(3c9zgjDl~8yonUzK=PD0&@!j7`f&JL+NKNI)l?$Jq z)MAF0fkJ7tp+nxK@cH3$Z~)nXae#f@q7y-P6X@F zW($34Z}pv#KI(U_rDB@rkzsM)#*ae!wkl?@OU7&J5X9JgI&&SWXaFLvOY^#H*!P!NCC0}N0pQu}g^^uE zY9J!#)A9Ho0(fKIvd1BYnnmd>tUjqnh`nkBCu^SDga!clFM5IT4Q^+wpc4yvHQ{H? z)o+3gV40L@Z_duIp_b#{Eap4-nLi25``@msNN8&2&f;I`Op62ymGr>OOw=BBc~3n&j_ zM0T~m$}t~u{&cweuniqpv0=MmyUDguxWTqrc)ZL{UBEV$@3cc~3hso;HPWTWnPVGX zB8>~vK6Gh5-Lf#a{qn=g=gaWY*)3GKkC{Gaz)>1vd=^zWU zZRIvX&a%n%YC7g>IP|AMp+#Q#*!ha})rapj$S@?PgT-_P$}Y+PK12P{-X`%z0Nn7L`Ec&9O+scp-n2k_i^0UGla z6!u?ZRHN+GST`{-*=d$WQ^gL|7M}9`1Of@bw%Dg3xOjH5bnsv~8Y#u4q?};s3f1w) z1)hVS0#J?V2+&Qi^8KM>k-um+i&X44SZit9 zt*oqUCL_G^`9E@s!A#$hXI?7|Ep?0h%{XA-WmiYu!q~a%f>2Np!=Vhc9JonXo@|i* z3?vjs&Lx3)0m?#P!OEwE!HYUelmEjG=ncdbY$7}SDaIQ<1Y+x_yT^HqX2+A5G%OP& z8e~V@F&4a&N6-n_ih~#Iw5P+T@ z1_J9?lV7dn`O8enlWnt8in$RYVPNanaU*Y9mOrRD++Q9Pdj$0p?#(XvqTHpP8XHG(M16iZs%&aW7=gep{TH*0y^2EcvX{uY7P#|cqa(y)8 zyglksI}7!jnQ1M%jz@;7zwUr{a)%%YHX0$^fwGez36cmgR$6_ICyrjSgB2XtW8IgI z`|)HA{+_*+XP#katE?6nr@9r!hsGUs%;Ot31K{iUe>&c+BJ0;ZR<9rJ&}g`a#kMyM z^N+`NRN%?3Mkov-psb}aBP2$gr%8BeMh2~FEq4E>?l>_z>^N$%OdbwJ5hLsQLG>&0 zw3PAj@kgyD#M*aEe0joD^YdwRTwJkjO1yO)5ponWdg#teGXMf68nT@Ru?fILDzr^j zQc`OC=#dQZO{ zT;oO>ux#mr73*l(0-{zxsHZ#HY#-MT_}Fg`bRnWnRo(N)STO62oUkUz;TLSi(~oY3 zB{^%9=!}uVJS!fr5Xkmw*!ovTk_jHH1}^f$(!2>|XOHEYLYYZ_@3U&Y}y*l;c zt@to|ss{jj0m3oV)P~mN zDl=yj9>~F3Q#WSn)m_-)A~OOFr6kf8ryZRocGGC#lVMf9O!l1IH~a=JG0yFD%u7&q zM4j#aaLtH_Kez%&e+V`hY741o`Mp-n#7EnTS|v&t(f+E{dC>;WYWn7lrDj_gx=B~l zLNPVNDH_WMn=UPE>;tbYeG2udnmxg;PbRv<YFwVil$aQ(C&H5cq$wxl)n&3L0zuj$~~Ez`cCOHMX<$R zJtcX&Tt*QWg{lQevb);(pGL5^=P|#$B*~H_{J2Zt9PhgQOGh1&`TQRI0l8wOQpR!y1p`1uB$=anu{bn=- zQGIu0IO$Uz8)VIds|j*^aLZTw^F8eSb7pcwHOJ9x{QOMWqFxF`JY3R9Z7!VGsjS6X z5re-nTrgOY2xmU$b6iBM7Xe4VQO{eSN%7BgH&andGo8YlPoL6wCx&^oesO-9A6)7k z|2^!fZj(Bv_;zU!N1J)d-4a~;q{jDr-}P};$ZhbPsvY%WC+BYjTXd4DK3C){Lva!E zchd06B!#xQ=XuZTTe#XzsF^7h<#6tMPfD}}@cv94iIz$oU{CE@D@r`Sp0H*b5rq5k zF{YyxYbunD_QwQi>aM=6;v6H%WM(V;#~S8Gt||VbJLhpe(2yrx*+7}bpFtYFI$iyM znRU1OwbK4GJ>y6}x%s3>6C!-hEN^n zbTi~PTgFPco%1%=;26EHNms%i z!2B=W=$}eWnR}uKH|XzD#~UVaO|VH`Nydlq;|9PiO)|=R#(G%oerk^Vp}$7cv4$sC zbf>41+Vhi z>_fOYD%45kF=an04Fs}ZOy~->Ou3qJZIiRqH{J296LGY(?R2#_CkgwM&@z?^drPOu zaijRLlY<%@$1^|(;r9IvnLuQ^7kus%VhnHZX3ze?=9_p)ir3b1F&4pEZhwVv(LNyD zob_>U)?tu6O%r5=GH_KyMxBP7for;n^qMcKlth(Zzqj(uN{~#NI<_t-C*9$92H7C> zXlA&pN`3iTi%arRsg#rsJ~ObD@ZJcj@wV)b$O;IIsF9@_LODY%n(Qu&saxbHaZM4nn$r)Ky~keg zXldbUECRSM=U9fE*EEzYL3Zz(UOH)cTC0u+H$y|c3fU7q-UcI z>vPVQ;QFkXL4#NyjoHxn=)EwEWTEc8P#d@Q}aW|hg)^qKOQIwkr?G{|66x$pi7zt`Z& z^eoM@pL3_wVmjJQv-p1=P&jE5P~M0-g_o;KL?j-knFiF~nVqafM#rZH;XC)}pVzuc|ywCRG^n7soKF8bTOhwFJQOivMVG}X>RMk8sZsQy+fT<6%q$g&pms!^;yF8AX>d#9vEqLw ze@OI1zabJkp?{n-@0HrApv0#0rPyBgnv%IGPa*GmnVuqtFOs{c0+>&SY#VKeeQRj? zTVNxDV5zo-j>y8^Ma(xpGofn3ZD*g-@XXH3n;)>?B@`~21tESCIKeXpPE+-aqn7he z+%Y~Hcg%!OWnxOaDFVex-iwT>4lRb~@293B(@j1>+%~()9peD zC5Yl1X+jI`1H$%E^kS zje!FR9LZrP)?H_IiJPuq7u!#^(C)1&1G>1@Yc zJjX66sjbZt`7HnqJ$j{>0dPMJi1{FW&%)<)9)mU+fhL~`ZTUmfZp-|qJpQG+KB zMsb~<0#@YxU@9B1v-8U?ka;-nn#^AJbMboGuc%RgngyxWvq%&vKYWSiM!MlEztY8! z)y0=>zpJ^K>=@!crK-3OlP|uD1lQue-z{z%k!wsE#_4-iQ!!=}9b#l9@QRAHCi=;G z!GnVM&wD!T?Zw`qsr0s_qrEa8@kAgoLVvMIX#B%F;24xDNR$9@0Q0~f{pVgi?CkG1 zNr%4jHqi4j;hyyZAhE^bZ0Nsn>!CCo+$3{os{xq*C0GLlA{+dZf3vvdFC?C$S*(R1 zCPp#@A!Sj~F{Roi+L>FPrlTs0 zoM7iX`3l-;lR+P6dw9GHe+qI(@*}eHi?tc04@$P@iRk#!W0tmMx<@*|a5vBuINctk z>fyc``Xdp+Q~O>{O70!KHKZdm_;oDLH;^h#a#PAG6)rJkr&+&|SBAF-^2Y zF3X|XG_jXG46EBx-l9nw3nn@2hMRQUvaD5rM1sIke=j$Uvt=^7S|z79X+yH{_pu*B z4`#ndCuSqPjNCKTs!g@!7YDOsGNwAWH~B!Gk3CuKttpiBfoeO59^wETUuV)$Tp$Hq zlEt4ipp?arRO6{^^N^PT*~x8z?u|m|L$|M=Bw&Dz^HRQ|EqmMED^oG0b*b&{wvM*$ zXybqLxjFtUdv3?c+KdQ^6+bD#^p*;qOCV&dBy04MBTFO`Y?WGft(aRrnvkh6X;n8e~{8KRlKMoll_>nW8Bh~%B9)j zts*)>9{k2Z>@Q01?`^j``AG{gNUg0|rjgac7d&Ub{icF+1d}uu?Dr=OUI2-Oe47F2 z#RQni!LLboYfJ=p8s#Q|eZG?OUt)8&0JTXgMTn!XI9dued@Uf# zXUIaArP$n7mALi~#S{ZW;EGRXX5=KN7N*DGjz;Sf>W*jfUa(VhW5OZbV`rQa)?$~ zSlDLBy1o%$(-c75h(rK~fDk}$e7vvZr8Wh0j zfy*$@#7&oKK2{q2HF&OfuqB{h6a{-XvefD#u zXzeQ@X7UT!K@eT{M12iHuHj%`t_gs3^!D~r6W%vBdPSlew{9f(|B-3^_cOXyn(40k z_%$$HBD$AU7O!WKw6ljj%0eiV%qwBy65h=;v+t@0)3Kic9>GVRBY)xpfXyJ|khQX_ zqSD~26+rkA)o?RZ2lnu$Bz{^4NvCddsp4Ngp;*9J!gK$%Jkje~0+zGxFX`~b9A zh^aVg#1=SzzPvuQFK};pf2zR^w^S!_w_bp86hTZMIiCbHh@RYb3sLKwa*xiu);k*3 z@--XxC4*xdvcRa(i=ArLQ8Be}99WjcqN8=WJqT0$lF+paQDrz}AuAx6|LF zv&0kV4~@#$qX3IGVq$B*!UtxdzpVcaW;>t6@9Iw8#=jlsHY=5#T2ay8+H&z2Iq-!L z1Of;X_zqTx9g+8sW&xg)P;oBlo#8pqvjM-btvE$YI}(A}>aS?z2UIO;r>U=mazVf0 z)T4?32qD0*U{QMi0q;EAY4gwmOqqLs9(Pp%eeYD?{{b9%{GGQUXh`U?v881MfCH~_ z?{A<19DvlRYg_jn}1gakk*n_p|7 zfave8lK^Kfu(gkfQ44jZ);5Se?|c#ee;eDWFLo_7ZSihYE!PZ=d~thrL`-Zfkej{^ z1r$X`0Y%t9M@Zr?p&-Z%1U7&es|A#|C)Bp%V*gDBJO2G|0OD6u{7ox7et{P7Vt&1K z^yB~F1}BrwZ$2(Spi}=5vibKD$v;^W{R$0R6MTGd!JO5ZotIa-y@xsiVPIk8#{>7u zP4JTv3jcs8SH`3ri-T-`Mhrlhl-t1TCj?Z^$Aw?|+yc;re(Q6?&fWtDoJMMw+QM#+ z0Ct4{4HidzKL}3#zLFS%p94v7a>BaBGW>N)PZ_!~{a}Th3KvcZ%xnnBJ)((gRDbB|j{{U!?v3W6m| zr9jxaYWB&>F@#o6-!7#jSfwAs zlb}g)V}}^=XC~Nlb#W)juhxI9(e=s0PDAoy7b5F#3Iz>?FqdW>V)Ts`sMqXzpu2sF=K?%Qc=yAy=Dz#+E~&R|+j+q#o37Xj3ZakJ z*~Gy7Ol6hqQPP!jP7-h>-(AGpZ1Rnv?jQ33qQL(R&hZkc5jRQ>yrq~NkfE7CKoVVe zkD@czjEB=sEZp@xC$Lr%(jORf{P}#CZPtjWEbj{8Lqfs_?B(c}Z4Huy6YR9=!y)h= z!O_zJFRRiv3HI*?`8>cqyMf7mP^mW}x68;gRG@SgQGJMD5F2ha#%tSPMRi%Z_0td% zeVvCvQg}&?T63+AY|EQe#bz4F^!TJm&3B@l;25ab;g8o3_er~k2lB!vyIm^Pz(KtT z7c##l4)%gc*;$K=jr{Y{G$&nMo;pHN?5bsx5B#%eq>U-)+AgdGOkd=DYlm1`3OhyG z%_GD=2RyJIGg8hH+e{7hN4|57#T~F#;w+0LPz*4{jsEyDX#Li0qBcw>|I~hQi%1h? z!<#ViJXC+W+PsTN+i2jOrqfs)HI$k0Q>D?no~4QDT1gb80Xl{55>tZ;@B&6IP9+VC z&q=w@XMThgNw#+eFkUOU#45KTNK4H?Z5Nnhdq*qGRJF!3aKRMr2nq*MmB%NU zblKU)!U}L>J2{Aq9h&Y(7s}1`gjt!+M3j8JmXx|F;VJT012|?X`b}mv7d(_PypdE@ zuhp``G-&B^)yU=aQuUX)G8wW-x@CdHvE0u^)AVDn5WXc;KgBd`2Ae91p?d1ea>gox zaRe6SgG+R;z(lyvN@Muvq7j}mHT5OGti$<#&By!to=3+hZ)g7v=20p!hR$!;m(_Sq z?A}|lJR7iNK@R_n%(^>xk+r2zS^MHGcOeJ-tp-C9LEB+A>qup#YLWfrM)^|{x4SWr zjB)O=2URPZmTcGNG93|aSyp0#K>sax#~Jb0uozWNI({=A{U`e$4R7JiS+7Xgo(oE? zCkQod0p*eWsC1+ZW>=@-GbMSNkfBAR-Axsx4-Pq#z5UjNld~|{QM|?K3f#ZZN>G)l zw~{JenxpyU!q7WXt14ywr$zsiR)_YQKyh9gfrcrGm9u8H=t#+8K&#p3Uc z+Vv6EGO|D%C?~JxCe|yWJslf&D=dEYg34EG$q}HLOA_8EgI}v}i2;&um$Ury#0#wB zju$1{!|KRWa5|r{lTtYea!b&teN)DlV(guio=GIVZF{=CIT;9iGv~7bV!bcT$W=xf zi!k?YAx1y*(O77HGcJ;p6{=P3sG8M1ADZMs8Ovd9tp}%ZZu^8AB^O~u2F5j4s4fr! zT?>(qb(Hnq2f6ZBxW$>lB=+P)qcs|-9wj+57GXho!yE;0I}I7&C6-Kx7B8V$5tTd1 z@OgHkZ-oGjn*@;i3w3S&GSJ+qe7}6UdPd4&GhrGhl{q#8c8@)vr&4R6+M`$-^3kj~ zPogufssbj|1iMPu0jE@he#9FO!PzoP;cd0VMj|#1S#2F;;B2~ktKHf33?0^wIM~L9 z{&3~S!w0v08i&_BdCoh*GYyuLqV%~`AJaJ7KWpL~zQuAc%V4K+u~5wDMS(@zR`{J1 zo+3ZSYJL57D-5X|nR;Gh<}l^F;clkUqXbG$spM1ECxc07*5ndiLxcDewVOj3SH*;d zvw`!mK4m}IsH;*5%9Bo5uYcN5WiweaqW@e>&uJ50V4dl-S;_Z>Q%^G%tt1R>!(?Z|y9NkGMCw z-|)P0E-4!C3rS~3@9p8iki^tI>%zXTX$o&y;bqTctHGP~9@(yF3u|4Q9He<(OU}8YqBEpKB4R<;&2s?lkyCY6SJ)Kv6b! zhAJ9%o0F}**;iRr`+JtX9<84M>_<906w5t9VLiyn#&Iy5>}hW}n~Cj4`qI-bR^IIh8h z{v}%*<^fTOpt#WC?mZPP=d?Y*YA=PS)fpz4;Gq<0A2+;R|5>windo-b8LByuCy0=V z!8Z221|kbAj@jenTaqFOnUCG1fi6nY>m~@GXTxM*G6Lb2AX@$p-aBDu zNxz@oB~0RsILQvEykdGxx0KafoMMlk(& zxpAByPr3q9?m~CK1|L=qy|O|Psdpbd@`<2H-Wk*;_J4Kj8ce>1%i%R3xMTy%r(Iq<7)Z}A z+RKBjR?@{^Ez|eAW%3@L1zW}@$WrN#>t989|E3iB6M$bC$?v+=uwAnqG~{t8m_4|R z0zy#=o9`d7oHx5wESUeer{|6rjQA%T=VsyF7eO~Epxf$2wYS$c(&z6z4j@Gc57*oo zA14HR@J3-#9c%3{z(*r4O+&8ne8^cxH6$MtF<2P8> zD~TIS&aQpJcW*B)YUP0gVy;v7w(9Ki;XA&~F7#IaA5R1O2HGLj4oC`jFtzxNkTZIu zwtGdKT_?8lvg>Hdk~a0*Yuydb(};%Rx6FAV^m$M2Ue|b*0I1rmJKvby$(cVq`^xlN z!~^b}K#aX010H2wgsOq)dP7<5TF{19SLMwC;~5{0EOL* z?9Y49%ARh&4NSx$4VFi$ZPprTP(T=9*~A6JJteqd5=XYdlkrfkzz>en{l7|-6m@bY zW=9(07reDxgIVCeQuXC^VmM7gA9G0wSukL}iUBgHbY@m1Es*7H?aqq<6F2Dq!Grr~ zU~>a#t)E8L|3#A`p7S3J#LylTxPPPtv0y~Sh82L=g+KavyRMmMSAg1P|F+$g4|{QwAPP*C@3 z6Tl1>V{rhHQv}FX119&xiwjKPaeg%+%u@lJaKRX^pxS?jKh#0_%Jyo~#Q|=Z=NRxS zQ`jB5e%L%Du=VU?`nqtWVpvGo z&pK{p9^Ra&G*D{22%K-gv|++|?;a|$*6r;FfU>gj?3y{xGt%fxeg7l@9==|>y%|bh zUtqq)3WQuh&}L%3mx}n?U`;-2h=Bu9h`#xNy`Li1eoq=~3h%A5TXLsU=B9~lu56&u zAgQv!mrixx7-JmDcEdb4BEukSHep5px3|CZPL_JuC!H7W$b4R=df*~&8egCnLsS(% z{w6*#C()&v2w1MHy$18rkquzH<3a6Oy2oz%+FZ6rSfqAB2+*|%kGQQfa)X+m%qePB zKtwdz_iEAurRH&gL=cI*F1aAMDhNxCwr;R$#D*l*@AIix@^Yz)2n8 zq!jdp0*IJO<|k4ky>K%^w{5&Ktm_$Iux_N{GC!7^J9m1VZ7P)=oU5|=ye7lGE`SbD zBVr%b-*Rr*;=%d|mc5@2pedTVRStb})XQXnL;RuC0m@@XYA3sPw+;Cf?R(Y3RFW$m zC{jux?OafwTz74Hw;4hUJ0t{dGD7qWKsxN6oCz%@LGuugST^O!j%U4Nt#0ytLveg zMg32Bywf=OsK{?dv4g~v`aQwhJO>6&)G|`pFVi1(E-;x%JV6f8=<~FZ)a%IKJ%vei z)&CfgT1f4h3UX>)r{+o|Lkj9^kd$cCeO+8}9c}7)KfWN#S}an8I4M;5XT!Zv+9NDOiIK2Ywbm~ z&cKX;(ktyqZ0`A@!ys0zTabh=1@-I9=P=)_twgWq&o=4bITtEqATM1)H=e{7eMi>70UUK|tXr6yULI_eVK{pL3i*U^L|Dpb0=a6a|H=G+s)um^4BU6KYYeRueS?YIuW z1{=8jVEfW38MHLsL~CDqmvOBoom7yXSbNZ%dj{ex`B- zq|%Hslv1uh`!oaZEw;3PxbFlcUJ7KhaIzo)D}BFgW)^h)#(eu@0UoJ4o10K6W?DH|wUFgN#F7@pfGLj&Pgvq*`;M#8VGt7cF-|dS07sv4h;c-B zcDfWCy=0-BU!l~KF3}x&2*#+*f6e*Jx8CilwaWC^&hUr<^8U0q_vC|F3^;`f98UG$ zqR^_unV_K-5P!yZAhmc>)kV(|L~>!nC?f%51mIlYGSp1mO?N(JaDe}78vTCQHWL3) zOey}5%p*BDsW1cUvc~0elm&MWe0;CbpR){q$Z4G!VVp~RUD`}@>>)uGo~Z>zY2Dql zcO{!N9S=>0g`Q=K;$6+9dQOXEI&(GUZ1M~2wc565+tBDnX*NuV+enS&bl&s`w=FJu zh`9|5oE82T5HEoVljZgO!&!OR-BF)b4`1EiA#tPV@j5?rmFIAFMTSQo{b@@uzSq9; zBbZKd64j>2&CX7GqVs8Zt za(NR9l~!Kf$Mmf?F3U7pH6+Rw>rDU#HGdIv9yU{9sHE8Bm;A8miuUd;j>omaIIyqE z9D-jcE`iwRuk+CNdYlHa&~s21f1SfR(!t=tZeQuxyJ&RocfuEXunlAAbAMm$DVL9` z@8lJsz~lNl`5nej3~u+w^}oM?ny8c%>Jl$LOsH8&Sy|G=BvTU`CNv>3Ex75o4i=5P zwKW?$CZ_ml|xCOP=c0aJH0;cBXGCwzft3hK2)aE9S$M zN>go#M@mN|lDg{J!P!fGB8T4I2mWNcTs0y6a(~_q z25V1AbMrJbS%nd?=oBhCXAzf}Wrd72R$6#UFTDrHz5acjlW|c_GRX>Q)RRoDY-Ku0 zLmqwLvLp)D(#cJwK;x`XPzdBpYWfl#ELDH*qG0Fbh|d~FH0gD>O8qDqi;Xo2N&6OR zP)O3#$j*&Yl8R@{qt5JH49!l>G%*?cOWyEC#?z`qhKAxU*)at$TKl1XycSg&{!y*-CT++#dn?LPVe0c8YweU`TOxuSj=qg;aRQA+pHTzeJeli6J&meNjghFVy{C-!RBVRQHEn;%+jsA2Y~ z#S8D(FW=<0NsXT$0Gkby>4z!d%4^y7t|)8Jv-?tW&)b!yDdapSW@qRk$Zz60sCT69LM*!Xk1T&uRawX>S}rnv zl7w(`-c6G?Rl92ta=%ybqwW4H&TWZF%C`QJvF5mvFKLD11EnhW2j6}u)sD#jqFb?8 zUg^%<($eB^NvQJw&D6yZGWsquEUck=dxZYxJ&}kU*QY$ZDb2HGRVm(E)9tziG}Ix$!$b`n z{$SWM%U?C0S0xEH;4N-<&!vL_wac!NCgEAfbmKr5Uz?i4X8NJYv#I%krh@YN)A-&| z=b5PN6`r8)EJla7dQrwF(nksXxN&Izd~0=*FiBO7;Z&S#Q}z=&DYyEPwHbX^%H^9v zyKkqM1D-*%=1&SR;-M+zXf6Tf)5euZ{5qAKC*)>5Il=gXd-4K5zn|J!C~DKsuigp) zJVm*)_@oReqW&Skg914zyr#dE?`>EtcLh;VBQg$w>uMvA4%0DzSa}g`r`0>l zwKyupRPpteEilB0<{FaZ6iT)jD3&+?w(h8I6>Ubr{aLxmU@_9*?rfFVBycK|+tZ~s zz`<&2bKhbwY6Ft>>$cKzS3+Sj$rtI>?r;(_>Y_}>HPsr z`=j%&AfOtB@vVG3WrJcYi(&~m%WL=5OZ#xQR{;*!yNmtK%%#>e19UJ|1$A{ZZ!$QK zeyFlor^Ix)CHg!kxE*0r^~i9llBcLlmIhtILyn!X_;=RXIf_FnbdN&48{g~xz~h_X z)}nNE>aBm|%9QfH?xp3BiGj>J^wW|d)yb=YtNli4c=(KA>3akm33J@`h3y_*-Thn0 z^lLoo4_!xpmmL-&_1X}!MKTyDHd(8?Y1LOk%Cpc^P)~YfA$8^I)ka`#Wvped+Ka(Q zCD)tr4kVObkb5RdZzmna^64~gabV5Qu?tn*!msrQ3?eo4fhIb#27!r@n6{5Ud?w?v zP;5K6&GeFW{bIRojfr$)dUQj7<+*M)euk^7wUY%hD*$X#5vcO!vm08 z=lT*n%a1_I+-uBI$~LE8DRo{qB>WB;3dp2I4?7IX1aME?fYLBVOJXpqKZwlqO<>MS8=hVZ+3*QG|%vcO48zw z+CN4};|j2-Y62z)v>-|-GUKz0zr?-)jJu-WMNhTHo81-Ha2&S(dyrTSB;=vDT-orf zAr77)ZET5IZxfjI2D~deb^N^b3yX?mX2i3bG(7e<*=(nz*=IlGp)G(!e%{-p7|%j# zu&Z>reEgCvQ!zaqT`*W_xN}_PUz6`HT6xfq9&D9O?ya{)f|;c143B;vc;TM&$|oEH z%+_KdsA>sa-FJK7`~|ijlx1svvVfYCKQTQWtDC@7IdiAqb-B8QwKBi7Bh;Hr>I=+2 zhBBOFcuRo~C3FGZI|u82H@l}+a(jNP9ol)3x40v*ql&Kqq4hP8X9gj#etnRaSR zYEP!mBYA2UpV+!dloYYaA>$X6aO;c`S;zVfVw{$rUZfAfNUM^j3$9h?(bbA%-L%I^ zujQLG<1z1*YR!(i+=+qmdB<1KE#OBO1}w&gjb>sFw+{~z`L_D>3}Y`frnbR&QwHsi z$L9aX*;_|dowog>*rF1OsB8oQ1q1|@?iOj4QYigQ{_Z=j>rW~jNxjnp<)>|}O@-QD@(B7;?81mrX#l$Zq8a9V1zy;}YPJ-;+Ehxeu#v z49;N=%Jb>bZS7^S!#f~v!1~Hr_(F1YU@tRa2CQO)w|U*CQo~n z9{404!Q5BD#w#z=K9=yyE&Y1#jn+7^ViNQnd>w&z#5FOZIiGOl{g-z{`P9D&j=RX28Vt zI`!7B;GLHaWtD)WFiIk?)<3>Hx=%(8p^O~c$7B0Ya>vJ3%?I4mH`)VLe8ie#Cfm#} z#4d3{aFcY)b?AAY!X#ObYXa&@8LE0+>(bmWx<3#zNJmYXJchw~$*8bT|DyL!Yy+a9 z^0<`xY#{G$zH{OB_%T*LdX@MDYLhHck?Wy$`lce(e)QV!nZhgs$d1H6TC5)cF8thb!?Hg?i#tBQl#w^8O!Zv^_w|+PfLFJICr36u}9%GHJ#}yjb;^2 zyV8oM@ru8`E{L1gE0JuDn`~cMKhEv%i%+%+87W~JfvVTVJiJR5itEp5#=Y`@Q>{*x z$7Rn(ZKFdIWsb0TG=UmYsy$JvIbrg<`9}P3_#Q<1)j%c{HDull&0`4CzncSz(3dcU z@IoYv4iRuJS8LD33W6R_7AeAkg2;tILPJ3iZt>k{zL(PNDwS@eZ6cQyXnScyM^Dxl zm#n5AHn(ef*ohbsUZIf3^`iVXO87>WAmG-Vkja|3Mr*g;>Ug+DT410@xz9?oK!u@r zsG9YFB8mt__-Uh=E^G8d1%(?A_&4L#h{6k!=JmHFo0BFxR;+a~_@7cze6{NX^IdfF zBpcxJr7Ik;3L{yd?@hTW*~f{(e!_YSRNjjXTq#pZjV&?Bbz zxEH40%xCP(Jg#6?)MDi|fgw4;;~ChJ-g2qt)XBvrL)Z;xYHd7KjF;sQ6iRdk%BA;}NRx;|s%3{_qM3}YPD3yygo+5v%QeS{yq|87;nuqs zVxlKri`U`+;jxCqS;ahujob4Fl`QZX^~5JWG5bhay$j!d=EE1Ejn^E$-k{E(F7bneZr<|-K*Du}F@qLQyQ~!-iNTKlyt-pYHsGV= z5W;6)09{G2Hr{8jT**O*ju@gmG%=B;dSTUM*5S$Vv6Wm!lPv}K{y54{krX31GSKu#NYPftV6Y(u&89gFXFs$H=bPiTb?d)#QZFdl0o6&Eix ztDbv0P2qYIZ(1o0(7jaz2lPDVS+RQIHbL0v1K7s$c1~qp3u13XJ32a+n|S5}{49eL zMn*=0A4e`FDe|peMV1i+=R(TW$Iri2YZa*<0P~us8U~w?364OyKb7P|P}q{aJ|m1hF88LkcDdi)b79&= zOKUD3eeZ8PqH%|Zk05~}6n>Lm&sE10bG&ZVr$<}-mU3QA2Cj7BtW&Y`9XoQqsQPX0 zVt0-q2YGVG)ki($jwNc>6K5Kruh@+qCP@#BJ#yLFZsa|!1O2zD(u|eC>WaTUNFAKf z#jDDzp{u>c$I??+EN8yUx+Q+N_wt)1sPse3r(5p5;@#*spIAA&6O$}=_qsH(U_1{dzrHis9?jL&1gkYI}mh_?6-&`)iA5I9_>>uzU;eOSg-w z-iKk8bFBUTGpKp}iv-Y^MS1_Ic_0(`1W6(nnL;T5D(QJe91);zP%obis~Qy#@vrZml8#; z>%A1C?fP=++AVaMMp#Mi#F_IYMXF?eNf-`+v?T#UH&YCcRT}OI7b^9Q4x^HJ8rT83 zYRhY@?GNgKvNj4T{s_iT6}U~bzj=_LPV^q18e|w6R;o?!q6#C-(tM%;my0663(!FL zdFR<&_RV5%`#sgRg1f5bWLXkHkD2^WbscO^xbS0?Qz)`Cd6 zPn`XJ@WydOpHw&lm(yaMx})*e@shFn?b5+6zb00~A8^ms zL3*5FpygEjqd2iz7%)W{7C1hlYF;?Ft0`4)^5LRsdvS!B3;vTyJqOSZtk!8WRE+pet#pqlXr>t5%fJOD82TVh0HK!Fiy zU*kX_r1d7x$4r$NY;U48f*pxj+ETRv>t3JCCLkFU!Cv(?EF*dW(#Edif!XoL!lDU$ghx64KIk6=`<`g6s}aIKksq zLyp!wlei=|-fY;GWzt6I;RvSceMSdIEr9h>wQ*h1T_bHV`E7hi9Ff__^=xRf$-39| z)Io${3$;23Fl=}xXDhfx?KxVzyRkJ`t~~V>v}OX4?@Ha`c4G z>b^}-pdHP@s(E>H4wk5u>=@tz1?KO^9n}|SC3KbVjY1VxC>42zHJK2M=)ymZjld~XP5tZ zB6T+jh_x%5^R0nB%!m+DI@?vus3t(mr^uWN&|~?HxJd2rMhL!^+gF0Hg333pR;WD{O~C7)9*Mi{NmsU zUz`{Dd(?|Z7Pg`BM4{0D{YQbl&mj*k!tL{T+Hz{`t6YxoX^i9&dFTDq@+lMk;gkN) zC7R2ecI~3hu-bV}lSh-VzX*<4>G=L#YjR|IyNp^Thx$;foXGAaticgT!H4-5QxgcC(BK(`YQMfIB@) zB>%$xOTlP;3J_XGMXV%Dwyx0eRjA)jqfY(cRvxvxF*GEd0XgW^r9)Z@~i&;2Nxv(?oHJ=gO|2R>+#_&cmd^fs5rt(v+ZFx~L*p|R6tmMuc3YV-8k z8{$`5`;D{x=k_FQUWyS}WFJtJ@f1X{bgOT%7V3K5Vzk!kZ&)P@XX6zOPB$N(4n`E0 z6fdIcV-w0L;~-IbdV1syWXf;HX+#|)iGWiniT*TjUbBRDMUan=lu38`9zc&-1lRpI z;HUX2Fq_kkJSg&6=JihBr&S`AEC500NKu7x7zd)E_6H~&jp=GQq@GV;RP78gvG2v0 zx4RNHG@~^>@o$b19ZZRk+bM;K5;=Bj`Xyrqf4#-EVsc1sDQst*Pr=5DhsFMF(^JAf)jMKP|P%Mi36O{rU?4{~YHoeMH0ooC=x+ z`v741!Nt>Tq=&jvJMskRN~=YfQ*F+X^FBf6a}Sg?4LST-&SO6J$6#J4OZ^w@718b1 zh}EAFR{GBU8K^dk5!g*)F}qTw`>h5Z=q&_-{Sylvoeme_y!-O?}*=rgg;* zdx1y%?u;Zw?c6itL1O<>y%V9(6)alOt+NKN0$9~Y{R|+W;s|%?lvTrct3E>x^TqA< z4+_PMJ-?5tgSCi5;rjgPJq=Vyp<%MrcZsE%p!S9s)NF&;xOoSVUa|z}mFm^Rh0FXKIE_>b5ICd_86(`s74j zP6v2u4H8o`is_9u96rN(;^P)|C-`V z3s=%n;od?fJWH&Ap3Tibf|Y!LMkg9VmZ5X+%UE;Bu*0)s%=V?HrojI?;v1dicjV3IdyT;$obRtQFlkr7OpdN>`&#e;KPy_8jNOan4 zzZuf>>=Is2`&gAr{lk@U`75Ah=wT$Ut zVb>A0XMTJ^`}S8^YkC%`+D{cf7#*ovex7TdQLuZGE66@v+SIBhZ+CX+ZQ-2WWvK~w zwbG>Mqib#}dy{2Tsv9RKxtT8MT26Lh1Iv0taz3^@pY7Yy_BMYYZMyLO;b48V6BQ}@ z=76SH+^xv@ylLxaKhLCBH1da(ZzLBAZrJ|V?k?YMT5$2^uOz)uGfq(joGkAJ<=0tx zdEc4Pb`<<$e0*F^RrN*Ch=HtPe#0$^h9Vr%>fLe6ANTEWUPeAwx|h&!lRi&si5PT) zQj(Hmu+alNNjd6Z@W)j@x3w?W6C}F>+n^wR(RDnr@`&Y{;8w7v*WID&#o}2emKXAO zh-hW~QG?W0Vr^VPV`j9!3iCNYvAQgK>{5o!+9F^T0`2Q?P*V0480H$>6Z5!2iIAQ# z6lD8-@oDA#kNjJoY;|G-bX7~{a@@lqDSl#iv0{JE%5YUK*;x%rc>AQTY}EdQ=tj~Z zZfbh_;Z#%yTpRLEfYEL{SnV;D%rPTyP3?nh%Gx~KNjfRD2jGSb7N2{H0-;fjJ7{Dy zed}AzD981?G4Y7P$awE5zSZ@NwOPpi#fi{w%6KQW>P<)2vkiLLx|;lo&i09%(yw$q zXMgWGI#b`!(Fd)s`nz)knNtE&sMwW&(8CB3;t!Ab>Q+f+qK zuCV!|o@y6TLbIQ1)}M<@KN2}P|CXz)o?FU@HG#Rw^(gH5DC5vpXW?A07k3Fh@Vi}B zd1WX}m*xhMhth*h5c(7PNwT)CKe)C1_zeR}s>Z#b7hRR$LJ4Dm0`j2~*qn{I>4ZLL519NLS|f|O+GZ{Ez3A~PH+S3`r#Q0&TfWIr4xiE!d;1>+_Av?q@kL7N7K5Qmk*x){F-g~yE_Y3FwVClRF17b& zE{^CuA2h0Tmt&wT4I;{I*u!(e4gDrY6y=llaL^!Wmno_g{}8sO zbK6ABnO3E42F&xpH-um6Q=77gGv~L+=5=Wa^H;yGO?<+Ayk*38MJtk}G1AbDvbW`y zM(50X-<1$1D~2<+YT?9fZ1@=J(Oy?eGcBE3&URYTc&>O3KkBD6LMyR(myPuG0ZxT^L|_ z&Knq5_`F+>w?*CDi>6}Twf=m0#45cS@oXuPJFrmMhVjUHrvW8m7hy)M0jjH${vp}Q z^!n`Z@tCWw^Tx?#J0sjn=O|+@$8gImZsBt4>U4XfV{f7Hvl1G1xqRaicX(qT&$h63 zF$GR?obz3hKT43?{-VzDobRLS*CiP9X44`XeBz`72%7mddViEQSULsI5GXXWKDflO zRS+k#@wsmjN)IAm6Q=8P2KrB?EXnaAwd(TgYpk2 zo|Lht=Z!pjbhFr?p})HQL5!0uyt`3{O`G-wV-flu%77?Si{7C?BqTA;K0cGu#BV^n zUiN#TzVxQvrp!_?)mfctJ;KmtLE}&8c~UIaCk4tc$?4+R3_p-?1TjDVdYYv{PE5?T zCo$kI>$&!p779f90x$hw0Z48H7aht)APe0xRS!!F^iVQjNv`;0`UO=YDeIYla7SoC zL7-EU#kbyFnc*3MFb3ZH9hA|fZet$;6lPU+S5h29v39b2)@fBMgJPhV|%9l*#-7K(LS>_(* z3EMniVu|<0FO0A5HZZSR!yKzwJ~ujsPoV8;d`4;d<_+~-vWAnoQC0bOw;X;iDZ;Zx zCRA#c#IZd<*vzYH#m-0BtQ!LXIR=gf<^U^;D>2Z_mx{EAG-pQ=tJTJG9YrdIpQ`p<9b`+M(=(jUi%Jzzx9Bxv2==gc%9k*9>8f*5gO-T$+Sg1-4p0&Z%n2rGL0jfiXj4z@!yP z$U>*{+GYJTDqTY~-WA6J6KLl_o@$6y$tIV*8Ei52ETO|EPZ>pn842I^IqrTE52JO4 z4iO(_fUnh+Z!Z`We!ZWvmaZfNm(A(vat~rS*I39E{V!N9o@jq_lofBel%xq8K6FRG zX}y+p*b}e$cA#=*wrMD-fwrmPP3lLt3NaGVR?<)XUkp^`GS&V0nmiR2$>j2TQHSTx z6t8q$^llHdXCfHF5i>W}{B!s%)v$dep_a_jTM5=%V=H%E>^vJsBD(a9RIe&W{aiZd zoF^3d>}Tmp#UuO^oiPDC7M9oU+u#2EPAER1cS4NUibfwo6w{s(LJ_!TKE;i} zD3plg*bANtsUzn-@a0+bzuzQU_&l3YGPbw9$e|HTYFyf?z{3U1{ehU_pruW8j0e$! zU0Q)pjfPcQg0q^D_XM<&nYW(id|e$jttO*IC`$6*qxf+NB0gj`f4_n$TeL{VMelz3 zb|4aCX=InLr5lGhjxcs?DQ$}#GvvM%xVPC4KpIm1e5{X$?YXLIC%a+(K0$QIeh;aq zsfu4uOia8>@k&!G>9o+lh22aTu5{~5_#1P%InV`r^KQz~S?(0uB225&~syeiCX3kJGl67$~1@=S|S>M6#RE^9{aD5A}+wa}! z%dI~`MEpi;r|NPofBwSu>ST|RYx>M`s6|pnGn=fw_Mj@>`{QjL_NFc-k?Rq=$MxF{ znA()RI*m9#7#FM)*I)0^DY0*<7hl7lk-i+Z>g!)K{jb} z1wZz!gUk_|!T>0Mm_^P#Ex?mML8Gj`NXHw(Y*c468H&*wE>+gUpTtBM_6$Zm-@v2W zAGt0s=Cz#XM`nn7xy+SmOXJ~sUi7O#ro~b0!oO1C;{kIT;&N(vyM7IO9fV&pN*3r5 zfrZZSb3E~fFigV_56Q_rJkd%C%qMXx8?glaA^jojH9ZrpzyEw?8j?3}h+`?1oJ0A)p+uk zqS|+F?LPbtMb@r5cW!z)t4qTq|7^sU?i-IkSN;-V!2cQD*PVSmR!Gp!1H0|EHxD9lfmK5XfN3v~N4HW2J?A=-9QQ~+ zYKVdv>+d1mP{aAp--aVDq!2Q7RgrhZ{g;w^K;Yc)TXH7(Z)z5A`b}Cnb(xf(GLO4H z$^ZQ-Us~J?c;ED>>U#OFPxBAX`s?w_Xo zKmFe~u3s0i>e0Sj@>Vd z0RbSt)DJ?BK#}!-+90+S!mvR;{MQEAhk34y+S=MVp!!3a*m1bm{6J6Kn{Ki;(;)@= z5pgyZW{Ssf4Vo+2+7KJiNni?_O`k9zxmw5$H+BI1N3!)!Fg#BkvF`XV}8uAu)SULWB!)|A?ug*MgPC73<&|$ z2b3RRHNeUZW*ZDY*tUjt66tyb(oT)78e@Nb(QSKch^isHbV!xRA+`uvNN_&4Q3F>l zo&m0jMXhJQixK!TUXs86&o3Vb$1d+J!7$Qt@SFl52OZ8uEq4!1Z3>lyvN%UIz<~17 zof6RQn0FJpHgZQw=PQX0au{SSM~(0|z_aB%o895P<;pCA1EZ@Y>%Xj?v4*0@r)nZ|Wys4<|Y0YiFg z#t|IRSU5_-KblzweC&K^3$@u!XI-5n9V27D6#8w1Pi$?AE?&Oem+&)GUXhVS>Vi2F zPOGW2ZG;BAB)+b+50W8|6tF=f4533Y#{Yj!Dlb`)u>^1tYgj3Q6li&5Se$N|I<^ev z-4LkZK$X*$aqkWinF9jS&wFzbbn$AWa7vILT1n0nI`5v37LshYKUn=R8@Vmxd=K=* z<9{9_knTR_5Y2PwWs2rGScK@kKjuD;1=T5oZn&wd$CbOn1uuG@lZP7QL0DbI92Ya6lYoRWY1RS?Q) zy(OrcDg_?^ddkpKV?x*p>^@e&lbo-&!R_^bZjfxyIhe-PGDUp<^e7G$AI4!8Pp7TY zW&Z^}<8#6Bvy#$5-NIHFh2|Ko^b&7z@U9x~v=lB88|{CC1@P6A)PoDs2zdO(+W;oC zsJLDJQ&`<**hQ9>!y_&eK>imhnJa^{M_bq6-I(>={gT+!v;@V^_8cj8S)eJR-#|f4 zEy>7wvv5*r4mYXdU@4(LygC1Gtulm{F+W-~LRoL-!hp)|{Bnyj(zK;(BXn2r`hF7N zCahpCaX}N;nB#2nRgD~k{I>IwS>^{iaXJUPQc|bs8Sa7kR~aH3rhWgp*|LS;b!5Xq zwt}+o!n*$GpC=(9;TPeZwu>n3((C?~u0P6m!@p^^+~^AJlRM)tkKzB&yWMX-2OJ0g z_DLS~X@lrB%&i&p+wI7D%avx9jH(BkOLm(wexLsEp)9;`@J1v>$RbP&?H@nI{f6g- zb-A=?@~){wQKkRo`;&^Q#aH!%Z}^*w3J*mU3@eSI$DOUIt6NU~JC2fK4LIlE|FqB$ z@*QP;mzweV?!tP;YxX*rbOl&e=Bv*~E^_=aa`I9Cni}r-)tHu*au5U=`W2)qzEFj? zZBGU!iO>f;#cBQXzuz~U{&vT)gqM+0HdE~cU;q5VUh8t^-?5pPCR{c_q6e6lrU}cI zzac1`(+g0>vo~*mY=stB4rc_lv#)G@oLt+S1ewBoBu*PHED#rbp7>XUyY7|t!Bob@ zgLqyx1o9U>R1y+XhutkcQSZ7-^mWpOKa~75IrSlO^P9)rOvz&$3xr~W^Li>6QPaL3gAephQ$G}>4K@EHSk0i8DRgzw+x?`j z#j;aogj!OGOkXX0gHHi;Tnw9CUTFTK>-9qVf1iH`NbMGN_WwIl>*{y{XH_+qo?ct* zQHtEBG!UE<(^DurlP#lS4ZM_nklaaQ0W%H{f{ZNTotNl7y61>5K64pEgoRT;6 z&i(x*$yDKcYnL0%AHuq2z^k1qyWlY>@+u|y_}RCgg)Tbp%}*_1Y;ZfvKU8rkMB{iy z@(}Ldd7#@xGRN(|kXrruwc6QYj>9Xom<21TmbGqrg)gCnlL6__ro(gT5 z&jh%pkXsO`tp6GItc$lQl-c*XdIk^Z0i~Ng)C`IUCT=k*LN0e58sidJi@ef z0~$IG@;O#w{k&#h>Ym-cwzlWOq6GXuqt*PbqCxk`nD{8Ew0MJ;VwEgtrgOi|s3%ZO znZcGYdMvLW-q*xatCY7`U*c%Ek-r9<Zf$Emd#_IYv)~11+Ui&^k((WvPTJ%~nd)WS2{dIi zW$a~QWt|ICu;&7i zXRR3j`4Bkb*SNL30b=b^2*B^Uf{S-y2WU!PG<7^txdw3pL^!Bc+;m%3mKc9^iu}&- zv2>4^**ssjlSZu4@ggdYi1XaW{+s{^Gn?^PvQU)F?5Fb(;;X81k2+zcShldJIn$p0 zDC?9JknHYn@gEQ+TNKIuet;XUuAHTAhISJnx>{g3rMo+w{~4)TO57P$3TpOuhxQNR zzL6Ay>E_Ck<711@EoT3cs0MBV>$3N`00yOQ(v$qD2@P$_t#P} zmN7Z1`1*fOR*JhjB6O(72U4Arnx^cM@c^}8oW?6y;!lveH_Umb9E`U$p!FCB@uEK* zax7YY_*G*kSuCOuWVZ~GnUI)>JY${aNXDwFs9cUaP{B}tRZkY(~jrtN@MY@yH)_Y?zOty{P; z=;z6~x#F>=nO5R)K>m5S#>VLgS8a>WH}M8-9w?t53wW$PtwiiJBH`9n4AWG{k>jXC zen%iTQg$&8+`K|g8zn=vz@_V_ta^}gH1!*B^Y%mwy=mA1Ly18FK;w(AxYn2*ewvhAEEacmy)Rr*>K_=`ON~C! z>9o?){+-l9(cu5*YPs#VE7agGVxKKAOpYPI4uMAFYzCddl&>$`1HHTL2%P12h@Y-n z?BUpVe=(H(|Pmh}PaXC?P-SZ~Dz7=e1yIpmJ#dKvz;1Y#4`ucNLc zu|5rZioLqZ+LJ&Ym#7hOrQ^p}zSHac8%(KwAj@hx$1|3mkWjTc1mD!Nl5eBnq~eHD z%xY%8P`l9gaO#H^{QVKhq4BG`0#FAs>$Tm;oihdrCpd9}f}IqQb+G8N-=hxN!+WSD z9u@uBztm3Fg8#GuOh;MYXPb>n7NPMc2Rar+QuaDk4@Deh<(Bp=NYc2H&Kh_9K05Aw zBO(kpro`P0QQaXU0A{+qWjNlrv4mgx5Ya%tbv$;X7gZ?oxc8?w^QpX)?YMT_=>~n;?X48b)Ta$l7 zF%bm3cin0iICo#TvdltfGQe=xP8vEIZ-@WYPoIx|PnK?x^StUzaz;jAf4}O=Lp6~b zpo6C2jjOy!=V-GxDX`z8u=Nn6jd8?WNW6cPT*UR954ypf2v}eE^@7xWbDx2LZ`J!n zUxCb-vu9m~uLhf#-oEQv!m%f#cVnSiS(=>1e3Q~EnJ@*S)qS-3f~l}o+7%0w16a4~8j zStH`W(z+yX4m83t)IQ4EORM}|O*6Q@!_Lrh zOS>y2d`6JEjaX{?Re*RCx$EI7>DBvmgG>)+qU!Q9RuKg~!F#Eu7cX9{A-A7{6I8mA z$>_91lc*=#8OvL-FIYLZo4mGh5Kz2vgguw!MPpJnzzkn`*+AmdI4%5u{gfd0}hF_DE+~4@GhzhxWDD|$Z6dL7A4co#6)pwLc*>c=X zU?&ER_onHNA=a~~A;mMnc8>y|7Dy+b7;HG;skDS7WqAb!p_G2BjuT^J-RWP-pdXod zGVg~DidBu9-@M2ezSG*?4(z_}^>pR@5zDgUotkc;@?vJ{7WI@W!T+df3ErKgcdws5F+5OqhU%JJh zEeFgM!rOx{M8tfWQ##)wY4DJ5QpVwvv;xOuIGQ zLMX$Fmq8F!`^}TIu~aF#^>0rVG99q2nIS>GB+HjXWL!^SHZr+i$?{muG9dX(?C|mQ ztx>+|b(0hq945RX-kl$nI#~9y$809nU(es~P9Nrhf1|y%I-SU9DBovQ$u&Uiy!`L- zjy~0fBLSl*kga+`$o7*6QNs1~(<`VvPPv1TLqniNFf_@K%3{cQHN9?FtuYR6(nzN* zJzJnA-pCqsWf-RZ5w~hXhA;U>#x9K~?-C(iSw)n?vIKN;%tyG=pT`pi=IP7DuRbxX zOn(<|h=7s_)d3VY^805hW_`%n8BI5nP$8)5v^;ltLMGqPQ&%ur(%{m&a=TsCjt$j6A~& z?!wj5o>;I8X?elsmX8k)++Pm>yA>odx8Ozlff`>KB@vcT?>d5BgQhfg9XhpXkaveH zemHpwT=f|GUZ4;{9v2lAnGINWp)yo6acQ)A`?$~1)(p^0{ zfYeS;$w5#MZrS-%XDR`!N6MWSR*<}U)sBfz*ZR=F^6N?L2=VFwJ58t*F>&PFgJMJh z1mFm(yjz)XahW^Zw_G=!o5f=4;ekf5jSKJV=gPmQmXv+IC3Ij}Ig#~W;_1^6B%G(A zh?{KD12`Y{dQz}H#j8ZP@}aTKNk8J#`bXFGkGyS{7Pz71YRHnxjy2Q^lLXh(j1h4P zq&58hVsN6}T3)&-1r|*whBZ7CUicvj5Rt!%QPDjN1_OScaFc7H)~C1~{9K>qg?f}1 z@;h#IGlGxlK#iTB32Y4ZsQ93=ii$RX!#Xyk9ABf4M1V<2ZUHXc=yos#wp?mDLX}YY z5~^7PopK0)G27dm4BLFt#-4Au20*QKUrhC(1pDxz1V6O@?aqIr%Ug`I9lBtLlzUiW zVm$kuVFG8=z1D+%nF5XLh%YTwMQzb~4|tdp^70grw>`I??8RVd&+4!&&%D-aoGr{5 zyuVP5*x(E-QCoL6q}-YU<*k``jRU4>2ik-F4J5S%swQ7f=zO}#$KP_%ozm(h5{1q; zf5vBEM_l_gsa_pfS+9_;D9SDKgkSLCuNQcC>{-l>O9*p5h}r{FKAr)}1sM00V$wV7 zh&34l*b!J!gu+3t4mDbVQ1UdLo3^N-bVIYeja)CcQGOUfO4l(Py!@#wNxL*xy;8U5 zGal<*$cdDC@>JmMXM>lNS_GTU-Y%tp{sA2!A(nPtmH0f;@IhIh78*q)Pay+Du;F`O zkG*+1xpd>T<~5{6nphj;feqQ1rJ0>*s1NFigvnI`Ur_HY0#x~^iU z=!YZRg@yzr`B2MDw~vFNh+_qFvUS+gUn#N(4$twDq1_CUnVagq=Y>&oE^}H;L>P1R z44Ysas_f<8i6=K2!=@tIFas;>DJtlU6b0L^eoYN0qZA>X-DXHTII%93&kcQz_ne6kl z!tj7t90|8ia?r|$Kpbrer9fKOUb{wk-t&+6h8^AAH=Q@@pJ~l?XQL5Ik`fXUEfQ`v zsN2+rBd#F-r(a<#=9(;<)HMog`F+aJqw*4`)q82ApwT9reT&# zvm>JrmJ8hl;K#q6oTT37Txx7&l^PwfWp2iw9SaE`?-kQ^PkpLyxeX+&k}Oa`lu%9q4k!KRh;!j_Z^l@ z5l*D@K9fpDR<47b#-R;8G~9P}@Vqe}-MnZaRS(GzWc>&wsuDJ_K+Wax#-8 z8X}trEaPryw&^abS@`Tg#ltZh3$0*gLCoK);dTp8q}I!VE*uG+=)GJuraSl9bdXTLfSR&<%$0DBpOO!~75^+D%-NAt|C z&dzT)f@9|w^ZaO^$4*+j;Q^0_{q1RZ!f#bMKR5BHdfH)a?MNqjl+>`q%Wqp`dtAGb zqtO`V6rgcZV*RI{S$4@#Rr?K<#~h_M^OqD5$eau={3CKMo|0=ZFkAO>USn#-!x0wHVS2N|eS5%?zI{9}>v>24oU zyz)I|`lap78 zXQ@!l^u5J?M=1{AcfC`|gu-`0GD~m}?NlJHX9KAkb{h+f0PwM`94;~uPHnFe@xkhT`zhi|r-dqy-@j`57Rj7xETX@>u5!OzkMPiv`v;zCE|5kwu4v)W zV?Rq&a-zHgX=j6IF}Fqur6}6NebRT3x&kump#~0i_RyE^N~W#D0jvB&=!A7d->KRG zNezHaWBD+YLGxhUZND|kRqaJ)Fri7;v!UL0jFsM?u4;r%H1}aC3u|QET~O%w(=jtK zu*_W$G#V!@+Vnq7A>1Qav)YqX*EO&8ku2bq6*c!RtKATQl1m!`{ZPJ9@ZVn$ zaLE4=$c(TU6V}qWsA-5Klll2A{py9YwR1xYOrUH^r67ZvT1P$g8XqXHCdk{fy1ysO zYeSW;qrO-KZGMM>WSd6y>f~#Dp-c3JEBkwk`@QtHKm%V31}fdd&n|f!E6S|hf3IEC zy^Qr%IBh=vbtXe^HsgX!7^LPe7B!!tvqYYpj64JE)Y>`J4E4Dg1~K8Ok1heYnyY); zYU1Co`_IR`DK{akryiu`R8Rw`Kk+-sg|xQF7WG1^HfWBX9K+e754YFq-GJv1Rso4h zC2YKi81ILRl!n#(&m*UTEiv)7Ao!KO7kUkHZkPc$rek36L;7}D&zgxaa%({0G(voTaThhX_6JkC_t*#jyh5XK->HO%g+$;mxmum(Zw9}^H0 z@TQ2?7_uhJo%bMT=!_ng7CJd4y9}0Q-u8xS<($Q`i?}VHZiSdF*^t~I9osC5G?ARB zdDN8SwZQsVC#Ltu}t5FTw!Z><$mlj)_BwIE54pbCtI&}cJ@DZ0HG)^`4|By zyR@W~)ObOk(OH8nD5jZcBP@IksoCO%i9bRYu{pR=PK&bVlIP+mgQ25tGs0^YIz^`S z*PV*ZM&pJS*#&QILLG{^zzN)+%P3lg?Y^Og@-JAGimi^!-lOWH)gOa2y|}*pdN*fUIGL+!FE&4s%`s6=XXUBCEK|?^ z<&x&Z0*@%GY|d0}vjT11!ug(pMgNDX&2RtfUZGM~yqFjJRo#A`xO2>vOHP7bVX1{O zIPZ*`tGm^ptuAVU69CFph&w1()nnS7Itjt;29){3L*=qZ%7CoB;KUro5SaGCH5A=FQ1c zYQiE_1V{^orSjwwjLYT$azh-_fdq3Q2~f+P{`zZ>L?}oE|C|YsyT`M6de5~J|6XX45eCLB{e-0 zFDkI%!HrMl$EeiUXA^5ar%BtFI%|hWlWaDNSS^?Po)r!cKzYd;AMoenMW(SfI)Kw4zt2(p1OF8<7R-~_l;tTCA-DqVTl9d#Wj5;P zwAZ?iNqYia-9gtIwKGPGk^zHFeDN#BA26h1D-6WP5FsFPby}D7Y_i3oUAu`C#FRMz z4a2sZp{Q*UOv6YX3+53gd1XhjjUph#q=!`P=kq7ZR})c$*GwCG9^geE+s&tnMySzd?p(7Etwu1Vf}BR1!O|re3d#=Q({K%ZM%iwXmUDoc+H2$gLLAWH3%C85!(CVF=iG zEAX5;V5>7~@V@e+X+V5fDXGeI0cX=ILZ|SZ#|YHhh*W=Lop2ci9?NXBI<5snOjF3g zr|$DwE1S6;xl42qANhW;diaG#6OmT@_6ze% zudagCk!ETcpk-Atud90GV-={^1*2T+IrF$-%)lPp>h-`8$s~k!b}Gq7h@^gZ0K6jy z6kSBD`dF+t5Z;4t`4VL#^y$-}p89?@P6SskKMWe8=HnKn0*g;1s`eD^oKJ=IQ>O3e zebNNCu?}Y}xOf^@vp3fCIK|u=xS^jPheL&9*8yTZLhO|)d9njj9A|rtD|WR2hM@^h zpk!QY;#mydp8q`R#j+cJByMwM^1zxz^ZRvNNiaMJUy?E885|i9P@6t^BvhKjx)sl? z^4@4T*FSFsG)x)dsW*{mP!*&~dzB>^;)? zOlXzE?szGcv^H~v63Xey53JicE*I0+QLR-9*jHsAJG5T zhw+LREl!6byrP>E-4-!>vY+tjhOXa6w&jSxH2)_`L+b({G3NZLa&NA*p8dS4e5HZq21Bq8J`&V z8Acva(*;9EO9JKHd9_!8L1t2WI5=%mRL-uCe@9CL^zkR8X*X8bNxkJ#>|oBlad+}4 zAsHww$=o-O;n;=#mtGVE)jm+nVZhg^lJCyXeVMCp(D`Zj{*=k-;saep{R0^ z$WRwBz+=&G@RByy9@22^!N3DN-YkfV6X}DPHi?gJ%}#wK#wQgL88_f^DVFLLF~P@ioIA{ ze98YjsNcn4-6&iCc*!qFe&>&uxa#qL#dpO9+#-#Q)^;JSsO=4U6u?Q`a0G zqENq0&`TNrMb53-j=FCaorXIIx}*SKZBj#&z%yj8qyLV5sZ+7LF7*V|)aWBPkwX9v zKvR2(Ljfl_S>O6cMHwHx*_)&sBjMI5DF*+Q=8(R?Ow<6xYD+>lI$e*tCUu9Ud%xo; z!#qHyEw*oi(sY0S-1Vnd)Ra>Md3V|#N*oyjZJRgX&-Lg|1G4jN3mDICK#E(OD&+Z? z0ZmpPd{rgOo3Wc($tn}VT=mx1sBBG%NF1TaT5$Jf+26RfVT9D!|Ap9|d!!v} zuCVkj(_-OSdT*Q%hKyaBVJ{xDFz^%V;6tVE;m3P& z)k9TgU3PDUg;(|eo0$54rmY{E4ba|rjIaWPHjiah;^(UT-8>(K!WaJ0ZAqD|8c+Qz zga;i}%iB}f{vTh^7xLrpFIJ5I7iVuB7uDLY508Ngg1AvskWK*sg#n~dq)WO%x%lXP2Z1X8tkx_+1nS_(s(^0yFR<(Ru6+=rL_^>#TVLS{ZyEyX zuG+-(pJ-Ds3#)}=4sD@JLPMbJ4LllaG3ZOTT&A7^;Ia&mWn=~TpZN!B;_`wr_sYPR zciv&vVH4HI_-kOxxj^mzGz7!`BApFu2lM2{{kf{)5fMfeAM`yvYXHM+TrPGBadCdK z@F(V-?qG=>(1L@OZ5*%+now|CeMK?^MCPg>n4yItGBWS|Z_YN4#%d*rr~b>I@`tqp z_=*+Cnm9Ydgbu$Oxq>cEn{Wey{lNdzS&Anq_+)pw1eRX&I%GjrT4yV;u74o4W7JN> zfl>Qr;DqF=0$Ru=xeMk}7s?=?2J*|55$GYAKh?MZ~K%$k~- zLB?IUYnE70QH#!$iIFxi7))mUi-kVZ#7Dew=cJNvNb(h19|ZO)k}AP{kn%?>3yFaE zuE+HCAWU`!V7mu}CM8{68*$ESfVfjP@F8fK%zz?1ymR6h_0N6hPjv1cIOO+zfehHs z#@ILjWB!7iQ;VdR7S{s`tsDB@2W0?S!SBqvZ*jB=x=T>E#2@36@F!My0-QcYDv_s- z{{>na7vSu}S>lqX_=nYh9;)L%QY8Kd8V+xJs`S)u>azu2VYQ5p=5J*o9hAu%$C0Ej zSh{{{tb`@wv7pP%-`|>IMlEvbR6%g7Np~@yW`#wB?)2McO}&aL`RD=-yFnPz;2>bO zIN#RE$K5$GzfhZ@wbJZ&DGVlf?nIn;dZ$}AY=F zIb$*UdDyIP=#=gtS>3X!;)RYrLwt$3Qfi>1@tbO#A5>BiOr7Z*lH zZnVY}*z$v^yTbX323KzmEe81}qP1QZM!*mo12$>=MJe^3qeG{)VJ{B1ucvQU1k{$h z8|BQ%Ei+otR4F82pX`#N1>%<+PcT6fjNrISFb{@fIaazO)ryirUPzp=b_ z*(c3DSme{ZYZ8`}w~|Cod`BRC&$Kxwm9Lk% zK>szDfp%?L$1^j&p;E2r*r|@?V$r3`43Ql4Tby`(|`xo20-!Kf;New_p4ixGC2r44A3b|UZdfH~>#}stJ1dCM z#Y{dhyR=zv>@-ji_QpYXtnT+t^0_8u=>vcgsJ9La1$L8QCSz&v<;%_>icuk*i1fA4 znJI_{NBtYL&Z1Fh1#ZHqR?5+63TQ_lv1d!A4&t zvqA)o(8Zr5$iBo(?%b#sXr{%+GLY>(LOp_IPh6WUT-9`Omz=s4Q>g&Ym>omA8qxQC zWj|5Jx3u_vmB&mAbuX=IwrW^#OxMf#H?~|P7n)WYHbB=wjEVpn;mqW?x9$cU0F>E) z2rzJKb$rxTO0*!j*kjmo7!Fs+a=xt=bjC12*JP_6SMTn%*79j<>+7oxCEo7ynaK_z zZ##I~24GkhjS8>lH+!hl_Xwi8)5TxTIm2__czvcpYV)XUWVxLsgIkx#s;lNH5SKy*? z;xo5byvsGYqC&j!ev=M-0ud#mEIW_x?-bTTn7y>(VkJ-sTOoqB!D%%;JvPu^b!I}% zsi?NLh1VyX7jXmz-)u-7Ceq23m!@QTnRq1gJ3#H7g7v6pbl#01O@RQ5$H9?yk0Q2i zmyNO>`|PyG*HbnIu@7xZ`5M_a`M4imYh)L>bo0$6MV|({8of?D0`%!8>GUo z8R&zhiIT&qYwWg74QJGB{_OK^YKsA$!q8ckfk1o` z<|=enKTAfp)%@!LOmOk1$i_$Ig#VP(+U}6(G?*FG>l zBgQ6q_f;v;%0W!hPLX@3ZFqmHK;1RhacTw)!%v(YO2TMF&2>GPS6GX$u~w zK!}m9?x-{8a93Scf2*;pQQj6gM<4H}lCgmf4)l#0O(B7zccq$eup=V?<5k&vPf3$^D!V`~>N=c*p@`1{yo zYyGCg!yJ-;n>6Fg6suSMdZ6bQQ(pQ~8!8ZMsXpF*R=V}9N(QHV(MjdubSSw!3aM$Yo7*# zRZR!>Gbl4gM?MP88{p**b$1+8$S+3ol&gn69-&-3IQt=~D6iKdrO|snJ11jT5JDdQ z>oR0X2QW=?aqd67WItt=LNXgfKnW>!0D%tciWI9QL1J?R@HRd#Pjzk&bg%f5okmZ1 z|8!-?@m4g5w`lvBgIi;oElJ2nsbmR>n`@TXdy=QZa`N*ddwP_rkIk8HR7{M_^TsF@)?q`#EApB<1jDPx3rog5YF8k`(wi7qBj0iq#B}W z2&w#3C0Q|PMI{+mPJ!YR?n1CT;lG{`W*7(~aJzXDE~)@aoCK& zAx3Tsqk}z6F*tJ7#F9Y}Cm;f!#Bg;Av=o{E)`%G@tb-}b9rke6p8u7{-p#%b^ZAvp zpMYI-$0h9Q8yIN$M}mwR>i$D8c~EdOX$*P6cH+frwY7NwI0aT%8v?$$P6zYM3>m#D z(|$UAC{`@ywg!ct;F+lU{~jcq0Asbgz~{|?l;$|=P*H@1OR+RT84H8Yn_hX{SLO}> zUAh85xiFt6GJw+$;-CTKQEhqUr|9Ycofs1+@cWa2W{?5S#h)1n6tsftj|>C~NMBSO z1Ad!-MzTL9L!naS@i63jF}14SF9Q7AJi}j!XEB^L>T7d^3E&X1=`}X1d}oP-59`8U z-z5Ir`r#=^%VPX%Kz+f<$vIdeu|!8VoZToOW`qme{a>l~%kolaxNtwIs4X2TELyzt zArhIB-dLuq98q#)oVMq1bjd`Lap0 z@;vpAyly3+EUj9tENjaj2vdetMy*u84&r64oAnWD4|bM=#xLWfvgJW{aWpeY`abD?i}Fs0RE3lNfT}y;KXE zr-|nkQaagG-YzS^P=CEa7_CGIzAIkqXmA?Ii}(4Wf~`}Qx#6vR&s4`?GD(*Q@~y95 zur!f-e)+Jr*F<@sf8&+P9roEsYnB`Pu~ z^_2Qcc#j9LLHt~@0nw$&bvDYK`W5R;wU#Wpk0wg4tTgAXzptPd(<(7TUPfD8rdMFz zpD582cW+|sJJ9i}vn zA8`4vJ>j=JC3K4Cd5%;r8%tQ#CsKuXpUbvxEBDhCeHB6`^i8b3krFd~k;4`{y_xY9 zC2b+>@me-6H8qq^^LwO=y>XmQ-a=5h2;eG@P=8!dl1bayCB?TDdZ89BF6))CQv;`l z!H%}1?%!1@RGiqhzToTGsdQs7?n}@tCMj@#V$+jBP>J=G1qTCo2G?F=#LgS7I)-Na z68%KDo9@; zcLJ6QVIv{C0^#e1EwY>JLxHv)p*jGE{59>M6A%~(5{q_ZZgedDOWvzK^Y3ckcf2VA zG-g)EG-d%bk3%iNA@JF^1XS)x(#(k#;knI58TXluXTxb8Uon=ID(@>*3Ajucx_@R3 zLqiOdKG1S|<>*yQgxz93hqOU(sfxTk+qfY5Q7k8wer_U$rDU~q5H32fS8CHq{AT#x zCWW7b`~Iu`7Cspd=A0*myiM-5K#wgc*gje3N{?5P?eY+hxPRwO5#hbk{>PMNAGagc z%m!VBc}oLiW3anBWVmyG_r<>BR}sq8;6pt3)6H$r9CQ=(g}-_-=O9-iIOo5PzTd)VMC7K)WRLEaG|+ zgmyI9oNF((=w%pw_n7t)xRlRD9Jci(Cz6Ul=-|x4!U*=_UuKhvi-2Dm%uM&^+F zd}y_4O8|>>3oxB^|?OIPe-|T#S?WFi5t$FKj_z}d5UWwn{$7~-6G|o1cMu@sABzijA zz;8_VuCaU$A~X41D172{_&O}O=WHzi-GqSwJuTEI1nJR5+ruY-DH$`+^_U4#2L=T)!dV77`vQUh-3*1w`R96Nj~wJgAiv$0DR8{w)lFbuxQ!of2FvRq6`-eY1ow@KLey0PdNAdBe)@x zo5+gVU|u~>F?3ChZYS0r=&ywfXVnz!6CrK4mV20XzE@c`Q}%kXp4!sNU80L**mu3h z8%O!AD(Uv_SNPR1si>rYoBg|=!Ck+Lvfx9R35w}`28D3_TjnKW9Jqcy*d>!+?} zCt#jW@Q)mv3^F86D-^B{t$#0k;z=t+hcVBTuO`?8(T}HUgM|8DMI0E6rW*{+LGw4V zVD7CDSNH!``jEt>nuyD=+_=URhNns5sKKo5oApLq>m-Av!02`6lcybE_0Um^P&-zs z__ZNnk~n`treWur>5$eIxJsVluI0*}XC!~JTL1d^zX^-x0nX5lR5S^Ln2c72iBuTp z*_3Q*k*7XTEhq5Gu3T$OYd{00$8zU)P6Ps-3+KA19KrZ+RlifQwJR<4A8qJkHi)~7 z2p`+c0SezMq3W$!A|8E%uTmD*qgc9 zW>-fr*98?Bj2Ds$I@nl@<(9I_of8T=wiP+JTW#`GNn_X}`j1Os#Y+SHO9M@o=oGIy z1dtGu8l5_U-yVPCVBmX2>OgCNm{W0Ka`nWL&T+-7qg;MMe`!x#v&7VCRH#Fq!>#W| zGwIh=lhMuEcU}hx2Ml+x3->ZSQ}zeXj&>e-x;@(>p_zrqEP))V-AUW2fGx8pbYPkf zK*9h2$Tk0cWc&W%1#;L$ZQ$0jPZFf{jJ(r{?k_vb-k0SB*8a0w^-TB3h|}jdwd5}^ z?4#8OowQa=4+8iuCB0O$nkHSiw)WUsixo%!0T{0T4yb1Ip4FQoDYN)d@vP46o7TZD zRuO+KzamBXjJ6AlkKz1X?SZ9K(}+9`Eh{gKA!bpF$72`uw``8Y6pPE`Ze3?~y)>Sh z#2`KKz^u25tLOG+w}N;zR*r1trt1=m=A|+2F^jYyXXlYp+nUosuS&UF;+*93(i!6p z7y)vEfCpsx&!<_Ht4)pIH-Jp#9^6Csh1C_ zUD||SovEx%e}#OaamH+b*L^FZ+o(}`R8p)*9TC*C-o&6;ffDrWwrq*tibClI;bw?Z z7ige#qWOE%#GIRG(L*7;A!-(IgQQfB7W@;$Ors&2NwVhk`ocDoRyWd7qQ;R@bJpQ< zZi-oi@NCWjt9K0JtTGL8pbVQxY~Rg|2q9XlxabBJxCx6t&3S+Ei`gIIzx8TLr{JR% zb`=hi=MVOp9~2ZDw!V9UFd3oCiz)NBZYyn5&NPjXdVNFN;4`n#lfF!78yAaGFWeFz zxp$E-KO8rD9upKLB4%>0f8^aK3$vUVoSSl&H1y+7_Ux=JoI>-x|HN5{5=HQ7k9idj z^t)oBP-oX1{728~d9I$Z@jJIIBzlA&CjEW*_e?JAEy#HiuQ9t$)Zxm#rZPHpTCA$C zYC@%Ofu}DoJg^pHC2%6tOSJugQM%`!IXx6>yVKL~ zrtVAR?GNo-l&5?~PdveB_%iwTP%YTjfJ7n_6rR)6n;P8hS^D$!8RPv_EFM=z={Vk? zCdX?o*dQ9aNMaREzm#DsX8cbahGo%Mx3-&uyNxgXw!|C?15Dva~adF?-SXsq^=wH|#}0#u;-+=LH=a zA|QI%CcK|T?S+C@Mwu!wfo#D^#mrfIFY(FgbjbnYhC&F&fyGY!D#Z+x$f>BtUX|go; zvhyW`RXv}v_$!?EbEp2=3s;EEFIJ*7In-K{thE@OTCX&N9jFD$OanIIa>bzkksIMu zwN_QNy<(c&&v2*M0>hy>F=Y9aEXl+r*`zhW$g`K89G_$f`JSlxf&78^s};V!>79w_ ze%IU<{Pycs{-QwF!8*L(NpDaO94T^y+{Ti>NnV+YK))-^%F{x}J)!D-{IG!k*bIsb z@mzNq=7OVBO@_~EE@l}9xRQw{{^sf01Xpk*~xZ@8lDVBrSeyye8>>6Idoqn;dinO zUF2*j5ya$n!jQrLzWZTR?dv5!)$AY_4V8&5KG1KDyQP{X-()}M^XG0=(&<%VN)pgK zgMY1yTh2K;FfUpFJ}BNsgm+ z;Z9O50px(lf-6zK6Sr@+m)EbL`qS+t)YvV+o&}4 zJ)UM|Mh@$<-qKPHw(1hCv9H{&&$;ZA9cVh8-MzjEF?3aBDhWVoo{{!@Hje%BsH44y z*kOmg+GJ*Q0(}SXiv9IutCB|PRFE{{b<@HUrSf24^xA_K5E~Vf0hoGLz)2XDhgQuJ z80O`ficNIJ^M(ukfVut2_eCSpt3n^q7%7>ke~bPaj|eTfAGPhn`YGZ&7U%oFTk-49 zoQP{0QA@=!KZ)b#m!u4u%okHj@w#%r{9pX-!!6a(6R>BtVDvK*LjHvS7}1MQoB{vQ z+AlrVH8d4}QZ*8{{B~lzZ4U%3? zASctI5vv0og8L)oc+?`(X968jtRhA`c@7 zY)oL3cwMgLQVKFO&f+|M?S1P9pD$gp$jJ$_IKMgi^hVaond(C9u^3H#^?A7dg42WusCAr!!ed$%P-FYoHJ@T&6OnknJymQF zybG!3gv=gLRzjBA+jOTo=SdtVk%^uSAPqY8o6EFwKkHy=X&IiW`k90GVU;OJJbjF%!g{48>g1CcT>091Ogi2^uaH)P{@?vD(LA3N+l8NR@AwUE76@Ui*wb-!wPZ`q4 z+eSqFQchB+pxYk_JK?5n*P7Xp+&Jo=xbr1fdzILoK-QI2(|%&a)F}}@G9FY#RJ0iq zMkJWp$wyFdCwJ4t2jTk3f*;?Nct?uyvsngmk;B2}IhPFII3bMa`Cq@*l+i+8Y;O{L zd2TnvCNf6-1~C_liOI7%Rst6LkpkqSkusJb0jB(%FcQU(FPE|9=VwPcly1uen#f8e z&Zy=`=13%;^ttx$h7cDPDo?b_`Tl?1d~-!e1XLt_BUABLAf=@r=IXiUhaI@L;el^FNCHE5PNDn*e#%%I{#9 z{eRuqU_x#2nx}dF@?#QYDJNi5mw#;NXMTTZr~lvwyd!$&j{qC?Z;t?saPXgR2K4&i zKhFEFXPNK*v$6`91^-?H@CB@(1!Ur%cos%A_kT;2eoEo8}`y6Ta%@Vv9cePMZX zSr&eR^oMNBug4L2^%vIx;5Yn_SM{fD033O9(m-I9fasTBfM1?0P<%iB*CFvHZ%qa@< z(}X4bfJ+Tr1fE&A;uB{IydIcDFZI*oI@fRMm)KRfX8>R)(ng6BY_u9(TlPF`+hbOB8OUQe0m;xJZ_4w(|)cyZ0-$o39&e zYm)_CIZ4Ks`y_fl5hF+zE~QY#FZ*_=n?r9u?CPu6M55=UHEWLcZkfXvE7~lY^+O^H zwCFQ=oo|O8uguH)M_`===@-`~SDll%x82RRPY%CL3A9W7afj^xot(wLXWW1!%?k_~ zHXZMW@G0C%_%ysypDnD>WnW&t%t~yaWxO#s^sCkpX5t>Stn`Br=5Y{E$>?r;MmM8L zv^|oh7LWH$=UtLdz@FUO$SjrhuG6EPoj5Ws%hG8{_`Hwv55kO$Yc@%L5go}Is>&@@ z-I9=}*V4jYWO-@v?b`|Vuz5-ttSbBd!NKTwM{m~QKgh?VErhB2vMx(c?}Kv!HW7Y- zr?T3@620;Pg$H3wSmj=o^aMUPTqdWn!Aa9M<74}I64>RdYCyH+k?zRZV*y2x!L*G+-KVUBI_&HC& zd7uP?XwD|I-6Y>=Sv+a&K(O{18P!nwO>Zvi zeHTzZ0c@toVlxv)B_7EX>R0U6%;c^iO)KB&$i~mOfjB-0^h5`zU?Mw_Ikn!sSb?NP zX5L*hDY$yfglCsx+Oe7s6-9&8_BsCR<$oQz<4PM7Q>{u~*K1xTg4apSF*y9rO(Epx z_Ycdg=oT@Qo#Hp3yV0lV76t^43Ss*P*PC75s0b-AwylfuhI^~s^rJ$Kon`78gr4B* zY5_tED3bm4BjnJ@WJ>W2rig}&^u_2YT6%T;HGMjT*TjWo8*|K_?NMQM?ExXjukn`^V1)vOjHEq#-s*fk zI&a^|g;RlX_Dnk&7KVkXLjT1|?FhUjK}luWQJ#+e@d94dBRMcco;CWmHCS9ttAUsK zHSSfHtrTC%WbwH_$*;lQ0ZB>d^s4g?9%MuOzkC;{zADt|2#Awlp@xf@`^y|??@g1B zejZGo8vgdVF~udVHezw-W{d-O{fn~jYb)F=Zqd&su6#@iI^I<>bbDuEKC4WM-bcl-Dx^+vc$GU%Si5Hd1MFo+MJFINJS#Z$M)(JeLG)Q{!Dx$@T-RaIJo((VCJU)bS=1Bek| z)V8{vjhY-9AA>kbhUxWzFZKVIFYUaGglqx{7tUTFmW;`Lh+iOmqy3TmTnrXRcQ79J zMz)Gtffm*71Oa-+e_Q6@Ka9I$(w;;{mR?}?vwxBl$B~38KaMQ$eKa}Xn*|>%s)3yi zkfyE5kJGd!qs59%v~DmNE^rKrC8D=c%A^4Dw$#pm35V9nJx7&tQ{ zS*|OO%O|TOj<~NCbepF6&X01P2odDOGhUD~HO((mOX5?6_wl1|*$gpNh_o!Nlo$Tq zqp*5OIp4v_Y2U0!ITK)59V~!_*(G2iO}*xsjr7iF*yT=Orw(S0YC!)ew@NZVR{C-n z`}r&Lc4(^%fiAmItCq|*%|vB2QcWh$gR7;LI7-vwj-J7hvvbY|t$!>F>`ua31~5ap zJ=f~Z47U@r^eDQ;H#VyeDG~;LeSIN-p+JKU#7) zSGDJGEKMA*bVF7?HeXAXw7d4qfHzLTQ5SEvwXc9qoZUzcduNo6-0Tc{C^^IXOBz2s zM4C5nMmJp#g?5hQuga|Mh!ecO`Qqk7aQ>CQN9_pXC z7CMogU&Itz((0t&S-d8+O`33|CYZoFYsQbpf0vB6El3}F%`5wH;iN?_Hn|t@0RO_q zL*Z>WJAgLhPk~5=l{ZrDE!WDrIEkk`=0C0xKnXXYqQ*U48z@l+GXCZuBfY z`5(K6PAnwS4fS0r*lTigE`Qwvr*w*hz;R||Jt)`Z)NPE-6iKE*tj;EVPo2uW$I&&; z3vXU2>JJ!POY^}#XGTm~Se822CrmHfKd|unQR4J5hEfel-re&8N77|kRD=60({5%K zcdunm)`b-u8S~!z?Q3CSc`?Of_{~l0arQPTpI4{Ou**KI3p5)ZHbtErkg1eX0XxJ` zwb-cff|(Y*$y}bV+MR9_z`nWucD8b5dQi(4n z*0z=v%h*SL&=~ z?qJ%)U%0H!8{TW;x%co#s0RfOFdCqnY7?cuoDrof%a+;3DVt3@NoW54BrC&*sX`Zc zAHTL(aY^+B$C-p#+>h}2+XQiA=TvYcSjhOat0bLgo-|N#*nHMApR^DVWtx?dExyU* z@pC;?AlKNH&ebPzC_?w!*;8fNZ}Wsmsm&b&DV-XBJV|)Vg%}lm+E?=r zQXoiC(L7S{ds zTQtyb^{4=+$+3^)Rhv&pr+;Knk}lrTI!c)foF=PD)x)Fyl3eyquFM06*72I-8^9U- zMk=a*RbzfI@&dG|O6s0+l`~hKplV$G;R2%U{W6-q7m6ZjcPFOL4u^_+4i78oO?&a1 zn`4u{^ptmQdl=lBWE>e07~Mt9*Eo3A^j)4QC!n5HWS`hg*o!-vTrTi+^MLc3!nG#s zzOGcK!wKY~0AB(=dn0a$>)1{Js zHqIw#v%>B0kdjpm}b9bDiTSd5U%|&feqqoa9uijjL#%(V> zYoI-x^#RLg?~wU{cZh6tV^l&^2!K?ns@C9`jTfkow@%$yaQXSx`+yyRb#cx_w&bdw zAE9i^N$_COE^ApkA@@fp48sjg_s(Y5pwHvOPmZKD8?N2oJQXS2%;Xfp)EmGN-76oW z+4NX%yo@(|t#oC)l-Krd?Ai|Ac#*a5cVqs9?Ts3j;=$q1Hxv>B=lJCgXc?$3=dkld z+5Ykn)PK|#j)8kEtotFU~{rjnUn6#1DQ%3yY%T!q-4YY%*6hbLB)L zU9SPBLu+xmhuxG^1Mk8A3}(rMdU62|wg8QW0BsK_PJ%V7>a)#qby&TwJL{xQfWf5E zI~T9m)6h)=#RBL;K7#@{r@j~&TXBT3Bgbs?;AkT41ASVYO1+iYE0Rs^&!I%*IAny; zNgdE~DY5e^sm0kbcb9seU5~ZTOwrj{TD8o`5|_Bk$8t#g*b+~+HkyC3rb-~&OPDiR z)Ysv;p6vC*No*2G+69IISDZhVuF0n2(?czpDl!A(!f8p6%9YFMoIvnB|`N z;Z>)$y5X#^(sJt9vNH0Pst<#G+vLq^{kSOo(Cy-<{s_T?>4U@@Lp#|I#}0H8am<%7 zLu(H^e7(@l5K7bx%90@cg`aNsc%n!tT#e$J3a#cWaT2cb&(w1A)N?Xm_ted*Jwto$ z{t>T`cHzOZsB|sdVV_ly4yc<|z`OdA>Y~$8vi1(6b)3v!ylyM$>#Y($km4fs83xr1 z3sp@s-xxO})0?SS)zhz!_o>JZ1m_H`+Db(T(Svy0KYf2N|D!Sb{)Fuxzh&PiqiKsU zHZE1D#32Z;{lKrHOFKJPopwe*z&Dhfe|Z~9yzpAhukqAc`{oya3?sLt%Bb_Y{Xn11 zY{@B;m!R_r^9f#0;!lHb_KL^0J6Y6U$sGwD?@5^8c_`xz$PGKW$?k{oec=-89)o2! zGx}C!uvE4#_3RIGujHFeBdy*4I*t^5-6$kdaG89)DQv$7WMPS(l;7|k0rzQv2qsGgRVZ4<}z_zzsRa^PmOyP>hpP*5=Y6c9^4z3$&1>&>%hv4|oOAyOK1+#Hl!E!4ZX?2h3*B6y5!Yv< zV7d_+m%!oru4L^^$F{1_U?uaTuKMiUR_4w}4=`L`1({U^X4%(K4cpDVna)i)^}&ii zo+tDowCR!QC>{H<%kPCW<~OcxlskGLE@1kiJeqmh`z2jngWq+Mk4f`Xbqi{PER{(i zS$lPr`1nx13mLq&SM}juZI&ZcS?Ut(9~@c>xIj=dlMuzu+fnhnxa0uAlUo!6&~=Yd z(oc|A*V4H7@cV|7*spF^OGGZVX5=$Sv{0})6*6rLC?-Grw5vyEg;81ssqf~AQkSCM zBM%n{#tqi#1+?%ceZq#PE@4c7$URC3y1P zgRmX*Oyp$2d8(|sR|A)aHisP+)xRWo@Uk$hRQq1v;a79lcOid&A?4#Gjg8gxlc?(B zW9tKlm@j|%T)IhYs;E2))D!zLPecBAdzWLk8^5tg)er4{ z*Kr&RZ}4Syv|fHtCCBJjVkyQtXejoG52x%7@#(OmT|w6#28-~yk&Jfq%F<8*T4!^H zu2gXHkOI~&rR;^cdi826(7XrjYOnz!2U>&LWMfzNV-ikWei8@tFaSUBQ04bHeI;h) z^YL>Uu(avJS*N%IJeZ^|XJCMdj#pA*V3E0(Kgz6=g2c_FaCy(8=>5T5UO6!;gm)Ld z;AN@q`hNKzi^0M~8=EmOjBEmtX|I2|i$o&d7OeMY%3PIFP>8WAtQ6O(u(i>?E^)*i z@4k{aME!)RBh=w-$HmVj0I)vZGv(q?meF@Uf_K`P=XK+Rxt;d zqSs|RX6rJrUETKg<|@mHefQDr-mUx!2U2Q+m?x6dqy$s|1>6Fd4X6d(w@VAo83T$- zh}HViee>R|U>ky-tmMMeI;m_=e8Y$J8?xzt-|yWI@HImf=yDNotf2q0^{F z(clXVCkMTQo1LcfqgZ$x<Ws}6#q-Coi0 zYq2zUxPd`GgsOAzxWI67=2P~F>9hKb*$J_%Ppe(Rg>*+`{L2fLmEL)x)_n3OD<#z4 z*Jzj5pwyfXr|)Wht6*I2`2g7D^eO={8$D3@+Fl*Ex`(UPerlqpr$=^PL{y6OK15(W zYbK11)g`@lFnVW?8%49Cuirg(RBoogqsBUIu8MKQ$-b%|?=rhU&NBWz2uJR{GU<0bXzj;vc#5x2e( zQ9CWg>!DnDvt-ifiJacF?q0rfnXIg045oLMIUt$(9_HARVBi&HrM$+PZSyrvKNJ$%(*k5ms`FkLCF|$c7;cuQ@?BjpA@~C z?UJjHl(Z?Z;Wb8Yy#-t_HXjEsZME(AS z3C(NY)z?#PuPRh#AAGLFSpkclWQouc-noW5|$>W*n_$)(Pk!6n*W$4ZCg zy;;w;F2!JpY+xpRq61qvQ(u-Q!{5JZ5F1h0vYVbC{Vr`Re7xeXs;GKSVF3qpF?R-1pDM~#D9X#~cT;m?b9SKme`m)P237xr%FRE#R zb|NhhrWk&ve26?;6$#u?AMW)yt`tY|)z0Vy#cF+M3n6 zrDI09)N1Tznx*i9LBP|#EIg=jS9N$@Za4^mZPzs&%nLW^#eDC*PB3!3)G#_o6355X zpl+|pdy{gp{H>nCk>Q;ybyt~^yd69MeG9C619w-9jHS0`Q@!0U~8UClxqbwHoD8&>xYI$Wa(5v}z`OE<}4baby zVQIZU5t(a&B&C%4&%gflX;8cRyZhgj?+Nr>HUKfSg7eAkUYLLIKqw|5g1>8EF$sgI+Rd z*1Pt-dL)CedU zfaV%bvHOngC{ZF{wFYjXhD_kv;mSs7DI8+gp9ORtC9G^!ox#_6T6|BPwU&9}m^^v7 zU9qCG#pkq0XVe%Hm6k>`N~Ga1ukQ`ft3Xl?vjE8k*N6D(j`iO^!Tl-Rav+`+h*A(z zW`Y22&Uy1?k*IzLH$bf_n=FKUU@T*KvUalknfwkf;Hj?!WFok_J9l=t@rmjN=VZQ;v;PZJboio z@B4C9SuUki0>!mVASh7I<;I$6S7AL&19kKlYRw&&2IP*}0Z}2(@8g(56`+4z;SXG0 zD`jIj#26Hk$hx;6rHoZ3M@p~nsZjSz58EA&fgp*x=_W(fE=53ogmDA#3i=B!I3F@Q zFAtYAKD)DT(>s)b-G}(blj3ThY!$_`xzDEprE`|TP>8TnCAqunS#68(NLC%6MP^(y zO|)koH5tL1U2UEOsk*zYsjnbbm0y<#QGnUGkI9MrE^#fPkiPvO3Q*yeyvWssz0F#C z39(@oR7_YRtSzNJUZbP<6JI3xm^3L?(7jv$NSQn{2`x=>TV&duraUtD(@k>BVIUVb z2W){G;6DuEgBhz~Gns1Vm1RfMd>Np(oR{iLqckEC6l}G^kygAc3X% zEg+QE1Tl(L;I9I%p{;7dNvR!Vol}|0+j;$hJDY&Iy+cLaUPeYHVs*Sa-cuONivd2u zn~(%byPHh(%`l+iC<_kzkKy4`f$psph&u zB{mj+Pjqr#d==UV1m0%tys`0PKzVZm(4LMA^rch#D9iJTfjJb>IC+6@_p41Fkv>?j zsHp|qQu4*xWdhyXMQ5r@H-Zr60-k{IlY6QNVjFkcUS`s*ats5ke@XybX}&O0mIqCJ z*xTF7en`&@$g;z5LLBuw)k(F-TIY~hR5Mj1#>3k%&C;#6Vg%w(`=5WU8jm_os?@+gFVPSz|`z7=4irCxpcg<(< z3m)2k`EY`>NR<*$p9+z{%|l~fMX$O5v0V=P8OdEh{A#9soe!PhAp0Q;2p^QwbKANe z3TobhD}y_+k$L$1`E!VHcDTm9!seyCz@8dQa$7u)0;CHzN^^_>2E4U~=s2}(`9z2r zeXf$5VHmpuD9XZsP6#9-ViVY;C_zpSQK!!w+ZnlRdW=mD+`0m!V6nFh{N95jSFV}? zFvVHASUR=;$}03m9&b^q*DAPO^X==$RHOJsxw#yhxqxnY?hdf6@XY|2ocXz~zCe?s zMIj&(C)^B(mue8#u5(#N^2+C_67g)) zp||hHQ82KDm}P;AGzba!36*HIAd<;Y1KQ)+~^biU1#P0+ftwf0|d$g-7ykK^j&}p4W4M z@S-?{_x@uNVXyZKW|@sWkB0VlH|3HWA+cSNh$&7e%|E`5!g)n5A4tszp4`qay5f5S|&x(CLHz$Fp{Qy%NTsSt(|i5 zr55m!kWQCr(-$z!I#^!r@$H?ndcFoV7!`1qZ+oM;x6AqPgU@S!GorsFm*JvQ6E}_k z-O3DbGbPZhYx(C{h%1!XqBQL+X^+<-@L_Ei??D{J#^{bjXDP>0r3Q#rt76PP@I6p< zDCfe!2Wqvt(LfsGt;1CJdhi9ojHvjnJ4l8rgN17OJ)KuO--N5d_PSqr86&zZrT((K z`1D`JJ&kx;%0}9h6$I%4OIA1}FkBwsxH8iJ%(lvD$yEC*M7C{m1aurn@SkRiqULW2 zAM@-JS%ZxVRnl{?7PQw3vFQagZa?y&c?z!-Z_Z&4ViM=d0C^E9RdrC0mSD9P?)+4roG$W2n%C}J7p)oBlHe| zSV8M`yY~j@MT>J5^IfUOVoS>vooMtWH!5nI_eS?iW85fb!1GP|avz+c` zmgJf>T%@Ml^QaAIC095U;)e5Y6$Gby`ZK64-|{q>alfxu{M=^FnG-8iD|dpuw5G7 zu+Ewxq>klCftFwR1#-ToRDTLfKMqm^6u;%`)o1}Ggc^hf@UnqOaR=zE0tr{yvKP>P zz1hpmMEWU~+a_-R%UR)2Fq;zRoY^mgAf&Y2UVykqn*e7qE09AkXYGEx)A=)6l(w-c z&?V9UEWME0DZVCg;9>v44FU!nyp!hUUm#nAdx@b5L2%tVPZGF&*(l0HfdwHhSl3&l z#uRLRPEIJK-}T6k|5nOf|KeKZxobp;`Lg$CPZ!bg*cFP z0E=;biw`F+E!E&D#IOhfi?wy&vTvN02F{>UvAtBPMp!6pk~{a2^IZnE=a$ON(o!H@ zd%1gQ=a{l<0#23n@hzY)7`bxQQvs5GaAxCREwFnErsUIcr(6+crF-o!{-OO!l%)7} zKH2>As^YJG0@C84ljB2#>iM>j?rK?&vFmk&?V;RmPsbdz%B^EH=N7=McQg>S8!Xra zibbRJVK2+Q4f|_TyKXg9pfIfb=(NVcTL|#)5=@0%3P$mh@{H z!04eJMfJi1*`$vb^hX-A6YK*L9l9}sEIs$rGBGw(qz`&>m9=JDJVJ#7(Od0 zZ@>C$te6TBx5x149Zw5a#?*y@@9`d@WPC-~^Q8hh-P;PvJ4Hff`XgvQu@-$ww=iymzpsqMay9LYSm3iJ=G5gqoun6kY#K>f1nGL)}j zv3U6H2M^27g)zJ_;v+@(^`DIwG3MB8B-RDgcDKU<)p!<$-WsXY4M7H<MMOkq_9iKkxT^cd`$B=#XiB+yg|Ue7{L_ zJ6-sZC?$TbcFuC4Y4>$daSF7!h{s0+lVyg0t`FZa{qIk{sC@bP@J+$pA0gDt%*-if zz_M=h{c+8Eje)Q*BC+SddF&T0rxh@ zOVq%P#v;*JZM^2t{j&!c^(hgzmkk7fNYI|J?*bZ`Q=nB8hG;jIlG{K!o z1=;2jYJsGscvGZ`_vhhp70W@9S1G^pzFPyKNz)2wrUs?)E|(_XDZWtUbQnE)kY*VR zObBpAu)LCn4-uOH>514eS30y5et?*22sZKUw=KlW#5;pCgWE_{1REss_6LNOf~j=u zB=1c5+z|*iG<|w;Zea`IAdW`!S^nZ$&6Cn6#au;&>{LXyRHt*Yi83(s6;pXrhiH20 zrWKf+AK*$OAV#k*DeYJVd&t_4>WJmF$ZCQO*?zdevz48YwBiX-827jr-XkeP4UN&g z!F&Usff)#}6`tf0X%Rsxsr+xBvyT)l5b1-qG2FcOCtW+z@GF2?H&W%)6#ICDoYSM#V9gQ`Z z0n`D=Rb&s%hPy2(6?j1ld5Lwi^{?`MPeIA<;3nKH^?hmc2*~4 zZc5Z?BOJN=u0XF@<<0Sh?lz)MQ0CyNRe?mJ2SD&0ibTTnO-ZhKb(|b8)HdZ({uvC^ zuhCfZS%%)wDDc7!#W-CQ$nkyy)BxL+IJy&`fn=AZcRl1v@!DTF+IoP^-(2UEE6K}c zMS4di6_plue~NpQcIe{(@4~oVKbG6N>|Q?{Ou$uTi?Gg702P5au~k36OZRoBceRI zLAAsvGXy;ul^Nz@_cj6cjBp3vx^zWKT(#^KU6*`N_>fXj2`{o59bsCP^TaHdyEZ7X z?F0$*5OqG7!hS^uhZ4xFI??q3JX`7k2vKI!pULmui32Y+5r3e3@z?5Mpz>nSENSZ~ zn|-eed5=ZGJR2Q^aw-}Y78W8G<u#g-=lsgryq(l zF9(UMc3TU&Hye3*rpum}5>9wr{%pea=ej$rzb>>6(sC_`7<7aPQyhht5Dp0!IU;@K zgkuRgV-Y6R?5ck4u;3dEQ}C;ndolL2WI1k$sLUcse+*{3cM0O&pVmIe4aYCj_qcku zzzemPDc55ZC7f za&TSB8xw=mT4L57wS74M)8Ehj$P2+u{60Phsd&CDcJ#(|*&UG%+zi+NSq)OuP;ghx zs_t{(zuT z&VtWdV$9_Xut8AHsea3F2JQ0&Wt!*7eqt_vP*eYTUp(IZRLzGs3b`P%P1F1O*p;&z zyEF08^8rBm%%Tp1Yz4&2R#^6qm z6f?+EYw7=SxqJKA=mZu=T{X4;*9RXU`vXyh_^xC|BH&UQWBm!!!B?uN^#t1LoiN|A zzcHTA{=s-oPS<_dYiv!i2hMt*7T1{66ZCAX9Aq#)IKD3zAL-2AlHf23yo`*Dnd<@>a|ckY$P zjEs9c0v5rol~JpRPdV_^d!S4=u;E1SR8X!G9&n9Hle5w&0>c4H#t0F(5oE>%wllJO zoM=yu93UhFU&{>Il3~%7<;_e0JNTn_{qGh@bdPuAPQ;PWYeFss*`@7kgx{+|Hs*SC zc#15HB0kB`cmD4AE9brmjNgC7hx#$;VDBm(2!Z|ub}ouS&!dFay~A0L5z)+d*KxBCD`TbNyt#I4xn=c=WX32FgB zl?aR*a#JSz@TqKxi;oj>=6uh$n^QnKDWGN4Uh*kIrv|amAgO#k8|~z8AcGvznbZ5_ z35Dp6r)|6V080T4vwS2@`qUE|KYpN(@DT~Ui<q1s1L~h7WXoEvNU;jnf{gE^o;vs;;5R?A0U05I7U6CBg zi#n$BCuD27$8{v6%ysyzUuhAPw3m7sQdK^2=Llq@1r%Uymb%)GgAv^1pJX&3htb$D-YF>iIU%yc&0@>*xcvg5N3 zsMnJ7Ew8Y-oPHRnlvJ(zm3Tr!`!39p4SfhC{&B*z1~I>}j~fW5AKwHU@JFzaf+Che z_9g{L)&|2|8*l%{LrEJdetK0bDf*O8B|x0uVwP*`c3QzQ8crB3#arYkX2N{Gr(S=J z?TYT$!=FXYY3B)fHCw(L@MhQ>u|8eIB`jk6Mnnnc>}hAU{xiWu;OBcg}4}7dV0Fx%18Z~$hj&Ae{z>yP3(O@ z)2VYKxI!rHc2j3|c%%V`#uqsnMm3!$U(9x&OUS-zDj!JgAR1R=Om${3SVw{KKi;+vWgkX)KROOovvj=`m}FGfx7QH`KB;yW`+oBnyZE;oIhV@hD=%TKNVK~590Wh0#sl^x7YH4cSbVGAeH8^e*zs{-+B zCo3#`SJZi)cKHdHYY(rVe}d{dZgaOQPQVQ-k~O|Cw~&cJSyqss=X}p_(>9G&rbeRB z@bl?S177>82VQNg5@D=POfl#IjfZJ_i&pbzXLj-hVB%cJ-wDHb;$oac?#h)DXzfVr zMo1nZt^p}(c|`6RjD*LDQz@C5Eld_CIXYV=HC$-&r2T|tn$Q#PyvqKraBVk3R#Y_O zGL!odM{=*F&AHUCwlO!gBAlGz!hf;u>OD#qv70s#721pyw$P?!0A0les zsgQ)(EBfGE`|* zrMu^?l+|gR-|kI%?S0R#EGW0v3Nd*R-|)IuW=++}GAm@ElAhGPui~V%LrLKWh33t( zqhCYY>@{K>+&kHRY}Rohu7sUlV%64w=3Hrx#^ic8V?k{0~RTKIEx4AJ6e7`1_wnI+ZTaWiqb36U+Y68k(Po>dvCZ zs&b*d=k8#IPya_5`?_66oKAyJ#2nPYlfBE*%X+RY5wCoME;EKsJlot~xP5E%JoZ!> z->Av%-4G4hu&Jn_v+v_E+MEXzir%Zut1i%-YBV!Vy-VtT+neR}q8@996V9d&;myf5 zZq+7Z#$3F4+jF7@jRjhDqI0(-c`6mc-!3ZD8?UO>vq;m-mXO{d!@g#8MaDXO2XACA zF&620M1>fFp9nga#&kuMA}U`eF*rBfkn2eIMrU=`dyUquD{=PWT%8M-10S-WXqs)F z3O92MpfqZ?(m(NxY(1&}nlBY*3snNk}Wx3@zs5n`rDdi1deTZ zX-9HCs(eZT7n=*d z8Z;#@Wks|YvfWn9)pB{3#YmNI$5x9Eeflyxd$q=O;xSB5OYk}xx3NncWxK7N!n7kDuocvuxNz}Qe=~D9q(jr zWGCOzCRdD*3wA32!xc%JdzW1{+T7(vB)^0BaCO9*^M0G)rLOpK2q9olHWH-X z4Gs&VM${~FG3^&9(n=)EaxZ)Fe3nPcrK5f3Ba2m1IX%!Q(|h%rWJ{Hf>1o4))OS5M zx+dfNJR3!lrZRaZT{{B!KZrY#wrVfk^U3WQPb#-Jcc~ecRwfj4c*D>Z=!O#i^Ft*0nIT}ZIIw(4PimO2o%`2{sK zKqcMOxNsvRTn?N0d1ALRgyPyd&dU)wy%}+mtA&@w|&>iNEJZR z`V(j2>(|g$8`TCHk7o+miAh0Or(YDfmCnGH^O&Z}7fdhJx}|({a>(67QLygbLp*+-F3`Qh>E=*Z^tj5UwOL((pkQ#S5_qeHw~=jgWM zvb`&fiMviZAjg74g2(qo(S+6!5+B^J5YsUr;stzkfWTFsJj5q8_5Vbo=*xtm12jJgC-w`5;jo;L1XqNM*IFWKHHcPjOp|LPa(vIgOK zZ!DWFw%SlZ+OY50d$y1BR2y9@u~s&rrxPVhKBI?aj%A)KTdbZomNrTJ(QsFyb_5yew_6@1hoJgz-t|gpSpEj z1${cGiwva7m^@geoAHTZZEo$jUHg)!!$s$Qq*7mQFz&rW7QL930>0sFSqF!>%K?R} zZ=Th6tX-es%2gMRh)`~!3p{n6Avd((dY~=KLZ~lexMHI{Up$IibB?>>0wG?<>N?*A z{mudN(091;n#n}GDj!_bQ(YgK47bX-rDsspA^VQpGI(m{GJHXGqgod|sAX$$fbs(W zMo_j!u_Tg#4*AKa^!D|U76sN7nD;Xwz#lNJ>^BnKyj4|IrDS9RVqCWddP*!bB>-Cl zB9Ki;b#M^j46iVL!0WIW1QqXr4vMXZDO5M4uu{e8gh>x?D#$n?1&fp@d3T4Gy`2c` z($p<#e!pIP#gpKF;t+SBkRvf&JzQcDef}EHR~KU@oyu=sn9 z>*%dJI4op9f(_0;itP5?T?)h}py>zvm9dH2gZ#3$3n;W9J?3T*Qa9JUcs$0M&>?u_ zaxDJ*P`6bl7urUMOhyD!mW8zh{PE!da|N}h`}HlU@!^sD^|J@WBnY_ zH0uG&pvYwLqv;I@Ucf z-%?UQMeabA;Kz>;IVjM;F{TT7ctRswp3wRiBz=N9$)`_u)!#pOwm4EXRN@7dIM+2q z!u(kMeIlt7r8&A6PU1Y9SVCP2HN)10yc)|HEgpx(o1nKHhhSSus8@^bb|HN+00Weu z6J#BtW(1FD0p$wl4S%+dTYAtF(ijLI8*yG>WaE2#BgZ8ruUpUOnz81kyo~*R3#h3p z+`mtO-~|BK*ulT8b=(J%!ttFSdce+=JhQP_*cpYzJ|85E^9C>~tw{UbVz7wCV!W#} zsW(ei3et4xx3_8+^Ju-kKw4LJK@!P#aepPW&EE0X;L?K_0QK0NsDfaY%3#M%jn(cA zl_JnHqz8v2mYOGrpmT|6mxdrJ-X*1$NxG2YvKqBq=3Z-}v@oCGus?fee;aO3)ts&z z0&EBk4Q)bDJDMl=5tSflVy*#a?jQk6Z5n{vYWX7Mg=J+Z?o(W-+5#oun+QcMV|OHn zc{n2N=)lBHW#9p=^SCz>AvBS0Pu$&7Qd1)r_5=|PCRr9~328llS` z&{Y&y^6>sgwHwoPXX3aSMwk}Qa8|z$@k@k+gsjdRrfgI}``*PPJ318(IWT_| zh3g|obhrc9P-?_zEe==om-r#oI5)tN`6yN03rrrz#SSq|4GW)z3V%dAK-hHjlE6&8 zojHJR={JHSPypv}0*npO#tKkP8S3OUq})BCQJ~vi0U1b>+|d>2jrC-yG7r%qF$03% zML05zO&Q%c*o-C{0+0rA69P7buR~OIU3Kf!*TZX zG1D74A(hS98=Rnz>ogN<%yk3%$<3-aIh+l}OT44Iug%s|!YJ9BfXrjLxLwX|4Ud+I zDI5W|l{{egNa(#$r11hL_R`9D+$E0lud5q~=$v8KFJyKg1$Q?9;I;ttbqc^OtQK)a z`tAONY|=u_Y@buYOg1X*_8U?pj~>1h4crHe=(q6M@9syaG#hz?r~>y8i?cU!_>zSg z&E#b}%>e$ArtQE`>}IJ zY1u*{?ZJ<;BwnWJ8h{xp>sVz*prR{x2;H{a(rav2O#oww)8lD{o zde4Yfri$!b1>da*3=_+WrQ2oD;;xD-+zRxza06^)-?htdj6b1msc6{_!YyB17M|;`O{wpa?6xpyU08HMT{X9;WbQF6tiC_@Y zeD`Pr(7Dwvz+W`4R4Wo;Rlo??6vD{^lz1H_w*&qQzwEE#*Y)rwg2e#P!zD-Pb<2cd zyDn}ayYg&jjN^oFT8p3e+2`GQ+IH>;AUfmY8i-9qB_hB%oAg>Od1%};$PPb`%@^4Tg&TvNb-`I|j00-+LfPHv2x`d}d4m)4Vu3Pkuk9M~O zh*CQs!k=|_&5EORp{0-XM{U1o)nU3HuE$S-IlL__T+BWw#*-azBgZRAc+gak9vkK} z3?RiY)-j_dUm8NNM$?bUGe!V%lbFA;*DEPy>D<0G+g*2F&~82>eX!4ac68S4G)<0* zEeJF>$MHXv9<2~$E3)YY4dS**C4~Lq_Yo`)!*1=?ccDtUP2@cdjsL(5u4H`0jp-+% zqA#>3l7z9$L~(`%aIvo(fH6XlA(F=JQPiB@tvxeZdh!j#jun$Yqm}){3j{Z}2Jqjg zgu9@KGF)!dMaSQ-WgF0M&CKJ~jy`#HJRw*9eNfTnU?qlet*x(D-6bVD?+E@*nj;EiSE5QNUvu3> zEO;xpK(pynh|FNNc10h$by1Y$t#T`DUT7E%qZ7or?ah@>7Nf`V*azQFzQ=KuZWa*; zu1y6XWQP~?cRRqzFDKuL5}F-tsM?u$Wjvb()tYz9yAL1S%Zl64S%9wK?5v58%3=3U zfA5tIjXvNAAz-)_e{Ii+4RP*(GhQV4kFzcVZzsuAy`#_DAEYwY)ZEN+!t25KshpO4 z5N5&S>uR}{*yD$fpiu}hOpsZcVx!ri4|!Tomx^h!f21kj@5@#<_=I8ENMh@c`2?M~ z&->6K1}7s$Ihg(HL>j(4d+BPHE=rQeZuWsDaguv-GU_K7g_cUE^)_7V!4)E`FY|nm zxf;j9{6(jdF&4Xviqt>)A;DTOyTBA zg|{iDN>$wlNuQ1y0E!zsQpRdrTB-rn@^OicDge_Co%XvIAr({4H4RNCh*?#&PZUE`hLG;On?x*shD|&Oa z^h6Fm`-buMMExrnY8=k0aen>JXKf9%d}>!`0A-PdfKx%V47!3y`^t{%z`CMn1bi{| zDA!Eh9g@+6mnwN(huxA4&LrBo_`uv=6nsHhT{uq_y9`AnWM960B ze*l)Zn32gj8wA{uF^!uDWWZt*x_YwP{4fu*`z8L+FfMBddh8a1Oy#rJhkE1-Hmq2; za#SRG9vs72xxdea$O)p95JmXHY^eyQv`(be1R@-Pe1L5;{zl`vOcd8`aqwd85_Rz5 zCO&j;Q~;s2Znw|Hus0s#XP|RJNb2K%+!SQS!T1|q)ibid=pTS~aWn2t5~UFuld_63 zFBPVD+Tkt1;Z4C;DSGaQfhn*zc4}^nPp<0CNSggZd4~2-Ne?fZ;_=2ZiqJOpeqkf0 zu_NrW>7saY@OWDeL8IFHOEHywX2N6`L1h&s`Qn%>Dk~e^ zJ!5GRE6|PmdAoX>AF&O@F`%+{){O*L$V&lQXxduqDcRjt{wC%MuPz-*pEFF%5eSHC{yZ5Y_t?| zfjXpNp2CC55`+KQ$($8SGeq`y?Ka;b_8C-5>gZm#A zz6`B!zn(L3G4RlSA69~ecgtY8eU`;zWpO8HFx@Sul{?zo2B<*ff~wDbn=cP~pj~CO z_M@3Xa8zX5ighz*s~%~>y%8g2snd^jnvP7n0IutOupp6acb9)|Ufu2b1=q_Ne;{sQ z#OTkMNhtG6G*+Q;djXP@i5olHR+XJLEou>tzHPA>JbR7H`s1Rek5!K=ebxQkM8c}^ z>~XZzXI=o5Q*;%k=Rz;A9Ofyj=N_GB)HLkB5&zYKjKL!zjG^dLJt)ZE1S{}5)6W|& z4V&U~xjTOqM07N>iLO5!0A6{F*w>nz)wLqJS3d4dj3{1xV9fm(q4J`e+(*S5Q|$Ua zXCw@&w12m0WlT$Y?LG4yC}@gCf&N?zQRmrM9Qaal+Y)GWXoPM*`gRL}3bx7L9~{jm zkT}}&n-(x#jKBEX_M@fTa>v)do;vOUebqaMJB@--(XEz5^Q92J$=F~1;JUvRNxTVl zR9HZB@^Yh9KkssnLyl6Vcw>m@?Xqf?+pIMU&t)0*aU6V$qt6BIlg|!w;9U-Q)m>Nu zaRmhhhJ!_BdLYaKr>(xHB5c1WAPA*<8FCsWcnFCp&;p(+AG?3kZk7S{2vIsfQgvkV zCW<^{##$>sXmB1H1zY=nX7{? zz@*JSf1lIx6}OeA_V|2uv+t0>tOCbX{YX|LKbKB*0>&ptA{zCS;iv_A(6P9TqF;lE zuo;Q<5pbPT+_67l&?>!^ITQ8nP{wfdVKMEs=aO~eM9+7Ttos^|T@b)Iqgz-l5okR? z5eK=gc=!|$U(qlJ<6)Lf!d!DsN8=aVZ#^SiGRYCLg)Ud~=_^{~@Gv-fy*6Ag<@|lc zKAcBu&*2RGVEfYh^|?%=RWvl;IujOs-v!Kf=_@{h!@9qmk{d@OTEIwA|F~>Y>ON%I zP^L7oWT-F`GDhetKuVxxZ*u{1PdPx!Eh(_naZb(5w89J|12ULnVeu|4tzl!yJCjba zc@lL&APC2YjA=&KF|q713PR6jm@>NolR9Yw@i?OsPRRla%ZI+~UbtC@n>SQW5QWX7 zAcxzI(raWFpG>QLrD;{wyYaY4n2lOeVys1bj_V06kl_73aE0@UyhXA) zX1in{A|44{hLN?5l*Dnu-gG&#G5~H$n>NT~De^(6j0Asu$~mj)kPXp1u>RtO*|XY2 zIrVMwb%<~*3bdsKVG`xXm71Lwm}3kudNvQZ@3E!%&m8KM#Bg#0vS#w?V%k!3?TS>>iv?!oinPg7@|f+j_!5uA{FN@y=Xuz z!ceHqfKfy5?>(lyGen_F zq(l$re=X|>z+W_hd1CI@d74AWlYtudX{}Ys5us$`*=?BW5ZHfISpBqTiQO(eo?=gZ zqKx5NN|+I!urp6vFwQtTOs>L^keh+G{};V7WYfOekPBhKBIeUwS$1cQVN3@Ow z(KdmoujPB?R!T1)%v&3H%dV!}!MMgla~VbhZE8Wv~6FX)2TM*qxtmif*vL*C(W5=w7hDGkQ3`AgD={fRU$b*avz;o zj}fc&D%Vkbd8l<#cgSJ%M6UgC$I$|bO9e*Ef=QA3C`bLupzqWI!FaVs+tbr%xB=om z6x~a7bac|aZvmRtwcX z0G^`o!YCbQ{$;bHQqc<6BmiCXUPeVryJm$w09Y2y(gj}W*SynL^TvX#Qbg) z(xy#5j-I*WQ45{xR8T+-uG! zxI$O9t}>g??-{-LB8B;*5@Y=yuj`KilMeF-dko#&FT#@B7p~mbxgKR9+|yKijkDt^ zO|lR{UU4C#HfxnCkO1MC;hzQ+nDzMG0qCbdyz>>(n>S>rS+Nr8_W(~9cXO+bfpo5< zJ~b`v9?V9ODmo>x074dmBv-sa-w4Bui8p6AtXz<_kYTl1c*o~45xe0_5{GYkHWLtJ zT{U7QTHN>J{Gxbn%n~35%NSJ>6Fyj6Ud4iF{)5%$6qEus(_F9;5VCW4orri`(Y% z@4wAa4jFUhJ)0}^|AyiJDXDX6tKNY|y899FIn+}rZ&%ZAek_EiWorlw-|BvfPWUDn zf2HLKue*u>#a`Rq71bg6<~!5`KF8SH!=<`d4lY^W%aIc-XT35U4c}zkI2>vGHiDDS{&-i z(gq}XEzA6?!Apbu6E7)$Kru3O0mhzr>=tkOlvvQu$wm($a~nuq2q9X!;P&$rq$bi@ zb(-CNGf#Q{kduHufP6NI#V7RZC?lm+tPFwK+*{+)y}boVj-iD=&Z6r9DET+Kc|A>CW@uzv7lB=I(T6M5u=j>q}mmm~Gnxm7pjUTa*;lcd&+Wh&Nt zOZO(OgyY>kT~B?&srhA^5`}x__$01OBLkVZB83(V8$ofATZz#spH>xF8qn+G-j&$8 zm7II9KrnOKL8owB_-s1>cf?YZFGEwn)Y}j#%`MPe3(qj=jKj{9L|-3XaqBlH^@iUx@A{_q_5i2baPw-72)l4$$(V*F zrg5r2=_23gVLdCw^ju_4fz62NObn~Y1(t`R#Y%bVRGvibDqd?u{t=?(%wHaO((Zk> z;0VL0(~TT2EgI(7CB98R=NP+=MtF<)9%fcsT#4W?>btJrX7OXD^PMd$Bel$8!w!dY zxO%x=Uo>c&-p?%ES2tUb+%})oxveqnq+EtMZhxN2t9r1!r;I?j8Y8B<+kW#Pda@XB zlL~t)#wh@rpGi6D6S=Ok@9Sf_CkBSfpeQf6c;)V!*~87H8q*svF>Gc%2f@c}ipWFM z!cpb}AReIcvV#;r0=hAe%-8(3pH{FS-6!PmXn3T})XIM9*25Q{ZP_X1ax%1IJrslE(`|8rYj&rlzvKJdz0y#E-J$NIO2lyL?zJO2k2|mU zJXv}RYB$y|6OM{!Hb1R6Ybu&pE0EVdSg&x4D|y@&Yl8>l(p}v->j#9MR~BYHPdV#lKb*+4@hCu5LB();%P2V&0t z5wsc`#;Xqq7fCAIS1%EgC2#m=wTOFT(wm|+pqseRH?h-9^nbK1z0o=T?$HZ;Vx0`) z+vclFC0KGc^LZ%MB>@v`e&1~E5VjJs8XH@ zpupN9Ud2tU{TQt2J*7xYxDtZOJe3wL*T79OYWnXBB-sRtI~m>PA5G5Y8{5D&MGTXyau=`Z^>NUZzw|*Lof(-RdQ*`(LW}6@vSKR3nY(XZW)DB{ z^l5#gE_Br7#Qt#{KBfZ$eI-{2+ zo6)46hR-pbv%|1^bJJ43)To7<9+km=^8;RUL0nWP@VyKz-AbCwTimUh{5KSXRa5r!;D%z`7~z+ zBgdSW+Q$b0%fOATe*L}azRw}{>%)Nf>8=l=qM{1g+7@Y$-VP1&QSA*PSYy*&mDdia zOT7mE_RPj*Gt6pBJM;F6FAcIzHMeL@V&@rb2Y8#dR-FX52qb9EA_X;o4HmU@!7EC8(5w+b6IrkVlD|Fl?{$f_^ zC;XT5%ymBO{+~ClvVKP|)8FTD+zwmV$u;j;aMc@SHm{TZ#9m{51`XFr>F3#8ZlzVz zj(?0M1o89{G!+Mo-2eKs?SVSq!xs`|4|k_04qq8rC;Y_j(#j!W%$?soV2s0jhV^fj@Cx9NPvxDp+?Z3i4F;FSXsl`?E0`8_G{2VoEE!L zep^qHD=-+}-hFyNxIvC^>QSk5)ZUYRq3^TpjkT}ZnQJL`Um2tMP7`iD;>vDJ5HroKR*TiSe z8o!m(?FDKUx)33a+@MaG-mp|GmD>%DI}Az=p@L1zqkN zUFXVl{CwpfqcaL3?zB4NM0Na&tUtE$NS=k)j<_u9GDwxy;jl|-&I~W(ZJ{d&-|Rn3 z5T%ddAZT3*O}wM^&AQ59be{p%dZXOAcxhjWdxl-|wgGvJrF|r=77LP^n6$6+ zJZ-S?QYl#C&E-a0lVi8FyB6F$m7YHOa=9M|En#<@#>v_X_dkYqGAQc~PjY={{n1No zXp!x9=PcE?mTpgNPO^Ug2qCzFZimIA@{DoaHO{S9?%M*D5msSNr(Cv{Y(1MF^*?B0 zuZWG0zK`A6yN#hZ*@zw$kyGFjIWkN#n6M^&E3q<9`=H9?@ay{=%e4`?ca3JHacoYN zoWdxETMN6@=}WkRCx(Xc>ez0xCF<;Z8opacjSL#K#xfpgb=rq44B8z%?R&7cZ6*5A z{N3tg!fC=HaTWg_v_=i}N15qgYetY(a_NKojHrvmo`!ESNG9_Ndh`hwA206F_Ly6y z`uDB!?_X&}59Exb4^7hxbJT9-k1@!8I`*5lK18k*8lMed&C>a5Wip4+792|HFpW(~*sLsnIOEul9r9tK zxQLtyD;-0#-)VMoNJ~88IW#>D~wo9XYY3Qe_T+uo)*K;vp!_R zddwv}!$EBHi7VU{n|AHCI8F9VOY4CCZMpMD6z6;kn>HSvF!R;0HuBWP zWH24sYQJ;Mt!S+X^qOHX_Cybvr+(a)F|br)2*2SH)s9P?d@r&_WsBAHO(%0Le-^rk ze%7Omf(xg7cUhkO2qM&1FR~u#r=KbJezJbZ*}40K#moJau;6Rg(FWSL<@O`R3hz~{ zOb0OPydU1n`MJaQzV5x3W*Cldq5Z4bRJ{3Ove@&FjjS`5`1)~)=DX{5U9<`tFjBR? zL~*<_JV+qbiTAX04$HW)5DH~q*YHool~gYj?uEAvFP59)>EhqJC=+~a??da^HDH=&|zdPeRa+t@`pU)Tf#B&ne`PwPW zygVY3QSQ#Yg_~W~&aGYvV35$1B2A@>P{KzTVt=1P^a%Z8aByioV)Lg>BI|_JnVdzD8M<)>ii1ll|sZDp+foMRLmZ_>i+ZnxJWd8R{mdIi2Q|q-Se+z zx<8W7xQ(s~JQwt}?cwx9rFn%3@f$p<5vxUNI_3KNFQHbJ!BQ z@Sahlx7k*l+C7=c?8UqDdE2_)rmHa+Dgxt`uh^*7Se^$3VzOW1cji%beRLOHXT@A| zn3B{*P;i5}ChJv}p|!!vs=VMi|2-^{pY! zG%sYb$FGOleAnN=N~kmZUg1o?eCBE;(~f$=>;6tDo<+PUvfL$_S}3xNb&U#B{Ep-P zHs+aO)^*($&()$v3 zX@QQL>KA|Tlg^twv%wzzs_TbJ-DW^Byc<NwER-hB~n$m4F3 z??m$mvJTSZ?nbNI9rKVn6EdB97xE)7~#;)6?MoAk??DEvTdvdzB1NoM`V#JN>=L z@oz5lhVR0X7wDy599Eaq5i^l8nCXmrg|YH@v5bD&J-D@^OGvFZGkQ|JQjLH&{*2T~ z44V1)=xxQvanbRI!mNcyZgcj7W5q*s>li7`WA&)iQl3HUaBR0;>{In{X~=98kH0Qp zM3zVnx(~bE{Lqov#N&zB|7-p1e@%x6;&c;U&uw-vhD_EgC5g`DqJ&N_y;cbbIV+tBiwgs;Rw0u*?8Q%uG~Ms*8= z!}~qsj9S~x+ABGk6Z3ltQ&6Y$IA8U6xo1@Uwvn*+`P@vPaqKqJS!ddcVO4Fa6(z*( z?7T4if!p$IBl@Q|TJiO6BYEC9Vw1aW7nWR?CJvwEgMS;;8&PaEEFE=c6Xtro%V%@g zyLs^Fr*mKh&et82XN}G@x5iz8)os3?Z84wUiT?xo*yvVMna)#Q11DWofsfdJf?AOrFUnwG4OCq#I!xFZ5%xfRR7 z&=6^b3NpfHPyqe3fg1N3ZLAM~KNE*eDirXUda7NYMnWwbAz_5U*bOVwKk}EJ<0iH| z)bRlEw#LRsdy<_IopS(fs{C2Cp5$2ch_mA6*2o>pq?7l@3a{pW-bDX;JU#01AWF(( zx_W;(0lZdewa00HJpuR8TVU+Tw`N9I?cYiGuEA_{`$j)P3vzTJpbRgK^Kd?{i{MJzVs_okVfc@6*{v0T z129tF^FOgo=xLE4aF8;{C1Na z3Seyg+YuD}cis_L_o;tpl>wx#X1i~ap;D8~JhN);^y5t8*N9Rdc7-Ke;@ zj{cj~hk&?Z10K}hy}ZVKr0ou{W#qj=AzirQKxgID*56c(K%svfFONxU+UPojRk z|I+c$vV{CI8k_(6lP@a(QH^)f_c^ai3JOMW82(%`Bfn^L$&VF(qtNk9|K)@Ke{_}_ zacj@*B;=TbYuW-dLe;=n@5vLU`Pt5a7tKL&yc$O21aaGm+YB0zGc%XjBC8^)IP&ZzPbe zoPn2-U*b>*POcL={nkb@hJ&v!EBZ;H@Li5_9S;ZIuc0fUiW7y!g*vYrou)5`?k|q= z$AraablaZt_;$>*erYd&>ALXmC4_6vL2aA*Rp7Nqdmr}J{RbS>+`(a*bolrswfFBw z(W{@H0*f3h2AnfXcK`qc$eZ9lflg4F&r zO?z%?TRUw3)5`Z30ja7P8HXhRn78hm7R^gqn#G0o60`~p8JikKd{=0u&kECDIjs;B zN1y6sq+m{9svOQh8+tuMD~x$qi=NwM2$ij>c%57Qg}x2rz@0v}gAdWx(uv~tr|6pd z?^Vd9-%*Lgcv?NsVXHOEC)WQgHa%jBZ)I^0xWZSK+;m7SYU6})oypLJ=KVGVZo=ae zzvFwh3!%_ZQt-V5zJh%9&kcEO`pB=IWVg)6>iV`jVx&M*7F>~-ALMtmg)y^2oWRm) z;3+2G@DR5sLoi+qY-ma@P|&b~uoL<6Mg#76WK)?>%>)K98Wrh39xD|+cD)x5#}y80 zgOvBz^~MdELC1XL}ZPODKx2NK$wdHLr~knbc*bW$PB z!)+#YFgu@FTgezrjBa;VnIg4JT|wT`uF9Vo$>a+kk@7Tp4p;7foloEVn4v)=G$_~KTcZ(w zPa^w4%15FEy5?y@mG{&$Gv2H{C!x((Hqe5a=?MRI-mI6e`q4c8vi`pfSwbpZ*!K;) z^`~Ryv>(0}Q}w6w^Y^Rs@(hTc^YqpsQe`^5yneHNQ=lgME}n75&9>l}V4^pcy9M%6 z{YqS&EUmUx49$!=LG22Z)ZBBysd^+Zs+Q{a@y&0Vjc)>ps}ilxm;!);k1j*x--4v`$isP;w0qtJh988!&jnC?VtZqI!Mz^) z?=jFn9hw&}`tzR`1^$XGCXPe9d56{HC;Ein~UbS>YlkfJNuFUd&b%1w%O5Un`3#Kf56IxyMU zRC>U-UP=oP)_=V>AO1cU*X`nshq#t73{%T0r^@3oWV9p83WHxAnjM5^5jWFRpbil) z|J!lQVe+@{|20EZ2WrYuV=X>T!^dc2KeO+6nOs9rgcb^#7N? zF(m?4x(I5i@FtjGhBkjgNm@9QcDXp<#QvOS8zPE>^GC266A)~}$9w$ht{%&^7TFQS zA*?m@xutgzZ=z0S^?vv?BJdTEfbbweXUZ?WNuis+>^$yCcA>Sd_*C3-dBKYR z)Ym!5q2WsthD< zZ-1verUgc5gMb};C@N|Y+Uo#Y;p`ur?M}8ZpM^Clh$!>?bpW4pMg|M$%1CG0Zr2_Y zS)?JFR(~DjwF(yBXxuLioHrwXQhh z7a^1OP1bu|?N0XC$=T*+BdTyZS1xzGA(n*k_kxp53nal|F0P2+JBb)3_{JViIxFcVxER zm`~q@ukA+P-W&%eRt{ntQMx&CxhNh-CHTr8!NuDF z0St%Gb%^K`d%Emf8DZD_@e%Z(V|t$|M9`!oalm`+6303ur}}5c^6H<&tDR-aj8z%` zdY6aG=Uv2|)z>_Cvryw}l}$=fR!W}c42;1uTgel|`K83^A2pk2&9GSw*FKz|wr6Nr z!qw{n78Lcn(37{cL5A9z5hMTX@{WhXD4kMUwiF$*(E$nAiOB~@DITKlu(-1>SM($eQQx%uv~tfpjTno_{q z_B^ilz?)22$xg2`8O7qTW>PSlSq~za!ft2CX@Ru0fCC9Xgw0bYSqe5?4J}eCwz1UL zU~YZ_Dx;3x34fKcIU%t^>Qdl(c1&Y5a#W#vRww;d3q}4R; z_LsPurkGtD7|WtmBpsl8U+>aKkMd3a098jfuVi{ZUNmC_U7CsH$8EZx&3Ublj$QTJ zU4+WIlg7q$7*UP}#wF5ZTHo)4a?m#mZF-t;T0h}YyuDX#R)?~}T=E _7e8f;vOI z9}Za$-lst69G=2ncE8fG8cIU&MGf#qa`N(&@7uM)5z7W3ula)sTaO}h<@M}xPwA~5 zzadH&5U<6!?C;&Ml~+`p$U#d06^dpA=$h=EPuRZ4`US=ULRwz^ZIVII@3)ATY;!jK zMVQdTYt-8K7@;Kq05mnS}WVS#mI#Nzv2&G`LWO79c?Q5JEx zs+%<=cCG4-?&CjA3y*bzphPl~S9xzW-K971A0Uk~_z3LfBXX>4e*9f`G*6r%yZt!~ zSU$BN3Q8@XAj!Pms0vJN(UYW>Q=mLdBeDt#&Gi78(y4lC@#kBNzGJdVqC#_t+?s|@ z0-r9s@14#2c)gk9llu@f%lSO?>YQuSN-&btuAc6S%iBzzaV;!+JmXr)n`bGO9%ddN z&Ffiu*XUBVs2@d>0)yPZFuPj&w*c!AMWvjOMK6z<2ZK-4@ z$inu>I{=#D2Q0m&W8DaMtShfncd~-FD_4*$d>Lv*wP3Guf@>e7tx=(f(ps+)2H7v4 zfp~H)qM43JC!VI{SCi%(Ia*Xf-G}=%FY!dR1|32O#a(IE&s}BR`EVvj0rH7s{K70b zY+Gbm@zJ^hV)s(rYc{CUXj$JyJ!MC$&nMqub$nwy)Uw*u;f@|q4imid?TirNw0&a* zLg)-sHD$gV^bjGCX9D~W!2&nN`{XcOKs0fa#4P}U%dwpdr1baZEG#dpkH@Ja^}~bD z^9vnwawK{Wgz5-bud_V#fK($L<2#cPlVUIF%DZRsC7FS}nSY+%&@um(5<5w^eat*l zkG&T2$QAO~T6Pq7GqZm(m#A)M+CQGEIWt=U1YVvg9be8&j-MIo=%tmzXtGMp-xyyF zEdVrZNI9XV(`o?PF#I^$v}9G0Yj>p`?o*gx*mfyZ++q_K6qd{e9KS3HKS~Hce}CSn zaMVUc-@Vk>GA?>otiblceIp~I_~Lj$^Bs)wapHG$!ef7zl5pP3PKtf%>2G`5NkLxY zsy06Ryzfn6-fBl*5WuKDWL$Tuxciiq%e*+Zb65N11p+?t5_6i{!aO-Ebvy=-XJDzu zMWm~uUzt<*P|VtM8hxCZxw4INH&&U-m>1XIJ}lLj@2*BVZW5)C+<`MwG&=gt&OM! z=m}s|a(uySs6X_;U+ve!3epE(@q8O4YN(Z_6Y~6xaUH0E4V2485sH<(s0@%BH&GGr z_bXzNI*`IxxS7{7d#%VIJj>19L$0=QiBltO=8>IlrF9A6dN*ihOuyYwPPfcTBaHPB zT9{l2_p!J@Vr}>x-q_#97iU^1uac(S_FL{TWH}jh|5XF+jqkC->`9*~X3j7^%^_k+ zO25P!)3ciM`01|w{Cl7??vcU5kOW5)VP~L8)I;!q11k(Tp_ou86rz-X1QB57ta9wZ zEBY4(|KNae9Mmq&BLyf+^bMy}^yhM>LYcul3Sl2iwE}5^9dJMqj|vuGoEU=bq@mfF zKjSY!&(ri8)BypyzClYyEEM5zLWEoCC^?o@f~eigY2%PFd@C%qj4Cw4RGU)@yL;Qu<#fMvGxJ3uqQx6Wln&t$#%@w$%x4;#I1VbWgcUyu zsaxHjq_qEg>iVwim(;PE1snie%5t~v%N5XS)+Anu+)$>q9C5V%X%QxQYOJ>bCc%v*wcp4bd(>*=6gdzXxg&bqI16;EXKDU~#A`<+Y-%D8<*4w!5_9H#&g6IuwoN z`VU_Wyp{$>P-k3|6(-eatz(`itVb!SQ=jGEh(>U}dd{F9mv(Bq|RIcm{*|6(l&Rj4aj zO#oXp5J))(d>2Gp4a63d8OwIeNx018e}8i)+8_Dm?b8p0*;QgD08F04aG=cfdsNs| zVKSqz9cgto6o*8qi)-A(v;O7Sd$sBq0jQ-~rQ%#8KB-v5#;6XfXYoV*ZcWB!pjKi+ClC&*cs0 zS`Yv;T1-~<0|*yXHI%LO86S{Lz};bdt>27eu2A~6ir9lMEJy(GnFOk!&jNC13brqo z*J44LcIiNdJ>w+mmv7R*7wD^SB85iTA9>n=Gb1Q5fZ6nW-W7eC*Nl;eLO~8f6y7fm zh~3!?1muV+fo}uokla8H8#TwpN`&im%~1NVHJn95#XRH?$g?H z`{6XAH~`j6{RQLyneIlDAo?~sAkRFJ;id}E)2nd!uq=!BBXaD^k5W2{;Z5n0V+GIC z3@Wb2Y?~{UwrblRH(w#MBp-g?gwXPjkz#fH4#c;R3G?H_b}hY)3)#Cp=oC3|{Ib(ckpMXQB* z6nJ+!HGC3BOm+}8_iXBGzX%0CE+r-?%={u%t)T6-yydq9&{Ge~m5$)9MR>5ZW#78N zWvnfm5?-X07711{ZoAVe4zt|?3n2hGYF2t8Cr9~*z`22^_mkEu;G*C8#&y(TUJCJv z{P!bx?l0o2tu2x;Oc=2JGH;jS=*;1R7zJ?)TV92g%RUEF3N=V5<4)XaR-dyiTqSgdP4f zZo+$hoiG)@9=xQkf|xD)Az~R)-rfR>#H5|k1T@0Cvl{@pST0z+4ctK1WJZ5zfsMA1 zX)v)3-o7UC_HDw>ERLrswg>yC3uf8tX-@U$eJ~uC>ox8ET>^l|GI&dxQttcV163I$ z0CQ@ONgr&&Hf}n353#@qO@{`7eq8l;kzaH5Z~Bc`VU8T*?xv<=7i;Y*&m9mlf4>M{ z!CO>_GmD z2?|cvl!%L01B*K!t9+$D^gOWA48x%RZ(Z_zpAbovC|#iedvF(4wV!yOf9u;d#O1JY z43r-f5N=o29Eeq8;^VK!Yfo_(rkTd|PxD)9imzk8uphIi_*+C2&Zk+mr!nC&yzKS( zZ2d}10U_7;OnH66X(W_5$i`{Det&2sEQBb=Mm-k3ht`}+WtDqiZz9mf6}d1%Dsa<* z-e)(z>+)2pzS6TUWxjTSPfOwr{_5bBv(H~Y zE7J#Mzkf&m{eTd*ysgZ|1qnDKmSv96zJ!I3%%Mi>#L?Y7WB=#oFW<=4ylr7#tP7y+-+P@Ea|(cbeHLb2c}5z zPEM*mqdPZ0$NPn4zWT%b`QNWuaP+mjt1e`*2mUZz`}}(w+6a4pwm+}AK@Zz%4Rq&#e=JHNWL)7u0bDOg5K)Klk$q>Tp_m5emEbhER41 zC}^0xb3rT>PF5lQoDEU1S~9KYR0=?s2J!#P1nMRdCy&24L2>(c^jPTC=JX9h$QUHx za_ZouZF#M|YVjnN)=#hY&8fn|J~BkFFRNIHK`JK7lBaU>+#FX3Vf`%<*|H?^Gve;% zq%=<3XZ~*dQd3B3*PX-3X~Dm%)0Ubf=fbUyd&x_%lIo|g`9>sw0`KiONiY@fzcmIn z%@H?IM5!oLoVk=uA?^!f!54Of8Mp)7Xlx2;J8bMJpxBY=ylbyq>R6yGaub68 zLdot{s{mvVv+`eH-k}maf3shz*5BED%7(A)hGO@Eh7oP4LXmjEYyCkJl2KWLShL{| zEEYNI&X$j^uP;$$br&3FZ8CiAB(1B>=N&f^tfqW>^>EQsL_BhK`1A>kFqfSd?!vk5 z%~Zc$;eqN;?eBZ_E+t#BQ&m1Kc5M;B6B5T^sMKc^O zh;CL%U2yK#th%yiX`2Az2vM2( z%^FiJBTu zNWkx!k7Q7IxP;C>&lf~NkFdc%!YK__hG1fIQQh9IW_{HDj{bSm!@jbds7ICt7?9pl zJ5E4)9sHaMl1Sqa#eGot3OL1>FX+4yM;Wpy$dxz$VWn`(u7dkU=_*Kzn|-==J5^=lr{ zoVtl^vwGbSIzFqb9^y$Z=Mr8j>{jzgUxYnlo)VAB;)JT>&0oXWVh(Oz#y5B&lpv3{ zSzwjKo!8{9c&jK1#n7;mtp@k~)632{zPkK*7suoi{JjBjiv`Q14+t06TC4=p!aA-= zom%kteImqmmiLna)MCtn4%c3TqopwIxH42=(X>o{W>1o%-5ApE&YOQN6acQ-T zB#?&tWOWaSow}Z$Cj6xRUypG-HQ1rF-SpbD!U}B`TE9sd5IBDOF3mmecjoTv@10%q zcZ69DZNDPMxY!qRIew3jd2-Dz#%62eh77fhM zPh82G&h0n#lM1^NB1Y*>8Y|0f*@37`AnbnhTgh0u7DNv9!G)2LBV>4?d62R9@_VHJ zsI`oNNfdlGZ2HNUb<~_ABi@y9SxnTx0WgdFz_)k2)(?@sv1Z(}d>aHK+mmTh3Ukh;l?j4ZueMg$+`~o?$*;9`^zR9^$ni`DNf{gkK4CbKUlYM)UHM zH%0aI%=+;whM-oVOL}w5WbjHYrfe_J<@(9>bOxLz4BEgtZQr$_iDX8jC6FU zFJt;awMCvE)*maSr*qRF$PtVCbIlUANtPtUpgGvo7TWdo;EGH|}2RDb- zOZ9I!k%{9%LBqafRzNYz?)1n}Jkh@pWFWvDB!67z1zRFj_!+W|D#>cH_WRO2a~pF0|?UD`q2!)A-9%jJJJYu#NhPppOWrzlUx9 zb(eu=K3QQ-z*!{As&Hx5Q_0j$jpr;}*EoS<~P!ehN7 z0y3#&@(hPZTDQB}6Px|l=Fa+shrfW%-I!CUUZcbk;>XpgbT$Ya>H8F~JmWpW2F4^e z!q3T+?cfgF#jVpKovo9g;!+0!2I{O%h$0i>O}7SXq81T@L*zXmla||BnbPjluG}3s zPZS;FP4wsF0A&fo1Vla$L|S$q96@UGtRo>Xn?D@b3|=MMI`M^ju6G$@((~za?(sE5 zM)13*;x^a%fJs08bsyWa+6v$jfw*(o4M17AwxNMdiwNC5&Bnb8dJ-G~dZ4-$Tln3x z?XfrvFp_3XjF1F;J5ZqfeItUN;ZD{9%P6{faB_4xa^^!URao9oGK&v1gC$wn@UL3n z0tDDJQ&Lhu($i?UhmxSVc*_W5=Lr7F0C>2$d`a|1%;}U1Gz1?9U_BkkpM$*#0z}qu zT)e*tf9 z_YVaijsublrA33M`xRstlTQL6YgiN1iFLY8_)77nd_oFFdLKU`cg6y8Cy14;`Z-ea zQNxB{W^2Z^kH|dw^u>QDDub}8$N z@9zy~s8W$asmxz<&pg#~xC`ntw`E(OrH5hjfv3BYWKrCY` zZ|9~J_GAH4d$4Rwd(ScS=q8j`a?qW$>`sz65;wFE3oSi8TY#4J!Vm+T@9&}5)=!-T zGZt~g)2{Xoh>g8kblnm#JMu67KzEErL$3)ju-OE!;>huFH93x{_foI*N5?*WIfIyH zi{j(s>$JrWcSv#ToF5@!JE0IQM)p7IO<%*zrc+Ru(0c+l|Klgm@uWuovob9D3HmsQ zLr;VR-_}6R*>lv0iI&xg76h>jz@`6JFwdK^qWMCJ1eqvChqc)cAbC;;qo@nzDQiO` z18A3keKiUx<^dWe2&rfy0=PkLjG@g>5sXg$58I_HKcprI|ANX8!ys}NzB*3e3&4R| z7)~kMiLakKJj@MnP>e-{cYoVpUEEtZ`4j#1YqG)ib+lk2)L3V836}||5P2sIyo5Hm zvVZ6b*NjE?_XfnL6(IDVO4==vdHRM9(ep->a}O#!gnz+*;tylFv;K6dN+8~y<=gre zCuIvVcU`&cya&6w%8!EUYs9((B*70f*ohAGcmKVezyEKHrT+c({|=!4ZMNk$G74Ab>ctkTE8(~Vq$bH0DGXw1JKjCMQp7qUH7Kn_nY6;(NAJYz|wE`W{pqjo)aJz8F# zky?AAZj6XX&W3Z+_B=87SR@>ey+ij znJvmOs#0&qb%?qm+y(4(bL3`cQxb{=s~Q-v{W8`XA@r8Swn)*+r}L|A(=w%AWZ6cq zdwU|6MMUYxr)N+!(iYEwBDj0m#gt&vfw6RQ#E1a5WxgIUX>E#Nt1(R3A_B*q)Egb6 zOV6~-uiPz+x|qJ_IBQ)}AFs&tm%z)i_2(@==oEy2B7jl-09*(*Mf11QjHMTvTFg$4bMrv z!(;`kht8u85ZzY#Wb)2FiOnvX{nkyYc6ZZGV%ZWBbka5++x^|7i`bcZ+@S+K^t^f-s+mFM;$E&6gedUaw7fC zEI8(YWYv}QRMV2aK5?2hqA#rsnu?uhGar3xIokThU!^F4;=U`YQr@v)Q{F zE{aCQO_lr?vF4*0&WnPVzrtJ2tlP4xU*W`9VEEJjj@wH*<*CC{wB)>JSE6QYn?&=W zAlLj|+N5d;#ye{$`1oD_hf%73{df}V+;$Dx0*VoGrEk@S>(kW_G?a=IH^P@K*M%`N zWZHM@iCJ@n_;763cu?Y)_Ebj(%K9zk;8`=4vw4Iry{Mbab)d!#6^q zV_aOmW0F%-%4u3rw0GX^+cWYvZ0bmS=q8jO)cMLu@JOL%toZ>&_xJj-&5K|b{-ir! zfdWuko@ed`+&q8ynEvS^4UG^wvN7VUN#d`(<<1Q5wMWtErxx-L^K-Mc-_9CPRY*_q z$>W%*D#3_+GWC4#eX+V@=Xb6JOQj_Es6nnt@42N5GHF`InYuj~0{J6@jN}vafA@Z+ z#hr`v5JC(mRtjlE@asy}$KH-qJ^JzGzd8j;^pji0`yK~GEqkxd zs4S=Q&d)MA^kCXVO_E~pC+#oGpNliT`0vK{d?M!lF@wU@Z*x1t`w#gJ&>??M%~7-` z=%tX5)AW00b^LWc`6GMG@dyB}lPX-E3M{KLw!3eb=1G%u5(+jN%7f0+J}6p?2&V$N z=x>DgxnDobGu5iTMz2p9a8R#7sXyru_#EjX3>F{p58%NBw((`pxL~_Al)F4);S69ct_To(UcP`k$$Fg0|X*^2-OkNRF_nvsf z1Jx02izH|yED8DGs3QE_+aUNxN)&I962(nAC2=c}nCU>KQ#m?s&vg2sT*6mU>1(a5 zv$?u<$M_?oCN&FtO$Pt@=ZO-E$VK>;?nQ>vWTy>R3S1LM>|SrGxZS#uo+8V5Y^uq6 zt7Vc~yxBY=j^bKk#WnTu9F4$y#yqWa;){R4cJNd@h>4@0ou&`0%e-3Ke($9!*q{V} z?@9W&>zP$~GTEW*?9_onl^I{8?`y?v|~_n>BS+-{DYe{oakw<13 zF0N|>LbyrZSUZLzZ(CpCnuEH}VPQ1cS^E_P`~p(UuEV~iHs_zYD{CdPb=1PbZK;Xa+!eA0S9eo0o{tQatggSDF zG`jNAt;(F7L&?pzy3LcD|Cp9v5kA=;A32qZL!p4^=oR_nAHm(@{;@wt_y-5@_iwaR z)SYUh<}3L?lX%Z)cIzj@?e~xI{s+bI9Pnq1j4`>N6(;CG!iW0LK)2=ePwzWI8LneE z3Sr(((YK84T2V$2t$ej-{Jf45s8Em=`*JrPTng3tH%~JYEp7G^@1vUvX4aZ=Bg=>L zme6OjBl!|!9JHN|M(ZBrzrSupOj?*uxd0<4t96--2vgvTJJ0q3w&1$DfVL|$uEk6u z_eUHTO&NkVT`4ZBjLfpCEe_-*(}d7r)-qI!eNJB4{I8}qQkx|F|NTW>UHuPOLsqTd z&H9SB=jYVgr@t1}~R)R|WNX)Ej#hkFbwwF!?+6F89A@=!LlI zgVK$h%Cs!D&%Qz*W=#^+uX2_ZqSa>DOtQ9;pnV?Kcg2PH4yI(Z*R)M8*O!E-C zpw#P!tS6}&jrcfLNfvH!#Fm@*#Th091AdHR|l>s9+^5^}!d&6?NpWr_Aa_7D;kb)LT} zR)lG(AGpMw!kh3w+q;wJY>T9avd948tE~BK7o1gN6dRp)zSj3?3-;|T(!Zk(TT3`D zMA!BgHF_vBa~2J!mdQ@0mL9rA%wTuc2><6f{hT}gp`>kR^N7d@g-+cB8 zs#_>U>5%OWzh39nsX_g`*~uN(ccG4{5f8$NgxmMpC-31DM1;pu|K`D|(&emdbtQ;Z zOSdbbh7(1~K5FMCp@ST~OII4WaGz)**r z$bvhTi@8L8@NA3R@5OLG-9<7~i2{eSqR*lI*rBK_OZ_B|AJu+_eeO|77A+gmmW)UJ zOhn`>a<#iG4Yg#+A$<{qhQ1(ea3eoJFs$QW`b`+K+DA6QA%;rH$I zGYw=LNce8+HPrTpRFBmfZPSOca=Ym-Un21Oa)NF35$bqF#|5$i^t}!u4#Oel%ZVs& zJ{vVpx*1A8Mzd{r9;KkArKNyPdjxuM9XJ~yd7%>#HbZZX(+X}Vrl~0}lFRR2cAp08 zQx6>}-Jx+gbn!rRP>Ve^bx@)T>`=s-r?5?F}~4&IQAB)%r1 zv!9S7B^km(4f|Sf9vB!*t)+C9Hfa)pVG?j4ik$f*oyF-?|qOoA)@ zJ7~MmSD@SnoG=&tsY%h-p&Z6h_1E2Y~f_3FE<@{ z!oas`&|z){JE&++Y4JKjGZ+{W=I ziSeUm*a-t-1{MEZ$xdp6N1dDu8pWL3y@X@^Y*l%ym-@RpI~ITRKfiI>SHJ16Lq#3x zQ-Hro{>a$M*+_nKte^A8FY1Q>+_do%2Y;`LN<{v7Q$@s22@Nx|k`zzsz)1MuHwDEG z#{S^{qvL;1e7uKkM-8Gy5!cv71gE4PxIJIQ1ckWD9r2%6h|abw#A^g)p|P>iLA`{+7}# zl-r&GB5;!LVKIpKH`3?(9%f^L!u(KwsT@%_Xy#G@S}S1P@=WQk*8HO|X`<-OCY#dp zV1wX8xxZ1J@%Z!0;vgYgz)z2XUshML5p`!!2L~WKALW`Tm)b02)e2YuR?%q-I@L>& z>=^X$?!3)dfRaY719t+wL7`w;1p8@d zM0O02`F3ufQA!V>i$>`*H^q_l3|b7!GWQ&p z!-hSDfXUzZl(h;jow_+nK+{WqzotEm?C(n=ObZgW* z{G4XD^dfEu`X$??W=Z4b;-l+9(0mMhG;903RzVRJ@fRrRfp2^gq;CBdD%MrZ)nw;2 zx7vb6<0y9xOiEU}G5~Z_jd(_(v_fH1sQ^2O8P2JAKg9d0VT(Hsfsbvf?1rlJjzL}0 z1Ikw%rE59qy4s;a)Tpu0WLHEp9h`%5^S_s$8oNfhDXMt?x|EG2V9E8jcL0Rs9i(AT zqq<-q$4Q6kPnrjV@y04D*No82c>P>)9}2$dfy5Xbc<~rIF8M_@_{h;nO|Ae|ZUXC_ zLO4v|6;RF!v#C4lyCi-q8Td>I{nAGu7fk%CWoJspr7pQbA)PP_?8mBL%7x{TuEACL zPu0f1uiDvMULFdS`#6R)HWe9g=c6|6tt}^~q}Ao3^GDoT%Ut$NBHS<@?1;V27*Glt z9l98$r~+PIr4jUl;vPFsRW<)wM(SWIFQCvi`;2HTpTU$#W4^B_EV25v-hKwFG|5lE zfXtP#>~`sTpG+0??%od0eG5v`Nf>VU0dhWr_q-Lwkpi zp?$O)f=+k_nBQtB#fGo5nSd#Ua?bnfu3XMACKUjN{g9(v#KzDCwPp%B#nc)HS_~}} zU{NiIIYsaKLK$&VwaY)bEgt_aIcjd2wf6XBllSR4K7~!1-B#8YTsKS&QVYvjQLhma zF7olvbU)j&17g>8$-xTgw`HkIIAz-NI?fm=*nmNUUgs^N6UU&7SHuZbLG8A9v1fp} zt^B0*<;nJ3UUOa-;v7_U_XN3r-lH(^AD~JZkas9P%QO4Q1pgyjPAiawB3%7IDB>bQ z9DI@(VO_Vb!f-73F~(19=Ko2k>WIX9}?R8^uo|fkrT!~ zi&EO}t6~c+eR84-szk>=!D`ZUs12{AEy`;}KmL6vOKA@KI!`fILi4S67S-N$s_>RTFVarMlZ=_oET@!4KA{5Q z?pys!$y(71KVztD6)q{f1z5?v?f*M~7O?}_F zII(F~Yh&wvrX`-18pRaf{PbI3&kI0M*UhkZw5vR4?UOIF8+DL=cB4hQJEt$* zzT!Zm*$*J}Ov7juVf~XW@#0quRT8GV1ItCgaNZ>qFwb_)M(H3Hd?%nCJQE|=JJ__! zU(*-2$dU62E(2Ic7v<{;A_xmAZOatfwK(3*!^_Zjxu2NYOL>LuNt4yyW?3)Z1GHB}i<$ztu(FyMU3JSgmD zXSy@d33AJa;DLIW>tRr!BL~|(+aK+j=`6-xw%pg=MKSpd4{fJ!;38y#I(+B3 z1|3LWsoM;)2Qq0!`kaYSU!4@#9g;8VhtsV(hvg3YhX_M0_Wg*l>gE=)i? zb$%2SZydVj+Y@DWmV(OEt~D$I(7YO8+@X0NCFYXS;t{8~ZTVk#SBgCwO;}smZx*6Xmieq3*!HPra?j(dd9uO%|8!NA}FT0dtAm zJ!szx0BCzyN1hLZe=&z|dp2v6)GCSGx)=8G?%=H1*msN`01M|<9e(=nd^BqRo*quCp^54M^50`kGqzXsR}1wVN#N7w>*I}4rp7EPU3!;gm4J70bO4k*-LB4 zpML?bAKv#E7}Pd67p9Ox4;|$Z8)f5gDKpG6mqm_!_X4io8-((lKT0ZX>3va2W&n1MJdVqn; zEi=>>fI1`610um#l?gexY~g@jiVQ_!-b>6+?hVCq8Oe+&Q2w3--sw8S8wp7vrQcnd z#Te1;UuN5Nn zfC^!kBFEj;5+l5<+a=a)B5*}-lAr+Wn zFvIQ()Zk^)7BxU`Wxp?35``88B zhnOO^S7$CFGYszG7=c`HOd*?Y6S>X6-;f%aAv_N|GYn80Si&Mdwy1FPS8m9;WHsJN zu}EbsS!tuc$7()alNwvSu{btn5w)%62pNDEfaZ9IQ{+NvQ%a`=rCLd<^B!5cWuRv- zNbBnADzC=pj`#k=58O(%CTNL&DDEK66w|&Un8ODl!y<;siN+cpb9NFe^;KW&%`= zbSZmg9Up3!=4m#V3*%I$y8uo~S}pk^gSHxmCwVU!2X?T{dAVvCUT6!GPoIx(s(k4J zva2H&ec{W-&r!C#L9PDc28ycy(!`~%P`NAP2rXC9YXUZl1_vdH7q10&M$Tpc;AoQ1 zwKEdM+s1}6q)kycc7p-%Tu!AJXM}vNH0Sd5#R)z6eubcNGL%-F>0qI*R_Jt$caB)Q zAvuuCm|=1C0NrS5DA2HZ5i5ajyxY9LBjZIarHRu0LcpQc=>j3dL2_W0q?+93SCu-= z3iSZ1QtDA{%IzL_8fught^bqD{S%@uVv%TV(Ur-ODvV_og#Nu*n>eqXvUOT78uo(4 zOMl7{v+yR}X%0wAeGiyDe+Y`<3F^yb5*eiBk9y1=v-PF5gM6aw4Zx%h(!NwPG;*F_ z;xJWfh~z7h-R4koP+S!K938k-ues+7oBfOUcz^^hzM|Z@a_ZJWQd7=F6aNWjp}w{% z255^JGigP7?c4}_KpF3*)FITZIj&OIr$``<>|T$6(GIa`5~(=8UHH@TlXf!wGvBns z9KQ)udLZt?kPR((Kn$rf7AnN{#f_j|h<&PH5a!IXOm@VROFz5j&zs_P0Bf{R=3)Y~ zTsiof)J01;@vCSO!_NVe?=f+QXp9$pG3h1tbLIB!5GBZ&9rd}T(G3F-V23hP9Y@%q!iJ+1j(LWr%T%;tiF~$ z3&&GbD4du)FD4_!_pm6keGxAi$dEgkyo*@;mGh?hMwA=o4O+j0_=zutp4s;M*J6&$ zhm!a<@hw$IBrMg;VlzLG+9%n^AvKjbl@K=Jke9X=etZ(i(GpS((^h)_zV=`o+bMTj zzvH8~!|-+{wQCsMzqc6`x@>oCQ>6mZsE40u(o|xzJkc2}{6A;4D+=DUFIf0; zgGqaEG0L&8$U`KV7~!OhW2+>h#G)9i=lDt^LNd_mRVRM@QS>KqZbA9kKAzX_6aFe3 z^`ILC)VJkO`=@NPEy*pD4C94G27e@8qyP$)3Bo*B8d~dAuF8Ex^6TA{)ArJYbH98N zd|V&W_IEHJ82Q2DYJzW7VmsccT_1jQX;?^fEF$5Vcs(R-i^iNO{j%&8D|vqY~$rWfh(MR}0&hm&Z$oa z=)Xa#HlxOx+bT#B11>v}#d)_q(4^t8aXs^*Wkq!ww&i*!^i<^)z}|*MDma-qI1U>e z`js+#&`B;oFZxLZrs-smjEBQQK8<3UBa`Z$_4dM85Nl#^(_7yRlith?(D}Fo2yzEN zeHpq{b6Xt?1y3yos6?c_WJ)T(7XShV9NS!GL&cn6S*8t6A<9G^Lbs}DA*0U_*@4Q6 zPlRmi&9$Q zt()`$pszha_OlWcII^gT&LXDbOIXa83)08rRx@|HRL#6(oTlZUK_*+_K}45XIzih- zSiT2KJh`tHiY`;dd1EwPi*u(v=Zq>he!f^iU0etos=dUfAsv^+F;zS@+0MWgtnA6q zKD9+r(32!6F9<8d)N-ng+M9d&;|7E+6bD;A#?AxlQH{S(b6?bdOGZ7Pi$vw?acXUm`5m*InB;}nwN*h}*_xV8 z2=S9E=`bx4bu8!P+5q2U+}O1}a;ykB+T<08vH%OtrDMCz98*%s~I%8#ikcVdy zMjAv=mg=)EuAHE-ecYuaS}9i zIj-o(=@{(~Rp6W;>6+x~3$bl3+*J{V+==x!@LOAA=%E9FBwV&g$`@JX07+zKGnmV_ z+sRC}ryUCQ<|e3x9fKT%m){;#(6DisG40Tx96Gl}DXLJUstuH+`3@F>x}ttqgIFMB z4Vyocdzq9daw?-TaB+2+$xFUDf+7q(#JYghB&?E_vxW#FBAAPl-QBX81 zU4_I-UJyfL_jI1255toU4yH6&yM)}*A{SmauOiN{(IhIfvcd0Mmtzlu^TkD5$aAW| z1f2vFTk9S0naH;xZSg7F#o|UX;!B2K;s1X>7-6khnh_xghVSOS`KuW_MU87`H2 zt}%ZBYsH;tnRa%qm%)rZ3Xj0m_TmO4sg?WNF8fSKUnjE5ujv_5S~#eSvS~V$oj`Zv zc?s+ocmLOSr%3#jdP{_VamxM(!)3F+Yi{fh;ZhMc!*tTz+eH~8Rbdl+>=+BDjj?SU zc7m>=q&*{NMg1%A9HU(I+nRHip!in_{FaVUi`;dG7VA?j@kfV{LK4*ANTYHvSG%h= z?lf%VQfT)Vs<4#)h^i{n2$@>D7fSDj^R78$^jEKWrww-1Z*?i#41U{<;d?TEj5RY# zDnN)W?uHr#&&uvo>(uyu`x%HCGh9wn?(fcqGvFxY+S_R9fgonb3q%~dlsQCks-bD{ z+?@K01PMDkyR5yVj0bJ;)UtahC&q$tUryLGv;kDV2!VeU;FZsVWQ%lZ0PSF*)jP;o z`5`(ax@_|4E+T8&yQ4$ET-$$0Xp7(&0O46E70k=2VJvKXis<t)CG|PWhiqTap&f?u$ zZiuzDt6k2h)eEaWVLiarrCR1tnqxPlk;@jTzH_g5Z<;Q{t{M9z?CjcGt0L>hyxfM& zyrDN^C!9I&^qXXH;{4^GK%Zojm^*8_c^^tu6i6kg6f*^-rVw%_SJ^(=_W^s0``k0B z=RtY9iMEwZsk0<+{GcumO<$zpcZtp5A>1D$5?Rh3E4VNi+IA#R!yh`Yd=!x72D9o* zpC<47u6gx8a06(hB`lcnyM7*H|NLup9zWS-(~cdyyCQ2{Vd>Q;-DepE<)0)A>>G-e z?N5k*4uRl_6(o~-ixbg~&>VS#wDnH4A@>v{`CJe7Ygt7_Vs~=uN3$@A?3h-;q1qWS zu11erf7}Do zF(_VeTBy(S4@`Do3c-`|rIkRc^%;(vOOJ|epAAW%4IT4(p1k8+>(LHdc{%WBdp+ep zaRoF4okxxegzozE*tSz_2DU9#8RMRfYB~JX;vWoe0{UrWVP>UvrI>7mK?gBVIX2Mz zF9VhwM&T)ShprKyEWKGnT;DA& zLo>`1pqOT&NZ>CWQ?j7`OW*Q&ER~=j4O9!;2xN2COHLgC@ZoPCg8bJl-N^m5->UP1 zt+!pzVD2mu1B}LyQ7EjYn`yuvn4P!?sDyPnRnWqY1?7}y{{cub zoZk@AZ}DCDo)F3(N8d!wLu&?cMF+Zk+>qJ4qNTWVD?u{k9BA4$K!@r=7IZSJgPFCL z6laX<%Y^lFo{d#i!nr{V)Fq>x$6cD*^;l>a`UhUzTb6Wm`o5RZs~1*@loP<|yDqOK z1Pb=;JbMQXOmT@n7ld4X9JJJtB4!0d`r+$xQAhv<5l@6GZ{aVriIjZxMeb7v4Wu6c zj-Qk7_HNMr#f9OuSIC4I){pZ3AmXI*JfT9tW$z-R+9jv0mD+>3XO@m96(%#{Pa7Bi zR0R022fGru8R(vUftm2FqW1bf+`VN$m3h}Mj5^{B2BU%s2YCfp#M;FH=WafsR}Z-qZmR%Ic^UK}r-k^N3lio< zhjLJ9JLPlVks|5s(BW_2T2A^8%ctKV!!r8uN-2&55N~d*KU>?cN3rBd6<(+H1u3*0 z!!gN!{WIAsCt`&5!}@6%-518N{h3qBqUsZD4fAh2s_UR^_1xFuvRkm6S{|a8g8%c{ zRQH!dKZ~vPCtnb1cmC$-fd6rceE&}Y*GLT@T7OsdD6BJ5eIi{*?mbTG;=Ui3`gkIN{SWin@f^dV%QP~oREY`aY7W&3?coKUYo0G)&o&6M6#N(_ZOHC4Z>08rKIJ= zJ{NmF+%!)G4ZdXo2)a1QxiWtO2+u|pw*QpzG}&C8XMrpwSbp6LbB!u95WV>vE_9Ox1Qdxk0_{2aEL-qO517+jpPwhNk6i2}ddo5< z==Hz$Bak#KfZQ^j#+d7wfGCz{>DFX@6|(nJ6O$eBA^B|_wgVr~2ME?Y!;>?!&HH?1 zXpOmdQ7da-7-A&zU=y9WdQa$7!Rkj5f#%nb1STFk0EIb(gdah0@Ngb3k?(>QFy3Wn zyUYLm*$F-%4OXt*r{8Cdlr7L*kU-mG;|Tq$FLEuewFgbq?h8Y5Af$7#1$QKXiS7{V ziUO0G;zj(5la_yOl<`E*@2ZW?FCnL&48%SFq!0(&^cWyTod94g_BXS+Y;P7o+{qv$ zATm!(IEp?0M%G@Wh*^XFlnMbo{hqc!WH#rWTjP`&eVpeg!#D+3>PL%~iXwYHeyWg;b(qu=579KNIV`@=3 zz(${w1F&Hgs*P~1mM|DsPqe6=R_G=@jJNnfkw#CMJXr}+8VaN}f(pFb)}q_#I-e+ZwZf>+s-v#sbpr(EMrX7!OU|P)Jm^nj7>}i^9^iR3 z9bt5C>dgTXAKZx>Mo$)jbZKazhS?9vq_Fl`^*nXdQEW~m-~JV705aqhVkX+KN{XIz z2aTH@mFds50Pki}h6r3_DqdahD5F9$1_0PyJb;*^-3Gv+3PG{rTI;f?&M=3J1^u3u z*6W5F5X@AxI?7o_c7X7R2WSU|^;MZ7b%5pd0nChL4vvnNH^8wCfe;ALgAB*rBO}Jj zGKHWHxP?!sV=D#)P*<@cbIFoy@j^A@JYc?613=ZRb~QMkI!P<>k)al0KX}R^IyK<^ zH8_Z$XE=^9s=TIkGeD$=iBtt7pH+Y*IMB@q4L+{|h&q^(lL;}$NDi=emmyHwmDcAI zq;_SS+e0u>_CN*n!pBjo$Oq-Z{CK=yB``MrGr zFtjHKp}>Pz)QPewu5x1A@TT?d2eVyl$4i9@B~qwbKvx7K=98tJ7?3kJRaLrs3|@E* z!#XN+@M<;EpL&tCJW)L`5Z=k$ND;K=9Hh&w? zkxX7_0BVW~&Wjg&$svuSg#p3AoW}iee=8a)`uybZAcETZJ;x!htTvpJ*^Ipp=z){K zG*+wm;9!4M0TfD&Ae;V^_;wB8)QEglJzzh)z-WDuRx&IA*P8KSsOJTVy=b6LiumK7{M6duMUkn6#9s?IUn)zIJ~h z=M1;D0VsALckemGxQs&Q;@Jhfp$>S8?Xb(aFtV&guuyvLY>VJItsH~9{c5VH58}69 z@&Ga*{ZqE}8Ns0rStc?;9`_(ecbFtl2k!Dd@>qBItq0qiYw*5NB4`z0AyN6{bX&3F zI`f~Tov%^3Y|a;RYOj9%!UDKmaoe>Da+pX;>=Lpicv+zo&i*QhJ_yWL+<}a$XDfd9}LLTnURxzxw!#bJuy7 zNTlG6H*_#0(z~g~am#T5TVmhUu;eDML7&itWVoFm8O&OC-dfjvjOj*EJ(mr>v!anI zDVs0fAO2BMvlWk%Rc+=^au|TxQX8&Kb3oNb<6Eu{>2InQ<~-OuH_=FHU?hD$2T>P@ zGc0biL`X)2RlABE)*ONhaOhAWrQRABL3jTr2O8{yR}2{>H!>AtL}kav-A-$Iq~&!p z%&E-4uJVCE9WE-{&yS0f?lUwB^~fL}$t4bCrIm^Hm3>TGV!R2o+sl%7TAPk`n@(S9 zGELTs*4mpJol2~RPC9Y;QRYn^M?LJyjtwyYSObODZB-eGZYOyP<;!C)4vnoDuP=&> z-321)8)@1M6-Z@L~Mz&L`IQT?a8csuORUz`_Hen5Tp>0@eSh>s>(HJ ziksHAH&gcf;`U7gW0Qo}z;N7No@caTq7-bC{f(T(CM;OVI-~e zg!5DY$&Jd7a`yfTdv$IQ6^OjE1vKq&OHZ@9HB)^DD4~;zmQs3*NjtzcLEh}t3PrdF zaDCbb!#MkGX|%8d4Zv*Kf*@s4u^jfzDb$gmV~FtB*)vG0a~78BJY2FI0*j#y<>*L5 z3dB;IFMmZ9T%au6FNvG&Tg+|ihC8EZT|(A_KoS@leuh-G(NcJD7riebNM#5$-9mp} z$KJD%_${U5AYHS8hyYJR=vChlSCw`$RMVJy`nW#nCMec1(kbcunBP+vf09j+<6`IF z3fLAIeSetQ`{^;BOGwj(%VXMYNG?$tKJx^Peg$CcBv4XN4?+4(wO;w1oz)#E=e$wD zBPF=CWFk71oMF`N{f!{ydDe9$W^n@Kex%|D!{BR4{j0x^MM;cZn4n%6x z?2BnhrFhCy5|~`csykI;RX_3gNpZT#iEXeeS?njJzY45J+hj^Hx*74r5|aNeMumZJ zj%onp>#8KqM#pxY=P?!zAWG5cFSeTpc#{`$_CpWeM^&z)aSIR!Ite<7IvAZK3j#{5 zr11CjZY*I~?tNh(kSMMvkW7~PBHuB0VT-sD2we)G>!gudEc3%L-eEPP6s$igJ-;0Z zuJw!x{%?`&3WCCXKp18V()+{L#D#fo^CJ=m*i6W7)1 zMa+B#YfejO((kHo?p;SY9p>=BRY-JQ09Q}e+V(@pFEmjzZL6|+=eo}v5?jlm(Fnz* zwzq$(Z72WEPscdn^>KkAznr8k*YV@es}vm7g2Dxw2dXAW)a4qFc{&Im=#^d1!w49H zKa(Nxh8!VIkiJo(Et>U0eAz|0te$789G$l%Ly=tO+DO+} ztJf4F;AHPjEhr!bfj?+hQ-g)=?)6YwuQ<&jR0QkgAR=O&<00ZDp;0|er=Os)vuEgPj<|sHd;^+ z%h4ilwMBeOqfKkKad!sr4OQB0$mfn`BmbH`3+%0cg*a;}5-J{;q0~jmb{(8m#gfkMPg0n~K zBj%J*>iT|CIHhzHyGGFon^KR8c@{{R=7K7E2r999oa#)%D=ANSxA4tq!6EYNkXj$a zdW2-KOKNo7J+d$ChTnHxOb%Qbi}UW=RAnW4_M7XIb5&1qoAd~C9q4|WNFN~kaRewO zEQ_ujL+uN_u2si1fPa_LOerwwL zGQuku>)4^yhBNfgAcz%fOQ!{JZyPG~1vk17BT-bjoRl1i@)j$FPiv5XBec#TJR@;P z&SO69A#4V3Xs6i#@_;7zMMj#Ul5JvRN6(8qf$#ew2a{-4dK^zYJ=hdAUreR0FfDsa zdnMZT_U7kJxuM*J;Dr*NBm|UTxBc~6UsFYO!DDBWNr2s=aJ4l_ATZZh$=A>meT7T2 zOF(fc4=GPTuxE2_g7Kuc=K7q){FXUgrGi{Nkb5gh<}J*6mBKo{ep(uKcQ3m*sFa?z zOjh?@OnMJF^(W(c@Mdq`NN^M&ZuRXF}N$AT5aj$qzNhJBbt&Mu@D+R}&c zFVritpe6u%((KZ1gg%7uJ6J0gVr4v;gtDPV(0?4qHlP(&W(HasBnU7uX?fIbm{bAb zXyiyOo9BIo<+sBm%X0&Qg71wgWFDh78U1ms*Y0ZO9I6_irp9efRFcmPHm~dKgiw@) zaVNGY{wz92Rs&ja5JOgj;~}O79*Y9b>idd9u`-AgERl=iFjXyqq8VO=(UeV08j}KR z;Y#yi?fEAnMtu5)XJ-rMPj}^k@a2<3tj@$&IWC1RBWzk0b1Yk~tkd&9M{0trnDTr5 z5ArtiSpsttY-aFR<*aK4$DaqC7c7+BkI(zGIGAsh{ z5cpTp9`uw|$ue`<=rKonC-CTGjqnbvNkKFS%La8!j(i&V)5B>j--Set z?O9)IE5^!iTI|Tq@xBq6En^Jg+cD{%R7akra-_2&zaPkE+5*w5+3yJ^G#!)pV(#fgUYpe$T9l_ zVrT$nbXp{Pt^{_4GB%oIeWHcCeFE1SB>%m7iJ?(NS|3_0-(oP~2UhywOuLM^Bgb!u3#|SvGkcx<$b!`K1U@&Oih94)wyJ?LY%|)(jic{TonUeN@Jbc4G>4( z@GN?TSE35K>$tgSGatN+W@)^si$oGC871$t+}H9zGUjO9GYN1hQvSExS3t34aS#)1 zhc(>|D{5>?sAg5tVB?_r$k4#HS!(QsGo#SjSs~`tSPn%o!XA)@$Y3U%3Mc$L+;}`l z@ciJ<*dW-J`3O+0=Nj@}1)N8YhOY&#cf7R@es#6we%46VNM4Pbg+UAxLj1 z)gtWsm&W0Z0T3}kRs!+{5Tekp9;`@}lm62BBH(8U1zlK~d1zN;aZjOU8&AO^?<&qn z5O(wm)j%%n34xQy*P{-FFbl+8Ayr_2nIUfl-}m!MMvds)=IX}KP^`mF1g@3YjoZG| zrRNOG_C{vi3hzisq<9#4av|H{N==6ug(2z%&JJKrPIahTNS^Xf7TA&{?~o6;4{(Qh z>s^tN5^SPHlJRSP8j%^}nQ?m;13xaiX`FTomD(@>SPV@dE4&qGaLMQ*v_%5c>y7T( zAjxFBb0SlQ$KqfZRKzvl)}utoY*B#MZupq1uXdN3S!LS*#cAR?Q`>ILgGEg>U4epga7# zP&I}|Id7@1U>#oBpANGI^0t_c_MQs*F)1%oflj))2}dORw*@j`K`{~Gtk&Jhx^33z zVmqi`3dLxp|3z^{9~*}9Hx;MU%3G7=vVYr0VVZNdT`Sn~=!9yDct=?J+w3mG4t|~0 z0xt^oNICx-Y#o~RkHy$X68)pzCwD^M>pj=KD#6DY%o4A!!62| zhR0byfT1aZZ`J|0^SK&_N%-!19jYYF`@9b;#Kn%k7LqFmhH_U3>#7}uFI?crh(TttZZxAf;%xINi@pGV&lM2_cZ&6|E4E zU`Z}tDjJTURfr-J*xs0bOle*3z>`mMI~gPkN*R@sH1a(F5WG|fM$=`6fPrXmU`#w$ zn;`mX5b`2@5G65Zsyt&X+R+_)fK4>z7OP1wPWyuoSdJ!@6rPVF&FHt1!|9hs5|({o z?YiIl4Fk%fhcwCK#W^VN4lzVsU>snqwNt~4bTo#%lZk~_0nL&x>J$z)%d5bNqXS#i z2PniV$6$({GU$*Nn9{IUasAE>*X;=@)Dr1blEf=mH5&(PHu`uewTcK0x);1MXpAOS z&kW?Ue&4n^&u;vrQka(Sd{%JsNvFkJ0|uhsrLl_RI4j_;^0+4i>xfG)?!&MzO9 z*@N@JlL)wVOfx^lta%od3q$Z-IQ7fXQ|3edI}1$P=|sBmeoV3x6SQq%6tW&RAv2^2 zs$V}A7icep&W}!IfGByYSvRtCBZj&B?uUBNl@OhlV(|Tyj8dWKph0u6;|w#Kk=Rg6 zfTgBYW&V98GOcg-*=y<8?ejLcqnw^6>qE{^_l$kMUDBbtuvs?LyeRGC!t4w^l!IFV zuCn&R%lDU1DXtcX94Vv5M>pUpDN%8_2|UJgDD1{c0%Z-5lO+?eK|Cs?F&Hd7u`0#M z82a+d71mo7?rm;>uIC?ai5d+k5IOmO3~y{aK9M_XJ@>K z*cp6}1NY1;+^w^gjn`RV1_j|wX2Wg_sN>5K0zeLR0r6L0O2?3FR0q5tCf0Bo+=H~t zv(TYA^qu(h;nw084L&(E0_m*|J|-4}#+Xio>~>}8cAa)5=?s&dyyCYHH~HgYOaO{Ie^6MHb*6+=haf+6sVJqJ|f zUqlFvFWOfR&GvD2UfRahKF=KMKcuI?M=rbF>@t+~OZ?!38}3D4`EVUCaYFB2@-dXiPTea*#xc@-&l3 zL5HEGZvKS~o!dqN8^`#5^Q98VYkSWss@BIFDHpB;SUUODz!I^MH*k1>XhV&BfQ?v_ z$fh-_%*+&GH_%34{YNxi`SECyi{s_?snYAEiEn~Rmi5$GXNp5?lrAYS#B#3b!Iuu@g*r&LQ&6m$lXyVQFcm?8ZWCS(`3VkeXU7^oGyfTA5 zx{QII&tk-;;bCizq$p9tSyo4NEc6AV0xp(R5S!C|1rW_{e3Z?1USC?|NaN;%`uNOk z!lQ?T!loie%&PpZkW&!%FODg{eKbQVE_?1lHb^qZ=hTm@nRW2anev-4J2CoFyfOCL zf6lCU{fi9vWP3M%k}Pg0 z!L?zC$3Z(Ye_toSIQ6ba!swc7b3T_tUcDEXpvG|~O!li?b57gZWYYY4M}pVJws^VH z7<8Gkxd~2$jx5i-SM|ar7~6WszR@>5j(d?n^{KHk;^K)6R8@XazdATBxDqmA5@bZy z#F@*P^`+=PE(sl_FE8P=CXe#r=)MHuATl~fWJ5+#@G+h|(5~>rmz_d2@W^+E3J@pa zI3cc8z5kTkx=7VT#6)k~0se{ZW_FCRsdr`nMt9EWB5nn~=fxUYj%$1^7gq$v7ga_= z^L}o)khZ1oS1-9Mvx;#gI{w7qBO!(9*&Vam;nhxoL+oebL{IUr``K;}V4qT^CBm}r zjA?*?Uf6pVdHLPbR z$Hcz%K{_PA4Y!6h3}kynd+49y56Xv1r(v4&>&Ml}Snw8jE*yhP;qNAilAH3sS8W<7SJ1 z+Mwrq#n5n;eR`S$%O{tZwmsd%y_Wz((pbI!k8|YM4MK{FM%L1ndl$oU1~B}2AJx*5 z;9UhU{DxGEFzw(1kl;m=knKbbjhzWY;^gB1bRZ#Vb_k!{BWQ_e=1kurUm{SwsB73s zF_!M|2RuTpu(Fcj*1^Db$8CtN@UUb7RQpE2JSG;1e|h4r zkCBQbhx1mgSS{_EcwvyGo4j?x3(=b;@L6c z;x|rBWKW#I^;$>+4udovaGhJuqTZpIom~N_&79dqTxpbA1=%ZS5<0(L%GqTSw>fJDYY@y|PfLe|?KHRs=+|1cz8<;1_TI=rtbx5s|1 zynGNhSFQ1Ped=oG2OKG!qr=-O_H*sY%Tciqz>ThME zj8LNb!T1v3PLakaO2MVeWoHXTbtvOC#vu5mgvz@9#ua!?4cdP`IcUtU)g81Vx`Am( zz*8`7$BYvIx=%7TNcWX_j0s5=x+(tGFWgv-6U!&MeI73K^Zp=n;skVn8s<0Rt&l1T zA&@08tj6fK1!mDoX}DC*2s%5WngIC{&u~9_fM7tR1OAcmST|Xo60edPyE7&>CNU<} z(Wrj#mqy#|7?mFuXF$?RI9yK;o&oF*ywp|TWTQZ3M|(&!y<~|zkhET>m^|UQ;y+xa zZrLP^6mowN6IkhvfCN0XlwiSb(~X(*)ZOGsku9}RO&71AUee>gE*^CGQwPDg2Z}7q z$W8w@*<(lQ)Y8mgyk=L~rGo@9tBKXr^o@;*%?^#Do0Rrp{Ycb;m-soaP8G$EZRFR1 ztn%WH6Nl6mL=OE+<%t9N%;^i>{t1mWsO>HQ`PATOxS22D66qD^z2vPx{gL+^x!GQv zzo`v7-{5Xr=p??5`c9ZP_0D}w=z=5G;0QWrV_4AJdW|k#b^9%iCSxq|u$ownSHljk z)W$+76Ok*jyuiQ?cQ7Er^nocBaD^5?!HOn$&I3_4q86qH#j7{STFO!Wl4M8DC))5~ zHKKU@jTu#j5k$BBFO4DZzen%JxFRQ@79&4&A-I0V%~gP<0nj;fTK)Iyn<(oAvA*b> z>;!IG8!8lE1e|if@WIQrFN1QT@SewR&hN_}+xR6k;aA-3+SAcJq3@-bz`4NL3+Lbm z1W9GeN3$)<0&fd_ZJq~`C7|5?Rd5ZT05hWqzSlvesrjdi!4JOCvfXqu;V=#&-1nt# z8#&xFQGy0ke_cvOX#{sfWMGT>5V0-8fMhkKY0QL@wn`t!W5n?65}+-LL~@TS7Z26# zTXyDvf4TdU^GKm4>4_YBBL4OG#m?1`Rbgc!xS z2xL7RP7@fCHBhtd2~dUh{opoXhzSnSxGkIzBjLP{Tgc2#6`x~&qyYc1aodfC@K ze|&1u9`=ZZn?~~AX6v=*?@6bNVeI3DdcmDdWOS@`Sya17Ci4GiWk3Irief z7Yu&v2wDvPoO1Vlfe>6W+*>RJ0c^XAm4HAjY)|z}a4`*RDr?n_C5Tfw0b}4n*=~8k zbd6Hre{a2v@f&Qw02rIWFyr*+AjGQ#)$l@pb2H$#U`-P_3;PvWI*Ws4Kd&)^YTSSB z_kHB9CoZ5%Y%lIpj$GC@=I@kNKjVe(&7pSNO2!k5%t8l*Ug0mPJ=JNzGvxIb08$yR zW`}lKCFY#M;H8Tig_fW8A3&0<8$TiIB#H=FQ{-W7aQPDD09pf5CGe0QuqZR*gyGXb5&3*VhWWxs{(@muN=hPkNJ;Q$p7%i|2Hl` z6fvO=lN;xO)v08jbL5$0k`$T2{n-i458j3fNrNLLmU>`q39^UC#6eVw0r}4{XGlT4 z`tFc6()?Pr8`@C@0~ZPV^>oa>OV{z6?+1%f?tZqpbmij>{3Ta4H5VLBvbr|3dnm1a zmy66^n3+b6m@#{~2reVnR1MxWH8tZP((w>tMAW2QF-s)ZgjnIsnzp6Cll@3Hd+?lO zJDlT}xsb6KB@Y6sVw^$XL%$n)Ic}+`vfx-7!o^eS&~9$t^~YWFrY^d2Tvg;5uhV?~ zb4`}g%n{VV-hyujm2YP2NNrbk47#88_72|OP%k}{lYz<$$q%feJW4$JYDy*af1Lw7 zfnX){si6ZLbaO*%2pV>Mr@4}iho_=Kt!Ka54u09lD#a)-bqZ>)+tFl2Pbh!#v)TSwoP5--EGPur7XITjTOnZ+GfbRV6g~?T2y;7K-#a z>2EC#Zyp-*Jlx>Tsma*jU?euSJ~pt!Y<7JE@zQwO**P!JG_Q*m>61A4^^Nxioy5qA zJ`T#2yuaAZD6T!4U{?M_WORgo*n?@*faz{AdjyIl95Hd7q2P>`G__wB0$gaDXRG2n@9=cYI?P1p$8eoBFF!tCXXea`^l-&Vzc;fqKn~Pub8u+@ z&eC!3$2!Ct-@#)l7kEXZ{rLd_8_Vf}nprzy z68ELeXh2QOn?>o^CmU{nzzQX*q3|Tnu`==gp836oxG_0Frsnufk&2{an~we2)@H?u zR7%dc)XQAi>UDg7;+3ns2_Ij*u~t?HoZmY?yRieC~d*rFVnVtc5xF z6;81Q$Q{}I<(sU5AjTuL)+J9Of4SW+Bg*>Ww9CgGHiq7X$r|xN_mj6PiR%TKs|S9~d5qo@KQ?j^+Qj`26x%u2V7@L&(tc|tjQbNY*U?N{?IZlc5& zIH{^u)${%cwn0m69P-=1aSf4+;#fER6MN_EN7D6+_P}rq2h3*YC zOy`v($0rB!JP35DL@qNt1{>9muNm+kJFGf&(H>43U086-A){i^TL8{Hs4_ar(AaoN zLHQW>@QV;OLs`qI_ODAihS5mwh;p!SIaIrHJ%V!`Vdwo#c#@6}csm`UIzE-!vf43{ zydaUH*`f;A_0Q1%ocBL}^I7>{u{-QmkQ7?!OG$w;#TKI4_qG?o+rYHV6Z{H(+w`$MG>#*_aIHWh@J1IMBM)sm7HY zc(At*NPO~apKB^S*W0O!%>9PDNZ@_8A_^@lrGIoP6k-X9gf@b#TVMxxX*=N`Apl)d0% z`1P!9pGT$CCM1U;1ZtY~vzPg_;aHv_y!aXOIg()6^cxR$aZZAdxgFw5Bq7}PtDR>a zRj*qA(r^Ludt3?jO%B};DKbx*xM|$6aV$aE#*Z}0*v)S7!o|RCXt38enn2Qtx zXa$w2-~M<$BRU&!t-<9-Gbemi^m30eTYD&j44Y!9(tA=au~p>MYx&Wshj|klV7J|~ z*C-JPL%z#DoA+)WJSG-8R`%lu!rKl={>P7kL*fh3*^7>I@*r#e@$dfh^CjJXdT9EH zOS=2nW<+)YSJyb$Xn4Ql52wz*aS{IC_Z#kOe3>(1v${m4Yd+g~7u??jF%M7DN_)Me zc{ZBX&Iy!d2*^00?~4iX0RbmqmapAJ<&O-nNi={!&md%Noszt4WF)dd@S6VzquotOLe-xsCQ3fOz(DK?y&EX*4 z0*S|Xt_X4mN)wV6=`Tj@w5hJ6vbyoYKb3Jb3VnD|4`eiW8%uspg1#Ao8GvU}w8fO$ zZXaI!cmI%pO%Y6z9iLow$D{~}?y8Xg4?D5HtFxzMH8o4GX_)~J`z;{&6al5EnzOs~ z->|8FW3sU$7NZy2@%gC&!#%L|?`zw}^-azb6_~g9|Ig{RH!J<(-#yyif%BjApa-w& zTl$SR=~%+30cA?4*} zM{N1mCGaEo2#l7BnRJ3VS7$H(Mt*p`=;nHqMCVSqXJbpP28ll+>Awwd`?Ko-8}HZ3`BC$7nCRG8Tt9^vLrTQB^Bx90&+eoX%qZ%3l2-bL&)H=<)bNnB)jTU^2I~ z)l=@U;^u9$9$5fjDgT(f`$JusPbfXXqdHQS*V6r`owOTO=zn@-vpI>;OORh#6N_Ls zlBu}+$ceB*MWuOkHl!?OP(-f2t1**k0yJ{*T*(m>-GLF9TtHj=zKN*r!72c2e;|4yP-{s(x9Ff<#LT5lnS2e9bs+huT zcQCm3J)P{M;n_2N`HG2QrSXjRjCmxN5}WnM`m&>m1vB4NjHNoKD(F!uE-G&v^9t_> z+DguJ893u)Q(>#Ya%mt$yhTJoP%lrbH0{QS)AUI#ZpXS-$>;Ypk&(*L;$k2X#?B0>

*Y{mv7dNGu}{H(`#omJTcO8qg#)kF7@nw3SWl1+I%z5=_Os`wb@~qjC`C@xy`6^z2eZy^U(Q7 z!#0684Xw&DrqPzYCVCik-HQ>0NpDqcTQahYc-Yf34$d z)BSvDcRTLf-z!K+Bvg*nW9d^>34;|LlBr|Msy=&`C`~ziJl<3`IM!>vr8v`)p;aMZ zs7iOq+Ua%$dvdB+*urbG;PK{*TI(x5AN2YuC95ARBwMAHy4Tgdr>AQu{Vj`66u@O5)x-Q@5yPRavqRXiq^);=2& z{Mb?UW`@1u!}I#war2(kSQQW2?_WMcVa&~O*2#3`s}4pH>ZbN_B(&VHH@UFfzr1jg z@_mJ+PL1QYT6ywXfK@KOq02+3O*i_Le$|tr+rsffS0@S%&wAdKj5IfFBsK0AarUuc zU%SU9g2D~{VYmyy_?_+rUPrvcbNY2Lm|A7>e|eQu@$tARPVpYFB`oHHHh?ZChsP6r>tGo1xgSo;abgpgZ8?UQu^=ai&dSn%88YZNn zlbE12>neuQMcF&b&ZajKcfn==4!fx$v%0G_?+r7}20p}TceF9AQ1o?gT;I0`c#zaK zhA3!KjTm3fX2=sdl)WKfzA$|-^WI3ca%j-OY@JB~!w-G)*lD+S2f9DB|u@#hD)cR`$UA;h|+|oiy}I&XzwR z=O1$W*cnSA+X0d==+)OcPt1tzb}upfwPciAgnnLGZ|!(P)lLl&;;^T@lhLp%$28}| zV+}rU+x$pLXUw1K*rw^Q-#+grOqYGnS=TD0Z(T9(w7_xVq-Z)9dO}@Fh4u3KqNHfz zs*}melCdzV^3IgItaa3>0vc@3CHuqod{Hf9jG7Zd4_xEGkMa zvzfIgct&}=9l~_nZA;W1uv-g|S!BSerJ*v#sPJ`)uBJpvr{V0;{PvWyEiZ0RdDV}O zrt;Ma%m;o@YD-L38t9Y#6!MJJUeHtI@9Kxf_R(Gv6-T}15f*Ksx$07)l0)7eHFC0v z+EbEkC)lI~qN@L#KINo1r) zO|NXb_=d|wul!T?oaf!6WBQM5s#3b5+EW@g?p`)>H}GWP`$k8g-I0@7O&_{mb=*BQ z)MEm!3>B-;wZmAWlFOdeeKyY{8F(l0GpSxm{}PDNN@3ZNP3(8l&R@!&#=K@Z*%C)L zH1C)zOXDm2N%Tu7+#cRem@6KPM)hf}u1;}Ac}cm9OU@*(CeMcf5JRG2`>ioTKlhTJ z*FztQ(c4RcgD+m^6Vyda1d?j66W3w>2;t{@frhN!ro> z*A7sg6G%Q)+gtFZeKPSL15@GhGf$@DMI(#s3VBoMigJl5adinbNqTZOmS;6^r3Wze zUZOYUoWdEl;&&Qjo61y`bo_+rmCtYz_i(QJO0{sbos62uwwR7`uHQ86jj)neIU~&% z;XF&lo8$*yHqRfF)}80IumLyNP}+WfiahD4vDx0?Z)*DP%S)odT1rkny;>E@I5czX zNJDkm5g28b5XH^HpX(k)N<&_o*?MI7vML+hLot;Qau`3AoS&AmDx>MF*2`h_;Ot8? zjWm|3u#@rGrw8I0+s7SGRpvNtRNiN$!CWa|Og|&9Wuzxy1xe` z_SFz(bko6{xmivd^|CWuI(L@@hCS{GKah23%QTX%YrO*(C1ux>*AXlesInA?;nfaZ zoS2b`pzHdQK2FV1@x)%GYb&KH-MY~s_U)4e;<31=H};xR1L6ai%3_sQaiiX1H+7m* z?ab9ajOZCn^8fZQoSp4(>4Sx#2V{{LhT+UhN1>3>IILIoiGEoYYJ==*c6L1{h9zei zAq|N2QyQI;%-W@e_s7r}*35nVH>!!8zJW^Ve@`kasn1izDh{7~7;OB{7uv%r`Y?7?6^T&J#aZ09gR!5wl=w8_2c>qmrY_RjRbzmonRE(HD} zasH9a-K*t+32X=Xwxe!o{{;}bJV%oSm&jx54Ug=8(JtOO?`#gRXgdf~3Er9xX3%CP-sl-^G4xDr>P};ADAf?0XVGle2!}NYQX_YXYatQVdk-Wgsab4#m)KKk zYu_fPqQ-^h*n~#cKB1?3=Mzsv3Im(2x!m$kb#Y|ocdHwY@H5_iuojv!5izMkSpT{+ zzS}vu#6ZeBeI@iU+{_ynytM1bAG5rvWMS-PHJX(h<34oE+q2IogtgFjE6WL+j%|+P zjyI0TUSUrwTme8}W_x`FTQEQyZ86inI{mJR6jz!j-C<>F!LUxK=v>;Zu5r{)CDvKQ zhcbh(UTI$9n0lKQ?%LN^6Z#r*z6yd$xl@Lp$?8_H<5=mDGhu_?VShb)+&*`aQ?YLi ztlr&kO5-f=^^CqrY&JS9X;CFy=KM7NGUWx%e3Rdou%~V-bGbaMP0Qn#yvT0T`}vF} z)9~FSPhua6-lfL(Fbgq$;ByxFSgMmGQ>HbWg(%Fu&~%xoE{E4A?-^?_<(jum^2J3veB@a3@MA6n*( z4L)%%Hek#n*qL`s>}tc=>7UKYz7>fd4*X+XI)$&&G;rjP=4ZFPRnEJJ$4%MQ_&W5E@i_cOd(xxv7<)f1V}-Bx?rNsR@4)4q-rgj? z<>&E|hA?&8agHzHq{Yy@(Lwp|sDzxchj8Bwjpi=aHfHy6yd9hT*D6Wnpq1Fhic7#Kj}@K_EwA}Q|=|k{A)1k z6w4!3x+K2uRY1e*ppZLq8}b854CQzIgjt_;*hzxzoGCDRhFauobM3%&YvPGQxr5=! z>`!TY+Ih<2*DJB2V`^UeRGwf|g_4cdF}Ec|6c@?r+6wYLbw7`XWCu;3-0P|>?*%Ft z$o_s_L4d5Qwo#a-E>x3DY(kKYwl3`S;;4cYi@cJsKYL)sXR3IeVHCPgv3?4H@C{#g5m9Krrpd&k#eRSx$vh=Yj{$Vy=@TErj2~8% z9F2ZSNin(CGBn1Hv<&1VEPPUxS5$c3nI=64s7>?IZ5qNQ-~N)0N2RgZS?7e?u9?B{ zBOO#BtYEQpSv92YOsh+9Bty?~3fDk!TUBzVe8w|>H|Z3!=+j-b0#*f9OP?=cJ9ifB zvCC`=5xMe;Hw-6QWua^g5}^0`Gu~KOg`7q2;1=abJBOwu&w%PkTfk`lule<%$CG1Z zb&_bX+urH2L;a%)g!avu7Y$y!|8>IUy}oAh>&*twpoab>TRs)0dv6Tt$InCso+cy5 z>Nh8o{i>2~`u8IvlKcjSoFwykh(t2C(hKGPTAMR_&%+Sj`rTq*hn9z8D;+yN`jk$@3 z$QdOqT9^eNRy3Rat}>FTFIk6~O+LbvAR%1Vwy{KUR@XS;3PZqA&0Oicfr5Yq(O8d< z=_Oh;H;9`YZmCBpTuipp;D;e(f0EKU@eQOUuS*veZ@;;VHcr>&pJYwFQ8PoUIqjMp zNNUND^eAQ1iBqo@9yo=Y%a|gAHZtRU3Gs89=0E+{_uoIt7msZ%$alVLXDo7yk;E|W z)nDgW<9b!2%Az(C>tS}yomik96rRN15O$DV*1=I7&)03)9A21F$qjgx;562!$VBoI zBbq{L|N7?K@%#!@RjunLHXMs&W4z5V73E&3ax`Gl@Dn$qpc>2VHg}djhgZybaNaq} zR;biye|wVmXWleF7Txef&-{Q&Ge!I*Tm@|ZT}bhW{mb`>1I%p zEO;}=fRwBx~5zA2HjCuDN<@8G@Nt4KAH@AF#u>B?0o@-k+~ zmb{zytm)9y{3j~5y$AZAmq7hD)m7py?#Dpf*NcmR;^*QW)GzENjzJI-K>+Q4H|X+r zRoUMc(Emx5xd+t#)5jy-sa9wPC(P;n<{muk>YKn+_95v%nDF>R-f8nd?14seb{zj} zf}=ve{1{KR2EL#co>1o8M=X6A%R82Swul!rxc? zfA?Md*ejvjz>M0CaOmSMHf8HK6dx248RR_+i_Z#pLlDFh5E+9@eT|$lugHSW^%0YwgbGV6gAe7eUSR=kCP~AXD2n)H-tP+fwe!@RL{LID+r5|FQ za&TH~jeL@8hr?h51x%r%SwrLeGT3Y93T)T-t(~2#BDLh4tK80ka53i@hR^^-Y!63D%i-p1{DYl26PdTfSa?13F`4 zHoa@?%Qosi!`2c44H-Qj97thtAex;T7Tkq0V=nyoUiRv#e?4zh+hEwMeB<}{#+XL* zAXX3(rF9*~k-{IID3nu%{H|PI-yP6F;|<~AN7V>oY2f==8j#0Oqbbo8D3lWv{@xG*37>;_ zop~U8OWsW%KUtgKShdvA4z|=76M=yXtTvKFlBhK>LPXR(FM=&roKOF(GSzcuRcvRU zqD81e=0Tp9ypQ&$&_2|2mVOwyqWrQn$aI5KKD~Z-kh`YWKg7Mka_a@x7=or?$Z+l z!lMVTtHw$FyspjB_j5PN*)WOy{ss&QeM9R94emVO@Hp+qw)}Q(qnD0*`{a)3*`4QQ z)St@7R_nQ|N}cL&*PC^)3z7xuoRp92T5cA7&OG_%nb!Wu^UuexdT)5#y3k4{lVLz6 zI?(@ zT2PrCh5U9u$7QTmuJJws14mqHdU}6u17n<-o&Zc!v;KvkQNqaXsNkbv5A`zVzAJ%M zM;pdr|JFhODlEDzA%yd3o7R(cos9Ia(YepA_d!fs{fg!pP3m~UPveIhYVLJXj&wzJl?KU7 zUHSO6H)6^AiifI3rNE5!C{YRV29*g`9n|^r9}Fr-d)M03KrqZB?J|uSE8`o!%RV2AkK8dCbydIC zz?pQD>(G^C(`uE_w~uZ_NS3CrScuN(YZf-td#KJ#EBV>YAGe#3mzQ`ZGC}3>$t&Kk zXCS)@XCTpkcZ$f)$u{~HUA~10uees(l2xjD;f2iYA(pin{aLx6Kubk{3x%1l-Ax4tiCX<+JE1_^ZEW?n$%J+xd*D zn$4t2(?lA5qxWQ zlp`QT5J7qiU;shsAc;akq$ODKp!Cp70Hv4E2>}FOQRxZ2g@AyRP$e|!_sP-s+`I0F zyVjj=GqW-)&+M7~?Ag!Wzdv+&x1D0VU7!(p-GIQ9Y(z8FDfyO;$C1gT2dmpYvjtt7 z^@s@z3N(h|d1cvkefx2#^?t;5SNpbopUL}~njWIW3Lo;@T{Z-%*M~goL+XEvsKXeI z*eQ~F%_Y*NJe7hE>Qk>jCdq&a1Jax%@AeJ&0aSjC{(%(`CEeEp3Y(<|gaHQXhauvZ z9K7{DXuBMmOM5*wz1Y~(=pP$c1oxW(n(%)y_{f0R%g z@cgPSc0{3M$*w6M%z*AL7|x#4y#rRWIDgxk7xKe4s0Rr<{#|V{Wj5a!G{S!T~Lc?t>(3@qVHij@vnBL ziI-PcSicTDpkGf@;#PtxslHp%5ENxz#}cMzE?oaoug<49k)*nIrDu?E4%dyWN>R7b z>9-e=uFVUZODWiX>{mf;O-#wk|6G$FQ|{e_G%~NPGKE{lR^19ssWwGHyZbFhQKlhy zjME6`uuCV*^4l;D&d-@nt$`LL#p@7OhO+P8L(81KaF*=ekin;L=+}OGCb%|220O@kS6f#Mn{?@4TS zoxgy)8X%;iBFq9W%w?j?i=#AC&**7|?D%?R>+0lQ7_ilnHViLNRAE7wg^S&Dv6IPj z=#8^q|M4S(fHMe1hosB3m!%#znk)zW}VI`lhk@(lI_({{Cr7ybIwogjDkZ z6kg^f$jv%Nl7m!Yh`h0-`%=g^xyJ8ptSjy~%;t;5R$$OUICI1d_TEq(|Nf)uD%5pp zXz!(yE|K2PHK5N`<=SJ`<3E14{C-dxDmPPDOzrTN5Y@ysz$WE;@ETJ^#76?>5HMM3WGNr@mf`@&{rKowN7@~)h?WB)&?EYvp|pJM$--;klnNSy|bfZNbxcQ z?LAEZ>PGpaZzbpbX$1;Y>Q1D@#wr6PbpTppll7HVRM$YUc2XnlJRQvP4w#+Z^fo}g zdH~|yU$$Na@2PD_NJz&!)4y^WCb+X_J^aTg_`EApz(MXemOy=z717!7`btJw$DmxgicbXI9A*pY)u0?@AfLT`muccK@pyVjZZ$nW;{+Uel)SN z*y-6+S*8|<7?X#;Gm7P(UB5VNso(i>x0b`bpxhkcN~^YQ)z)I4zp4ha{ZQnR<*xQS zx+cYHu(id<$86v?LD7>>3MAAWU_CglhTCtj=^nCO0WIw%c;?Og^6V9+@;G1Wy1{I~ zu2iQeOp{;L&SKDz?3>xKrfl*Q5k~~^vb(wiaDCGNbr*i-%$eIJCXstUhg*)*4FkaM z?Z9*1BnEEb`Dt^OhY|iDJ29L+vI~smguyI2U6P+j0$s+f;k?(f-oK|7J*Iu{`0=BL z!HPqHCb{sZAW@bf0x;D_xp{fz$%vZ@zHDT#w^J6(o#gDsl9smdguV&^|DD#ouX@c` zlN1SsfKe4HuJwf}c!d?MP(z>VOr*Wo6%h2cLKFqQo0BUMMn12GG&{%Pe3QfXUAC0LWlgS(yd56f;4P1G54txQ3Y-((!F5nYazfGElxPXWF#SfAJ zcq?zXvI+2wp36Xbu_!DeqOGqlmcc-Y0hl~p%=hP)5})Yfff3d=p=ja+_uX(;ADY1XCaV~+FhW5u?7)(os|)FK zTG&BWg=BD_VZd;{>I7S2wQVgu5#DWX-=7%UVJr%>m66RA4sVpd^L9i}ctA*zH^KRU zWMe>FbD<~^m*Nd~MS^o_7OybzM9$h#yNT1P;6cs<;&1`2kc`mJj&uM; zrR?dxu@7g@*aqxHf&lK+iRW|>^V>1x_|D;u9#LR4={`wrW9?S(@%xgma>eJn1%I_% zST1{5b6a6ao^`7C@JBgUbFr(mOA@kLQ`Fq1YTx9*TlPj_?M!Lu;F%4tHsKTxQic1b zb+pzv;Y9Lnz<(VFMVV4ZisEcgl;5?t2_kvyKOw){F`0z z{HPBOR9pA;1M0VPLHFEg1pus#c9s+8lC@VTPC?$D28>XYGaAThkzl&}myByCxR(+d z_p(nN{)=G_mA}og7UIq$s=8La*Mtp+>YZstU<+2K;W6Z*=$B`~2@_}H^%-Lwzw&XqS_Ch$&n7R~La@pK3BM%|9anS5TD_6i?+ z@L)~vdj^8vs8d9UxCqI3MB`1NO=k%qYrk+*>-l|g0a5ilJClEAM3{_W1st7v{1Y<7 zyU<=r#ATQxqBSd_qL~;6Jsob*Tozb^$fQ&tCp3{ zd?;(zQ_P*#`Fs3MMP*eKH%NGAgZ8$N9kX;z0SC@TW zVe&bz!8|xCo^+nvT&(d(Pn5$Gw^(jQ+O~VLleW0#Haio)b{kJutSLv8-STX!P(5XbD6jnCjjOJyI|BLd$fsT14@maIn-r*R$H7>^luTub zl|^?D@u;%&qdx+T<-`%oF6b|~?IL##F?^qI?|Xrnu#|y8&yA;Uci9c>pBG=A^|YM* zX*fKRMTjb(XT3?<0IbVC^}=+(1hQs`Nb6mWj$-gq=s@84j*gDbNiv9~Pk^k{4Jw}s zGS7SD&kb#19$yQI*ERxaHc?kWXM(B-i^aQ1{+Wn3Tt-#Mmao%hwC-Z;<*9P}+3Zv_ z4?jK2s7sqAo|q3Its>9p2T6EpDTJt<#d2v`_yw)M?)XG%yFobH<2AP|5LHpeO_a0A z;xmM9wuf?&^$GB4q?hBnw(yaIC#P2Kpn|hexyRJxt&P2kFB=PbHkKtxmWPLR;kyTT z<8KQI9c>I`rcP`zXUU(B{)=)UtJpe1SEXOc&8*i+EBX=Uq*gJTGb^$>uK&I^OqRWE z40oNx%idk=WLOuOx{o?h0YA2K+Eu2*&D>Asqp(e-mqEVr8k4XW1%GkV7yDe|R%GWc z?)bN_)xGk=>HtYkX>OvA9qt(cRN$U&d!BnkP>(Bz!qZf`5bWPk$byxZTf80(k;_5w z*}$h>^A(c5R3!eD@}SWMjalVpjIW-QlPwd?yDHJPs`%OAB1n*YhycI@H^ZnLGhbid z){@};2it><2f_^MvWuhRv+rk)WO$5L)Yb+Js+Y8YB9)4%4l5zN6zJs4hm4S~kyV+e*4PBDr6dXIMM~$HM9 zFKcO{AkRnn&n`U#7o)wpa_L|FX{Ei4BrPgdW(nG@%J|RG%f=x?ppb!X`d&@@L(4P1)r~4Lc`e#+^Wo5)tlt1Z5F1E=?}|_;_I)h z*ePe??r+ic{s^**c=ddq8?eRGF zAI7_mX86Nqc^ZltVYmOP?BR{2{#`cKp=AAI3hwH0W3jqUjslN0X8g7a|8AMPCmPF} zp*c0lNNy04ng1yoW{l$r^(%VwpQR1Pk*=8kWXc(PU{=Zg-vj@rl=ScOPvZZ>Q2%=u zJQv~rSvUWAz~zi+xlt7Om_7tp(9 Ltc};Y_w2s_v#-ybbhNJV<$K?q5BvP>al9fP6B)>ta*9b?~;p)5%eLq<%9W(Zlvj1i-e zb`8lG#*8i53S*EV8hq3Dz0Y^v^F8l--uHaxJKufIb=~K>?`!=pzu*7*r=PQfi0+Zv z0|J3Wp;qP&Ado;YzXEHI-vHJygJ)-&pa?QpI%(yfDCu-bk~O z28p4-AXxX02mO4K=5ZVux8y>Ib}6Vy@IWWyLaOG^ zgIud7Z3ct5n4B3YVEd790;?YfN0s%qTVsw79okxK8V zeFlWaOD|95v5HI|e<->*iFueB-L&G={8ae~`Tan4=xD^-ClM2NjR%I%EcL}}0>q9b zEZffM;Kb}eo@ceW>7%A~LX{o#iq3(;f$Sje{RjCr(sv}R+sqo(6%Z>*GY|*Q^I)1_ zq;)BA!$vXMv-SvLM)3HgK4UCyPO!28#%UkCl_koN$L5nRQj)H}*M;*^ZC%OSntk~611(^am0yiY_< zPMko44Mt_d7~2AF<`sZT>sA)5kf){tQx>XktjFxPu@WaIir2A=sG(qBkHFS`6R7wJ6%rceO*Bvxv{xIo3>z31qMr&0^y(LY5p*ZVa03+K1pCKEBtU7eskE-X*qi@aCp0k;- z3KCZC9F>_N2&E~{;a{YP=v7>`JXFD67<fv7z)?5 z9?af!D+={2iVtA@-oMOL4%aWNfcGkUqzXx=wMWD^Dq3+FyCC9BnXC1(o*pe(<@K5MtVz@&AfWTxkrkvd8w z$yqf&ITaVK=c)&HN>i+RD#pxX3LpF)*U=qTl>GiE7%2lX!Xl;6NDb0`*~XB_K?qP{_UQ z^b8@|0=jD>r?eUVEbjrS+vull!ajV9Zxrl(*!4R)nY~lawHp1n_s|13X<~#swzTEW zZGer}u1IrX8v0C537D`m=Bi%ukB=4f)iILt^n`EP1(>idV6;g04|I(d{ecr^<^LGZ`i!R! zk>4n|4(x$pLTAyVy7G@#Bmllt21H^Q6E=zLBQrvC)PnZY1g#kPPXaRbm{3Zn)fj&a z1-eVt<*r*ZAZ{{jZpTQmt*@}kMTsB>Ds5dgx`rGJd>2>relC{&pmw!*k&6Ub2bPZ?CD5cYqf$dROlb{#e$BDWZ ztyrI;Q+ua2J>W>;GI4PmObg^L;&52TX#TgxVr1s0r;=EhL++*uIg?giF%T8!^p<+q zj%7Y#`n?4!ilA>2J7~MPLUQd@rRmGH1^Ks2dh3igT~l~Ob(nJ{JxnFz?5gTR(!3c< zN&>35d&B50)_2_GrvnnXC2@5ou{de_yF6ZP=d1?87#z+6c*%2{6SJ-MU zweGE_6$dA&`NkW|js~B$2amMs>FRP{3b*C4e=Ls6A(v4yXE7)+v8M*!R9-QP{D#Z- z9xTxIuk#@Lsa%_x>C1vxMkma|S6`Fb+vUHJi&9APh=4=s47~R{B_GW;-iMA{$B?#- zdqEX;&%-9(SBEd;x!mKiL$wbWpyNxU})n?m`c;SJlrC;H7?i0mLf_4X0yXBQ8o=q-KE;viFpuhX~K?c)_Fj& zA=>l#I^M^o*er34x*y(<;$OVhSLHOC2b@8Z>{VzhQgNLqMF`f7e{lKkVz4)$;U4Q% z-r-&8F_k(tb{Xj3ST(++jpi?wm=73leCwXmlJFzYtkP&;qlDWvF(k9Jy*7l8#fJXU z=&@umqijHv5__7|THVB*P1NXG@35C`5Tz~*cxQDGg=AgD;UCd$C@^VqXs=8hv@mLZ zD3Nu`cR>pwX3WzD`pv`)gQU?niR!`dFu=?n2Yo#U zTGw_1{e`;5ME=z86*sil?Lu-y>bVD9)`~?|(s5mlfefr$+s|P{ImqyrM-rSukbt;Ck zw`JMdx2a9$sB@`1zOf8fm}664H3vC?+I&ac+$_ONpJQ5DMzbmd#Avs`g&2(X)-$J|TsZ0OA^*9f z_CWlTNJh z+;)8rC=~_nDJ3#j`;O8CPizCkv7!s2{2H;=!^|^ck(PPD2l95>TCuub2ZjV+|qx|20s zqQ00LXC~U~H+@Ih^B5%;4>EF{CxaUgZSi^BO-H|uN#feFI(0oyW_gZ9UHq({HPrsh zdo8dRVz#)*Bj_2Yny6)izt3wM-JlvuVNev1QGg>W@|ISw$EJ7rjK(IsqDGwI+%3S>+Zp?MFVS21x_VcXP>qk_0%qxLncE~$cY~Y zcR8=*)U7b8PDk~FyO$v1^yT$6C?+5qj64a^WM5*;`EJ?`KcCWFHSP8Ybhd=#uj?iq zs68(no-^Lc^)qUat+99d!qJJ-iX=E=yZQsqCo&`-3%(*iylhL-h!$UMPAVz%s2N(@ zi(Sn@mipH^C2>m^Y!@#byXH?&iEw%H4X>Tj$@|RRlQ2QN*|Kh9VV@f8d>WyAZa-eo zLT`;K7xgtgxb-1vQP(twvQJ##wrBB7!tp2PeymoP@5MJR9`$|N_$9GHdT%*SofCw= zpgLoA^y4L;&fp)YE^H(>|4#9);itNQ__eM30gunyJU1`9##@BEs@s3=_D5&y#_;2J zH2BL6rxDvNSaHJt4-vr&YkYlu=q7Kiqa(MW$O!4DisA@1j2;%<@s`YASRj8RtfhHbh9HFOO0-v=FoXH4U%*a43E#26E`?>Vgu$!9)C=_-dp5 zVq-D3)qPi^-30hD370y|RAoxZ40~&%LqER|DENaf3BCa53b$EF-VCx;Dlae z_!72=&Zm`27Ot+Yr;+QO0|Nu|!`Hi%#Y$lt30)TdC^_+Okk9|k&9Cx8mH8%Y?af|+ zgg|{nuNlr^^mXg7aF@Lpw}bnb`#*^#jkuE^Q`r4;CfP@mJc9VDm)ct{?(-(l`|Y}N z}G;2&-c=*XME#1{Y980j*GiSEvIm-?wIlYOO`!=iigvW%1bd%m{% z4O+6c-L-=MMpULr8Z;3wc&%6${3&+vF(k0OeOnm98uRg-AM0h0MBL2+4)4K0UKs5l8$tLqze$Z7wMyoZ=SR-%=H}V zot8(OpZcJIEg&|JzoDU5Ej#yIpE(Bg*a%IK@J>2q!pg1Bqt*HXO?`E!DXP z(x(>R$u$G;laW^(_Kc_O|N7`9Fl&UZ$+ePpmZT}`-zQlRDnRFc1H}39?hU&?vmgJJ z1Nl{>W=FkO%)qAqJ4eH$NlHq7EHO6LyXHXZt>|7Tk%-#|eE;wdV0QOc0c@Atfx0eC zNp?1OHRLzh5wLy>gv7@>LBRxhAt6CoB)9k@5Vjw6H1(tJfOECL&$9Z>eV0se|MdW`A6`hmzEj2ZAfd#J$;z?uQla>lRwDTtpd6@!@2hz@WKPq|1k`q~T2=Y8r@u>Ykoq+EYI6llbr( zGMZ38ikfvMi+nW&t7S$iAOf2Bgah=y&BQ3HR0O@HiHL>d0*x2DG`90BSZ7XZH8?it z>bJb}J2Cd+=60>imp=E*GC~G)Z?y3x;^(IUZT7L*&@yT1A8j+Sv@eQ#r2%TSWbx$f z3(JF(li@4uLE~EXsF!YcX@ks})4>(nD2fQr=FqXEwRbgFFlW;2?23uGH)PMU;t70m zTwgBWQ^qiPwGbw2y0#$|C;Imp;C};T|C&SoltU8)si9#`g{?$^v-$rtz5KVyN7i`X bw}dn*+V)o{)s^y-<{+qroq4V4rKJA=+y&Q* literal 0 HcmV?d00001 diff --git a/doc/images/pause.png b/doc/images/pause.png new file mode 100644 index 0000000000000000000000000000000000000000..9fd4ecc7150a87dfb2ad288078ae78cc74d3594a GIT binary patch literal 1128 zcmV-u1eg1XP)F`iP?tAV z^_Jv@I7(Krb)|i~@6x z?WG;tYv-yP%D_qBE$&WhZOYDBriN((4q-0ctQ-%wX{)2jlTV511IEeE@o*crI#ZK& z5nKXX0`@zM`3}6nTq(0w){0pqdw>>)xrTuQz)y!Unb83}B>vy30FQvWUvnE!#b#VcEY$r!^v0!M+)6nZ-C9G_xzO#+)!=y75T=F-)S`39T;mS(7P8F1Fl zt?8Y`Ll8QM{^#!jt8>)92Dl%gf07(;hi0Ph`61gUZ zz>$!=9pl641atgD3Hg=wBW_7f(gjLeXp^!GIb)n6BK?la%Xb1R1^F4^i-Tdl_>8eF z%qn1qHYh3pdj#1WFydyHS4NPpn!Vb9r~vE|WKV$ijz;<99q?3;@6-lp0cZ!-3G!Q2 z808zu#`PGV{y_`CCPjX`8jC!m*|<>>Y5`a)$i4%wsb2Lh|Ln3E)^l!)^$&w~9>ao0JonAcVP!@ue#2Wm|j= z`nGuL47Q;UMxZzv0~-8rG(d~=FKdWz2Jm=14(48apePKK`YMpn{){GeJzaK=nkthE=pcGc2wDYrjLFnC5ML;{ z!S;Pj@qKgXx7j?6N=JP1CRm?AsJ>*9lnFeOZl!64@I7gwiW*s;6F@c_s7M^hX5 u`=hDgxN3&KKbm?@eVs)X6ciNHC%*x&;A^wycS~^q0000i*lqj~?Z+0Z!-KdJPY8R@zPlGUPwE$xzz?up z{zvy!<9vY{8yoyeiY5e%^+Vf^OU3mW_?cb{qs)jo?nq#)jDbvA1 zjW*wn1ufG5Dnq+YM1)mgt>y}NeNpDK@Q)0$%{Ze)`U|ilLAw{17Zqk4ybaH5oT2qr zDyFz2!)!a=)du~28Txz62-5`blU`v)MX;5(6t{%s(y@G>_D1i$(vELC&M6?r94uAK$F?ipaGA<9XuO;YzVrClv8Z;mlgaQp`@=@5Li+(AP0qfF_GK;Ouq? zR*5LBuEFODboxE%QMkSU4`MK$5cXX(w=f`*F%1|mA8@7EkHfIo@wJPkiR<0?bpam4 z%(jY)rfRaYX?h z7fA0IAIo`Xm16dsY%2=LmO^$Fm?NFb+kpoP@SQD|!8*Eg-kF~BtX#MQecOfRlp+Yk=s~MkO47!j<4O%%6VrL*CpyhuSl_%LUNtmhxZrcGe=~Gllg-;PVoMh<$L+3 zHUIEZ$lA=NsKM-NG}3K&jYPf>+JO0-QW#6_C{SH02ag{b(l+?T61--L z@HLs8Nrt`O(SGFju@ds+B0B?iX6{c?9Q`6EU&lOgFj7a6GT3R^AO@p?RNER{A7UlkjyZ`b;nXn9QHe&qtC zmXSOIcpe`p$?tq&|H=GZ+cEoOBALk@!M7^ld9$=LdrGnN_@v-cyktz+`zqjhjF?SH zB|I*@WjTP#`0S@6jU`Ttbf*^Y|+ z{N4DBD5L$qV~wu_#`{8x&=D;x9g!jrfLZ!N&L%x%c76RWVPXOHBJ0G!|gC+qUBERSNeD z5gOM!=o3fgox-J}`fH>7dg6)NAb!+JC++@U-~s6>&_UrCR|z}q1m=ls^+FL%o+c{3 zPOklas`QF6ERwsQ?~ptmmDcv*+OyAgs>5-xQaa-_Dn5Qvs?6`w7|8VC=h7A7oxn12 zR*+pj2c!>LI*x0M9f2ih!*jSr*l<;tiO-2bhiw{deh0o(VSg=SsdN!!vOObW{Hqi% zjyPQ?`bnYKY#()npEn+ZW~k~(^b8FWQhbW?9;ba!ELWdL_~cP?peYja~^ zaAhuUa%Y?FJQ@H11FuO$K~!jg?V3x7jbRwafA2xVoQzA3%)%tsg zQ?iy6D;5??$fa1=pjaTxf>5VsrcjCvCFX)gV#kcTF&>NeRo^-DJ>UH}O?m3Ad7tn7 zp8x;1EY`JO^NNfKERNIEVfRR}TG{!Ul^MPru)B|6E53ckAZ6fk66F?D3 zU4RB)5AYC>h~+783|N>7J0k(tVh}Gczk%z(f@%tAP9eZ6l1OQ$G4}e#$M{9s_ zz*Jy8c6EwkEh2IuutkJkH^51T_R{pScD2A^B7A;eHgE*^>=V~pegbO}4#`ODZpW`27V}bFMv^j0^FGIia=g~OIZtW9QFlZZVMBzG9q~a+AAcW z26(ApUJnzH13DrK=&XbQ$78#K`3)EwI0sySEfEBKuAqR?z$XQ_+1pmT&`eSMUdtO} z#zbfr+eG9$a8r3a&s)(1EK&SLpxga@UPQjdrx)4U75@xxMZ1xWSNvy0Ou7FR8>BKi}bd(HRO+dfmFC?ZD-|7^9pSPk3 z=vMr*64Qxq^@_iwb2S0l_*;;ePJCOd_}_Xfnt&d~-(-v#k(g3ETd(-rN@~hZSO9+E zzY{iAY6teBOsq4d4o;MXn03`-wO#kDxgOM zd*CW$K)x26AJuUB{dzxCfD67MAg};$fE6jo&jlWbU^J`mM+7+#0`Lo)KbjMRcmX&C z41~l!85k!9pqAh&7g7ZF0*kTdnZN1FiNI1|2R6SNMqGe<_+%oI3aA0@L;x)>gCxsb z-v#PIdBq&BIp9zNGI7gUU}Pjt2`AoW^hCh8)&Kwi literal 0 HcmV?d00001 diff --git a/doc/images/settings.png b/doc/images/settings.png new file mode 100644 index 0000000000000000000000000000000000000000..d073c83a60e7ae0b2a871f03047f5857f9c2d6ba GIT binary patch literal 71380 zcmce-2UJtt*EbkN!3L-ZN>>q(F1>?Fliqt(dat1bLPQhZ+hTK~~$pFm;{^W-B8|60uKzZcd^Y=IL=eJ$n>AM2} z6pUAY*W@)`>;eF|9C_(CTHYpG7sMV$NT2ZwiSI4w$(2T#9~)GJ=k*J6Zso_uZMhXjDFRvtj@uvYu3y)QeLt4MnX=Bd&zkT$ zBt%2*w(C^L^)=6^udnaHJwc8Wcj7*JI>O^Qrkk-7)~kN~eMzMEV3(4`3218+SFO$fc8Vx1!7Xdf#g;;*oUZ+IxvZ!e#qr$hd^cFK zs_36ffcd&5gsy2d>AziC-^}0t=a<)Av?vtn=-I#hgl^GX|L5@5Gi}O$yWA2d`S-rh z_l0i!bMgM$|M7%(z5Dz7r-SFF9QzpODGu)H**)5m<46ex$;*b83d7BV$ED|A{m!XL zyC;jBYYhK=lS7bKvrP8NDF%fiN`qx>w!Yuo9_$`Z9h|K0Og#UFmERu=mNvmMHC|Z> z-(FX4v@XydxgrWTY>xwVkt;1mIO;~7$w=IM?{m{LdQaki`n6gW2)jH%Vj*RmI5>UF z8x!0Tu5m_VpaIl|tBCw}91iis#5DeEXQe%PxMSyT+>v{vJaP`#=*jlaLp-x0A@eHT z=?*cNkh43zrSzb@gJsTrX82B&so&gOh5g?8{+#zA9Btt4pf|spG6&X{xWM@YA6`gC z@5f+q1U~(=97mKHNwZAuo6oBzafFSWJm+^ee;pR>#L_k5T@>Gvm!wsTpvFcqSpU`B zs<4))xP8f%mm%rXm8eg_s^_)NJu$&MVYFhSD;_5?xE$`7NAT)r0qs+B7nx#d7wW?2 znQ|-4IONR}XWT_gZxQN9enopnfqxcjULmn(BH!FwLez{(tq^fd?`s|`akh8w&D3&W zjZ>t9d9dm1{voE?+&=~OkM6cEc(vdPq204AQgHg1fgP)5V6AhP>G@!(LNE24lj2wQ z^Aqf{=SsbXXZ=q17yCJ~lMt^**B#sGy@RWIYnO-9g;9nHBfUGDk|(gRuokn+PxG7% zNXG|%g(*Y*yyz!IXZ_$>ZeehSjM$?mw;wQj*CoA?D$WdO$6$ayi!Ckcg#LSTJ+p!> zFPu*|cfJj%`C}0DJ){QM!nIU4Ew@C&nW;=?Cv+AxBDu#wNr@}$ z8(*tsqUCFnBP@X^8$6#BIe_@fN1N9E;{#^MvyQVlrpKj_krFiL%BSEITE0;#Dxvd0 z{2OM(Z*QEQrS6~N_Na%4pWE3+Az`P2`<;zP-N@Np?D7fjq_7EwwqE9t+=JAXz7-bn z*4rwtMFa+kh@a5%Je`Ydmo^jOuOe#rN?qqYxTh zqPSd`l%S-cdDM+-Spk-wSA%7j`z7lbOTlRS6@E#Kz1vxUYS-Y!IainA>_JN}b|t*# zw`_&^O%QzIAc9)&zV>$Ng5#GJxP@MG4<%exlB5MTs`uH-jYL(rmXk}9Xn0|otE03!{6f1aoynUn;RFUb1?y=gn_{W z7 zBmR0YYqR4QY;@rhW$siz2vMBGb^Bhd3G9pe=^sVRFc8$dlRvFC-?@KM>SPFe5%c3{ z;!g(aUv;=Nx1jsKWMrm2y{WRh>vg$hxc_a(x9G&HGBC)X{d%w<>_n#?cX_rF=M0uI z!J%8q3~A41k8v?vD+jCPbVTZ0UelSL7d2ifjtC#A_kAsYcqks+JF6@uylyiWtB91D z#I_Xw$?8)Q*-zk7EahrGO5xFyX+WQ^U6^Ax9+`_j=xQB&;93?RpEro9G=#sS&>=tCGaStdbvQo24edY!Mh1?5rN-q-FWj zP9luCm#YA>4GJWF6)#+Cic1rcbYvVii9Xn@mN3P^PW3^7TZ}HZt_JtIy&AU1zdxPe z=>@7t@KS0I=4v*2XE?hx{~m8iXV6kgpHL8ot0WgCukDu`kcbndNXUFm!tjXy^F*_#<8UW}#w%*3vD* zt>z*0F44PGMw5@^e+AK6lENX8D@!dcZLXP)Pg!l&C-1bi2i+tQo%K_M?S(scf$SU4 zU7GdK&baQPeYCELIUOo3m~Uw3<7!YCEP8HOAbFScH6|;*$s!WUm1z4mOQh2Km2`t{yjMm@qQI+8b2*M_iU~A z#w*3UO@ifMRi}LHtNm%%PVow}oNd<`>0e>hQr+H2A+3l=sVRic8zuK?>oK?sNH?vs zU&=Jdw{(Vee{*Ul=3F#*E4hmvyaKH7+A;C5Jdy0Bh8;+v$A~{@T7zS3&VTt@Zl!v5 zxG?{!lN$q9uEUg9KMWQYF+1!JAer7Sy(qCepwPVs0rl^&h zO$Q_TR%s~3e%6#2fG@am+6iAF3E%}A=KN$4zd_E66+4*{wX;~I!T9sG+Q~SL&>e^k z;nvrqzsvK-(~HwguO7IhOP=u*c<~0YaSEjv9(<@_nYR2bRbZ}|O1HBaxs@CYJ^z#` zwgK5AIyYlW2U#ige=2Bl_Oa>Axne)aeyy)2+|n9>c=JZobEZ21IuQZ(aBki!?QY7O zKE=fE?;3on|8#VUV&`K1(QRlGy`opS1)C z{P3M01ddW9B(82bHr@Oeg#rYO`^8BNca9_c&Wl?(BrgNGiukQpmqF_p3vk@BafRog zYREY{y~?mw0`xDGHp?3lC$T4?p(^#$UAD(bEuZb}m$QL1i@IhYrpx?Od27!Cr2e`n zV2ck!^dGFfB?Jt2{W}!_0A_2?|CyBlfTy2Z{~g1}``3g2xef64zrgnY`yKxW3YRkR zUUq8yH@s+d@|+{%8eaNOpz!2BLIR%M_>YYLZ9H)6|DTRkMlJr}i`EgZuDg-bj)I8Q zEv-q3>mQ5Jzioa=*m0J`TiIq&_$~_ye1M>Bm zCRmG$8RIYg<*oK>UR=GxjE$9?Z#r!Lz2^1c`tA`PhISr7+Iy7O0m)1$affONFL*s^ zulkkc+zkBEh6x}0-1=UH(^T&fr3B5Ut=_=-I~SVY50YvJPnMZ-kcK5*8fb2IqjZRo z%)$9PGg7CSG<2?!4ZU#E7RLd|>vj{TldgIV!iIYs&(*;S_m)2;(T@N&(qE~(5SZg7px-h#-g;W9T4$` zaj`FQ7@jCqf~MWd3AOvWm&>#BbCJ0{HQIU7Qvx38fSOVX+np*>@IDX1RLSz_NV-oI zhVZJjfl?D9&5@GAT0SgPSt zrjIwRazq8hx#`WlH911dTxP~1UHI>_(0~nXc?`S4ei-$Q%C^b{;d+B7Ps@!vRfxa! zK}q_Cp)u6Rt@cE>82F2NA@+8DpKzISxneOGRuRcmd2*(0MpJOp0Os49Rsmt<=jw_U8C zjugUN6fpg9Uj?+YR+rprw5Dc5dE{-;RM8$8DtQvLyJ2^TtStR(x~h;lQxn>lfvZTy zLEAO(6W)UbI9#3#HW?*9*boMFJ?8VM>dnj&f6ki#jkTPLaXofbnsE5tH?WND-=F(9Hx8|v*?lxJDl6PHv(fVpsvp}6Tl@Z6S?Q6f?Q{}$Qwt_e zg@=Ub>+=AGG5t(inhK{%1!*2LJPS2#XP+uIMLFf5M@RC7yXQY2rK@x~yg&OCR%7`> zSSxIG6DuQGo6YLsl}aaKvX!Ja-xQpimJ{+;zxv>7#g+T3rH7N!)a=AvY^K`_Ztm=l z!E}+!g1qaLgQ{G#4_KNG5-en^pPS^tKMXcUyVtWb<+L{r#*@egc~Vt6a--a|oD6@0 zuaDJ1ss9nEf5N5_MosrX&}lru z;QOde`UZI2CI&{9W~N7g02?VVOr@lYmSB=1iv}B&j5(OE3-6;k?k42S{&~;&e9qf@fRcc_&YQsgpn=-FuUj9=H%}*@%C2dU zr*U?aHmfArd%o6SlJRgxe4pb?=>V^eDMo%@xj``I&Bo&+|f^Qe^A5hkZ6%x<3Y z11}!uFau5QwBHze?le`Xk?BZXp$ZU{F-))ZN*;Jlf>lwBoO-JFK}UnAKR2IF6ER1apLbzt5}k&59)FTdgZ}p+d?4#4Pou?Idc^q1)+uIfI&$zjWR%Nv}~R3M#q>&p2i#PD^+& zXumf2!m^y1aYf`lMPFZHi2eYQoPTt&x|o%Gs^;3+jk3GI-rphnF?okM)8(h3=I0x? zMIsslw@!xR;FeAI1=(|1QnZW(_s3GdPvkIKZ@u2B1JhlO&Vt=a!B0%VaBW9lHroSF za`v#B`Wz6hz5%-*1y{n}mpWjQqfDfT31VyGzA&(G>Eyl4AmNdXrEbdA1m#_9bT$ms zFSOSA2R_d`4C}+s!U$lITbt{R)bQvnnSr_dnG#ncpK@|ji6XlCk@ zR(I403Vk>GQqxh)<}?*{2d`k?M^@Tn0fK|~U`&>RtX-qx&(?lq+3V;GFG&qsqWH|O z#ouxBAutcZ`Iw5hgSwC^s(!q0->Sqrntvvw(M6*#3-5jBU$3*Xb!G&!=o==-eJ<6|E}qzl zW|t-u)o%221kR4E|2yHtqmZSg^xmf=J_}Ke=-f$YszR@MWW)qNU_4pky)6l6_mJOuOxb=<(%jw0!<3`wGpLrEX1B$~n!!9FYPl&DadA_}=p? zqL=z9M23^X&AT@eL3HIwuRoV6_Cagz<NU2UUf#|< zyL#kD#}K?OGTJ6BJl-phjX@dRI4QK+d?hI7u0Z7Lga3{_{@+H6?|LyPB$8AN9Ne_q zHRGx2IG~cV@?RjGhDsRImVx^QYS{`+oj+zRaX@)?t8qe3V*kO}m8HV}Qc(W`=FQ@x zXFQJG;=Dl;;O#NLtC@ZpYuxU1SRM%uyMkn`gySj!QW|krgT=T1igXKkJ{o_~vV2OX z5vT54xF0}3w3XHAeKcW>W&qq;N+vK9{f9emoIMznocn$gu=usXe-v-L(Ek;tw+h6i zZzhagvUE=YyIZiJz5%ao#jiR1pHv$mLPjE%4iGOvRE0MHRB#1;p_)yV$@S z5-v5wB^Uknw!<&b&3u~3Tc&f@0FAFr72=shRz4)a-mFJwu6*uGqb6SrB41v$+&>I6 zZqqrWZrP*WXKUGK+n?F-M>>TJ9{#?94g&VILKSx6;u0^6&)aUiel3oqkuw;O_P`FR zrm7Eq-au&~|I{_8Oc3h`q{Q!KE-my0oRinD$8(&wm3_ABx&HcI%G{ERzck^=HVJ^3 zzoCrD-oC@q_Q#ZiYTs#XY0hb%r-P|u7K^^i+~Akk!w3BA<|eWpq-_yzv^PU$u_C|Bu_z(GmPJ9!xF^4fJ^u9A=2a*l;V4o*rv z!nvF25l5HVYrM9d&mH4Fz~%Dj4nURVJ*bZprPdoex=1I@*CFn-?A0yvM|EhoWrQmT zJ5?Idj}tLFKzQ}Dh+fcdWHg@(+z+Hbh`g=?k+A}b2u)E??&{abN)^b!WZ#b8q zO`*ZF+33Bp61x31KlnMNxW%XM3r};3@GJcN!CXRoSc8YK;|v8c!DtFVYwn+Bk54ST zOvbs2GiFZP$bJo53D@QL%Edt)E!2{fn_pmLL7ISEh@oi~w(;OzR~4GEE_t(js!V$n zOt6!?#%P7;udB4p>S*q?7+GS}%s$YBTfR&zee&#R&5+;5FaHT(W*udw)d=P5t8#9c z;ImyEH=rWt!(85MW)lLMytGHeplL+X@RTnCJ8)#2xc zc+$S3xN*Op2OYY{Yd&C`VYGaaC!Ozd}TcN18#^7mb>kn$9znZ#djQH-+JMap};ROm>Gw@EZ1Q z>8V7kbCA&GaU^b>J%?|Z@NzYDUG+5<=9`KU@=JGa&fZe?hYmtk?3Je0KTS9VeS2qm zWTa?ZiIZ!cBoE$*+4bD+T2Dd%(}?D62*~=c%qH z1z>Tqs&(N!DVx2g3>q3rrPF@Hi*O~G*4;*BO^kGKV)h2o;uW9y4>Ajyrub;>DO9V^ zjFPmzva=+U8%$3JtC2`~j|dM6mXp3dooq4+rGmR&h8YQM(z4mA1X&YO^T>xWFvq|T zeU3)nRJ0|%Ph#8h(q05MbM-8nKg8sI<Zt~;;Hrq;593uYg<2)(K}7u|6IdiJ20)mcF@c1Bf{`)3OxMBI%a2U` z!3iI3DsD)=T<6xUj8=*4{iBxPkra!wcv`nDFYbxjWQ+S`q^uA4>g;|!*z+wuPy-Q> z)drNO#X=)*y{?Hgj;mjgk*8xjdXz#>8B3|{kJ(K0HsyX*9B5s*mE>Y(_i8m%zvp*GGoO)gbyQ7lr z!9^0-YN#j|8T(ji`q8$}>s&C3(cw@1a5HIYMkZFgMpC!kJq=vbJI->Dt4s3z`jpbF zM-j^QHD{+;1}se5=_Xc(q+GC$ zS$A**i{#Hqbx4{BL(~kEg@;Mr-uDi1S3{LYYUd@GzR3lcn`&lDE zWm4x0wPqb-Km*x|W)Yh|Ogr_`KD5?>+|l6=ru!r{I?k1Ms?mCbO4ks<%SL@*P2Gyv zvR6@03EM3BJW+Mp6u0iUt`42O}W<%!r~4qc-{_TSH-umK2wS2?T-Wmt*-gIpZeOkrzSGcn2&@~Z1JS}B8O7Kc z*M5ks&!69FtxD-MUThl6Sgfzy(JuawUZfz&%c=lLm;o(C5`3Zy<(>?P`9gAjh?6LI~oFdx;v z!olY7NpgBomOk|lU>Mn@D^-G4stCtvpBAhEWhPasYM1_HkC@=Dc-GJhYXANa3pjZ( zW^MZN+VA(8k-aZ-|M9Ak>DEm2O;k0+9zOY23NB47GfT=h8(3c1PT(o; zxSr>bItgEnRf(*zZ9GV@`r*4#;J)C|bQo5Ie7YA{xh)jziqEMQKU*t_wHwgRNvBNU zwBGMmjEu?0>i*2D8=cdn82>Q6=iC|DtJQgsfC>{`2fv+OsC^soJN!Fs!d?|@h!&GQ zIm)_=Joc02M4hcaDHItCs?o=<^grDw<&#Z_I`nnaO}u|qLX{$f$TA;6%$F@@&tcl6 z_D?R&Yxifn1TP6^b8oY5Wctgi-0URlTVv#ni@kiJ-f^6cdxCu8bv-ISb{Q5sa>m6v zu8#uBTzucGd5rL<4b#dr9=QKlpHi}g z#%i~vMPZhX1umR=Gr3|M@ZNfAVwG`f+7yEvX@|Ip=%tx4XLpi9o4zWQ`#E*0!9c1U zp53TOqUOJ&MKBOYS8C^^cX%%ehEMEG-EjbdqupTYJ;!R?%`%Z8IW0{h1vZ}0pRb>m zvjg4rX}Ef6!{!N>>mLcSmUCax&^ zLw_#;>u4_8N25~O`Ez#BTP|a4DlTsQNw;#wi<;Xv>PwgpLt|tDu7ep$oo5A?31@FC z_A#5{V`dolSwlmEg^ieFiG5B7?i}9OnSZMEG~@8e7jS_-<|ph?P~cg)#2k#91UQ9> zLr~V%9HGp7ET>i?))JL_zk5NYz?X;!T?g(AeSyPd&8(kvy?;{g=j>9Jr}zK^{u9$XY3tmV=n3_v{kN4_G!>hU|a7+Uq!3tOF4+Yx|@QOrp}q zE%5Y96`p>{7fpf{JlPAM(QWw2p8*#e<|QWW>Dw(>2c)4nHi%V(F_Uoy1u;LFUxg&I zcdiWB(DHkl3nS7+xxCz>-q`N-EB$m@WbM~#QeRV`P86uLI13E!s5wo^oum@-G=r-N zPJzsv+*{BU<{vnYw@Df;KiFnjuPJwR%S!(m?MHo*pQzm0OMGI>j-as*oHV*$3zOY> zJT$rTry%wo_PDVOdoRyoK(L--u>oHQAh<;c)bv8YV-bMA#3(jTp+y6jaD zcjoFFzNITG7o!Hh!ep!EWubZ*)ve;2kZHzMnW@;rlI(G~5K}wBn_HC4YnB^z5(bM!l;XYvR zl6$G4)a3b97;geq5g`97!!i;v&llLDlus(cXzDpmqf!>%1)EHgwdw}l^pr^|3E7#0 zQlzGHBxrloEqJGH2GlcDIs!~~r$~M_o~Bs7)(3mMZBLUkU?1zfR#LU=t1TuMD$M+N z*=ARky|X^_jF-%>^v=}b8=uIIi+ap%HTl#qGktn2Sr%}H8=+*%ENDMxn6N!F!nl-L z8RlEv;kU}09;FK2)bu279D++6ai4U_Nqj&Sdd;_9^SL}(LmPnUyyvg^Tt)3vfX}Y| z*Zvzm6*IO9|he9_NGvUuR(N`(Hk2d(z ztH2-6$`qsPS{GUmK~f-UJG8m3W$J9uKfjEB@iZ#r0mMob^4yP9(I$MSjjzJ65wp@J z{K$b9;;NGwFL&qPgDWZ~{GV(1!~b`ALfd-(i__D9yq)il>FTGP3i~Gts>F`g6O9Qz z7H`Bvs`i8oeKxk|1gB2_1QWPk>AgG>0RP{iU55WB?SlQ^r(H7mG~yPt|DW@ z0>Qw*fR&TsphoPkY8wskG^SxrH9rewqb0KI@8V$rX*opYXr~5WvH)cPe1>GcG)M33 zfW~7;hIm9Qhyw8ERZ{k8^aSgLrn+e;;2D<67hcA7rO)uIjV*dJI&-foyHdYw$u#gX* zvFlOA^r{({{v_k!7G+aZRJ7BNsphX{4|BU96u5SkmQ_n5xkWP2_2aP1#ZFsCT%TZs zpeBq5!esj?RJ@@6Z4x4OfJHBMnX;3it&_NL$a4kwb#+JRZg6xMpJqhW3r7xGD`sUrh* zyp|M#n#}1*(b-;-rx?n{gmbMh&|)n=JF7BxRt+Wv1g+X;-K^c1Z_7!f+nz9$SQ6d# z2fqD;i4zwLN(rUZ(>l{W5OZJ!5x}L~2tKvD>so?-8c(M7UpsKKmBop&=XDa^v7Cet zd<&r+Fw$TwqnyQEVtaQkW_Kp4%bdX|!~FwE+yM`-`D`n?2%RC6O2Q>~zGc0le@Zc-jexsDIfZ4C@5fUayHMrWS%qGCYnbp@6?JN{?Acdb2^iBGTVw z*2^7r&@oHe;MLw|_B7G@(PmQx%xD3NhD)waf0(CKVZs` z97%j3*UdSIy$0lPDIq>>l;3;);GFJ(5AAJ#BbxGT zb3f)D)l_caHJhJ!{n8}H7n#pW5EHoRfzyqfTqclr)keghHpxuEOM0NJqV5gj=6??3 z)da zzkStgCC@Z^;dQh~ewLs&WhmFc$la**vX)QuSqKqH_uF|OQ%820qp}8gQ`QKai6~9K z)nxK`Fd{upY03uwDOB<2p2tGfl{eE|CM#bRwp8dEwlIs^b_>V90uC@)eS??tv7HuG zW)F^InL6u-I*dXl-cpVTXiiit7m6ISE_3$YoSAWH=~{U(b1;i`oMUT_X(08tq)k-{ zs7dlrd&TO#PE6&0zC>SZSX-;H(Ua6WV9lt5?vLfjtb40V6yy8g$Qv^2l+5^A5MVN<11OvW*|)t_F& z(h7}vw(0wMB+DR;U2Ym`AU(9QU|ME?C+EqbT{>-GqJ+eXf_+H;UJ;T+LP`PN({& zQd%J>)7};;B9bFVVL4IoJG4>~FmBdv*H45@yqAx=L-qWXmMW zVi4Q0Y$iQ;uJNfwbx5ggenI6P6;;$m52fp3P#WJ#e&&O>1rAt{M6KhnU?F^Jm<{aq z(nHD#8zr=in+B?O)yL9h^_DcE-4VWyH_P}fQ%!n|zn~PtP(h*rn)7F`-z{UmIwc9^ z`R_dDG8p!HOEgvCwimkAqq8B}9TW;dPkT8VmWM0siK-WPPVN9h^qI}>WMtMjTrHJE zcSZd+dKz?1m8TC2?szn~mNS1b5P@>1;wNuBUDP7rmD2L3p`np1I`Q3cO%j*kMX`YP zSo)nMH{5k2RQB~1lbxgc1`!C$5;sG(VOtTVC;7M^wD(FnisvpZn|;%#Q4aYEhQ4_x zy7cadHQAZ3j{<2=g&y)ueQrbg25D9_7|`UJgApXy2SdD)29X|~UV26q~h_us$WdB`-cuux37Pz3ne9xV$a#X@*#8^0)taIH

V zvbPS|k=F6w^gh{PuSpmicCbPM!=jCz6F<-vKX3LU>tiiOwwxTFMpG}p-(Zn1^W^pUU%Z{1{j{F;g zBK&fZ31m;GUpZYkm44J)%5ki!y2o!`wml#eFa1?KzB&4bdBFO7};^!KmworoNwHNl&A z&RjGj`XxrISEN^bO#zK>4AZlrqmdsn>rfe60h9i_mR_lWa*CifK>uk_^y2uq4SI#2eg^NRQKxef>BC3%)< zjl`@jR8mmrfDIbFKQO(5{fQQda01d;e;`)T3Os5CdAE0Q2Z0^xcelE?cXlo+YJDJg zKf`@z59rRiG6REgt8?enjjJxcx?A_0M4&3VoKbI$qD~z)Jr=&)T&uL|WawSK#sKIU{GH&^MHm2^ z_=xU=EF}*Xr8utnX1DuC@dj%6x(W2@ebijw@_M#yn#f?XbI*b{O)aD9j$?Qc*NWdW zB~o(V2b6J}wSnKyI?36sWt=FAG~v)gdiUlv*^B7?IWdbDwx3>yZ+=-VPH<+WvMsA9ETRXe@Ry@nNp7)g-{Z@AbBkL>i7Q8E(`#HA~U#87!l);?%9 zg;oiR7uBl}{oMOkZStqQ)6Ps12Sm#~CW4cb%CcW^AQw&Wx81w`k}pSn#J=kkaehd$ zXesP1p(cmLjOHgxUQduD+7_w?9i1#L^L+6H!3z-;OFU^~klk?MM>26emu-*6Wom39 z+pi^=D9cBZ98T;Js(O{gKUs3oTh$R=sj_zX)kazE2%dxl^1R|eq1<`43Mz9f)$Z`7 zuCF0T&X;Hk*QCe_e_vr6vh76fZEq709+gB_2~r_+XktNrU79M9H=mr#Qg@>l9{V@X z;^($#J;<bVM5T@hKHX_5QT6nyAzFE;KY=?9VWh{?0p+sjG{WUipeM@7CQq_Q;FG z1OqNS!%<_SvuE590k+m+QoNL*7c)ri^)Q0z7!m#B3qco+i)|g;X-`uA`^apSeZz;! z%Y@7QLOF=p`&^6>vr?O{%z9+PEwJt2yEZ%z6FxUeM?_a6)wGoP41rJg9`}Snr6YZfUeIck|hE zKXe$${p4;7DhzoSmbOR{TB;Xd##nauDyjR)Q#WVXsq3HF3!RZH?)+_gwvQZezaY%cu3ECo2`Z?b&bw5ykZx`APw^$NcC< z9LcaI^6;20vsbzA6t1R)(LPtvAWLPX6+G5km@I&iZ7e+V>(@d-+V{p zpKxbs?s}u{|5>qtf%`I(Zw^C!i*55oaMH zsI-ophJmL_9HF3{H#@$I9cVt`s~wSLGRvs}7e(lyTV{`!8rp;bHP5aphJTMSvxtwF zbVKRZPR0w6tt5HAXub~e=BdpYg0AiZsSQ6?SJbf z1jx+)vn_Fa?0>DH_#43ge^3+sPwj5b*a>CVLBYEB~$!7`3c!1}CUSIr`&#e7oj~-WkKFoCyeO`+@npW ze8(qp;^=rOviFMra(6E^%`(Lks`JSNfN(@pYbNnq;(>dAONJlEYs(u`$HvE-;OUBr z@f&Ejb(=_hn(o)xD+m+IHy-w2A}A0~B-x3dEXS;h&b6F*;Z!b%Bv0i$?QLgfX7=|Y zA=6E=EfoF#O+m}Y;&6Ks0G|$?OFQ5hj*9JA5C*ocp)mQCGQY_ zR9;k({177{B>pD#sq^l|^)h3N=;BQ)uCha{q8qDb)3X~NiL>FPzW6-ois?lW#1eG! zJEwOOIo$y4J-ksUyIeiUZiHL3vEO;rZ4%42D!sz!F3d3umL{o5$_wCd>@{*fhTSwH zvQ?OWCFo;dWudp4s~DU?n7gJGLMg0V+pe4w7_6eI)_kAuh9}hFZ-v+jTKPJF`n9Ui zZc58Z%6_HfS!E`*H`v_&{MglJw~eU(2R#w|$w=u?=|%Y5aX6u}iCHP6JIq)v8y3s1 z?9tP~NekHcpEWY$n?1(vi#F^0!8?Wk&+kk(NZj2{e*Ng$UAXfm|C+EEdxiHx1?UT{ z^B^t3P_0n&Lk75l$K$~azxr;IYULItBWv$1*w+ifJHnWoJ+Z8KBE^o~ZED)^R)o&1 zsqF#J2UA|5EFEi)hFX)z&1!ug$*83llZX2*DXa+HLDy?G?7;Tg8YcVg3O=?FCp_`X z3GWsqC=2iyOotqk;xff{TM0bBNzIMpHcKxH#c<~b`>8vAaQ4%^mP;gVQfw{9v~=Va zM$Zzl5g)=hSgp#TSV?AA6b)nlOwwylt=#>|cbh_ESZ?(G)awF!6@I&x)m`x2)&a!l z)`dcLuFyj~e8&uni1I3O74zkCI4vrhb7^8b z_xMoGuiO($Tf%H0!OJK==vsBeY{_bFnv@>x@8ui9SkOZ;nX2o^;i^(7EWzR7-;CDi zshKJ}b5G}rMd_|MM0E*RjtZPzCLI_mH==9CvOzbrb~X`3`o!lG;uC`4J=82SRwO0N4cQW!UNn+tZlnv`tq41PPjH| z2JD+I9UhgCj&uGf5w5lwhua#Z!+qyl9 zvKJKKwRj}X>rx(^l_1$amVHe(x{+N)z|)(#2)}tF%IMxr&ToY?>F73}!|&2Md81$> ze7(EXq!>pqnu(tJ9%pIL!7a1)q?Xt8^tz_ni2j322@Hf9io%zpKPz^Yw<6mtIHctL zW_4AB1LGSqe%`^wrOR0;^00CMrP(lh>x4zvg!TUT49Cpom`B$^&RD&^_7o-^#ijwz zf!P#=T72;Arjz65AG*OfCHt+wYx4T@m3&B?g&H8IojnTEt(ak!N_+>EN4y*^){;0UU&?WHP&;S7uK;%CRg0Kj8Z%cZ>! zTy*w5lBTy8&jZ@F@p#Sp#g~1kw`Kufxf;$F%R#2wzcHM!ST45-K zxO8`LbNgbOe`v}wHGo6$$&PSzp2NsQZD;}4Q&wjLo@rt?Fn76b8 zUQ<%j3pvcOogpN1KubQwBEtO|!UaC&Lgx29kB1$kZ0mwlz?_5~1|pnYLkQsQ{)>vl z*tYEM4Pwc>-*f45VRTTmFNU&($?0cJ!^JpVIOC+lPtM*SAYDcN%-p5xWp9RgmYZEY zao1B5fiN>G&XoD--@-djbR6;Q$=n~Sl^?vtxkH}2Unf^@V4LPdfzDDF;>eQ^MhYgm zhmUQlP2Dx=+@w{KTeHt{#!mL9#a%VT$pVE*E@)4oVIaaKI}~-C`|1?XfK&G%_-LEK z?L$?m5anybbm%LLMMum6T7B_Y46T4SfCdIR<3wvJ4~=zE`coq}!wO|5f5q3+%mt3d zZ^zlRZg;v?xR;D{1XAVZFnl$##ZeqEh@P*^HSoihxi9ybuc zCTlL7#jo7c&(Ms=xDXkyp2b+`{`RY416zN!?=_MFY&}w5cU{je=;_P(Dlgi!x-zVE zlIB6pD#((DxWv?fFZrfkwsDi-_x0J|Ru1~mX~uW*=fTpMcC{oa^;ZsLAg@>ZXNuHT zlejZijac6ozzVI=KVznL6)6UhcVD}EOtpNNaxOoCMu>g!U9IxmNHM=K9y=he?4MoU z^mshtD=VpG8Ug&swc8=ob(@pPqDCpxS5CEX$`uh`NvUmu6&MvSHEN~H$!D*+T69BI9TO`8b3+doI@O9`JFxO|F49oV)E^dUBRjy83{xofW`5lE zi90G@vYAtb>U~*Q$&#G^vfP$|(M)Ey`gHdlkDjy$S{>j;(V{!~=vS2HG6r7NJ>^OL z`PRO%;OKDrqq#q!j4t3-PcmSCfs7*(`mq(ufeGPRA{CLMSdU%V4Xz&c3IfHRkq`jl z_!zZ)%s?tZK(1yUUerM3y~2m>Zgx_ilsjg*bgEsvQG~>}ZDSp1a=XhhL{n@L|OnKvBTloer?fMX9 zfy$Y2;>pQL3m^gqURi@&uA#GrKUrR$58{lDwrA{-n;Fb(LK_~bMW?I6M{9P}U4^L5 zJq5B<{Me8FGxj@kwOdb$KsGnTE!u{oV?vdjO#oAGVmgIrzT1k6?)RD1>82Tsm@f#& z1bbU4Ipxd9dxjl@#0DZg61yc=r~QnkVw_hs%40P*VXyU+WsIIaeL@l`9E@EBl*Ix0l}(3BvMP@k|* z@()1|8^I_T*gBB$wW;E1_p%*9;R#0QP(Hj*;+8=tT$yOwqLQzrj#`&-ZUK@Dlurhc zQIVj!>wiRpssl^rm6cTiNC9*T&4O^L+~lCUDTJeC&rai6X46)C9V`Nz!L2smqZ}@# zne@0oh&FoJqJ(0fsnuzsP@l($RnoU3^yl8CG5JBxjC*7@T{f;nD=D{kzg^>NB~@DH z7ZH?n_qpW76U)WxR~p==EI2fAmTK?Zg3A=}*{MvLwE~9UF>aa>k6ClF7Rw-Wy%Lc) zoz85Bu;ZM(@3V40G&B^I!=*~{qQ`L!hcIE1BJTYj_!$EV> zPOZyB;8M#i{?WGSvg?;7`GRf;5Ad4U0_Y3nYpssOCt+(*fG9sg@lc5237mC){407_ zC~2)SAY+eYeugQ1e$-~~-b`f05kZWXzT-)ysoj?FuIkI~x-&d_{;T?}e&f6G!EUsq zTC!=gNT(#e+P-zkl`st}q}@sx=H2UwO)0TZ+A^EC{rvj$!{s*a?Swxrgiv*jc- zbCAy2yiTOf`JPS`E~T^Z=L3Xr*{5>DEcz-aOs1Nk`E+sR)Yoa1}YHmZxRkU9F zD~p}Tz@plI90PPs_tp6?i{^r56j3`h;XFMHZfHA=@&M&w5Lh!fjlWDlEKn@w zsd2=}Ft|ss_V&7DT$qL-@``?hLtxyyL8&00!6;kULyO7dj}vPS1+EDJK|$@FXFca? zHOCX1=sbdnoZsVcyKQmLU2&tnU~fVE+MR^W=;0OJnN^*07?P7^FXnnzwz-hX29>a$ z)_Hxqd;WLjL*9a!BO?DzMBkHc!`ZLlWMYAu!vmIrPPg6L^j(0DmbkF*2 zGg9>FUbcldOsifaB#(}qJI~Fn`w;9d{WlN}?niT`d!-st8tPB&yr*b?EbiVcT5(_A z4>B2Q+`ooIA5WcoxEzm7vB(N+eX2TI$#FC@M67w91fTawJN9NK3N6@W2&p6z+NQ1Q zlqw|UuxB5}=d5q#3zhYK7)UFwM!=!E$7so6@}zQkwce>~YuU$eE}aAc1`p$}`rZYP zAdX4@iA7VEClY+Pn7U~>c;Fjn<&pXd$B+e)@dT123x(3tiCvlMj}^VZn|zh(fsH(w zWtace{6JXq=*tPW$1L|;+|)_>$y(1@E&>lD)>ChvowBjFGgMKd>@lz6@oJ+|zv3hz zZk4e2FXVn~1LxHd8O+)!b%oVbxfxl;q-*bSqH_o(mexJOb3}U*B2LMc)tYoPm@!w> zLK!A>;4SnGtNgO;eMjmP32rsa7qHc(rJGCLckR{ISV8 zj;8|njdZy88d0`9A*xms_3E)xJ}p2E^%yB#?5yYS;Z(PoWEP)0^m) zuJnSi|3Kfy@_PP3)7%pKN2Tijz%#1PZHG8s17I33@^D*ty!%y1nVFSUMKITpW2|ya z-6Jop4;Qqc?zAgDLWf~OCc}_qnCDT3CnzR(Vc+)t=j|@UFWf>7&Kf0$pKJ5gENfp~p!1?VKQ3#J#uF@qMvbCT@l zX!z>w+V&`+hdgvb_V?d}{1HDcX63`5vTkpoPj$i%S#Rs`SwzarJ0l4K_U3bO7;OzFnEL)`U+ch9`^mKN}Phj?RVtbII*tr9$A~8NZR6?lh zgRZLkrBXw~Jt*Wlb!=&@<+3r1X{*t3?ao)z;bj%dXc1*HKlh72=iOBGg&lI*00hLz zxQjAFYfb)dO;N$0?qu^FoZq{GY>$0m)yRWYwsrcQDon(Vka302YM{V1h#ZLS69*Mf zjOS+}zP7$w$PF-lg`kspoiu^Hibh8>`9#?Eccxl{;j*a6c{p8CHu;GEF&c)sw5A(( zm*)hWyCNx))#G=`wlD5_`s?y|EsmP)YcW&DqxGu3jEsEqhdbNv$Zom)zCv~Pa3*8E z;$(B<_^)DC=M|67L8ao?kNu8C zA?e?@gz=ALT16{fgJd>S<=uj<`e`kQR?Y3WAS1*u=x(OK(R&-0gP+JwOgHt}dN8!K z#~c@u93IiMDB7~K0sH+`VC}eiJ5-=TwPq3aXGZAE^ZH_8r`=r+x`aPeeH`u9O=96D=dt`_f2^h5yOsvFw^O?r?BPCtV`sYw2xffNf*#-< zju+`!iE9P>@^*Ws-0x(p)Y;g($NVFm%S^e9ZVj$;T|?$%}pLk z;g`CiyR_Jd>~Nwwj>ik|IOF~SGrug%Ygy1xs)-RJ*ip0sz`s~#wPz?=wPviOM2rrL0?s)YXKpII;l zv(PJ)v)x|r)w#dP7($urHeYozChI8=Js6d3#a&B(-_vH5WxG#UHHFhT$-GJREJQ@s z&$2L}BPsj%SI=0NHdh*7WbD|QUti+up0>@L;$KIlnL8<93UA%6aNn=aUL&yr3J`MD zH6nU1eT@Bn#-2p@hbo`b5}=|}<0+!@^B+m9O6HowUL!&imkem>wM1rX*t5R{5IP)Q z*5R8*afV0cRMe^0c`O~vJZs3i>%)8LJO^F&Vh zyn-TUR`d2Z^lQx(KHNwkNIG^e!@M{&lqFrMbJdz zgR0|dS3s#8dF^gn-=-2-LfftHEe(+LkMDCUjYSR(8RQi*#V9QnVq=hd9V}h3)2RUI z;;YIYN^Yx=LT40peUG_ICX*RKZ#mt8@0@jXdHxO|dFVBy_IvSU_pHoHV?dB{^?q;h zqYR~(*Jz#sHI~TY*i2jnk^=CtD1#y2xwkI)xf_;cg3Ka`$q7Wsiev7Z%Aeh(I2Y6U zk0~A*a%;260Ly4N+~FrHwZX);O{0#{@OL zGm^?7m%r13Y4ce-`VkCW+m(i|{(Ko5r`_6&;}y6S#J~5dg3CrnqX+7hpu2O~M>5MR zGHgQw8Udd3cU@UMruQ9syZG_GhAph7k3%z%v+lpInC9$7>}T9$>!(dhx7RQX z98d4D)5dCuPdquBR_fNw#<1c>iY`1+Ozhfzn+Wa5fn0LS4M=inl)cZ-2Td0%tGwb3 zJ~`i|JYB1rDW`sCp`%Ur+0BTZY1U;t5dp!Q#KxiFE{FAYd{0$e1YV&Y;I$0bJl2U; zvB=`7d#8_HBS9r9v5XFf% zD$1?tRX2U_xUqtj;9li$0EBi2Q5Jh2*d5#jnHGv zJ#X85{{2Z~*m(@QQ%wV@lc~#-XGH05*lxgo_z2W(_BHY~m0zyAvHxF#_Cdn@H|{+fT(o=_i8bP5#UGS00w z^|?CkZ28dnHR6Fs=N|g&{w0km=%}$?TgUczSR!ORjO0}Rt|b|3+jbM(ljp-XAP*y> ztWX|X!GE^)t3b>KW~}_S!$(NxG3UO=;Zp5>&rR~(LqgXTd8zY^{dQv&=%+bXJWWys`}6rBA<4=?mn(^Y{&lp3B-Bj=inx`_Em>`mKbUxbx3i1!#8>kg z=NB1O#OGdkAM|OGR;7x^fCgp!eavMNsV zLlMpm{ab&}_T_b#gRiC)=(XMVS0SR?yIlL{2~7!wjR|!$fA2;lmR2awS^O(po867j^z1$txlFmMQJsgH*!E3@slC}H;ypsxv7bkhbXXNS%e zn{hkhemZ&zH;u2*1=ZuAy!zwyY>fMFawPYYs_mj5CYW_13be;E+}NNm4B={KD4)m% zZ%ROXb;#Hi*nK4X?6=5viVtiKdTg#dv!ODZX6vK<+gI9lgx8`AX9;i zbYX~LaXQMwn)?iHW?Q7j2Y5ZwtuP$738HEqMvw8~<|*95G4qxCK4kt|N04L}ApNsR zHOA8S^|dq?c*+;;Aing=Oq9TA-{r|Fq;spi1+52x`FO6o{i|JNL5WYpaForx*dWO z{(|t2*HAi@ANzk^T?(W9?i3}U`YtrPvLMfxs!pa{|B6pHQ%k@wE~IOi*?06w7KaF` zF9ERCaow28ptp08tWQ9$KEu2asqtGh5-mm&AFgZVfEf2ReSkh_)4quc8cq9*xE$KO zb*du{`C0P-Wm7INT2XAWvEZEz|%9PIT@GVtqt2L ziTF2jo5nX21gUHl`~~MX`sY{RF-iqO+rNDbs0j%nj-U8l=R^pp@N{x!H9@3;ePZ#e z{s(YH=PVhwo-FRTwGQvOol!qA#}}%sija7_yPPaEg?8%`IT;V{9L~*#+3G3nBTS+0 z3FbpJgycLAu{9#CoSrL$0uOtj$GKW&_a?lHq?!$1MoOl(>e2l=#eodcMRiEHx*`E- zVFjC*{WrxgY|6-A(DDlz>>jjr#9-Zhd+|c~0s=`}pJoF}3{C@r*T{-4paza~076lC zWqEK$j0O7#uL&QJ_vzj+4eR^Nsit3r)cUxO)o>W`a~z+03b|!i@g@jldxddJ68Ik5 zbe{eBmxTAuc4g1Q+vG3r&OIdq!JZeEL;@5ix_?~pfyl95_VK_9Q}F$*vKD8;e~p0j z9~rj)LmvBIvdsT?AN)@ldHyvZIMFf9DUqj*l@9Bo<{o9FAPH(;L9zKdKY%<~_;*Ig zpZU?H;%qMIftpcW5?&tya*>$zF{48u_{v;Rwe440TH1=OQn?JoP13kx*4X?faUgp$ zKtv;_f0)wU0{tFHvi+UYdnK#@kc?I9Wk_IhEqU$l`Wp)ir&^n^sBzEp)9nGF(}Dhh z0cuYG3KT5C7AT(2`akzdxIiD^TmVkY?@!DwHj(IrW1;=UR#VXBHSplwKuApjY3*2T zXn{+Y*<6>EN6Bb<(tx48+UbK+bx0=8FgfHs(}mXF$g?A(ld=N$JUB1Vubr~2h)nNT zDn8=WIX@a+AIe*aWPb}AMquSg1q9G{twJ9o64J(?~ zaP=H*xR&j{ZYl{I^vqJO$TuPFEl9#r4G;w=sYWPR;c~>M)hlK?$FbvfJ%Y5Hy;8w+ zjxUs3z6jBonI+;z3@|t;$+m%G9If zCg!&PJ8}3@rYzh{hJ0)8?bH&n!O35twRO55(XCiPhX>#BXkfc2g6& zVvY+1+~!^^D{-#}O|L=*b3hUQ!5A1+<6yVUH4px@3h`PmGXgKPMFCcmP7|wsXMS}3 z%di$jLO->?!dKR}bFwOw@kMb!Scd^HSqy5qBY5c*W31Wj+Md4;JBp8@R}@!ZFL#p{ z3q_23*FGe~(IHa}#WY2X8SIltB7-I=k znwFJ!$oIIyN9_sg`8Ri`vQ{i$Cq)Xoc0Ut+5JA)BVmH$6sl>f?TjU?KfZMJb(oqzZ zs8FI8k;o|i{k>KZD%k5z!Kw~-Ej34TcAe~5KQu<^DLxy|mbepE?Yx zTDPz&F$=PCn+M*e<5=FDL}iP`a|3%BvQfmww%0$tGOU zB7`zc>S@|R22JAvZJf2|RQ-*&iCTWgS4i97;oKLo4YP$cyHpElkwOZKK-Sy;F4Qt6 zT8o|j1xzhAK~6)oc-Gke5=WbqjHek$k=yg~nA<+FEUoYxD5MO009ChQJhJu_9rB3J z(`HCIgRBdt396Jnh+*{xWm4O^c4WM-6j0KlHf|}&R()v{<>$~98)hfg-co5QaE4`` zu&yRrYnMDj8zuDu>I$2NK#vrcVRdgLzyMm0EwgkVhgCbLZ3(U_X#}tC5T&ghPE9+C zmFFbx+nPDgN2tv06?j%_*)_sR2_yR)mJnRcegZ!>3+Gu}dc)Ln2mCe_G<0B=Y~OLE zNu4lX;pgrkDcau3n2RwUTvf5;EYIl7dj&W3zKqDDV%NHF#!H}#d6zN%gOGpzI%b{2 zB&g#9@*slP?nXfpPI-K$nGAC|ij(d&?#`|?o|E8H!b1f2@CP%3!c~hBHUg}60!M2~ zG}9bLsel) ziLtLEYDe4hw$r$c&xOZ>+19eq8CT$Xm+i1Op+qoU*+?p}P^Og`HLOl4*>z9gL^lIL z?;#Nxl@#Vrk`zw&CR?uiS$LnMjy;MwfvCio%KDOoin%y#y1CmVZGVr+&+q%b%LlaQS_hfDc$*2^J z97)gh63G>PC~Qnoeb=xumO5a4V|HS>2`4l+dsT|?+KObWdAo`0I3gZ&EH}5yrI@w& zDgp8-O+>SdqSn&5g2qU3>tl(e2C|03deyf1*slMF14H5BRW4PJmCDWdFX6oB%4H?> zJ+I`lE{2b|z;$AE4z!tSwCt)5yR6ECC0#o-CiSRz?I{rXfzzoy6HoTn@u#{b;rq}5 z>U1|htx|qh%3`8>JYnAjMzT!%>D^?Z%0SoOce&{xRbW3f(YZ;;Qq7^oMrxul$CIHm zAJH@3R7=A;URY4_;iC-VOxNEJfLrwVwe5BnVO#Wq`6(MHlKaDjZ@~?&3KCxy$>IhM zf)wNB-Vj7ns(oflbxqc{EBfT+_CT1T80H{--M8riB|v_E(OPaUJVRRI3VU^IXkyII zdNY8JX9wJ0b9!#WCo%$U>5Ry%AGB}at}kU81K(TlnvnX%|2Fi0mNm(@$HQo{sTzQ4 zjd%EHI)N8PSzS7p%HOhbTa}n@y~1@ybPbZRd19r?Z)P%#*=pvlk*_&jw;JPY2?jt_ zw0PRJ4!51SsQ_Z@@z{6?c^KuZaORpATdxKH>V3fh3-XP6owh6=| z)+OoYV@%{`h=C%m4(!*L<XJ@+3Y7t7o%mt;vT7gf0+_UQKC6@Pm@791}gCjhYUy6{%t~U)Y7ZKp5qh>Qt zA&>|4%MSMvEMsbI`*t%|%qs+^wt06*7B}4Y`BtBdJ|6)xnxRFr8x*{%(qVbY*<2p~>j5o5|@u5jfGmA#2=+_v3v z{LN}L?A`me-88rHY&Zg>aP#Wp!_@`J@?{nSWRT2Req2ooR_?qM%_Vw6$~VF8&PRJomt9JZsr%v@rQn#}`z zOWY6mznVMu)b>p~zJ0HvwK;z;MKNbWIAd6Ff1G-M(zT#!FVBioKXmz(kfoIscaO{R z@Y$Zud0Cd3NTr}=qN~_F6+iB}iorLl97kfBf*Q(^@rVzek{7ZY^Po4S-;9^@=;^J} z%||vHv#gT8pimHJw0_5Xw%fcCF_%hSL(`)*Xc25TOK6^`FdT1cjx-CR%#jN=%XGyZ z;?cK#rD^A-6^u>Mh$;n9_TLIRNRe-tVK;dxa%~j2*DGyNSJ%-1RaxPrqO0fMK2w_Y zKzRte7N{y>vKw)P^oLMJbnI>EhOPWu+A2{u(@Kc@15Aa^fS5=QOL#H)d+}j8^x%Au z?@~}gG{yc}f!S*%#RfNhT(r%VALXx}5!EOisXetj%P}=3ZZFTt2OD3nNZpd~^l%NP ztoPHkBUJ#mVcehctX12c)g`0?DF>SBxQL3w!Qy5GcVLaYd+{@gy0C?GcC7BHk4&77DPgMiE%ACsy79BBA;y%$`pNViB>om0>vrwcyW?To z;ZC=j`S;u1ExFsGxzFm1=$*QJ^}%y!eA0cTVYPO_nM79hr#g6?J615?WfpJ?nwn+;pOY5abrXpb-&Z{tSKB?po>C){nKbBxo=&VXV$9rsoJ)Ktcn zURK8Q`S|*dw$BOojX87)H##IfB3sJ3k z^c@bU%J;FE#B+QT<9SEa9@yLXgfp$`YIoCEV;;TBP64>}oYfJzV@h_S=%quc>l-WK zxWNLN?r5Eqd}O0WLgrpKZg4c^i$FMGjUtQ^CbzDy#)9BT;o9c8z7bxHVM)ZhUP!Tq zFq0Vo4;ROhfA9SF&vrH1I5IE?3-TEaLv+oKF6s-VDe}G}yAH)_$588OFDwq)F%L>8 z@Y_q^c&)_IVzq-t!|*9kWGy@3IQ`ydZ`H>_8il8(p2_~|K7UY+%W$>x^9i!d{x@(L z;=%d7Rj%^I9!q`Kb9>4Vacac}35!;OOSQ{7E(mMDYY*WMR% z@4w>#0Ii~qAk>NWRY>Ebk6-HUrC8PPbscC-Zr^kH^_gU@2dLc7vz~9W&RYS4ht5ER z_TLTqrDD%xt8)v>Y3?y*q>oZ0ZnT|?mZs!)b;+^XF@1e zt=SpbttQ&!mPg;0$s8w;;^&`FFGAk!c1EM)RqcH~7x3gaKRen;f1tNBfz9RIWafVQ z2sNtek3?23n6qly6~>uoQ2Jo&7YxWJ)|LE*G^2bp%a$LNfNAr(=-w?a;+2$5uuJ0 zEdQ#1eXXRjRw2H8UrhW1z<_{PVHYR2_0uc1>?msgHjWQoN;0&2(_b2VlzpGdd^7#6 zF8OwN*l>cyu7QL7KJl$mm_m-sDEu9=Nd$L@FZ8ix%$~A@gaY47`ATIqZKXGHcKasW z!yQ*KK*w*QHp|JmTR{7b7Nd>kk#n$bJZqx2vIEo@=gQ9p$(BeY6A6a@*fx@vbjSe| zQT})^)X5CY)up^XPWjPK%`ro^B8OXi4+}IE9kDi$GlE@2O6YYi3tgD9f}nrs&92JO z3&Hf)yfFfiSoR5=Z((SJML$C_O=17Fv5))6Eywef=x!2>&LGrLdEpDnhT;b9_Ls$c zzx^jNY7^!a<^lR(nUzlaD`5>zr^`Pr<@O50#xdM zxRSl?ui@5XAm-4X@fg*3bUj_s&3*R7fyS^8s#1u^EmzJoW22{-gbm)|-AL}hq27xJ-JzO&vk+KN45M5PU63KlpuQ!oi)zL#!ta)|3N5)s=6 z<=Fl%3Fm3ydZsn*aS%#y6NgTOG?KT+Y)>`BF!*mH1O8?Z>#UpWdBzLDWa9T_LH2QJHP!ZJ?z zV$zq35ADZr3}uF-o@?*F3?SIJl-c}8eF+aaq#S33r{DWH&!4=T7JV-;3oWr2#D zf=lkQRh2RSme-C`uYrEKlln?sk^DUs2dW8I9 zAdnD|J7Hi@5=yxe>Op~@Ti+E?3d<^>eTB-~A44^%24GKHD1qIJ1Q0;_3#eQV7C%oJ z%3bpte@@6Ay7r*rl8Du)nho7yPY_j9mRnNlu4BpFB%;0d<%RAq#Kv~ZFA$Ro?~X$| z@98{T=15F_f<0!k3HF!_Qskk~Q>%sI)GnM5AhFK%JEL^3%@>cmGdhBpuKm80j_C`9 zAMP`6(-^R_|9`%!tBA$fIU5*Obp&xNVVKquzomuakx4=;%+CO^TC2te583R$+}r_Q zIr?jXLoswvpB6J_Lv*A1!Nsi}_Zfu8$yIBW_RGGKYo_{O%bsEYu#(UreOjX{v$Pjr zH7OEQ-AJZ-cdgT+zG)5Ni-^FsR?^sx|3?9qWLjFf3Qc~TjK9gI- ze-8f<9R6WVjYyNPOusQrOxrOnOWUFYVf|UG(aVhu0UCD;3!~hIlP+RoYV1hp4uH$? zN?;J2Bl9jSE0YpvxRsrODwq4z!_l0=AT-zg>G6c^Tr$D(olEX6Lj#j6W%>${*k7P)hearcqbwA@l7Mn|aC?1!Xr~O#pq*nJDvyhX z)@c3{N0g*tcD`K+(HU&;jCPj`iKWj%M#%r8QW~U?(|vnOf|pJGb-4w@h4$64L1_Pq zPZx|J;qod%WYPwajQ3dNtXXX173)XW6yFCXcUg^rWsgRbg8{o zyjcC=!vA~V;&VD{9-+s~%*-JjtyRo_hYz|P@AZNkC?)dpJB|>ZF_eX}f4?!pejzJ` zJ=?$ecD6=dCkGKhTAHD#B%v!0D>XB7KYvWgYJR*l2B%q;{4no#dHu}VkILHLtKRyo zL*wP+sk^Whi{%6*SH_+-M&NkR=u%yKmN|L}2VkcbH4w zrn5Oxpuk^42zzSac&UH9&-46e8iB+{(oR4E4_(7Q%DP*DMLf(+Da6JGh4ay^F8go? zwKsdMow`?OE&D81U;Ckp@?4b_Lc@a?7>8bz{UpseRcS%5zqL?~Bzg5^G2XEUf2=G2 zki+&@Ceo@p6G%4QzwM0GS%|Tnud-!#VWKzPCo}l5`lqia%=@R@@}p@ghgobBDY@{+ zq#>t9?JbT00%S7S-JhFs80v_+`pZaWcmPUv@E~#L>M`hwglDO?H_r*!6GG|UFInl! zUr3U?xH9lTc-D*jEmEh-8eVVX@Y*<-p`yxkxZz(mEkAV)z0K`Gi30n2THyPkVLG?n zj=d^6JP7g82dhVAa4;Ax+B~R78rg80t(kz%mNreqnD|1YhwPcEi+Bbfk-q{htx6#u zXt}jD$?29nbP~xQ^+`J%h`>c1W@jpmXc7o#`ZgizXKK)7mqc54SWZWFK9JWC z9ULSjDQbwyCzmwly4-@Yc@dPKA2niCL}y5xz?W0lxA$k2Jq+rinC;!Ixp6(9f}5L( z!@Igj(Utq{o`qct)lC*+Z#}+K^qf=_rP(v5+1QPHOQZ#T)PPmwU?pAV>4~rnpT6(2 z_$sJOG(D7`zELog56&iE9hgrw^5&u)7N~v%d?rGwm@j5fIJ^s=JeJbVuz6_!hoHkc zYj6@HVp}S1u%IAV60I3VmQtySRU|?5z2F@dtFX{TU!@}nqqzN3BqLDJP*z(`#y+>G z*pWAtj7kz!Lt`9jnv}Kkq*)_(SZtWEE+k_2;G6xEzx|E83c=pJLh7^U<=T+Zj_bR? z+9usL{hfcbHM#V__RFFn4W_dR)*pF$&+q$T2muFMi)NbT2ez>VD?d{W&RISJ={U7S zk)I79m6^x>roqVa zU-a6GxlDV`W_>?e8BR?fsvfZ?XU+0#a&kH#Jf2*1pn7{(lo6C8ohOn-yPfZt{2dA; zfl$D~iSK*GJA4a{<<7+6rE+E782`k1;M`Wen;5DHD-Qc7a_?~k9eGNc3Dx;(<=^3RweUJtmTJodte#b0U7ZBpknObTz7OAYXzQ+*% zg(k*$?v=*ZWUt~;_0*N3H}V9mH4zr+0T~+#EyUxsE?NQZk-4mnbV?^rxS_I7 z#T{jRN4M8OvYfQ$Z?%vV_$G=MNX<~p`cvjv5v_izTsnRhEiI9n;?d{J7gtsu32vWT zkiwtE?32oCsPw4(6vGR%qn>-dp-G{$e266!7sHLjaN{tHKnjutt^0235nD=w@Z2-I z(NFmE-$r!+U-Dp8RYT*B)*B!wCL4^bnu|mU`HsrLi%m_O(zp(_t;TuLn`CxIUZ;r47}x{E?_8t*(*Y?MnJvkam5H`hQ_I@Ca32$Hz(xTS z%mTcA%M>UaI^R;{7>Xv%+|?5gsnFY+=S&l;kEOEn&rCL%LVW z?-vRwABZ)K5;74$)1gvX62 zp6w0JCa&sUcfjJW_S4LsTC_g_-5kX{>kjY&UslK#&1x zph;_B@`$hO0rpVc<^Kz^2untJt~wcW_thPrzaC(N={hd#E!8X6-AFsZZu7D55%yP@ z8)NZ4_~9WXFukx1>N~O07xwFgdD!6ox!j-n*w(S+`>?)i-B?Fcuk{N;3iiAIbFJ#p z|Fsij7MF2G|MtiaeMe?pAexHvYGDZL8`!@f4h*HlQt8SVE`l(?RRWfZ|IL4gUlu?R z+^_1=fyYrvFyuEs!HC)c1sq3!atSnr=%QOCojbPC*m73lkh*8S+{)T;@NTDiN+d|4krZQ6l&wke=%DZB&#MlPn7A{B&+q!P3ajqBmz?Q&ezw_O#AA1np( zJga8NN_-`e=(}+Rm@SghF~d;YS310;$M(>eQR)N=%*C<-+3FQeHftUxJFvIMkcLmT z=6hp<&D6!El&^OeK$YquYVzIvr2s1TvJsO0`R|h8WVT(XF@52#H{>3^NG4aO~DUM}I?p2Up>zLG- zv_ek?D{k;Z*nrAz*JivQ*3bxCUHSKP*`R(9Vh7yd;ZU83{tPF({YW@LZ;dp{+FdJy zWNh)lL(?RqvERS$=s#Eg;Fy;!rtAuidEcdt<~U7fDjq+rD-u`(BGeSe2D=_S62*>} zF#Q`sa?>jVFxyZ-H+D8=q5Rg+@EBB-#5-Tdhjozb9(*Of?D%5cr?HKT1vOECcIO*| zWs^@Ap7zQw%eNq_Ot}H?&46YU{X}Fr*I+&JaTzmEGR-@Ei7N^b{t?KM+lE%RQHx#T z8Y3z>TQ|#smQaA3_f6a#p66jE;D_l@QchEX=S~C!HD?uT5`6%jhNha{2uS6&A4u}hzdt=2eq}ZMQ%Xx#LGUtw z&R^h!ri9KCxB6=JflFILaboSq&ntbkEgp-d1IIO;GX`&VTtN-4;LUY%2FEH94$5S* zQpK_S6?^@y;M+XTZ!*qgREEcTIsYiE<$C*k=EHqOFoxD!=b#I#Ha*6I0Gr>71E6Y9 zYUZ#OGjH5;$aBpzKh433n_#okG*v>QQLL?cs*h6fFCG@9(%=x zb$DWF7P|^Dj|Rk^qtmd++{OLiWl|lZn~l=8ubZn`vWE#(SNxQBp`q#crb4T>}czdQ(B(`5~ znbQCd-uL-{Nkc2hYh$bQl1(JIMns0SaXy~lx)F^@^NY1eU$qIwJ_%|KEN;f$ZHuWI zc>a++1jrYZRo=#@&K1h-h5g_S(tLB=b=?@a+mJ~w)5KgL_~Hd zixV8v7+SU}tlWk`Zg*}bU1)Wx-1Rsum6*ai^~nK|&7A=91;dqtN*L`Ux;J&b+b5J# z*F1vL#AeU#&FtTUK(w*@Kdv3@PIFifbI!R_M~HV~+_M~DhB>g>tD@tmiEx`0aqwMU zx&#p>j-L|3qA1Q}*7e zTXE+NB^O<6!mdF^SfpWFximD4%a3TEU4rQTz;4kAnd`~qHaN85vu*TSZ~V;Xo`eZ( z?A}^~KIXF=8Jf&``(2@4$%NlX&lpKpcmFfy$~fDC+PrSn z$y#vUiYoA+8+9nC2~Q9(e0{yB!F8XvdY#%M_z5+mZ~Z1SWCSSpY*r=!q9+}y+)%sTDs%I za(tXo)^SKZ?8kf$OX)_CC`3-c9)oF=QU-BBJJ#cwUp)>{r2g$%!iwR?k9?3y8Z$Ff zjqILflOAgfn&E1Rel+gqDGXLCX@s090Q@j7A^*M-_%o%rK9ayxpr2Tw# zb=48S&T*)}U$1%Fe-*t=1(1ZVh9Xx^Dkb{l)dhCZbd9Q@eQ#S9$fXogk**X$m_8FnC z%)0CtS;?(jXIZz&qig)jNfT>NJ@Oq}LwgT7-q`Ofbm40~z!pFM z^QZp$r{VWUFa9Ag`BD}lnWXXqwXluiq_D$~I^ImY#XA>=P%7{hBygoEL$Iu_-tI7! z6ujYF){*jKB|~qaRC*zvdB-@k_-TW!bDf&FX1vtJSLCYyy&L`SZjNP;iCNGhNPSz- zu8N#kNOKheU7hoBgfvmBm$+rI3SX$dqlGFqBI7>&xsiqnW|253u!bV!k(a3UCoH!`{4{>Dj;Rfu}KkQTMgLz{?v zx@>}d%{?@^S_!29uH~`d*leV~0t))F#XPtt+^qA^$>W~=p|yLT4?8P0<`4*f@^QTH z5I+}qi}rL_EI#Q0e&r)>pgCU$jP@Y9`=j+AMChE^otdBHByQbW`~oV9X%)}jYV=_R z$Zqz)=hqf0ZKLMv&)_qa{y;jE$yBH2p>&x=|8jDZZF+ai&zHBlqAx_%BcBd{ZpFGI z2SKV+{OdTQ>?^_)67sSm>p7vJsrH{f3OXcGbzP0)qao#!?X#~lwQe@qLABIF0>5K`myodyE0(Qlg&zD zFD#ROqF6pSL|Z_xtfb7sQh;_a)aARSL~POSwz)5g&1dW;je+L)&4|)4AJ|1>KS#TQ}Wl z!p&o`s*zvApuWgYR1-PZ5UvtfHlREq~#AF6cu zw{!^-JRd(4e;ZFF=a^5QFPykbZwY_8S5+Qr+FdK!qdWdfG_;9+W%qjE8L8btyGog7 z&fMYG^RtU5f!D;lj$oVnY3`dI$F2GfYWECl*O*E6RHY?-@Vnts&wdO9;2I~A-Hl<4 z(px1Nr43758P#dI#*0`5>`jR;-Iozamcy5+o zFUs9CX&XpS@}${Jq-FdO;t=)K;cT{W(b+SGyX}w{Ny{xzjW@el+j;ojc^U+Y;AQSK z#%>*ryiH&eZPDP9V6!OMXA=FnXl$Hq;Y7a~Uz#LI$V~!QPg45z?OQ0?iH=U8=3g!$ z`q?s0a}S?9l5CNcE-K+fTJ~1w z=#b((#ADqjC{kuw2}foHkIiT<)R+A2So%}0H2AmJ2T$li*jk@rL+Ee$chTl`hrZRU zhPvuQi(d@cM&%znJGV((kxgJtY9~ixR}h&Z=ORt7RPXH*xbOWd9J;7EcBkx6N#)}L zYiM@%jj^}1^nl{fFBDO6VSWmEYSDq=dH#YwL2M-srJ8|RQR;sev*VZ%E2LkZkj?%w z9O?GrUX#pycA-0x8jgvqL2p!);~tL+%Rl-(yZdYh$1EPPCi!YZ^uG6p@}7>b6@h^~ zLW%BW2af3&VgVa;UFmYseNut=7`CuZ(KnD8qKjotrqQ`$1r(Yard&Bs?0&597kD&F z?hY|Y^Vm&N_!Rn`st8ai*VK-PZ3BRul&4uvDZ!uYqqIER0zfc82nP1o_Zr;FYCX2O z17b}=I1|&H3F>?nuJ1=BUf~o-n4%`$is=dhbtv9 zD2DgY%pb&*8vJOV<6w6<3D8uMMZD9I9i_?7CNc!ZI{mNob;v^WdCd>9c4^I<86H|J}JU3;uwkGhISns}q9OadzOia2} z)@|FN_kh1kWFUKwfbd@8yTr-MWD|ykFUf8Q zE}k4%@UM`Jy8P-oJ31;y7F(XK$(cTAZms1c(I=pL$JDhmT2tHc?I+tfP|U_&-!3LS zz*hGud;E7p0^^&Ea9O<%Ao^`D;5`7Znuw68)Ch#--{RRPLGJ;%9~>+!yd$D<-4W5Y zaSzjItU&6v(Q}*Lt~QpXZ$48cJ9^lco#q)J>dS$%w6Jke%4Mj%@5xJG=f2#x0O~A2 zFIs~x$s`#}0h)z|-eN#nlZYaDbql8W4Ow3928X#ok0(n!KS!Yo)VTWe4A<`R)>D@< z)~x-h;$uo>9LwrZR+;$F&XBJR$MJU)&g;we3sFC{ArAYvMy~t&zzR?`%%^YEv{JMC$q#FpaG*NIRC? zK@ZWC)fBGWV)8n{`%&{B6gb4f`&=sxD&=mr^Im1mHd1l`P}vX*m{++kUztQ5)}01H z$2DXcn-IYb2GaxhBfxED%S-h0N5Vl1*(Yg3f&R`r&uL^gZwM#Neu{%=67Rev&&vBQ zulR*CS-Q)C+)(a&iby4|v08f=6YflB9jU}&w~E9At|*n$Wn4Xt)8Wk7Q}>U@psk%C zN;)j~fqagW1H_EzsfWJLdUAK|49@m=MG-n~8_)<^o;L;kL^gCHq}L3i7!CJAMv z<@{$9@;v9(p01dYQ5@m!eAx(e;pS_CI}Y3nc5C8mn@K+wF6G!T_xE(_ONy`ywKnawlaHm{Z(!0( z>-ZbFKPD{sUk8wi{4)DQL>CG4XVLFY__=17@pY|UUpA!T5BDDiZ#w0Sp65JN;o4?WriJHs+>=pZc*Wl;=C6@l5 zCR_d;qz43|y6zr5o26IKzQXe6FH-@&uHC$R02s&c<~!kY)h^Y961IO```Bd&lYMOb z=jrA^h~NXpf#yQZ-|x*C?aI9_p_qzC4F*G3)BQdGKrC2s z@VlGP<-@-^4{hTSraU9`Tz+q64JrO{`c%dXq(J|n15)G|7`Q$YXPhHXzxsX7Fud(b z47C1SdZwhO3N+@dL*wM4Mcf@)%7YtW339ZuUGqN^GPgn2U%E_hLbO4i9ifjbl+YTj z@8-e&%isxx-&1c8PiPeg!k)^5%EjhMq9hvqb=0mZ3TsKe(*{YN&Y;ZlRXP!CME<1d ztN4+_r*s{m3TxrwntJ6M?M3Hrc~M^%yT*q!{-HAc^M6!tN|3G)8izWTw6gXJfTD`KapHVa)t+i@~Ek;Ax*eoY2wrKBJDqs^`?bWVbl>>#td} zk*4d#Z-{K#Pq^9*%4P3^#)XTE?L64W-+XB`?3W{QK#`e2&{k6X{4SELbAVPi z?<9#Du_*B{2r2z0dah-Fyyo`O1aOoHhcz!CD~BTk>^+&^uDwUyST*()k6M#J}yv@NoCXB zza;iEDS1v`Va~7XG2IdU!aB^Q`I#079$dDUHt~n%cme1-BMxB zjhTk%b*>45IVZYEAZ%*&rloDRlOw!E=%p3mPOvAbNiIu-YKlJkcgwVrccUE^xuo^0 z4TRt0#@X%@(lwdAFlGC<*2DBBuWopobs?rl@o93Vb@>4>>p6(UI!}h)>EX#|0TH+4 z>G#8SgdY+lY%jj_zaqvFeMlFEc-jbd#mB6b2~l|~9;(mltwE^SeSvaW8nu~bOvN%V!9tEyg#(|r^jH$p+Ne(Aen zXIz zlx}HoAyCsMe#mj0ia*%HTD(FRv^ZM5^QZYKK~n6SNJzi`l2&o3u(#u=Kzx$mK$N&| zkXS;kFxtBkJ#t$5WSZhOwosOs*u{H*Jbh@bh4JSYD7Eleg-brDG#P-E$JEx=g6^&R z0?tSs`03aQC>Ntzd*cZeTqr}Hl-A*FB;J_%aymBvokUHpk^r|{Q(Vp)sx1;U9Q2Ec zPPjRzB)t3R$y$d%8!yXRipjllcP{?5(J6AK`+jjYsaF^o1X31$nYbcCIF#t~;{GQ2 znzbFv{_c>)cMxpP&sVW5ezZV!+F$z4^XGwd*Bzo)A97;D$JW?xM`7}i-b-KCrm`k< zLeXP&1rPimObP$F(v_xAc~HJFH8Gnh0{LyziU`qNA`L?64}Z{!&(-nMJL*TR*pucO zu)1RskK*UjE}5I2xGO!Gj@1+409{?=#M>@lm0Wi}{~16dxG89I)&*1v$x%@Bdb0hF zaT;Rf5GvmZLiSq3l9E9Se|}i~Y?BDr`5kVzwj->$P;0FZLJNm3B*0&XYI+%}sw z-PMcb5TDXq{#1`oOnC58-3sL0WWQyp(0Hle6(`K^(^WE|%*nDKmUMWP-Jlkr*Jak1+S_KRJ^@hDrg=tXxc6s?8!zr^(O0o zuMDi=PaXKx5u{cq(Q^XSi3DvD1=$WpRJa1ZUjMC45wmj6%)dbXCp zmHPii9FP8Ug&+Y{obPx}9ln}!4L}O2hZ}deIYG$>w))5%73S-O9L0rvHczm7QN^;a z?{zqCg<3||x*x{Hf7aXifAD(>0@}TvKdGy>ILfDVjmkI_sB}i^!kQ5^UpLrc1w4B- zKTuNyE%Yps`ys-t;y^P`IaXu%;xI}clL?xmVdPnVCX9A9#gHI z3O=_+!{n%SVSmHLKA)a>{ZcKEWdniX%b(eOd#Q0x_52@*tuVt$T}k@*Y#IPMtGuv8 zs6(JKbYeuO?lEAKbqKwwDVG#*v8%T`{SNj=?xvSkEiGDScz^l#6{}?aJ6z26v_D6P zpy^g;c;aK?_X4{zYKnZ(V%;Q3>{<{SaLQ1l9!;WG{hoy8ssLM}E8X&e5^JiLiHi>3 z-B^Z;9**toU|ELh2RAVK-9Q;aeUJ8=|7=VKa02Vmxv*jiK1% znZ570oIP$KA$qR&TO-sl`kN4yJrTWYYnnRyIB(14YSWR!xI5L+T5ROhBs*L+BMIJ8 z=?6}4dqK0eXrm@xwqRFBR|G}-yehmc6-*xIH0!@ae~>tij7IqVy1RRWLHBs zT6~6;*?rTvxTZwWPfMHqYw~Jxapj8b z++3^UfGK>jZdbp;^h=&;nl0emr0`)y<^r0UpGmx0u3Dpmg29#Q+t(S%@K7)*^q)`*>$GuZ(io-eWr&&qeKuwAG-jW7Qd0#1g~DdYJ|ay zzm(bB;p>^Y=wH-RG1tQ2sjXSl5ks=L`Wt@ZIkzrk1ody|*)K6AJPfo{b`NgZyWgRb zxLp+hl%m25!Gao!9FN^5zs=5*zcu!FlVFMm z{o*$&oUX?Pye4(@zFzyCk`s}$Z&vRuV%S!$maoO3np3`ix_(-6TU|uT zDstok^Kr==`ua9+FV8_O69<-U)|*%EUQLuGeh?QLR+5)BWNewiq);dH$$C+tY|PY% zQ_EDHL73_O)TFbIuhrOFbmkV6;RCx_%1FM9UC``yDxbb|sQG;Th#8_>U|gMrEzEEs zdEq7I+gjMX*6xht&^gp@fNRS%smPGT$i3b72gWTCDYx!>5NqMR2>>C_6fw%z^Sri< z*?cOi-Gb{!8UM;_o&0>)Xb6>jbp3!~etjDYU2FdBkF1Kdt~tYbTreN*oH%*Oj$xJS zawOCNtlu^~?hk$_EQfH=%E7lKEF7K$K*ir0ls9AT7-ptkX8cPY% z3~9@lo7;DmBa>_OVhhXc-P2MGG9LT6!spD+cwun4sfAM*BN6n&sWjQ5-fD%#fyJY6 zG%I#oYqYf*b4-|HXEQWJb(^1xcPJzN)eM;qUp}h&Js*C(s$5WM z*gDlNavjW zDoooTEEe}FYWzCkz0{#sQDj}heOX;Zn|EbPm0#VV?(w-)sNm-p6${sWG|J~*;}!a% z2YQ>%+^$)vM=vg56~>t~L!a_zlip)(&H9~TMZZ^ZaQT7;q9$7=zIVFWOnuWjUgy`G z&)b)iX!cv1KE^17w)ITv6hGkQWR-Z(cb4fKUQeQ;^4?gausX5IOyF2L+g&p&DQQjbi_zRq)QLj zESp?apy?5yo62OG_dF1;7P;P${()%Xi)i~wE;`v8-pHLacFaZm$i`Z=IdBj4T;3>+OULE%_;v^mfBJ z`s1YvZCB=$_EzUzMpo2EspLjk)W!>-(G|Q@QPw!*Qd@~X%jF6p?JVrk9?Hn`+`1@r zn7M4A)!tp6YkOw>BO4AuSV@=lqv=mp<7J+vUWwC@cegV;kMl)lwkweO95$veYa7d? zj|?Ii=VX;T9rE*(xkl4sXL1fCOt0{RamikBB-O(#YolaYfT--kGfBHv}8hvK$ulIq>f3v6MXw8plZCUt5~N#hP73>~UH=bAi!T>`?b z^!c;XxjJ@9mN2@$b?Wvh)>{c7S1hF2cQbm+<+~(EGy5y8AdjRCnRB_WD>nHyt8tHWMF-19tQ(51F6)9GOtt-T)EsK#S$GuOmM_pt%5y+} zptIhPnR4gBDfe{bdIh3j-UlgqBSsBw(ch82kB2ykR4^58h7KWev078+o+nOpK6Oeg zsD+clK%R~$g_sBiq8|yf*9__XS`)d`d~9hP72&&BhXxcDc7?h_SmDGDy>Jo+#VLO+C@cYVe1z z*{>O1@Gm|4N_Q?Tpl~PSk0888ruZIdd_bh&;2p2&&v~$uVB}3A!ECI%++yNp0nKDD z1KJO9m-vryc6~`#*~#2MANrx?0gKYjjq;!$b+Q3B0V3Y0!;9~>!%846B zuyWoy{CBuIU1!#^ zX?nEc#zvlczHS^OOd;OX&8@Pb(uHnEdL|lfv%YZ6ca(6;N^S{#mQHE%=@(L;)T$^O z(|ZVM2Q+`}R5=amUrE(cvtkadr&Q*#X(_=+WC&!Px}CgGBeJMS^u87m&R48P(b!fe zG!(9Y=I5m}=CU|rm498>JT-!64jF(9Bhp@(uH|S$H=yg?*QUJMA`WA=-t8lWVo9`0 zT=nZV&@Gjrq}wF<`0r)cJ-AjE@mMV}<&E_8*!-)E9ZEfR)tFDt78a0#G!LW1GHE9y z_qg!2v3OUku&w9~u$8HUeM@PSl6mKyPq|&%qJxrw>=h{-eayUPdAqJ#dFfGFQDmO} z7WUx=$C_<}j8|yK3qAR?vPA3T5P3f;OxZeBch0kd8H7od0y$iBIElr~FZSp-JImTAm-n|< z7sK~91@CljuP;Ke8Bv0TwZvzCP&WVBB;xA*6&dqND?wvKfB%hhz2VDGbvvoyi^oRK z?rWpv{28(r$d^Pu=U{aT(;^CZ8{eFjm&8&BILXKnk-fv>MM~*U{ISebCsd4q* z?PNmraP{AG65Ifl0E3J>LMfbzpo3nMQ?(PXc*(~s{K@EC!>s0iq==0_Rhw8tbw$uagOu;MU7?JS#SNCgh>x?p{t&NA!TPEgfV8H zA!VCWM1DEjzBiixB%J;wu$hFvGGJ|k<7oh3Zou*I`hR{g&QlFguj8>L|M_kN9W$j( z&-?7SqqVSpN++V)p?(qWiEvF%{$PfF9(75lFvLqUC(xLe|F3!w)=U|U<8`+9cf zJPcQON}=y_YhVidqDG#6hIpsDJ(%js9gqu0Vt*);Jo}xtYl0Ch>ZLnjG z({zng;kRNH5wq70!xa2l%#%DaVka~SkZAT3&7XYl03w?G`DJq9P{}?kOw5;um6f%X z(DlV6#n1)g2bx(NwSd-{N0l&ar4fNv8H0gwwp!iV3c;dxIvP*0jUBtYj*xU1CpPT# zDC{Uz6qEYT4{jXoiJtCNIV?!1VSfS#&H?DTZqw4TCjm~+7bk6hu_#oM4$2KmV&EBl zcF;Z?8$t7hr`Biy|M`?^@OmM;ego(b=LWmwwlmEZ zy=_|>h5+dP3rct&A9Z^NkpvqN9?ar{ApYrxoqN0gQq-RD^il_UEC_)8}ar;BU zbim(#B+LN{=#hvv70GajQ;dF)KM{8%>Bn6lWpAes6N>o5Uowm~grni;tGjC@Re+txK#Qdx?lnr!P8R*f>P}Z0YoNymw&E zMHRJKEwg*kHzYPcAvkVvCR~=>K}f&s10_0eefY1F`mi17bcZ4S1i>XO3Gy6%? zT~9Bs1w0Om+BwDV6xY=y$XkR2fZ0F&2xedO(I}EB;<@BZXK`#C%d)Z)7pH4UA@xP} zX=d8;XvzePLSL&+@8R;`mhN#)tkr!@kIhBPxvy&wGX)8Ku{YV|7AY=yu6_Y+f=(`2 zslyvi#!L%5IJ+~}ar^KjoxxO?w+Q2?B8lMOAGVA8Gn+~3v zo0}iU89^RdSg>P^PXa(T5YUZI^9D)z8QkhaL=}UJ`jN9X+DDRz(Kx7dA5T)H?>26@TB^Q%1 z@BQkvd~#zFPvi!GbL#q$ipPh`A}3WTqkj-lMc^GC)na*;Z8)>g=iKIW=b0 zequtWqhxa@;yK_7g?WhP3Jf+fzqhrs<_9Oqc*GKwNP~jSN(Ff*bg$eQ>k>V`KsIDr zj+JAY`a-lR`Bu!=MF_K+isFUs@uCPlWgJ$2q>RPr3iar9T9WUFHIiqB6;iI&ge8Z% zl?;x{>10cjHa5gl-VS}Cm|LRXd&qdVg4e+_#FEiMygl40Jc_y0X20V|ki57iV4Kf} zk%W0=z9meMjf9N=AUj#&(YaB)LkjV%nV_fheHNzPsgMy&c!%+QmfPh+b)>$kBccib z+1oLemm}APV?Mwv zGAbn^S0pTk%B-;#B;VV=$xde~Ps<6~luT-rp7jlpEiATZ{D9*WX%wCtFx$B`B`jG2 z8^Y>jPI#W|SKpRKG(OfIhRB`rslwbQ2eF!dp%sZ!SF8{$c&SkWs&zpxsZOCzf{y7Z zHqh~C{Yy=FV8&jzoSb;;Gw&S*L0)l7gs=gDiQl`=_9X&8|eRguZQFR8=ko z59N@^AEn3-=7-X~HI`eQ%PT`rjOR2?3Ql*nsPI4TktooSxP#D)$gFuVM&CzMs8)2b zoDI%vp@lhW$s7F^{#Dmeq|w#pTX}_gW8Ch$%NjH~+Pr7nO*#{YU!xGo^Dsvq0 zA>1%3GjytI+VpnIQIMhS?PiWC zSa!@qkducsQ1Jo`9}Uhk5&y6@44qbqfo}mAYe2w)dGs{bmVnYZM3UCy!4=XlTH(9; z-Y9X@rijDIi^FdGK}6%YqKxUsoUFO@_%JnskorY`yJKb<~>1kVl%z zc{W+sFBQGtuE#2Q?|97w#Z1?$vs%E$qouLza#$WYv2=N2W2=o#9|zus0!?#^3MIGX ziLv_3)s8}O`A(baWQq#Y2`6JtNF@H5O+GxCNB##wr@x+jOsjUD)~)FxFjt>K(@vOR zyG$r7FtIE{bSKSpt#tS~y7orgL?eaO7V!wuU3zZ8WJU%iZqW$yFnwE=t%T`@4ZvRM z&b;eX*^;%$}2@ zSw4E9*YXu~0w0BatvQrNylvaz3-&>8BK zemb#Lg?4uKF5gji`BH#1HT3lQGRi#qVJ981Ryy1O9k?U%4yG;~1qBXolNO*keL5hukFYKjotlp0u}n(q z?=Pf$4o9be&37TjD8Dx^Ur?bjG87Vbvt%$_F!DL#ATPiQvb@(%;W*I1u$odrot z^+yHAC+q zG8bxyE}3l^^mR%;b$rs7u+4fMvm9?X--xR`rBoC-HUaGyk423wEST|_!qXb}3h0_k z$q;mhT|A_vO#fR3!~2tCLFs2kSZvAt{8vwoVLr+|XS~M8PZtI@!<4p;79$nsFSD@G4{mes*~xBJhcovrN#$Zu(=pRPW!=#s$XFcprRDQ3U({4!z?RMDYu|S4#hD_%6s&uON~IEj|6WI6d(A z_}IwS3zPw0h-d#bm~X{q4X#s{=%>BUS(@i8s&rvcu6>^aCOpl3-+)@sHP8M01k)AL zsYL^rl&vF}4`5bxW$eHE{0*Z2IjM|%CXyFP4e8b%^9emfSJmI72D=u3ng7-)0Z%;m zFTtZ}65-MI;G^}ax>4HZT|b^BlprL^Mr20L{yXuHgh6h8cr`m*5$8&7i7;t7yjyTR9AIa#kU<-HlNH0e1DaoZ5YFivmwpU#C;HqF$79(FzA0IKZIo<;d zDVq(O9Z(~BK#0gjt##t0@pt%d_3nN$7Kxi%E&h#Id% zpg1RvnZ4%QGY^QQTq}X-p0LDV1mwr*u$nDP#9RHD&JSibzd)kmj0Ta{_rc-g?~X0x z9eaP2R~%_Ia`VJm+huI)aq~Jo!N|Z)&JvC8{%FK+G*XhC8H1V4o4gwO>LUuC9s-Hc-D8reo>SA`Fkg6HQ%Hbw+yM$Z9DsbyH0z5YwmL(k<+)1m zbbzlw?d-u-To#8i5IV8fPg^R8t)E!uxWb3+m|=288+&m*E6;BX=1gKzP9n& zMwPZuPkC`Zgw0g-1_1_jCmOnlo*Joo6#r;`NlRo z0wYC}92h3$t0zkv0Ab*+rbyFCu~r|VydU)`48;DgwyRqUhuHG9M9h1n{| znhGMO#7YAFnNlHwn@3tR08qP>uTo(<=_7gB#ppm=nW_c_;e|&mVWxCU6cXNFA|Ig_otR|BC*rX>|XOM3G zT*UOkB-?!7zI>8v!=;`SG*AHEek49a`?$0pSl zWzOt9`!GLTn{a^~@c(298zhnYr{AOp;TQfvR{e7;CcOQ>B$xhQeR(kjhC{&EXn%2M zi?kSmg`59HZ9P>`HvL~-++9|AlJ*ud(FA!vW!W|*U{w6TP!xsrsO=Wz3aFX|FNa?H^d1OJ zA(o9czggzDjI-DbLv-LFU9*;Sur+Qzjev1RT^tW2#5O?&caCu)DF+yrEziz|NAeK8 ziGG723;RdA>cBfRa5*-BzC>oEkIVFOlC)dV6=dW((KV>K)%it@8#QKsfc7u1RMyxY z+_oy)qg6p@j=Ksl>~$Whsax&U#bl_V%XfhZBg#_*_cWtwMZ+%NR+ImE2v3GpXz$U1 zmbX?{$MKEF9L7}zj4_iGMc9P(_J~i7MnZcNHd)>W>(5NZ<%C;29d~ogSdNWY$enU| zqRcA@3=9153jZx*roFvfc>JAQ{mLoy>;}uRzyXWtgy48(u|3cqe^DmG!SKmpf&N6B zO!Ny21Ifa0usiDoj$bkM&=?V=U7#N)CoxNPbmY;buI8qjfuePL^zSlPkaIfimcxHo zg7D5wvPd3aj{)^qSfI-??y6sW3U_IYZ@f7o7Dtsk<(dyah%_G8Ds@Q7*gEXuM!ekRi&c4QhTf+oK{_hbwLpx8Y7#X}6D8*ueWzw|QPcH-=k7>+ ze0@pD79Qm`@9Z+Qz2IQRaD5{1sWtG5b9&wO80)M?Bl7qQZdczVZ{z13f_fj|tPez} zed^qy=)EO$UL<<<=!H%)AB`2Yf*<3`l+b&?@x6}E=pw?7p~ypc_9f;gWsJ%{&=(Ygl z!n$bP=$%Dc(YlBW1*s=VE_m7(@^lf#HR$ek}xH@NU&gOfZ5qJ z@8}=qc90KF_~^ow3C=f~d*yEBbNPqWdN%C>z43DWIu_y7+x$)rE889N7x=RIci_vD zPIM4$kl^Rpbgb~RLr71n+=jhdY2&c>pbeZrWi#B?MbF-}2K5m(iq-!aF0-umr*SHu>)W(fWaiLQ~EHIcn-8{q~xE zwtvjp4qbrk-kwYEYr#=K$1+V+af?J)7iy@jDpCdq>j&0&b4;wfi1aNu*9mD~K@?cT zL5PzS!?I%){i@#pD8M$-E(GBLG*OVB!RzPE7z7O9nnc# zzLOs{%Eu~kyhRswydiH{4g$djGa8Gz)=%uciGX-P-IAsNdcw0Ko_6kY+4Xg>tq~(r z#QcqXd>UdWX#X$6SQI&EU?-TF4|t+4V!(g%nw9th0**XBwZu{BW{6Q=9)u)!M_ZZy!Y6AKSW#vfU8 z5*G>LPGTY*miMJND@#F0#1F|Ej|Op!n_)y_mw&}7ieEKiMhXK#^!Pm;ZdI}^b;|{C zj#aQzAI?fBMEe4CcgyY%|EA{qd?u-bvp;|NPDEqDAPY>+zUmL~&aK8HaZchUvy(+8 z(d*O@DL*m!C~%X%oFwq)e_)w?p|34}&bc4WK{C3mQI{d}?PKV9uNg090$Y<+gSHK> z|11LHl-c_ah~lGWRxTJ@W^24O&vtLPvF-RH!z%M@?#635cFMi-l9d`Qxy*U3VlCMq z#Qg9896>ES;w`FOPg}$Q#=IzMyPk?e7;9E{>cL6Y6fFp~eQBcY_wWGH6hXv+>p6$AUJfx1ehy?hiWWoP4Ld`qVM zvUy?8gVUX`Tgf|pw}{wuf|M;n>Zj+jhA%jsDXM-6r%JG7tkmnF` zn-V&p(f3LeB2`n*eW%@$eA(L5f_1w7)x_sxy}Edj)4|%#RIQM1?R+=-_L42i?jdB@ z+R0eR=D2FFK5VC5qfW)in}eY+cg82uMXfJo9AfvNTdxbz4Y!^NqB7FRjuM_JG&sVUw*;J&c=a^Ix;zGq*VP~q6zMF(Nx%<{|4JT!PC^xqu{sialv^dVTL0nvO8d8PcmhD8<(h3mkoKqCdXVC(y$H&GP<) zXQ+bT=YGlR&l5}gO5oyf#+(Q`e(k+`P#U!=$WO_&7L>DWX0&Ode-*Ox^!j0VN|lDX zm0b{<4~2f(X=uZbmn_9hN$!tu=%AxVHhOi0`2rT>>G+^ZU9{`95xG<#ZFIdbS%wlXBj*5 ziOPW!x;0eTDmT!Iscgh?o9Rg>d7f?={fse6T>PkS!RN2;IkZCcpkvR~u}krkRiD?c z1gCK_>*#{b#U5+!GI|5woWqi4I;io~r6w6^ES(u=a;Zo=eP+l^i*4p^$Aa9n9zVOu z2-a-j`E<2mf<+IBB>Tu@<)FoVj{|EJh2>s&2S;zA5HE0EGzZ77dj68d4BK?z!u*!h z(ksoLMx;8dBiog0rs=o-hyqXH4}RbXkwhD;j31Xno-=UzJ6@5e)Yeok6aEq5egpPksi;SBwHGb)bm9MibDc+@cqm&X_) zd-Di9Yq%}OIDpxzD6v$d+mQdRXSh6ULD>blXnsBsNA5afK`fuW9H=eo75V-|K=*A{XM zS4DgTraNyme=z%D!!LyvB`wpgH1e$C4Yjp=5uxp1p5k7Wk*`O#`VK5r0a@k3wy{Ym zohSA(@w;zcim;t+3Ri0MyN>p8;ypecLaD6lh zE;E~VAEtXXO=dK0LI{9trqKp9p5&g?=ZPkTvsRsVt+dprA_sSw<-+GAqSr0R8|>t< z@?k@(E9V-7?nOHG_*SWwzZ)fw`iI*!u{`E_iIhf$M%-TOYD*`K7z*l-^u1bapREr( zpE7~XbohI`$3a-~E9I|ZVYpdGy$KGIK38X=u)0gAAyL7RYlG=YLCtv=jKnUYH>IHZ zLE39;$!(dMrSts@xbR{O;}|dd@|o44LKFE4Q5?5j`=o~K6DUV1;|~j;i<|s{x9%?Q zYWX{H#*`~f7hn+xhe~lWTKk{-FZ#!wj(s0cmDy*87$%Vay{K433P2nck8;oKMcy6u zvK87X^kSTsw;MC(jgNGrAz1DmkE zz4F3U&gIhN5Ne;LuyrVXYl(+R9j(a~B3il3|5^Cff(LN`r;=cm%quHSn;VIcai7iN z(ehh#UfbBUZOiE^Q0lY!)M4bBh`YU3WEF!`PJh{!YBfWbPf_&3ZHLj6^ts9IM<{Pv z4gG%d@DNRfw{3WIdmIdf1?(q^7J3znHw|0p6pfzNzLhD1I8kL5M zPo8}u#fKB??1a^oA%%{ro2|!J?C_7L>x=K!r9*K`=iqfWdM_C1Ay(|#<99NjO_D_j zS4L0|9WBA{{dCl!6{Ucw3dMKD%fe{w@b;{hq#XQBUJk~r{9)W!tdCuZ!k*LZZnf7x zC*3)#WS}3Bw?(FF-RKK4|Caf9)H|J%VwD%4mO0jO-ghfBQdzDpMi^PT@(Ag`^GUBk zZj3a?$v!iZB|gA+;LC4EW`d=!=EbEGY!z83!H~bG&h-s7zc^q$`+3BN%zyrUp7@?~ z9gm02(m_xE&Y*RIVQ{iXyUV2`88st!-8)Od&DG&oGr^rk zt;2b^Y!xB1U1pKx9f8lZL|~#4>u_#SD*7E*653xwH?xz!Zssfft|dv2W#p12EHt@M za}UGVo3STCHFPG2!wx^`3$G z>)~pnCW=RacwbwwaYrCO1az##sGfi}mJgQ!Y)l3y5tT}Z%Zi=Q1I$t&kfz*nnlLXl z{lPSYR}1+qM*_qT0XY6U)Ek_0mHMHCs#)sbtEe+$0urjzb$PM!=i+TIM2BU;u{s+hOKhq%n9mMeXk4Tyxvd)2@=lBJ!VMqS3hqN|@V*aFU zI4nA-daHE&$!eq>jD_z!DNv$OMP2Z3JZj?z1| zne>b+Gx!+T9Kb?q$q%P=JUvc6t&Tlsz=hxJ$IID|-6J7A_+1bE-woV9y$*xq_q;3fbD`6ZdDrtM;edP`WNP+!4Z8gq|vrw62c4*U-=l zU9#5tm`i?cTzQBtKapBbP`~rC=Q(n9b-l(<^@nOIeT5CKxd^|h4k#%kuNV8nZ2S7Q zdJ!5BhNN%tEhu+XQFVIkU2i^GTHyMQfOrCO(#rH$sYmUC@nc=LbY_hwqCDE5^Kof$ zb2cVF9r$^B2%b$V5Cg89YL+SPP0zl~8eI;5RLaxQ_?gj`#0%cFOQ6y6fcB50@3RQX!#?MQBi9cMZfT=MVywpV zs+UC&+qj}*¥kTDuzF;yq+NnawiooX;QFH-OC3#|musQIPQ(Sgd>Z+ziX5-05l4 znSw+f7e}JBB0t&NZax<~^BTe)97Xn!gdD5TH*Di(yKJ)Wg5)0op@Dw zRj!tN8OHY*`$#Cd;Tk888l+BXpnt9-)&rQ5WKMDS8)V|Gz?>AZ*ldd+3e3e-jt?4{uvLZbzi_Mga!ytmrNz8RkiuBO-AzN0y%<PSd%)%v*o7@gn;;x)xrO2utj!ui}l3&iM> zb-GRgXgN-lL0MnvrEIdM{0Stjc17xNCsF)BU@RRZ(j?XvI?KRVK;S_zZ&&NWyp$cv zULK&P&AO23732uUM?B6k7HC?u6Q^{*4AZz}IgFVUB1n>v%JN~f;S4*a4zr<#+TI#+|~yrX^8 z_Ug7Ctb0l`zvV@c&2ofI!M@$tkHU%S1%#U@eGBUwt_Cu`+!Fpm^Z1`sE_;z6zIozUs|gL=(u3$WSb|K5?mmSQJQ z6VY567_mX*XboM3mG*Xgk@!EhIp*ogvcd$pS=e3(S3elHSF^Aek<|i6%93+IG3lv&cpK6_G@;nx}u6~QXK;QVj z2d?*hZs$hO@o>{?Il}%?-dhHqzpa!7vU-?n1K<-eC0i^k53 z4s9$dYzgLTa#AjE&V2Q-XSbnrd15BPZc{_oOw2)3UQ!t1G+m_+nscLq^iRGLY_iX8 zWO8em&wi>=ffMnL2x3zIq)oq-AZEPfL}cBbj2lmG18QB-n@$rOK&DO5+Zfqmtt+l# z7AIzM{xajgVqbrW4V*Ea8?S=ZDN<=Rh_3kxw?j#ZTt9$egnp^*ef|JomaTORq5bbk z<0-m>B=juxMPgI?n-xjTuZSx8%!nobj3EszQKmUQx9KM6AwMPSmwH?E4&Tf3{?;mY z0p4~w?;jsS=?LJ|+ZInCuxR=v%Kmw8D}DAQ-G7Yi{TsRVe@#*TH(Kxif4;m)5A??i zbN-09N2P5@FlK}R8UgPSB}J54HOFc_qU6&4H!%GMn9mO)S0Qo-O&tkTJ&&28R6w zF&}upV_;{;4V~Qy0w{uyi=Z1L=`XHJ*~A}x4Amfnz|!xF`SV$EK@SG8O`(HAz=8S- zJ$|{k6~Zw-#xg9;HjjLwT>KA}r3JR8fZRe!g=fTSPV)Egg-;3zw~OKKmbhGs6+?>D z^X67Z;oj_@t2B@*$>7tS`AKrtoFL{p>}s%+-!j5CxsH?QK=BR(X&}$CkUw8n_nBCN z9=cw$U`4fdYNSORUmq)7(3J*fKQ@q|-btg!axvaS=^!8ZiCar-fMFN;c%k8`1c#@j zP?k8X%}m5pn!_HkdBOe>@<$lucA*h3(1;UsTU_=DJT1DqO`BDZ$nv{>tNF{blQ{e( z5uoy2^^;Sa5q=Q8wbMc}Wf7^4ZF#f05HmC3w%CMx=)8czQ*Ed8*uPq$bZ-y)1Wg2J zr72k*C}rfGV3e2exM;Td(A2j>e(HN`6hLc~4CQ6pf?#+|<(rC9H#DI#`B&(um#_1x z&g$i!5LsSvUN_|O+zmYiS4~>WhzS=OC5W#=SEy}OTx1nBwkCkQ7H3vf_6I~Nu|!J# zY(m)q?&CYw<^;}H$o}7Q@!oyJOysc!Qwx}w!u7h3_e=Fz?K0`UULdS-GmN%$H)&*7 zsovl=hpm}$UGG8w%6q1y8s{cA;~;&uJ_av#Dps{Sme=S@fOZ=9oi2VNkwQ zZEavxf}=AsRhuj=-KElw**R~KB3Iul6;NyTW~d7PzL<^>yJrzR0~GT?18u%=4B}!} zXVZ3KCpHxyGvfBW{SI_I|0KIg=>*}_cw&wb?TG8Iet5i1T10#(<}DE7*K3>{5M8v` zlK{$5X^&h=Or@Yj+6}&hp()v@q5fVyvqgCEUQZMdExH^-yy1!>lopE(>8PyF?sH_q ztAQalztDuAuP=7Lm*Bhp-26jPNDI%}c?xjjaiyyvGxNzUsFjDEpX;6Dd-RT%6OFA% zg9}ysvt}%hdwFt6c|15@k)23{A`li~>r>K78Kqkucy`c}WhW^;^Adcq5eb|@o)Vtd zZ*(Qt>tK6)uRF}hDK0!r#dN+;jcHT(Wp)6ld^1Dbr)#yCicN3ic#~RElupG{5u2im zAUyyt?WVI@p+CZB9(oVA2I`BnKbx4?;w{>%bjfZ!od4lqo%&;LB{oiTebutysicd* zVvNvYQKbuYz9K^=mWS`2F{+OQxPVzA>QQ;V@{aneykyPUK6|%8YN@nI$zt-+Xi(}M{C!_PT^=U69bD?rM!?)(W z*KUymea*qjTKCS>BjhE7r53EWl<L=5&DFrzsQ>A;`@FT{@~7L z(L(;Lr6ov-Ntk<+4U9``gkyBX*fkj_i3{F^n+A21j~NN0-Kl$NzPKyOb4z;2+qcKZ zXTWzoAt#(s3d`kJLy5I?q7`wspVU5@oA3}3=ji*Sdh$|x?;^3SbUI4nHR>l?(@iar z{{5G;eRsekZby%QZE8|oy)2|KA`9sLVg$R;$5SuLu-;_MALC~6mITg3 zOo%A0zOCIza8INZy%xA(rtC|YFjzyI)`i2D90R>WrU{TS4@i*fVo*rx(1>pp-%sZtpiCn*%Gc{|3t{I{k?DOQw7Nrm{)qCmvS1+C6b&CNgV$j1{p#Ha0y158` z%)+|x!6U?0RD{WgdC2_2oY%>uBb6h_wr#=sUF)dWoTzY2QF<(^mDPv&_<5I?I;@Z@ z6<&fck8~I~>!##=vkaMS(7yMXCtTo49$;RWC4Nqrv&=f5&fc&Nb$ED?QQMO=Y*Hrd`)BleRAGO?-FTB zH!s-BN(@eSqWMPjR8*CAnJwbYUbY$w$1Me?x>6|wtd%SnNryiiE+SZxAH0XaoOsw zQPt+hgp~RWUptAqop*kNZHX&vgMpFH*5~jki??*s5d4+rwCeF2u@{|TnF=-)roNpu zK1wSKwr`6<2j5nFXf*NB@=#tT=cDigYUJuoS6nw`4!^Ua30wCJvQp}Kf5KBY&F{u`r|(Wy81cDy3zswOS=Et`b{5-Tjb7G$yDdTb;AEtK z#-}$f9U_LjaP72srjyx`4kPZP!^ zW26g^jcU~bdz4w)OJnq8)j4D^l=zxFro{T1KH35l9VcrerU*+K@RrW7fDFHUKLZrC zsa@jnVrYe)DAGcnFCqDbr*^P<*Usqt0us91SLp5T@ubIm*Dgc1HqIzfq>}PLt3`jc zi8C7CNoAJ)sZsgq}<;MA=jvJuVdmH=d=%BNTyF_h?fO7RF3uA9i z$(#YMaA)KzaE zo9goJQ2IKK#c815j?W<2v899g+K;=3{Or9jzpi6qb5aRr7HKcbdx$+eQqeRb=IMV#ESwi$?b$-E> zq1Ve|-xGUw1{P34@Zgb!q=mN|&rKy~%JTH(wZjXDb6Ld+3*u|Yl!LOe2*i;<{qBg* zf#xQ;8v6JzIFZkHp^k*3Ea`4cJ{m^$ZqZ6RdMe@%srxzFf#p+j8; zvORP&y=$sPws?sAp?AJ9Bhov>uKZ3Zqi#CAgv_hQ?!RuCb>!Uy>$^< zhVEZLM1kMe5dZW{7*~plRg^w*=Q&qZa`bU?KB+>t+yXb1Rv$U?!4FtEYpX3kVs8Hp ztu;`qUhvpmI2g-yaNe|bwrG{6Vwl=8KmkKEhcvHB#A$fEgqH=Z%WPJw{+xD-JEBTI zHKXfTRv^4uuNDl`>Sy#}YIP?h+?k{-e9N|U$$=;$yFfd~y?+rV7vvsIJc6_CXG206 z*liz~UA}^)4a7ZX*?=Vb>STCpWbg)dy8BEsqk9C`Z+|ob>*0DNr~2mJdlvOViF2w% zjEc0AiL*7X{hvD$jJ$2g3-z`KeQ{h#TD$Cksp2 zU*Py9Pd_=6vP&*wBsbf zRDFk&o6?*PF{46X``Bgd>!GY0_qx4*8YG|k39k9&Kj6RSz_c0+!|d8HdZ(?m~N3f7`tns?05Lgzhy}NGb;HrkN(#Q9zZ*S>p!H# zU~}Fe$1W7B2GrvfMjgP_hx2oSKlV6Ok#mZl)}X#79lV6!a20E});hTnZ{OzF zX1)D6y~sg9-#pCPONiEk_;cyJMdD{1j(!^Zpa7~2 z3QfiRUFPi8{A@4w{`4x#IBIsm<)~%UdV;ycx3!4R{5=`6t7|t$^3%l6e(>y*7}=yF zn>`Wr((Ml$GVE#V`^UrUlV3bfu-8Zx&OxozpwOG$jDFYHC%TX?4sEEQwd$|n-;naH z!UGcbLq?q}+pC8*ozBxHKg|?@1x0G$;Nyo*1lE%*CRIOXbqLP1y*5%dczetvKD%_} zw!Eszd=N3_0qj}JfUw%em$Pc{zLO|{NS9@m_dfHn{9Wb@$MA`P-dhhY!gDO}o)gp3 zO!t1R4UlwU&6{27e9w?^CKtM+RzuIo^x0SWV~=0*RN?4j_zF^3!o{EJ?r$jW^s`|| z8|mxki`2(WoIE^hD#TZso1bkg~*U?sq^IzDk?&VOt+Sc)eEQ z&bHd!du1k;X+55)xo+2*7pH&AV zYcVeSin7BViVGXWQBRq%bC$5{=>tDnQxOZ_q=gZUGFnxUN1sr@ay7`$o>i1q?SP)Z z6iWW$QZl-B{DZY>;R`C#(gy7^VQv;Rl~-r?I+9)%MdRKo|n#YVT5z8{ELp) zOc$d?_xL{>S;rE4x|C9#D|{g5G+3`QTlYP|)RBgahyk5pD?c;b6a{N-wQkRk#n=X4 zvO&*FzdM+C+W1^PU$3N&;cOJSfAiKrKB?d=&Ig+M>5>Z857~S6~%!y$qSyIxOikVO1aAk=e0X!~SU9+UwvXJ_x$tD$p zw{8+*koCMsR5Su?ecY}cT8{mk8V@DSae0TL%K8VOMk_yWR=Rn_UPc%(+!O}OsL$J! zPkue(cyo33w!McemM^EL3na|YR>pe2TaZ6059zGEGfx=Xt$e?c9NjeXF8<)GiufgH zq0IAkf#;LY`Bw+pf_rbCH^q*eKE9C_o!Sm|E1P>lr$QutW{zGIY^nd70oI5FE` z9>y)z)MYkK@s@nNg<<%5e&N3#dy8o!wSkaRd`cD_in3Ah>RIJ$1~)E^r~#ts=B!V< z_fJ^8KNWUCjQUSjCX^Q$Xo$UkIE^#tG!2}2%Jk>M?LWuF-v76dSy8WpT(}`usZSe& ze&-;9snw*jo}hh|jp3{UVfn2$(9A`Y!r7QAtv#jO<%tKuDnz==1fiLTlHfX`X>tmX=3Aq#WFz?uR zTT4|SfU4@}C#oaxoI3M}x?8#9*`8aFg}X{4-ck-3yciYlF10Pjq8lp{l=KQZ&C&SG zkKs`HP>dBCd+{8w9|j$28%;x0LA$R;0$nSVHmN9U90#s3z}ZQLyD!T){u6>+IUOc8 z_7X5C9d%w`y7{mgYnBVhCS(pNd&9taG)oD zK#j=nJ(so?UxbSwPrNRaP^_s^usmpEYVGae(2yn%=q=Y5T7)`1Iv@9L-p+e8OZ!M@ zFC`_-T%P8dZ+ozb&~sbbT`a8J>)**7Z3_gV$^^q6uLORFqez6Q%Z$X35zNDBV{|arJ%FRvx#RQ1x`>F`8hA3XCRnF03^p z2rg7aC&oWLA5k|g?MH^eHuipaGI|sAqJqi{+C~NjscwqmQy>bsOVE1lk>?}ghi1m-jb$Ia@MV}nxleba3 zGxt0wJ=L*Y+T7OI{DnL$I4L0ZlJPrp-&e-2Mjm^9(g&e;(-R4w)X_7&LqR@@+;{7$ z@U!isXQnu*agfSoS1zvjW8RH@+Z1@wMpALaqOCA=MBXEPS@OX2!x(gfjkzJ1UM?U> z(76MjHae-5Hr#u}zV!<(<(Yl{J!Ja&y>XxOR|fIYY}}DiFsYBQa_kgFzfmH6IqSk8 zXH~^%HbBVeEzC(=*{Cx{FM~~D?Th)?{Kd0JJ0LFQ#vvW)E9m^o-(szh{wuF;A8@sD zLH3L+ZGG)AcZNrTxiT$vJe?`UJbC_>aQ8L*hY`-`o-i91Nx~;JB&B4u*UaDF$%NFh z(2NR4BB{YJ*G$F|aF!%6RsubfWGc zF!s_NB7hrce7YQQ-z?M8_Uqj>w}vsSJ)%}jr?~*&!+=e@n)@PcuyIWBv=WwZTP7f+ ziq!n{jf}gZt8*~WP@xIjXRp|@EO8z9hT5oNu#gq_O*&o>FjMW6^Lwcw zdZ;^4qfLs%QH34`vTiZ|>j#x8s?yG&S}5IHj>l%;-_1+7_ zIWCr4J8gWdMmf}p>50k!KHRnj5w#T9dGHt=0Ugixrj-1kC}ibUANAYYC}GBX`0()I z$1GOVy#=q#?NS}4w1qjaW-x)3uYof%x5 zb%5vft}{fBTrAXN&g*p9v6RP{F~8?5-IOUz;_FsBM*VQ3?h~d)u2+Nff{Qe}5U5ul z^)M4Nyzq5*5mT~>V-Lq;}MMXo$0|rLbXV-eD z^5?ESoU=1xMoB1)>_ETmtQf1)I#QC8LdQ3~cJ~-M&vcERTG*gLbqn!tf~s*H#)X*7pu?mxp&ruIbsOPVRx}@PlrX9uwj@G=Bhow z1xOSh?8j?=Ec->l@B?!r9ZFFt@|%071y}A(-ee$Wgk*V_lV%*5Xm=ENXN zy&yMiRQS`KIAW?P)eK~YC?y$EP6am(#x!25-L=xCo57BcYn-m;A$;8&Lt!bVCmE!7 z?*xAQ#$Kb$@a_D+FNR$1ucH#Bw^QMD5x_L8ESYf-0X%ZJfGwREu&B;ZI|Zf2kY&3$5@cs-<+ufhf!P`t6z2LmH$5lr>EO{K!pRA&Jjm zyLA!?r+DPbgu3Q|wI1C-F6!%JUyablzw2}ASqlaq;qM*Be0^+>y(rsnK(|QyHykGZ zS9@L@Yax$6YpE_|Uy{7iE5ke*G_GFFc=#CDpsV0d_^DnA87PO~v@k_r;8)LO9ve}<(y^rf%glLEAq zR~_^YDed={74{x1?aV!1EdX9_CgLo;VfFzVE_xO9=P>%m5HaeJR1A>R!-ek1JFg zgG*K*ela%b!`5~Z+K=tb0YvsNdVU-~J--8ttP^AE?&l-Q6I}x_v^hD$eD})h6`uh+ ziZrDo?Cz|S!9iGrPi%PFG}&uy&vtqW~^9Gq%u=dYfwEK z)#m%bWjg_7>!a|oaOdl=ue9M-35P{&g%L71NxmAKUsMeexKFx3qOLaKMFh3089Nj9 z9r*NbaQH~8<%Tb+WEXxL=1R!zb*PYD6wqa{v>;o%mJ!wM%@*BOHQt*N8{)=X*%sSr zOx*i+7uk&{aTFF=p2p5&?3IQvz(S zClmUvbyXcrRis_`5Ud0?aIK3jp--fhQXP8#u=SH$5nj&0_ALd@`$A~%kU`4qg2zgg z1^Z{6(}St%Tssml_fd-#TB=}T~6cu2s4#0eP=AnPnzX)s*Lui%Vy_rSS}E)&|!`8jvC@=0Cbvm&Tm^a z9ay6k-(ZKz5Kq4v$-Fr;?YiRtIly;NxD%8FVc10VGj0|R@-J=I$V z>y}p3fKv=hW?+uW8ULs^>~M%n3N1%t_Ls3m5f(CcI~cJP30G^+hJ^iJxpHETG?bli zKr5Yj>Meb+457Fu8~!YgKTUeI0!L!%+J^%`H?VY4w(G2Po7|#298Kq8Mm#UBB?hEJ zdU@msZqconXXPw0CL<-CJSwzVVvf%kRYxh69{xWcXT2d?_rl}O*XEUVBa4to!A^V* zj>i%*e509@2a&{8Gz)f{U@5R+0pUJRyz!wau@Gi+u?uEwXVmXhC^}*#kLPmMtT4o% z+6&JraC^}`wUxh)Oj*e3L`EHPL)USl(#?2~Wt=sKut3-Ud_2}`@HapGmMDg-*X9?6RdT5>d@godNT! zNXlHMYc6L>b~irpHJTvSq$-tRO>{ocFVTB*onR3B1rQi|{?t?>ax$BOPc|7b7r4{>tv!u;0@?bS6a4d5{h z4P8LoM30i+6CMBEq{N?6g4FtG@6%1jeCuhJ5=@}zULM%Zj(~0?4=c%=TFHCOeaVo` zr5Cf%bs^6hN3XD);`@svg#JE^9{(_iq~}udl?l%pqlY5D-v86qA^#ibp+N~GON_mE z(qH22z;QMW)Dx(DZdJvwkzWqT@ zsyL9)`X$OmuNfL{(c>>aq04x}Xw{Ee&7S+}Q{ehb$wL%iVF}7OQs#lGp$%)gSb=S% z3q>*~*VgcU`Ms&nxoDRd!};pyvDYN-iyUPbtOgA!gM+muMT~dl=wIoS$B;uh z<;Xtn+|@)Q7R#Dn9RnlZkiV=|`1Iblu;^0hogYUSH2%W-;(3Lq@I;;vcKy>248`m8 zhdBfG9I2{h5nXE)=it7EOpfWP2q=-buHY9YW~DtAVgBF-ig>}*gwpclscf$~NH8t2 zfjLVorAx5gqMNxKee)lVyzef~fw`ojl30G}O@$O>@LE}B6opKOKAfLp&Q1w~wqlK| zV+9dO$dg*VUr;tM>+dLmpflahb?gR!338A#;_tQ5xymlVO0Z>Ax;H^yc@WLMe2Fxl zYghYIcqh$3JI8^5ZQj4fRVTiU?Oie5<{Yf3bhRWw7;G5nAWi&AL!DXW*(~Gs&Vcex z%=+rb_JY0V*@(4h9aaMCT-@2hz^pX`;#7r0?NlDnX-qzkxGSt4V8(54r>r5>e(?teIr{p{DKTRgr$4!TT1jlQ)OSQA@9psYNNQBUdk zpiHH=T*G!32uhSp1G~mLXkrLW7LaYH51GPwV%}I`#9HWyz=hPWECiMg57Ax?r7UVnJu7uUGq>)!4GrK;aP5+m(R?uLiLB)=>^ z45=R9drHRA(|-7i4Nx&qbH2kAS2T7QU?UC%HXN?;hov#)93Q}_0;2^YRe6hu-sfrKMyfz^GNHv<$x$(#cWcG#S`XqieTA` zhGzV`2A0b2$idV#!2!k|3d1@>!_!M(q;qgaMlrKV+?NX1$pw4-eyV#iXVtm(c4PZ8 zhuWf|aT8IT&~V@oMx_rH6b`|c*; z${-&IdGwugqHAWl2wl!5jtG-zx;@_kRus{C~m&_(W)A>nWI-S1-aqJqNuTK5?73Kc*jN(FZ{YT!W9y zo`=ex<;?ls>0)N-u;1i={f}EsEiJ7xu^#y1VhJf%3%LAuL52;7^I2XavZ_-u*!hBo zG>G+G7~t$(}C=VV{@`rC&o=WjRCb!OoDSN8mWC;V9AC+Gmw z(9>!nGBaEfM{q?#-SZ28&{U~{A3ULrzM|So2*&!{F*cs`lA@?|p=JHONEzlc#5}>- zBwdi9S!75}Jo+t~Bx!w}!6x><64>DQpNx__=Hn)Mx;)ZBA8dqRIlDAK8M#@0FBe{7 zb^dSVsQ!sB`p1-;JH4`b^+o9NV2M4B-XV&lX~S6my~07mA3whN`3NOLr=6@cS?efV`bO%1#{9HmnZhB>bsQwxm|UOcN^`9p0yO0b z*=MD>T7uH6>Al^gDISfhhP0iylL4zavm&G9Ek3HYO6-kyRTau)9@agquKs$nQi7tV zAioAYaJFZ0uSRAw>-pd@3S8pRqn8s4$H%Hyd(rbUk^V9;O(hO&|EZ(lsHP6!VN)-v zE!ipwzLG(Hs@de_LuXRoYFkI{>b!?l0zZ=>T z={Wei=#B-jOfGG~P`L6=R$2zSf*{656)m}atZcSA+PSu6bY^$km4|uR| zx4o)c`b(XCyaVU0FZFKgX;^U|v<0s`x<}K*&~~k^A1p_wOu7VV8~U4f5(+}B&5*`Q z)FeBtv$pi#C++oqd7BB#Avc^YSnYneY-Dn`T{K^n)krL^uwX?;TP7WHfRQL7T_LDW2JX}z|nSghv z!FI{k$3^Eo9Cb2a5<+XyJ-*;xw&xGp-Qc#C z`uwiuCtYf=awdG71}Xp{?7{Kf1P$o>N7M7~mz2dIBb@2MVh8nnP19k8mooNEwby4z zMZq#WQ_7~vTN}a>`clfe<%;n~wc$xj&8B@aj&kx&zDL9FbT;IMP|8{xxCi?r*NwB8XG9wD@oHrtH;q>VsyY+A*ZF=29}Za4iq_`qn=w#l3%J7dU~cGh zXX&FjoVQ&2H?EKacDW=8c$2AiL->XQ4P5<4U75O1Y zx4`S^>6n6Nje(}#wYih1{nFjgwL$BB!?lhbW$x}rt+t&^X0V)*_dDOHA>RVl40Y?a zIN)cT*M(PiSQq-pNZA}YVDeJRw@yV7a`Dt)HfCI-#h6l^T*{Z(%}w(~x+_d|uY*#0 zBwsT-a58V4+Ljjcz>^hIeKv@@QPpn`yJ2ZlTk4u|R4OsNZ=VV>dhBPN)im}-N=&(E z76XLf{rK?4g6%dJnKggdW}mlb@~P|TmTtzNCh*D~&uJHYcj240KIJHVZOPKv34=sA z;Fn}d49b6NWS0vXw74&F26HiXdq$yKL6M35dnr{!juwhy%gKfWQJnmgWeY^N?OLUhYw0E^%5mcxqn z4f$7JmF*}uejaaf7bvpyrYG% z@dp^HB7@L2n%qr#2_fl*JT^~*W~F%Y4L5ynsEQtMci4<}>ifFa3EohR>U;jaB34&Z za*7O3Tp8|~epA@7yZ>1e*(gRVGt6u^8|Vr#Dt*rvb4UBfS78#s;br@!{HYh^vVHzH zeN6SIr&Kx?Y0atp-9=K9+QYv&Dsz*K1dxLGJWSY{o2Gn=L764#(={Y9{Oc@yUIVyd)w-G80T5h9&my=oYPkpRS277Euh76uOQn-D|4`7FN^V%-!9% zt=#Q~U*Ssf>{of+dJ_?1TpK15rTrDe1Oi0+ctB-yQ?-=SzikGuRU^}k5gkG?w}i$zd|9Nm`&OYBa8 zFWYm4Jo=$5x6h-x+iztk(sc&pf=0u$uIA?RIMiLgEOiLCSO$|m+A7^`?OR31EW{mh zR)(}|vNb<*^xe{skyQYPkpex7cxWRgoN$c(_dvNa?GULk$Q*i^{7o42s%W?zF3wlI z`&aj08t|!)ROj|Obn^p4x;V4-2qj0SjgC8<(L)_TEL@HGE=4M)W`BGOd_KYTFR-(0 z!#*wKU}dO(?(OvS^k2K|0khKe>;qdQtg1?l<9(e2de)8;@>Y8pz6%_L-v#p-o_pR z;q&pE?#Y)O=-4ZJTHR E2jldcn*aa+ literal 0 HcmV?d00001 diff --git a/doc/images/spindle.png b/doc/images/spindle.png new file mode 100644 index 0000000000000000000000000000000000000000..cdd190bceac674e0f69e408aa1735cf73af5fe0c GIT binary patch literal 7260 zcmb7pWmH>jw`~F`5F`XE?pi4BRv@@b(NZWBDDF^POM&8EC{VmWacH3dg1fsGEAGV| zPI%uR=ic#+d(SvOlD+px*51$B%jTTVCk-`u985Ay004las34;S004uK=fN0g$nWfW zw-?9*&{azw1}Gn**hXG}ETvSX0D!7ktXtD3$ZN2Zf`Kal@RafK160&v_zM7#A1TU6 zX?q&)XJWZ&Pfm6V+LSqJJ=66~2eI@>%SYW+{+#)e1Ckwq%;~V16~kWZ)|CFBEJ=CA z`11$ZHhtg(f05sec9oW~qG1kEX^j(Ms|igMp@tn%^b~qo_|nxOToBINJMcTr{Ey1P zL*3NbSDypn%|+1;#PF<7mh1J;pFjOrLZC3QUf@(36c&!2gHICz#g%51#Gs`LRSHD@ zf}ISY4e=yl1;Q|nxU^A1pnpt@Kp3Lz_O~}n`^=M~9PgM`mVg`Jr)B?g z=+IL=K=q~8O|5llB>idw9!%lA6N3p}Nfw(aTP9Z3)H}B1FZzf#zCo2Tbh@Fm_>k~e ze;inkyo|20A}%RUhmys+{uFlIKFX~-v^FVgtCB<|Hgzf7d5j?w>GTQ4MK1A+z>p6( zW8VZvM9&o!Y#8VC*$a+fp=-AseVsd#YG88v_ ze3?x*nc5~b)*wqByaA>gETh1I!hWw9F+#zL7?9bkg`dUU@&x!9$yU4Sxo)?F^x5?I zUkvEMPt!><+Wm{`ybql}((yEk)z$TRL8UN`7@m9swc#sNI;Yb^aerf@CmgR3PKm-_ zYKlsfEe}PlXUOqTDELauPf;ItZek|s_WNSf(ru7u`U9zRKhTZk4lUvz6}Qu}5G>3T zCitRYNOW4!pM)cm`j6)f1!0oG!Z^U-<*Nmj(a=|5rqo1M2K{-O>7Q7BsZj}Z`M-nz zj<0Re!!Q)3b!l@M($=^p&Hr4a&$ml}Y4bg{N1>W93|c>|7-Yuh~mOCc`FTpQ)J zM<^6_%|Y=`3H+~X=06Qox(f1n*`<{*Xs?#3< zN3fO0eSnDc^bN+S@MIv1Q_D#b7}9Q<#%G;?jm-PLGbYZ)zroMnG`%Kj?S662%{DEL zEZDVp>W9m2-H2Z+^Go-&$x6eyvXN_TSe!|%AJF?35k5N4Ok|cBug`W1VGnWA5KY-i zn@LvqaUWY*!vS)o46%~n-_G5XQ$&j07fl!9(@M*WK8MNVj*XhgqxjX*!@cFYcj5=! z7y1zKQ;j>rbZ)cIAPR9nT|HZBw-0wMzlPu6reBG2!Ke+9Q{^8j*I|R9 ziQVrMb1E#BbGx~zyDs_a2_B5l62Z15;y5RUx9c6BQg@wLXqvt-v4ue^-ZC8gV2%H{ zTWTBWjwSmYjU4D`^nplDQg1TVXNq6nl0)NwDs0VxKjLkrHE&LawPU3wi5l>*_BFM| z{q2>(u(apdq~7|dJasa;!!N0F_y*Z*b3n6up-^uHzSVcUHyCZru;8CK`1ZDm0yp7u z1vvs%2T+)KhkpFJAs((3C6kfmaZ6t9Q!cHm_w?C}#e2skt97;;UBf2jnuOU7Uh=~B z!wNTWNZB9cBh6>4EnIfX>iP^F5fjY%`Th?2FIz+9ic89qv=G%S?8$vQBG#oPe8k^Mn`M-4&mboniM^5O zakpob@Tza##Zm_IKh`SZubB!pdq-2gD{ z6REW#0fu_19+M*cOtOu#@SfnGbOZx%%EYGocWm}%APMh1vqGkn%u30QF;wTMzoF%l z8)pQ3@^JsE9bAJ;tJ^tucvJVuumtDio4m zco>Q^X_R1PmStrPLL~T;ZTr-Z9s3m-1)D-=`bCN7b=8g%Bp55pWNCQW zLQ^^`YG`#iNo2GqJ%%^fo0JF}~NSTLi zD!p!Mu&+?um}M%X7Gu#Hq=XVslxN=3M626nW!Y*awzS~qfs-0lZ4T7@O` zP2^Cw3fj>}4k_Y&mKkdMIGj#5UUE|;8!gwqjt2(4@Vh<@DJV9@|6W#>%>308HqBby z>Mg#ty(&2ees^?#J>8sAW!C-u*viUEp~z5WZ6TGvQLGhXEjV>z7@PD7ev$#}E&G?0 zPZ4`_S6W81@o!!ku%GB$hgzh)#L`xY-_2ku8dHL+^~>g4qzl9Chc(MNiYZiHi^~^G z6#psWeFnqEQjHDxf_L2862LWu4W=oyea?IoZkJ*xKorH%8#V9J2?Pl~tum~67oD6) zR=Ut^-iv>=`{v<0`j}DK=0htwbzxvd)2&gLlR?4Vh^$VT#bilWTW@7g6t0z| zO9n!z3Qb!dKdYEOi7U8yD4QpmUU=FADKO=@F z0QPQnviZk|A+J*X-_1bgraUVG#XavvP-;|V+Jc%6XgUS2qv$F*z>0vF6$W(s-D>1>cRDVA2D`|S&S17r5f@v@ zp>jAGmMdJ|EIn`tF1RIP+6p!vb&-?3sJ9%Z5|5MnO1>=AwFQWm?&K2b$--x$=?#y2Y+bhE5avqal5!c;0$@RuOP@@ovfK4vOSgDoNaX);G3Mbnt8{}y30_GPJx;4 zk}L9_J|_)Kn}KnZQ5-X$t)jy9t*%F)8x`+Qn#Pd5&w2Q_NSDiR2Z4odEl|zjV6dTx z@-%6L*%%q6d1amllfGrDf5xa(s?=*#d((8sQWm<7fW=i3vfsSy<=S(3LBCVjs48!! zLUG7T+2S8=Hzi!I)<5rpIQK^QUDg!D8-Ors+bheO5`*uSGzl2{6rRgLWCq#_Ytzix zZLejmeBW2LGeKf~Xb9EtLnyVUI`iyB24LqHw7Iky`}?3}89DizdYLerjwlA-m`&P_ zadVGLve&hGHlh)tpRp_nC{xx5T5e9mD}qjO+)~Qpm(Ry=!XedWm-Bi40|v}4qcL2#gAR4YHh#F=q)WQ2yK(L4-{Eq-VnW1R3hb z2PEaCwn;2)ylgZIqD4g*HdgQWEU*hm6$j*heZ$*0mto7(=HnZmO`22_i<$`P#TCJN zwT@4RwkwxOH{ z3_#yMl@%YLX<9UGkV-fF%$&@7mLRRRkiv$)=zF5-g^Yo_3$fi%DiQYbg!s)~4Zo4; zz5GF6uc5JVxjR(+hyA<&eO+#~!-5FXE2@JW>^`OsNXJ@g_AFbl&rZkH3w3Cy8U37M zO$SEK{>AQ@Ldt1zRG~iD4b17{p;a>NoB>zLL_4#AsSjQ!8`fm7X@OOmXt1dU1oy>d zc2lIE<4CsD@!es-8xHsy{xrfZ^*xpUrRh~Gu0KtK$KjNi7-|3(m&DzHM|0w#@22Sf zu+X1ydbf~3JXwy@!=*RV&)R%L?N+GTL!iTf*;wR-l+@N3>($lOpeKQoQFy(m>&x1J zipJvzv8%O2k#rLDv7QL^Cs`#^L^R(AN9d7@U1JZ$ONw+wlQT=)%nr}_JgAGGC2;_c77qROh(C)SbrA696WC&}NRoN| z3gcmk6am<0v;Rngu%JZ|{vHzCV!zJDXGz}a60pvb2!sx=bcF>jiZTUI`u=V8zAKct zQ{<@MqVqcHBwmkvbDMiUljV1AV8lw+Mu|Q)EOrvLC{3CqOF8kx3d?>jFG9N|A0z>z zZABvH{NcDE3ea+6CckY8h0k7~rmt zl+h{1!-ZH0uT9*bvE?SR4%&E`b)9s+g)6$pg|i@b*mz=o zvN2d6&?4A;rCO3C$_10;!xu>Nx;^S%U!{Kd)rjoXF4xjBne(4)uc9Ei zNV-c%0cQaU+2S?FDr9Jz{8Tq|rjH^>>>U!`r109S>aJd-#jXitR{g?YJ6%4BV+myk zWp6#@m`L-t4hjI!qYHA$Btc<30LC~6BdS#EO2br~T!Nt_^r}0G}>RTMJmPyl8 zU;y%IyM-^NltspYk8x-A+|2ZtP{XCkMu$+OR*Hd+<)X<7tfQWq^vjb*fn1(EM!8y^ z#xwL~@iL_blfkG-nspTD#ZL52F_MhD+H4KEKF|eer6X z6LFe=X<7>1d7t8>m(4LJX=p{TOj=t;J=`U_Z1h*{yuoA$sKOU;GrzQk98-u5Kkdi- z!TeIrWISu4DS)A$8f5nX+}oU)cp~nUA#wCc-RcEJU2RKu5pX}(&O?eE8DkVN)L|6Q z+7qL_%{$}-NZ#0Z7mcrU0oiUs6lOoZRlaQyEl7gNfp%`gaOqmthw9G-9(zcQxG>hJ zWG%eM7>|#<+m&?$Z4QJh0vh)jmfx&~m0Jgq^pUHjcF;b7he6RBb-NF|mFVw2zehP&!uhz9-bkmK13nx{F0Z+;!;(>)VA z8Q}ei4HI+yCjgIYbHa3NMD3gL;v$~S3srGqki<9=OY?63fR3Ajg#WGeN;sgMtcP36 zU8S{>H+SE^1{^15nfuD=WkYsQ8rTCZ^9dHYP~n*jDg8bcSV%D?KiioegL|IXKS<^F zC^lfi00C(5HLd0JK54$}~A_`FR0CjkZkFv|~Y8ONBSAOsH^OTt4 z78i&8)C zx10T$iuFIG&m3%U-BdHEcPkeA+k)y%6D{`GA$|&$%RgpcJ#9MJ=HI*22LJsN$vH*k z!=r)CwK9YGCnt<*tca@N0&;U7Mat{8WHKPEUu&0^(i+5f?1XEvw?#D}OU{CtkTpv5 zRS$(kz<$0~^{bCV9+hFOonpf&+xClaeM!Q0vsm`Y)uV2`-8C{;M39{-9kfNCV=iVM zy{F-1NL1%sNFH-WhUx~*%)ojxpF1^a*^ETOzmZBobWjD^TZyjy2*`SXdnXKOTXZu*L5p|EUU)$4LaUhCj3s9|%hH_`1- z8-@wq^hbgBWh19paV#L1FtT1sNSY*%Uc_x{M9t^!Ehowzc=_VSq9=})?8pqu@kdYr z&4~5KkuVf1d;3WrfjA>1{Sd(gtoQfzxt(*(1vZ-ue&Me-9$~NhJ=WAA%e3d%y_HjR zLC_M5u$y(!0iaWi3|qC`^H`10h@)W(y@H5rNzTGuKbPtw6-Hm@2AxPZ^cl`7LwrKO zJDs=kj4Iz-o!h|OyKzJ}MT^ee6ka>U;X09VZSWIsQfP2?MBy0oP43i60-sIs{1P9azyV?v=-y44O z(4w=KafJ@c%`L=aJ7Wdl@45RG{2-ZTS=?8yYIdX@}W<-%Z%I>s88Rl{ieQexH zdzd>?2X1Hdwes>RMh;5<{j`Jm>8cI%-k7EPb6On$2}+j7;x9Gi$nWvqNP8i?o|HKF zAat`9gigg5L3{D>2SzV3vZyql+Mbz=r6S%pn4hK__?vqzpdG=z(eI52!P=cH1Q4 z*KWe6BkiXbU1+~U2+3w;da_+l);R+V#1fjRR{Ix)jMGlw>jm|2vqC3 z2tW(A`;y;9n%dMeT{VYOIX8{P0V#~MHuSyux;Ojx1qFrm*LcW3h|m7m_TtA{p_v61 zGs=J=NI|*CNJ@3P#=c#ChDU`qV-Y(E(6<2c|DK}~uSULeuW$sB? z5-I^jeeaONnTy9d%bl5jE3OS}$0;2o;`DT0S+fw;1){94lJ#Ptub1*>{=^#6SAsv& zaN$S!B*Sg&lgnP!ft|Mo#qPBHe3(0f=-aCOqD*iu)q@c zh)<-oYe_K!$r>zV;|zrce^zSx5-cQ6+!6@G%3`OxsO=HHW>kW zk#MOQGm8;U-xVxxnteGSjd#yrltmpOLKs8Mn4+74S3^zwj8IPvBJ_+q3(!oPtE=#y zrsMtYl&<^bwXdZ(?39KO>{ynAK4^cw&SSpzE2QJxOs&n7uyBjQYVkdvK#QWym9>DQiFGEUl{fiAsqg^MU65ygs<=)odl9y`c5 zp=L=S$yxfu@poNRr=BIc@Qgw-IDg@vK=?!Vvn7S6+$ z+!G-LP_!{;`Bo<@R|C(bDGm`AexTXbnJ(BGao4+5)OsAv=)OZ)0AIily?T+ z?aPW8L_uNo@{Ti|SjjI|31~v%UgzNVaQ-9cK5>oQll|R@(Imdqe=x!0;7_wP!`D7;(uCJ6ad{u-|JO*K6w z(K_l;5l_m#h?QN~yOK2qReQ7q0v}ob<{tUKihH7BDDR_R|I?np!5KtN{56ZHH2yb zX#oz9&;mq|UWE_>1jx&I?!Ds~@3_x<#{F_X?77$4dyKW#Smi%|YtDC%O!ZiquQ3Av z09FJ2hadoe0eM;`oj-SKZ;e#4oW2->L3;NAl>^sTPAg|Uv`w@Dfa-XbqbH1~^$XAR z9|r>fS8o6PFc^St{RRL8Zx}q(whVXNnAQrgooL$M7HwB~W{;C_UVq1B(utij3}rQ+ zb1#=D<`?f$WHZs7!-;vkQuKdzEz2^?DdLX2$@K|Kj6QSW1Erezr{5&>XUWV#W9_W4 z@8_;4_c@b~_0^O!J7>PwmU~orNM-4bjg2`m0-gg-a%mR;U%qj;0svnx{iAtxLH@YG zl9_R0e4NLZ5z;*DX++{?0H{Z@(0@d?nSRO?rWMBwXq=4B zR%b%2fR!0=aEz zr4RWrVR)5IFd9A$f?X*jCB#%?#i@ru+vL!qBC|>LB%6z8pToRXJLqXLBYG^PNb*OT ziMjBftc1KY+os?!nn<8qaD8P~8mEDhO8)ZrukQIE1E2;1fhrXWb`&UHi5yH0i{DBq z9Ifd4TxuG?U8HJLE<3CKlqNbAHJp^nRTMtEm$?*{HxMD9R+9e*=!P9PL~kx)5XBC# zNqwmP7Rl=>qVWuu!Uj*-_z4jN4r9Hm+4df?iKH3nZymu03vvUvLO>tSAun{|^u=#? zm-4NSn-xMFu5#C()BdrU8zTD}5f0dV;Z^MtxKa}!NaVsVc)(~mJt>2J*ZgPuNWO-W zU^T99jL#vpjY7#0;;^O||0_)BCXpUrO>=ta{Pe_r;RE`5Hj)@ogGAa6yxEGli99Nn z7RV$bWknU_sS4?whJn^%h874dVTG2XJ41;soZob7&13hg&!d!2cIr;r7@px8qwk{p7JlU zKzIl5Y|EQb@e@FhMybAwPJL9BI3p!%+7HlJa)rk=CDOrGgoICYufH>~3={G0bFT$m zm*f~QnwHE1@%zfDNm`UQy?A9L<<=YI^5^+q3mIumUnFyu%nv`FQ5ef_|D^yw@zBIh z_RRm%sj3=DaS7db^joH)COE3n&I2TTtF?7|#s-Useg%3K?NbnAA@f2!M0fwBOc3FUI#eWpJkK3?X`06lHYV{N|1M0i8vE0Np>WyHVpU$ zUkGzd3(}N98teLP`UAf7HW3qzMPw++8R>U}4;~*ARlGjmzma2Yf%zp?e}Y`*v6zI3 z=RziIu!b=8M-(D!Sw}p$RA1P!lJvQ&v~D_1-|5<6V2t_b@`k>h_+n$v@p0(wZ6NdN z{;xrQ%SqKqZ>O&U!dKpUv`Kq}V#if!tMxeOz$%0_j+^-BU_TX}Vd)=2|Deo4Af=dK zSb}lYK!KW-srS%S4r(MP4KOu2EP4XF3XSTVmc?&)2i_e%i1b=?%pjB-AX#HW3m@Y| zfG*QF++(eVko7N2El>pu{&}RkNyRjc{E>(W7lmyg@KmNsLV}X(By`F|NSEkiN`q_Q zf*#+7^gEe*S+rIbDlu|+M$}1xc&aeJOk+M^gEUJs?wL>aqoWl-n(;*=xKTvLwbhWB zY@`I3*t1ZGUo}**t|SHt=dZpPZ`0$qgX}i>njrXPsE2#t(pB-pPZ`U{DGe>7w4mEw zI^>6|N_B>-m5Yfm{~Y{wJl?3Auuj&JSbNNu{wKij?arx>0l>eq->+i%F?tSSwt%OQvy58J$V9+>5u7^Qb`=0rp_@%6l5t|Fus<|7F>@geK2fDL?hct} zOl&2~%SX$ng9BS8UsZu50tLu>p)>Eo&T)RJkW%Wl>4`I!VG9qS0VT+md&VhZY-!cv z(4Nmo`+<#jD`&{f?sJopXWuS74DlzK-cRc&SCW+nRpxd9KLx8+3HIhRtK^+(yG0mu z#p$rFtTfJ&T^A&GX!g^Rc@^78)ZBp(IZ$K3w+g4bp>nLsp?7JV%-@n56XdV`Uy)rsM$U$*F=5)*7jP#e4oqnYKuV#Ij{=OdVml#+LJvOf1(dmu)4BwkywyZBNyTpGU!mbS^wstDZ{y;24Jj z>Q0yONV5kV_TGiOu1XvDp$OI$(^%O% z2es(yQJEj0(Ke-I%Dlx^L2>7MXYEA{DJmHAjC8!yCo{v(Mmdpvw6xZPnbF(+7!CLW z`X9-*+$>=Qo^Vwyett+8v(b|9E2lZ&3aM)V7RN4QiRGs+y*Q{aY(>j=$%ML!iWfBS zTWy|!2nzT)V|S^pB7UuoG7x(CMnE);IEDzaqBlw9x3eqO_(fMZVdazeHA82D?X#mQ z0?e?{ua^&v(Mv-gp}Cfuy#&Z)Lk1-}U@el%&sn;SqS<5;%k3kVbnwhF(QI`o^w`qU z;XPDl!I02c+KMP(FUH+!i>GM4X_^}X%h?SU?vg7kvaeb##hM@@b?4C$PujbOUx)o}LYs5(Ks^}9jdQJ$(ENvV+ux&hZ zt1|RbM=t^P9?b${JaX-u`Qb8j&ib2el{66=L^hqFR%29|zS$t4^xs`}l&yxN#%8au zp96oL+hj9JCqOzn5j2Q@TYPK3>ZKn+YpvAT*XrQozLOQb2!jt;>`b6beX7F*L~`UD z`-8d{&G!<_!5k`rWrv!3%1ifn`p{w1Sl_Z4x8|tZ0ZFP?ro<+{IM}QS1w-;`^HhG( z#)(;Ho=Dctz`E381{Q=Lq!WpeVuA$(+o8SfA{^Ai>rB|vEEBSSs{_~Gdi)@XNx;KvQ!f!}EY??@i+`Id7izbG}{vReuqA^tmd!4dE28RqEXU z?b4dqD(kR*y)1E&EH(8N41o)-MYByItWeaP>s!9aBiQk3K}&@0b1Yxo3q(RgrRwD9 z1|J86K}1_jfTf-|!$|h#xa-ybdou89o@b1@=-ctgefrE8JESdVU+aVcKxNiG2e@?c zzZ>Jv1h;UTNbt4U*-rywBl+Mo#tZU*=ajFP-T{Ew&S-#^Z>$Zz!i>Fc{(anlbY zQzpe7+&(G3a(cg|68S&4W(47vn@MjDKMF(G0Y7iBTz54DiN8BV4Fh>x-2$Xu7;9^S z007i2zv{_1zftOepmu;c96s&fg7l;o@qi}&#I`yKMlr5@%gh=4hOXL`!o%Ues8_EA zZyHGyVC$xFL2X@`kNgb{|0=$c?A007oD?p|yt>^(E;N9d`qfuC$8+$R@BNK+aqZ@% z`UM(Me@-m8EUlxdL8HOeRX)$k$CV@flV`><$42nVgaG{~pS9rV(lMVnRWQHq%1?t8 z7iW!EW@&D{JBF;_487`s+0wFes?A9%m}KZx{*{m^)(6v-R~CeBFEpG-r#GyrFegbV zb8bB-d7QG&x>z}h$hS-mC|y~u?L;a5YF0BTyHfk^-n@gU#nsCbzH;Wu8>&>;)lJO7 zRB_H`lL-S)Q;aHa;!))Q5<6r}t6$v>0;w6Z$nlEhI`vT?k!yxhB?6kML3RKLH|!Dr z%JZ~=;>)+eN!DTe0(Bvd)e*OXDY2`RmGB%iq(5+=kGI~!;Rza0yk}V9MqR5Qf`m=$ zF&6NR$`*K^P7nxHU%1xm5N4;$opG2&kSiD)t?$ZQwWcT*n3TnSA}1cNvhuaD)e}ZC z!~rs4mtAi~duq1y7reK`-C0DWpZNcgnLi}Pmc7`6`cxPiD!owK3e(2FUHv4U4eAU1 ziT+l2*-A7Lly>w}qqh|EDC`G+MA#yq+tiwZSI>B+UtAS!h*ON+Ob8kI*wmPvm_l82 z`BH0t3nThwp#@rODkAfy*j`WiDL3^11YYEv_@Gg=a>c?dY@~Q@2c)8HNGKqlDKBWg zAb;o$TEYQMyiBimdMZ=>EEIvAfg|X#iPM`GVW@QITVbDN_KCs#qC=NrFUG!>N8*1G z)IED(nJ~e(ynLnx=)4>?RA8q#XrRTe)Z}?vO%-;OwXVUxwV+@|#g)$Gk5Q#nOx(%u z4pb$_uENH68usUUfj#bsCn=s++(o?|vqr=CV9P^77uk=eH%C`PkCDX{nL-gMJSvgvTG)4w?@ z_%eaxhX`q7`KHFks20pa*T_tn0NZ-(pW&ILCGH`ZrU^8xeG9eq%*;TuF?fdYxJKSq zQ*M>qYu!L!DfkyF0o?}CE3(kdr8}ALSM@2*x41_zMuB|fi$;Irl5(v4TZID$g&U+Y zfm^9J*Hl^5u#QO%{9TcKtoDEN6T#?n^1{^1KY7W4XILsqWc|EB{I-%$&eb89<;^SG zE&ADZW(xXTm@Z@YJ#VVGIWa3B;bR;kiG$$5ejIA6XIuyV!=!x8(m2vlBomPj6_$38 zb2?~htr0Bl&*z9^cI_Oe+1CYYe#fT-sCvvFWZWM2#$Axwy(MJ&|B-lq6AK2+N5=ZRxZ zHzGY(gi=zQP-&AXY-1l?ce8Z8@zqo(Jm}@s=Li)k>++vj7Xd%>gt~vSHOh#X;<6`b zyqy4c_J3)1@To4_Juy88_{?>d7jRGZpN)3ghXdMHdo$_xqoX78;3lT0l=|j1(8)}b zqUmj0e*TJU6m3H#jD452q z6==}WNN`!p@vYn`fsK(8%ub|F9Gj2xP*=>=Y4f91@Gq5oU?V@FSa(fH8!-WOc?i07moN`ZlIEmn&yI~AOp>kDgmu-B zk19|aR#m9=PmY8=cbjg=%ZAMYT9ql4AYesC6l^DQsE3bMf%#2j4VN>GkYKUS4y4W&c!HUt+CC|dVot;$XqDVBdK-HE@*;GhLX%4t1nE(8|3=#615ADlyj%a3-2M+aZ z8Iz?sJ?u@K2bPHi4>zYZqUdjkn4bE1i}p6iyb<*_kh?*O(!l^fOsDuV`Ea;~ENDfe zuf48}r1z!2(>!|erbTNrPH^4A&1dsMt5?_eAd`y08Q4Kd8*txo{x~-K306<7CiqAj z!vA1!#vWN$I?%dCbGj}_L_3!C5pY?o{=RX*j9y8}zv78WPLON|IG56$Yri+1j#l%l z?+cBn%>*KHeYsQ!79TgT?=L`?HOS!toX}u?_CBRDO_DWk{`X&^+*vt&qszG8R8-i+ zOd5Q;#}fY(|Dd6rYBV*M8oAc}T@+GYksHUv;JvBo-aq*@hFu;ka^cWG+-`{b!*obj zCCVmejhMq~!t_dta!-R-J#=V$z2Eufpg-9Ad;n)fvdC_+z-fniaR03}38Kve+9Iht9v6sv zFndD(I4HmU_+^vc z4Hd9x;P@A(Hhx>P!ys)|GH%8ty=7nWL|?yQeax8rE7!OU(&*hm4R16mqikB`eka`5 z>J&+&s5C{_FfK4T{GMQ!RwAocKXbP6x3jU~dGEo$0x#J3RML*DqF?L!Jb*WaBrdmk zs&09IR`O#yi!95RNZpP^PrHzY=_97h0j!%AUpthtWykp44>-D+S>Lj()>) z8+g9|Mw!96eS&H3msNpd!L-&78;59Z*_txm>Gq3YG;7~+jEmVcWJrL(P2(n_yg!1{Zv7x zB>s~?f3;4VeX{M~_3BN`sTRjNI$XKceVYAXGD>Iof4cX6Pm@b4Oxu@nU~pFQ^&g<; zmTZ5da~HK?vLJ>Dkh&xjePEOz^!?Pg{Ksf-`fu%G zQmSE|5Fa03OvNXE@HM}c=9^!Dp5Q-oUu>V^JD4q8|K&Mk)C0yeU-OLYIO0%d>;|8NM$&$mj~rQh zXB)LM=M z@E0>qSjp{C(|9XZU)c7%uXaX9FNs$L(rlX&qkD8lVIr9>Ru-MP6SW&N5>>T_Dmg&; zzWijmuf4j7~-02Ki7Tb$ge-6Sr%!!#swmsy_ysUB2P;Q@q+$ zZs>-Z2>JG{-Dw?LWfLI!5ej#0NbIkQb$eHD>S4Z4>ht0In=If`epQ1Xx&rZo3=laU zgj^S1@Cr6z=DHkf`mN;-dUF56q;>1{znn_?cMa>y)5HJ5a<$9pI)<90s3y(o*xUJj zn5f4-Q$h6*OpTpmU3c7)H)~HZS@7Y`(s`lLbA7^ozdIf#rwoN>5CxX*`xSvfj#FJ% zeIz{-ur}RA3H^M;ymr&f&Mx}Nj!19F{4^3~YL3FOJuM`S^lCdZ0pHTEWK2a*iJ86ej{mMgc66MEDU8VcevY}QRvmLXQwYGs*u(IUYkiMoz# z8xP~M>iP1owlD1EuvxddDd(0(KNaTx8E4`Xb6gwdo--oKs6h?994rsr)QxWaB&J7} zR0N2ePm%7^KS1z%E5`mJZEjI%!~T|qKlxuI38qK2OKm~ck;x|9%LoN4%9cLx#x=MV z`{h3Me*3?iHAIclIUXrantH`Bx!)C(0wHG`x>i=qu7Bp4U3A@ncp;22e(lp*-3R{q z%9#k4`V~S#!S$e$jE@?QbZ!P1-9DcqRT)@~d?%s>kQ;%n^&JW=?90{kY*{dh5Vf9ULCT8W^ydFrOf zu!n~?Vm04baaJ%*484RNBYNE_S7tbo6XyL z+EyAxP)t&plDlWKDernha|57X(W4?b4nx01|DNUn+ojuK<0}OOb KA6DLXe)(VhZ|N@p literal 0 HcmV?d00001 diff --git a/doc/images/unlock.png b/doc/images/unlock.png new file mode 100644 index 0000000000000000000000000000000000000000..693155b355308434d8438cbff7c5386667aba3d2 GIT binary patch literal 755 zcmVdrcY#XSL?O3Mag8vuz6R+?R-&?%yLS3ulIAvrpziL1FEGC0QA7V-0L}hPe?b7vj$*dv?|`cz#Y3M09Y+cvwt?8B z0Ad@6O$s2kf!MV3$6_uHV>6btsnv=u%xUNk_;=CdH6G$PzLqrqsH|1{XO{OmUso!%q%dbDsp?9^gn|s zfY=6NlLClsAT}w0*al(~>$dZ6oK@Qq0y}UJQ>!)-BY;8d!tI9V`fwe$RDA0z#wl=7 zbMeF6t{EE8!Z7;)|ySlsY93NZuNWCCo8p7f_c3Lv(D*c1uiM{pP6 z$nC920NHJ86NwPp^2TJM-Wzxu87lvjVrpXm9O3A4k;o2P|z9SpWt$pt&Qb|Dy1CaD2ru6QOBJM8IADRsjTwR^$~?h~C5rrAcvBb|();TFu_2cWQ$3g@ z0ukdEb0%E`v6~?9GtarZFGEG8W5t@%v~`)RSw`fKaYd0KB1wc=iJ%e9dpvb!V zN*`swYH1PnT>cF%PGyfhQTdp<>Kop5!OZ&CqaBlkxAe@bn%DQoW7tWhg7%^{Cc-J8 z499mI84qun6e_90l6K`%GtW+3t!aD5h@LCCuhkRf5oNAyI3u!|+Iy>{9y6bW=dtcF z7Hi8JWT3cyn>lTGeP;N1H9B^|2eQh_8n*X&=40j@Wz9O&zL{5kW_@9)j7c`X#`Kj5 z-p}n^E_x7+=li+1Nu=+cZ2S=6!%tPG%_wfJk;f}m!b>;0_q%y?`B73K{tYoTGOCx{ zO73R}N1jT>;mz%mZB@^9TY07DV1Zs)uNeO9>dt`Q8}K8T>?Fj9W-If$E7PDl6el3St85+{#q#$!=z|_jzR3V9u~LB$doJnRYMyE4(_5r@ zgYXd_ZI!&^Ibu}A9y~6~#V2^aqNb_?`fJO%(h=x~BjU%kfaiPiR6*@!EW7bs>q=Xh z&oNo_h{^pavda4~92_E0i(s6|Z%tQ*MRU~n7wpjKgzwde-B`$qcs3Qfb{3bC&{a$x zNR^Z-G44R*%{E@-FA*iO8RJ>elW&6rJtyQAcaNKh$=_Hqi8*ouLf!GVjkP%QDU=7S z!sHnJNmu=K6AvBz*nFa(^M)2_#{Ffc7wpHlOhhZ1xVmpQK7GPrQHh+SLIOL&qzY;+ zZw&F;F4hg5;ZSpEHj7^z8T(O1HD62%O}g5Zqx^|GKvmAbYB^>`{AxVv=45Ke@EKKD zm15DXvAt-Rv*%h^#Ij<|sTn7>FVX~x5ds-y*}dqkEY?xOJ6z5EY)mh z;}iTA->J_!)N)w=xFO$MG$2XO_~v{`MK3&cx9m0$`XzF*azB@G`%ULs&WurSpI`l; z4p9Pp@|@-`*|d%!(eA%REN>spLIPX&;@$fRAS9YuC9}UvH=4)vb-5+B#sxGOhA$Ml zzJ(h{~`lFOzWAn43HxD)%M@Wi}o*!3VA6Gi!>~K|`q2F@%mu@BUSBi3FwXM4u zO_1^Aj)X((J$1HP$Es{8i0+NCamMe#?k=-DmHYNcnH~j9e_frUs-DX>H9VOU5vn1# zmgXv2?WIe&zRJFjKM>{pWX~-$$8qAQ91Dyh8g`Yu8+=j9nC|Eb2q-_39JVqOS{ydB z^^F|CKd_X1!ICqP_e_0T_WUv0rba>_^+}%tCq?zchmblrq4nmSl-ncg zq6c-sGA&rMoXF75P)2dRcb_6u;^H1$N02R_)VoxaZ`>4Vm4N)d;LnYGlzfUFb&A@4 zPP%d3l^Kd*_=#$^9M~`kqu&LhuCA)!R;;`me>aSP{8777O2FoJFWp!vQ}`j_b%bBG z`%2hJ5@%FEdL)o-C^=)eX|mZHne+*grdD_Gz8(&48PN6=-ya~+Y;*N}NhZT&P&=5J zoqfuiMS&!UdSUKKRUaEh`nCJJB8J6mVSskmXbbBDYf_LQA-thkfLP(dT!4WU(-@P@ zwFXusNJ#vi==eu0(Fg=$BtU8iEMK;29s4i%p%v0MJ&a}3Pkw_2^ka}m0vWQ|UpKdZ{i z@!ok~V6o^nsQJin{`R}p=WzHfc#Cz^uw-xT;7o7mq14_bvVa(^d;0|?(kRl63@e2$5Xv8G6Aa|eP!bY>ZKJh+T!2Qnzvt^%6i~V zTsnVBmcj5mhm-rS{ZxFl_3Bnw!EUiG;ZPyRH&f&m5y^~%*s=uI1PU(=0g~Gcx_3{Q=*` zblV;`UP>uBrL-4Po7ojLiEkk zK0?EiwkCw%Xp&0?KF9UeivGeY@q7tyF+G-@!oe&r1JzrvfBRUoodq8+{fJ(&Z>gwE zvC^w{I9=;@VFmg>%e>e{7}1Sf{?x9GXBnZslm=#k()@!x6$*k;>WZ`qwraa z?>R*Y2`61m|N8NdRf2KBzcGtADhX!YfO;7!>+7@ZjAyeEuo*Bn*soY0CWG3`~|C5l;thd!-T`4cH zn?#HIaW4X)9>t%wYXfCn-Lfaqh_Cj|GBITDbX@m;N&HTwKR*e0)|F4^l&}j;QqGqw zt+(9#VK0r8wSRxoVYuvnf4osv)vn@`uecU^&B(~udvmsFb~vFpCU7G7-E=4s9--Z+ z>(yktpHF>CR#nH7j(i5Mvf%T>U*pHSOKXP=;IZh}S zBJ?Psqsf*#thOImK9?AFw1apZbJQaCk!9PdBxA5P`(ssguY|j(#5a=7Mn22j+Rays z9LtQg-~VBHx+s1>bl!XCaa2ENVEkvfiBlm9r750GXM4xkDplV-op(3GMK9Gz@)mv& zJ12%KOX|nb{C6=yApAEj=L|J{jB`?A&nFB}dTI~D?Hy6kd*00Hsm>{h!Xe$6c067s zE%|RswwsG;da@xK_}`i>H1quSrT?Sr(57xzxJ&+g6V7`zZ&G+~WdVX&{#9=?CrjhG z5lJ`vd`XBM^{t>lyfW#cbBgzR*@ct{F|c~p?|Mbk0+b`{6eo`%R(W&U^Lj=HT*p1m zf56X8eT0F=Cs`B@*stfOnfT_ z&VCRGSZ0StY(aEn4+_%+%(}F@i~Y@Ss#p@;S^jrcO_&mwKRO;ifPt`e{#t;T+YAv4 ziy#kpP(F_QKEm2E_$|XTJ%>7>D=DVsPqUospJi=3iPtU7ygq-LigiXX+*irB`KA2# z5R2!D5Ho!_uoAd1BWUt2t!#<*)^df5v$au(L|9zwC`Z}4*2BqJS)2DL_bX$GxFo~4 zzi?aS34MTv7Aa)%m$D>ADZYPH^VT!>@;IFR5XL?+9;_vZe)8pwO@Z9+RxcMfHE>%H z9b{-wjfa;e1v>HZqi`_ou=p@9g@F0iU_wow6%rY0!4Bkacbr4VqelPXXcX#qqdMk^ zXLh4bn1xS)MSe%%fBL>5_y+T%;^`6``LG z+iU>|UWXy`38nUqQMf%hF1^@NCH0m#44bFjXlxPB54-Qr5epA`ebzoAP3us4vI{*w zxYXmr-L9An#HG|Sr;C(b0~tb1*GcGZFF(W<+4!}Av`g5Sga6;J1x>rs>W@9-PZUD8 zTe$Ufm}3a}@*&*cEGLYbZZ@K4es|NVuB^fHgu%uR`#;{5R=gb6anY)H2py>v%l!{T zRE+1hXa3P%t;u4Yl{JfGPZ-8wjnHV$`&Ut@43#hoGLq--Qf6NN_Wk=IdM@z(#{ij6 zNd>Rv?RvZYa-*_6At9meo$C?08^n1pH+&cogP`uS%uX|e)E=X!=k@!H>F7w*gl6xp z?)(`m!UNbns!q7TF$ylrlrOc36IFr9GF-?+`kw2dZowAurKV#?!h?}qT7`(5oG#}> zbY=Ctr>N}irhQTP&LpH$r=z2f{OoUm8yRUYEd?P)#CkMb!$ObYxPAk68Rf8M!Ng1X zjRdPxX9+PMO@k_{tp+@|ZPty7N?bR)o_14|o0`v8L!BR93CF$bmKq$epDj;cE{0?4 z1rsof$0NXbL34Sw$tPZelw-G$^)>OnL17R~!0a%+G5T+DR9HET5V`G_wamvU9zs4x z62*Aa3~?}>i(&GK|D%0Oh@3qa{wOh|9|v+s5L!NpLrZ0n<=6>eqma>Xm?PdB2~+$I zFr8Zu;KoCnVGj)Az;t)>!V2dOg4G0dz+5d@kaM`~jPk>YN^Fz44CL@VgZ+d(etQ+` z%?-qXkeZ-ac|`A3uu;Clq0sY#93vf_bBPg^*!!U;ZPyw$PBEdIr|f(APLs`kKswk$ zwk9>HAkS3O#ukqNRLroVk9~~1+H#UoyH#;FH=Hby$|E+XrijSXDFhyNcpv1%*+6TE z0Y?woG}2HL*30WsX*$>lm<4x=n(q5){toplad~3 zb@ddTXxJ)Pd|er5c7^qvU`!QV4yAqdlM`))lA1v*`TU z9K)-arp{2;_h)f@<;gLk?C3d0F>u`yfbUV#<%rMB@nGDnH8pcg2yl3d8S&{WQh$Ot z7Gig_DH3C}(9_Lk0~@Fn^{)|4Mp7P8lF1ZqCW~pHISI@nW1{kfHMou8mtID<&R2lf!*$L|pO^ zSH$6@`I&er+K835PGN}{cOb!g%w&P~lGrU$B{H{1Qb+h$W1^jkcw-7DufK}f4heVh zJUYab_I~AYs9dUI8 z^;J0bl#;nfe5o(zqfg9@L9=VAo{}Cr>0tciC#jKHd-PZQH-_H(H1#RS{I?tpugpX6#hr>_L)@ubB2*9BvCOX>QVyXYcOJMh}FQ{c|S1vWyswwehfp7 z5+EiFnRaD2)?59=ATjmR9PtE|bLtt9>X%#me&NX+p=X~z_S*$-*#7f}zvHQopO8)R zzA+AurG3W99Ntq5#0e7Z1`jlzA)8TTgI~jueReyX z9g6zo?jm#}!)nMroiv2kDl91(OH3n``3b}!+F1*MJ&>ZfMbV$VS{AbG-M z`?mUWVlWPVp~#fu?xHu8@?8?7(>*9e6V{GiwKC1++ed(2$|P zHBL$zEQ42Zp_#Mo zL;Jt`CfI2K;feZ9jF>~K#kR0I{&1F1=XNi|1MNw&N)F%LnPt^CtOnz=-e7S~jM)6p zC0bZD!kzhYjClX|o3HffsKfQXkFQGGKv>}j`?F9ALsJrsmykkXlK9BpxU*M2u=U&@ zRX5bh!TVM}%1jG6*!L0UT+$L{1R73SbhY#O-!s_b2h{bQ?bA}3i2jWPXB;&xP4aPw{go|5zag}eq_wj;QR)H-y51dH6B;NYo!$@bxeLlo ziL%ZHv4ghx@VgmTeFJM^aV1yQ5X_m(kjdbgEtN@jrLRQiIfYJJvI3sGCfj^GtSFSO zivgeYk=4=(^5!jaH~p&Kh6R%KyeSD{cL7PO@Hhkx%cQr&K%S}Dd3!iS)WQH+_t0iC zPh#U!z(c-PjcH^?9w!MJZHY)Jj_;3`5O)7=VCs|GNo7vyTKfPv?gMm=La2v)vl&p4 zHC)!UUN8k!ziVltwFMqY0ypMf$jFsmH$7@`KB1794RPPj#IH*e$}iPzMnkf87QqxX zLe31UxC*=?6@4Pw*fFZY98x@T#R{3zL?N~bi=;{RR)CL5du#WFUoIvLgJk&80C}WV zZe@*J`=^HJZmeOg7es7xO7XqAZWkv|vMn$~D|a@^lz_c=Gd+emXZ-U<25kDnv(FJM z`=~~f&~h4&Y7{sjspk@C8+J2G&HMiAnwy!a4GXn?i!!$H$0s1Q($JjHCGyt=ySYf;~( z&nHOaz7)F23yFm!@gKvcHL5E9unV;;P>eQr$%_=%AR^G}bcsFmlQ;~bR*KAE5331@ z3=(z_BEB*qsrjBmGuz~{E6iB8qtgyjk9#6yvjq$Sw(~c*2i3oJ zetz8skM@%33mF))5A(eF7b8ftn}al>*h3G#SfCB_@X{|C{YT)=opPeHO&Q7m$DWC3 zw-YYN*tUKMXxk*);GxU1%S*yxFdaVj_Knkmriu8mts}G{U~0do89HtSf;>Cu{ct`DhE`s zXl)rF0DY(HJ=@d4`~NE`v7vPhUMrGMr)+jVX4I*-rjbL~+?fik3(|lkdnHd2Ia!-l z`5mw=eqX@Db434MxH?dfT7cPerOnI=_hu`;mTO6?)cQYqe+SBMZQn61R9>RwDuMq{ zmA(q!pCMzsFm=dEK}1Q(Ih-`#k*(PPzWFpUB>ck9=mCF-VL7D3s>tR~|)1cDyB7r0qk@ALlgGhRFXrtJ3!3Ku_qkZ&wB8>(+7DC{z|5dRDx-yp0+p=a0S=bZRBN&A0%< zdO32a>{`Fbr;qs(a=-FNhO9zm0UBk$EhnA(4~VkN{1-&giDq=EY5ZTo9;F%B{b)XS zmJ^PMiG;@<@9*w7VYcsi2OL0>;9H&-5S!KN3=(Ld+&59!-A+b@Aq<}+c z==KCjxxDIm=YK}xmity6e!w~{2D zpC0=FI8*4v3(%K7;Jv2@lx9XbBwi2K^EM_b3bhoz{o!1$en5aO!!hU|=Z=%-wAr7h zTCA`!Z}KT6bXtiF_IXo>gBN`SfIn=2jW#*^JN~|`Lv|df2_SI-e|VjM!X^svBEyMj zH}~28cQUpBmYLnr{$ZcV&oAlZ^xfgN7yy3yIzPho?M>#-WNqCrtmb?SpUD*qFZiuf zWzg1}%%D20;n%@j$hkx55Dj_?yy1KeG6W93+@5{Sm6);s}Hc~)G zNX?B|fQ6!ONAq3;O{n|@Az8;#n*jXMnuQNp09({qu^^`BPs>T=Y%45696R>L3cX94 z>%Izy(}wuMYT)bvYl|l#(#U&U(ep@YAI!8?1bdtq#5>}g2jwqB1G(or09|9LY}z5_ za6i)Guowd`M7DaK884uC|MuFA)Tq!I!nF2{b3_z+zF&Q2t+fRB;&v~)`6+2}hI5o9 zkogyJgZm-x_PAuF0N^%F453aHU*x6OwEVmCa|6iwDQ9)#@1OPDz4LlpZqK)k0bsLn zwd9bRB?9Pm-*2CjiYHD)bdhKRmVaO!1|oW|vJ@%J696Tm)442$$813{pM>tD-K{rU zwRXlbZPK-hv0~v&gAR(~ad8kF+1}bMQcs0&SiIstnRNQJDcs@z*xQ9f&OCQ49PT>t zh!KKiA7!bsX6!Qswx0))7Ec)>ETW#wvaF~yRoB+-`{6s1$-I%kx1`9&+d@YGeQy!wG8bf_O zY?19pd+%xAdM0@WRODrCA@SAN44W{8w$!QpxmfRzJgqei{oI0UD>nUX0@%EFo#tfUj>NfeJHpGJFoNYWp0F~ z4M&|(0*t*;PbybrT9y;eVQo^1TwOOLzC?7qi{|bPUfyo?oPkf|kKf*MVV{*g60B2G zoiejit}v5`N?!nQd$5j+3wKkgq_iBll!j#c0eGt;0kR}!w=e}5xOz!s6s`nJCJ_;z zV>LvBe!e{@jmu%u1=9;Mi~UouYh+cYB1h2Q)HhU2NKpcv(r%lE%h}3<a%<+{VGM?}St~X@}FI`zbBokTKpR*SH{6mfw~38Bp>?YuB0&aURrK zj1yF~o=2V39&U>Yg@~sN`d}`+#cV`;z^vU}lhR^{%IcXj45*k*4EB1%{v?9rV(xmp zsE(O)xZG6B`*)P9kH{heqVWFF^$bW11}|mV#tYq$x<`74B$|QCFb+ZY!(_)auY� z39{<+EBIe8*4q?r3}k?sz;Fp@w^%spfV>>lq&Q=1)Tla!5^FeH<3W{9nh#mEZ5{rh z=2s7#@KF4bI^z%Dgh^T-;Iz)4}NM^>T6EOA{!TMy_+823hCHy|=(_s9ZC zBMY1yhBr+k_j!<8b@Y21U`cM%iSqS05cZ<*nZyChJ(I<|6H}FgA}bWKMU`+4K2p)< zC>;f|`}Ajl41?G0*9lT&*w?E89U0r@9w)yKl6Y@H8bRlO7HW%m&w6pq_@eDsnunCI zub`~q(X7qV@?YP6ASE5}C1pR@L9L`%>hE&6#Y!9p;&dJ(N_4#eP!CP{FWfT6P72M3 zA60^X1Zw;>OVy`+>8t!bT?Ig@n>e`TG)k8<<iNUpZ3KS!{2FpAUm%DSxG<<>kPFDJwPHrV)8A~)<;h$z zqy-|NPi0`}XbIRtCISI3|9XMg$#e66+rXSP4ZtzJW@(MFoy~zqb9st7~i=GfE4v@cq?sAJDw{Qdi#&?Lp+D(gp;^ zR1fUt`{DyGt-v9%M)Clpg;?Q=NqnZfG z)Vxaz0MI{;fo|6ZKr!%x5it^L`kXIkG^5KZn`P0#yh^Nai0JYCHGo89LKHxPNI<(Z zL$#`*VK$*Ec3wzl&R(Q%>}+#DZaZdd*|avo3)br#neIa-{~NnO7{6B~t1h?OsUu_R zCUWFS>pj9b$jiXIlbUDAOHT7Y?Lz7U zdPr<8r>Y+(aM53*V}XO`JTJ zD#os}$;i_vFo;(57M^8QzPhEsmg$gvBs{)4fiNqWsGvFTj!slz&ob+MK>OZQ@u!Rg zX8g1W^XU?07V!CrqX*9JO8cqUwcyx?U8j_E`bwr1*?fTrGRN|H21;GC~Kr2WfGnPzk(F5NJmk*SXvNmvSy2!8uu4hfTs z0^Y@pKt*fNVjQ+puBR~x5P5BH*M%^kg+9ihwTUHpzQVgjJRFX-i>Ic=aJ1#3#el9P z6v7*xB^Hshi^ZJ$8ZwsagpAFN*(G|5wE-p$#}e86&)3jwu?VAVvFexI>1_I88S>q^ zni6>9Kg~_+4D-B8A54uGr8-SqNo&Fg9tE5^#DZX{*{y88$))%%c`qkf{KZ6kL?WZV zT6R(7@V#;5TUX-$w<`E2NE)5eIL)H=7VFD01a|=iONxsA(}rJXncJyk{3;0_nn;R= zDG$^o=vDvLC7lmrDJdy=x6NkF*-PK=WD4gB)2V(^Y5(KMWGH$LkV>S$*`qqE zsjU!!G`HA!xZAhZ)6%m6&iRf1{m{bnFLU1Fmp3%RE#9Q0V2Mg||Nl-S_;=!gCctDN vA>ygRs3+K>$P8eR2IYTkRze!q#`BO${M+W^Jwad|A&iWKf_SBTq7UUmPB`xM76qH;HC0S`5 zPuPC5eKGfp-+~u9HDAm_rUBIC3@5%G8Q)f%y^IiFQF_&$kQ#;<$BI>6s}?H3Gbw?f z>G%ADj08*=52h&|%f~FU_Zh}hkLdbww<=b;l}*2TeU+s6y&&&Th=h7=%G}Vm{9j=; z>+mqKmtQuGZ4srvwcs{W<=WNfr>iz_n+gBsgJ#t54>nFi^678POkj5SfS-H4-KSApEhspD5ZUx8MfRB;fBEQtlX33o{t|nL4-j z;C+bvhEL}84QqobEd|iON#xb!@~Z>SVmgPbh47DDdLJv%%XR73{-6yxLuaTBA#LMq_}?Mh;9#{zqWH|wFlwvryce} z)-OKhKoX2xbj#-)svi@ad$Jv;CK&B6*ASJyQOekufsB61&1rqU9z%DG-v>k2yMwV+obIPh9|K6iqut38V5t*xID+G_ltt1KSSj zJ8W3*jS64A{TtqS!vPQ~XT;n76I91w868a!|4+Psbhv|;M0|KzkaQ|w6AOiOZ)7`p zdgcbh{rkV5>j{7xEiTJ6KP)y+=U#*(g)8>U^xm7DGxUf{}gHTPUj^On+{XDAl{A1EO=w_l z`DjcCQh;IM7$A;VoBEB=#ld&~>lMNCf018?_x~|+1HS!R7*YBE4l4g)$0@@-OCcH9 z|IfH2GYjWI3eSjyqkuB#3o`I8CZgew{?W%rCo?xyR*v)HSACzXc#ZW|(6YyN@#iSO z5o(MGQZq5B(k0qxR78;G4|qj06##f$mWfc@N;(so0Ur=j6S8!`!Lb(e%^u}=V53SpPyEXPl^40%z}q4ym>lm_ za|T1<$;jWRcfl#j)p07hPB>+NrQ9+I{k=qN*eY`CODghDj=rlj^fy}ycRh<2H2%lD zx80kc{cnHdDY!F?NWg>~-2j1vyY0OuZZJQe@*qf8ia8Wx9+h6W*bysXQ>C} z2^@QC6+pQ)J~b&vs8v?DB7MMhwP20@I@sT2Lm;xMs*2Zl8K0}P2cA{}=%cH!4ut5C zwBrf`7UZ#}kbVJF?T{Lp9*2~vKC)mf`Ifev-mr>A|wyBms)rfb$;lIj{OO3C)jeiw2@cM15 zw4VF4_U?x^bLMHs!|IwmJUn*lea;V>DgRPjY=yq-TgOM=Ec#&9j(;wnx!Z3cEZ3dy z9ec1w_&eiQ^udg{NpaOWb)&*Ozu1^*k7o7it%;8L=}bkQ$5DN8$=ea?7obD)tDFe) z+{ZVs9{BcLU3x?%7gyCNT#m#p4_sUMZ!f$rn7_33FA~{%FQ7TTRP=3MIX&B)#PlWV za~eYP%{Su2>my?l3N#;vb^M=%h{!diG+nGjw_bj1y*yg(oHF+R#LSow|Gn^c`7I=Skv(G-AS_KnT%w}9xTLR5q@HIY~&=&>hJ!AqXyM# zhP7hH@R_0IKJC)#37ym4M6}(8mQ}co>Z5qPOg9}hqvsebY$rtHjgGNmr3(u5<4??{ zVrphzH{!{it2i`sa@MyfFi47rSg_{eb!Ksp$ywOis;GRUeXYQv4J-L()Hv{IcC+}0 z4t)_Gqj(N95u50d?}6)QAHX;nS?HWWO;0%mCgFXJ3%|?hZ+_6WWucb>PCWUs!~u3V&N$+isKGz_}dmu%n^pzCrJbnttTj2gj+wM0HEz6p56d{De!mEbz|Q6aHpbvwUiFAm+b~$sYIpSJ7CYd|?JN*Ie%(YU4kp zf!?I(Br!4wGh&L`5zUumlRl3_h#4^vOv~NU{@;1OXTjt;qJwXfjFa3vC)$)oHOYR8 zl|U?JmOH|S-BK+Y!qx^>CaA6u7IW^{q<|69bl=R^QOByLKbh5rnwMT1EtilgJ9gX( zHN5aS{8et>h_2)-Rb^^XcQX4;)nPJeJ0j2c>y<%Y`kkAOOKG-4{MUT!m=gb8ADV9K zI~3Q->TNSEJ^}V3s6#Aty>T5+M(o--J#b&S+8KH&q2Te<`f?JNF|0Xi^t~NhCl^eP zU9=|Iln$2q{P?US(lmj$iF1H(s-l!SY~Zzw_)W!&;e4ZS&Z#!W zib2qi=Dnw)6B9;7e?%Mdtc`M~z!4N)sr*Cm6<5u3@||Hxo)VuH>g>|#fbng_OZ)fp zIvwWD-0N9G^U-xp66UrT`wg-CVFcAhIbVAma(n62+~A`VH?}cXsr2ZNaZC<;V#jpj zbPg*1szdz#vfNd-x*qZ_)}PAU`Q4e+_63-2$DNr7{Qh;*y&eaZOT;4j6IuE)HPObq zetyW$hGMJYBRoQEx(Snl^p{;~v2S|K$PYR-t1xV%2r_w?h3YA17Jp}zD!^!*EPv-X zIn5Hauuf;60A0Kjo`=Fmn8#}4TZQh7YD)2LE288|A^Bs*s<_g|(`nNA=Q35BabL|N zFS)dTF9^A>HZm_Nz;j<%Ui!&>3O2GiG&oH2-8@;n7Wkt)9B-O9j#68Ki|7Ys@DySP zN7;LyZ5`gRbP-UjSI|GM^GutyH5cn>Z-=!v5?s;F|7hZ9W@eO)XzI_{f|MkaIJ<)X zga}EgRic*sH16sXFmRtS)D3%mxUq-%)l-bwk8|4Wt zKIl}oSseEoYBu&Av`buWJSS!G|LlY1-3epy8FN-GfF2X^wfe5_z&!`P)}dj2JX=B- z-%dnT5HAW$MZw5CxK*m1r%L?d4&ID;D}f`30lWTydu~K(NjoX8JbXfuTvRwsS02>v zI$tMXpj9+SkzP6aWyZT*p5RYKgZ#pWpY?8B8v%L!s%b@4tL(9tv_gNJv0W#G$kF@j zqd{zfGR`(lHrY#b?|;0$J@iAJcn`fnberrbKGOsG#mPx!GJ z8O*}J6d2X107fR@d%uFU)$UBeLwcnz?v7F>V!g)8j%!C~qSS35-8FSf%dSRp?^m-V z*90u%L@jsZ{GIT0eplj_(3baCxWv*qwOLHlnVpAa(R?$%qxPwbDOl#l!oc>S|6I6H zxB{MuOuDSKp#C~R_=i2D6GYirGk>!z7M}@y@t6Kqx$3jMO*s|OKs0*p;dtoPN7DMF zQK9pm1MkT{lj}#1ZF(Ci(dN`GBvh_w?X7c5dyFEqyH&oc@HU@qzx1Ca=g8fIv>wy6 z9xM2tDcpYF7J~hbeCfM_?SF**5n&(o73z0Y>wop~?(F51PHhMjRcxPS`jh`x{#TDi ztUq-;iLxjsT-RREc<;`$pTs=|`An6NaO2Z1oO%Tk&@s<_u3+zD7IrmFKlQ3e$!r|E z0mybnSc|=8QcirA#}5qzn))BfjJ^;lRA3xT$9eQ@Z^jIVsOW^PwBB{IweQv1^H14A zC9j+me-3(upabN{<@W53^!p7Y{!&Y&HM zi*}-{PnVJbv*)EA&AUdDCyymp?nYhWA)cwg+<*act}@Hd_9x%X!#{O?+|9F`H*I(6 z8mJGcvKd$on@;0upBzG(*3Q>?{onH|^>~A%-ELR1&pBZy9}SV!@I4(u7I)L0zbBxpt&5a`LvZow;+m430U+-#iY^Yu|?kprL2 z92i)_+mz!gI$g~R6p-aR_3i90v=EquBv@P=x#+%e5Ng`x3P9MNJB4=wOoHtIgeNvI zS3<1tq8hg(A^V93wL6gBzdBei?7_51!r-#h_svlwI_hLMCnDoS>6LIMH>GOk&m74P z4jS!8RjFj-HjuAMOBF=H6mz|e!@!o+8N0}m`r|r9b7>wuu6e0SX~*r!jv~V4!Cul> zwuGC0s;yT2m|t8}USN6Ep!Rb=BbA0YV0crhN4N~B)UI1wAYYt_e;(OSZrowP&-7if zdZ05?#=lV_cMd^bz?%AGezRDFlj4*U*^5QkIE=tQd^38@wCa>Jr=~;MK_$=+U+LiB zT;IuXbV=?{J#f{brF5d}>lHw{ znB&rvWb%#|YJ*Y{iEsX~`51k+G9Q}5Qw$PL1Ex=1n%W6T-^u$8>l)@xN?BP{6<^b; zyEI1bkTNr4RiKQ_H=gfN>+5Teg}!~GTt@z0)_Ps}T$D2|hQHM0u7Rs%cPHg6kCAUelc+mq#wESI( z=Dq!kxcduKZ8Ja^|0G4k56IdE^{oQ#+4X~6P}5B7DW1R zH;Ge8Q8j2(&Cuvmzt#q6(hf9G=YMR$M}+j)k0DxGy8N6!4PKU>m134QVj`4x6#g?} zIs*%TJkO!fv(j4YKl$p$k5mx;v^rmnF}2jFi;yC*dyDz;T z*>V)hTTx7n&@XIQZ|3|$|2Bxz-Rpe`7hz8 zNJB4a@UPjTXGwwLI**5F<^C>3%@iO9x-WX%sXqRXP@yL}=LZKmYX{BlCB52rn}2qy zOQ-X(Zv3S9`;y=aP3b_B3^aVY%7osXKRYId_8`GAqw#9aWjCZxER+U-_L|WWNE^Jj zE4*RRQrQ(*;|Ba_##ggbEq^BvE{#2K7|?k5m0pddx19L^z27fbB2>s$sMpheNB4^5 zRn&cKG^P9ka9ylrRqWk{)w_+~Q^rnk8=c`q zy|2!J!u}-u-B$RhJ}-FpnA19y*!5^q&HNFs@yvnr@wp4PVIJ{{B5re3)2`9sU!cwT zG2(xFsyc!Sl7>-(9_~Wc+Jmt_U;Wwy_!BDJlyZ~2s*=2#U%Z*0?1y**HY7yaUVel_;ABuS#o+xcx3qCns#mSIZ$@y>~x?TPz9K_qDRG9(2WP>idy$1;(nT>7gFFxbc z*FuX(zQX76t5jy)_@06&QivoA_OEe7ZGv*UuWKT);W0v>w5eZ-l&h#J=&X;MPY7Qt zvY;eUzZ*{@W5lFj0N!QY-kZ(ab^=>J+#&_jK87hv97n#qULv|R5rh}9`%E}q_c&ey z#z^#c@s5QypN*+}zCA1A_LrT3x7^IN-W2)&EwU~BI0d)kE_tgo;`M_kn^%9l&=(b# zpKOI$&rY*fvK|jsy+&sQ=r%4TD@7bAQrY}Z*jm>OS_IX_rVsB zES$%g3ot$$w-dcP+S@CuL{S)lKN9ymLV5y#RGh0m<32!wywAlzu08ylNPkIk7oO(B zwGN@P=qIhy$u#YQ&qi!$Ej15N!aSMVN!jq4ZBQ?flPt@Ee+jo$WUDzU{kr9PomY_c zyDoyMcz7=LU&5Wgh6z;|PMA2yn|&!=)!f_+h&8jmQO=}|{*K*@M-3!V@SwD`@_oY9 z{{es}_1#TNhBa*6>vZT@D-d{Qt9ig6Dr;iC!yDwJ^2%dAkBajtmx^nzH(a;jDZ4s> zzt|<3CqjQi-3#dfYX6gwwO|l8e^4dd>vVc_+>Mt}c<=;PJ6P~oPPXbYOr1PvupC3<*LYU#H_8hWl$8w}1Q1%`(BP}vNDfj3@#%Q(2t>~eskBkKvqu72b+P;cq^ zz_nC72+1c+SJpG3XRo~P7k!;ZFVOvA_R=#Qcy}XjNh%pw9qY?6>1CQ1#B(CZ9(Kt2*%21F8fT@sSP9^#Zp zxc#$;0RM91S!<*W#ds(x($y2Y%hNTNkdX8s>9lk+%jW=Dc|RlzmcgkQMR}BZzxN)b z7za^&Hi{JFH1VwTylL~r%PetIDMAe2xmv%E7H^gr0bBL>ka7K!$AT$ydwFYB)IlhhL@58g7zW3s;o*`*_Z&)N zd!IKhK9E_7-B}iDIlLY|+?#(BYQ%iP-r@O$_+e!%m=*`DH zG>g|8&)%c89LG9}pZ{__D#~YMBnc-bhOzkmJuC5_P6Z@*445&5Sk8s;Y*_5@>{Th) zso2AhPZqFkqRU;G*PG28q=|)9+5=gUTPOxXUx?K1cP`6WnZ}ZVBbt%FEe+J+UV_|W zAtS`h7Rm7h@<(n20LGdR?wC$;j$zd?JxIw<6J4`C7Q8mU)GmDegfm~u)1~w^ANryR zNV<%|*mPTf;r;)facBql4|f20kVOSg%IrEb)bZWvN5`gPEMOW9rsZ&=WA8&l?l2cZ zsN>1=#&H6#QE^T41*J{|88B`J#MzQM%iqjxH9zf?yzXq?^_!NXir+b$#&I?~;vH;q zGj9wJhE)$*DBQ;*7=cE1dvH?gH&^S7&IcR>b|tRdxh&=^^P*C=sKIa;{}gUQ9%Yar zj#+RKps*vP;U8O67SJJAe`Idnd2#6VayfpQ7~`Uwn}`SyQ$!0HGn&k`u;0I2M~;R6 zFpI1mmf$UG0xJ~y&G0(JCe!QHV90s_=s^PkNA^RS>LJC++4j#hIjJ^eSSsLwFdAIn zAU)Y0jQzL#@Gp;GUH}jr^S6mQjEL6T=Y)D1D0rp;06VMqR`kLneEJYr**kCo!#osa zM|y%UQcvbfbnD?^9%Y?wNNQ@R*v~Qk1!pY!yqD93RW{OrbJ2jMG~v)KLbWYO_`5P> zDy`H57TD1$f?_sD#hdJG^fsLJkW}yc2-_;KZ4-rC0DX*lYDULW7DqGfOGk^oF2LO#ZY&s<*1_&v3iwQHhJ$=*a~;mo6y@;>86QmXfcX2Xcb<#VKrp)w0o6pv zG%KK>8sHZ=jFU+1>{n$#=OvLXge;QLx!$|umf#LCIAFDw`y%we1$V1{*r9-%zc>NP zeL&_(KxSw1`+YI{;IDdz0@=8nGuzwn$Rk)k z@Ni`^5&8w+8+3=ukG63AR-;MtUO~Z4Hb$exd}9qhMlr!ayV0v03JcvKyf2T{0A7M% z-Pn58P2D)fV)&jQV*oI462SoHTaaI)^SfpkFmJ+eBr{Eb=%+z zF8=d+$m$RT84^J~RJ*#sWt}Eq@bVPe5K(YmR03ZU%|0r@2v*$wn%G?W} z@;Lj9_Ut4R0Y(PGLx35kdo8Sre1oC_?tg0#f(#yEK(6R4=(biiRXZ9F7@@!9D9)<^ z91a3bJ<+gKElCB!-2FQX3#Gb0n5&Jw=O$OvIsN4~V5Wd+7_w6%C5NvAoSR}x0g^RA zk2g38ye{yi8I`$~m=@p_&Km!h+2zny*YiEMRwtG&6#Om1eg$p~xcPDE?(XiB@O^y7 zu6KY<`glx8ynZx*XsB+iDtcklX9Mvx{-K;dOprg2bl0{MsN}F ze!S`@>aX+!4O=>u04HT|_>--a#R)y&#E%VlxqYtGQ?o-Xt#wK{f;8G|!VE+gu)Aw} zLB>_;0mk3Q<4@zfKX3dJJqoWI+6?+@8w7s6Y%KfE_8?l1{piV*+VW`0mDP|W6%lHTKU5ydf_cd^IJwz-}MImk8geyQ$&&5g@vuL;6}EnF6hZE;^jn1@0IhG zFD_c%^?mwC^sACIb6;AoZDImM2d{8=ng`91H>RuMc8jpC2hO)))z7c1B?FXtd9{&t zH~9c{wvJ+5lfw&334x^=Q{_b)`t_A${46V!N{iXgwoga}d=sPSC6}NV2u}etqaPN4 z)&UO~eg}?Fc51l4x-!oSJ@}DLyXW*iYP*4){j1bl6FyOvsO^UkHTfQ^rYNmc-5|Ut zJF}o>w#0(poLf*u2S0qYar8(o+An4V?mn-f185o?Or0(O^rH+@0rvn-N)50cKL~v; zX4`~^5dZwM@>(m6*l(v9FY$;biZF&vAfL+%5tJ7)0GG+X57fNLDvlK?LQ8etPz7z^{O&Lw0N30SP%#qw1J#l;iGkKCynqy9EeXNx*}e?#6~AqiL~Krr4~JD|x1WMZ?_0lIaDwZRuDn51Xm zp6C>@Hq<##H^;Rg_vwZd1NK}?3rbHDC_4ssy}$eKK-MJIZ+X8+2?rjv@`|k?2I$q zZe$nIX#Hz;VhH=d@CE%BnxQpF09@@itXr{3;Bii7Cl`{Z*=o-i;@HU+Q z*kDJI2pQrU9tpu zS2-jTYW7n4=O+9KeP>>p9*#4Rp@dP4qV6ibs01>pXelJ1m3;8sM-*sA`TruH$QV^P z2#LSJ*d(+&k_|MmTTS&!=EJI2z3QOI9ZLAp{9Pz-$zXX*=Q2OsB!&2oJ`MouG$`mq zc@4M@wH>O=vO!tU=81)Zg=WiV6gU|B%PWr0&OaLaS8$yEy=5UY!gt86JvcYRnNJJH8E+}XWR@J6BSeg@gg8rqGBkgC z8wcw5Cz-Ppmmp6R{fL#@L+EJ5u_luH8w-Zd3MQizzVyPa=0Z((bZWF`s-vX48ZF&8 z$5SGj0KNVSZLKGa7{gfi9_-d`PxpIC{LC|LFzZ|RV6MztB?sP}tiiCBaoWkU6 zQMH?*R9;RQM5lK@^@DxM1Qjs^cL!5T)Jxv!%)-OG!->gMsitr`xV0 z5#DKvdMM^)kPvj11Vz0KJ5GRMCS-{hG2(y2ot9|xKp3FK{rUR2(V#kkGIH7y#fe2o z(ua2IEAfhM0@OZu;ma;KfBEotvBYX1MSv5H<&xvdg4e{To0KxvQGwSMq|(t1kcZm~ zWWsZyk({{L?0}0S1?$nsuh`E~WTZp1(OXo27=dE>Naz{zF5Z{K)6JN5986Aw3-6dg7|Nh5lP=1N zqf!GjleA0X|NQGQC1rz~5y7&fdMV1{8(s`zjy<&Dn`|q65m^QPyr47Lb4SL2dTMRg z;Xrb+$*&*;T3>Wbi$WT8fQ+~@S2a#J&Z?+58j$sa$fECYC3dMRPP=xvCs+0p)YQF5 z(lqY8r;UR?^4+8YUd!*{hwe{9PkX%sp^T*UPUD+KsZf>?BgI~ZY4t~G34(%WluK`J zwn;E^VUil)h{rOp>W7{r@{U1NCVh&02)1<9H@L@Bw8x5Fn)*{i*rc$DKDlRy1hDG! z&RU#Om8{0mrJH6v6J5Jj>NHWtJYut(r4aM`IN~_s{1nxVa+|pRkR4J(rjfBxVm2O; z4`pojc-O{5YR|^7Y2a7KDU9tr*T;_NPbH@BkOIk%X+LBQnWhzCyU(Dn@P<1Zx|Inu z&Nyw<>I|Qji4c|x2KK-;Fz>1v{)di92z1@wQ6#F)K7R}@l@oG7Oxnz6`glrv4V=G^ z!x)F-+o*=TVEF{|P|Bv1lnJE)o#Xqpo|JF2%=~h!M2&XHfbi1aoA7f^33}VHJSMZ1 znnXaR*$|m#RD$UBAFmhwCQ^d!@O{_+ky+P&i46)Sr=R`4?dySwXT0+q!s`hl`h6e; zmQ(!pDS#6J{=NnNoyXLl-H-{|@5xatR%Yyr>$qC)Oq(@%OBPNXK-wV$=DDp@?J}Y4 zM5`l_$72)@Z?aJ_5$Mn&gkk#Ia??ddu@rBSBf!IBDjMb8}6N>*@UV1BYqby`f9zS z((fNiq^-6Q>OF(aPZgcL0S^TWanB?srfmgOCC4j{s4s#h=lw zGiB$761^q$=&BtfTWVO|QqCJaWg{_#ve4n;i{v(j>@m0oZ;(A(5AUm?Gjpi`OXe?q z){s=_I#Z{Fizc2?=bae>jh1C(X*8zbp)-d7w(2g*#;`zmV}GZ~nSb!h~+8*9x*UO^Zv*EPKPWX#d3$*G8Fse$`Y6j%fOYMpOEB@`n*7dGwO+&e$xF1MmQ#J$5IbE z&Y#SnFm~a!KWszZ=&gqFp|7Zx*MdWwmh%NoU6--rw0xJ)tp0j(V{lZ`^QlxNg(RUP zR+xrbU~(nks!N}q_wNXBTwoxC@Vb;jQsVcPwNe>IoVZnfhX~$*S1uu;#Jd<)SjdZp z6Q%8TkY{ue$pKY9{$m9G1yjdhH=Ki5+yxew#bf&MPC$;M~N4`|eg3T-44S5=~B zYTs|yU!xlbqF9Va>7#gCqKGW^!X~!5_h8+*+1eQHa_t`?gSMFMIan!0b5@&ObkXE# z6r3Yar)xS<>)$eV&9*@&?v-Iv?iM{!>2$icu`|;WO`H+K|H9m1qifK}CkkZ2lJ_ce zJa8X-6nho>4exMExG>K+oB-D*I!pH5NONAVJu6a z#=dCsN5A>X&i^m-%rRt$g;+K8yarEq=gpZU!Av>RD69vVxj7i7xv`=hJFJ>^h>EA5RT z&z0GEjzFFu(!>k0b_(dqux_(@n9wAAp`rfPk+a8p4&?>gnnw%^qv|Aw!9p-IPKG*ZSZ%$G`yp< z!H~-tTp)<${NUyH0m}H*C=Xnq=ZeR}I~+<=`ml-f4=A5uo`(B7XfBy=Ef-fhB7-z2 z$txvWwJVQudZGD;Q9>v`gF`8?8UN7(p?_RuW;*XomfqP!y6ybc6U%v}0%~#2kQI&p zLm`J#G?wLQ+TbuLsB~WI7NMYtBX-v!IGsAbKtAt*No6U<%`UzTu|qKzSF9AoGNX#| zC*mcEaWPcHlg)im1)iw*6!4lp*(8DF;Q*diLR?E2;tp6JOi`OOIMoJ3$YX$fqyzXL+N8ryo3R5U)maBix`{$ua25vIw zD79o252}*jiGF3r@n5087xD}%2_CVSW27cJ0!WIW2+Mq`|T6e+D^~m%krK~?(R{Sj@nLhb5g#% zkigq3!aN(timDWHzn>s57f#F6eUf<);2~o*Y*6GO^Sq{6SPfRPlDWgCvj@gc=$J=~ zlp}neAP8da34I%cx^jHD4&NQ9>VY>gLT-Z@7gOhJB?ok1^ywuB25&THV9DA?{;EBj?x zI%fbcHS4(3RqkKCIR~Bt^#x+O>wz-UvtR?RX`>&uvc245MiL%HmqPS4rjmvq8d};8 zCQhw}ydhFAAIP|*{d5YTM@Q31H*9*}4cBl{P_;_s8+}6SsCpVX5E#T)b5Jg}_GKFg z82A55P+0)5F1)c zia}PWshazZu(>c5y4uA&?VTNxz_`HKSY^A&nnB!oN}~iz82_{s_b*~F7g0;(y>9IT z1g#vxNKeNa7d&qF#Q)^)T1^og4d?`Xfbc?4$k+zaPnojG&RAE`1}8|UdC>d{D!*lo zlJ8kDP+^V*{t{}`WO@9RvI*VdIc6qhT+TiQd1hhnS>TR(kuy@1=zj}fzcB66D}m1gS2+Q3l!k^eFg>a7=E041J+5@<;_0zqRX z-7;Irl=({9Dr@6pth4YbhHh>!nUjOoA*Kfb!%3-@Q@V&}FDj5EHRw32KcTp{_VD4& zw;TNQ@z{7^iE%9y&4k+NBf4OU^2)>i9_2M{(14gk#iP^pxQ-n@ZCkBUH4r>=GOc{ir+!3iS5! zwje0KND0345h1zAc|0m=sZ0S->~6gy>Q_6#plTHp#HyMRiJ}THN}y@xBS7?J(fYT= z)1y(@m4GAOx26BM&w>y59=E|cH!v%C`8YGQUuI?Ccs=)@JkQG1F;(tt+A3_dRPOv0 zX4K(D=mcIDHt$cS?_bM|0>6POR+@Lsn}wb&Kr`BvDow0wR=0F<{LiOsh(AE_4oIjVl$#6 zmU}$3N1tzKVXk23QESg-P<{8FGp#67XPKtUnuz8dYbSXGxdVE>U`(AJqMfkFgsL^m z8sXBqBzBke4a%~qlg}1x-?4$&I0;XX2!${)_k!r-93&%;; zBp*@+D+w@Q2kCVe8-gRyE+jr62WP^aqO6z8wz6izCMr&>x4T9ck3~y5_CiH@uSrc= zSKm^NREviYWODP<%mw1ee#ID$=1K^6uPb2i1Z`NVIIA9U;=fzUnkV)I3iBwa<~Sj6 zq@B8Jelq`%peN(BGZ^|PN*WgjC3PNmS)o{?j@XR+;^g1P=;~pYqR_!XH79@XF}RCX zw>59(sfcY*$5j8zv~1!qFA`TlDT1nL)c8iXn;o;-GP!B2Iou^#gQN;ZgxS#>#Phaz z)b?VBjXohUJ&~Z~4`cWnG~whl6FjssEkO%7;e1$fY6+YjVQRxXAvo=n{rBd7$j7lH z`{i^Q?E>F_`e+KHGTI(%Eg$bE%yIa1fap7}5Jo-UC&5RdYb%MvC5fhK)F(^V8|Xv7 zVo=EYTBN?8Iz-807{6?n;dfNA%I4E&pSDl^sMMBmA z*w(u0r?r>V*L6`oY9Uy6j*Rk{rU;j(g{n6#Ej!!Qs~U~4e*V;KrRG`#9R7#CEcdmN z0h*QDJhd}J2fn|O)d@aSv;-~VGD-VHmv3rCEMkoB30o@WMaH|>>*`NF;tij#_*2my z9kzSXT{ymoUav8#`uGD*_{Uso^uLYG+T77Pvb5gvy%Ci*brQv@Xiw$;F8v7qflpd) z2=RsYz1?dthW|8l?+|;M?r>{&w-sMcv{9+P8%l{$!Vir#EQ~rPvsu2{GIu9)y?U#0 zV2Wiy&=(mRzq~fD_iM)+)(tUzn`p7CNGBvoa6xWQTgQr`~-G_pV!xEI02MncRd7_C5QN#579TvnEdz z^4MI-DB)nB{Ygj1&0=qq5_zlk3Ns2*)r;JR^_jQut9z+~_WalZa-_@*iJ% zgjHb+nK$*`?hvo#kzi4*D#}fo7PG&mQQ_et+$=?dRFcaeOR<1i5)GPDvI9!r0}A+~ z3_osGV|6y*pekr4ogXE(cAV#3cY!vv@yrcJgTzL47G*5iNS<#I(GlQeGQdy!t(^*k z4=a^vfe<5vKaISd>UA&HY?$J!Sm-;}MDTPqF|$60+_e?1V=fCWBhyi6u23j|Ram$9 z!gutQW*J8v#>?s@k1pg*)H|LAKTx$)?ZVO$fto(*AQ&e@bYzmNhYudW+iEb~O5#O* zMn1`hWy^B-ie|jU-fg(9tSV&h)0lz>#G}4b^=1gu7L)JU0b66Aa(*!Us;#JCYhM() z-|M+COJo^;yh?!`e$QZ-SB6#qf9OVc#iu?I&U9in%$CRZo)n8(GWKOR894Q41@4Zw zkY_He=wTl(i-+6uFq-sZ_hDXhf_cSi648jwl}On0SvUUPcsNMtM71*tXVbbKKckUr zybLh-s;sFO*X_i(&nJn6u_eN(tc*L>Nx>9$2+o%lrLU>A8skZ6Y@o+RoI@q`h}%ZHPOuX!@-DfV57SH-Oo5Ritr|l|^TC*3 zEzLYzIw7as1#8pg))#SHx)sL#QcW}_r+{v&Hz0cnLS;ZeUHd~lgt4H4)U_^ST4$ql zmpJ?RcywSjuoX&6#y^1rlS`Xy$e)ckTriJlo)?krsJO7Is4p;HkP5*ulCulKY3Q8lVHa#vtJ&J zK&GUZM`z-QnSg2Cy*Ku>rQ{e)?E+_5xC1&E$usst>=|nOp94G6E6IOKblWVtTu_Z% zS)Fkb^qGhjP@S8%wY#vkrE;cZ3JTMjHHT6K$l&(|bl7O94dzJmZunJ&h)^F*+@GG< z6J0~$4xUu6@36ItuQcZZ`I&;s^4V4pv zB{TaM%kS8z!Tdt&ZB+yO0nIW5E8HBp5`}!TDB(Mm;*X_iMoH&Lz!*z#Q{-rF_K~OS z8U(ZOMFwXWtlR5sX5R=q(96UUGt|-IIhGda7kQ|)5Xny#l1?|?(o}OZQH=F(l2~ON zR>W^<4++`H1;ab$#W~6G;3N+&sH^@EE6iJTSH?IJ>q3 z9Ru%&Ha<(OM{dy&!iaGR%3JUe_fkkmq(#|xv#;+1EaKW2Rn65@qN=!PViZ+Y@`{3r zbT2bH1R~?x?Pj}1;S3N@`|aL*#jc9trQQIc^))H+-q&|5pEdcN@KvHRo`ivoA9ns8 zr`8Z!8R(oquTQ{qDz0pYI(Sw@Tk1YyRLAxGazEOcL${KfHv_HmUP}k<(5uSvJy{YQ zfjT%<2e`@$PMSC2RV9u{L_Gwd+E=J}20}^bgCD3wwc+RvUd^xmXoSgK=NqtNtIc=6 zz7;TGD!_9EL$vWQ#cT!B7=tO|s;W)t(%AqqGlb3M9cM9b7}< zoGAQ?(hZI;bFRR&EEj_x@5>xq%gbZ73G*J~3%GIN&JeAV$TrNh&h)F>UFt{)zAM4_ zYp&urvW!$vpm2Od4rxJ_SSZzS=(>vu%AW|$+vp?nh_MR$5+mQib=R42t_!NCV$irE z*0J6*9fsHCR87vo{MS0;T`1&llt{J&@T3W-EtMYQhJRoU+0hUhLlsWw7{PkdVXJ1; zCw37@x^mHmy>MTSC^0}D^QzKulRZ)m6%CjYLMcjfs#*PoBJ$D`uZr$i8z07P&CHJa z`zwZ>fej^nFs>sXfFF%lx!&U`=)~GboGSy?L4r?{&n>F9AQA120bsm!J`^_)p0u%z z*@gN<7x}_aKNUubIf{M|)i>H>B-B!b5*}bO|l7Xk15eK)NEH8m#fsoKM9)XEUqwhWuW(o5kNKVZ@Jqb#4fY-c1*1sCokFguhf>Gb}SZKa0b*TkcI6-10JH? z`HgUVAyDq2w4(5hovv}0y$A!Dc}7oMo~!CS41NanTN|G7IpLpo8G9ZCF8@fM$X_^W zH#mfYGw^Va!=}iKVJwNsS9KX(gA5%@ez2WNBSBDKar!3}t(j`h6&y__d~!C9Sm8lS z>OIz}1tnj8UubwFkzuoUvn?_oerjQ=MIfzPpidX{;ky{k>boG1-`7X_)U1ve`R4kF zhRa$=^lKa`x0?(gfFg1lQwF37(D^Rdt4to@m}A@S3%dwHt) zBvyFk5e&!q=@O02J#27_{B+oPErwpf?(hFM1Y7$@EZ=A6bU}*RDclb`P>231PmYat zuhUwzUAqADF=*fKmjB!}LFa8yUn2tY`zEmIHnQ*GQWoGfiooDB| zHfgKKXGKM@1+i{AY6_CV)0^Cy$;pCpvPr-W)S z_&ukHElW_}Fn)agMl}1^xODI_zi8)U*wS>(>&|K3r!*GGiiG2>eYMkI?X(MHPY|N? z-tzFJGRy&yP}lUwEb@y#_pb<4sq zi91=_nO)v3nQP1rr9NS1ifPAc2q0I)#SC=_Pl2HbzY+Dc5LI%oKD6Q!(IE>)3CWRC ziINiB!7TqJ6hnYU_@LLHYs*MvWBQ0sE+P;0zgT$HF1kbRPJWybTx)3R>P za`Yh?9s(Q_+!uUkR7ci5tiU99^VdCUm}X-?e(7z{A(^qWqGvq|$F}my{7D0%+lFLt z@{w`Ld#QJOBqx*Aa0}(quR2t^D7ar(w;Wk0xMLU^iIgaNfusnEMqEVu;#`Q|+X{cJ z;(w#dgSE{^gpo~aQbN*l6^tcF6&%oBp2L#LA1aK#xMz4C=s$%wltuC_WCG+(xuO7a zLjP>FCRc^)E=n%0uUAG4$NX%14O!Y z_FYYSAxALwP@XuZy|R-eqF2+H%Y8q9*Z|%5{(lLW2y1VA+CyA}8jE+g!+X8l6!Wr7 zGH2B{)~Mr7LY_$)Wq4if7<5;E7%hjJ_6?^v{fpdw8hId9l%iiXWBU_aq;5>I4;Q{^`kdoOgBN-(MNuQl!>k(9&e#>;qA=a}A>+iV z^BFDx!a=HBEBjm+$eBWI8Drin_iBE(?nlx^;`GeCkkwz+TR3NkTD^^gX z&}>*|x=WO9<~Wcoa}($PQ1#UhQFY(fbPP4bz<|`y-Q6Iefb_u7B_SbYP|`ySDk*|= zH%Q44Lnd^QcS(+rsxrUBjQ&*c-_agQF`iGQ zce_m?0~}sLQ@XhwxMPnFYp>1udi*>4|2se3g>b2yLP>B+T@^#pr7x@29|nSl z9=mp$iHcn;aoLSo-+n0kbx9`Y0p<5I=>-(PDAu+H^2^8QKjR+bSM}JjG2b@9ARFBPDSz!nhl~l8J-LbP{8H@;{8i<=e8rb#RKSR;Zfwh4ySl@Wg#yu&nVOKhx{+98uSw zZp@VUrK~! z0Vi4g>**}iXYw){X2wt7o%FX(igY*kzjD>Rq4=6O_baEl;rb6(Oxnn=+$YwTnW-Sd zDRuO(a6w1E^F3iGlbbou!guA_VuYwu9R_qe^ z?NgtMzZy^4j{Nf{#r zTVKmDeSfphv-BZZV8CzkD7>&(I}mTIV1*NX(za$t58@_%UPwqnDsDq;<*taUsbooD z&JP{$@?2FCSaDEC*%^H^3?UK9Rf45rW*gkaI^YQQrEEfcE7`5S?qV7#KIK}9h--!i@PF{Y0>*R0hh`8hX~Cl_x|B9aKDs@+#xvctyf3=)5o4+KZ|NfN4gCE!dyy%t%Bda7~x&2_3?CqT-X`Yo1i ztMXu{@_lF+KR1?eiF4|$X*kN~bU5>zr(BdooNgaLT037-vSVa|c1c-6gg-!WyjT{N z|AR7eQeQjEjRVSn1i9+tpDSp@L&zk&b0Z#gnifc6 z!HjfA)PZojN#JZZx5LPi@;NmMnn2t|F}XKak@%~n{nOX#8n*?Kkm}b4%pNB&BCW2f zv*U$^CkA*p7i1sV3wQ0|=?l`NIYP$mGN`H4ME6uN zjC9(aaggE>)e@g_{a2GD(`no-gS6XEZ87OE9>pnsbSGLjm1VV8`23`bXUTf_YUfL@ zbcN7pCCQLFG^$GvW4_v(SmOvld(e1>hPo3p8CRGXEjfRv8`L^O#$VPUWsA<;2Ho1_^=gL^)*wDrD`YWo6 z?G3aqwW@^1jXg&Xf9Ou#Ee!h$?L707Z>qW=3jV&WE2wS8=xfdeA6Asahsmz-=q62s z%}_PCQI)~R?d7B*F!av%Kg$-5bU2|3ajnz>pI@txdDmt^{fMv*%N88ZW_w%7&Eni8 z?zKMPizi%2fA*Og{gtsW7Xjpb&3j3vhL+PK_6{es_XyRC@={3R5iuBHwTt7Yj7T*(Mv6lJ|^|Dhh`>x&5kCvUzKS@Yy{=^yd z(#0ofDAl8KI{!c>RSja~)%1MU8I#}9jFQNag<{S=$;I{y#FwVaJv0E zi!ZUO2-(pIc(pEQx!+k8g{QyiH8FO};?*DD-p0Zop_D8-agCyo5tl;0E9jye325H1 z$J6tC?)$6Q6l-Q~n$@;}*>J&NrMS1Q43d@W3j{XFT~#n#8^oIp_0P0SMHeyjt<&n7 zXZAz-cKU$x=7B?Mx>_;7FOm@_ec{TpH}ot$3JbEX|2=&-fgi=9uz3B9Os6P))YI(O zdIdQK{%^11ZHG78?-g!*fwG&U{G-Yw_TGWOL{r&$#5!Wb-Vi^xlB!RLRk zDs)f4GcE;4W&U0t(g(?8U;1@Fq@78;H^lU0%4-4an703ErJvUJk^UCHvAm{QgB4sN zMB(3s@B%Xx12LA>l^KD0ksl}4KsF-b#o6lvCQEBAigWtdx+~V+V1>baWua%=K4#v= zz^TM!d3P%9h1~dRWd`jT+X-YYldK{;e;7vK4x7)v2Ty2L2M zW*F9uJwZ%HI-DDu3+MR#H9{N`qHX=ZBR+O)#Z2aMO+?d@T39yo+0$ej-`IE3Lx<)F z#Ihw&xFaRrJ7J^n^!>L@>ZnsfL7L}*HlAZ%31nyjj9D+6Cb?%Se1rYmMb5;7&<;=l%3M-%Qv-)ASivz`n(3Zu@) z*optF-Di(0WXTbmh|XiJtMUtUinu#R67VyDthuAT+2xw-#@~ZQ=izRdu!}fgcS(!d zk+ke5d&~OTTE%B)J*UmwL6NRuql}pc9EU3US&~b(`F6`F7gnGMh-3d8S&h}MAir?3 zeq}49yu(xC$U*k1pjs!R1{I6BNytsD0cCHh!C@5X*-$3UdeBviG`O)+I&lAkX zBc{C^gAY>j;hQuwe&eeb?lJ5FpaYq@9mkhD@FT_T*^xv{{KbB)TL@pwP>Wi!5GEVi+1;B}HSxyJ;s&$QI)i=`ct_y1G(gz_@JsO;Qri|L+L_tNE(_{E` zQB2wUUlzFRgi2ZG-aXiTrbnMg=}Un<(p#)=b(C{u-}G|R z!}eC5zN6ctxW&-@|5Z8gk_vBnvt_vrYs*GP(}~l+4L9FbwA13rUIm|XRna%HevY8@ zv;Kfp@+jw~F!Jz|Zmpek`V=9htoCl%)+H1i{@su%@UIkeBU8xU3Kxt>goW=i+WV6i z!9CyJZ~HBu))=T%DyRdIcaQskyF=c~TH?+!Tgyq#atqM2Yx7os$wL5pqpDF+n9vU8i|TNv{HkyI`HQQrSxhM)CPH8-?_Fs zNIOW%dbxnCdLZ+y7YcQ#bQxYc;xY16K(LR`Cq{g!q15Jq6)xTT)AqHuMrots6yU1n zg7<6i@*80r6arFAwGr{Kcy#>xE|@9hp%)jlsQams)#EJ%uAJP6R9g z+i%hlK$kotr_pLQ+Z|0;z}h}$9WiP5W|ovV=0VDFL?zo%tMBjO*>tQ&U43dokaW(I zEm^M?w((y=-(W)o9_jnLIT53#VsY(!Lm3Fh8Wdp(WP$(gKHWdO*zl9E&xS8$)JY>a z=asBZdF9hV@Ab*ANvxn0ynVX6duB!&9L*qjJq|FjC2^64d4ie$n`<&l_Eb^JWw9pF zl8{oRg5GcPM~?m~A2->^TpQ(SG`^uNM|-pLgl2Xqzr7F2Jma(Xg4Pztl?``XqtQWm zTdft`bW^y?HLTE-5d0EXQ&| z`Z0)pUYEO05$NH#Y*3BDJW7(#t=T!Vp{_ZL2#X02jl;3>+nSq0^lk4Ou=msgccA2r zXfJ0yE@3K{XmQcy1;(>0!vG=0YKn=~c9^QH_QFHYoDB1dzioe;0VIa- z4fg*+8~mzN@GV#a7{Wc;#hRO2x2E#+3wrh9dC;r+lZJHOll7<1?p+l5o*(`JZfk?$ z{4Y;yt@Bk_3P3SgaNap7xXj^3?3y4PD>av#Jvbl0_%MT`OZ{a_ASFwB7^|e!f zJpG4O?amr0m0G)C{1${>+F!~WF?4?TloD&^m_729eB%3kKi0fU&~S0`9m_{KKdjX{ z1_Qr1c$*14@;BZX-H!b2C7GAJxzej6Z@4P;m?t%fOjPJe07GAR2b=83tza;9 zG?k##!nEb#GxX!K!a*l8DF&TaU$6H?0CbvBK`=K@m`krB-X=FW&KFr@_J@$=JQ_E` zY8>ttd|iSTmKGMyivYz8Fv>$}Rq5!*$}>5j1^qiInBI7QSOlU3RgIN7D#A9HTsaR< z6z350{pVk3QhC}RlKbFMGZq1f3gIs2?8_Q$0cFhTck>O=R8nS?91#fVQ_!7x{Q&Vh z2{bHit#k38WPd?jBl4~79-*#|XNSiPFYk8W2~1h#yTh)Gmqd){78@5JRy>~#e|xS)&}Y*3Q7-?EA2__88cO{r(UO#FE`)1aHWvY;ZviJ*UnZ0?bzs(fdQt0v6(6_Re!Rt82l=ttA&m z;fkI8@D5E;cYgJ+I$}!>kxXMjPPN2udDiS)N)8gZF?nc-4;lfVud#sYP;|}?Y2qf? z`W3fEvsz`yESOk|wpw8wJ^Y9H5LSf2hSiaP``u1+v7iiD4*i_Wq)tqpM!aYC#t25O zZq?x6$rB16VxgAu`d+f@amDF1Z**QPtspqu5W_d-h%1X}N z875a#s9Y`6*Fg-WBNGGpTs#j*q9#ZTD?c8cVtzXlN_Jnyj!zuR_H}U9Wf^f_D0VdZ zQvtQ&Pfi6@JNbqDyUg;|f{y)OUhb3O;8t_F59bWJRo*o1<1xLe@z>u>8s2T zmuLVx6#qAH#qG(6HWz(V`KIY*u#8ph)=Luty1w^AH?m)kcs#UL9e|5p;S?#|<3V`t zplwNADwS%U`J@q7q(=87M8P8{tluKx40Q%pH_|zl>Pbll%Tk93C1dMs$qn5r6H;x= z#(!HZt!n4~r91&Evte(0;hEfDdAn4^7nGTr)^;4`lLdzFz(MUpqNkqIug0M)8pQ&we9LyoCDyf&83*mAK=e!PrbCF@3U6RusGin zUuVuRgr(>3fuhbqtcOz!=8PaI)<2-oczvovnL7Ap8jFF5w1sE+xNTbnXJxP9H5mR{o5`JiwI8J@xe1s0+|Gop6Yi>2b5DCVeG@Y+V<2yt zGXN*88)3Gu{qG-3JEjKldGtpP{(53{3ct`bJ}+KiZ;0l&ahV3P+PSskxo=J~6D|I} zTBjc+yhrIL_x(OM_Gn?(9RveXL`7$Vj;LAKfLL@l!Vi6>n4GYp3x zfV`M@XZ{;*r9A~_a+ex^s?sluc+iuW8N{)$ep)9C-oe3m;ZUmadS`!miIoD3m!*O* z6%+mvo!en%0HQ}4$zQDpv!4{9&OCzsfMOCbb2QSB?p(@|YK9Ld?vbD#S-Sm-)vBvL z++CR_k4cET-nvC@px@Hdd&1UmvnB65xo^*9bzY=kfiFIW?T@(wSdrgeTr5&Q5+`(F zk_%;b(Y!cdaU}wW5f=&*+b6hdz3zmya|g;eZB?PiKe53`i50x>Qk1Q5 zAK^K{GRU=lJV!@37s(76FnQnMnp)~_!?ON!h&x2T?rCwSUOFBLzu{}MVVAk&V`^Sm zYK;7be<4gQ-^GOgxLl$aWEMoo3d_7}qYS;tlI^2dFZmMEr=x&6%o9f2)g+#7B|&0t z@qa+QL6RYyg9I`dB3N`+)8Wc7Ljxh^hLb!;Ok3^Ziz!HFF{yghmRe(uUI=^kr__&G zVj!yJc#Fpc{rDyot$#uYZ>>oSO0zy&=yzC{?2?+92_U;!yVpNzaq zSJ(68y3k(RX-AD3G?hMv2mQRpEX`8qLbu~x!q4IJ80U?4A~y7;)@8)B93ucQqfbKbWL4gw_7xcDH%nM!7WHV5MV= z9xnI~Jr)|aKgW+MU!qnnei4-96gkOfHRyBlK-kSmXRiFGYzee;3y=Qi+I?zg{zgi4 zKA1s!HkAsKf7cdQ4SMf|L1)yM>%Fi&-}jBLVAPmQ(zjNX!WGtnV>mL`WbU=PoHLHy z0N@qjXSp4C^$wTkhE5J#T~S-D8LL6xPYxA>=(^Jh{sHvLhL}VFKVBA;w;<@l+dlX8@E6?^TYwGgu8gP6RO*?W(h(YkbI6qOf=CE$0oRG1=}xer#cSKmf1S`7BsB7XZCafLTkhyejWAlU z58Bw>DUY$jBXjFv(Yyb2eH#j>6e=9W z<8*853K&PqKL#Bon$pod`O|5seSyYbYi=<{{XWGE%yo zgIMDaPJKirB{A+j#pd*gS_fUiI^wc-g1?TD2>L+h|CT_it#WF#>BT9_VL#N0tMz3u z&0XhpLbIw-m7_2*tF>7Xh^Fm&Rng^=`|Fh`z5fxJLMj(9z4Hc{%=`Jd5ZYd(F$+Vn z+WzD507O)RkE$6;zZ5&c*VI={;!kGw^a65<2}53=F9IV^Pq70@@1AK#98dy@2OW6% zIj~3aN)APnbX-k`z81=g45f0@1viT?T$n#q>>m5B0wwkG+;w@#eQt|pvLSuK1F$Tu z%y&3HgaIY~Xk}^qwz#Lk3-^&_T`0RwTRXPDE7Kky_XjhVT97>GXjg*qk>~{`?M%TI#tAy(T_0jf<(@rZ6!z_1 zaqnljL@6{!8u=VhcDb-&*t(g+h=mC-xI8Iy1fA;}f{5wG+8<3Tr3p{)4HOewu~XS$ z?!xXmlQDY>IQ_Gg9Ho#3jOz5rfG}h}#-DiDbd?3x9unKl{4aIR+nl{N%s;{s6>^KI&p#HEFsirX<*KAwbZ=+W_uE1RJICUr%cTZ# zZNfYbt8sbZaL8oPILd^#1iE5R>B%*49U8<>bG-Xb7yl^yiS1$8sV!(*5W9W9cl1#6 z{)+-;*>mTIQK2TQN^-wd3YMNg4aF(Qtrfn#24P2$9{ldn*OGCu(YMtVW`4k(_z_GL zPF8T|iQ2d>$kDHC4J_#|Z54$$$%<@8(7wHa@l@&wT^|NGLYhPB{Kj-riF}$6@@FT4 z$K3{2$njJB57~fg0PVIpA{*JL&_Sqg!xgo_E}O~A96_nUZ~DLqLS7EaH`zO)qIMG^ z0BXDBb}0*ncU={VfRH2w1)hM*2SWIcc0(JDqKwdcZp@LIpb!{do;KCWfON!C@(?uIGD=0nwB#@o+{fU` z-h0YUJiLvx4OgEu{~~QXZTcW5%w)wZvGt4U$ zp~hD%1~qNo6`V;6qgZYl(eN9 z?FB|jMpg-yKY#18wE}+|P6?6l=>bg~3J{9sEjJ4G@SvS$@62`$n-d)ur(St{aY^qy zw-rjrSg&AZ%b5CXw&vj&`7@^3)C@Z}L`z~!&5B{gul(ukz%`~9nm&qnD@-J8;VJuF ztDD_c&2ABYXxGK)k@!?af6WQ86)L>-E9o0CHb~p>Un`emWJIWjxg*kOlu=kc%WqZ% z!-Uq_j-G;q2^22x&Prikspm`G_48SqndzLPt)G%Kg|4t?Tj0K>q&Bnu@37kLhr4!p z^QyxNg{BPx;vn6p{V4%;4!q_g<$+IpSJ7;TJSeQkm@jPj-uOzIF9#xH=tU(Ry=0TI z4#cpO&MqUdOc?RjxuO`TK4FqT-FTGP?C8q9nTaAwZM1Ar1)6SHfp&M>zl5=HfZdRB zUfe45&2Db%23kov4c&iAMPN9?VXG(_`OTxw7ATg}k8^C!2TCo%QSaN%KeNsM0w>FD zwY5h+@S-5)%5J?JvZOV(a@eyKiflkK5KKh-3-dKvhkDfDvn$nvv}R6Q=;BylEPq?Q zVDAyz{dU&_is=ry`L&XW!6`?iiV9|hTYQ|y6aUiix7;t}-aG3Z>gOl+N{ahjGvkJ*LT=3Oglc~+K+OZaBO{(b znQ>>uDG#QFhOU6ol_=ZpcLwy%4a72aY!wr9!gvW3mY`}boL1NaW$iNtay$2h`*%GA z3ViJ12bp1F6!8%(R}I$_Gla_?uet-1 z8Z=e~(Ne5?vs`SeUww`4e_^}rm;0*v{7V+6;Pvmt@mQ0r%BoQXdcQ1G2edyU{CN|~cMly}p<%#E?1HqOb zpp?1IW)0>pf8h@nE^gQqN|^4(bK>?8i~qfO-;6& zNa?YJ2LD@M?51JN%zp?BOlG6N3Xfqpwi_H>V-IfQ6h_>tdU_lSmUS-nVoEaSpBa99 zpzPvJOMF_BDd+Xr&FS|T*5DPy?*78RC%15$LMznNHc@tl$cB`0A{i@vN*LL%G;xWe zDCp3#_ap4~Kc5%yB`dgjM(Z(jzv+F~thAbz50GJB1z%G~75-7XuX!c6_-#Z?gHJW@Iv+h@Hhp0x!(~89 zGnjNDcDbqG&hAE6;iac>T$>8rvAPlx&}$$wUYNHJx>#1Mx%Xzs8n57;aR$AAt!N7d zRoDH);)3l3ZM8w}!7&(LF-QDxIr05aq*a7%t%|$D*H|m~MiF=xYhLpXdn2eb4N8qg zU-d~LXGbt|(9|t0N$?C zuK!+fX`vvVY+Bm|X^P@wxiCC_XNqvXDvcxK<^I_{=yWo=Vf6^A%7aQ`XhmD&Jw`YP z;&toM+0}%8Coejn8|2nKQ>d_@+qGSdbLA=^e{F6ykF_CK;G?d`tTlp82-(NrSUl3S z#G&fPX^;QU)3g>uC5|-0VCnu^W;On0D}9TVg`0l)D|kwO__)<>xQ%m7_JnhRC@hG_ zkTzVt$;aDEm2ej1DNyXr?50ku5*lt>L1S?1PtbviO|=GgP98QApYR32(qL`ZQsVMY zsdQ@f!1#EFC3b0-Vih1xGxxdFBA9MAPVbx0Kf}s_VvYzH-oc3t6bsy_Lu)7K(&gf> zkL|kB4DpY>@5$FrPJlPf^^*4Vg=SgLUg&7!-GTp$M=IvvMR}=9FR$||tvr5_CtV-E z$i=x~VS`bmc~7%_176Ay~e$RF8l3)eDMK&4SqT%!_wYz{~Se)FlKT$9q($<{u13l zrpeO^zc)O=TY`sW7f!de%onzPFJg@gifF7@rGnR`#s>5ppddcU(Wn%Ml6Jodnuy%a zTF)3{{c~ToYsa_1WRh4uH-2@%%!OPNj>k>FZNaNvW#5xul>p_IDc!y&frMzn_x`R2Wg|+2aconLJKz0dC{h2W z)KWaNhSaU~w(3><^owm@y_`5dLlR0&@iUU$!3Mf^9hMw|UFk6#bo0Zejk0DaDMT&T z))&aNbcp|VDb4QDLU_OIOg}b%h@@vE9?C4Ll+Fg*N3JkbqZacVOCM)d)ZQ1K5Mxur zHQ!h#e`+>>>yMxDj{;@}cVVQ8Z9+5vDHmCA)dJl9gQWADhdhNi8uuVSug|Fkn^L+l z{6ojx)^~H@;V*c5YQuK^gP9e?L-2ISuE%)rLwofo^zM=+*-tVQX8mc-Jlo!W=)OD^ zfz1W?8(hrr;{}G2UlQ~2-sx!{>hdr@dFJ?SQ}ZTc=es=nd){>e9mB$!mJ5;W0$`$K zwNhI$vyHlw%-A_KPNAO1G%Bnd$gEZi>u8me#u#VGmwGza=kEaEk0_IJ`KRAHKamLa zW4j?-{s}zzboI6q!YpPVs+7Ei$zPF7+{lEsEw)>;WL##l2?Da(#)DfQkfrNf%N_DQ z7%R(Io7CfG@6>uIO$@y7=eDCtG?wK*O zNf9c!jxEZQIU-c^gw9CYCnqgv>e&Fl#e0**2ISF?65GOnM>%trC0IxQ%(Xseklhbm zT|0Aq%QbdI>VdyH^n#~`f;03pb?X`zFbv&vM{B|UgJjaBh*FXt{o?5dY-#XH5nlo& z!%ai@d&7+Yp>o2s)6g^5rJil?# zDI-RP9*?F={4piKGa-B-6o<%Mt0CkY07&G|dw7%Du&9M@Aw zfyF-+c7_~P;Z2s5(qM`oS+#UP4XdVT8p=;bvWgh0*oW>3YUEl`jX({m3i0b$8N=n= zbG4$EF|29tj>~C+^q`T^6I47JV<|h!dNeE;_X< zmJPntgMRs+mSQ8eBX^+4Npn(GyNENk^ag!^LGTBo88y#j+>uqQ?xW99Vf*tyQ90DR zEyufUD`(7-nW>Q}G{1&=2efKvT|xy^rKl=sjHnT$*zH!;B44yhL92aJ<{RD=+2lFe zKag)R--u3-UM^9S+D>_cyt)?R?l_+)%(0n9lkD6>jTC@ z7!9%Km(t!EbLMxrq&x}LO{mM|$*7~XI%eYO5oqAqv{J3JMB|65MjM(KaaS9aOoCI9 z|9}D>`u!^ag>kd{@@vIJ?J-Vk>(J;ilfp1;J*iM#Zs`mkZIx*qn~kOb({H7rvw6s! zQFS$IJ?96%7Q~)gYUp6o!;w_ zFxY;kg7b*l6aTZVN1j#l%Q`Q1=%>Ftx=Cg$rhmj{1ru}7fZ3{tS<0qj?HLuOv`+C_ zUk>G%)Xs%IuXdnag@;|k9nX5s9nQsTr8t}sc4NMzLALgdQ5`0^4!0&z2}i&*glWfGn?2hr{`s6 zn9W#nAp*EIWH{VZ3}(HEQWh?HKccRcltK%I1ePKTD&>0e$b{)2JP>$Lm0Iid?sh}@ zQ~(?#P%M7l!10&;t0<3F^T^|e6C0;*hKs$_wNcNf*{E*6$Q z_b1{IjVa=}7lqU}M69wUv)?Za$nDfTu?uyZ6u7SZa5@j{7V&l4RiD;ycll}JXmyz7 zS#nzSWk=J^a1>MUakj#%!(g+4?!j?ID#-PH{V3ZolW+XqlFppXYI}9R34;nPKfG5s+)m8VqYvB-?X1E=nG zeJOg^CFMQ22AbFPl_4!*T2YCD#T8cgKizoxRjXek4XGLd3DKm~b<9xqSselth$1zN z;)!f|XqQ)WFQ+byXxwY!g_$1Ffbx^Zd1MfF4f+8vLNHe`=x7vg3XYtzs10WhK!tEd zJODPA6QhVe&|i3K>xx#uRfC<14%MY!gQ-`+pr!oYp3U3T1*94OQqY?GWdJi@qnIBg zUF#jjz}Fe#`W*Jg`6U4r4z@@Zh{Qc^z7-j`c*_g21Dqk*MX?0bBZyfAMILG3;D2wl zkz;0iPJ0QpzwXS;cu!Qy0Ceaa5CqElPYj>rrZGqUgG*!Imtl*+H5(uE*wb^|gc}L_ zO=4N~rW9yaFCn!)zctCsdIC|LEQx-q`lis}ot}bd-)kzB72qoxhPkA)=7oL@Pcu5r zcu!jYR9}M&Zt<|psIV@l2HsX!s$8uiF#F_vP0!KFza2nDLB?6Od{M~?a)Cb(!ycoT zV%Mu2Xd%n;mQiB%gK;4nj3(?ovbtp(+bDt&hG{Ltqot@2ExTx*i-$$Y8a&HoX zFEf`R!lkshby!VbDmRjI8<=IS1{={|^il@G!tO6>LQG>!w(@iF0qvt?wpqfE$3u0e zs@_&9pJYA;&A7R-(%5;kujlaR;)HAlVT)tYV{v^iwg)0LtPD-le}{Pz=(K~Vd59x2!&t zO1QOI0;2v97Y#L_SL2vJq@qomnuwS0Lft#ACt`(35voQ6QxB`YBLvl?mrcJBQnqvK zDyIAX(Ygq@pgC@Mz*Rk_OtZwE#}-|@^d=)dTKVyY{KI0HSmSg#muDko=zT9y4nD8< zCT*Ek7pBD~n4s9LXUZ}OKXouNS=Zsx4|xc{zXhyB2PbtrqaD_$XYrKVbPD?_0bW|3 zx4>7!{TV?>MhU$xtU3{25Y3j>gog=ZxUKxCdc#Nufr{~j+0iDFWK+nJ=*q{dA?LO;+^lcKpVr$`{Fz?e?st)p`B$#7UmH>fzs&7mjwX-bw zR|)!ZlVNZD>IFFS4Blg9nVKsBXAIKS4E={sOSK7V6#;wjw~;{?AZHTlnXOvx4d;_Q z;EPVfPQX$QRq8BU0EdL(YUDonRtvBs>3QkV;SyBWet!dye_GkdT2ddBsoZ-?6RozL z*|(ahZqNhL+Q~1JGsfzYUOn#;n3{#B<#1SYgg1h1;Kj^<9tsW?a zD4cx}Im#m}bgD2SU&Ga-M5*|1D$xu81|TLk`zP#}c@R;p*|^vcd{T#U$uP;nm2|7c zDG<_nni5xTiWINW1id0x*#y|jGl?zIx;j=k-wz=F@F@Hxdz8m4Dc+gd{214cghiTG zQ$Ud1AMO?qtxK)uxsi?20l3 z7ogacD0)JJDL+^44g4#CDX?ZrRP3vm-#S)mZ`gtVie=F$&$uY;iZ610-}tTkvb-<> zCxu#u1z2RD@PCEW2ch>Sry&rK@S+HIlCZz zsd)cez;&008p?h%R($oZ9#NF ztM)-z7+x*=KF@5-1L`kv{?dtrL@V;TTm|ayF6*e31vb|4GX>}U znJQ1J7^#(FmOj=(yM0zL`No$Oc3vskwETB;J%fP{Uw(Z8R=yOgj+L#`ul8<|C`?0o zi>Qj%W)XaOWMNZi@@>WYV;VLx-@vhlH)l3iCTt(mY&B7{EJ8}`bo~A8wep@A%!ggc zsrBV^1<^LD#=4=pvx*$iBwA(Rw7DXIkA4!4>x=y1Hqr?v(7aC#(3Rw&%76(DmkY~x zxOH3~<(A|5-Wa5~YSWfMI`QZ>aR#NIqjgCp zxD}grBlU=dy!Ff>k#Oa(knu11y(lM&dNg~umPU;`&3tQc(PXThj-rp9z&jsC1s(991ltJSGXvXAJ3yjwDGf9Q3r78E~!H0ejn%8#KE<6KT zWISOI;hj%Dd)5tZDqyA`#eH3rWEV*>`c}wtqHc$w2 z1P)vM0%ky%w=v~CYZNb~=3;~n^fL0iE#}mQ@zGWfVZry`3P~4u%Hp-WD|;Dcg}iUX zrS)7drnxM_U5jCKWmN#yLwCDf23$(J6sWFHJ6UB6iU4(pzX2&zCl3bE=gs>mCj!A;?Cp1gRbwTNRQqXRZ z>kv1Fm@#fthfkd44_vqXniTc7Q1G&J>t*g%<@a*m7WWDhv~S3k>d-3unF3(CZXiGy z;{(13&a2w2hr4zxLjY$wfl~U`rwLyOYWR4nXAxBf)+2P$kZxp+n5F`@UV`iwyC1TO zQNT215dH1@9#7^rAOH|jX96P{_;o{JHS#wC{11q2J&o@NE$PZ#cHZiyM&{R=v>kH> z2US=h^QX4o8l|p;7(wFkqcG}nJhd`#G{?@2qhH^$f6eYv%w2C|<>#6Bwbo&iCMQ1g zeYe$gN49F&xDC%~l7U-2?1D9YoNP9!T2b~T_w;@N>)E>d=~%g&6PX@?FECgn#wBoY zii&mBZ|PS>zxMp}ay-Um0uupdZ^XzmRY%tlR4b68^>uz~LPmuC(nUs5qIq?P)M zJd?3f^Xr1yJS461NTJEoqr*z4xyQWj{t%&tp8dZU%iTK^n0<}x;NnZh_RwN{^@k|f zY`4t!x2yaLDpr%qD!!ZdrRzv2K_p`?P7gM%qT#PqG?kOW!9MoMXLG40s< z663vCDqCV;!CuW0>ec@HM=#wv2C3U(9hZ07_xr+0@FqfRGKI2CX}K`DOA=PaRzEA= zM5$^*vC}OHYAtuw?ugO|YuTG0i*M-@4H1>*Nt5_PLi@f|C5)CwpYUj=6edKBMC8?k zdUNUeZo%>?meOyvO^A1OihjXS^mD1r2&9SZ8?3oVC=?=bIf}=0T`rjjzlPj(bgHOfJ$pcCTJjA!?|hEp>$7J2sv(O;c)qp*PI7bQ$BH|-dGf0O%7%H4-%$|}*20_1aD4WEMv!z_hPWfh zk4hZ9c>C6`E_YDyW1a~I*{A~Y!ofj65kfP*tp+#rR3nI$ZW(Oo4~LU_6!Hy zHyetPJQ~{^N3ue9SoXMFJyeu)pcbH=uf0`!qFO9enthKmyeZnTr@jflmSH_zz*kH+ z-w(z9W-0fAxif$QhhWH;I?u$?0Tru(z7_|BTcmEWMJCJcN6z;eJQLXN=c|cV{VUIv z1e{-O+B4;6AzWzuDMACbIz+@`HLEoRUcJWpt$OQ+QZGDJ?&d@Zy@qzv!u6PDvq3|I zR?m+PJf?$soD>ddOCa>U$5S}Nf9f{i+n<*X*ZIK77!7s*x7-z9pQ3&yxuDBtK;H{@ z+d=kUJ|J8EWVm8bzQZM(ofitxL=>BXV5GMyI!X2d)pQosKx{HG{s))JO=*i&S8K?4 zalAadBjW?|GFaff<2(RtYmtBb`^Oq^n96mvweRKNjod|k*K>bJR?N@G54o#;u};xS zD<`JEx|yv9q-+4~m!7YC6IYKqzml0U2Oj$a7>Z5tdRg(Q?7tA#2hND$@KPHasU6ry zW|QG3;FcW2=rkijudrK7RI_@nn_ZXn(32lz&;YB>GkVd$pF4aHPWS9*nF!N>vP>VWx5@w&$S*crg{GGJPyIgWe0|d4sm~~ z@^?${kz7Xv0b=VI+z*^;z)O$OGynAmdmeT&;k5%=!6_#-ti)*R)2W-C{_Di40bV#v z>bWm#3%@VT*+<@o8(j*H91&8uw+11m$6loUvBraq^}lM;wI86(e}3zT2MfJ=j?!R>iV5hr6)&A{i)#>*nK^g z*%|ByxqxVpJ^(!3TY>&w6E^Cf}lT{t#Iali2r zJ}-C%2$*hJhk=(iZk4LWcN@!IJv9=%Uv0M8)5Tu?m9AeyZLmNW_OC^(AP? zE8;_4h9^ynCFLjmq34Q#0!mjATwcu=Kb+1&=MV_-z^eUrfe7I^oe-61I?t;A;tuSE z+}XJ-z|Ynl$^Hm=BK^Cn$imvXyL>D%E-tR?xx9x_)2!M5UMh0WrD5Gid6COA!@NU_ z`x(b4{4)H06;SROxf|_(z6ma!WQ+1F6WHnte+5ZN+} zQI=%ihO+O*Zc2lwIPdg5=N~vfoFC5obkBS~^SsafKG%KS&vU(>nG3KY0z8#eV}<-1 zdZElKj3#T1KP0GmBe7zXPvgG(iC|deS{yc_0gojZ&^lGOsns{vPI^Kvp8j14Ipm#v z4BRxpB1$zjcq3r^bWi0Z3|@9sHHTua)!9mJxp=xAdRa9G^zUsDa43l}ih_b~L|zt* z2Ig0DrzI@c==1NdQJ0sbDJw%P_#-L;*jG@{O$&H2{iG}@5M%-x!DS%mR04{W5)c7L zG)f?O2^bj&Vgo3t0YN{-VhsrFxc{FGk=cvx!y$HOkZlK@IX3(4c<@^lEWGmz;}M#D zS0;c9L4w|^T@ig{gKa^4TYHZ&cMr$m&V4bJrXP@?b~_`ZpQv-7$Y0gHxMu-a{E+65 zPqW~FR~77Wo<-LqkI7%Vq7p%hq%OJQsB2y6U+-3$ykyj-ZAZl_9(C(wfV)3v;U-`yF=oUE9F z*9KR8&Mm3E6qWw@tf)lp^Y>V$+;!k`XI=Q!^2hDILTNMiWNxj{;D_0>T8;H*%sgfiyV&bf=Zf1AckV>*)2Vd{`nQvYcI*>KrU2Z6-S5ky^-kM z$q@P0h(0dv-hKf+O{X6hP-XS}`VgVAnW#l3Kb!>1yi46QBN|ss?IR)+{jksLa&_(C zw}!WBeq*(K$u~GTxIiW&l~~JT(vwe*Mf{a+^(L2>HN_^8Qcowf_TBFRb;+WW`w;I$Z9J4P=BjZBA3zksU8hy{0}&qka^4-_jA{H>Oo8VU)M5cwNRdd zP%QGorO2*ds@e?w(3lqs|4w zD7Ohxp+-%U0#>n-X+^n zP`h0E549JTd789V^;)yhW+&aF)>dBn?iT*{6|w8qhS#lysJz{SVctlSMxqnL(u0kT z*cpNlb_+Rw$w1V_!9~=Jg;3GlV)aSm7FC`84y(<`Ry0JTKmM`qc+`D>Hj{xGlqQiK z!|a0G9bz}qzaoQ7>CCpOS_GNmLQ~c>iS}Vp_9Lp3b*7`uuJi&O*J#Xm9jc+X%-g;=8A|5i}mH$tU4#6 z#x}HPDp;%&_y?{}r8CGE`u>w)c6j2(<<1P0V)?i0?JfGH)0KQD z=idMe#L+9IyW!+~v%5>sV4o?Zm6SmwGCnaiHupH@5qlKleFZG^!I$Xh4;_$j10mS zjK`%FF^=l?DYM+`X1_;tE={@x%K+`MNIO5TZM{z75wQ`mXE5}9bpy6{e&sH4X|y=J zpQRaXE~@=T$=so%(&qU)S`okeLQFd7&xFZI{N0<-tqHfUI^MlTbL;l$Q&FD|U}+AeEjpsAb$&I0wP)J!ulpbv|E zCU|?*ZV{dO&;Qn5T&>4_+Mzjx?mC?;&m=|0ShL<1!?uhMtYbJcuY%N~OHg5SE%0;B zg^2;oo^6;2Pmr z-9-+xRJJL5u3ibi;x9;kwYlR*4onD+Q_oKIeo6y=BR~4SBE{DS^_ov1V_(P@>vzt% zT~p6^dwK42ZRV~vMArXBwevh^-Dm7J_)W-=k#c$9&->M`Y^)Bhta!$n*pl*fE2zNl z)Qv%M7kM6*6d@QuAH+$RiD|r_4>(P#m##(Q78RzhUvl_loA0eo!o0~JFqaTK*N7L9 z9%C1IhQRp?@-4uJ!5 zBCeeI-%?s3z0*5#S z=6vZOcz_l^bdVPy13K0Dp$ST_-^S?=sC4|)MnNpV&LyQNx-y}XX3uS;{x6Rj(TeF0 zUKz@q-!buWvr%v6bE4mpAymd`LyroHI*Cv3e+Fgfa#U(j_IO35bq1U8(#gFVaRqr} ztx|YKXfU_-aA$J_{+Qs#amysVO&0Q|=TrOnv1<{$){h<*2MEXO%e?a{GbNhDd0yi> z+-#H(1Yd3Sw*>#?L(2C;UDEFE~x>sqfH?CGSNR4;@* z+sVU(aqFk>u&|HXPc=Q=3nLS(^b8jSenB^qO7fuUWru*wn1L{6x%ZMWijwaOk8H2+ z^XFUNzWCCoMX_8>`bADm4Gv->DyZa5%#gaW5(T|Zt%pzktQzd^YDZLeum&B@DTh=( zK@M<1Gy4uudB@nUufHBa>#Q_crt9S$`KX!xvwP1BCq(XzY8s54<*7NjvvyNkQ(DnWq;foXid+;?c@n7JmKRAi(MaI`<2OFosY0q{QW z>bntK6;=#6nen_aaea`nzbyX1(b^YTAGG)aIHSnl{t;=r=V9sSH|T(q!5p+F@SGof z!M|hDQTWUp8nGC&FYI^QKNTG*ykxy?Q=3z;Fe;yfaSG8imBX*nAL;@X@>EBkcDIwe zNG4?@XOlC$&)&`4!&`f4{X6_)GaS8yHk=z{S&9Env(!_eWd|}6cn#;$UKx~{NKdB< zOym3j32~WXZ4YnGszpnJtU+H4S$BpeHg7fl_xvP&D9p@)>%oMdo%3x;0!h-5S_o=( zKV;05my{NB0Iu%phF|-Rz_R63EL^0J%hQEp=|TU}#j=;mnPxTBe`Oh78J_bi%@$JD zw3W!z{~mdWO$4UjWh&RSYA*sD=W5`A%;9{QEdD_m_cxXl@{LtJQo)y^wGgRlPaBc3 z#m9EX*B-oS1dCkx#u5VjtNG`h36r2psL|@NSS!M(CFLgM+yi|zO8_GFsLM-VVmvNq zPKb%75kU;QiD4B!GEEH2d%FWRaflbbg{W^RNCw(j>0|@)5Fw;_M_dD8%4loVm!(DoEN;X=(E@%*)GzI1!#2hT z(IWwe_Vb&V|3)uYCRw3Hf7L?efz%aj1ilhaXOF0Vztx!CuQ%=X!%1(k47|cInp<^| zY`JDTg1>1LCfQS2rLnJ%ny=85dmD`%ezw+AW_y|YdN$(GL1k6z|DegUbYGig3WA6q zf~harN(hjX*!F{CMRv#CepupK(`_vX^qBJF3-M{NgR zTi~6sCu1PUC)cJgclI%27v$LONcit%Zck4Gcvj=>C}d&ZMRuu9f3=eVv}T#*!Oh%_ z;#}65@>$}m1yjC5^Qb;zB`JwICVVSqAP>ArFTP#N^d3A@FRauIK3CX+Q;5x2K-pJ4 zIXSad)o%UyjJmmU6MdMci*<3a#kk}|=y~tJG@j-2Uok@ZuG%bk&Kum@B*b@`R5ymM zW^+Tm>difPxSj9pcHFSRj=shj0hj{EHOLg_z6L{D@UZHuLq& zZ`9d>SuJ3Zf&d?Z0>+;zWCGrDVZqJ1?oqIN)*YfsGz}K#T~()2j<;UsEe;vJ^Y6q@ zqeox-KFfSue|8le5REhodFL_2wpmzoS#^e~Vh__lvr+Q$MDHqeW7}q3&zkPt%{Bg6 za!RC+LV{U=jJ}l-$x0$WWk$)pc7*rn!FNwL9RjPPxe`YTKHCO1_TuqD%HD{m8eZ3j zcm7wfr99>)kh}MiL7R)hh6B++4qD`x@?kYAhYy_YoAT_3Nz~A;$)dcv*n2-&dKNV| zdj*^zRndzxblX1{UldNNuziY;(d^Vbib<|%Lhq{RO=T~7J$v!c3394W%C0fUlBPT>fPG(>y8?9| z>U1Y0BsSuZPjRfccIj3nS7&(l@OLINl>5i&A=AhAQ0N{LC;ge3(J#TT*pe!>0j?b} zQar^?79zW2E)8-1uqHUl-z*9&LCsb$d<&iHL_O?FMrGoT0&<5TGLpw&c~A$dT-2CM zb)jHH8rwAKpf0OVONxPCn(Bxu#S$+UU z5JQdcjb6Ts9oVk=2pWrNdrG%!QKP+dV_z{76g;#r!J%)xN_*)er&=0Qeg32}{`YFH z7C}1Tq1XpRDPh4#PO#C#RRh@LB(WLL1?nC3&f)vm{a)!Ge)mVz z($(~o4eC^4F#*n=)$u*#W;vNg>E~Thhngy%G{wQSc_pzJUaGh`Ur?D3_HX$h>F%3X zx2|nNF+Ig_J^123X5|u7`g^z-l#J3*G}iFG^rl#`WX75`85KW8ulK>q0am>^!`+qc zu!cm?TQU!aCcvxd3|`6T=ub3VR7Kr&S>lSDqh>I*oPY6!?_{;8A8C2dnc*-g(ICNQ z;B5kI@gJwk-!d{*)eWiYx5 z3!#an)Og|X<63XkRj~TaA~QM!74fp|MCl>Y=UWDY^IKa zZY{NqKPu8vn%H*C+7q*&9vy!bvw`dV*VDnJnPiJJRq{U8VKG`Q z0Y``8Re~v>Cq`o=5S+eWDZ~58Q`U(VW3{6Y8(Dvrk 0 - -1745 + 0 620 2272 @@ -222,6 +222,9 @@ QSplitter::handle:horizontal { QAbstractSpinBox::NoButtons + + 10 + 9999 @@ -433,6 +436,9 @@ QSplitter::handle:horizontal { 2 + + 0.100000000000000 + 99.000000000000000 diff --git a/src/candleplugins/camera/script.js b/src/candleplugins/camera/script.js index d0a920ee..fbbb9594 100644 --- a/src/candleplugins/camera/script.js +++ b/src/candleplugins/camera/script.js @@ -36,6 +36,7 @@ function init() app.settingsAboutToShow.connect(onAppSettingsAboutToShow); app.settingsAccepted.connect(onAppSettingsAccepted); app.settingsRejected.connect(onAppSettingsRejected); + // TODO: Add default settings } function createWindowWidget() diff --git a/src/designerplugins/customwidgetsplugin/slider.h b/src/designerplugins/customwidgetsplugin/slider.h index 192fa187..34b3abd3 100644 --- a/src/designerplugins/customwidgetsplugin/slider.h +++ b/src/designerplugins/customwidgetsplugin/slider.h @@ -11,6 +11,7 @@ class CUSTOMWIDGETS_DLLSPEC Slider : public QSlider { Q_OBJECT + Q_PROPERTY(int currentValue READ currentValue WRITE setCurrentValue) public: explicit Slider(QWidget *parent = 0); From 016d497e666c86e0ba6ab67cf931447f6b546eee Mon Sep 17 00:00:00 2001 From: Denvi Date: Sun, 24 Jan 2021 23:22:20 +0500 Subject: [PATCH 66/80] Added appendixes to help --- doc/help_ru.md | 91 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 89 insertions(+), 2 deletions(-) diff --git a/doc/help_ru.md b/doc/help_ru.md index 43ab9592..2009ecac 100644 --- a/doc/help_ru.md +++ b/doc/help_ru.md @@ -602,7 +602,7 @@ name="CoordinateSystemPlugin" | Объект | Свойство | Тип свойства | Аргументы | Возвращаемое значение | Описание | |--------------|----------------------|--------------|-------------------------|-----------------------|-------------------------------------------------------------------------------------------------------------| -| app | sendCommand | Функция | Команда, индекс команды | - | Отправка команды в контроллер ЧПУ, может иметь индекс - отрицательное число меньшее -99 | +| app | sendCommand | Функция | Команда, индекс команды | - | Отправка команды в контроллер ЧПУ, может иметь индекс - отрицательное число, меньшее -99 | | | sendCommands | Функция | Команды, индекс команд | - | Отправка списка команд в виде строки с разделителем '\n' в контроллер ЧПУ | | | addAction | Функция | Действие | - | Добавление в программу действия - объекта типа "QAction", для которого могут быть назначены быстрые клавиши | | | removeAction | Функция | Действие | - | Удаление из программы действия | @@ -777,4 +777,91 @@ name="CoordinateSystemPlugin" # Приложение А. Настройки контроллера -# Приложение Б. Таблица G-код команд \ No newline at end of file +Таблица 11 - Описание настроек контроллера GRBL версии 1.1 + +| Код | Описание | Допустимые значения | Пример значения | +|-----|----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------|-----------------| +| 0 | Длительность импульса "Step" управления шаговыми двигателями, микросекунды | | 10 | +| 1 | Таймаут выключения шаговых двигателей, миллисекунды | | 25 | +| 2 | Битовая маска инвертирования сигналов "Step" | Разряд 0 - ось X, 1 - Y, 2 - Z | 0 | +| 3 | Битовая маска инвертирования сигналов "Dir" | Разряд 0 - ось X, 1 - Y, 2 - Z | 0 | +| 4 | Флаг инвертирования сигнала "Enable" | 0 - активный уровень низкий, 1 - высокий | 0 | +| 5 | Флаг инвертирования сигналов концевых выключателей | 0 - активный уровень низкий, 1 - высокий | 0 | +| 6 | Флаг инвертирования сигнала зонда | 0 - активный уровень низкий, 1 - высокий | 0 | +| 10 | Битовая маска вывода информации о состоянии контроллера | Разряд 0 - вывод рабочих координат, 1 - машинных, 2 - вывод информации о буфере | 3 | +| 11 | Значение параметра Junction deviation, миллиметры | | 0.01 | +| 12 | Допустимое отклонение при аппроксимации дуг отрезками, миллиметры | | 0.002 | +| 13 | Флаг вывода координат и смещений в дюймах | 0 - миллиметры, 1 - дюймы | 0 | +| 20 | Флаг включения программных границ | 0 - выключено, 1 - включено | 0 | +| 21 | Флаг включения аппаратных границ | 0 - выключено, 1 - включено | 0 | +| 22 | Флаг включения функции поиска домашнего положения | 0 - выключено, 1 - включено | 0 | +| 23 | Битовая маска инвертирования направления движения при поиске домашнего положения | Разряд 0 - ось X, 1 - Y, 2 - Z | 0 | +| 24 | Скорость поиска домашнего положения, миллиметры в секунду | | 25 | +| 25 | Начальная скорость поиска домашнего положения, миллиметры в секунду | | 250 | +| 26 | Время фильтра дребезга контактов концевых выключателей, миллисекунды | | 250 | +| 27 | Растояние отхода от концевых выключаталей по завершению поиска домашнего положения, миллиметры | | 1 | +| 30 | Максимальная скорость вращения шпинделя, обороты в секунду | | 10000 | +| 31 | Минимальная скорость вращения шпинделя, обороты в секунду | | 0 | +| 32 | Флаг включения режима "Лазер", движение без остановки при обработке кода "S" | 0 - выключено, 1 - включено | 0 | +| 100 | Количество шагов на один миллиметр по оси X | | 200 | +| 101 | Количество шагов на один миллиметр по оси Y | | 200 | +| 102 | Количество шагов на один миллиметр по оси Z | | 200 | +| 110 | Максимально допустимая скорость подачи по оси X, миллиметры в секунду | | 2000 | +| 111 | Максимально допустимая скорость подачи по оси Y, миллиметры в секунду | | 2000 | +| 112 | Максимально допустимая скорость подачи по оси Z, миллиметры в секунду | | 2000 | +| 120 | Ускорение по оси X, миллиметры в секунду за секунду | | 200 | +| 121 | Ускорение по оси Y, миллиметры в секунду за секунду | | 200 | +| 122 | Ускорение по оси Z, миллиметры в секунду за секунду | | 200 | +| 130 | Максимально допустимое перемещение по оси X от домашнего положения (используется программными границами) | | 200 | +| 131 | Максимально допустимое перемещение по оси Y от домашнего положения | | 200 | +| 132 | Максимально допустимое перемещение по оси Z от домашнего положения | | 200 | + +# Приложение Б. Таблица G-код команд + +Таблица 12 - Краткая информация по G-код командам + +| Команда | Описание | Пример | +|-----------|---------------------------------------------------------------------------------------------------------------|------------------------| +| G0 | Ускоренное перемещение | G0 X10 Y20 Z30 | +| G1 | Линейная интерполяция | G1 X0 Y0 Z0 F100 | +| G2 | Круговая интерполяция по часовой стрелке | G2 X10 Y0 R5 F100 | +| G3 | Круговая интерполяция против часовой стрелки | G3 X10 Y0 R5 F100 | +| G4 | Задержка выполнения УП, P - время задержки в секундах | G4 P0.5 | +| G10 | Задание смещений системы координат | G10 L2 X10, G10 L20 X0 | +| G17 | Выбор плоскости X-Y круговой интерполяции | G17 | +| G18 | Выбор плоскости Z-X круговой интерполяции | G18 | +| G19 | Выбор плоскости Y-Z круговой интерполяции | G19 | +| G20 | Включение дюймовой системы измерения | G20 | +| G21 | Включение метрической системы измерения | G21 | +| G28 | Возврат в исходную позицию | G28 G91 X0 Y0 Z0 | +| G28.1 | Задание текущей позиции как исходной | G28.1 | +| G30 | Возврат в позицию смены инструмента | G30 G91 Z0 | +| G30.1 | Задание текущей позиции как позиции смены инструмента | G30.1 | +| G38.2 | Зондирование в направлении заготовки, ошибка при отсутсвии контакта при перемещении на заданную дистанцию | G38.2 G91 X10 F10 | +| G38.3 | Зондирование в направлении заготовки | G38.3 G91 X10 F10 | +| G38.4 | Зондирование в направлении от заготовки, ошибка при сохранении контакта при перемещении на заданную дистанцию | G38.4 G91 X-10 F10 | +| G38.5 | Зондирование в направлении от заготовки | G38.4 G91 X-10 F10 | +| G40 | Отмена компенсации радиуса инструмента | G40 | +| G43.1 | Компенсация длины инструмента | G43.1 Z0.5 | +| G49 | Отмена компенсации длины инструмента | G49 | +| G53 | Использовать систему координат станка (машинные координаты) | G53 G90 G0 X0 Y0 | +| G54...G59 | Выбор системы координат | G55 | +| G61 | Включение режима точного останова | G1 G61 X10 F100 | +| G80 | Отмена циклов | G80 | +| G90 | Использовать абсолютные координаты | G1 G90 X10 Y10 Z0 | +| G91 | Использовать относительные координаты | G1 G91 X10 | +| G91.1 | Использовать относительные координаты I, J, K задания круговой интерполяции | G91.1 | +| G92 | Задать смещения рабочих координат | G92 X0 Y0 | +| G92.1 | Сброс смещения рабочих координат | G92.1 | +| G93 | Включение задания подачи в обратных единицах времени (1/F минут) | G93 | +| G94 | Включение задания подачи в миллиметрах в минуту | G94 | +| M0 | Приостановка выполнения УП | M0 | +| M1 | Условная приостановка выполнения УП | M1 | +| M2 | Завершение УП | M2 | +| M3 | Включение вращения шпинделя в направлении часовой стрелки | M3 | +| M4 | Включение вращения шпинделя в направлении против часовой стрелки | M4 | +| M5 | Выключение шпинделя | M5 | +| M7 | Включение воздушного охлаждения | M7 | +| M8 | Включение водяного охлаждения | M8 | +| M9 | Выключение охлаждения | M9 | +| M30 | Завершение УП с перемоткой в начало | M30 | From 3e2cce188f757d39c46cad4c8b6f297d604b2838 Mon Sep 17 00:00:00 2001 From: Denvi Date: Sun, 24 Jan 2021 23:29:23 +0500 Subject: [PATCH 67/80] Typo fix --- doc/help_ru.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/help_ru.md b/doc/help_ru.md index 2009ecac..b788d390 100644 --- a/doc/help_ru.md +++ b/doc/help_ru.md @@ -523,7 +523,7 @@ G92X{vars.Mx - storedG92x - vars.x} | Быстрые клавиши | - | Комбинации клавиш для быстрого вызова функций программы | Произвольные комбинации клавиш | Пусто | | Консоль | Отображать команды G-code программы | Управляет отображением G-код команд УП в окне "Консоль" во время передачи УП в контроллер | Включено, выключено | Выключено | | | Отображать команды интерфейса пользователя | Управляет отображением G-код команд, отправляемых с помощью элементов инструментальных панелей | Включено, выключено | Включено | -| | Автозавершение команды | Автоматическое завершение команды при вводе в поле окна "Консоль" на основе введенных прежде | Включено, выключено | Включено | +| | Автозавершение команды | Автоматическое завершение команды при вводе в пол�� окна "Консоль" на основе введенных прежде | Включено, выключено | Включено | | Пользовательский интерфейс | Размер шрифта | Размер шрифта пользовательского интерфейса программы | 8, 9, 10, 11, 12 пт или произвольное число | 9 | | | Язык интерфейса | Язык надписей пользовательского интерфейса программы | American English, русский (список может пополняться) | American English | | Камера | Наименование | Наименование камеры, изображение которой выводится в окне "Камера" | Список доступных камер, произвольное наименование | Пусто | @@ -799,7 +799,7 @@ name="CoordinateSystemPlugin" | 24 | Скорость поиска домашнего положения, миллиметры в секунду | | 25 | | 25 | Начальная скорость поиска домашнего положения, миллиметры в секунду | | 250 | | 26 | Время фильтра дребезга контактов концевых выключателей, миллисекунды | | 250 | -| 27 | Растояние отхода от концевых выключаталей по завершению поиска домашнего положения, миллиметры | | 1 | +| 27 | Расстояние отхода от концевых выключателей по завершению поиска домашнего положения, миллиметры | | 1 | | 30 | Максимальная скорость вращения шпинделя, обороты в секунду | | 10000 | | 31 | Минимальная скорость вращения шпинделя, обороты в секунду | | 0 | | 32 | Флаг включения режима "Лазер", движение без остановки при обработке кода "S" | 0 - выключено, 1 - включено | 0 | @@ -864,4 +864,4 @@ name="CoordinateSystemPlugin" | M7 | Включение воздушного охлаждения | M7 | | M8 | Включение водяного охлаждения | M8 | | M9 | Выключение охлаждения | M9 | -| M30 | Завершение УП с перемоткой в начало | M30 | +| M30 | Завершение УП с перемоткой в начало | M30 | \ No newline at end of file From ae0a739b4c101f443eadb9ddf76f143c14d8078f Mon Sep 17 00:00:00 2001 From: Denvi Date: Mon, 25 Jan 2021 06:47:01 +0500 Subject: [PATCH 68/80] Html regenerated --- doc/help_ru.html | 522 +++++++++++++++++++++++++++++++++++++++++++---- doc/help_ru.md | 4 +- 2 files changed, 485 insertions(+), 41 deletions(-) diff --git a/doc/help_ru.html b/doc/help_ru.html index b48a720c..4de0fbff 100644 --- a/doc/help_ru.html +++ b/doc/help_ru.html @@ -787,8 +787,8 @@ width: 100%; } -

Программа "Candle"

-

Содержание

+

Программа "Candle"

+

Содержание

Приложение А. Настройки контроллера
Приложение Б. Таблица G-код команд


-

1 Назначение программы

+

1 Назначение программы

Программа "Candle" (далее - программа) предназначена для управления станками с числовым программным управлением (далее - ЧПУ), имеющими контроллер "GRBL" (далее - контроллер), с помощью ПЭВМ.

Программа позволяет работать с фрезерными 3-ех осевыми станками, лазерными плоттерами.

Основные функции программы:

@@ -838,8 +838,8 @@

Отображение состояния ЧПУ.
  • Ручное управление ЧПУ.
  • -

    2 Условия выполнения программы

    -

    2.1 Требования к аппаратному обеспечению

    +

    2 Условия выполнения программы

    +

    2.1 Требования к аппаратному обеспечению

    Для корректной работы программы необходима ПЭВМ со следующими характеристиками:

    • процессор, поддерживающий набор инструкций SSE2,
    • @@ -848,16 +848,16 @@

      свободный порт USB или RS-232 для подключения ПЭВМ к контроллеру ЧПУ,
    • свободное место на запоминающем устройстве не менее 20 Мб.
    -

    2.2 Требования к программному обеспечению

    +

    2.2 Требования к программному обеспечению

    Программа требует наличия на ПЭВМ операционной системы Windows 7 и выше, с установленным драйвером OpenGL, драйвером преобразователя USB-UART при подключении ЧПУ через порт USB.

    -

    3 Выполнение программы

    -

    3.1 Установка программы

    +

    3 Выполнение программы

    +

    3.1 Установка программы

    Программа поставляется в виде архива "candle_v.v.v_x86.zip" для 32-разрядных процессоров и "candle_v.v.v_x64.zip" для 64-разрядных, где v.v.v - номер версии программы.

    Для установки необходимо распаковать архив в рабочую папку, например: "D:". В папке будет создан каталог программы "Candle" со всеми необходимыми для работы файлами.

    После распаковки, для обеспечения дальнейшего быстрого запуска, нужно создать ярлык к исполняемому файлу "D:\Candle\candle.exe".

    -

    3.2 Запуск

    +

    3.2 Запуск

    Запуск программы осуществляется по вызову файла "candle.exe" из папки установки или с помощью созданного ранее ярлыка.

    -

    3.3 Главное окно

    +

    3.3 Главное окно

    При запуске программы на дисплее должно отобразиться главное окно программы, представленное на рисунке 1.

    Главное окно программы

    Рисунок 1 - Главное окно программы

    @@ -875,7 +875,7 @@

    Все окна, за исключением окна "G-код программа", могут быть перемещены перетаскиванием с нажатой левой кнопки мыши (далее - ЛКМ) на заголовке окна. В процессе перемещения конфигурация главного окна программы будет динамически изменяться, указывая будущее расположение перемещаемого окна.

    Окна могут быть отделены от главного окна нажатием на кнопку "Отделить" заголовка, закрыты - "Закрыть". Отделенные окна могут быть возвращены в главное окно перетаскиванием за заголовок, закрытые - выбором соответствующего пункта в главном меню "Вид - Окна".

    Размеры окон изменяются нажатием ЛКМ на границу окна и ее перетаскиванием в нужную сторону.

    -

    3.3.1 Главное меню

    +

    3.3.1 Главное меню

    Главное меню программы предоставляет доступ к основным функциям программы. Меню разделено на группы и пункты, описание которых приведено в таблице 1.

    Таблица 1 - Главное меню программы

    @@ -949,8 +949,8 @@

    3.3.2 Окна

    -

    3.3.2.1 Окно "G-код программа"

    +

    3.3.2 Окна

    +

    3.3.2.1 Окно "G-код программа"

    Текущая УП отображается в окне "G-код программа", представленном на рисунке 2.

    Окно "G-код программа"

    Рисунок 2 - Окно "G-код программа"

    @@ -980,7 +980,7 @@

    Следует учитывать, что при активации команд "Пауза" и "Остановить" фактическая остановка ЧПУ выполняется только по опустошению входного буфера команд контроллера. Для немедленной остановки ЧПУ необходимо использовать команды панели "Управление": "Удержание", "Сброс".

    Слева от кнопок расположен флаг, отвечающий за автоматическую прокрутку таблицы в процессе отправки УП. При активной передаче УП в контроллер и ручной прокрутке таблицы флаг сбрасывается.

    -

    3.3.2.2 Окно "Визуализатор"

    +

    3.3.2.2 Окно "Визуализатор"

    Графическое представление УП отображается в окне "Визуализатор" (рисунок 3).

    Окно "Визуализатор"

    Рисунок 3 - Окно "Визуализатор"

    @@ -1082,14 +1082,14 @@

    В правом нижнем углу выводится информация о текущем времени работы ЧПУ под управлением загруженной УП и ориентировочное полное время работы по УП.

    Информация об очереди команд, отправляемых в контроллер ЧПУ представлена в строке ниже и включает в себя: общий размер команд, отправленных и обрабатываемых в данный момент контроллером ЧПУ; количество обрабатываемых команд; количество инжектированных команд (команд отправляемых помимо команд УП) в очереди.

    В этой же области имеется вспомогательная информация об общем количестве вершин, составляющих 3D проекцию, и значение количества кадров в секунду построения проекции.

    -

    3.3.2.3 Окно "Камера"

    +

    3.3.2.3 Окно "Камера"

    Изображение с подключенной к ПЭВМ камеры выводится в окне "Камера" (рисунок 4).

    Окно "Камера"

    Рисунок 4 - Окно "Камера"

    Перемещение вида в окне производится с нажатой ЛКМ смещением курсора мыши в заданном направлении, изменение масштаба - колесом прокрутки мыши.

    В окне имеются прицельные элементы: вертикальная, горизонтальная линии и окружность с центром в точке пересечения линий. Перемещение точки пересечения линий производится нажатием ЛКМ с удерживанием клавиши <Shift> клавиатуры и перемещением курсора мыши в заданном направлении.

    Параметры, такие как: разрешение изображения камеры, цвет и толщина линий прицельных элементов, доступны в окне настроек программы.

    -

    3.3.2.4 Окно "Консоль"

    +

    3.3.2.4 Окно "Консоль"

    Для ручного управления ЧПУ, а также настройки и вывода информации о состоянии контроллера в программе предусмотрено окно "Консоль" (рисунок 5).

    Окно "Консоль"

    Рисунок 5 - Окно "Консоль"

    @@ -1098,15 +1098,15 @@

    Команда < Ответ

    Если в настройках программы включен флаг "Отображать команды интерфейса пользователя" в поле выводов ответов будут отображены все команды, отправляемые в контроллер по нажатию элементов управления инструментальных панелей. При включенном флаге "Отображать команды G-code программы" - все команды УП при передаче УП в контроллер.

    Очистка поля вывода ответов производится нажатием на кнопку "Очистить консоль".

    -

    3.3.2.5 Окна "Устройство", "Модификация", "Пользователь"

    +

    3.3.2.5 Окна "Устройство", "Модификация", "Пользователь"

    Инструментальные панели с элементами управления и отображения информации о состоянии ЧПУ располагаются в окнах "Устройство", "Модификация", "Пользователь".

    Наименование окон характеризует функциональное назначение панелей, расположенных в них, но не ограничивает их состав - все панели могут свободно перемещаться как внутри соответствующего окна так и между окнами.

    Перемещение осуществляется перетаскиванием панели за заголовок с нажатой ЛКМ. В процессе перетаскивания в окнах будет отображаться место будущего расположения панели в виде линии синего цвета.

    Большинство инструментальных панелей имеют способность сворачиваться для экономии места на экране ПЭВМ, данные панели имеют знак "-" слева от наименования в заголовке в развернутом состоянии и "≡" - в свернутом. Сворачивание и разворачивание панели осуществляется щелчком ЛКМ на заголовке.

    Текст заголовков панелей в нормальном состоянии имеет черный цвет, при активации важных функций панелей - красный.

    При запуске программы часть панелей отображается в неактивном состоянии и активируется только при подключении к ПЭВМ ЧПУ.

    -

    3.3.3 Инструментальные панели

    -

    3.3.3.1 Панель "Состояние"

    +

    3.3.3 Инструментальные панели

    +

    3.3.3.1 Панель "Состояние"

    На панели "Состояние" (рисунок 6) выводятся текущие значения рабочих и машинных координат, а также режим работы контроллера ЧПУ. Координаты отображаются в полях вывода, расположенных по горизонтали в порядке: X, Y, Z.

    Возможные режимы работы контроллера ЧПУ (поле "Статус") следующие:

      @@ -1128,7 +1128,7 @@

      Фон поля "Статус" может изменять цвет в зависимости от состояния.

      Панель "Состояние"

      Рисунок 6 - Панель "Состояние"

      -

      3.3.3.2 Панель "Управление"

      +

      3.3.3.2 Панель "Управление"

      Панель "Управление" содержит набор кнопок, отвечающих за базовые функции контроллера "GRBL" (рисунок 7). Состав, посылаемые команды (коды команд), и описание приведены в таблице 3 в порядке их расположения на панели: слева направо, сверху вниз.

      Панель "Управление"

      Рисунок 7 - Панель "Управление"

      @@ -1185,12 +1185,12 @@

      Следует отметить, что при выключении режима проверки УП, посылается команда программного сброса с последующим восстановлением состояния контроллера и смещений рабочих координат.

      -

      3.3.3.3 Панель "Система координат"

      +

      3.3.3.3 Панель "Система координат"

      На рисунке 8 изображена панель управления системой координат ЧПУ (далее - СК).

      Панель "Система координат"

      Рисунок 8 - Панель "Система координат"

      В верхней части панели выводятся смещения для активной СК для осей X, Y и Z, в нижней расположены кнопки выбора СК и обнуления текущих координат по оси X, Y, Z, всех осей одновременно для активной СК.

      -

      3.3.3.4 Панель "Шпиндель"

      +

      3.3.3.4 Панель "Шпиндель"

      На панели управления шпинделем (рисунок 9) расположены:

      • Поле ввода для установки/вывода заданной скорости вращения шпинделя.
      • @@ -1203,7 +1203,7 @@

        Текст в поле ввода может иметь два цвета: черный в случае, если текущая скорость вращения шпинделя соответствует заданной; красный - в противном случае.

        Ползунок имеет ручку в виде круга серого цвета с контуром темного цвета, с помощью которой задается скорость вращения шпинделя и маркер в виде круга с более светлыми цветами, отображающий текущую скорость вращения.

        Во время передачи УП в контроллер скорость вращения может быть изменена с помощью вышеуказанных элементов управления, при этом используются инжектированные G-код команды "S", или с помощью функции переопределения скорости панели "Коррекция". Включение/выключение шпинделя во время передачи возможно только при переводе контроллера в режим удерживания.

        -

        3.3.3.5 Панель "Перемещение"

        +

        3.3.3.5 Панель "Перемещение"

        На панели "Перемещение" находятся элементы управления движением инструмента ЧПУ, а именно:

        • Кнопки движения по осям X (стрелки влево, вправо), Y (стрелки вверх, вниз), Z (стрелки вверх, вниз, расположенные справа).
        • @@ -1216,19 +1216,19 @@

          Рисунок 10 - Панель "Перемещение"

          Списки "Шаг" и "Подача" имеют предварительные наборы шагов перемещения и скоростей соответственно, но позволяют ввести произвольные значения в поля списков. Введенные значения запоминаются при включении флага "Управление с клавиатуры" и могут выбираться из списков при последующем запуске программы.

          Каждой кнопке панели, а также перелистыванию значений "Шаг" и "Подача" могут быть назначены быстрые клавиши, задаваемые в окне "Настройки" программы. Управление данными клавишами включается флагом "Управление с клавиатуры".

          -

          3.3.3.6 Панель "Коррекция"

          +

          3.3.3.6 Панель "Коррекция"

          На рисунке 11 представлен вид панели "Коррекция". На панели расположены элементы переопределения скорости подачи, скорости холостого хода и скорости вращения шпинделя во время отправки УП в контроллер ЧПУ.

          Элементы аналогичны таковым, расположенным на панели "Шпиндель", за исключением замененной кнопки включения соответствующим флагом.

          Панель "Коррекция"

          Рисунок 11 - Панель "Коррекция"

          -

          3.3.3.7 Панель "Карта высот"

          +

          3.3.3.7 Панель "Карта высот"

          Панель "Карта высот" (рисунок 12) отвечает за создание, загрузку, снятие карты неровности поверхности и дальнейшую коррекцию УП для нивелирования кривизны детали, обрабатываемой с помощью ЧПУ. Данная функция полезна при фрезеровке печатных плат и гравировке.

          Панель "Карта высот"

          Рисунок 12 - Панель "Карта высот"

          На панели имеются элементы создания, загрузки и включения режима работы с картой высот; задания границ прямоугольной зоны карты; установки количества точек зондирования по осям X и Y; установки рабочей высоты над поверхностью и глубины зондирования; установки скорости подачи; установки количества линий сетки разбиения УП по осям X и Y.

          Коррекция УП по активной карте высот производится включением флага "Использовать карту высот".

          Более подробная информация об использовании карты высот приведена в п. 3.7 "Создание карты высот" данного руководства.

          -

          3.3.3.8 Панель "Пользовательские команды"

          +

          3.3.3.8 Панель "Пользовательские команды"

          Для расширения функционала программы в части управления ЧПУ предусмотрена панель "Пользовательские команды" (рисунок 13). На панели расположены кнопки, по нажатию на которые в контроллер ЧПУ отправляются заранее определенные команды.

          Панель "Пользовательские команды"

          Рисунок 13 - Панель "Пользовательские команды"

          @@ -1260,7 +1260,7 @@

          "notepad", [])}

          Подробнее об использовании языка программирования JavaScript в программе читайте в п. 5 "Разработка расширений" данного руководства

          -

          3.4 Окно настроек

          +

          3.4 Окно настроек

          Настройки программы доступны в окне настроек (рисунок 14), вызываемое по активации пункта "Настройки" меню "Сервис" программы.

          Окно настроек

          Рисунок 14 - Окно настроек

          @@ -1665,12 +1665,12 @@

          3.5 Подготовка программы к работе

          -

          3.6 Загрузка управляющей программы

          -

          3.7 Создание карты высот

          -

          3.8 Выполнение управляющей программы

          -

          4 Сообщения оператору

          -

          5 Разработка расширений

          +

          3.5 Подготовка программы к работе

          +

          3.6 Загрузка управляющей программы

          +

          3.7 Создание карты высот

          +

          3.8 Выполнение управляющей программы

          +

          4 Сообщения оператору

          +

          5 Разработка расширений

          Для добавления новых функций в программу, в т.ч. новых элементов пользовательского интерфейса, предусмотрен механизм расширений.

          Каждое расширение должно быть оформлено в виде папки, содержащей набор файлов:

            @@ -1681,7 +1681,7 @@

            Папка расширения должна храниться в каталоге "plugins" папки установки программы.

            В программе предустановлены три расширения: "camera", "coordinatessytem" и "usercommands" отвечающие за функционал панелей "Камера", "Система координат", "Пользовательские команды" соответственно.

            Набор расширений программы может со временем пополняться.

            -

            5.1 Файл конфигурации расширения

            +

            5.1 Файл конфигурации расширения

            Файл конфигурации должен содержать два текстовых ключа в группе "General":

            • "title" - заголовок окна и/или панели расширения.
            • @@ -1692,7 +1692,7 @@

              5.2 Файл скрипта

              +

              5.2 Файл скрипта

              Код расширения должен быть выполнен на языке программирования "JavaScript" и реализовывать функционал расширения.

              Расширение может предоставлять пользовательский интерфейс панели для окон "Устройство", "Модификация", "Пользователь", отдельного окна в главном окне программы, интерфейс для окна настроек, так и не иметь его.

              При необходимости настройки расширения при запуске программы и/или создания элементов пользовательского интерфейса код расширения может содержать следующие функции:

              @@ -1754,7 +1754,7 @@

              5.3 Файл перевода

              +

              5.3 Файл перевода

              Каждое расширение может иметь файл перевода надписей. Формат имени файла следующий:

              translation_xx.qm,

              где xx - двухбуквенный код языка перевода.

              Скомпилированные файлы перевода "*.qm" создаются из текстовых "*.ts" с помощью программы "Qt Linguist" или консольной команды "lrelease", входящих в пакет установки фреймворка "Qt".

              Подробнее о создании файлов переводов читайте в документации по фреймворку "Qt": Qt Linguist Manual.

              -

              Приложение А. Настройки контроллера

              -

              Приложение Б. Таблица G-код команд

              +

              Приложение А. Настройки контроллера

              +

              Таблица 11 - Описание настроек контроллера GRBL версии 1.1

              +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    КодОписаниеДопустимые значенияПример значения
    0Длительность импульса "Step" управления шаговыми двигателями, микросекунды10
    1Таймаут выключения шаговых двигателей, миллисекунды25
    2Битовая маска инвертирования сигналов "Step"Разряд 0 - ось X, 1 - Y, 2 - Z0
    3Битовая маска инвертирования сигналов "Dir"Разряд 0 - ось X, 1 - Y, 2 - Z0
    4Флаг инвертирования сигнала "Enable"0 - активный уровень низкий, 1 - высокий0
    5Флаг инвертирования сигналов концевых выключателей0 - активный уровень низкий, 1 - высокий0
    6Флаг инвертирования сигнала зонда0 - активный уровень низкий, 1 - высокий0
    10Битовая маска вывода информации о состоянии контроллераРазряд 0 - вывод рабочих координат, 1 - машинных, 2 - вывод информации о буфере3
    11Значение параметра Junction deviation, миллиметры0.01
    12Допустимое отклонение при аппроксимации дуг отрезками, миллиметры0.002
    13Флаг вывода координат и смещений в дюймах0 - миллиметры, 1 - дюймы0
    20Флаг включения программных границ0 - выключено, 1 - включено0
    21Флаг включения аппаратных границ0 - выключено, 1 - включено0
    22Флаг включения функции поиска домашнего положения0 - выключено, 1 - включено0
    23Битовая маска инвертирования направления движения при поиске домашнего положенияРазряд 0 - ось X, 1 - Y, 2 - Z0
    24Скорость поиска домашнего положения, миллиметры в секунду25
    25Начальная скорость поиска домашнего положения, миллиметры в секунду250
    26Время фильтра дребезга контактов концевых выключателей, миллисекунды250
    27Расстояние отхода от концевых выключателей по завершению поиска домашнего положения, миллиметры1
    30Максимальная скорость вращения шпинделя, обороты в секунду10000
    31Минимальная скорость вращения шпинделя, обороты в секунду0
    32Флаг включения режима "Лазер", движение без остановки при обработке кода "S"0 - выключено, 1 - включено0
    100Количество шагов на один миллиметр по оси X200
    101Количество шагов на один миллиметр по оси Y200
    102Количество шагов на один миллиметр по оси Z200
    110Максимально допустимая скорость подачи по оси X, миллиметры в секунду2000
    111Максимально допустимая скорость подачи по оси Y, миллиметры в секунду2000
    112Максимально допустимая скорость подачи по оси Z, миллиметры в секунду2000
    120Ускорение по оси X, миллиметры в секунду за секунду200
    121Ускорение по оси Y, миллиметры в секунду за секунду200
    122Ускорение по оси Z, миллиметры в секунду за секунду200
    130Максимально допустимое перемещение по оси X от домашнего положения (используется программными границами)200
    131Максимально допустимое перемещение по оси Y от домашнего положения200
    132Максимально допустимое перемещение по оси Z от домашнего положения200
    +

    Приложение Б. Таблица G-код команд

    +

    Таблица 12 - Краткая информация по G-код командам

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    КомандаОписаниеПример
    G0Ускоренное перемещениеG0 X10 Y20 Z30
    G1Линейная интерполяцияG1 X0 Y0 Z0 F100
    G2Круговая интерполяция по часовой стрелкеG2 X10 Y0 R5 F100
    G3Круговая интерполяция против часовой стрелкиG3 X10 Y0 R5 F100
    G4Задержка выполнения УП, P - время задержки в секундахG4 P0.5
    G10Задание смещений системы координатG10 L2 X10, G10 L20 X0
    G17Выбор плоскости X-Y круговой интерполяцииG17
    G18Выбор плоскости Z-X круговой интерполяцииG18
    G19Выбор плоскости Y-Z круговой интерполяцииG19
    G20Включение дюймовой системы измеренияG20
    G21Включение метрической системы измеренияG21
    G28Возврат в исходную позициюG28 G91 X0 Y0 Z0
    G28.1Задание текущей позиции как исходнойG28.1
    G30Возврат в позицию смены инструментаG30 G91 Z0
    G30.1Задание текущей позиции как позиции смены инструментаG30.1
    G38.2Зондирование в направлении заготовки, ошибка при отсутствии контакта при перемещении на заданную дистанциюG38.2 G91 X10 F10
    G38.3Зондирование в направлении заготовкиG38.3 G91 X10 F10
    G38.4Зондирование в направлении от заготовки, ошибка при сохранении контакта при перемещении на заданную дистанциюG38.4 G91 X-10 F10
    G38.5Зондирование в направлении от заготовкиG38.4 G91 X-10 F10
    G40Отмена компенсации радиуса инструментаG40
    G43.1Компенсация длины инструментаG43.1 Z0.5
    G49Отмена компенсации длины инструментаG49
    G53Использовать систему координат станка (машинные координаты)G53 G90 G0 X0 Y0
    G54...G59Выбор системы координатG55
    G61Включение режима точного остановаG1 G61 X10 F100
    G80Отмена цикловG80
    G90Использовать абсолютные координатыG1 G90 X10 Y10 Z0
    G91Использовать относительные координатыG1 G91 X10
    G91.1Использовать относительные координаты I, J, K задания круговой интерполяцииG91.1
    G92Задать смещения рабочих координатG92 X0 Y0
    G92.1Сброс смещения рабочих координатG92.1
    G93Включение задания подачи в обратных единицах времени (1/F минут)G93
    G94Включение задания подачи в миллиметрах в минутуG94
    M0Приостановка выполнения УПM0
    M1Условная приостановка выполнения УПM1
    M2Завершение УПM2
    M3Включение вращения шпинделя в направлении часовой стрелкиM3
    M4Включение вращения шпинделя в направлении против часовой стрелкиM4
    M5Выключение шпинделяM5
    M7Включение воздушного охлажденияM7
    M8Включение водяного охлажденияM8
    M9Выключение охлажденияM9
    M30Завершение УП с перемоткой в началоM30

    1 Назначение программы
    2 Условия выполнения программы
        2.1 Требования к аппаратному обеспечению
    @@ -826,7 +826,7 @@

    1 Назначение программы
    +2 Условия выполнения программы
    +    2.1 Требования к аппаратному обеспечению
    +    2.2 Требования к программному обеспечению
    +3 Выполнение программы
    +    3.1 Установка программы
    +    3.2 Запуск
    +    3.3 Главное окно
    +        3.3.1 Главное меню
    +        3.3.2 Окна
    +            3.3.2.1 Окно "G-код программа"
    +            3.3.2.1 Окно "Визуализатор"
    +            3.3.2.3 Окно "Камера"
    +            3.3.2.4 Окно "Консоль"
    +            3.3.2.5 Окна "Устройство", "Модификация", "Пользователь"
    +        3.3.3 Инструментальные панели
    +            3.3.3.1 Панель "Состояние"
    +            3.3.3.2 Панель "Управление"
    +            3.3.3.3 Панель "Система координат"
    +            3.3.3.4 Панель "Шпиндель"
    +            3.3.3.5 Панель "Перемещение"
    +            3.3.3.6 Панель "Коррекция"
    +            3.3.3.7 Панель "Карта высот"
    +            3.3.3.8 Панель "Пользовательские команды"
    +    3.4 Окно настроек
    +    3.5 Подготовка программы к работе
    +    3.6 Загрузка управляющей программы
    +    3.7 Создание карты высот
    +    3.8 Выполнение управляющей программы
    +4 Сообщения оператору
    +5 Разработка расширений
    +    5.1 Файл конфигурации расширения
    +    5.2 Файл скрипта
    +    5.3 Файл перевода
    +Приложение А. Настройки контроллера
    +Приложение Б. Таблица G-код команд